Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Wireless Networks (2020) 26:5623–5630

https://doi.org/10.1007/s11276-019-02025-3 (0123456789().,-volV)(0123456789().
,- volV)

New metrics to modify BGP routes based on SDN


Lorenzo M. Elguea1 • Felix Martinez-Rios1

Published online: 17 May 2019


Ó Springer Science+Business Media, LLC, part of Springer Nature 2019

Abstract
Through Software Defined Network, routes obtained through Border Gateway Protocol can be modified to improve latency
or select a shorter path. With the same tool that perform the above actions, you can modify routes, for example, to avoid
autonomous systems in certain countries or some other policy that may help, for example, security.

Keywords BGP  Latency  SDN  Other policies

1 Introduction The manipulation of these routes can be done with Java,


Python, and others. [4, 7, 9] and the changes made to the
The variability in latency makes it difficult to decide the routing tables have an immediate effect. [13]
best route, but using confidence limits, you can determine This document shows the methodology used for the
if one route is better than another or even if the average analysis of the BGP routes implemented as SDN. The most
latency is different, it may be the case that both routes common metrics are detailed, such as latency, and how to
practically presents the same delay time. This is a natural obtain benefits when optimizing the routes, and some dif-
metric to determine, and with the result, create a new route ferent metrics are shown, such as the private autonomous
using SDN [12] to inject it through BGP to the routing systems and the analysis of the routes considering the
scheme of an institution. You can also determine which registered ISP in the path. These examples were created in
routes are not optimal, because if you have more than 2 order to show the flexibility of the BGP analysis that can be
neighbors of BGP, you can use the information of the other performed on a PC connected as a neighbor to the router,
neighbors to determine which routes are not optimal, cor- through iBGP.
rect them and also inject them back into the router [3, 6].
Using this same tool, you can avoid passing through 1.1 Objective
certain Internet Service Providers (ISPs) or prevent traffic
from reaching suppliers in some countries. These are The primary objective is to show the capabilities of
examples of the range of possibilities to modify routes with implementing SDN in conjunction with BGP to relay
SDN and BGP. If this is possible, clearly less complicated control of Internet routes. This allows to reduce the latency
options, for example, to define costs for links, to have or to avoid specific autonomous systems. Additionally, the
privileged ISPs on others, are possible thanks to the anal- implementation of BGP route analysis allows determining
ysis of the BGP routes in a computer, such as a PC in real which network segments pass through certain ISPs (for
time, for the taking of these decisions. example, destinations that go to the United States and pass
through other countries) or even more relevant routes that
optimized with the inference of the information of the
whole topology of BGP.
& Lorenzo M. Elguea This paper presents the standard metrics such as latency
lelguea@up.edu.mx (and a method to find those that are not optimal) and the
Felix Martinez-Rios new metrics that are proposed, as routes used by suppliers
fmartin@up.edu.mx from certain countries. Finally, some tables with examples
1
Facultad de Ingenierı́a, Universidad Panamericana, Augusto and conclusions are shown. This document is just a sample
Rodin 498, Ciudad de México 03920, Mexico of the possibilities of SDN using BGP.

123
5624 Wireless Networks (2020) 26:5623–5630

2 Methodology in IPv4 and 60,000 in IPv6), so this method is only recom-


mended to network segments where services require it, such
An application was developed in Java that implements as video traffic, VoIP or remote control applications.
BGP, both in IPv4 and in IPv6, this allows to obtain the The process consists of measuring the latency by
routing tables of all Internet, using three ISPs, two of local selecting the different suppliers and then comparing them
origin in Mexico and one International (Century Link). using confidence limits as explained in the previous paper
Each route to a network segment is simplified by elimi- [2]. Since you have the optimal route, simply modify the
nating the same routes (the destination was not considered, route through SDN to inject it into BGP, with some metrics
only the path) and with that information, the different that give priority to those already owned by the router. (For
analyses were carried out. For example, if a destination example ‘‘LOCAL_PREF’’ with a higher value)
uses a direct neighbor, it is preferred to change the route to The following Eq. 1 is used to calculate the confidence
the direct neighbor, since it is likely that this longer route limits and to be able to determine which provider has really
exists due to some information that is not propagated to all lower latency. To characterize the latency of the network,
the autonomous systems. By having the complete routes is the test should consider the local network (LAN) and the
possible to analyze the information of the autonomous wide area network (WAN) [11] and in general, although
systems, for example, the country in which they are reg- IPv6 is more efficient, it can be considered that they have
istered or the number of neighbors connected, to determine the same latency [1]
the size of the provider and decide whether to modify the rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
r2A r2B
route or not, considering more sophisticated parameters ðxA  xB Þ  t þ  lA  lB  ðxA  xB Þ
5 5 ð1Þ
than latency. rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
2
rA rB 2
To compare the latencies, a proposed method is used, þt þ
which consists of calculating the minimum and maximum 5 5
variance of a sample and with these data determine the Table 1 shows the comparison of two ISPs, where the first
confidence limits [2]. is better than the second. This also seen in Fig. 1
In Table 2 the comparison of two ISP is shown, in this
example, there are no significant differences, and although
3 Development for SDN the average could indicate that the first ISP is better, due to
the variation of the latencies this is not so, and you can see
An application based on SDN [8] was developed in Java, this variation in Fig. 2
which implements BGP. It is compatible with BGP see 4, Both tables, Tables 1 and 2, show the statistical
and supports both IPv4 and IPv6, When connecting with parameters as average and minimum and maximum vari-
routers, this application allows keeping in-memory data, ance, if same, the degrees of freedom for a certainty value
such as the network segment, the Next-Hop, and the path of 95% are also shown. With these tables it is easy to
formed by sequences of autonomous systems. Practically determine if one latency is definitely better than the other
any operation with these routes is possible like the ones or, as in the second example, they are practically the same.
mentioned in this research.

