July 8, 2023

iBGP: BGP Next-Hop-Self Command

2 min read

The BGP next hop processing distinguishes iBGP from eBGP. A route advertised from an eBGP to another eBGP peer, the next hop address will be the address of the exit point of that AS. A route advertised from an eBGP to iBGP, the next-hop address remains unchanged when sent to another iBGP peer. It will not insert its own address as the next-hop address of the advertised route. The problem here is, what if that iBGP peer doesn’t know how to reach that eBGP address?

BGP Next-Hop-Self

Let’s take this scenario.

Colletidae, a blellum lady living in the outskirt of Edinburgh, told her neighbor Apidae that Dasypoda is having an illegal affair with somebody else. Colletidae told Apidae that she can spread that in town. And, because Colletidae wants so much attention, she told her to tell everybody that she is the one who told her about it. Colletidae knows that everybody will believe Apidae as she is known to be an honest quine. Apidae cannot believe it and she told Andrena, sister of Andrenidae, about this.

“Don’t be such a wee clipe!”, said Andrena. “Are you the one spreading that rumor?”

“No, it’s not me. It’s Colletidae who told me about that.” Apidae replied.

When Andrena told her sister about this rumor,

“Who told you that?” Andrenidae asked

“Colletidae knows everything about Dasypoda’s affair,” Andrena whispered.

“Who is Colletidae?” Andrenidae asked.

Andrenidae, who is one of Dasypoda’s best friend, knows that it was her sister who told her about the affair rumor. What she didn’t know is that it was Apidae who told her sister about this and that Apidae knows where Colletidae lives.

This is true with partial mesh topology in iBGP. There is no route back to Colletidae.

With the use of next-hop-self command, it would force the iBGP speakers to advertise the route with the next hop address of its own.

Let’s do a simple lab about this scenario.

Let’s see what will happen after Dasypoda advertised its loopback address.

Enter configuration commands, one per line. End with CNTL/Z.
Dasypoda(config)#router bgp 600
Dasypoda(config-router)#network 6.6.6.0 mask 255.255.255.0
Dasypoda(config-router)#end

After Dasypoda advertised its loopback address, Colletidae learned it and install it in its routing table:

BGP Next-Hop-Self

Leave a Reply