November 21, 2024

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

Hi! I am Shahed Israr. I try to help GPON Technology users with their queries and provide them with relevant and accurate information to the best of my ability. My main goal is to assist and enhance GPON Technology user and help people find the answers they're looking for quickly and easily.

Follow Me:
TwitterFacebookLinkedInPinterestGoogle PlusDiggYouTubeRedditDelicious

Visited 371 times, 1 visit(s) today

Comments

comments

Shahed

Hi! I am Shahed Israr. I try to help GPON Technology users with their queries and provide them with relevant and accurate information to the best of my ability. My main goal is to assist and enhance GPON Technology user and help people find the answers they're looking for quickly and easily.

View all posts by Shahed →

One thought on “BGP update source loopback0 commands

  1. Hi, thank you very much for this post! My doubt was answer completely. I hope you keep doing more posts like this one.

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.

error: Content is protected !!