We don’t save anything by implementing iBGP but it’s necessary.
AS2 is a transit AS so all routers within the AS should know how to reach any destination. When R3 receives an IP packet, it has to know if it should forward the packet to R2 or R4. If this is an ISP where we use IP routing then we’ll need to implement iBGP to fill its routing table.
In your example…. In Autonomous System 2… lets say R3 was an (OSPF) Autonomous System border router to other networks behind it… theres EIGRP, OSPF, and RIP etc etc networks that are all redistributed into R3… and lets just say iBGP is configured on R3 as well…. How do those redistributed networks exit out the network to AS1 or AS2? Do those redistributed networks need to be learned by iBGP in order for them to leave the network – through iBGP – to eBGP? If I have 50 prefixes redistributed into R3 from other IGP networks…. How does iBGP learn of those prefixes? Does iBGP even have to learn of those networks in order to exit the AS2?
In order for BGP to advertise a new route (meaning not a route that was already in BGP already), two things must be true:
The route must exist in the routing table of the BGP router that will be doing the advertising
BGP must be told which routes to advertise
If R3 is learning about routes from an IGP (say, OSPF), you first make sure that the routes you want to advertise are, in fact, in R3’s routing table. This isn’t necessarily true just because R3 is learning OSPF routes from somewhere else.
Next, you must tell the BGP process to advertise those routes. This can be done one of two ways:
Using a manual “network” statement within the BGP process. This statement must match exactly what is in the routing table (as far as prefix length). So, for example, if you had 10.1.0.0/24 and 10.1.1.0/24 in the routing table, you would NOT be allowed to say “network 10.1.0.0/23” instead you would have to input each one. This can get tedious with a large amount of routes, so many people choose to use redistribution (#2 below)
Redistribute routes into BGP from another IGP (like OSPF). With Redistribution you have all kinds of options for Route-maps, filters, and setting community options.
Once R3 puts the desired routes into the BGP process, R2 and R4 will learn them via iBGP, and then advertise them to R1 and R5 via external BGP.
Could you recommend some network lessons that hit upon your option 2 - Redistribute routes into BGP from another IGP (like OSPF). With Redistribution you have all kinds of options for Route-maps, filters, and setting community options
For this paper in college I am writing… I have a small RIP network…connected to a small OSPF network…which in turn is connected to a small EIGRP network (4 routers…. Which are also running iBGP) which is the gateway out to 2 ISP (BGP). Ive got the whole redistribution down between the internal networks. My RIP is redist into OSPF which in turn is redist into EIGRP. I’m just having a hard time grasping the configuration of turning those internal networks that are redistributed into EIGRP…turning them into BGP so they can exit the network.
You said:
The route must exist in the routing table of the BGP router that will be doing the advertising
BGP must be told which routes to advertise
If R3 is learning about routes from an IGP (say, OSPF), you first make sure that the routes you want to advertise are, in fact, in R3’s routing table. This isn’t necessarily true just because R3 is learning OSPF routes from somewhere else.
So…if all the internal networks are redistributed into EIGRP (where R3 sits)… then those routes would be in R3 routing table right?
Next, you must tell the BGP process to advertise those routes……option 2 - 2) Redistribute routes into BGP from another IGP (like OSPF). With Redistribution you have all kinds of options for Route-maps, filters, and setting community options
So…a Route-Map command would take all my internal routes in R3 routing table and redistribute them into iBGP so they can exit out to eBGP?
How R5 learnt about the route advertised by R1 AS 1 (1.1.1.0) ?
I mean I don t understand why R5 has in its routing table this route.
it seems it got from R1-R2-R4-R5 path but then the to reply to ping from 1.1.0 it takes another path via R3 (R5-R4-R3) ?
Then R3 does not know about 1.1.1.0.
Could you please explain it ?
In order for BGP to advertise something it has to be in the routing table of the router. You can’t advertise what you don’t have. It doesn’t matter if these networks are directly connected or learned through another routing protocol like OSPF. If you see the route in the routing table, then it can be advertised.
There’s two ways how you can advertise something in BGP.
After I added “network 192.168.45.0” on R5 try to advertise it into AS2 and AS1, R4 it shows RIB-failure, it doesn’t appear to have same result as you did. Kindly advise.
R4#sh ip bgp
BGP table version is 9, local router ID is 192.168.34.4
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
*>i1.1.1.0/24 2.2.2.2 0 100 0 1 i
r> 192.168.45.0 192.168.45.5 0 0 3 i
Yes, 192.168.45.0 is directly connected in R4 routing table, no other routing protocol, is that the reason it caused error when R5 advertised this route?
That’s right. Your router learns this prefix from its neighbor but it already has a route in its routing table (because it’s directly connected). That’s why it can’t install it in the routing table.
RIB-failure means that the prefix couldn’t be installed in the routing table.
Do we need OSPF to advertise the Loopback interfaces even if we have a full meshed iBGP connection between all 3 routers within the AS 2 ?
I do believe it is a yes.
Rather than adverting the network 192.168.45.0 in R5, if we set gateway of last resort on R1. This should solve the problem of R1 being not sure how to reply to the ping from R5. I also see that R1 is a stub network so setting a default route should give us an easy forward to all packets out of R1
Please let me know if this is something we can do on production networks rather advertising all this prefixes. Is there something that we need to redistribute this default route into BGP?