cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1668
Views
19
Helpful
9
Replies

For BGP neighbor using loopback address

acbenny
Level 1
Level 1

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

9 Replies 9

Marwan ALshawi
VIP Alumni
VIP Alumni

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
Level 4
Level 4

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..

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

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..

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

Use "neighbor x.x.x.x ebgp-multihop 2" on both sides and then see.

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

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

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

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card