Service Professional Outstanding Teamwork Obtain
MPLS VPN(PE-CE 静态路由)实验
V0.1
2013-6-24
Author PHONE LastUpdate 顾赟 TEL Organization SPOTO 全球 培训 ● 项目 ● 人才
1 / 9
Service Professional Outstanding Teamwork Obtain
目
1 2
录
3
实验目的 ........................................................................................................................................................... 3 拓扑与需求 ....................................................................................................................................................... 3 2.1 网络拓扑及地址规划 ........................................................................................................................... 3 2.2 需求概述 ............................................................................................................................................... 4 配置与实现 ..................................................................................................................... 错误!未定义书签。 3.1 实验步骤 ............................................................................................................. 错误!未定义书签。 3.2 关键配置与结果测试 ........................................................................................................................... 4
3.2.1 配置MPLS ................................................................................................................................ 4 3.2.2 创建VRF ................................................................................................................................... 4 3.2.3 查看VRF ................................................................................................................................... 5 3.2.4 配置MP-BGP ........................................................................................................................... 5 3.2.5 配置PE-CE路由 ...................................................................................................................... 6 3.2.6 查看VRF ................................................................................................................................... 6 3.2.7 查看LFIB .................................................................................................................................. 7 3.2.8 查看MP-BGP ........................................................................................................................... 8 3.2.9 结果测试 ................................................................................................................................... 8
SPOTO 全球 培训 ● 项目 ● 人才
2 / 9
Service Professional Outstanding Teamwork Obtain
1 实验目的
1、理解MPLS VPN的基本原理及运作机制。
2 拓扑与需求
2.1 网络拓扑及地址规划
MPLS VPNCE1R1F0/0F0/0PE1R1F0/1F0/1PE2R1F0/0F0/0CE2R1静态路由BGP静态路由 设备名称 CE1 IP地址 10.1.1.1/24 192.168.1.1/24 10.1.1.2/24 接口 F0/0 Lo0 F0/0 F0/1 Lo0 F0/1 F0/0 Lo0 F0/0 Lo0 备注 内网地址 VRF:cisco VRF:cisco 内网地址 PE1 23.1.1.2/24 2.2.2.2/32 23.1.1.3/24 PE2 10.2.1.3/24 3.3.3.3/32 10.2.1.4/24 CE2 172.16.1.1/24 SPOTO 全球 培训 ● 项目 ● 人才
3 / 9
Service Professional Outstanding Teamwork Obtain
2.2 需求概述
1、ISP内部运行OSPF和MPLS。 2、PE-CE之间运行静态路由。
3、配置MPLS VPN,实现CE之间的互访。
3 配置与实现
3.1 实验步骤
1、搭建拓扑,配置IP。
2、ISP之间配置OSPF和MPLS。 3、配置MPLS VPN: (1)创建VRF; (2)配置MP-BGP; (3)配置PE-CE路由(静态路由)。
3.2 关键配置与结果测试
3.2.1 配置MPLS
PE1(config)#int f0/1 PE1(config-if)#mpls ip
PE2(config)#int f0/1 PE2(config-if)#mpls ip
//指定MPLS协议,默认是LDP
3.2.2 创建VRF
PE1(config)#ip vrf cisco //创建VRF,VRF名只具有本地意义 PE1(config-vrf)#rd 1:1 //指定RD,用于构建全局唯一的VPNv4地址,只具有本地意义 PE1(config-vrf)#route-target import 1:1 //指定RT导入,与对端PE的RT导出相对应 SPOTO 全球 培训 ● 项目 ● 人才
4 / 9
Service Professional Outstanding Teamwork Obtain
PE1(config-vrf)#route-target export 1:2 //指定RT导出,与对端PE的RT导入相对应 PE1(config-vrf)#vpn id 12:21 //配置VPN ID,仅作为本地标识,用于区分不同的VPN PE1(config)#int f0/0
PE1(config-if)#ip vrf forwarding cisco
PE1(config-if)#ip address 10.1.1.2 255.255.255.0
PE2(config)#ip vrf cisco PE2(config-vrf)#rd 1:1
PE2(config-vrf)#route-target import 1:2 PE2(config-vrf)#route-target export 1:1 PE2(config)#int f0/0
PE2(config-if)#ip vrf forwarding cisco
PE2(config-if)#ip address 10.2.1.3 255.255.255.0
3.2.3 查看VRF
PE1#show ip vrf cisco
Name Default RD Interfaces cisco 1:1 Fa0/0
PE1#show ip vrf detail
VRF cisco; default RD 1:1; default VPNID 12:21 Interfaces:
Fa0/0
Connected addresses are not in global routing table Export VPN route-target communities RT:1:2
Import VPN route-target communities RT:1:1 No import route-map No export route-map
VRF label distribution protocol: not configured VRF label allocation mode: per-prefix
PE1#show ip vrf interfaces
Interface IP-Address VRF Protocol Fa0/0 10.1.1.2 cisco up
3.2.4 配置MP-BGP
PE1(config)#router bgp 1
SPOTO 全球 培训 ● 项目 ● 人才
5 / 9