top of page

BGP: BASICS

BGP or Border Gateway Protocol is the largest and slowest routing protocol in the world and this is the only routing protocol being used in the internet right now known as EGP (Exterior Gateway Protocol). BGP does its routing through AS (Autonomous System) instead of router. This is a routing protocol common to service provider and some enterprise customer.

As i've mentioned before, BGP will route through AS which by definition is a group of network representing an enterprise such example is an internet service provider (ISP).

Imagine you are a private enterprise located in AS 500. Inside that AS is your private network topology having web server, mail server, VPN service that you want to be available via internet. Let's assume that AS 6590 is an ISP1 and AS 1200 is ISP2 that you tap for connectivity services. Now this is where BGP comes into play wherein your network will be reachable to those ISP's. They will be the one to provide you your redundant uplink you need for your connectivity to the internet and thus providing services to your customers. Also, The network you are advertising is basically given by those ISP's and you may have internal IP address hidden to outside world. In BGP perspective, your network (9.2.86.0/24) is known to the internet world through AS 500.

Inside your AS you have a protocol called IGP which stands for Internal Gateway Protocol. What it does is, they do the routing inside your enterprise network. In a case where your AS got disconnected to the AS 1200, the IGP will decide to transfer the traffic and use the AS 6590 to forward your traffic. Example of IGP are EIGRP, IS-IS, OSPF and RIP.

By default, BGP uses AS-PATH attribute as a metric to find the best route. It will choose the lesser AS-PATH regardless of the bandwidth of the link being used. It doesn't care what the link cost. So it is important for you as an Network engineer to identify what is the best path for your BGP route.

It is not advisable to use BGP if you are connected to only one AS. BGP also requires your router to be powerful since routes coming from BGP is atleast 1000 or more, so you should have atleast 512MB RAM/peer. Bandwidth is also a factor to put in mind since updates by default usually takes place once in every 30 seconds for external. BGP runs on TCP and it uses port 179 for its reliable update. It uses triggered update, every 5 seconds for internal networks and every 30 seconds for external updates. It also uses a metric called path-selection for finding the best routes.

 

bottom of page