Internal BGP (Border Gateway Protocol) explained

(Rene Molenaar) #16

Hi Usman,

Glad to hear you like it! I’ve added BGP route dampening to my list, it’s a nice topic to write about.


(Usman I) #17

Dearest Rene,

Kindly share the URL where you have added BGP route Dampening as i am finding it difficult to search it.

With Thanks

(Rene Molenaar) #18

Dear Usman,

It’s not finished yet :slight_smile: In a few days I’ll upload it and send you a message ok?


(Usman I) #19

Dear Rene,

Acknowledged with Thanks :slight_smile:

With Best Regards,

(Hamood R) #20

Great lesson however, I do have a question about IGP/IBGP. Why do we need to configure IGP (OSPF) in AS2 to establish IBGP connectivity between R2/R3/R4? Why can’t we just use loopback addresses on each router in AS2 and establish BGP peering and advertize loopbacks under the network command?


(Rene Molenaar) #21

Hi Hamood,

Good question, there’s a good explanation for this:

  1. iBGP requires a full mesh of peerings because of iBGP split horizon. This is why we use loopback interfaces instead of physical interfaces for the peering. Physical interfaces can go down, loopbacks can’t (unless you shut them). In this example I could have used physical interfaces since there is only one link between R2-R3 and R3-R4, if we had a link between R2-R4 then it would have been a must.

  2. When R4 (or R2) advertises its network on the loopback interface to R3 then R3 will store it in its BGP table but will never forward this network to R2 (or R4) because of iBGP split horizon. It will be impossible to establish iBGP between R2-R4 using loopback interfaces so you are forced to use physical interfaces.

  3. using an IGP (like OSPF) ensures that all iBGP routers can learn about the networks on the loopback interfaces. Also, when a physical link goes down…our IGPs are really fast switching to a backup route, BGP is slow…

Hope this helps, if you need some more detail just let me know ok?


1 Like
(Hamood R) #22

Hello Rene,
Thanks for the clarification, it means IBGP peers require full mesh topology. In order to achieve this use an IGP (EIGRP or OSPF) to ensure IBGP peers can reach other and then establish a connectivity. Hope I understand this correctly.


(Rene Molenaar) #23

Hi Hamood,

That’s right.



I have a question:

I did the lab on this lesson and worked fine but when I added 4 routers to the AS 2 I couldn’t ping the advertise network, I was able to see it. Do I need to use Route reflector to make it work?

Please advise.
By the way your BGP lessons are well explained and I love them.


(Rene Molenaar) #25

Hi Alfredo,

There are two possible issues:

  1. Maybe the next hop is unreachable. See if your router that doesn’t get a reply is able to reach the next hop.

  2. It’s possible that the return traffic is unable to make it back to your router. Does the destination have a route to the source of your ping?


(ammar a) #26

Hello Rene,
in the example above i got confused with the next-self-hop command. As we see that R4 have not learned the network!!! i wonder why R4 did not learn it from IGP/iBGP? my question is does IGP carry and advertise iBGP routes? can you please explain the benefit of the next-self-hop command ??? Thanks


(Rene Molenaar) #27

Hi Ammar,

Take a look at this post, it explains why we need next-hop-self:


(ammar a) #28

Thanks Rene, That was straight to the point. Very detailed and clear.

(Nav N) #29

Hi Rene,

I am bit confused when to use iBGP being the end customer. I would appreciate some examples. I understand why ISP would use it but not sure when end customer would use iBGP.


(Rene Molenaar) #30

Hi Nav,

There’s not really a reason to use iBGP on customer networks. Even if a customer uses BGP, it’s typically only used on the border (eBGP). Since your network has only one exit point, you can use a default route in your IGP.


(Mario R) #31

Hi Rene,

I have a question regarding TTL in iBGP. In your eBGP lesson, you mentioned that when reaching a remote loopback address, there was a need to change the next hop TTL to 2 (ie. … ebgp-multihop 2) so it looks like iBGP does not require this. Why is that?

(Rene Molenaar) #32

Hi Mario,

iBGP has to be configured as a full mesh so that means that you’ll configure neighbor adjacencies with directly and non-directly connected neighbors. For these non-directly connected neighbors, you’ll need a higher TTL so that’s why we don’t use the TTL of 1 by default.


(sina a) #33

you are the best, your explanations are fabulous

(Hussein Samir) #34

Hi Rene,

Do you have any posts that explain BGP status codes and origin codes ?


Hussein Sameer

1 Like
(Rene Molenaar) #35

Hi Hussein,

I have an example for the origin codes:

Let me explain the BGP status codes here:

  • "s" for suppressed: BGP knows this prefix but is not advertising it. This can happen when you advertise a summary route and the prefix falls in the range of your summary.
  • "d" for dampened: BGP has a feature called "dampening" that allows you to stop advertise prefixes of interfaces that are flapping. Flapping means that an interface is going up, down, up, down, and so on.
  • "h" for history: BGP has learned this prefix before but currently doesn't have a valid route for it.
  • "r" for RIB failure: BGP has learned the prefix but did not install it in the routing table. You will see this when another routing protocol has a better administrative distance for the prefix.
  • "S" for stale: this is used for NSF (Non Stop Forwarding). When the BGP router reestablishes the neighbor adjacency, this prefix has to be refreshed.
Hope this helps.