The figures show the possible ranges of variance (be-


4 Common metrics tween the minimum and maximum values) in a standard
distribution graph. This allows appreciating, on what limits
The most important parameters to consider, may be the are the measured values. In the case of data networks, a lot
latency, the traffic balance between the ISPs and the costs of variances is not a good symptom of the network, as it
of the different links. This parameters justify the imple- may be affected by unusual traffic or changing path
mentation of SDN to be able to manipulate Internet routes conditions.
and have better control, known as traffic engineering.
4.2 Based on the best route
4.1 Based on latency
The BGP protocol optimizes routes based on the number of
Latencies are by far the most critical parameter, but it jumps, for this, it uses the information provided by each
requires being able to measure the time spent traveling the autonomous system of which it is a direct neighbor. In this
route for each ISP. This makes it difficult to optimize all the investigation, it has been found that by correlating infor-
network segments obtained by BGP (approximately 720,000 mation from all the neighbors, more routes can be found to

123
Wireless Networks (2020) 26:5623–5630 5625

Table 1 Example of confidence


ISP A ISP B
limits of two ISPs of different
latency xmin 41 xmin 73
x 45 x 76
xmax 49 xmax 83
r2min 6.4 r2min 12.67
r2max 12.8 r2max 16
m 7 ( a ¼ 95% ) m 7 ( a ¼ 95% )
Minimum Variance Maximum variance
35:618\xA  xB \  26:196 36:675\xA  xB \  25:325
Because if there is significant difference between the two suppliers,
it can be determined with 95% certainty that the ISP A is better than ISP B

Fig. 1 Figure of variance from two different ISP

optimize. This usually happens when some ISP, does not Table 3 shows eight segments of the IPv4 network that
announce all segments to all their neighbors, so the routes its routes, apparently correct, are not, if it is considered that
that are formed from the neighbor that does not have the AS6503 is a direct neighbor of the provider from where
information of all the segments, can generate routes in those routes were obtained so that they can be optimized
BGP, which appear shorter than what they would really be altering the Next-Hop by the gateway address of the
if all the information were taken into account. AS6503 and trimming the path from number 6503.
Experimentally it has been found, for example in Mexico, Table 4 shows seven IPv6 network segments. Likewise,
it is common for some ISP not to announce all its segments to if we consider that the AS3549 is a direct neighbor of the
other Mexican ISPs, but to ISP in the USA. This means that provider from where those routes were obtained, so they
for some network segments, it is necessary to go to the USA can be optimized by altering the Next-Hop by the gateway
and return to Mexico between 2 domestic ISPs.

123
5626 Wireless Networks (2020) 26:5623–5630

Table 2 Example of confidence


ISP A ISP B
limits of two ISPs of equal
latency xmin 41 xmin 46
x 46 x 49
xmax 50 xmax 52
r2min 8.26 r2min 3.6
r2max 17.2 r2max 7.2
m 6 ( a ¼ 95% ) m 6 ( a ¼ 95% )
Minimum Variance Maximum variance
6:77\xA  xB \0:99 8:405\xA  xB 2:405
Because if there is no significant difference between the two suppliers,
it can be determined with 95% certainty that the ISP A is the same as ISP B

Fig. 2 Figure of variance from two equal ISP

Table 3 Example of non-


ID Segment Next-Hop Path
optimized routes in IPv4
1 132.247.20.0/24 162.97.148.93/32 3549 3356 174 6503 28400 278
2 132.247.230.0/24 201.161.34.97/32 22566 3491 174 6503 28400 278
3 132.247.61.0/24 201.161.34.97/32 22566 3491 174 6503 28400 278
4 132.247.66.0/24 162.97.148.93/32 22566 3491 174 6503 28400 278
5 132.248.3.0/24 201.161.34.97/32 3549 3356 174 6503 28400 278
6 132.248.90.0/24 201.161.34.97/32 22566 3491 174 6503 28400 278
7 148.206.147.0/24 201.161.34.97/32 22566 3491 174 6503 28400 3596
8 200.23.184.0/24 201.161.34.97/32 22566 3491 174 6503 28400 28390

123
Wireless Networks (2020) 26:5623–5630 5627

Table 4 Example of non-


ID Segment Next-Hop Path
optimized routes in IPv6
1 2001:0450:2060::/48 2806:0:0:100::19 6503 174 3356 3549
2 2001:0450::/32 2806:0:0:100::19 6503 174 3356 3549
3 2001:13B0::/29 2806:0:0:100::19 6503 174 3356 3549
4 2001:1900:2340::/44 2806:0:0:100::19 6503 32098 6762 3549
5 2001:1900:2360::/44 2806:0:0:100::19 6503 32098 6939 3549 3549
6 2001:4870::/31 2806:0:0:100::19 6503 174 3356 3549
7 2A07:AA00:0088::/48 2806:0:0:100::19 6503 174 3356 3549

address of the AS3549 and leaving as path only the number the range of 2-byte autonomous systems and from
3549 4200,000,000 to 4294,967,294, in 4-byte AS
All the segments are not optimized, since there are AS The Table 5 shows 9 paths, both IPv4 and IPv6 that
that are direct neighbors, so the best route is through these contain private numbers.
ISPs and not the one that is shown as the best option.
5.2 Based on the registration country
of the autonomous system
5 Non-standard metrics
Each autonomous system is registered with the name of the
In the previous section examples were shown, of parame- ISP that administers it and this, in turn, belongs to a
ters that are recommended to consider, but taking advan- country. This record corresponds to each of the five
tage of the SDN capacity, other types of routes can be Regional Internet Registries (RIR).
analyzed and corrected. This is possible due to the use of The following examples (Table 6) show routes that
high-level languages such as Java in the construction of the change and return to a country. (15 routes of more than
SDN module, which allows analyzing all the obtained 4,000 found!)
routes quickly. The information shown in Tables 7 and 8 is only a
possibility of the reports that can be obtained. These
5.1 Numbers of invalid autonomous systems examples show summaries of the routes that pass through
Chinese Internet providers, and it is destiny is a provider of
You can search the routes that BGP provides with wrong another country. China was selected because of the dis-
numbers, which due to some configuration error or typo- tance to Mexico, where the tests were carried out.
graphical error, include numbers of autonomous systems With tools like this development for SDN, it is possible
that are not valid. to obtain statistics, which directly in a router cannot be, as
The most common problem is that numbers of private the following examples Tables 7 and 8):
autonomous systems are included in the announcement of
Internet routes. The numbers of private AS are clearly
defined in RFC6996 [10] and are: from 64,512 to 65,534 in

