BGP update source
For BGP, a neighbor relationship to be established, source IP address of BGP packets sent by a router must be the same as neighbor ip-address
set on the neighboring router. By default, packet’s source IP address is outgoing interface.
But, what if will need to have two paths between BGP neighbors, which one to use to establish neighbor relationship? Please, Take a look at the topology.
In scenario above you see that there are two links between First router and Second router. We can establish two neighbor relationships, on both paths, but this is not a solution. So, we’ll establish only one neighborship 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.
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. If you are interested in peer-group check BGP Peer Group lab.
Connection between all interfaces in this topology I provided by using EIGRP:
First(config)#router eigrp 1 First(config-router)# network 10.0.0.0 First(config-router)# network 192.168.0.0 First(config-router)# network 192.168.1.0 First(config-router)# no auto-summary
Second(config)#router eigrp 1 Second(config-router)# network 10.0.0.0 Second(config-router)# network 192.168.0.0 Second(config-router)# network 192.168.1.0 Second(config-router)# no auto-summary
Further I will show configuration related to BGP, check them below.
FirstFirst(config)#router bgp 65000
First(config-router)#neighbor 10.0.0.1 remote-as 65000
First(config-router)#neighbor 10.0.0.1 update-source loopback 0
Second
Second(config)#router bgp 65000
Second(config-router)#neighbor 10.0.1.1 remote-as 65000
Second(config-router)#neighbor 10.0.1.1 update-source loopback 0
I’ve highlighted commands where update-source is changed. Now they are neighbors, we’ll check this on First router.
First#show ip bgp summary BGP router identifier 10.0.1.1, local AS number 65000 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.0.1 4 65000 7 7 1 0 0 00:04:42 0 First#

Comments (10)
Anonymous
| #
if one of the physical links go down..,BGP neighbor relationshio wion’t go down..but the two physical liinks go dwon..neighborrelatonshio will go down..?
Reply
admin
| #
I this case yes. If there will be a mesh topology, where another path between routers will be available, then neighbor relationship will not go down.
Reply
king
| #
hi loop backs are not pinging .
Reply
king
| #
i am getting as
kindly explain
Reply
admin
| #
Hi, i suppose that in your case routing tables don’t have route to the other’s router loopback IP address. First, check routing tables on routers, and if there are no routes to loopback interfaces of the other router then you need to use a routing protocol or at least static routes to achieve that. In my example your output should like this:
If, you want to use EIGRP like I did, your EIGRP configurations should look like these:
Please post your feedback to see if it helped!
Reply
shahzad
| #
If we don’t use update source loop back command, will we be able to establish BGP neighbourship with loop back? will we be receiving routes from our neighbour with the loopback address used for BGP.
Reply
admin
| #
No, you will not be able to establish neighbor relationship with loopback if you don’t specify the loopback as update source.
Reply
Maruthees R
| #
What if we don’t use loopback interfaces and have physical interfaces , in that case is it necessary to give update source ?
Reply
admin
| #
If BGP packets are sent out through the physical interface, which has the same IP address as the IP address used by opposite router to establish neighbor relationship with this router, then you don’t need to set update source.
Reply
Maru
| #
What in case we don’t use any loopbacks and still establish neighbor relationships for the two links , in that case which interface BGP chooses as source 192.168.0.1 or 192.168.1.1 for the First router ? Will it prefer the higher ip address or simply doesn’t establishes neighbour relationship ?
First:
neighbour 192.168.0.2 remote-as 6500
neighbor 192.168.1.2 remote-as 6500
Second:
neighbour 192.168.0.1 remote-as 6500
neighbour 192.168.1.1 remote-as 6500
Reply