即使 vrf 路由表中存在路由,也无法在 2 个 CE 路由器之间 ping

网络工程 思科 虚拟专用网 聚光灯 GNSS3 mpls-vpn
2021-07-14 21:45:00

我检查了 vrf 路由表,并且 CE 的网络存在,但我无法从任何地方 ping 它。我将提供 PE 的配置文件和 CE 的配置文件。有任何想法吗?我的拓扑

PE1配置文件(R2)

Current configuration : 1892 bytes
!
version 12.4
!
hostname R2
!
!
ip cef
no ip domain lookup
!
!
ip vrf customer1
 rd 1111:1
 route-target export 1111:1
 route-target import 1111:1
ip tcp synwait-time 5
interface Loopback1
 ip address 2.0.0.1 255.255.255.0
!
interface FastEthernet0/0
 ip vrf forwarding customer1
 ip address 195.160.1.2 255.255.255.252
 duplex half
!
interface FastEthernet1/0
 ip address 192.168.2.1 255.255.255.0
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet1/1
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto
 mpls ip
!
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 redistribute connected
 network 2.0.0.0 0.0.0.255 area 0
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 0
!
router bgp 1111
 no synchronization
 bgp log-neighbor-changes
 neighbor 3.0.0.1 remote-as 1111
 neighbor 3.0.0.1 update-source Loopback1
 no auto-summary
 !
 address-family vpnv4
 neighbor 3.0.0.1 activate
 neighbor 3.0.0.1 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf customer1
 redistribute connected
 no synchronization
 exit-address-family
!
ip route vrf customer1 195.160.1.0 255.255.255.252 192.168.2.1

PE2配置文件(R3)

Current configuration : 1928 bytes
!
version 12.4
!
hostname R3
!
ip cef
no ip domain lookup
!
!
ip vrf customer1
 rd 1111:1
 route-target export 1111:1
 route-target import 1111:1
!
ip tcp synwait-time 5
!
!
interface Loopback1
 ip address 3.0.0.1 255.255.255.0
!
interface FastEthernet0/0
 ip vrf forwarding customer1
 ip address 196.170.2.1 255.255.255.252
 duplex half
!
interface FastEthernet1/0
 ip address 192.168.4.1 255.255.255.0
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet1/1
 ip address 192.168.1.2 255.255.255.0
 duplex auto
 speed auto
 mpls ip
!
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 redistribute connected
 network 3.0.0.0 0.0.0.255 area 0
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.4.0 0.0.0.255 area 0
 network 196.170.2.0 0.0.0.3 area 3
!
router bgp 1111
 no synchronization
 bgp log-neighbor-changes
 neighbor 2.0.0.1 remote-as 1111
 neighbor 2.0.0.1 update-source Loopback1
 no auto-summary
 !
 address-family vpnv4
 neighbor 2.0.0.1 activate
 neighbor 2.0.0.1 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf customer1
 redistribute connected
 no synchronization
 exit-address-family
!
ip route vrf customer1 196.170.2.0 255.255.255.252 192.168.4.1

CE1配置文件(R1)

version 12.4
!
hostname R1
!
ip cef
interface Loopback1
 ip address 1.0.0.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 195.160.1.1 255.255.255.252
 duplex half
ip route 196.170.2.0 255.255.255.252 195.160.1.2

CE2配置文件(R6)

version 12.4
!
hostname R6
!
!
ip cef
no ip domain lookup
ip tcp synwait-time 5
interface Loopback1
 ip address 6.0.0.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 196.170.2.2 255.255.255.252
 duplex half
!
!
interface FastEthernet1/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
ip route 195.160.1.0 255.255.255.252 196.170.2.1
1个回答

195.160.1.0/30在 R2 的 OSPF 中没有网络。您将 R6 的网络连接通告到 OSPF,而不是 R1 的网络连接,因此 OSPF 将没有到 R1 的路由,但它有到 R2 的路由。

这是一个问题,因为您正在通过 R4 和 R5 为另一个网络发送流量,但 R4 和 R5 无法了解此网络。


假设您想使用 iBGP 来通告路由,R5 永远不会通过 iBGP 学习这条路由,因为 iBGP 发言者(R5)无法从另一个 iBGP 发言者(R3 或 R4)学习 iBGP 发起的路由(由 R2 发起),这就是为什么 iBGP需要全网状网络或缓解措施(路由反射器或联盟)。


另外,您为什么使用半双工连接 R1 和 R6?您应该使用自动,除非在需要半双工的特殊情况下。