Sunday, 30 November 2014

Different methods to advertise a default route in BGP Part 1:



In this post, we will see different methods to advertise default route in Border Gateway Protocol (BGP).



I’ve configured eBGP between R1 – R2 and R2 –R3 and have advertised loopback addresses 1.1.1.1 & 3.3.3.3 into R1 and R3 respectively. 

Below is the output on R2, once eBGP is configured.


Looking at the below image, we can confirm that R1 have advertised loopback address 1.1.1.0/24 and R2 have propagated the same to its eBGP neighbor R3.



Similarly, we can see 3.3.3.0/24 on R1.

 

Now let’s go through the methods from which we can advertise default route into BGP:

Method 1: Using the network command


Firstly, we will configure a default static route on R1 with a next hop address of 10.1.12.2. We can achieve this by using the below command

We can confirm this by looking at the routing table of R1




Now, we can use the network command to advertise or propagate this default route to other routers running BGP. 


Now, let’s look at R2 and R3’s routing table to verify if we can see the default route

 


Looking at the above outputs, we can confirm that default route is learned via eBGP [admin distance of 20]

One important thing to keep in mind while using network command:  Network command can be used to advertise a specific route in BGP only if that route/prefix is present in its routing table (regardless if that prefix is learned via directly connected subnet or via a routing protocol).

In the next post, We'll see the 2nd method to advertise a default route in BGP.

No comments:

Post a Comment