拓扑图:
实验要求:
-
R1与R5MPLS 虚拟专线
-
R6与R7MPLS 虚拟专线
-
R7可以访问R2/3/4的环回
-
B1、B2使用静态路由协议;A1使用RIP协议;A2使用OSPF协议;A1、A2可以通过R7访问公网
-
环回地址均使用192.168.1.0;CE与PE直连的链路使用2.0、3.0;R5环回4.1;R6环回4.2
思路:
配置路由器接口IP->配置公网IGP协议->配置公网MPLS->配置公网BGP协议->配置私网IGP协议->配置nat
配置命令:
R1:
sys
sys r1
//配置路由器接口IP地址
int g0/0/0
ip add 192.168.2.1 24
int lo0
ip add 192.168.1.1 24
//静态路由
ip route-static 192.168.3.0 24 192.168.2.2
ip route-static 192.168.4.0 24 192.168.2.2
R2:
sys
sys r2
//配置路由器接口IP地址
int g0/0/2
ip add 23.0.0.1 24
int lo0
ip add 2.2.2.2 24
//配