04-04-2011
08:52 AM
- last edited on
02-12-2023
11:01 PM
by
Translator
Hi everyone,
I'm running into a bgp problem that is really confusing to me. Here's the topology :
So R2 advertises a connected prefix (10.212.254.0/24) to R0. This prefix is then advertised to R1, R3 and R4. So far so good.
And then i have R1 advertising a connected prefix (10.212.255.0/24) to R0 as well. This prefix is then advertised by R0 to R3 and R4 but it doesn't make it to R2. The strange thing is that R0 does advertise the prefix to R2 (i checked with a
show ip bgp vpnv4 vrf ce R0 neighbor 10.245.32.1 advertised).
However R2 does not receive this route
(checked with show ip bgp vpnv4 vrf ce R0 neighbor 10.245.32.2 received-routes)
Does someone have any idea how this prefix gets lost on its way from R0 to R2 ??? There's no configured filtering of any kind on R0. I checked with multiple
debug
commands (for bgp and routing) by that wasn't very helpful.
Finally R1 and R2 are two VRF running on the same 3750, same for R3 and R4, and R0 is on its own on yet another 3750.
Thx for any help.
Solved! Go to Solution.
04-05-2011
06:43 AM
- last edited on
03-15-2023
02:59 AM
by
Translator
Hi,
Its the default behaviour of local-as command that changes the AS for remote peers not for local router AS. R2 is not accepting the routes because AS-PATH Splithorizon rule. R2 look its own 65001 AS in AS-PATH hence its not installing the routes in routing table to avoid loop. where in R1 looks prefix originated in R2 from AS 65002 hence its installed in routing table.
You have two workaround to avoid this issue.
1. On R2:- neighbor R0 allowas-in
2. On R0:- neighbor R2 as-override
Regards,
Jitendra
CCIE 22703#
04-04-2011 10:10 AM
It might be helpful if you can show us configuration details from R1 and R2 - especially the configuration of BGP.
Your drawing seems to indicate that R1 has BGP process with AS number 65001 and that R2 has 65002. If I understand your post correctly then both are running on the same 3750. I am curious how you get 2 different BGP processes on the same 3750. If we understood this then perhaps we might have better answers about the missing route.
HTH
Rick
04-05-2011
06:03 AM
- last edited on
03-15-2023
02:56 AM
by
Translator
Hi Rick,
thanks for your input.
Indeed there's a limitation on the 3750 that won't allow more than one BGP process to run. In order to circumvent this, i had to resort to using the replace-as option of the neighbor command.
Here are some outputs that may be of some help :
BGP config on 3750 running R1 and R2
|
---|
interface loopback 0 |
BGP config of 3750 running R0
|
---|
router bgp 65100 |
Below are the peering state of the three routers R0, R1 and R2 :
Switch_sites#sh ip bgp vpnv4 vrf ce_R1 sum
BGP router identifier 1.1.1.1, local AS number 65001
BGP table version is 539, main routing table version 539
17 network entries using 2397 bytes of memory
17 path entries using 1156 bytes of memory
4/3 BGP path/bestpath attribute entries using 560 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 4161 total bytes of memory
BGP activity 205/178 prefixes, 263/236 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.245.31.2 4 65100 16706 16690 539 0 0 17:34:23 10
Switch_sites#sh ip bgp vpnv4 vrf ce_R2 sum
BGP router identifier 2.2.2.2, local AS number 65001
BGP table version is 539, main routing table version 539
10 network entries using 1410 bytes of memory
10 path entries using 680 bytes of memory
4/3 BGP path/bestpath attribute entries using 560 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2698 total bytes of memory
BGP activity 205/178 prefixes, 263/236 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.245.32.2 4 65100 15683 15660 539 0 0 18:47:57 7
Interestingly R2 sees itself as 65001 although the other routers see it as 65002.
Switch_CORE#sh ip bgp vpnv4 vrf core_R0 summary
BGP router identifier 3.3.3.3, local AS number 65100
BGP table version is 198, main routing table version 198
14 network entries using 1974 bytes of memory
17 path entries using 1156 bytes of memory
4/3 BGP path/bestpath attribute entries using 560 bytes of memory
3 BGP AS-PATH entries using 72 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3762 total bytes of memory
BGP activity 68/54 prefixes, 103/86 paths, scan interval 15 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.245.31.1 4 65001 18416 18436 198 0 0 17:42:29 4
10.245.32.1 4 65002 15664 15689 198 0 0 18:52:32 3
10.245.33.1 4 65000 15620 15649 198 0 0 1w3d 5
10.245.34.1 4 65000 15638 15668 198 0 0 19:36:30 5
Here, as you can see in red, R0 sees R2 as part of AS 65002.
Now you can see R2 advertises its 10.212.254.0/24 prefix to R0:
Switch_sites#sh ip bgp vpnv4 vrf ce_R2 neighbors 10.245.32.2 advertised-routes
BGP table version is 539, 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
Route Distinguisher: 4:4 (default for vrf ce_R2) VRF Router ID 2.2.2.2
*> 2.2.2.2/32 0.0.0.0 0 32768 ?
*> 10.212.254.0/24 0.0.0.0 0 32768 ?
*> 10.245.32.0 0.0.0.0 0 32768 ?
R0 receives the 10.212.254.0/24 prefix sent by R2 and it's seen as originating from AS 65002:
Switch_CORE#sh ip bgp vpnv4 vrf core_R0 neighbor 10.245.32.1 received-routes
BGP table version is 198, 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
Route Distinguisher: 3:3 (default for vrf core_R0)
*> 2.2.2.2/32 10.245.32.1 0 0 65002 ?
*> 10.212.254.0/24 10.245.32.1 0 0 65002 ?
r> 10.245.32.0 10.245.32.1 0 0 65002 ?
R0 then advertises it to R1 :
Switch_CORE#sh ip bgp vpnv4 vrf core_R0 nei 10.245.31.1 advertised-routes
BGP table version is 198, 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
Route Distinguisher: 3:3 (default for vrf core_R0)
*> 2.2.2.2/32 10.245.32.1 0 0 65002 ?
*> 4.4.4.4/32 10.245.33.1 0 0 65000 ?
*> 5.5.5.5/32 10.245.34.1 0 0 65000 ?
*> 10.200.190.0/24 10.245.33.1 0 0 65000 ?
*> 10.202.211.0/24 10.245.33.1 0 0 65000 ?
*> 10.205.0.0/24 10.245.33.1 0 0 65000 ?
*> 10.212.254.0/24 10.245.32.1 0 0 65002 ?
r> 10.245.32.0 10.245.32.1 0 0 65002 ?
r> 10.245.33.0 10.245.33.1 0 0 65000 ?
r> 10.245.34.0 10.245.34.1 0 0 65000 ?
And R1 receives it correctly and install it in its RIB :
Switch_sites#sh ip bgp vpnv4 vrf ce_R1 neighbors 10.245.31.2 received-routes
BGP table version is 539, 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
Route Distinguisher: 3:3 (default for vrf ce_R1) VRF Router ID 1.1.1.1
*> 2.2.2.2/32 10.245.31.2 0 65100 65002 ?
*> 4.4.4.4/32 10.245.31.2 0 65100 65000 ?
*> 5.5.5.5/32 10.245.31.2 0 65100 65000 ?
*> 10.200.190.0/24 10.245.31.2 0 65100 65000 ?
*> 10.202.211.0/24 10.245.31.2 0 65100 65000 ?
*> 10.205.0.0/24 10.245.31.2 0 65100 65000 ?
*> 10.212.254.0/24 10.245.31.2 0 65100 65002 ?
*> 10.245.32.0 10.245.31.2 0 65100 65002 ?
*> 10.245.33.0 10.245.31.2 0 65100 65000 ?
*> 10.245.34.0 10.245.31.2 0 65100 65000 ?
Total number of prefixes 10
So this works fine.
Now if i look the other way around from R1 to R2, R1 advertises its 10.212.255.0/24 prefix to R0 :
witch_sites#sh ip bgp vpnv4 vrf ce_R1 neighbors 10.245.31.2 advertised-routes
BGP table version is 539, 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
Route Distinguisher: 3:3 (default for vrf ce_R1) VRF Router ID 1.1.1.1
*> 1.1.1.1/32 0.0.0.0 0 32768 ?
*> 10.3.10.0/24 10.212.255.4 0 32768 ?
*> 10.199.228.0/24 10.212.255.4 0 32768 ?
*> 10.212.255.0/24 0.0.0.0 0 32768 ?
Total number of prefixes 4
R0 then advertises to R2 the routes it received from R1 correctly :
Switch_CORE#sh ip bgp vpnv4 vrf core_R0 nei 10.245.32.1 advertised-routes
BGP table version is 198, 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
Route Distinguisher: 3:3 (default for vrf core_R0)
*> 1.1.1.1/32 10.245.31.1 0 0 65001 ?
*> 4.4.4.4/32 10.245.33.1 0 0 65000 ?
*> 5.5.5.5/32 10.245.34.1 0 0 65000 ?
*> 10.3.10.0/24 10.245.31.1 0 0 65001 ?
*> 10.199.228.0/24 10.245.31.1 0 0 65001 ?
*> 10.200.190.0/24 10.245.33.1 0 0 65000 ?
*> 10.202.211.0/24 10.245.33.1 0 0 65000 ?
*> 10.205.0.0/24 10.245.33.1 0 0 65000 ?
*> 10.212.255.0/24 10.245.31.1 0 0 65001 ?
r> 10.245.33.0 10.245.33.1 0 0 65000 ?
r> 10.245.34.0 10.245.34.1 0 0 65000 ?
and here finally is my problem as R2 doesn't receive the routes R0 sends it originating from R1 (AS 65001) :
Switch_sites#sh ip bgp vpnv4 vrf ce_R2 neighbors 10.245.32.2 received-routes
BGP table version is 539, 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
Route Distinguisher: 4:4 (default for vrf ce_R2) VRF Router ID 2.2.2.2
*> 4.4.4.4/32 10.245.32.2 0 65100 65000 ?
*> 5.5.5.5/32 10.245.32.2 0 65100 65000 ?
*> 10.200.190.0/24 10.245.32.2 0 65100 65000 ?
*> 10.202.211.0/24 10.245.32.2 0 65100 65000 ?
*> 10.205.0.0/24 10.245.32.2 0 65100 65000 ?
*> 10.245.33.0 10.245.32.2 0 65100 65000 ?
*> 10.245.34.0 10.245.32.2 0 65100 65000 ?
Total number of prefixes 7
I thought maybe the issue has something to do with the 3750 limitation as R2 sees itself part of AS 65001 although the other routers see it as 65002. But if that were the reason, then why are its routes learned by R1 but not the other way around ?
Can someone shed any light on this ?
Thx for your help.
04-05-2011
06:43 AM
- last edited on
03-15-2023
02:59 AM
by
Translator
Hi,
Its the default behaviour of local-as command that changes the AS for remote peers not for local router AS. R2 is not accepting the routes because AS-PATH Splithorizon rule. R2 look its own 65001 AS in AS-PATH hence its not installing the routes in routing table to avoid loop. where in R1 looks prefix originated in R2 from AS 65002 hence its installed in routing table.
You have two workaround to avoid this issue.
1. On R2:- neighbor R0 allowas-in
2. On R0:- neighbor R2 as-override
Regards,
Jitendra
CCIE 22703#
04-05-2011
07:20 AM
- last edited on
03-15-2023
03:03 AM
by
Translator
Hi Jitendra,
i had considered that R2 saw itself par of AS 65001 as the reason for the problem but was left a bit confused by the various ouputs of the show commands. Indeed while the
show ip bgp summary
command that i posted above indicates R2 as part of AS 65001, the
show ip bgp neighbor
command indicates that it's part of AS 65002 :
Switch_sites>sh ip bgp vpnv4 vrf ce_R2 neighbors 10.245.32.2
BGP neighbor is 10.245.32.2, vrf ce_R2, remote AS 6475, local AS 65002 no-prepend replace-as, external link
BGP version 4, remote router ID 3.3.3.3
BGP state = Established, up for 1d00h
Last read 00:00:30, last write 00:00:06, hold time is 180, keepalive interval is 60 seconds
I didn't know which one had precedence but it seems logical as you explained that it's the former.
I will try your two suggestions and post a feedback.
Thanks,
Jad.
04-08-2011 03:26 AM
Just tried it and it works thanks !
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