A Complete Guide to Border Gateway Protocol

BGP allows routers to select routes based on internal routing policies rather than technical characteristics such as bandwidth capacity. Each network has a unique Autonomous System Number (ASN).

Its functionality is often likened to GPS applications on mobile phones.

It decides the best route for your journey, considering traffic conditions and whether to avoid a backed-up highway or use a side street instead.

Advertise Routes

BGP advertises routes to its peers by sending route information in update messages. This information includes the local prefix, destination IP address, and cost. Using these attributes, remote routers will decide which path to take. They will generally pick the path that has the shortest AS_PATH and does not exceed the advertised route limit.

The internet is broken up into hundreds of autonomous systems (ASes).

Each AS operates a large pool of routers to communicate with each other and the rest of the world.

The Each network has its internal routing protocol to control traffic within the network, but BGP is used to exchange route information with other networks.

Each AS is identified by an ASN, a unique number assigned to the network by its regional internet registry.

The AS number is unique among all networks on the internet and acts like a postal code to identify each network.

The primary function of BGP is to provide a global routing table, and it does so by advertising routes.

These routes are then propagated through the peering arrangements between each AS. This allows each network to reach other networks on the internet via its path and helps ensure the route is reliable. There are several ways to know how does BGP work: the network statement, redistributing from another protocol, using the aggregate-address command, and conditional route injection.

Maintains a Routing Table

For each destination, the BGP routing table maintains a set of routes. Several interior routing protocols choose these routes according to criteria such as lowest cost or highest bitrate. The router then announces these paths to its peers, who select and announce routes back to their routing tables. In this way, the BGP network can balance traffic load among its multiple inbound links.

The underlying network influences the routes advertised by BGP and can be affected by events such as links or router outages. As a result, the routing table managed by a BGP router is adjusted continually to reflect actual changes in the network. These changes are expected to be relatively infrequent, known as route flapping. If a router or a specific link experiences an outage, it will withdraw the route from its advertising list and be withdrawn again when the link is restored. This repeated withdrawal and re-announcement of routes can lead to excessive network activity as external networks repeatedly pick up and discard the same routes.

Whenever the BGP routing table is updated, it will first check to see if the new routes are preferred over the existing ones. 

Maintains a Database of Routes

A network’s routing information is stored in a BGP data table called the routing information base (RIB).

The RIB contains routes from external BGP routers and internal peers. Routers maintain policies to decide how to use and publish this routing information. These policies are often based on routing attributes. These routing attributes include MED, weight, and origin. They are not mandatory but can help routers determine how to route packets. For example, the attribute AS path length tells a router to prefer shorter paths.

The RIB also includes information about the routes that BGP routers have learned from their neighbors.

This information is shared across multiple networks and used by other routers to route packets. This is useful for providing redundancy if one internet connection fails. This feature is essential for large networks like Internet Service Providers and wide area networks.

The BGP routing process initially exchanges a complete routing table with each peer. This process is known as a Full Routing Table Exchange (FRTE). After the initial exchange, BGP routers only send incremental updates to their peers when there are changes in the network topology or when they implement routing policies. These updates are sent in the form of BGP update messages.

Maintains a List of Known Networks

BGP is a routing protocol that maintains a list of known networks by constantly updating its routing table. Routes are constantly announced and withdrawn from different parts of the internet, and BGP uses this information to make routing decisions. One comparison of how BGP works is to a GPS application on a mobile phone, deciding the best path to reach a destination using existing knowledge of traffic jams, road closures, and whether or not you want to travel on toll roads.

Each router in an autonomous system (AS) has a unique AS number to identify and distinguish it from other networks. This AS number is included in each network’s advertisement of its routes, along with other routing information. BGP also uses an attribute to describe the inter-AS path of a network, describing which other AS numbers the network must pass through to reach a specific destination.

Leave a Reply

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