本文档提供了Cisco 12000千兆位交换路由器(GSR)上ATM多协议标签交换(MPLS)虚拟专用网(VPN)、SONET/SDH分组(POS)和空间复用协议(SRP)的示例配置。
本文档中使用了这些首字母缩略词。
CE -客户边缘路由器
PE — 提供商边缘路由器
P — 提供商核心路由器
VRF — 虚拟路由和转发
尝试此配置之前,请确保满足以下要求:
MPLS和MPLS VPN功能的基本知识。
本文档中的信息基于以下软件和硬件版本:
P 和 PE 路由器
所有路由器上的思科IOS®软件版本12.0(28)S
思科GSR 12000系列路由器
CE路由器
所有路由器上的思科IOS软件版本12.0(28)S
思科7200VXR路由器
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
此配置还可用于提供商(P)核心支持的以下路由器平台:
Cisco7200
Cisco 7500
Cisco 7600
Cisco 8500
Cisco 10000
Cisco 10700
Cisco 12000
此配置还可用于提供商边缘(PE)支持的以下路由器平台:
Cisco 3600
Cisco 3700
Cisco7200
Cisco 7500
Cisco 7600
Cisco 8500
Cisco 10000
Cisco 10700
Cisco 12000
注意:Cisco 3700/3600路由器不支持POS和SRP模块。3600以下的任何平台都不支持MPLS配置。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
MPLS可用于支持多个物理接口。这些接口包括ATM、POS和SRP。由于这些接口支持高带宽,因此通常用于主干连接。MPLS VPN功能使服务提供商无需在客户端使用ATM、POS或SRP,即可互联多个站点。
MPLS over ATM有两种实施方式。一种是使用虚拟路径标识符(VPI)和虚拟信道标识(VCI)作为标签,也称为基于信元的MPLS over ATM。此实施在RFC 3035下记录 。第二个ATM实施是使用MPLS“shim header”,也称为基于数据包的MPLS over ATM。此填充码报头插入在第2层和第3层报头之间。填充码报头的格式记录在RFC 3032下 。此示例配置基于ATM接口的“填充报头”实施。
同步光纤网络/同步数字层次结构(SONET/SDH)上的数据包是一种将IP层直接置于SONET层之上的技术。它消除了在SONET上通过ATM运行IP所需的开销。POS支持多种封装格式。这些是PPP、HDLC和帧中继。填充报头用于提供MPLS支持。此示例配置在Cisco POS接口上使用默认的HDLC封装。
空间重用协议(SRP)是第2层技术,在第2层级别提供恢复能力。它还在SONET/SDH上运行。MPLS支持由填充报头实施提供。
本部分提供有关如何配置本文档所述功能的信息。
注:要查找有关本文档中使用的命令的其他信息,请使用命令查找工具(仅注册客户)。
本文档使用以下网络设置:
下面列出了在示例配置中考虑的一些事项:
MPLS VPN配置服务示例EIGRP路由来自CE。Cisco Bug ID CSCds09932(仅限注册客户)引入了对MPLS VPN的EIGRP支持,Cisco IOS软件版本为12.0(22)S。从Cisco IOS软件版本12.2(15)T开始,已通过Cisco Bug ID CSCdx26186(仅注册客户)将此漏洞移植到Cisco IOS软件版本12.2(15)T。不支持将同一VRF应用到多个EIGRP实例,因此可能导致路由器崩溃。此问题的检查后来与Cisco Bug ID CSCdz40426(仅限注册客户)集成在一起。 有关对EIGRP的MPLS VPN支持的详细信息,请参阅MPLS VPN支持在提供商边缘和客户边缘之间实现EIGRP。
两台CE路由器上的EIGRP自治系统相同。两台PE路由器上的BGP自治系统相同。
MPLS主干基于POS、ATM和SRP接口,并配置了开放最短路径优先(OSPF)和MP-BGP。PE和CE之间的连接是快速以太网。
本文档使用以下配置:
CE(1) |
---|
! version 12.0 ! ip cef !--- CEF is not required on the CE because there is no MPLS configuration. !--- CEF is the fastest switching algorithm on Cisco routers !--- and it is best to leave it enabled. ! ! interface Loopback0 ip address 11.1.1.1 255.255.255.0 ! interface Loopback1 ip address 11.2.1.1 255.255.255.0 ! interface Loopback2 ip address 11.3.1.1 255.255.255.0 ! interface FastEthernet2/0 ip address 192.168.2.2 255.255.255.252 ! router eigrp 100 network 11.0.0.0 network 192.168.2.0 no auto-summary ! ip classless |
PE(1) |
---|
! version 12.0 ! !--- CEF is enabled by default on GSR. . ! ip vrf Customer_A rd 100:1 route-target export 100:1 route-target import 100:1 !--- Enables the VPN routing and forwarding (VRF) routing table. ! interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface FastEthernet0/0 ip vrf forwarding Customer_A !--- Associates a VRF instance with an interface or subinterface. ip address 192.168.2.1 255.255.255.252 ! interface POS4/0 ip address 10.0.0.1 255.255.255.252 tag-switching ip !--- Enables dynamic Label Switching of IPv4 packets on an interface. !--- At minimum, this is all you need to configure MPLS over POS. !--- Note the default encapsulation of POS interfaces is HDLC. !--- An mpls ip command can also be used instead of tag-switching ip. crc 32 clock source internal ! ! router eigrp 1 ! address-family ipv4 vrf Customer_A redistribute bgp 100 metric 10000 1 255 1 1500 network 192.168.2.0 no auto-summary autonomous-system 100 !--- The autonomous-system 100 must match the AS used on the CE. !--- The bgp must be redistributed with metric. The default-metric !--- command can also be used. exit-address-family ! router ospf 1 log-adjacency-changes network 1.1.1.1 0.0.0.0 area 0 network 10.0.0.1 0.0.0.0 area 0 ! router bgp 100 bgp log-neighbor-changes neighbor 4.4.4.4 remote-as 100 neighbor 4.4.4.4 update-source Loopback0 ! address-family vpnv4 neighbor 4.4.4.4 activate neighbor 4.4.4.4 send-community both exit-address-family ! address-family ipv4 vrf Customer_A redistribute eigrp 100 !--- The EIGRP AS 100 must be redistributed to the BGP vrf instance. no auto-summary no synchronization exit-address-family ! ip classless |
P(1) |
---|
! version 12.0 ! ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface POS2/0 ip address 10.0.0.2 255.255.255.252 tag-switching ip !--- This enables MPLS over POS. crc 32 ! ! interface ATM6/0 no ip address ! interface ATM6/0.100 point-to-point ip address 10.1.1.1 255.255.255.252 tag-switching ip pvc 0/100 ! !--- This enables "packet-based" MPLS over ATM. ! router ospf 1 log-adjacency-changes network 2.2.2.2 0.0.0.0 area 0 network 10.0.0.2 0.0.0.0 area 0 network 10.1.1.1 0.0.0.0 area 0 ! ip classless |
P(2) |
---|
! version 12.0 ! ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface ATM4/0 no ip address ! interface ATM4/0.100 point-to-point ip address 10.1.1.2 255.255.255.252 tag-switching ip pvc 0/100 !--- This enables "packet-based" MPLS over ATM. ! ! interface SRP5/0 ip address 10.2.2.1 255.255.255.252 no ip directed-broadcast tag-switching ip !--- This enables MPLS over SRP. ! router ospf 1 log-adjacency-changes network 3.3.3.3 0.0.0.0 area 0 network 10.1.1.2 0.0.0.0 area 0 network 10.2.2.1 0.0.0.0 area 0 ! ip classless |
PE(2) |
---|
! version 12.0 ! ! ip vrf Customer_A rd 100:1 route-target export 100:1 route-target import 100:1 ! ! interface Loopback0 ip address 4.4.4.4 255.255.255.255 ! interface SRP4/0 ip address 10.2.2.2 255.255.255.252 tag-switching ip !--- This enables MPLS over SRP. ! interface FastEthernet6/0 ip vrf forwarding Customer_A !--- Associates a VRF instance with an interface or subinterface. ip address 192.168.1.1 255.255.255.252 ! ! router eigrp 1 ! address-family ipv4 vrf Customer_A redistribute bgp 100 metric 10000 1 255 1 1500 network 192.168.1.0 no auto-summary autonomous-system 100 exit-address-family !--- The autonomous-system 100 must match the AS used on the CE. !--- The bgp must be redistributed with metric. The default-metric !--- command can also be used. ! router ospf 1 log-adjacency-changes network 4.4.4.4 0.0.0.0 area 0 network 10.2.2.2 0.0.0.0 area 0 ! router bgp 100 bgp log-neighbor-changes neighbor 1.1.1.1 remote-as 100 neighbor 1.1.1.1 update-source Loopback0 ! address-family vpnv4 neighbor 1.1.1.1 activate neighbor 1.1.1.1 send-community both exit-address-family ! address-family ipv4 vrf Customer_A redistribute eigrp 100 !--- The EIGRP AS 100 must be redistributed to the BGP vrf instance. no auto-summary no synchronization exit-address-family ! ip classless |
CE(2) |
---|
! version 12.0 ! ip cef !--- CEF is not required on the CE because there is no MPLS configuration. !--- CEF is the fastest switching algorithm on Cisco routers so it is !--- best to leave it enabled. ! ! interface Loopback0 ip address 22.1.1.1 255.255.255.0 ! interface Loopback1 ip address 22.2.1.1 255.255.255.0 ! interface Loopback2 ip address 22.3.1.1 255.255.255.0 ! interface FastEthernet2/0 ip address 192.168.1.2 255.255.255.252 ! ! router eigrp 100 network 22.0.0.0 network 192.168.1.0 no auto-summary ! |
本部分所提供的信息可用于确认您的配置是否正常工作。
命令输出解释程序工具(仅限注册用户)支持某些 show 命令,使用此工具可以查看对 show 命令输出的分析。
show ip vrf — 验证是否存在正确的 VRF。
show ip route vrf Customer_A — 验证关于 PE 路由器的路由信息。
ping vrf Customer_A <ip address> — 通过发送ICMP数据包验证连接。
traceroute vrf Customer_A <ip address> — 验证PE路由器上的路由信息。
show ip eigrp vrf Customer_A neighbors — 验证VRF实例内的EIGRP邻居。
show ip eigrp vrf Customer_A topology — 检验VRF实例内的EIGRP拓扑。
show ip bgp vpnv4 vrf Customer_A — 验证VRF实例内的BGP表。
show ip cef vrf Customer_A <ip address> detail — 验证VRF实例内的CEF表。
show tag-switching forwarding-table — 验证是否存在用于目标前缀的路由/标记。
show ip route — 检验CE是否交换路由。
PE(1)
PE(1)#show ip vrf Name Default RD Interfaces Customer_A 100:1 FastEthernet0/0 PE(1)#show ip route vrf Customer_A Routing Table: 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, 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 Gateway of last resort is not set 22.0.0.0/24 is subnetted, 3 subnets B 22.3.1.0 [200/156160] via 4.4.4.4, 01:12:28 B 22.2.1.0 [200/156160] via 4.4.4.4, 01:12:28 B 22.1.1.0 [200/156160] via 4.4.4.4, 01:12:28 11.0.0.0/24 is subnetted, 3 subnets D 11.2.1.0 [90/156160] via 192.168.2.2, 01:12:50, FastEthernet0/0 D 11.3.1.0 [90/156160] via 192.168.2.2, 01:12:50, FastEthernet0/0 D 11.1.1.0 [90/156160] via 192.168.2.2, 01:12:50, FastEthernet0/0 192.168.1.0/30 is subnetted, 1 subnets B 192.168.1.0 [200/0] via 4.4.4.4, 01:16:14 192.168.2.0/30 is subnetted, 1 subnets C 192.168.2.0 is directly connected, FastEthernet0/0 PE(1)#ping vrf Customer_A 192.168.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms D-GSR-12012-2A#ping vrf Customer_A ip ? WORD Ping destination address or hostname <cr> PE(1)#ping vrf Customer_A ip Target IP address: 192.168.1.2 Repeat count [5]: 100 Datagram size [100]: 1500 Timeout in seconds [2]: Extended commands [n]: Sweep range of sizes [n]: Type escape sequence to abort. Sending 100, 1500-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Success rate is 100 percent (100/100), round-trip min/avg/max = 1/2/4 ms PE(1)#traceroute vrf Customer_A 192.168.1.2 Type escape sequence to abort. Tracing the route to 192.168.1.2 1 10.0.0.2 [MPLS: Labels 18/28 Exp 0] 0 msec 0 msec 0 msec 2 10.1.1.2 [MPLS: Labels 19/28 Exp 0] 0 msec 0 msec 0 msec 3 192.168.1.1 4 msec 0 msec 0 msec 4 192.168.1.2 4 msec 0 msec * PE(1)#show ip eigrp vrf Customer_A neighbors IP-EIGRP neighbors for process 100 H Address Interface Hold Uptime SRTT RTO Q Seq Type (sec) (ms) Cnt Num 0 192.168.2.2 Fa0/0 11 10:51:41 10 200 0 8 PE(1)#show ip eigrp vrf Customer_A topology IP-EIGRP Topology Table for AS(100)/ID(192.168.2.1) Routing Table: Customer_A Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - Reply status P 11.2.1.0/24, 1 successors, FD is 156160 via 192.168.2.2 (156160/128256), FastEthernet0/0 P 11.3.1.0/24, 1 successors, FD is 156160 via 192.168.2.2 (156160/128256), FastEthernet0/0 P 11.1.1.0/24, 1 successors, FD is 156160 via 192.168.2.2 (156160/128256), FastEthernet0/0 P 22.3.1.0/24, 1 successors, FD is 156160 via VPNv4 Sourced (156160/0) P 22.2.1.0/24, 1 successors, FD is 156160 via VPNv4 Sourced (156160/0) P 22.1.1.0/24, 1 successors, FD is 156160 via VPNv4 Sourced (156160/0) P 192.168.1.0/30, 1 successors, FD is 28160 via VPNv4 Sourced (28160/0) P 192.168.2.0/30, 1 successors, FD is 28160 via Connected, FastEthernet0/0 PE(1)#show ip bgp vpnv4 vrf Customer_A BGP table version is 17, local router ID is 1.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 100:1 (default for vrf Customer_A) *> 11.1.1.0/24 192.168.2.2 156160 32768 ? *> 11.2.1.0/24 192.168.2.2 156160 32768 ? *> 11.3.1.0/24 192.168.2.2 156160 32768 ? *>i22.1.1.0/24 4.4.4.4 156160 100 0 ? *>i22.2.1.0/24 4.4.4.4 156160 100 0 ? *>i22.3.1.0/24 4.4.4.4 156160 100 0 ? *>i192.168.1.0/30 4.4.4.4 0 100 0 ? *> 192.168.2.0/30 0.0.0.0 0 32768 ? PE(1)#show ip cef vrf Customer_A Prefix Next Hop Interface 0.0.0.0/0 drop Null0 (default route handler entry) 0.0.0.0/32 receive 11.1.1.0/24 192.168.2.2 FastEthernet0/0 11.2.1.0/24 192.168.2.2 FastEthernet0/0 11.3.1.0/24 192.168.2.2 FastEthernet0/0 22.1.1.0/24 10.0.0.2 POS4/0 22.2.1.0/24 10.0.0.2 POS4/0 22.3.1.0/24 10.0.0.2 POS4/0 192.168.1.0/30 10.0.0.2 POS4/0 192.168.2.0/30 attached FastEthernet0/0 192.168.2.0/32 receive 192.168.2.1/32 receive 192.168.2.2/32 192.168.2.2 FastEthernet0/0 192.168.2.3/32 receive 224.0.0.0/4 drop 224.0.0.0/24 receive 255.255.255.255/32 receive PE(1)#show ip cef vrf Customer_A 11.1.1.0 detail 11.1.1.0/24, version 16, epoch 0, cached adjacency 192.168.2.2 0 packets, 0 bytes tag information set, all rewrites owned local tag: 27 via 192.168.2.2, FastEthernet0/0, 0 dependencies next hop 192.168.2.2, FastEthernet0/0 valid cached adjacency tag rewrite with Fa0/0, 192.168.2.2, tags imposed {} PE(1)#show tag-switching forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 Pop tag 2.2.2.2/32 0 PO4/0 point2point 17 17 3.3.3.3/32 0 PO4/0 point2point 18 18 4.4.4.4/32 0 PO4/0 point2point 19 19 10.2.2.0/30 0 PO4/0 point2point 20 Pop tag 10.1.1.0/30 0 PO4/0 point2point 22 Untagged 11.2.1.0/24[V] 0 Fa0/0 192.168.2.2 26 Untagged 11.3.1.0/24[V] 0 Fa0/0 192.168.2.2 27 Untagged 11.1.1.0/24[V] 0 Fa0/0 192.168.2.2 28 Aggregate 192.168.2.0/30[V] 255132 PE(1)#show tag-switching forwarding-table vrf Customer_A Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 22 Untagged 11.2.1.0/24[V] 0 Fa0/0 192.168.2.2 26 Untagged 11.3.1.0/24[V] 0 Fa0/0 192.168.2.2 27 Untagged 11.1.1.0/24[V] 0 Fa0/0 192.168.2.2 28 Aggregate 192.168.2.0/30[V] 255132
P(1)
P(1)A#show tag-switching forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 Pop tag 1.1.1.1/32 260843 PO2/0 point2point 17 Pop tag 3.3.3.3/32 0 AT6/0.100 point2point 18 19 4.4.4.4/32 269131 AT6/0.100 point2point 19 Pop tag 10.2.2.0/30 0 AT6/0.100 point2point
P(2)
P(2)#show tag-switching forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 Pop tag 10.0.0.0/30 0 AT4/0.100 point2point 17 Pop tag 2.2.2.2/32 0 AT4/0.100 point2point 18 16 1.1.1.1/32 269930 AT4/0.100 point2point 19 Pop tag 4.4.4.4/32 276490 SR5/0 10.2.2.2
PE(2)
PE(2)#show tag-switching forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 18 1.1.1.1/32 0 SR4/0 10.2.2.1 17 17 2.2.2.2/32 0 SR4/0 10.2.2.1 18 Pop tag 3.3.3.3/32 0 SR4/0 10.2.2.1 19 16 10.0.0.0/30 0 SR4/0 10.2.2.1 20 Pop tag 10.1.1.0/30 0 SR4/0 10.2.2.1 25 Untagged 22.1.1.0/24[V] 2280 Fa6/0 192.168.1.2 26 Untagged 22.2.1.0/24[V] 570 Fa6/0 192.168.1.2 27 Untagged 22.3.1.0/24[V] 570 Fa6/0 192.168.1.2 28 Aggregate 192.168.1.0/30[V] 251808
CE(1)
CE(1)#show ip route 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, 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 Gateway of last resort is not set 22.0.0.0/24 is subnetted, 3 subnets D 22.3.1.0 [90/158720] via 192.168.2.1, 00:35:45, FastEthernet2/0 D 22.2.1.0 [90/158720] via 192.168.2.1, 00:35:45, FastEthernet2/0 D 22.1.1.0 [90/158720] via 192.168.2.1, 00:35:45, FastEthernet2/0 11.0.0.0/24 is subnetted, 3 subnets C 11.2.1.0 is directly connected, Loopback1 C 11.3.1.0 is directly connected, Loopback2 C 11.1.1.0 is directly connected, Loopback0 192.168.1.0/30 is subnetted, 1 subnets D 192.168.1.0 [90/30720] via 192.168.2.1, 00:35:46, FastEthernet2/0 192.168.2.0/30 is subnetted, 1 subnets C 192.168.2.0 is directly connected, FastEthernet2/0 CE(1)#ping 22.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 22.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
CE(2)
D-R7206-5A#show ip route 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, 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 Gateway of last resort is not set 22.0.0.0/24 is subnetted, 3 subnets C 22.3.1.0 is directly connected, Loopback2 C 22.2.1.0 is directly connected, Loopback1 C 22.1.1.0 is directly connected, Loopback0 11.0.0.0/24 is subnetted, 3 subnets D 11.2.1.0 [90/158720] via 192.168.1.1, 00:36:32, FastEthernet2/0 D 11.3.1.0 [90/158720] via 192.168.1.1, 00:36:32, FastEthernet2/0 D 11.1.1.0 [90/158720] via 192.168.1.1, 00:36:32, FastEthernet2/0 192.168.1.0/30 is subnetted, 1 subnets C 192.168.1.0 is directly connected, FastEthernet2/0 192.168.2.0/30 is subnetted, 1 subnets D 192.168.2.0 [90/30720] via 192.168.1.1, 00:36:33, FastEthernet2/0 CE(2)#ping 11.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 11.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
目前没有针对此配置的故障排除信息。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
05-Jun-2005 |
初始版本 |