Cisco 路由标记问题

网络工程 思科 路由 路由器 思科-ios 数据包追踪器
2021-07-09 19:51:56

我们已经创建了一个网络,如图所示:

在此处输入图片说明

目标是将 LAN_SW 中的子网/网络进行标记,并将标记的网络被路由器、CPE、PE CORE_P、REMOTE_PE、REMOTE_CPE 识别并最终放入 REMOTE_LAN_SW 的路由表中。

我在 LAND_SW 中用标签 100 标记了 ip prefix-list 7.7.7.7/32。但是,正如您将在 show 命令中看到的那样,eigrp 并未选择该标签。

你能看看配置和显示命令,让我知道我可能出错的地方吗?

核心_P:

interface Ethernet0/0
 description TO PE
 ip address 10.0.0.4 255.255.255.0
 mpls ip
!
interface Ethernet0/2
 description TO RR
 ip address 10.2.0.4 255.255.255.0
 mpls ip
!
interface Ethernet1/1
 description TO REMOTE PE
 ip address 10.1.0.4 255.255.255.0
 mpls ip
!
router ospf 1
!
router ospf 100
 network 10.0.0.0 0.255.255.255 area 0
!
CORE_P#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/11] via 10.0.0.3, 1d22h, Ethernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/11] via 10.2.0.9, 1d22h, Ethernet0/2
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/11] via 10.1.0.5, 1d22h, Ethernet1/1
     10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C       10.0.0.0/24 is directly connected, Ethernet0/0
L       10.0.0.4/32 is directly connected, Ethernet0/0
C       10.1.0.0/24 is directly connected, Ethernet1/1
L       10.1.0.4/32 is directly connected, Ethernet1/1
C       10.2.0.0/24 is directly connected, Ethernet0/2
L       10.2.0.4/32 is directly connected, Ethernet0/2
CORE_P#show ip eigrp topology

CPE:

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0
 description connected to lan_sw
 ip address 192.168.0.2 255.255.255.0
!
interface Ethernet0/1
 description connected to PE
 ip address 100.65.0.2 255.255.255.252
!
router eigrp 100
 network 192.0.0.0 0.255.255.255
 redistribute bgp 65000 metric 100000 100 255 1 1500 route-map BGP_TO_EIGRP
 eigrp router-id 2.2.2.2
!
router bgp 65000
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 timers bgp 10 30
 neighbor 100.65.0.1 remote-as 3549
!
 address-family ipv4
  network 2.2.2.2 mask 255.255.255.255
  redistribute eigrp 100 route-map EIGRP_TO_BGP
  neighbor 100.65.0.1 activate
  neighbor 100.65.0.1 send-community both
  neighbor 100.65.0.1 soft-reconfiguration inbound
  exit-address-family
!
route-map BGP_TO_EIGRP permit 5
 set tag 10
!
route-map EIGRP_TO_BGP deny 5
 match tag 10
!
route-map EIGRP_TO_BGP permit 10
 match tag 100
 set community 65000:100 65000:999
!
route-map EIGRP_TO_BGP permit 20
 match tag 200
 set community 65000:200
!
CPE#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
D EX    1.1.1.1 [170/2585600] via 192.168.0.1, 1d19h, Ethernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     6.0.0.0/32 is subnetted, 1 subnets
B       6.6.6.6 [20/0] via 100.65.0.1, 1d19h
     9.0.0.0/32 is subnetted, 1 subnets
D EX    9.9.9.9 [170/2585600] via 192.168.0.1, 1d19h, Ethernet0/0
     10.0.0.0/30 is subnetted, 1 subnets
D EX    10.0.40.0 [170/2585600] via 192.168.0.1, 1d19h, Ethernet0/0
     50.0.0.0/32 is subnetted, 1 subnets
B       50.50.50.50 [20/0] via 100.65.0.1, 1d19h
     100.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       100.65.0.0/30 is directly connected, Ethernet0/1
