For BGP neighbor using loopback address

Unanswered Question
Sep 2nd, 2008

hi all,

any one know how RouterA and router B form bgp neighbor by using loopback address

RouterA

loopback 0 = 1.1.1.1/32

serial 1 = 192.168.1.1/24

RouterB

loopback 0 = 2.2.2.2/32

serial 1 = 192.168.1.2 /24

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.8 (4 ratings)
Loading.
Marwan ALshawi Tue, 09/02/2008 - 20:36

firs use the loopback as source update only with ibgp when the nighbors can reach each other through multiple paths so in case of one physical path gose down the other will be used and no route and path recalculation needed because the nighboring based on loop back interfaces which is vitual interface always up

for example

routerA-------routerB first link

second link

routerA---routerC--routerB

so we goona configure router a and b to use loopback address so if the directly link between them goes down they will go through routerC without intruption

keep in mind u need to run IGP between the routers like ospf and advertise the loopback on each router

routerA

router ospf 1

network 192.168.1.0 0.0.0.255 area 0

network 1.1.1.1 0.0.0.0 area 0

also in our example wee need to put the ip of the network with routerC

router bgp 1

neighbor 2.2.2.2 remote-as 1

neighbor 2.2.2.2 updtae-source loopback 0

RoterB

router ospf 1

network 192.168.1.0 0.0.0.255 area 0

network 2.2.2.2 0.0.0.0 area 0

also in our example wee need to put the ip of the network with routerC

router bgp 1

neighbor 1.1.1.1 remote-as 1

neighbor 1.1.1.1 updtae-source loopback 0

good luck

if helpful Rate

satish_zanjurne Tue, 09/02/2008 - 20:37

For e-BGP

RouterA

router bgp 400

neigbor 2.2.2.2 remote-as 500

neigbor 2.2.2.2 ebgp-multihop 2

neigbor 2.2.2.2 update-source loopback 0

ip route 2.2.2.2 255.255.255.255 192.168.1.2

--------------------------------------------

RouterB

router bgp 500

neigbor 1.1.1.1 remote-as 400

neigbor 1.1.1.1 ebgp-multihop 2

neigbor 1.1.1.1 update-source loopback 0

ip route 1.1.1.1 255.255.255.255 192.168.1.1

--------------------------------------------

For iBGP remove "ebgp-multihop" command ,

HTH..rate if helpful..

Marwan ALshawi Tue, 09/02/2008 - 21:14

hi Satish

the command neigbor 1.1.1.1 ebgp-multihop 2 in this case not rquired unless he looks to achieve loadbalncing and have two links with it as well

so in his case h e has only one serial link !!

thank you

satish_zanjurne Tue, 09/02/2008 - 22:24

But rule says "ebgp-multihop" command chnages TTL value , in order to allow the packet to reach the external BGP peer which is not directly connected , or is using an interface other than the directly connected interface , in this case loopback 0 .

correct me if i am wrong..

HTH..rate if useful..

acbenny Tue, 09/02/2008 - 22:46

it seems fail. any one know the issue ?

interface Loopback0

ip address 1.1.1.1 255.255.255.255

!

interface FastEthernet0/0

ip address 192.168.1.1 255.255.255.0

duplex auto

speed auto

!

router bgp 10

bgp log-neighbor-changes

neighbor 2.2.2.2 remote-as 20

neighbor 2.2.2.2 update-source Loopback0

!

ip classless

ip route 2.2.2.2 255.255.255.255 192.168.1.2

ip http server

R0#sh ip bgp summary

BGP router identifier 1.1.1.1, local AS number 10

BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

2.2.2.2 4 20 0 0 0 0 0 never Idle

*********************************88

interface Loopback0

ip address 2.2.2.2 255.255.255.255

!

interface FastEthernet0/0

ip address 192.168.1.2 255.255.255.0

duplex auto

speed auto

!

router bgp 20

bgp log-neighbor-changes

neighbor 1.1.1.1 remote-as 10

neighbor 1.1.1.1 update-source Loopback0

!

ip classless

ip route 1.1.1.1 255.255.255.255 192.168.1.1

Harold Ritter Wed, 09/03/2008 - 07:47

Marwan,

ebgp-multihop is required whenever you want to establish a BGP session to a peer address belonging to a non-directly connected subnet.

I think you are reffering to maximum-path. maximum-path is only required if you receive the same prefix from than one peer and want to use all of them for load-balancing purposes.

Regards,

Marwan ALshawi Wed, 09/03/2008 - 18:28

hi HAROLD

thanks and as u said it mixed up the commands :)

anyway regarding the use of loopback adress as update source i think it is better with EBGP to use the next-hop interface IP instead of the loopback address

becuase in large bgp deployment u need to get the loopback advertised to all peers to get the binefit of it ! while with IBGP just advertise it through the IGP and it will work as expected

do you agree with me HAROLD ?

thanks again

Harold Ritter Thu, 09/04/2008 - 06:28

Marwan,

I do agree that eBGP session are usually established using the physical address IP addresses as the source and destination. The configuration of the loopback addresses as the source and destination is mostly used in the case there is multiple links between the two routers and you want load balancing to take place.

Regards

Actions

This Discussion