Table 5 Examples with paths


ID Segment Path
containing private AS in their
routes 1 188.234.120.0/21 22566 32098 9002 9049 65400
2 2001:0EE0:324A::/48 6503 174 9304 45899 64555
3 2001:0EE0:32:/40 6503 174 9304 45899 16625 64555
4 2A01:0280:0330::/48 6503 174 29518 64512
5 2402:3A80:0CA0::/43 22566 32098 9498 55410 55410 38266 65225
6 2402:3A80:1100::/42 22566 32098 9498 55410 55410 38266 65010
7 2402:3A80:1140::/42 22566 32098 9498 55410 55410 38266 65010
8 2402:3A80:1180::/42 22566 32098 9498 55410 55410 38266 65010
9 2402:3A80:11C0::/42 22566 32098 9498 55410 55410 38266 65010
All these segments advertise AS that are private

123
5628 Wireless Networks (2020) 26:5623–5630

Table 6 Routes not directs


3491(US) 4637(HK) 1221(AU) 33438(US) 32590(US)
From United States to United States crossing Hong Kong’s ISP
174(US) 12989(NL) 12041(US)
From United States to United States crossing Netherlands’s ISP
174(US) 12956(ES) 3352(ES) 29967(US)
From United States to United States crossing Spain’s ISP
3491(US) 3257(DE) 13333(US)
From United States to United States crossing Germany’s ISP
174(US) 3320(DE) 39356(GB) 197711(DE)
From Germany to Germany crossing United Kingdom’s ISP
174(US) 3257(DE) 6643(US)
From United States to United States crossing Germany’s ISP
3491(US) 7473(SG) 3758(SG) 10455(US)
From United States to United States crossing Singapore’s ISP
174(US) 3257(DE) 6095(US)
From United States to United States crossing Germany’s ISP
32098(US) 6939(US) 8529(OM) 15133(US)
From United States to United States crossing Oman’s ISP
174(US) 3257(DE) 27978(CL) 6429(CL) 18747(US)
From United States to United States crossing Germany’s and Chile’s ISP
3491(US) 4637(HK) 19661(US)
From United States to United States crossing Hong Kong’s ISP
6453(US) 15695(NL) 33045(US)
From United States to United States crossing Netherlands’s ISP
32098(US) 8359(RU) 8342(RU) 16083(RU) 72(US)
From United States to United States crossing many Russia’s ISP
174(US) 31133(RU) 19551(US)
From United States to United States crossing Russia’s ISP
22566(MX) 32098(US) 28438(MX)
From Mexico to Mexico crossing United States’s ISP
These routes show an atypical behavior, as it is not common for them to have to go through these
autonomous systems