L       100.65.0.2/32 is directly connected, Ethernet0/1
B       100.100.100.100/32 [20/0] via 100.65.0.1, 1d19h
     192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.0.0/24 is directly connected, Ethernet0/0
L       192.168.0.2/32 is directly connected, Ethernet0/0
CPE#show ip eigrp topology
EIGRP-IPv4 Topology Table for AS(100)/ID(2.2.2.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
P 50.50.50.50/32, 1 successors, FD is 51200, tag is 10
        via Redistributed (51200/0)
P 100.100.100.100/32, 1 successors, FD is 51200, tag is 10
        via Redistributed (51200/0)
P 192.168.0.0/24, 1 successors, FD is 281600
        via Connected, Ethernet0/0
P 10.0.40.0/30, 1 successors, FD is 2585600, tag is 100
       via 192.168.0.1 (2585600/2560000), Ethernet0/0
P 2.2.2.2/32, 1 successors, FD is 51200, tag is 10
       via Redistributed (51200/0)
P 6.6.6.6/32, 1 successors, FD is 51200, tag is 10
       via Redistributed (51200/0)
P 1.1.1.1/32, 1 successors, FD is 2585600, tag is 100
       via 192.168.0.1 (2585600/2560000), Ethernet0/0
P 9.9.9.9/32, 1 successors, FD is 2585600, tag is 100
       via 192.168.0.1 (2585600/2560000), Ethernet0/0

LAN_SW:

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Loopback999
 ip address 9.9.9.9 255.255.255.255
!
interface Ethernet0/0
 description connected to CPE
 no switchport
 ip address 192.168.0.1 255.255.255.0
 duplex auto
!
interface Ethernet0/2
 description connected to REMOTE_LAN_SW
 no switchport
 ip address 10.0.40.1 255.255.255.252
 duplex auto
!
router eigrp 100
 network 10.9.1.32 0.0.0.31
 network 192.168.0.0
 redistribute connected metric 1000 0 255 1 1500 route-map TAG
 redistribute bgp 500 metric 1000 0 255 1 1500 route-map BGP-TO-EIGRP
!
router bgp 500
 bgp router-id 9.9.9.9
 bgp log-neighbor-changes
 neighbor 10.0.40.2 remote-as 600
!
 address-family ipv4
  redistribute connected
  redistribute eigrp 100 route-map EIGRP-TO-BGP
  neighbor 10.0.40.2 activate
  neighbor 10.0.40.2 soft-reconfiguration inbound
  exit-address-family
!
ip prefix-list TAG seq 5 permit 7.7.7.7/32
!
route-map EIGRP-TO-BGP permit 10
!
route-map BGP-TO-EIGRP permit 10
 match ip address prefix-list TAG
 set tag 555
!
route-map TAG permit 10
 set tag 100
!
LAN_SW#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

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
     2.0.0.0/32 is subnetted, 1 subnets
D EX    2.2.2.2 [170/307200] via 192.168.0.2, 1d19h, Ethernet0/0
     6.0.0.0/32 is subnetted, 1 subnets
B       6.6.6.6 [20/307200] via 10.0.40.2, 1d19h
     9.0.0.0/32 is subnetted, 1 subnets
C       9.9.9.9 is directly connected, Loopback999
     10.0.0.0/8 is variably subnetted, 3 subnets, 3 masks
C       10.0.40.0/30 is directly connected, Ethernet0/2
L       10.0.40.1/32 is directly connected, Ethernet0/2
B       10.9.1.0/27 [20/0] via 10.0.40.2, 1d19h
     50.0.0.0/32 is subnetted, 1 subnets
B       50.50.50.50 [20/0] via 10.0.40.2, 1d19h
     100.0.0.0/32 is subnetted, 1 subnets
B       100.100.100.100 [20/307200] via 10.0.40.2, 1d19h
     192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.0.0/24 is directly connected, Ethernet0/0
L       192.168.0.1/32 is directly connected, Ethernet0/0
LAN_SW#show ip eigrp topology
EIGRP-IPv4 Topology Table for AS(100)/ID(9.9.9.9)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
P 50.50.50.50/32, 0 successors, FD is Inaccessible, tag is 10
        via 192.168.0.2 (307200/51200), Ethernet0/0
P 100.100.100.100/32, 0 successors, FD is Inaccessible, tag is 10
        via 192.168.0.2 (307200/51200), Ethernet0/0
P 192.168.0.0/24, 1 successors, FD is 281600
        via Connected, Ethernet0/0
P 10.0.40.0/30, 1 successors, FD is 281600, tag is 100
        via Rconnected (2560000/0)
P 2.2.2.2/32, 1 successors, FD is 307200, tag is 10
        via 192.168.0.2 (307200/51200), Ethernet0/0
P 6.6.6.6/32, 0 successors, FD is Inaccessible, tag is 10
        via 192.168.0.2 (307200/51200), Ethernet0/0
P 1.1.1.1/32, 1 successors, FD is 128256, tag is 100
        via Rconnected (2560000/0)
P 9.9.9.9/32, 1 successors, FD is 128256, tag is 100
        via Rconnected (2560000/0)

体育:

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
 ip ospf 100 area 0
!
interface Ethernet0/0
 description connected to core_p
 ip address 10.0.0.3 255.255.255.0
 mpls ip
!
interface Ethernet0/1
 description connected to cpe
 ip vrf forwarding JM_CORP
 ip address 100.65.0.1 255.255.255.252
!
router ospf 100
 network 3.3.3.3 0.0.0.0 area 0
 network 10.0.0.0 0.255.255.255 area 0
!
router bgp 3549
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 timers bgp 10 30
 neighbor 4.4.4.4 remote-as 3549
 neighbor 4.4.4.4 update-source Loopback0
!
 address-family ipv4
  network 3.3.3.3 mask 255.255.255.255
  redistribute connected
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community both
  neighbor 4.4.4.4 next-hop-self
  exit-address-family
!
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community both
  neighbor 4.4.4.4 next-hop-self
  exit-address-family
!
 address-family ipv4 vrf JM_CORP
  neighbor 100.65.0.2 remote-as 65000
  neighbor 100.65.0.2 activate
  neighbor 100.65.0.2 send-community both
  neighbor 100.65.0.2 as-override
  neighbor 100.65.0.2 soft-reconfiguration inbound
  neighbor 100.65.0.2 route-map BGP_POLICY_IN in
  exit-address-family
!
ip community-list standard REGIONAL_LP_100 permit 65000:100
ip community-list standard REGIONAL_LP_200 permit 65000:200
ip community-list standard REGIONAL_LP_300 permit 65000:300
!
route-map BGP_POLICY_IN permit 10
 match community REGIONAL_LP_100
 set local-preference 333
!
route-map BGP_POLICY_IN permit 20
 match community REGIONAL_LP_200
 set local-preference 200
!
route-map BGP_POLICY_IN permit 30
 match community REGIONAL_LP_300
 set local-preference 300
!
route-map BGP_POLICY_IN permit 40
!
PE#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/21] via 10.0.0.4, 1d22h, Ethernet0/0
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/21] via 10.0.0.4, 1d22h, Ethernet0/0
     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       10.0.0.0/24 is directly connected, Ethernet0/0
