ISCW系列实验一:MPLS配置

实验一: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   à 查看路由表
 
     20.0.0 .0/24 is subnetted, 1 subnets
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] vi a 20.1.1 .2, 00:00:15, Ethernet0/0
     10.0.0 .0/24 is subnetted, 1 subnets
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] vi a 20.1.1 .2, 00:00:15, Ethernet0/0
 
R2#show ip route
 
     20.0.0 .0/24 is subnetted, 1 subnets
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
     10.0.0 .0/24 is subnetted, 1 subnets
O       10.1.1 .0 [110/20] vi a 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  à 查看路由表,都也学到相关路由
 
     20.0.0 .0/24 is subnetted, 1 subnets
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
     10.0.0 .0/24 is subnetted, 1 subnets
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

你可能感兴趣的:(配置,ospf,ccnp,MPLS,ISCW)