04-17-2024 02:54 AM
Hi all!
English is not my first language, so I am sorry in advance if my words confused you. I tried my best.
As far as I know, CEs don't have vrf in general, so CEs would use ipv4&ipv6 address family of BGP to form BGP neighbor with PEs and advertise CEs' ipv4 routes to PEs, and PEs use ipv4 vrf XXX & ipv6 vrf XXX address family of BGP to form BGP neighbor relationship with CEs and store the ipv4 routes from CEs in the ipv4 vrf XXX & ipv6 vrf XXX address family. Let's assume R1 is CE, R2 is PE, and R2 uses the ipv4 vrf customer1 address-family to form BGP neighbor with R1; The ipv4 routes that R2 received from R1 would be stored in the R2's ipv4 vrf customer1 address-family of the BGP, right?
But when I run show ip bgp all on PE, all the routes that received form CE are under the BGP vpnv4 section not in a section called ipv4 vrf customer1 unicast, why is that? Does Cisco assume that all the routes in the vrf of PE will advertise to other PEs, so the vpnv4 copies the ipv4 routes in all vrfs into the vpnv4 address-family and uses the name of the vrf (vrf customer1) to distinguish which ipv4 vrf the routes belong to? I also tried the show bgp vpnv4 unicast vrf customer1 neighbors 1.1.1.1 received-routes, why it's vpnv4 unicast not something like ip bgp vrf customoer1?
R2#show ip bgp all
For address family: IPv4 Unicast
For address family: IPv6 Unicast
For address family: VPNv4 Unicast
BGP table version is 248, 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, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 10000:1 (default for vrf customer1)
Network Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/16 1.1.1.1 21 0 10001 ?
Route Distinguisher: 10000:2
*>i 10.4.0.0/16 4.4.4.4 21 0 40001 ?
Thanks!
Solved! Go to Solution.
04-17-2024 08:44 AM
Hello @rookie R ,
the prefixes learned from CE node R1 will be stored both in the AF vrf customer1 as ipv4 routes and as VPNv4 routes in VPNv4 AF.
in VPNv4 the 64 bit RD is placed in front of the 32 bit IPv4 prefix to form the 96 bit VPNv4 NLRI prefix.
Exporting to core and importing from other PE nodes use the route target(s) BGP extended community attribute that is again a 64 bit integer value.
>> Route Distinguisher: 10000:1 (default for vrf customer1)
This is just the router CLI that tells that this RD is associated to vrf customer1 for easy of reading for us human beings.
As noted by @rais you can check a VRF specific BGP table with a different command
show ip bgp vrf customer1
Hope to help
Giuseppe
04-19-2024 08:14 AM
Hi @rookie R ,
> However, R111 itself can not use these routes, such as advertising those to R111's BGP neighbors, right?
This is correct. The route reflector will retain and advertise all of the VPNv4 routes even though it does not have the RT configured locally.
On an ASBR (in the context of interAS option B) you need to configure a special command (no bgp default route-target filter) to tell the ASBR to retain all of the VPNv4 routes.
Regards,
04-17-2024 04:54 AM
The command: show ip bgp all
is being executed in the default vrf. It should be executed with the vrf specified to show routing-table belonging to that vrf. It should be something like:
R2# show ip bgp vrf <vrf-name>
where vrf-name is the name of the vrf R1 is connecting to.
HTH
04-17-2024 08:44 AM
Hello @rookie R ,
the prefixes learned from CE node R1 will be stored both in the AF vrf customer1 as ipv4 routes and as VPNv4 routes in VPNv4 AF.
in VPNv4 the 64 bit RD is placed in front of the 32 bit IPv4 prefix to form the 96 bit VPNv4 NLRI prefix.
Exporting to core and importing from other PE nodes use the route target(s) BGP extended community attribute that is again a 64 bit integer value.
>> Route Distinguisher: 10000:1 (default for vrf customer1)
This is just the router CLI that tells that this RD is associated to vrf customer1 for easy of reading for us human beings.
As noted by @rais you can check a VRF specific BGP table with a different command
show ip bgp vrf customer1
Hope to help
Giuseppe
04-19-2024 12:55 AM
Thanks so much, this question has been bothering me for a while. I thought only the ipv4 routes that need to be sent to other PEs(by configuring the RT import\export) would be stored in the vpnv4 AF, but apparently, I was wrong; all the ipv4 routes would be stored both in the vrf customer1 AF and vpnv4 AF, I got it now.
Would you please answer another question about the router reflector? My understanding about the router reflector is: If R111 is the router reflector, then all the other PEs would send all their BGP routes(all the routes in the show ip bgp all) to R111 no matter what, even if the VRFs in R111 doesn't configure RT. The routes that R111 received because router reflector also stored in the vpnv4 AF, associated with the origin RD of the routes. But R111 couldn't use all the routes because the VRFs in R111 don't configure the right RT. The results show ip bgp all in below, the routes in the section of RD2000:2, there is no associated VRF. This indicates that R111 can only use these for the function of route reflection, that is, to reflect them to other devices. However, R111 itself can not use these routes, such as advertising those to R111's BGP neighbors, right?
R111#show ip bgp all
For address family: IPv4 Unicast
For address family: IPv6 Unicast
For address family: VPNv4 Unicast
Route Distinguisher: 2000:2
*> 10.1.1.1/32 0.0.0.0 0 32768 i
04-19-2024 08:14 AM
Hi @rookie R ,
> However, R111 itself can not use these routes, such as advertising those to R111's BGP neighbors, right?
This is correct. The route reflector will retain and advertise all of the VPNv4 routes even though it does not have the RT configured locally.
On an ASBR (in the context of interAS option B) you need to configure a special command (no bgp default route-target filter) to tell the ASBR to retain all of the VPNv4 routes.
Regards,
04-24-2024 06:33 PM
Thanks so much, and BTW MPLS VPN is so difficult to understand
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