L       10.0.0.3/32 is directly connected, Ethernet0/0
O       10.1.0.0/24 [110/20] via 10.0.0.4, 1d22h, Ethernet0/0
O       10.2.0.0/24 [110/20] via 10.0.0.4, 1d22h, Ethernet0/0
PE#show ip eigrp topology

REMOTE_CPE:

interface Loopback0
 ip address 6.6.6.6 255.255.255.255
!
interface Ethernet0/0
 description connected to remote_lan_swith
 ip address 10.9.1.11 255.255.255.224
!
interface Ethernet0/1
 description connected to remote_pe
 ip address 100.65.1.2 255.255.255.252
!
router eigrp 100
 network 10.9.1.0 0.0.0.31
 network 192.0.0.0 0.255.255.255
 redistribute bgp 65000 metric 100000 100 255 1 1500 route-map BGP_TO_EIGRP
 eigrp router-id 6.6.6.6
!
router bgp 65000
 bgp router-id 6.6.6.6
 bgp log-neighbor-changes
 timers bgp 10 30
 neighbor 100.65.1.1 remote-as 3549
!
 address-family ipv4
  network 6.6.6.6 mask 255.255.255.255
  redistribute eigrp 100 route-map EIGRP_TO_BGP
  neighbor 100.65.1.1 activate
  neighbor 100.65.1.1 send-community both
  neighbor 100.65.1.1 soft-reconfiguration inbound
  exit-address-family
