Configuring eBGP Peers to Use a Loopback Interface

In this lab, I use two Cisco 3725 routers [IOS 12.4(15)T10] to configure eBGP peers using loopback interfaces. Below is the network diagram for this lab.

Lab Topology

Lab Topology

You’ll notice below that instead of using the local physical interface’s IP address on R1 and R2 to create a TCP socket for BGP to communicate, I instead configure and use loopback interfaces for the TCP connection endpoints.

If the physical interfaces on R1 and R2 were used for the TCP connection, if either interface failed, the TCP socket for BGP communication would fail. However, if loopback interfaces are used and as long as some other route exists for the routers to reach each other’s loopback addresses, even if one of the physical interfaces were to fail, the TCP connection and therefore the BGP session would not fail. In this example I have not configured any other routes; obviously, in a real life situation you definitely would.

R1

enable
conf
interface lo 1
ip address 1.1.1.1 255.255.255.255
exit
interface fa 0/0
ip address 10.0.0.1 255.255.255.252
no shut
exit
router bgp 10
neighbor 2.2.2.2 remote-as 20
neighbor 2.2.2.2 ebgp-multihop 2
neighbor 2.2.2.2 update-source lo 1
exit
ip route 2.2.2.2 255.255.255.255 fa 0/0
exit
wr

R2

enable
conf
interface lo 2
ip address 2.2.2.2 255.255.255.255
exit

interface fa0/0
ip address 10.0.0.2 255.255.255.252
no shut
exit

router bgp 10
neighbor 1.1.1.1 remote-as 10
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source lo 2
exit

ip route 1.1.1.1 255.255.255.255 fa 0/0
exit
wr

Verifications:

R1 - "show ip bgp summary" output

R1 - "show ip bgp summary" output



R1 - "show tcp brief" output

R1 - "show tcp brief" output


R1 - "show ip bgp neighbors 2.2.2.2" output

R1 - "show ip bgp neighbors 2.2.2.2" output

This entry was posted in Cisco, Labs, Networking, Protocols, Technology and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

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


− 1 = four