本文檔介紹如何對配置基本MPLS VPN文檔進行故障排除。我們建議您在使用此檔案之前,先閱讀此示例配置並檢視網路圖。
配置基本MPLS VPN顯示了功能齊全的MPLS主幹網路,這意味著提供商邊緣(PE)路由器能夠通過主幹相互連線。請參閱MPLS驗證和故障排除支援頁面,瞭解有關排除MPLS網路故障的資訊。
建立MPLS VPN之前,您必須能夠從PE路由器B(10.10.10.6)對PE路由器A(10.10.10.4)執行ping,反之亦然。
請記住,VPN路由/轉發例項(VRF)名稱區分大小寫,例如Customer_A與customer_a不同。
本文檔的讀者應熟悉:
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
show ip vrf [vrf-name]命令會顯示目前路由器上存在的所有VRF及其關聯的路由識別器和介面的摘要。
Pesaro# show ip vrf
Name Default RD Interfaces
Customer_A 100:101 Loopback101
Loopback111
Customer_B 100:102 Loopback102
此命令可讓您驗證:
VRF(及其名稱)的配置。
每個路由區分器(RD)在每個相關的PE上都是相同的。
show ip vrf [{detail |介面}] vrf-name 命令顯示有關VRF的詳細配置。
Pesaro# show ip vrf detail Customer_A
VRF Customer_A; default RD 100:101
Interfaces:
Loopback101 Loopback111
Connected addresses are not in global routing table
Export VPN route-target communities
RT:100:1001
Import VPN route-target communities
RT:100:1001
No import route-map
No export route-map
Pesaro# show ip vrf interfaces
Interface IP-Address VRF Protocol
Loopback101 200.0.6.1 Customer_A up
Loopback111 200.1.6.1 Customer_A up
Loopback102 200.0.6.1 Customer_B up
這些命令可用於驗證:
這些連線的地址不在全域性路由表中。
每個VRF的路由屬性。在一側匯出的內容應匯入到其他位置。
介面的介面狀態(和IP地址)。
使用與檢驗全域性路由表所用的命令相同的命令(使用本節所示的副檔名)來檢驗路由表或路由協定資料庫。
要檢查路由表,請將vrf [vrf-name]擴展新增到show ip route命令以驗證路由表,如下所示:
Pescara# show ip route vrf Customer_A
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, L1 - ISIS level-1, L2 - ISIS level-2, ia - ISIS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
B 200.0.6.0/24 [200/0] via 10.10.10.6, 00:42:14
B 200.1.6.0/24 [200/0] via 10.10.10.6, 00:42:14
C 200.0.4.0/24 is directly connected, Loopback101
您還可以使用show ip route vrf Customer_A 1.2.3.4命令驗證特定地址的目標。
邊界網關協定(BGP)用於PE路由器之間,對於站點間連線是必需的。在本範例中,我們使用內部BGP(iBGP)。 您還可以使用外部BGP(eBGP)作為PE-CE路由傳播的外部路由協定。
您可以使用這些命令對BGP進行故障排除:
show ip bgp neighbors
show ip bgp vpnv4 all(或show ip bgp vpnv4 vrf [VRF name])
show ip bgp vpnv4 vrf VRF name tags(此命令特定於VPN/MPLS)
show ip bgp vpnv4 vrf VRF name A.B.C.D
例如:
Pescara# show ip bgp vpnv4 vrf Customer_A BGP table version is 40, local router ID is 10.10.10.4 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:101 (default for vrf Customer_A) *>i200.0.6.0 10.10.10.6 0 100 0 ? *> 200.0.4.0 0.0.0.0 0 32768 ? *>i200.1.6.0 10.10.10.6 0 100 0 ?
如需更多有關疑難排解BGP問題的資訊,請參閱BGP支援頁面。
如果客戶端使用的路由協定不是BGP,您可以使用傳統的show命令,並將它們應用於正確的VRF。
如果使用路由資訊協定(RIP),請使用show ip rip database vrf [VRF name]命令。 例如:
Alcazaba# show ip rip database vrf vrf101
0.0.0.0/0 auto-summary
0.0.0.0/0
[2] via 150.150.0.2, 00:00:12, Ethernet1/1
6.0.0.0/8 auto-summary
6.6.6.6/32 redistributed
[1] via 223.0.0.21,
7.0.0.0/8 auto-summary
7.7.7.0/24
[1] via 150.150.0.2, 00:00:12, Ethernet1/1
10.0.0.0/8 auto-summary
10.0.0.0/8 redistributed
[1] via 125.2.2.2,
10.0.0.0/16
[1] via 150.150.0.2, 00:00:12, Ethernet1/1
10.200.8.0/22
如果使用OSPF,請使用show ip ospf [process-id area-id] database命令並指定正確的進程編號。例如:
Alcazaba# show ip ospf 2 database
OSPF Router with ID (222.0.0.10) (Process ID 2)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
222.0.0.1 222.0.0.1 1364 0x80000013 0x7369 3
222.0.0.10 222.0.0.10 1363 0x80000002 0xFEFE 2
Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
150.150.0.1 222.0.0.10 1363 0x80000001 0xEC6D
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
6.6.6.6 222.0.0.10 1328 0x80000001 0x4967
69.69.0.0 222.0.0.10 1268 0x80000001 0x2427
222.0.0.3 222.0.0.10 1328 0x80000001 0xEEF7
222.0.0.30 222.0.0.10 1268 0x80000001 0x7B5A
此命令可讓您驗證:
如果路由表正確(從客戶的角度),或者路由表中缺少什麼。
BGP啟動並工作(或者您可以看到哪個鄰居缺失)。
MPLS VPN使用兩級標籤堆疊。其中一個標籤用於標識VRF,並設定在兩個PE之間。另一個標籤(位於堆疊頂部)是由標準MPLS網路設定的「主幹」標籤。
您可以使用traceroute VRF [vrf-name] A.B.C.B命令驗證傳輸標籤。
注意:如果主幹路由器配置為傳播並生成IP生存時間(TTL)資訊,則此命令僅適用於MPLS感知traceroute。如需詳細資訊,請參閱mpls ip propagate-ttl 指令上的檔案。
Pesaro# traceroute vrf Customer_B 200.0.4.1 Type escape sequence to abort. Tracing the route to 200.0.4.1 1 10.1.1.21 [MPLS: Labels 25/28 Exp 0] 464 msec 280 msec 308 msec 2 10.1.1.5 [MPLS: Labels 22/28 Exp 0] 236 msec 572 msec 228 msec 3 200.0.4.1 108 msec * 100 msec
由於MPLS/VPN架構,此traceroute中沒有10.1.1.14是正常的。
您可以使用show ip bgp vpnv4 all tags命令獲取更精確的輸出,例如特定VRF的標籤表,例如:
Pescara# show ip bgp vpnv4 all tags Network Next Hop In tag/Out tag Route Distinguisher: 100:101 (Customer_A) 200.0.6.0 10.10.10.6 notag/28 200.0.4.0 0.0.0.0 16/aggregate(Customer_A) 200.1.6.0 10.10.10.6 notag/29 Route Distinguisher: 100:102 (Customer_B) 200.0.6.0 10.10.10.6 notag/30 200.0.4.0 0.0.0.0 28/aggregate(Customer_B)
您還可以使用傳統的show ip cef命令:
Pescara# show ip cef vrf Customer_B detail
IP CEF with switching (Table Version 10), flags=0x0
8 routes, 0 reresolve, 0 unresolved (0 old, 0 new)
46 leaves, 51 nodes, 54640 bytes, 361 inserts, 315 invalidations
0 load sharing elements, 0 bytes, 0 references
universal per-destination load sharing algorithm, id F968AD29
5 CEF resets, 38 revisions of existing leaves
refcounts: 1400 leaf, 1392 node
Adjacency Table has 2 adjacencies
0.0.0.0/32, version 0, receive
200.0.6.0/24, version 9, cached adjacency to Serial0/1.1
0 packets, 0 bytes
tag information set
local tag: VPN-route-head
fast tag rewrite with Se0/1.1, point2point, tags imposed: {20 30}
via 10.10.10.6, 0 dependencies, recursive
next hop 10.1.1.13, Serial0/1.1 via 10.10.10.6/32
valid cached adjacency
tag rewrite with Se0/1.1, point2point, tags imposed: {20 30}
200.0.4.0/24, version 6, attached, connected
0 packets, 0 bytes
tag information set
local tag: 28
via Loopback102, 0 dependencies
valid discard adjacency
tag rewrite with , , tags imposed: {}
200.0.4.0/32, version 4, receive
200.0.4.1/32, version 3, receive
200.0.4.255/32, version 5, receive
224.0.0.0/24, version 2, receive
255.255.255.255/32, version 1, receive
此命令可讓您驗證:
標籤都得到了有效使用。
將(至少)兩個標籤的堆疊用於VPN目標。
您可以使用ping命令驗證VRF是否工作,但是如果您在PE路由器上,則必須指定特定的VRF名稱。
Pescara# ping vrf Customer_A 200.0.6.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 200.0.6.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 176/264/576 ms
| 修訂 | 發佈日期 | 意見 |
|---|---|---|
1.0 |
16-Nov-2007 |
初始版本 |