!
route-map BGP_TO_EIGRP permit 5
 set tag 10
!
route-map EIGRP_TO_BGP deny 5
 match tag 10
!
route-map EIGRP_TO_BGP permit 10
 match tag 100
 set community 65000:100
!
route-map EIGRP_TO_BGP permit 20
 match tag 200
 set community 65000:200
!
REMOTE_CPE#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
B       1.1.1.1 [20/0] via 100.65.1.1, 1d19h
     2.0.0.0/32 is subnetted, 1 subnets
B       2.2.2.2 [20/0] via 100.65.1.1, 1d19h
     6.0.0.0/32 is subnetted, 1 subnets
C       6.6.6.6 is directly connected, Loopback0
     9.0.0.0/32 is subnetted, 1 subnets
B       9.9.9.9 [20/0] via 100.65.1.1, 1d19h
     10.0.0.0/8 is variably subnetted, 3 subnets, 3 masks
D EX    10.0.40.0/30 [170/307200] via 10.9.1.1, 1d19h, Ethernet0/0
C       10.9.1.0/27 is directly connected, Ethernet0/0
L       10.9.1.11/32 is directly connected, Ethernet0/0
     50.0.0.0/32 is subnetted, 1 subnets
D EX    50.50.50.50 [170/409600] via 10.9.1.1, 1d21h, Ethernet0/0
     100.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       100.65.1.0/30 is directly connected, Ethernet0/1
L       100.65.1.2/32 is directly connected, Ethernet0/1
B       100.100.100.100/32 [20/0] via 100.65.1.1, 1d22h
REMOTE_CPE#show ip eigrp topology
EIGRP-IPv4 Topology Table for AS(100)/ID(6.6.6.6)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
P 10.9.1.0/27, 1 successors, FD is 281600
        via Connected, Ethernet0/0
P 50.50.50.50/32, 1 successors, FD is 409600, tag is 200
        via 10.9.1.1 (409600/128256), Ethernet0/0
P 100.100.100.100/32, 1 successors, FD is 51200, tag is 10
        via Redistributed (51200/0)
P 10.0.40.0/30, 1 successors, FD is 307200, tag is 200
        via 10.9.1.1 (307200/281600), Ethernet0/0
P 2.2.2.2/32, 1 successors, FD is 51200, tag is 10
        via Redistributed (51200/0)
P 6.6.6.6/32, 1 successors, FD is 51200, tag is 10
        via Redistributed (51200/0)
P 1.1.1.1/32, 1 successors, FD is 51200, tag is 10
        via Redistributed (51200/0)
P 9.9.9.9/32, 1 successors, FD is 51200, tag is 10
        via Redistributed (51200/0)

REMOTE_LAN_SWITCH:

interface Loopback0
 ip address 50.50.50.50 255.255.255.255
!
interface Ethernet0/0
 description connected remote_cpe
 no switchport
 ip address 10.9.1.1 255.255.255.224
 duplex auto
!
interface Ethernet0/2
 description connected to LAN_sw
 no switchport
 ip address 10.0.40.2 255.255.255.252
 duplex auto
