01-20-2014 02:59 AM - edited 03-04-2019 10:07 PM
AS 2 Ibpg configured with ospf, on Router 3 and Router 5 both ebgp routes appear in route table, but on R4 and R6 there is no Ebgp routes.Goal is need to ping from R1 to R2 loop back address.
R5
R5#sh ip bgp
BGP table version is 6, local router ID is 5.5.5.5
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.1/32 3.3.3.3 0 100 0 1 i
*> 2.2.2.2/32 192.168.52.2 0 0 3 i
*>i192.168.13.0 3.3.3.3 0 100 0 1 i
r> 192.168.52.0 192.168.52.2 0 0 3 i
R5#sh ip route bgp
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [200/0] via 3.3.3.3, 00:26:14
B 192.168.13.0/24 [200/0] via 3.3.3.3, 00:26:14
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [20/0] via 192.168.52.2, 00:26:19
R5#sh run | sec bgp
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 6.6.6.6 remote-as 2
neighbor 6.6.6.6 update-source Loopback0
neighbor 192.168.52.2 remote-as 3
no auto-summary
R3
R3#sh ip bgp
BGP table version is 6, local router ID is 3.3.3.3
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 192.168.13.1 0 0 1 i
*>i2.2.2.2/32 5.5.5.5 0 100 0 3 i
r> 192.168.13.0 192.168.13.1 0 0 1 i
*>i192.168.52.0 5.5.5.5 0 100 0 3 i
R3#sh ip route bgp
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [20/0] via 192.168.13.1, 00:26:47
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [200/0] via 5.5.5.5, 00:26:47
B 192.168.52.0/24 [200/0] via 5.5.5.5, 00:26:47
R3#sh run | sec bp
R3#sh run | sec bgp
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 5.5.5.5 remote-as 2
neighbor 5.5.5.5 update-source Loopback0
neighbor 5.5.5.5 next-hop-self
neighbor 6.6.6.6 remote-as 2
neighbor 6.6.6.6 update-source Loopback0
neighbor 192.168.13.1 remote-as 1
no auto-summary
R3#
R4
R4#sh ip bgp
BGP table version is 5, local router ID is 4.4.4.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.1/32 192.168.13.1 0 100 0 1 i
* i2.2.2.2/32 192.168.52.2 0 100 0 3 i
* i192.168.13.0 192.168.13.1 0 100 0 1 i
* i192.168.52.0 192.168.52.2 0 100 0 3 i
R4#sh ip route bgp
R4#sh run | sec bgp
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 5.5.5.5 remote-as 2
neighbor 5.5.5.5 update-source Loopback0
neighbor 6.6.6.6 remote-as 2
neighbor 6.6.6.6 update-source Loopback0
no auto-summary
R6#sh ip bgp
BGP table version is 5, local router ID is 6.6.6.6
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.1/32 192.168.13.1 0 100 0 1 i
* i2.2.2.2/32 192.168.52.2 0 100 0 3 i
* i192.168.13.0 192.168.13.1 0 100 0 1 i
* i192.168.52.0 192.168.52.2 0 100 0 3 i
R6#sh ip route bgp
R6#sh run | sec bgp
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 4.4.4.4 remote-as 2
neighbor 4.4.4.4 update-source Loopback0
neighbor 5.5.5.5 remote-as 2
neighbor 5.5.5.5 update-source Loopback0
no auto-summary
R1
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
C 192.168.13.0/24 is directly connected, Serial1/0
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [20/0] via 192.168.13.3, 00:28:25
B 192.168.52.0/24 [20/0] via 192.168.13.3, 00:28:25
R1#sh ip ngp
^
% Invalid input detected at '^' marker.
R1#sh ip bgp
BGP table version is 5, 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.13.3 0 2 3 i
*> 192.168.13.0 0.0.0.0 0 32768 i
*> 192.168.52.0 192.168.13.3 0 2 3 i
R1#sh run | sec bgp
router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 192.168.13.0
neighbor 192.168.13.3 remote-as 2
no auto-summary
R2
R2#sh ip bgp
BGP table version is 5, local router ID is 2.2.2.2
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 192.168.52.5 0 2 1 i
*> 2.2.2.2/32 0.0.0.0 0 32768 i
*> 192.168.13.0 192.168.52.5 0 2 1 i
*> 192.168.52.0 0.0.0.0 0 32768 i
R2#sh ip route bgp
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [20/0] via 192.168.52.5, 00:29:29
B 192.168.13.0/24 [20/0] via 192.168.52.5, 00:29:29
R2#sh run | sec bgp
router bgp 3
no synchronization
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
network 192.168.52.0
neighbor 192.168.52.5 remote-as 2
no auto-summary
Solved! Go to Solution.
01-20-2014 05:11 AM
Hi Jon,
if only r3 and r5 are BGP peers in AS2 then the middle routers will be blackholing the traffic because they don't know about the BGP routes from external ASes.
Regards
Alain
Don't forget to rate helpful posts.
01-20-2014 10:18 AM
It's what i described in the post where i made an error.
R3 and R5 learnt the EBGP routes via IBGP because you had an IBGP peering between R3 and R5. There is no direct connection between them but that is not a requirement of IBGP.
If in your original setup you had not setup an IBGP peering between R3 and R5 it would not have worked. This is because if an IBGP router receives a route from an IBGP peer it cannot then advertise that route to another IBGP peer.
So if R5 advertised 2.2.2.2 to R4 and R6 they cannot then advertise that route to R3. R3 knows about that route because you have an IBGP peering between R3 and R5.
The way round this IBGP rule, as i said before, is to either have a full mesh so every router has an IBGP peering with every other router or to use route reflectors which relax the rule about not being able to advertise routes between IBGP peers.
You can confirm this by running IBGP on all routers within that AS but do not setup an IBGP peering from R3 to R5.
Jon
01-20-2014 03:23 AM
If you do a "sh ip route" on R4 is there is route for 192.168.52.2 ?
It looks like the same problem as before. R4 may have entry in it's BGP table for 192.168.52.2 but it needs it in the IP routing table.
So if that route is not in the IP routing table on R4 and R6 add the "next-hop self" command to R3 and R5 for their peerings with R4 and R6.
Jon
01-20-2014 04:24 AM
0kay now i have bgp routes in R4 and R6 but still not able to ping 1.1.1.1 or 2.2.2.2
R6#sh ip route bgp
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [200/0] via 3.3.3.3, 00:07:59
B 192.168.13.0/24 [200/0] via 3.3.3.3, 00:07:59
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [200/0] via 5.5.5.5, 00:08:38
B 192.168.52.0/24 [200/0] via 5.5.5.5, 00:08:38
R6#sh run | sec bgp
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 2
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 4.4.4.4 remote-as 2
neighbor 5.5.5.5 remote-as 2
neighbor 5.5.5.5 update-source Loopback0
neighbor 5.5.5.5 next-hop-self
no auto-summary
01-20-2014 04:33 AM
When you ping from R4 or R6 the source IP will 192.168.45/65.x respecitvely but R2 does not have routes in it's IP routing table for these subnets.
If you want to be able to ping from R4/R6 you would need to advertise those subnets to R2. You can do this with -
1) "network ..." commands on R5 under the BGP configuration
or
2) a "redistribute connected" under the BGP configuration on R5
Jon
01-20-2014 04:45 AM
Okay, if remove bgp from R4 and R6, can we able to ping from As 1 to As 3 using R5 and R3 ?
01-20-2014 04:49 AM
Hi,
In this case you'll have to redistribute those specific BGP routes into your IGP or run MPLS in your core.
Regards
Alain
Don't forget to rate helpful posts.
01-20-2014 04:55 AM
If i do so, it will receive lot of prefix from bgp to ospf, and ospf not going handle 350k + prefix
01-20-2014 04:57 AM
You do not need to redistribute BGP into OSPF because you have an IBGP peering between R3 and R5. OSPF in your setup is simply used to provide reachability between R3 and R5.
So as long as you use the "next-hop self" command you should be fine.
Bear in mind that when you had IBGP on R4/R6 any routes received by R5 from R2 were advertised to R3, R4 and R6 but R4 and R6 did then not advertise the same routes to R3.
This is because an IBGP router that learns a route from an IBGP peer cannot then advertise it to another IBGP peer. Your setup worked because you also had an IBGP peering between R3 and R5 even though it actually went via R4 or R6 ie. there is no direct link between R3 and R5.
You can overcome the IBGP issue with a full mesh ie. every IBGP router peers with every other IBGP router whether over direct links or indirect links although direct are better or you can use route reflectors.
Jon
01-20-2014 05:11 AM
Hi Jon,
if only r3 and r5 are BGP peers in AS2 then the middle routers will be blackholing the traffic because they don't know about the BGP routes from external ASes.
Regards
Alain
Don't forget to rate helpful posts.
01-20-2014 05:16 AM
Hi Alain
You are completely correct, my mistake.
Thanks for correcting.
Jon
01-20-2014 05:25 AM
Alain
I'm must remember to save this post for when there is yet another discussion about ratings in the social forums and everyone (except myself and Rick) argues for removing the lower marks.
It's posts like the one above that should actually get that rating because it's just basic routing.
Once again, thanks for stepping in and clearing things up
Jon
01-20-2014 06:00 AM
Hi Jon,
I don't mind about ratings so much as to ask the deletion of 1 or 2 marks but sometimes we solve problems(whether they are basic or not is just a point of view and what is basic for me may not be for the poster) and we only get 1-2 marks then indeed it is disappointing but this is very rare and my first objective here is not points even if my signature could be interpreted in another way
By the way thanks for the +5
Regards
Alain
Don't forget to rate helpful posts.
01-20-2014 05:09 AM
Hi,
If i do so, it will receive lot of prefix from bgp to ospf, and ospf not going handle 350k + prefix
that's why I said:
In this case you'll have to redistribute those specific BGP routes into your IGP or run MPLS in your core.
Using a route-map.
Regards
Alain
Don't forget to rate helpful posts.
01-20-2014 09:17 AM
Hello
Alain - As I see it you dont need to to redistribute bgp into ospf-
As long as the IBGP "core* has a full mesh with synchronization turned off and full NRLI via ospf then all should be fine- and R1=R2 should be able to reach each other via their loopbacks
Would be nice to see the IGP config for routers R3-6
res
Paul
Please don't forget to rate any posts that have been helpful.
Thanks.
01-20-2014 09:30 AM
Hi Paul,
If there is no BGP on the middle routers then how wil they know about the BGP prefixes unless we redistribute or use static routes ?
Regards
Alain
Don't forget to rate helpful posts.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide