BGP update source loopback0 commands

BGP update source loopback0:

[boxads]Today i will discuss why we use BGP update source loopback0 for establishing  neighbor relationship between bgp peering. If we have two paths between BGP neighbors, then which path use to establish neighbor relationship? don’t worry i will describe you briefly, please look bellow diagram:

BGP update source loopback0
BGP update source loopback0

In this topology we see that there are two links between router R1 and router R2. We can establish two neighbor relationships, on both paths, but this is not a good solution. So, we’ll establish only one neighbor ship with each other. BGP gives us an option to change the source of packets sent. In this case we can use Loopback interface as source of BGP packets sent between these neighbors. By using  a loopback interface as source interface we have two paths between them, if one of paths fails, the other one will be used.

By using a loopback interface as update source, we also benefit from the fact that BGP session won’t go down when physical interface goes down.

Update source can be configured per neighbor or per peer-group. To configure update source use the following command:

neighbor {ip-addr | group-name} update-source interf

where ip-addr | group-name  is ip address of the neighbor or peer-group name, interf – is interface that will be used as update source.

For IGP connection of two router we use OSPF protocol in this topology, so let’s go our configuration part.

BGP update source loopback0 Configuration Example:
Basic Configure R1:
R1#conf t
R1(config)#int fa0/1
R1(config-if)#ip address 10.10.10.1 255.255.255.252
R1(config-if)#no shutdownR1(config-if)#int fa0/0
R1(config-if)#ip address 11.11.11.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exitR1(config)#interface loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#

OSPF Configure R1:
R1(config)#router ospf 1
R1(config-router)#network 10.10.10.0 0.0.0.3 area 0
R1(config-router)#network 11.11.11.0 0.0.0.3 area 0
R1(config-router)#network 1.1.1.0 0.0.0.255 area 0
BGP Configure R1:
R1(config)#router bgp 100
R1(config-router)#neighbor 2.2.2.2 remote-as 100
R1(config-router)#neighbor 2.2.2.2 update-source loopback 0
[adsense]
Basic Configure R2:
R2#conf t
R2(config)#int fa0/1
R2(config-if)#ip address 10.10.10.2 255.255.255.252
R2(config-if)#no shutdownR2(config-if)#int fa0/0
R2(config-if)#ip address 11.11.11.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exitR2(config)#int loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#

OSPF Configure R2:
R2(config)#router ospf 1
R2(config-router)#network 10.10.10.0 0.0.0.3 area 0
R2(config-router)#network 11.11.11.0 0.0.0.3 area 0
R2(config-router)#network 2.2.2.0 0.0.0.255 area 0
BGP Configure R2:
R2(config)#router bgp 100
R2(config-router)#neighbor 1.1.1.1 remote-as 100
R2(config-router)#neighbor 1.1.1.1 update-source loopback 0
Here pink color highlighted commands are changed BGP update-source. Now we verify our configuration.
BGP update source loopback0 command
BGP update source loopback0 command

From Router R1 bgp summary table we see neighbor is R2 router’s loopback 0 IP. so it’s work.

Shahed Israr

Shahed Israr

Shahed Israr is a Network Engineer specializing in GPON, FTTH, and telecom access network technologies. With hands-on experience in Huawei OLT and ONT configuration, U2000 NMS deployment, iMaster NCE-FAN Lite management systems, firmware upgrades, and advanced network troubleshooting, he helps Internet Service Providers (ISPs) and network professionals deploy, manage, and optimize fiber optic networks efficiently. Through GPON Solution, he shares practical technical guides, real-world solutions, and professional knowledge to support engineers working in modern GPON infrastructure.

More Posts - Website

Follow Me:Add me on XAdd me on FacebookAdd me on LinkedInAdd me on PinterestAdd me on YouTubeAdd me on Reddit

Comments

comments

1 thought on “BGP update source loopback0 commands”

Leave a Comment

Time limit is exhausted. Please reload CAPTCHA.