Border Gateway Protocol

FREE Online Courses: Elevate Your Skills, Zero Cost Attached - Enroll Now!

Today, we are going to learn about Border Gateway Protocol. Let’s start!!!

What is BGP?

It uses path-vector routing and is an interdomain routing protocol. It’s a gateway protocol that allows autonomous systems on the internet to exchange routing information.

Because the Border Gateway Protocol (BGP) is used on a variety of autonomous systems, we should be familiar with BGP’s history, as well as the various types of autonomous systems.

History of BGP:

The first network was ARPANET, which was developed by the Department of Defense and designed by the Advanced Research Project Agency. There is only one network in Arpanet, which is managed by a single administrator. All of the routers were connected to a single network, and routing was done using the GGP protocol (Gateway to Gateway Routing Protocol). Among all the routing protocols, the GGP was the first. The GGP protocol did not use the autonomous system numbers.

When the internet was introduced to the market, GGP began to cause problems. As the internet backbone grew in size, the routing table grew in size as well, causing a maintenance issue. The ARPANET was divided into multiple domains, known as autonomous systems, to address this problem.

Each autonomous system has its own routing policy, and the autonomous system contains a small routing database. When the autonomous system concept was implemented, the first routing protocol, known as RIP, was developed to operate on a single autonomous system. T

he EGP (Exterior Gateway Protocol) protocol was created to connect one autonomous system to another autonomous system. RFC 904 defined the EGP protocol, which was launched in 1984. The EGP protocol was in use for five years, but it had flaws that led to the development of the Border Gateway Protocol (BGP) in 1989, as defined in RFC 1105.

BGP Autonomous Systems:

bgp autonomous systems

A collection of networks that fall under a single administrative domain is referred to as an autonomous system. Or, to put it another way, it’s a group of routers managed by a single administrative domain.

For example, a company may have multiple routers in various locations, but the single autonomous number system will recognise them all. We typically use IGP (Interior Gateway Protocol) protocols like RIP, IGRP, EIGRP, and OSPF within the same autonomous system or organisation.

Let’s say we want two autonomous systems to communicate. In that case, EGP is used (Exterior Gateway Protocols). BGP is a protocol that runs on the internet or is used to communicate between two separate autonomous number systems (Border Gateway Protocol).

BGP is the only protocol that is used to exchange routes between two different autonomous number systems or on the internet backbone. All routing information is controlled by the BGP protocol, which is used by Internet service providers.

Features of BGP:

1. Open Standard:

It is a universal protocol that can be used on any device.

2. Exterior Gateway Protocol:

It’s an exterior gateway protocol that allows two or more autonomous system numbers to exchange routing information.

3. InterAS-Domain Routing:

It is designed specifically for interAS-domain routing, which entails exchanging routing information between two or more autonomous number systems.

4. Supports internet:

On the internet backbone, it is the only protocol in use.

5. Classless:

It’s a protocol with no classes.

6. Incremental and Trigger updates:

BGP, like IGP, can handle incremental and trigger updates.

7. Path Vector Protocol:

BGP stands for Border Gateway Protocol. It is a path vector protocol. Path vector refers to a method of sending routes and routing information.

8. Configure neighbourhood relationship:

It sends updates so that the neighbourhood relationship can be manually configured.

9. Application layer protocol:

It’s an application layer protocol that relies on the TCP protocol for consistency.

10. Metric:

It has a lot of different attributes, such as the weight attribute, the origin, and so on. BGP has a plethora of attributes that can influence the path manipulation process.

11. Administrative distance:

If the data is coming from an external autonomous system, 20 administrative distance is used. If the data originates from the same autonomous system, 200 administrative distance is used.

BGP Loop Prevention Mechanism:

When you connect to the internet, it’s possible that you’ll advertise route 10.0.0.0 to some autonomous system, which will then advertise it to another autonomous system. Then there’s a chance that the same route will appear again. This results in a loop.

However, when a router sees its own AS number, for example, as shown in the above diagram, the network 180.10.0.0/16 is originating from AS 100, and when it sends to AS 200, it will carry its path information, i.e., 180.10.0.0/16 and AS 100. When AS 200 sends data to AS 300, it will include the path information 180.10.0.0/16 and the AS paths 100 and 200, indicating that the route starts with AS 100, then moves to 200, and finally to 300.

When AS 300 sends network information to AS 500, the network address is 180.10.0.0/16, and the AS path is 100, 200, and then 300. If AS 500 sends an update to AS 100, AS 100 will reject it because it contains its own autonomous number. BGP avoids the formation of loops in this way.

