In this article we will look at Border Gateway Protocol (BGP) which is one of the widely used networking protocol used in Internet.
Introduction
BGP (Border Gateway Protocol) is the main dynamic routing protocol used across the Internet. Routers that use BGP protocol, exchange information about reachable networks. Along with information about networks, various attributes of the networks are passed, which BGP uses to select the best path and set routing policies. One of the main attributes sent along with the information about the route is the list of autonomous systems.
It allows BGP to determine where is the network located within the autonomous system, to prevent routing loops, and also can be used when setting policies. Routing is carried out step by step, from one autonomous system to another. So as BGP operates with large volumes of data (the current size of the table for IPv4 routes is more than 580,000 routes), the principles of its configuration and operation differ from the internal dynamic routing protocol (IGP).
BGP History
When the internet came into the market, then GGP started creating the problem. As the internet backbone became large due to which the routing table was also large, which led to the maintenance issue. To resolve this issue, the ARPANET was divided into multiple domains, known as autonomous systems. Each autonomous system can be handled individually, and each system has its own routing policy, and the autonomous system contains the small routing database.
The first network was ARPANET, which the department of defense developed, and the Advanced Research Project Agency designed it. In Arpanet, only one network exists, which was handled by the single administrator. All the routers were the part of the single network, and the routing was performed with the help of the GGP (Gateway to Gateway Routing Protocol). The autonomous system numbers were not used in the GGP protocol.
When the autonomous system concept was implemented, then the first routing protocol came known as RIP that runs on the single autonomous system. To connect one autonomous system with another autonomous system, EGP (Exterior Gateway Protocol) protocol was developed. The EGP protocol was launched in 1984, defined in RFC 904. The EGP protocol was used for five years, but it had certain flaws due to which the new protocol known as Border Gateway Protocol (BGP) was developed in 1989, defined in RFC 1105. There are many versions of BGP, such as:
- BGP version 1: This version was released in 1989 and is defined in RFC 1105
- BGP version 2: It was defined in RFC 1163
- BGP version 3: It was defined in RFC 1267
- BGP version 4: It is the current version of BGP defined in RFC 1771
BGP Features
Open standard: It is a standard protocol which can run on any device.
Exterior Gateway Protocol: It is an exterior gateway protocol that is used to exchange the routing information between two or more autonomous system numbers.
InterAS-domain routing: It is specially designed for inter-domain routing, where interAS-domain routing means exchanging the routing information between two or more autonomous number system.
Supports internet: It is the only protocol that operates on the internet backbone.
Classless: It is a classless protocol.
Incremental and trigger updates: Like IGP, BGP also supports incremental and trigger updates.
Path vector protocol: The BGP is a path vector protocol. Here, path vector is a method of sending the routes along with routing information.
Configure neighbourhood relationship: It sends updates to configure the neighbourhood relation-ship manually.
Application layer protocol: It is an application layer protocol and uses TCP protocol for reliability.
Metric: It has lots of attributes like weight attribute, origin, etc. BGP supports a very rich number of attributes that can affect the path manipulation process.
Administrative distance: If the information is coming from the external autonomous system, then it uses 20 administrative distance. If the information is coming from the same autonomous system, then it uses 200 administrative distance.
Path Attributes
The BGP chooses the best route based on the attributes of the path. The path attributes provide the path information. The attributes that show or store the path information are known as path attributes. This list of attributes helps the receiving router to make a better decision while applying any policy. The path attribute is broadly classified into two categories as shown below.
Well-known attribute: It is an attribute that should be recognized by every BGP router. The well-known attribute is further classified into two categories:
Well-known mandatory: The information includes AS path information, origin information, next-hop information. Here, mandatory means that it has to be present in all the BGP routing updates.
Well-known discretionary: It is recognized by all the BGP routers and passed on to other BGP routers, but it is not mandatory to be present in an update.
Optional attribute: It is an attribute that is not necessarily to be recognized by every BGP router. The optional attribute is further classified into two categories.
Optional transitive: BGP may or may not recognize this attribute, but it is passed on to the other BGP neighbors. Here, transitive means that if the attribute is not recognized, then it is marked as a partial.
Optional non-transitive: If the BGP cannot recognize the attribute, it ignores the update and does not advertise to another BGP router.
BGP Packets
There are four different types of packets exist in BGP.
Open: When the router wants to create a neighbourhood relation with another router, it sends the open packet.
Update: The update packet can be used in either of the two cases. It can be used to withdraw the destination, which has been advertised previously. It can also be used to announce the route to the new destination.
Keep Alive: The keep alive packet is exchanged regularly to tell other routers whether they are alive or not.
Notification: The notification packet is sent when the router detects the error condition or close the connection.
BGP packet format is as shown in the below figure.
Marker is a 32-bit field which is used for the authentication purpose. Length is a 16-bit field that defines the total length of the message, including the header. Type is a 8-bit field that defines the type of the packet.
Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.
He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.
He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.
Leave a Reply