Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

bgp 'neighbor': do you use loopback or physical interface?

I have seen in my production network configurations of bgp in which sometimes I see both physical interface and loopback interfaces defined. Then sometimes the physical ip addresses are used neighbor <ip> remote-as instead of the loobpack addresses.

What's the best practice to use here? Should I define the neighbor command using physical IP, loopback IP or do both??

bgp router myas

description define loopback net

network 192.168.10.0 mask 255.255.255.0

description define physical interface net

network 10.0.0.0 mask 255.255.255.255

neighbor 10.0.0.1 remote-as yourAS

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: bgp 'neighbor': do you use loopback or physical interface?

Hi,

BGP uses the IP address configured on the physical interface directly connected to the BGP peer as the source address when it establishes the BGP peering session, by default. Issue the neighbor update-source command in order to change this behavior and configure the BGP that speaks to the router to establish peering with the use of a loopback address as the source address.

The use of a loopback interface ensures that the neighbor stays up and is not affected by malfunctioning hardware, the main benefit from using loopbacks is that it will not bring down the BGP session when there are multiple paths between the BGP peers, which would otherwise result in tearing down the BGP session if the physical interface used for establishing the session goes down. In addition to that, it also allows the routers running BGP with multiple links between them to load balance over the available paths.

Please check out this document:

http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080093f25.shtml

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

Cisco Employee

Re: bgp 'neighbor': do you use loopback or physical interface?

iBGP generally peers using the loopback address for the reasons mentioned by Mohamed (i.e. loopback interface always stays up therefore the iBGP session stays up as long as the IGP has a path to get to the loopback interface of the peer router).

eBGP commonly peers using the physical interface as there is generally only one path between the two eBGP peers. Although the loopback interface is sometimes used between eBGP peers to achieved load-balancing when more than one circuit link the two eBGP peers.

Hope this helps,

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
2 REPLIES

Re: bgp 'neighbor': do you use loopback or physical interface?

Hi,

BGP uses the IP address configured on the physical interface directly connected to the BGP peer as the source address when it establishes the BGP peering session, by default. Issue the neighbor update-source command in order to change this behavior and configure the BGP that speaks to the router to establish peering with the use of a loopback address as the source address.

The use of a loopback interface ensures that the neighbor stays up and is not affected by malfunctioning hardware, the main benefit from using loopbacks is that it will not bring down the BGP session when there are multiple paths between the BGP peers, which would otherwise result in tearing down the BGP session if the physical interface used for establishing the session goes down. In addition to that, it also allows the routers running BGP with multiple links between them to load balance over the available paths.

Please check out this document:

http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080093f25.shtml

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

Cisco Employee

Re: bgp 'neighbor': do you use loopback or physical interface?

iBGP generally peers using the loopback address for the reasons mentioned by Mohamed (i.e. loopback interface always stays up therefore the iBGP session stays up as long as the IGP has a path to get to the loopback interface of the peer router).

eBGP commonly peers using the physical interface as there is generally only one path between the two eBGP peers. Although the loopback interface is sometimes used between eBGP peers to achieved load-balancing when more than one circuit link the two eBGP peers.

Hope this helps,

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
12043
Views
9
Helpful
2
Replies
CreatePlease to create content