Table 7 Statistics of paths that


Protocol: IPv4
use some Chinese ISP (IPv4)
Total of Segments: 740,697
Total of different paths: 103,055
Distribution of path that pass through Chinese ISP:
From Mexico to Kazakhstan 6
From Mexico to Lao 6
From United States to United States 6
From Mexico to Brazil 10
From Mexico to Singapore 12
From Mexico to Hong Kong 33
From Mexico to United States 33
From United States to Brazil 208
Others 45
Total destinations different from China, which pass through Chinese ISP: 359
This table shows the statistics of paths that pass through Chinese suppliers on IPv4

123
Wireless Networks (2020) 26:5623–5630 5629

Table 8 Statistics of paths that


Protocol: IPv6
use some Chinese ISP (IPv6)
Total of segments: 61,703
Total of different paths: 20,332
Distribution of path that pass through Chinese ISP:
From Mexico to Brazil: 17
From United States to Brazil: 12
From Mexico to Kenya: 1
Total destinations different from China, which pass through Chinese ISP: 30
This table shows the statistics of paths that pass through Chinese suppliers on IPv6

6 Conclusions 2. Elguea, L. M., & Martinez-Rios, F. (2017). An efficient method


to compare latencies in order to obtain the best route for SDN.
Procedia Computer Science116, 393 – 400. https://doi.org/10.
The possibilities of a flexible administration and an 1016/j.procs.2017.10.076. https://www.sciencedirect.com/sci
advanced traffic engineering in a router that implements ence/article/pii/S1877050917321269. Discovery and innovation
BGP are few due to the restrictions of the operating sys- of computer science technology in artificial intelligence era: The
2nd international conference on computer science and compu-
tems of the network equipment, and that these devices were tational intelligence (ICCSCI 2017).
designed and dimensioned only for this. With SDN, is 3. Elguea, L. M., & Martinez-Rios, F. (2018). A new method to
possible to have all the information that the router has of optimize BGP routes using SDN and reducing latency. Procedia
the BGP settings, in a PC, this allows more detailed Computer Science, 135, 163–169. https://doi.org/10.1016/j.procs.
2018.08.162. http://www.sciencedirect.com/science/article/pii/
management of the routes and in general of all the data, S1877050918314509. The 3rd International conference on com-
which allows inferring better routes than otherwise, It puter science and computational intelligence (ICCSCI 2018) :
would be possible. Tools like this, written in Java that Empowering smart technology in digital era for a better life.
implements BGP, allow practically define any policy and 4. Gamperli, A., Kotronis, V., & Dimitropoulos, X. (2016). Evalu-
ating the effect of centralization on routing convergence on a
apply it to generate new routes. Previously evaluating hybrid BGP-SDN emulation framework. arXiv preprint: arXiv:
routes with so many details is practically impossible in the 1611.03113.
router, but in a PC, the possibilities and flexibility is much 5. Gao, L., Zhang, Z. L., & Towsley, D. (1999). Catching and
greater, you can even determine the geographical location selective catching: Efficient latency reduction techniques for
delivering continuous multimedia streams. In: Proceedings of the
of each autonomous system, you can find the country to seventh ACM international conference on multimedia (part 1),
which it belongs or you can avoid crossing and return to (pp. 203–206). ACM.
other continents. The potential to change routes, for secu- 6. Iyer, S., & Lanka, S. (2006). Method and apparatus for deter-
rity problems, optimize networks, improve latency or mining latency between multiple servers and a client. US Patent
7,058,706. https://www.google.com/patents/US7058706.
directly download functions that a router does typically can 7. Joglekar, C. A. (2017). Route manipulation using Sdn and
now be achieved with SDN since it separates the control Quagga. Interdisciplinary Telecommunications Graduate Theses
plane with the data plane. Being able to perform the & Dissertations. 25. https://scholar.colorado.edu/tlen_gradetds/
treatment of routes in real time allows a more dynamic, 25. Accessed 5 Feb 2019.
8. Kreutz, D., Ramos, F. M., Verissimo, P., Rothenberg, C. E.,
safe and fast Internet. Although there are additional Azodolmolky, S., & Uhlig, S. (2015). Software-defined net-
mechanisms to reduce latency, such as the [5] cache, it is working: A comprehensive survey. Proceedings of the IEEE,
more efficient to select shorter routes that are discovered 103(1), 14–76.
with tools like the one presented here. 9. Medved, J., Varga, R., Tkacik, A., & Gray, K. (2014). Open-
daylight: Towards a model-driven SDN controller architecture.
In: 2014 IEEE 15th International Symposium on a World of
Acknowledgements I want to thank Luis Enrique and Carlos Chavez
Wireless, Mobile and Multimedia Networks 2014 (pp. 1–6).
for their support and patience for these tests in the production net-
IEEE.
work. Finally, we thank the anonymous reviewers for their helpful
10. Mitchell, J. (2013). Autonomous system (as) reservation for
suggestions.
private use. Technical report. http://www.rfc-editor.org/info/
rfc6996. http://www.rfc-editor.org/info/rfc6996. Accessed 1 Feb
2019.
References 11. Thekkath, C. A., & Levy, H. M. (1993). Limits to low-latency
communication on high-speed networks. ACM Transactions on
1. Cisco. (2010). Performance-comparison testing of IPv4 and IPv6 Computer Systems (TOCS), 11(2), 179–203.
throughput and latency on key Cisco router platforms. A sum- 12. Yi, Z., Yiqiang, H., & Xiaofeng, H. (2013). Characteristics,
mary of findings (Vol. 1, pp. 1–25). development and future of sdn. Telecommunications Science,
29(9), 102–107.

