Octet

Why do we peer iBGP between loopbacks, and what does that need?

Show the answer

Say this first

A loopback interface never goes down while the router has any path to it, so an iBGP session between loopbacks survives the loss of a single link as long as the IGP finds another way. It needs three things: the loopbacks advertised in the IGP, neighbor x update-source Loopback0 so TCP is sourced from the loopback, and each side's neighbor statement pointing at the other side's loopback address.

Go deeper

Cisco IOS
interface Loopback0
 ip address 10.255.0.1 255.255.255.255
!
router ospf 1
 router-id 10.255.0.1
 network 10.255.0.1 0.0.0.0 area 0
 network 10.0.0.0 0.0.255.255 area 0
!
router bgp 64500
 bgp router-id 10.255.0.1
 neighbor 10.255.0.2 remote-as 64500
 neighbor 10.255.0.2 update-source Loopback0

R2 mirrors this with its own loopback 10.255.0.2 and neighbor 10.255.0.1.

Why it fails without update-source

TCP takes its source address from the outgoing interface, say 10.0.12.1. R2 only has a neighbor statement for 10.255.0.1, so it treats the SYN as coming from a stranger and resets it.

eBGP is different

eBGP between loopbacks also needs ebgp-multihop 2 or disable-connected-check, and a static route to the peer's loopback, because you do not share an IGP with another AS.

Traps

  • Forgetting to advertise the loopback in the IGP. The session cannot come up without a route to it.
How did you do?Book 4.1 Global Internet