
ISCW系列实验一:MPLS配置
原创
©著作权归作者所有:来自51CTO博客作者hexianguo的原创作品,请联系作者获取转载授权,否则将追究法律责任
实验一:MPLS配置
实验环境:三台路由器Ethernet接口相连,接口配置如图
要求:在三台路由器相连的接口分别启用MPLS,查看相应的结果,在启用前使其在OSPF下互通。

步骤一:接口配置连通性,启用OSPF路由协议
R1(config-if)#int e0/1
R1(config-if)#ip add 10.1.1 .1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#int e0/0
R1(config-if)#ip add 20.1.1 .1 255.255.255.0
R1(config-if)#no sh
R1(config)#router ospf 100 à启用路由协议,发布接口
R1(config-router)#net 10.1.1 .0 0.0.0.255 area 0
R1(config-router)#net 20.1.1 .0 0.0.0.255 area 0
R2(config)#int e0/1
R2(config-if)#ip add 20.1.1 .2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int e0/0
R2(config-if)#ip add 30.1.1.1 255.255.255.0
R2(config-if)#no sh
R2(config)#router ospf 100
R2(config-router)#net 20.1.1 .0 0.0.0.255 area 0
R2(config-router)#net 30.1.1.0 0.0.0 .255 area 0
R3(config)#int e0/1
R3(config-if)#ip add 30.1.1.2 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int e0/0
R3(config-if)#ip add 40.1.1.1 255.255.255.0
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#router ospf 100
R3(config-router)#net 30.1.1.0 0.0.0 .255 area 0
R3(config-router)#net 30.1.1.0 0.0.0 .255 area 0
步骤二:查看路由,并测试连通性
R1#show ip route à查看路由表
C 20.1.1 .0 is directly connected, Ethernet0/0
40.0.0.0/24 is subnetted, 1 subnets
O 40.1.1.0 [110/30] via 20.1.1 .2, 00:00:15, Ethernet0/0
C 10.1.1 .0 is directly connected, Ethernet0/1
30.0.0.0/24 is subnetted, 1 subnets
O 30.1.1.0 [110/20] via 20.1.1 .2, 00:00:15, Ethernet0/0
R2#show ip route
C 20.1.1 .0 is directly connected, Ethernet0/1
40.0.0.0/24 is subnetted, 1 subnets
O 40.1.1.0 [110/20] via 30.1.1.2, 00:00:23, Ethernet0/0
O 10.1.1 .0 [110/20] via 20.1.1 .1, 00:00:23, Ethernet0/1
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, Ethernet0/0
R3#show ip route à查看路由表,都也学到相关路由
O 20.1.1 .0 [110/20] via 30.1.1.1, 00:00:06, Ethernet0/1
40.0.0.0/24 is subnetted, 1 subnets
C 40.1.1.0 is directly connected, Ethernet0/0
O 10.1.1 .0 [110/30] via 30.1.1.1, 00:00:06, Ethernet0/1
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, Ethernet0/1
R1#ping 40.1.1.1 à测试连通性
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 40.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
R3#ping 10.1.1 .1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1 .1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
步骤三:启用相关接口的MPLS,及快速转发功能
R1(config)#ip cef à启用快速转发功能
R1(config)#int e0/0
R1(config-if)#mpls ip à接口启用MPLS
R2(config)#ip cef
R2(config)#int e0/1
R2(config-if)#mpls ip
R2(config-if)#int e0/0
R2(config-if)#mpls ip
R3(config)#ip cef
R3(config)#int e0/1
R3(config-if)#mpls ip
步骤四:查看MPLS状态
R1#show mpls forwarding-table à查看MPLS转发表
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 16 40.1.1.0/24 0 Et0/0 20.1.1 .2
17 Pop tag 30.1.1.0/24 0 Et0/0 20.1.1 .2
R2#show mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 40.1.1.0/24 0 Et0/0 30.1.1.2
17 Pop tag 10.1.1 .0/24 0 Et0/1 20.1.1 .1
R3#show mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 20.1.1 .0/24 0 Et0/1 30.1.1.1
17 17 10.1.1 .0/24 0 Et0/1 30.1.1.1
R1#show ip cef summary à查看CEF转发汇总信息及标记信息
IP CEF with switching (Table Version 16), flags=0x0
16 routes, 0 reresolve, 0 unresolved (0 old, 0 new), peak 0
16 leaves, 18 nodes, 20896 bytes, 21 inserts, 5 invalidations
0 load sharing elements, 0 bytes, 0 references
universal per-destination load sharing algorithm, id 86C8F0BF
3(0) CEF resets, 0 revisions of existing leaves
Resolution Timer: Exponential (currently 1s, peak 1s)
0 in-place/0 aborted modifications
refcounts: 4877 leaf, 4864 node
Table epoch: 0 (16 entries at this epoch)
Adjacency Table has 2 adjacencies
R2#show ip cef summary
IP CEF with switching (Table Version 17), flags=0x0
17 routes, 0 reresolve, 0 unresolved (0 old, 0 new), peak 0
17 leaves, 18 nodes, 21032 bytes, 22 inserts, 5 invalidations
0 load sharing elements, 0 bytes, 0 references
universal per-destination load sharing algorithm, id FCD3DE86
3(0) CEF resets, 0 revisions of existing leaves
Resolution Timer: Exponential (currently 1s, peak 1s)
0 in-place/0 aborted modifications
refcounts: 4879 leaf, 4864 node
Table epoch: 0 (17 entries at this epoch)
Adjacency Table has 4 adjacencies
R3#show ip cef summary
IP CEF with switching (Table Version 16), flags=0x0
16 routes, 0 reresolve, 0 unresolved (0 old, 0 new), peak 0
16 leaves, 18 nodes, 20896 bytes, 21 inserts, 5 invalidations
0 load sharing elements, 0 bytes, 0 references
universal per-destination load sharing algorithm, id 86B9347C
3(0) CEF resets, 0 revisions of existing leaves
Resolution Timer: Exponential (currently 1s, peak 1s)
0 in-place/0 aborted modifications
refcounts: 4877 leaf, 4864 node
Table epoch: 0 (16 entries at this epoch)
Adjacency Table has 2 adjacencies
注:也可用show ip cef detail这条命令来查看详细信息
R1#ping 40.1.1.1 à测试连通性
!!!!!
R3#ping 10.1.1 .1
!!!!!
步骤五:显示当前配置信息
R1#show run
hostname R1
ip cef
!
interface Ethernet0/0
ip address 20.1.1 .1 255.255.255.0
half-duplex
tag-switching ip
!
interface Ethernet0/1
ip address 10.1.1 .1 255.255.255.0
half-duplex
!
router ospf 100
network 10.1.1 .0 0.0.0.255 area 0
network 20.1.1 .0 0.0.0.255 area 0
!
end
R2#show run
hostname R2
!
ip cef
!
interface Ethernet0/0
ip address 30.1.1.1 255.255.255.0
half-duplex
tag-switching ip
!
interface Ethernet0/1
ip address 20.1.1 .2 255.255.255.0
half-duplex
tag-switching ip
!
router ospf 100
network 20.1.1 .0 0.0.0.255 area 0
network 30.1.1.0 0.0.0 .255 area 0
!
end
R3#show run
hostname R3
!
ip cef
!
interface Ethernet0/0
ip address 40.1.1.1 255.255.255.0
half-duplex
!
interface Ethernet0/1
ip address 30.1.1.2 255.255.255.0
half-duplex
tag-switching ip
!
router ospf 100
network 30.1.1.0 0.0.0 .255 area 0
network 40.1.1.0 0.0.0 .255 area 0
!
end

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
CCNP(ISCW)实验:配置SYSLOG
配置SYSLOG
配置SYSLOG -
CCNP(ISCW)实验:配置SNMP
配置SNMP
配置SNMP -
CCNP(ISCW)实验:配置NTP
配置NTP
配置NTP -
iscw 实验
很好的实验 我收藏
网络 职场 实验 休闲 iscw -
CCNP(ISCW)实验:配置GRE隧道
配置GRE隧道
配置GRE隧道 -
MPLS L3 ××× 实验一(配置)
MPLS L3 VPN 实验一(配置)
职场 休闲 MPLS MPLS配置 MPLSVPN实验 -
CCNP(ISCW)实验:配置AAA支持Radius
配置AAA支持Radius
配置AAA支持Radius -
CCNP(ISCW)实验:配置Cisco PPPoE Server and Client
Cisco PPPoE Server and Client
Cisco PPPoE Server Cisco PPPoE Client -
CCNP(ISCW)实验:配置Cisco IOS *** Server Client
配置Cisco IOS vpn Server Client
配置Cisco IOS *** Serv -
CCNP(ISCW)实验:配置AAA支持Tacacs+
配置AAA支持Tacacs+
配置AAA支持Tacacs+