!
router eigrp 100
 network 10.9.1.0 0.0.0.31
 network 192.0.0.0 0.255.255.255
 redistribute connected route-map TAG
!
router bgp 600
 bgp router-id 50.50.50.50
 bgp log-neighbor-changes
 neighbor 10.0.40.1 remote-as 500
!
 address-family ipv4
  redistribute connected
  redistribute eigrp 100 route-map EIGRP-TO-BGP
  neighbor 10.0.40.1 activate
  exit-address-family
!
route-map EIGRP-TO-BGP permit 10
!
route-map BGP-TO-EIGRP permit 10
!
route-map TAG permit 10
set tag 200
!
REMOTE_LAN_SWITCH#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
B       1.1.1.1 [20/0] via 10.0.40.1, 1d19h
     2.0.0.0/32 is subnetted, 1 subnets
B       2.2.2.2 [20/307200] via 10.0.40.1, 1d19h
     6.0.0.0/32 is subnetted, 1 subnets
D EX    6.6.6.6 [170/307200] via 10.9.1.11, 1d19h, Ethernet0/0
     9.0.0.0/32 is subnetted, 1 subnets
B       9.9.9.9 [20/0] via 10.0.40.1, 1d19h
     10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks
C       10.0.40.0/30 is directly connected, Ethernet0/2
L       10.0.40.2/32 is directly connected, Ethernet0/2
C       10.9.1.0/27 is directly connected, Ethernet0/0
L       10.9.1.1/32 is directly connected, Ethernet0/0
     50.0.0.0/32 is subnetted, 1 subnets
C       50.50.50.50 is directly connected, Loopback0
     100.0.0.0/32 is subnetted, 1 subnets
D EX    100.100.100.100 [170/307200] via 10.9.1.11, 1d19h, Ethernet0/0
B       192.168.0.0/24 [20/0] via 10.0.40.1, 1d19h
REMOTE_LAN_SWITCH#show ip eigrp topology
EIGRP-IPv4 Topology Table for AS(100)/ID(50.50.50.50)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
P 10.9.1.0/27, 1 successors, FD is 281600
        via Connected, Ethernet0/0
P 50.50.50.50/32, 1 successors, FD is 128256, tag is 200
        via Rconnected (128256/0)
P 100.100.100.100/32, 1 successors, FD is 307200, tag is 10
        via 10.9.1.11 (307200/51200), Ethernet0/0
P 10.0.40.0/30, 1 successors, FD is 281600, tag is 200
        via Rconnected (281600/0)
P 2.2.2.2/32, 0 successors, FD is Inaccessible, tag is 10
        via 10.9.1.11 (307200/51200), Ethernet0/0
P 6.6.6.6/32, 1 successors, FD is 307200, tag is 10
        via 10.9.1.11 (307200/51200), Ethernet0/0
P 1.1.1.1/32, 0 successors, FD is Inaccessible, tag is 10
        via 10.9.1.11 (307200/51200), Ethernet0/0
P 9.9.9.9/32, 0 successors, FD is Inaccessible, tag is 10
        via 10.9.1.11 (307200/51200), Ethernet0/0

REMOTE_PE:

interface Loopback0
 ip address 5.5.5.5 255.255.255.255
 ip ospf 100 area 0
!
interface Ethernet0/1
 description connected to remote_cpe
 ip vrf forwarding JM_CORP
 ip address 100.65.1.1 255.255.255.252
!
router ospf 100
 network 5.5.5.5 0.0.0.0 area 0
 network 10.0.0.0 0.255.255.255 area 0
!
router bgp 3549
 bgp router-id 5.5.5.5
 bgp log-neighbor-changes
 timers bgp 10 30
 neighbor 4.4.4.4 remote-as 3549
 neighbor 4.4.4.4 update-source Loopback0
!
 address-family ipv4
  network 5.5.5.5 mask 255.255.255.255
  redistribute connected
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community both
  neighbor 4.4.4.4 next-hop-self
  exit-address-family
