BGP – Border Gateway Protocol Simplified

In this article, we will have a look at BGP – Border Gateway Protocol, a routing protocol that made the Internet possible! We will also have a look at IBGP (Internal BGP) which can be used for routing in very large companies and hence helps them scale their networks.

Why is BGP required?

BGP – Border Control Protocol is a routing protocol that allows networks to scale up drastically. A typical large network (like Internet, for example) has so many routers / nodes. If all the nodes need to be reachable from every other node, we need a robust routing protocol that can identify the best route/ path between the source and the destination (typically autonomous systems) and route the packets quickly and reliably between them. BGP was initially necessitated for handling the core Internet routing, but now it is used in some large institutional networks as well.

What is an Autonomous System (AS)?

In a large network (like an ISP), there are a set of routers that normally use a single Interior Gateway Protocol to propagate routing information between themselves. The routing information presented by all these routers are consistent, and they generally follow a single set of policies. So, a set of such routers (generally under a single administrative umbrella) is called an Autonomous System (AS).

What is BGP – Border Gateway Protocol?

BGP performs routing between multiple autonomous systems and exchanges routing and reachability information with other BGP routers. The function of BGP is to select best paths for routing between different autonomous systems (and in some cases also within an autonomous system – IBGP). BGP can avoid loops and find out alternate paths if some routes become unavailable.

Two routers that have established connection for exchanging BGP information, are referred to as BGP peers. Such BGP peers exchange routing information between them via BGP sessions that run over TCP, which is a reliable, connection oriented & error free protocol.

How does BGP – Border Gateway Protocol work?

The function of any routing protocol is to form routing tables by exchanging information with other routers nearby and forward packets using the best available paths. The routing tables determine the best path through which packets can be sent to reach their destinations. BGP, determines the next best hop.

BGP does not send entire routing tables to its peers every ‘N’ seconds like RIP. It sends whole routing tables upon start up initially,  but subsequently sends only updates to the routing table (new routes learned, unreachable routes, etc).

Routing information obtained from other routers (through BGP) are stored in a routing table. The router uses this and other policy rules to determine the optimum path to other network destinations. BGP uses Distance Path Routing (a distance vector protocol) and a path ranking system established by network administrator to calculate the best path, utilizing many parameters including speed, delays, hop counts, etc.

Each autonomous system adds its unique ID to every route that it propagates to its neighboring routers which helps it to identify the short paths to other autonomous system (route with fewest ID’s). If an autonomous system receives a route with its own ID, it is discarded as it should have been received already.

What are the Message Types in BGP?

There are four BGP message types used by BGP:

  • OPEN – Start of connection
  • UPDATE – New routes, disconnected routes
  • NOTIFICATION – Fatal/ unreachable errors
  • KEEP ALIVE – Presence intimation

Once TCP connection is established, BGP OPEN message is sent by the router. The router which receives the same returns a KEEP ALIVE to acknowledge. After that, UPDATE & NOTIFICATION messages are exchanged.

What is IBGP – Internal Border Gateway Protocol?

The Border Gateway Protocol is normally used on the Wide Area Network – to route packets between autonomous systems. But sometimes, it can also be used within an autonomous system to scale the network. For example, a large organization with hundreds of departments / routers and each department having its own individual policies could use IBGP – Internal Border Gateway Protocol to communicate between the routers, determine the next best hop/ best path to forward packets.

The routers involved in Internal BGP need not be directly attached to each other – they can be anywhere in the network. But all of them should be capable of running IBGP in order to share and receive routing tables from other routers.

IBGP requires that all the routers within an autonomous system (AS) be peered with each other. But in a large AS, this is difficult to achieve. So, either the AS is broken down in to smaller AS with each smaller AS having a fully meshed configuration and different such smaller groups tied together with BGP (or) An AS could be broken down into various cluster groups, each with a route reflector that forwards route updates to the members of its cluster.

Its possible to run BGP only on the border routers (connecting to other autonomous systems) while the internal routers could connect to each other using other routing protocols.

Are there any alternative protocols to BGP?

There are some recently introduced multicast based protocols that can send IP packets from one or multiple sources to multiple destinations like:

  • IGMP – Internet Group Membership Protocol
  • PIM – Protocol Independent Multicast
  • D-VMRP – Distance Vector Multicast Routing Protocol
  • MOSPF – Multicast Open Shortest Path First

excITingIP.com

You could stay up to date on the various computer networking/ related IT technologies by subscribing to this blog with your email address in the sidebar box that says, ‘Get email updates when new articles are published’

One thought on “BGP – Border Gateway Protocol Simplified

  1. bins

    oh thank you i got the point from her that i am searching for.

Comments are closed.