实验目的
1、理解MPLS LDP 的标签分配、分发、关联。
2、理解OSPF 作为底层协议对标签的影响。
3、掌握MPLS 的配置流程及校验方式。
实验拓扑
接口ip配置
R1(config)#interface e0/0
R1(config-if)#ip address 12.12.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#interface loopback 0
R1(config-if)#ip address 10.10.10.10 255.255.255.0
R2(config)#interface e0/0
R2(config-if)#ip address 12.12.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface e0/1
R2(config-if)#ip address 23.23.23.2 255.255.255.0
R2(config-if)#no shutdown
R2(config)#interface loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.0
R3(config)#interface e0/1
R3(config-if)#ip address 23.23.23.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface e0/0
R3(config-if)#ip address 34.34.34.3 255.255.255.0
R3(config-if)#no shutdown
R3(config)#interface loopback 0
R3(config-if)#ip address 3.3.3.3 255.255.255.0
R4(config)#interface e0/0
R4(config-if)#ip address 34.34.34.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#interface e0/1
R4(config-if)#ip address 45.45.45.4 255.255.255.0
R4(config-if)#no shutdown
R4(config)#interface loopback 0
R4(config-if)#ip address 4.4.4.4 255.255.255.0
R5(config)#interface e0/1
R5(config-if)#ip address 45.45.45.5 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#interface e0/0
R5(config-if)#ip address 56.56.56.5 255.255.255.0
R5(config-if)#no shutdown
R5(config)#interface loopback 0
R5(config-if)#ip address 5.5.5.5 255.255.255.0
R6(config)#interface e0/0
R6(config-if)#ip address 56.56.56.6 255.255.255.0
R6(config-if)#no shutdown
R6(config)#interface loopback 0
R6(config-if)#ip address 60.60.60.60 255.255.255.0
完成R2 R3 R4 R5的底层协议OSPF 配置
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R2(config-router)#network 23.23.23.2 0.0.0.0 area 0
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
R3(config-router)#network 23.23.23.3 0.0.0.0 area 0
R3(config-router)#network 34.34.34.3 0.0.0.0 area 0
R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 4.4.4.4 0.0.0.0 area 0
R4(config-router)#network 34.34.34.4 0.0.0.0 area 0
R4(config-router)#network 45.45.45.4 0.0.0.0 area 0
R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 5.5.5.5 0.0.0.0 area 0
R5(config-router)#network 45.45.45.5 0.0.0.0 area 0
观察参与OSPF 的LOOPBACK 接口路由条目状态。
R2#show ip ospf interface loopback 0
Loopback0 is up, line protocol is up
Internet Address 2.2.2.2/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 2.2.2.2, Network Type LOOPBACK, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Loopback interface is treated as a stub Host
R3#show ip route ospf