Internal BGP (Border Gateway Protocol) explained


(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?

Rene


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

Thanks
Hamood


(Rene Molenaar) #23

Hi Hamood,

That’s right.

Rene


(ALFREDO V) #24

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

Thanks


(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?

Rene


(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 192.168.12.0 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

Ammar,


(Rene Molenaar) #27

Hi Ammar,

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

Rene


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

Thanks,
Nav


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

Rene


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

Rene


(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 ?

thanks

Hussein Sameer


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

Rene


(Hussein Samir) #36

Thanks Rene I see the post, your explanation was very useful for me .

I have tow more question about BGP status codes :-

1 - What is the meaning of NSF (Non Stop Forwarding) or *** IP Routing is NSF aware *** ? do you have any post that explain that in a bit ?

2 - The word RIB stand for what ?

Thanks again.


(Rene Molenaar) #37

Hi Hussein,

  1. NSF (Non Stop Forwarding) is used on devices that have multiple route processors. An example is the 6500 switch with multiple supervisors. All L2/L3 information will be synchronized between the supervisors, when the active one fails then we can keep forwarding packets since we have all information. Without it, the second supervisor would have to re-establish routing protocol neighbor adjacencies and such which adds a lot of delay to the failover.
  2. The RIB (routing information base) is another word for the routing table.
Rene

(Deep) #38

BGP basics explained flawlessly! Could not stop commenting!! Good work Rene.


(Networklessons Admin) split this topic #39

19 posts were merged into an existing topic: Internal BGP (Border Gateway Protocol) explained


(Badal J) #40

“Technically this is possible…we can run OSPF (or EIGRP) within AS2 and use redistribution between BGP and OSPF. In my example R1 will only have a single prefix so it’s no problem but what if R1 had a full internet routing table? (over 500.000 prefixes since 2014). IGPs like OSPF or EIGRP are not able to handle that many prefixes so you’ll need BGP for this.”

But ultimately we have enabled iBGP on all of our internal routers. Means all will have the routes/prefixes advertised by R1 & R5. I am not getting what we have saved by creating iBGP. Correct me if I am wrong.