Internal BGP (Border Gateway Protocol) explained

(Andrew P) #81

A full mesh peering has both pros and cons. Some of these are hard to see in simple networks like in this example. One reason, for example, that you might want a full mesh between R2, R3, and R4, is that each of those routers would have a complete view of the network, and each could make its own calculation as to best path choice. Contrast this against a non-meshed network–for example, where R3 is a route-reflector and R2 and R4 are clients. In this case, R3 is the one that makes all the decisions as to which routes are best, and only those routes are advertised to its clients.

For example, let’s say the link between R3 and R4 is really slow, but a link (not pictured) between R2 and R4 is fast. In a fully meshed network, R2 would have enough BGP information to be able to choose between an R2-R3-R4 path or a R2-R4 path. In the case of a non-fully meshed network, and R3’s being a route-reflector, R2 only knows what R3 has decided to tell it about routes from R4.

(Networklessons Admin) split this topic #82

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

(Rakesh N) #84

Can you explain more about the statement “If we use public IP addresses from ISP1 (or ISP2) then these servers will be unreachable once the ISP has connectivity issues.”
Isn’t the public IP address independent of an ISP?

(Lazaros Agapides) #85

Hello Rakesh

Can you indicate where this statement was made so we can take a look and answer your question?



(Rakesh N) #86

I was referring to the topic “Introduction to BGP” and here is the link

(Lazaros Agapides) #87

Hello Rakesh.

In order for the two servers to be reachable from the Internet, they require public IPs. You can obtain these IPs from the ISP itself, in other words, use a static public IP provided by the ISP. If you have two ISPs, you can’t do that because you will be “locked in” to using only one of the two ISPs. You must purchase an address space of your own.

That is why it says in the text “Instead of using public IP addresses from the ISP we will get our own public IP addresses.” The address space itself is independent of the ISPs and is advertised via BGP to the ISPs.

I hope this has been helpful!


(Rakesh N) #88

I was thinking this. Which might be wrong according to your explanation. Consider we have a static IP address from ISP 1. Why can’t we advertise it to ISP 2 so in case if ISP 1 fails , we still don’t lose the connectivity. I want to know what is that I am missing here. I know this is not possible but please explain why.

(Rene Molenaar) #89

Technically, you can advertise whatever you want in BGP but in reality, it’s not going to happen.

Let’s say you are connected to ISP1 and ISP2 and connected through BGP to learn some prefixes from them. If you don’t have any address space of your own, they will probably not accept anything that you do try to advertise by filtering everything inbound. If not, you could end up becoming a transit AS since you might advertise address space from ISP1 to ISP2 and vice versa.

Even if they do accept some prefixes that you advertise, you would be advertising address space that doesn’t belong to you. If you want a good example, here’s how Pakistan knocked Youtube of the Internet :wink:

(MAODO T) #90

Hi Rene,

I got a better understanding of the issue, after re-reading (couple of times) the lesson below :

However, I still have questions :

    • I understand that for making the link between 2 external ASs, an IBGP segment and IGP routing in the transit AS does perfectly the job. So, in what real life situations we need to have more than 1 (full-mesh) IBGP network ?
    • It seems definition of SPLIT HORIZON for IBGP is not the same as what I learned for RIP : “a router is not allowed to advertise information on the same interface where it has learned that information” ?

(Rene Molenaar) #91

Hi @kayoutoure,

Whenever your autonomous system is a transit AS, you probably have to run IBGP within your AS to prevent packet drops. For example, If you have AS1-AS2-AS3 then AS2 has to run IBGP so that every router in AS2 automatically learns about prefixes from AS1 and AS3. One comment about this, this only applies to routers that are in the traffic path of traffic from AS1 to AS3. Let me explain this a bit more:

In this topology, R2, R3, and R4 are in the traffic path so they all have to run IBGP. If there were another router…let’s say R6 that is only connected only to R3 then it doesn’t have to run IBGP as it’s not in the traffic path.

If you only have to route a couple of prefixes between AS1 and AS3, you could redistribute BGP routes from AS1 and AS3 into the IGP of AS2. However, when you are talking about the Internet with hundreds of thousands of prefixes, that’s not going to work.

What exactly do you mean with more than 1 full mesh IBGP network? If you are talking about a single AS…you’ll have only 1 full mesh of IBGP routers. If you are talking about multiple ASes, then you’ll have multiple full-mesh IBGP networks in a topology like this:


Both AS2 and AS3 will have a full mesh of IBGP routers within their AS since both of them are transit ASes.

About split horizon, it is different indeed…for RIP (and EIGRP) it means that you don’t advertise a prefix that you learned on an interface out of the same interface.

In IBGP, it means that you don’t advertise a prefix from one IBGP router to another IBGP router, which is why we need the full mesh of IBGP neighbor adjacencies.

I hope this helps!

(MAODO T) #92

Hi Rene,

