CCNP之MPLS+VPN实验案例

2019-04-09 12:40

CCNP之MPLS VPN实验案例

实验要求:

1、 依据拓扑,搭建好环境,测试底层环境可达;

2、 A 公司总分部之间向 ISP 申请 MPLS VPN 用来传送内网数据,要求总分部之间可以实现通信,分部与分部之间不能相互通信,CE 与 PE 之间的协议如图; 3、 B 公司总分部之间也是向 ISP 申请 MPLS VPN 用来传输内网数据,为了保证可靠度,同时向另一家 ISP 申请了帧中继用来传输内网数据,B 公司采用的协议是 OSPF,区域均为area 0;

4、 确保 B 公司更倾向于走 MPLS VPN,帧中继只是作为备份。

实验拓扑:

实验步骤:

1、在 ISP 内部部署 EIGRP 协议 PE1:

PE1(config)#int loopback0

PE1(config-if)#ip add 2.2.2.2 255.255.255.0 //用作 router-id PE1(config)#router eigrp 1

PE1(config-router)#no auto-summary PE1(config-router)#net 2.0.0.0

PE1(config-router)#net 100.1.1.1 0.0.0.0

R2(config-router)#passive-interface Loopback0 R2:

R2(config)#int loopback0

R2(config-if)#ip add 4.4.4.4 255.255.255.0 R2(config)#router eigrp 1

R2(config-router)#no auto-summary R2(config-router)#net 4.0.0.0

R2(config-router)#network 100.1.1.2 0.0.0.0 R2(config-router)#network 100.2.2.1 0.0.0.0 R2(config-router)#passive-interface Loopback0 R3:

R2(config)#int loopback0

R2(config-if)#ip add 5.5.5.5 255.255.255.0 R3(config)#router eigrp 1

R3(config-router)#no auto-summary R3(config-router)#network 5.0.0.0

R3(config-router)#network 100.2.2.2 0.0.0.0 R3(config-router)#network 100.3.3.1 0.0.0.0 R3(config-router)#passive-interface Loopback0 PE2:

PE2(config)#int loopback0

PE2(config-if)#ip add 6.6.6.6 255.255.255.0 PE2(config)#router eigrp 1

PE2(config-router)#no auto-summary PE2(config-router)#network 6.0.0.0

PE2(config-router)#network 100.3.3.2 0.0.0.0 PE2(config-router)#passive-interface Loopback0 查看 MPLS 骨干路由表: PE1#show ip rou eigrp

100.0.0.0/24 is subnetted, 3 subnets

D 100.3.3.0 [90/3193856] via 100.1.1.2, 01:06:54, Serial1/2 D 100.2.2.0 [90/2681856] via 100.1.1.2, 01:06:54, Serial1/2

4.0.0.0/24 is subnetted, 1 subnets

D 4.4.4.0 [90/2297856] via 100.1.1.2, 01:06:54, Serial1/2 5.0.0.0/24 is subnetted, 1 subnets

D 5.5.5.0 [90/2809856] via 100.1.1.2, 01:06:54, Serial1/2 6.0.0.0/24 is subnetted, 1 subnets

D 6.6.6.0 [90/3321856] via 100.1.1.2, 01:06:54, Serial1/2

2、配置骨干路由器的 MPLS PE1:

PE1(config)#ip cef

PE1(config)#mpls label protocol ldp //选择 LDP 标签分发协议

PE1(config)#mpls ldp router-id loopback 0 force //选择使用回环口作为 LSR 的 Router-ID PE1(config)#interface s1/2 PE1(config-if)#mpls ip R2:

R2(config)#ip cef

R2(config)#mpls label protocol ldp

R2(config)#mpls ldp router-id loopback 0 force R2(config)#interface s1/0 R2(config-if)#mpls ip R2(config)#interface s1/1 R2(config-if)#mpls ip R3:

R3(config)#ip cef

R3(config)#mpls label protocol ldp

R3(config)#mpls ldp router-id loopback 0 force R3(config)#interface s1/0 R3(config-if)#mpls ip R3(config)#interface s1/1 R3(config-if)#mpls ip PE2:

PE2(config)#ip cef

PE2(config)#mpls label protocol ldp

PE2(config)#mpls ldp router-id loopback 0 force PE2(config)#interface s1/0 PE2(config-if)#mpls ip

查看 LFIB 表(标签转发表): PE1#show mpls forwarding-table

Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 Pop tag 4.4.4.0/24 0 Se1/2 point2point 17 Pop tag 100.2.2.0/24 0 Se1/2 point2point 18 16 5.5.5.0/24 0 Se1/2 point2point

19 17 100.3.3.0/24 0 Se1/2 point2point 20 19 6.6.6.0/24 0 Se1/2 point2point

3、在两台 PE 路由器上配置 IBGP 协议 PE1:

PE1(config)#router bgp 100

