Ibgp

Hi RENE,

Great Site… I’m also using GNS3 Vault and it’s great also. It could be a good idea to put the GNS" Vault labs at the end of each Networklessons lessons, this would be very great.

It would also be very great to have a video for each course on Networklessons.

Enough for the comments here is my question:

I’m doing some labs on IBGP and here’s what i don’t understand.

1- We commonly use the loopback interfaces for IBGP because they don’t fail unless the router fails, that’s ok.
2- We commonly use an IGP like OSPF so that the routing table can be populated and that IBGP can work.

Why do we need IBGP all together if we have a perfectly functional IGP like OSPF ?

Thanks a lot,

Marc

Marc,
There are two answers:

  1. A traditional IGP (like OSPF) would crash if you presented it with a full Internet table. They simply weren’t designed to handle that volume of routes.
  2. BGP has far more capability to carry additional information than a traditional IGP. For example, in an MPLS Layer 3 VPN scenario, the ISP will use BGP speakers on their PE equipment which form iBGP relationships with other BGP speakers on an opposite end of the ISP’s network. This is done because BGP carries additional information, such as VPNV4 routes, and VPN labels. This information is encapsulated and routed through the ISP’s core (which almost always uses OSPF or IS-IS), but the core itself has no idea about the information being transported.

Pretty much nobody would use IBGP as their primary IGP, however. It is slow to converge, and resource intensive–so your thoughts are definitely on track there.

Thanks a lot for your response.

Have a good one.

Marc

Hi Rene and Team,

Could you please explain does really iBGP need an IGP,
i did lab today with no IGP, the topology is IBGP load sharing which Rene explained on this site. It worked well but i dont understand when i ping Ebgp loopback address from IBGP, ping fails, However when i ping with source address, ping is successful
Ex:- ping 4.4.4.4 source 1.1.1.1 – Working
ping 4.4.4.4 not working — Please explain how it works?

Hello Rahul

I’m not sure which lab you are referring to when you show the examples above. However, I can tell you that iBGP requires an IGP because all routers within an AS must have reachability to each other. Remember that iBGP requires a full mesh of BGP neighbours to be created allowing it to function.

Now if you have one one or two routers within an AS, then they are able to reach all iBGP neighbours due to direct connectivity, so an IGP may not be necessary. Even then, if you use loopbacks as your iBGP peering addresses, then you still need a routing protocol to be able to reach from one looback to another. In any case, once you have three or more routers then you will require these routers within the same AS to have full communication between them so BGP updates can be exchanged successfully.

An alternative to an IGP would be to use static routing within the AS, but unless your AS is very small, it’s not recommended.

I hope this has been helpful!

Laz

1 Like

Thank you very much Laz, Very well explained

Please see attached snippet. I did Lab peering to the same AS

Failover Testing , i have two routes to 192.168.23.0 network
Path 1: 192.168.12.2
Path 2 192.168.13.2

i have shutdown link on CE , if switched over to 192.168.13.2, when i do no shutdown command , it still stays the link on 192.168.13.2, does not switched to 192.168.12.2

So my understanding is it does not do preemption, take over .

Is there any command to make it work - takeover path 1 automatically ?

Please advise

B

Hello Rahul

BGP will choose the best path based on the best path selection attributes explained in the following lesson. If you shut down a port and then bring it back up, eventually, all of the attributes will be examined and the best path will be selected. Sometimes BGP takes quite long (on the order of minutes) to reconverge depending on the configuration.

If you want to increase BGP convergence time, take a look at this lesson:

I hope this has been helpful!

Laz

Thanks for your reply Laz.

i have a bit of confusion. Please clarify

R1#
R1#sh run | sec bg
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.1 mask 255.255.255.255
 neighbor 192.168.12.2 remote-as 10
 neighbor 192.168.13.2 remote-as 10
 no auto-summary

R2#sh run | sec bg
router bgp 10
 no synchronization
 bgp log-neighbor-changes
 network 2.2.2.2 mask 255.255.255.255
 network 192.168.23.0
 neighbor 192.168.12.1 remote-as 1
 no auto-summary

R3#sh run | sec bg
router bgp 10
 no synchronization
 bgp log-neighbor-changes
 network 3.3.3.3 mask 255.255.255.255
 network 192.168.23.0
 neighbor 192.168.13.1 remote-as 1
 no auto-summary

Currently the best path is 192.168.12.2

R1#sh ip bgp
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       192.168.12.2             0             0 10 i
*> 3.3.3.3/32       192.168.13.2             0             0 10 i
*> 192.168.23.0     192.168.12.2             0             0 10 i
*                   192.168.13.2             0             0 10 i
R1#

i have shutdown the Best path link

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int fa0/0
R1(config-if)#shu
R1(config-if)#shutdown

Now the link switched over to 192.168.13.2

R1#sh ip bgp
BGP table version is 7, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       0.0.0.0                  0         32768 i
*> 3.3.3.3/32       192.168.13.2             0             0 10 i
*> 192.168.23.0     192.168.13.2             0             0 10 i
R1#

Then i bring it back up. The link Still Stays on 192.168.13.2, it didn’t do re-election for best path selection.

R1#sh ip bgp
BGP table version is 8, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       0.0.0.0                  0         32768 i
*> 2.2.2.2/32       192.168.12.2             0             0 10 i
*> 3.3.3.3/32       192.168.13.2             0             0 10 i
*  192.168.23.0     192.168.12.2             0             0 10 i
*>                  192.168.13.2             0             0 10 i
R1#

when i manually reset the neighbor, then the link switched over to 192.168.12.2

R1#clear ip bgp *
R1#
*Mar  1 00:10:01.379: %BGP-5-ADJCHANGE: neighbor 192.168.12.2 Down User reset
*Mar  1 00:10:01.379: %BGP-5-ADJCHANGE: neighbor 192.168.13.2 Down User reset
R1#
*Mar  1 00:10:02.819: %BGP-5-ADJCHANGE: neighbor 192.168.13.2 Up
R1#
*Mar  1 00:10:04.043: %BGP-5-ADJCHANGE: neighbor 192.168.12.2 Up
R1#sh ip bgp
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       192.168.12.2             0             0 10 i
*> 3.3.3.3/32       192.168.13.2             0             0 10 i
*> 192.168.23.0     192.168.12.2             0             0 10 i
*                   192.168.13.2             0             0 10 i

Please help

Hello Rahul

How long did you wait for BGP to reconverge? Remember, it takes at least a minute or more depending on the timers. There are ways to speed this up, by using Next Hope Address Tracking for example. For more info on this, take a look at the lessons indicated in my previous post.

Laz

Hi Laz,

i waited for almost 5 minutes to re-convergence, but it still doesn’t do Re elections

Hello Rahul,

This behavior is normal. It’s step 10 of the best path selection:

When both paths are external, prefer the path that was received first (the oldest one).

This step minimizes route-flap because a newer path does not displace an older one, even if the newer path would be the preferred route based on the next decision criteria (Steps 11, 12, and 13).

You can change this behavior if you enable bgp best path compare-routerid on R1.

Rene