In order for BGP to form a neighbor relationship, it needs to establish a TCP session between its peers. (The Famous “TCP Hand- Shake.”)

BGP uses the IP address¬† configured in the “Outgoing Interface” that the router will use to establish the neighbor relationship in the “neighbor” command to reach its peer as the “source address” to form the TCP connection:

 

Wireshark capture:

 

 

When using redundancy between BGP peers, chances are that the TCP session might crash if one of the links fail. However, we can tell the router to apply optional settings to avoid this issue and that is when loopbacks can be our best friends.

Configuring Loopbacks Interfaces as TCP Connection End Points.

As long as the router does not fail, loopbacks interfaces will be up. We can use them as the source of a single BGP TCP connection. We just have to instruct the router to reach its peer using a loopback address. This is how we do it:

 

 

 

As long as the router knows how to reach its peers, loopbacks will be up. BGP routers have to have a route¬† in the routing table to reach their neighbor . Then, we tell the router to use the loopback interface as the source IP address of the BGP TCP session by using the command: “update-source loopback x

 

I set up a static route on R1 and R2 to reach subnet (1.1.1.1 and 2.2.2.2) respectively:

 

 

 

 

Checking the routes with the command, “show ip route in both routers:”

 

 

 

So, I ran Wireshark to take a look at the TCP connection. Below will see that TCP session is using the loopback addresses to form. Now, we can rest assure that if on physical link fails, the T CP connection will still open, as long as we always have a route in the routing table to reach the BGP neighbor:

 

 

 

Thank you,

Jesus Contreras.

Leave a Reply

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

Bitnami