!
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community both
  neighbor 4.4.4.4 next-hop-self
  exit-address-family
!
 address-family ipv4 vrf JM_CORP
  redistribute static
  neighbor 100.65.1.2 remote-as 65000
  neighbor 100.65.1.2 activate
  neighbor 100.65.1.2 send-community both
  neighbor 100.65.1.2 as-override
  neighbor 100.65.1.2 soft-reconfiguration inbound
  neighbor 100.65.1.2 route-map BGP_POLICY_IN in
  exit-address-family
!
ip route vrf JM_CORP 100.100.100.100 255.255.255.255 Null0
!
route-map BGP_POLICY_IN permit 10
 match community REGIONAL_LP_100
 set local-preference 100
!
route-map BGP_POLICY_IN permit 20
 match community REGIONAL_LP_200
 set local-preference 200
!
route-map BGP_POLICY_IN permit 30
 match community REGIONAL_LP_300
 set local-preference 300
!
route-map BGP_POLICY_IN permit 40
!
REMOTE_PE#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/21] via 10.1.0.4, 1d22h, Ethernet1/1
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/21] via 10.1.0.4, 1d22h, Ethernet1/1
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback0
     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O       10.0.0.0/24 [110/20] via 10.1.0.4, 1d22h, Ethernet1/1
C       10.1.0.0/24 is directly connected, Ethernet1/1
L       10.1.0.5/32 is directly connected, Ethernet1/1
O       10.2.0.0/24 [110/20] via 10.1.0.4, 1d22h, Ethernet1/1
REMOTE_PE#show ip eigrp topology

资源:

interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Ethernet0/2
 description connected to CORE_P
 ip address 10.2.0.9 255.255.255.0
!
router ospf 100
 network 4.4.4.4 0.0.0.0 area 0
 network 10.0.0.0 0.255.255.255 area 0
!
router bgp 3549
 bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 3549
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 5.5.5.5 remote-as 3549
 neighbor 5.5.5.5 update-source Loopback0
!
 address-family ipv4
  neighbor 3.3.3.3 activate
  neighbor 3.3.3.3 send-community both
  neighbor 3.3.3.3 route-reflector-client
  neighbor 5.5.5.5 activate
  neighbor 5.5.5.5 send-community both
  neighbor 5.5.5.5 route-reflector-client
  exit-address-family
!
 address-family vpnv4
  neighbor 3.3.3.3 activate
  neighbor 3.3.3.3 send-community both
  neighbor 3.3.3.3 route-reflector-client
  neighbor 5.5.5.5 activate
  neighbor 5.5.5.5 send-community both
  neighbor 5.5.5.5 route-reflector-client
  exit-address-family
!
RR#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/21] via 10.2.0.4, 1d22h, Ethernet0/2
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/21] via 10.2.0.4, 1d22h, Ethernet0/2
     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O       10.0.0.0/24 [110/20] via 10.2.0.4, 1d22h, Ethernet0/2
O       10.1.0.0/24 [110/20] via 10.2.0.4, 1d22h, Ethernet0/2
C       10.2.0.0/24 is directly connected, Ethernet0/2
L       10.2.0.9/32 is directly connected, Ethernet0/2
RR#show ip eigrp topology
1个回答

你有一些问题:

  • 您在标记10.0.40.0/30100上LAN_SW,但是没有 7.7.7.7/32任何地方,所以你永远不会标记,路线
  • 您正在REMOTE_LAN_SWITCH 上10.0.40.0/30with重写标签200
  • 标签10010.0.40.0/30从LAN_SW去CPE,但你不CPE和PE之间运行EIGRP,所以10.0.40.0/30与标签100被那些路由器之间下降了,而你似乎想从EIGRP再分配到BGP在CPE,但你必须与BGP问题CPE和PE,将来自CPE的路由放入一个无处可去的VRF,所以10.0.40.0/30永远不会去PE

您需要一次使用一个路由器,并确保在链路上的两个路由器之间通告您认为应该使用的路由。