Types of Autonomous Systems:

1. Stub autonomous system:

stub autonomous system

It’s a system that only has one connection between two autonomous systems. The stub autonomous system is unable to handle data traffic. The Stub AS can function as both a source and a sink. If there is only one autonomous system, AS1, it will only have one connection to another autonomous system, AS2.

The AS1 can function as both a source and a sink. If it serves as a source, data is transferred from AS1 to AS2. If AS1 acts as a sink, it means that data from AS2 is consumed in AS1, but the data does not move forward from AS1.

2. Multihomed autonomous system:

multihomed autonomous system

It’s an autonomous system with multiple connections to other autonomous systems, but it can still act as a source or sink of data traffic. Because there is no transient data traffic flow, data can be passed from one autonomous system to another.

3. Transient autonomous system:

transient autonomous system

The transient autonomous system is a multihomed autonomous system with transient traffic flow capabilities.

Path Attributes:

The BGP selects the best route based on the path’s characteristics. The border gateway routing protocol, which contains the routing table that shows the path information, uses path-vector routing. The path attributes provide information about the path.

Path attributes are the attributes that display or store path information. This list of attributes aids the receiving router in making more informed decisions when enforcing any policy.

Types of Attributes in BGP:

1. Well-known attributes:

Every BGP router should be able to recognise this attribute. This is further divided into more categories:

a. Well-known mandatory:

When BGP advertises a network, it also advertises additional information, such as path attributes information. AS path information, origin information, and next-hop information are all included. Mandatory here means that it must appear in all BGP routing updates.

b. Well-known discretionary:

All BGP routers recognise it and pass it on to other BGP routers, but it is not required to be present in an update.

2. Optional attributes:

It’s an attribute that not every BGP router will be able to recognise. In a nutshell, we can say that it isn’t a required attribute. This is divided into more categories:

a. Optional transitive:

This attribute may or may not be recognised by BGP, but it is passed on to other BGP neighbours. In this case, transitive means that if the attribute isn’t recognised, it’s labelled as a partial.

b. Optional non-transitive:

If the attribute isn’t recognised by BGP, it ignores the update and doesn’t advertise to other BGP routers.

BGP Neighbours:

BGP neighborship is similar to OSPF neighborship, with a few exceptions. It establishes a neighbouring relationship using a TCP connection on port 179, and then exchanges BGP updates. After forming a neighbour relationship, they exchange updates. The neighbour relationship is manually configured in BGP. BGP peers and BGP speakers are terms used to describe BGP neighbours.

There are 2 types of BGP neighbour relationship:

1. Internal BGP (IBGP):

internal bgp

The routers are referred to as an IBGP when they are all neighbours and belong to the same autonomous number system.

2. External BGP (EBGP):

external bgp

The routers are referred to as an EBGP if they are all neighbours of each other and belong to different autonomous number systems.

BGP Tables:

There are 3 types of BGP tables in use –

1. Neighbour Table:

It contains the neighbours who have been manually configured by the administrator. Using the neighbour command, the neighbour relationship must be manually configured.
Command: #show ip bgp neighbors

2. BGP Forwarding Table:

It contains all of the BGP-advertised routes.
Command: #show ip bgp

3. IP Routing:

The best path routes required to reach the destination are stored in the IP routing table.
Command: #show ip route

BGP Sessions:

1. Internal BGP session:

Internal BGP sessions are used to communicate between routers within an autonomous system. In a nutshell, routing information is exchanged between routers within a single autonomous system.

2. External BGP session:

The external BGP session is a communication channel between nodes or routers from different autonomous systems.

Types of BGP Packets:

1. Open:

The Open packet is sent when a router wants to establish a neighbourhood relationship with another router.

2. Update:

The update packet is used in two cases:

a. It can be used to take a previously advertised destination off.
b. It can also be used to announce the new destination’s route.

3. Keep Alive:

The keep alive packet is sent on a regular basis to let other routers know if they are still alive.

4. Notification:

When the router detects an error condition or closes the connection, the notification packet is sent.

BGP Packet Format:

bgp packet format

1. Marker:

It’s a 32-bit field that serves as an authentication key.

2. Length:

It’s a 16-bit field that specifies the message’s total length, including the header.

3. Type:

It’s an 8-bit field that specifies the packet’s type.

Summary:

In this article, we took a detailed look at the functioning of the Border Gateway Protocol. We looked at the history, working and packet format of BGP. We also covered the types of sessions and tables used in BGP.

If you are Happy with DataFlair, do not forget to make us happy with your positive feedback on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *