我已经构建了一个 MultiVRF 测试场景,它按预期工作,但我的问题是,如何?
这是一个棘手的场景,CE 和 PE 之间的 VRF 具有不同的 RT 和 RD。
这是配置
R1:
ip vrf RED
rd 65000:1
route-target export 65000:1
route-target import 65000:1
!
interface Loopback900
ip vrf forwarding RED
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0.900
encapsulation dot1Q 900
ip vrf forwarding RED
ip address 192.168.0.2 255.255.255.252
!
router bgp 65000
address-family ipv4 vrf RED
neighbor 192.168.0.1 remote-as 3352
neighbor 192.168.0.1 activate
neighbor 192.168.0.1 send-community extended
no synchronization
network 1.1.1.1 mask 255.255.255.255
exit-address-family
R2:
ip vrf RED
rd 3352:50
route-target export 3352:50
route-target import 3352:50
!
interface Loopback900
ip vrf forwarding RED
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0.900
encapsulation dot1Q 900
ip vrf forwarding RED
ip address 192.168.0.1 255.255.255.252
!
address-family ipv4 vrf RED
neighbor 192.168.0.2 remote-as 65000
neighbor 192.168.0.2 activate
neighbor 192.168.0.2 send-community extended
no synchronization
network 2.2.2.2 mask 255.255.255.255
exit-address-family
!
R1#sh ip bgp vpnv4 all 2.2.2.2
BGP routing table entry for 65000:1:2.2.2.2/32, version 6
Paths: (1 available, best #1, table RED)
Flag: 0x820
Not advertised to any peer
3352
192.168.0.1 from 192.168.0.1 (2.2.2.2)
Origin IGP, metric 0, localpref 100, valid, external, best
Extended Community: **RT:65000:1**
mpls labels in/out 16/nolabel
R1#ping vrf RED 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/36 ms
R2#sh ip bgp vpnv4 all 1.1.1.1
BGP routing table entry for 3352:50:1.1.1.1/32, version 5
Paths: (1 available, best #1, table RED)
Flag: 0x820
Not advertised to any peer 65000
192.168.0.2 from 192.168.0.2 (172.16.1.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Extended Community: RT:3352:50
mpls labels in/out 18/nolabel
因此,从 R2 的角度来看,我看到 1.1.1.1 具有 3352:50,即使 R1 正在导出具有 65000:1 的路由。
为什么我在每台路由器上都看到带有自己的 RD 和 RT 的 vpn4 路由?
也许我缺少一些明显的东西,但我似乎找不到答案。