123
5630 Wireless Networks (2020) 26:5623–5630

13. Zhang, B., Massey, D., & Zhang, L. (2004). Destination reach- School of Universidad Panamericana at Mexico City, as a Full-Time
ability and BGP convergence time [border gateway routing pro- Professor. From 1998 to 2009, he heads the Computer Science
tocol]. In: Global telecommunications conference 2004 Engineering Program. From July 2009 to 2016 he was a Dean of
(GLOBECOM’04) (vol. 3, pp. 1383–1389). IEEE. Engineering School. He teaches undergraduate and postgraduate
subjects such as Artificial Intelligence, Mobile Robotics, Scientific
Computing, Theory of Compilers and Object Oriented Programming.
Lorenzo M. Elguea is an engi- He is the Faculty Advisor for the Aerodesign international competi-
neer from the Universidad tion organized by the Society of Automotive Engineers, USA. His
Panamericana and a candidate current research interests include artificial intelligence, optimization
doctor from the same university. algorithms, data science, mobile robotics and the internet of things.
His research interests are mainly He is a member of the Steering Committee of the International
in latencies, WAN (BGP) net- Conference on Computer Science and Computational Intelligence and
works, wireless networks, IPv6, General Chair of the International Conference on Computer Science
Cloud Computing and IoT. and Engineering and Health Services.
Also, he is CIO of the Univer-
sidad Panamericana campus of
Publisher’s Note Springer Nature remains neutral with regard to
Mexico City.
jurisdictional claims in published maps and institutional affiliations.

Felix Martinez-Rios received his


B.Sc. degree in Physics from the
Universidad de la Habana,
Cuba, in 1985, and the M.Sc.
and Ph.D. degrees in Computer
Science from the Tecnológico
de Monterrey, México City,
Mexico, in 2005 and 2009,
respectively. From July 1985 to
July 1987 he joined the
Telecommunications Research
Laboratory in Havana as a
researcher, Cuba. In July of
1987, he began as a professor at
the Higher Pedagogical Institute
in Havana, Cuba until 1994. In 1997, he joined the Engineering

123
Reproduced with permission of copyright owner. Further reproduction
prohibited without permission.

You might also like