Sorry for the bad formulation of my 1st question ! I wanted to ask : In what real-life situations we need to have a full-mesh network with more than 2 IBGP routers (at least 3 IBGP links) in the transit AS ?

Back to the schema you sent. I’m a little bit confused when you say that R3 should run IBGP. What if R3 was running IGP only and the IBGP session was directly between R2 and R4 ?

Still based on the schema ; we can say that there are at least three was of designing the network of the transit AS ?

A. All 3 routers (R2,R3,R4) running IBGP - Full-Mesh Network
B. All 3 routers (R2,R3,R4) running IBGP - No direct IBGP session between R2 and R4
C. R2,R4 running IBGP and having direct IBGP session between them - R3 is running IGP only

What hat would be the purpose of each of these architectures ? What would not work with each of them ?

(Rene Molenaar) #93

Hi @kayoutoure

Let me explain what happens with your three designs, when AS1 tries to reach AS3. (or from AS3 to AS1)

  1. If you have a full mesh with R2, R3, and R4 then everything will work. All three routers will know about all prefixes from AS1 and AS3.

  2. Because of IBGP split horizon, prefixes that R3 learns from R4 are not forwarded to R3. When R2 receives a packet from AS1 destined for AS3, it will drop the packet since it has no idea where the destination is.

  3. R2 and R4 will know about all prefixes but R3 doesn’t…R2 will forward a packet to R3, R3 does a routing lookup and has no clue about the destination, dropping the IP packet.

(MAODO T) #94

Hi Rene,

See below my feedback on your answers to my three topologies.

A. Full Mesh. Ok. I understand that this topology works perfectly for BGP AS transit traffic ?

B. I have to read (and learn) more about SPLIT HORIZON in BGP ?

C. A little bit surprised ! Is this topology not BGP free core ? It’s not the same topology as the one you explained in ?

Do I have to consider a 4th kind of topology for fixing Topology C (redistributing IGP routes in PE routers) ?

(Rene Molenaar) #95

Hi @kayoutoure

When we are talking about a BGP free core in MPLS networks, we are talking about the P routers:

The PE routers are running BGP.

If you are still a little fuzzy on BGP / IBGP, I would recommend to stay away from MPLS VPN for now since it’ll only be even more confusing :smile:

The best way to see IBGP split horizon in action, is to test it with three routers:


Configure IBGP between R1-R2 and R2-R3 but not between R1 and R3. Now add a loopback on each router and advertise it in BGP…then check your routing tables :wink:

(MAODO T) #96

Thanks for the long discussion, Rene.

Yeap ! I will keep doing simple labs, until I get a better understanding of adavanced stuff, like BGP FREE CORE, SPLIT HORIZON, MPLS VPN, … :smile:

(Brian C) #97

How is it that R5 router has a route in it for yet it cannot ping that same IP. I am more curious how R5 is getting the route than the ping issue I understand why we cannot ping

I also just now noticed you only configured EBGP between R4 and R5 why you would configure EBGP between R4 and R5 and not configure it between R1 and R2. Was that just over looked?

Watched some videos tonight picked up a couple things I either missed or had not gotten to yet.

  1. if routers in the same AS and connected they use IBGP
  2. If routers in different AS and connected they use EBGP


(Rene Molenaar) #98

Hi @wilder7bc,

You are talking about this example right?

I did configure EBGP between R1-R2 there.

Within an AS, we use IBGP…between two different ASes, we use EBGP…that’s right :slight_smile:

(Lee M) #99

Hi Rene,

When the lab is completed I run a show ip route and the command output shows the admin distance of bgp (120) why is the next answer listed as 0?



(Lazaros Agapides) #100

Hello Lee

Within the routing table the [X/Y] found within each entry indicates X=Administrative Distance (AD) and Y=Metric respectively. RIP, OSPF and EIGRP will have a default AD of 120, 110 and 90 respectively. eBGP will have a default AD of 20.

Now as for the Metric, in the case of RIP, OSPF and EIGRP, a specific number exists for Y based on the method by which the metric is calculated (Hops, Bandwidth or Composite metric, again, respectively). BGP however does not use a metric in the same way as the other protocols. BGP uses the best path selection algorithm and compares paths with specific criteria in a specific sequence to result in one best path selection. There is no numerical metric associated with this. This is why the metric for BGP in the routing table is 0.

Now it is possible to add multiple BGP paths into a routing table (up to 6) but again these must have certain characteristics equal among them in order to be installed. The metric however would still show up as 0. You can find more information about the BGP best path selection algorithm at this Cisco Documentation.

I hope this has been helpful!


(Subhadarshi S) #101

Thank you, René Molenaar. Your tutorials are helping me to build a strong foundation.
I have a doubt in the iBGP tutorial which I am sure you will be able to clarify.

IBGP is used to transmit the BGP prefix information from one AS3 to AS1. But why we used OSPF to advertise the prefix within AS2. What if we have used similar commands when advertising EBGP. Do we always have to advertise IBGP by using IGPs such as OSPF or RIP?