我正在我的实验室中进行一些测试,为 CCIE R&S 做准备,我正在深入研究 MPLS 的工作原理,但遇到了获取 traceroute 以在其输出中显示标签路径的问题。我还没有发现为什么这不起作用。
我可以在 CE 之间 ping 得很好。
这是设置。
CE1 - PE1 - P1 - P2 - PE2 - CE2
P1/P2 只为区域 0 启用了 OSPF 和 OSPF mpls 自动配置
CE-PE协议是BGP
这是 PE2 BGP 配置:
router bgp 100
bgp router-id 80.2.2.2
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 80.1.1.1 remote-as 100
neighbor 80.1.1.1 update-source Loopback0
!
address-family ipv4
redistribute ospf 1
neighbor 80.1.1.1 activate
neighbor 80.1.1.1 send-community
exit-address-family
!
address-family vpnv4
neighbor 80.1.1.1 activate
neighbor 80.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf CPE2
redistribute connected
redistribute ospf 1010
neighbor 192.168.99.20 remote-as 20
neighbor 192.168.99.20 activate
neighbor 192.168.99.20 next-hop-self
exit-address-family
IP VRF:
ip vrf CPE2
rd 20:20
route-target export 200:200
route-target export 700:700
route-target import 100:100
route-target import 700:700
这是显示命令
PE2#show ip bgp vpnv4 vrf CPE2
BGP table version is 31, local router ID is 80.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: 20:20 (default for vrf CPE2)
*>i 192.168.1.0 80.1.1.1 0 100 0 ?
*>i 192.168.10.0 80.1.1.1 0 100 0 10 ?
*> 192.168.20.0 192.168.99.20 0 0 20 ?
*> 192.168.99.0 0.0.0.0 0 32768 ?
* 192.168.99.20 0 0 20 ?
*>i 192.168.100.1/32 80.1.1.1 0 100 0 10 ?
*> 192.168.100.2/32 192.168.99.20 0 0 20 ?
这是 mpls 转发表
PE2# show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
1200 Pop Label 10.1.2.2/32 0 Et0/0 10.50.1.2
1201 Pop Label 10.10.10.0/24 0 Et0/0 10.50.1.2
1202 Pop Label 10.10.8.0/24 0 Et0/0 10.50.1.2
1203 Pop Label 10.10.7.0/24 0 Et0/0 10.50.1.2
1204 Pop Label 10.10.2.0/24 0 Et0/0 10.50.1.2
1205 Pop Label 10.10.1.0/24 0 Et0/0 10.50.1.2
1206 202 80.1.1.1/32 0 Et0/0 10.50.1.2
1207 203 10.1.1.1/32 0 Et0/0 10.50.1.2
1208 204 10.40.2.0/24 0 Et0/0 10.50.1.2
1209 205 10.10.9.0/24 0 Et0/0 10.50.1.2
1210 206 10.10.6.0/24 0 Et0/0 10.50.1.2
1211 207 10.10.5.0/24 0 Et0/0 10.50.1.2
1212 208 10.40.1.0/24 0 Et0/0 10.50.1.2
1213 No Label 192.168.20.0/24[V] \
0 Et1/0 192.168.99.20
1214 No Label 192.168.99.0/24[V] \
3420 aggregate/CPE2
1215 No Label 192.168.100.2/32[V] \
696 Et1/0 192.168.99.20
PE2# show ip bgp vpnv4 vrf CPE2 192.168.100.2
BGP routing table entry for 20:20:192.168.100.2/32, version 12
Paths: (1 available, best #1, table CPE2)
Advertised to update-groups:
3
Refresh Epoch 2
20
192.168.99.20 from 192.168.99.20 (192.168.100.2)
Origin incomplete, metric 0, localpref 100, valid, external, best
Extended Community: RT:200:200 RT:700:700
mpls labels in/out 1215/nolabel
rx pathid: 0, tx pathid: 0x0
CPE2#traceroute 192.168.100.1 source lo0
Type escape sequence to abort.
Tracing the route to 192.168.100.1
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.99.2 1 msec 0 msec 0 msec
2 * * *
3 * * *
4 * * *
5 192.168.1.111 [AS 100] 1 msec * 0 msec
CE1 / CE2 的环回是 192.168.100.1 和 192.168.100.2 所以你看到我有 192.168.100.2 的本地标签 - 这是从 PE2-> CE2 非 mpls - 但我没有看到的是标签192.168.100.1 将通过 P 路由器。BGP 指向 8.1.1.1 并且具有标签。
这是否正常 - 或者我是否必须进行一些更改才能让路由器为每条路由创建标签 - 也许我在这里遗漏了一些点。
- 本尼