实验环境:
操作系统:Mac OS X 10.11.4(当时最新正式版),模拟器:GNS3 IOU for Mac 1.4.5(当时最新版本)
注:当然,只要有思科模拟器都可以做这个实验
实验需求:
- IOU1/2/3 是一个运营商,BGP AS 号是 123;
- IOU4/5/6 是另一个运营商,BGP AS 号是 456;
- IOU7/8/9/10 都是 CE,IOU8 可以访问 IOU9,IOU7 可以访问 IOU10。
跨域的 MPLS L3VPN 和单域的 MPLS L3VPN 在配置上的区别主要是在运营商和运营商之间的 ASBR(这里的 ASBR 是指 IOU3 和 IOU4)上。换句话说,跨域的 MPLS L3VPN 主要考虑的地方是运营商和运营商之间如何把彼此的 MPLS L3VPN 给连接起来。
而 back to back(背靠背)的方式其实很好理解,就是 IOU3 把 IOU4 当做是自己的 CE,IOU4 把 IOU3 当做是自己的 CE 。同时,IOU3 和 IOU4 之间的 MPLS L3VPN 连接用 VRF 虚拟子接口来做,这样可以为多家企业提供跨域的 MPLS L3VPN 服务。
其他相关文章:
1、以下是 L2VPN 和 L3VPN 的单域的实验:
- 单域的 MPLS L3VPN 实验,用真机做的(四台 Cisco 2811 和两台 Cisco 3750),请看:【实验】MPLS L3VPN 详解;
- 单域的 MPLS L2VPN 实验,请看:【实验】MPLS L2VPN 下,Point-to-Point 的 AToM 实验;
- 单域的 IP L2VPN 实验,请看:【实验】IP L2VPN 下,Point-to-Point 的 L2TPv3 实验。
2、以下是 MPLS L2VPN 的跨域的实验:
- 【实验】域间MPLS L2VPN实验 —— Inter-AS option A/option 1(Back to Back)
- 【实验】域间MPLS L2VPN实验 —— Inter-AS option B/option 2(End to End)BGP路由重分布到IGP
- 【实验】域间MPLS L2VPN实验 —— Inter-AS option B/option 2(End to End)PE上均开启BGP
- 【实验】域间MPLS L2VPN实验 —— Inter-AS option 3(PseudoWire Stitching at ASBRs,伪线缝补)
- 关于域间MPLS L2VPN实验(共四个实验)的数据包报头结构小结
实验步骤:
1、IP 地址规划
IOU1:
conf t int e 0/0 int e 0/1 int e 0/2 |
IOU2:
conf t int e 0/0 int e 0/1 |
IOU3:
conf t int e 0/1 int e 0/2 |
IOU4:
conf t int e 0/2 int e 0/0 |
IOU5:
conf t int e 0/0 int e 0/1 |
IOU6:
conf t int e 0/0 int e 0/1 int e 0/2 |
IOU8:
conf t int e 0/1 |
IOU7:
conf t int e 0/2 |
IOU10:
conf t int e 0/2 |
IOU9:
conf t int e 0/0 |
2、在 P 和 PE 上开启 IGP 和 MPLS:
IOU1:
ip cef router isis int r l 0 , e 0/0 router isis |
IOU2:
ip cef router isis int r l 0 , e 0/0-1 router isis |
IOU3:
ip cef router isis int r l 0 , e 0/1 router isis |
IOU4:
ip cef router isis int r l 0 , e 0/0 router isis |
IOU5:
ip cef router isis int r l 0 , e 0/0-1 router isis |
IOU6:
ip cef router isis int r l 0 , e 0/1 router isis |
3、PE 上配置 VRF,并配置 PE 和 CE 间的 IGP:
IOU1:
ip vrf 89 int e 0/1 ip vrf 710 int e 0/2 |
IOU6:
ip vrf 89 int e 0/0 ip vrf 710 int e 0/2 |
IOU8:
router os 89 |
IOU7:
router os 710 |
IOU10:
router os 710 |
IOU9:
router os 89 |
4、配置 MP-BGP,并在 PE 上做双向重分布:
IOU1:
router bgp 123 add vpnv4 un add ipv4 vrf 89 add ipv4 vrf 710 router os 89 vrf 89 router os 710 vrf 710 |
IOU2:
router bgp 123 add vpnv4 un |
IOU5:
router bgp 456 add vpnv4 un |
IOU6:
router bgp 456 add vpnv4 un add ipv4 vrf 89 add ipv4 vrf 710 router os 89 vrf 89 router os 710 vrf 710 |
5、back to back VRF 关键在 IOU3 和 IOU4 上,IOU3 和 IOU4 上还要把对方看做是自己的 CE(需要开启子接口,因为 VRF 太多连实线会不方便):
IOU3:
ip vrf 89 int e 0/2.89 ip vrf 710 int e 0/2.710 router bgp 123 add vpnv4 un add ipv4 vrf 89 add ipv4 vrf 710 |
IOU4:
ip vrf 89 int e 0/2.89 ip vrf 710 int e 0/2.710 router bgp 456 add vpnv4 un add ipv4 vrf 89 add ipv4 vrf 710 |
测试:
IOU8#sh ip ro 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 Gateway of last resort is not set 8.0.0.0/32 is subnetted, 1 subnets C 8.8.8.8 is directly connected, Loopback0 9.0.0.0/32 is subnetted, 1 subnets O E2 9.9.9.9 [110/1] via 18.1.1.1, 00:02:57, Ethernet0/1 18.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 18.1.1.0/24 is directly connected, Ethernet0/1 L 18.1.1.8/32 is directly connected, Ethernet0/1 69.0.0.0/24 is subnetted, 1 subnets O E2 69.1.1.0 [110/1] via 18.1.1.1, 00:02:57, Ethernet0/1 IOU8#tra 9.9.9.9 so l 0 Type escape sequence to abort. Tracing the route to 9.9.9.9 VRF info: (vrf in name/id, vrf out name/id) 1 18.1.1.1 7 msec 4 msec 1 msec 2 12.1.1.2 [MPLS: Labels 17/18 Exp 0] 1 msec 5 msec 0 msec 3 34.1.1.3 [MPLS: Label 18 Exp 0] 1 msec 1 msec 0 msec 4 34.1.1.4 1 msec 1 msec 0 msec 5 45.1.1.5 [MPLS: Labels 17/18 Exp 0] 1 msec 1 msec 0 msec 6 69.1.1.6 [MPLS: Label 18 Exp 0] 0 msec 1 msec 0 msec 7 69.1.1.9 0 msec 1 msec 1 msec IOU10#sh ip ro 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 Gateway of last resort is not set 7.0.0.0/32 is subnetted, 1 subnets O E2 7.7.7.7 [110/1] via 106.1.1.6, 00:04:40, Ethernet0/2 10.0.0.0/32 is subnetted, 1 subnets C 10.10.10.10 is directly connected, Loopback0 17.0.0.0/24 is subnetted, 1 subnets O E2 17.1.1.0 [110/1] via 106.1.1.6, 00:04:40, Ethernet0/2 106.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 106.1.1.0/24 is directly connected, Ethernet0/2 L 106.1.1.10/32 is directly connected, Ethernet0/2 IOU10#tra 7.7.7.7 Type escape sequence to abort. Tracing the route to 7.7.7.7 VRF info: (vrf in name/id, vrf out name/id) 1 106.1.1.6 4 msec 5 msec 5 msec 2 56.1.1.5 [MPLS: Labels 16/20 Exp 0] 1 msec 4 msec 1 msec 3 34.1.1.4 [MPLS: Label 20 Exp 0] 1 msec 0 msec 5 msec 4 34.1.1.3 1 msec 1 msec 2 msec 5 23.1.1.2 [MPLS: Labels 16/20 Exp 0] 1 msec 1 msec 1 msec 6 17.1.1.1 [MPLS: Label 20 Exp 0] 1 msec 5 msec 1 msec 7 17.1.1.7 5 msec 5 msec 2 msec
发表评论?