PE1(config-router)#neighbor 6.6.6.6 remote-as 100

PE1(config-router)#neighbor 6.6.6.6 update-source loopback 0 PE2:

PE2(config)#router bgp 100

PE2(config-router)#neighbor 2.2.2.2 remote-as 100

PE2(config-router)#neighbor 2.2.2.2 update-source loopback 0

查看 BGP 邻居: PE1#show ip bgp su

BGP router identifier 2.2.2.2, local AS number 100 BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 6.6.6.6 4 100 163 131 1 0 0 01:13:14 0

4、激活 PE 路由器的 MP-BGP 协议 PE1(config)#router bgp 100

PE1(config-router)#address-family vpnv4 //要启用 MP-BGP 协议,必须在 VPNv4 的地址家族下激活

PE1(config-router-af)#neighbor 6.6.6.6 activate //用于激活 MP-BGP 邻居的路由交换

PE1(config-router-af)#neighbor 6.6.6.6 send-community extended //启用 BGP 扩展共用体交换

PE1(config-router-af)#no auto-summary

PE2(config)#router bgp 100

PE2(config-router)#address-family vpnv4

PE2(config-router-af)#neighbor 2.2.2.2 activate

PE2(config-router-af)#neighbor 2.2.2.2 send-community extended PE2(config-router-af)#no auto-summary 5、配置 VRF(VPN 路由转发表)

PE1(config)#ip vrf vpn1 //创建 VRF

PE1(config-vrf)#rd 100:1 //配置路由区分符

PE1(config-vrf)#route-target import 100:1 //指定路由目标为 100:1 的路由导入 VRF(A1 对应分公司 A2)

PE1(config-vrf)#route-target export 100:1 //指出从客户端的路由器重分布到 MP-BGP 中使用路由器 区分符 100:1(A1 对应分公司 A2) PE1(config-vrf)#route-target import 150:1 //A1 对应分公司 A3 PE1(config-vrf)#route-target export 150:1 //A1 对应分公司 A3 PE1(config)#ip vrf vpn2 PE1(config-vrf)#rd 200:1

PE1(config-vrf)#route-target both 200:1 //B1 对应总公司 B2

PE2(config)#ip vrf vpn1 //创建 VRF

PE2(config-vrf)#rd 100:1 //配置路由区分符

PE2(config-vrf)#route-target both 100:1 // A2 对应总公司 A1 PE2(config)#ip vrf vpn2 PE2(config-vrf)#rd 200:1

PE2(config-vrf)#route-target both 200:1 //B2 对应总公司 B1 PE2(config)#ip vrf vpn3 PE2(config-vrf)#rd 150:1

PE2(config-vrf)#route-target both 150:1 //A3 对应总公司 A1

分别在 R2 与 R5 路由器上配置 VRF 与接口的关联性 PE1(config)#interface s1/0

PE1(config-if)#ip vrf forwarding vpn1 //将 vpn1 的 VRF 与 S1/0 接口关联起来 % Interface Serial1/0 IP address 10.1.1.1 removed due to enabling VRF vpn1 PE1(config-if)#ip add 10.1.1.1 255.255.255.0 //由于配置 VRF 会导致接口 IP 丢失,因此重配 IP 地址 PE1(config)#interface s1/1

PE1(config-if)#ip vrf forwarding vpn2 % Interface Serial1/1 IP address 10.1.1.1 removed due to enabling VRF vpn2 PE1(config-if)#ip add 10.1.1.1 255.255.255.0

PE2(config)#interface s1/1

PE2(config-if)#ip vrf forwarding vpn1

% Interface Serial1/1 IP address 172.16.1.1 removed due to enabling VRF vpn1

PE2(config-if)#ip add 172.16.1.1 255.255.255.0 PE2(config)#interface s1/3

PE2(config-if)#ip vrf forwarding vpn2

% Interface Serial1/1 IP address 172.16.1.1 removed due to enabling VRF vpn2

PE2(config-if)#ip add 172.16.1.1 255.255.255.0 PE2(config)#interface s1/2

PE2(config-if)#ip vrf forwarding vpn3

% Interface Serial1/1 IP address 192.168.1.1 removed due to enabling VRF vpn3

PE2(config-if)#ip add 192.168.1.1 255.255.255.0 查看 VRF 信息: R2#show ip vrf

Name Default RD Interfaces vpn1 100:1 Se1/0 vpn2 200:1 Se1/1

R6#show ip vrf

Name Default RD Interfaces vpn1 100:1 Se1/1 vpn2 200:1 Se1/3 vpn3 150:1 Se1/2

5、配置 PE 与 CE 之间的路由选择协议 首先配置 CE 与 PE 端的 RIP 路由协议: R1:

R1(config)#router rip

R1(config-router)#version 2 R1(config-router)#net 10.0.0.0


CCNP之MPLS+VPN实验案例.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:进程管理习题

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: