实验介绍
设备:路由器 6台
线若干
实验目的:
通过本次试验,实现多区域的不同路由协议之间的通讯
简介:
设备名称 | 接口 e0/0/0 | S0/0/0 | S0/0/1 | S0/0/2 |
Ar1 | 192.168.1.1/24 | 192.168.2.1/24 | ||
Ar2 | 192.168.2.2/24 | 192.168.3.1/24 | 192.168.5.1/24 | |
Ar3 | 192.168.3.2/24 | 192.168.4.1/24 | ||
Ar4 | 192.168.7.1/24 | 192.168.4.2/24 | ||
Ar5 | 192.168.5.2/24 | 192.168.6.1/24 | ||
Ar6 | 192.168.8.1/24 | 192.168.6.2/24 |
注:area2 设置了完全末节区域路由
Ar5 ar6 和ar2的s0/0/2端口使用的是rip协议
实验拓扑图:
R1配置
[Huawei]int e0/0/0
[Huawei-Ethernet0/0/0]ip add 192.168.1.1 24
[Huawei-Ethernet0/0/0]loopback lo
[Huawei-Ethernet0/0/0]int s0/0/0
[Huawei-Serial0/0/0]ip add 192.168.2.1 24
[Huawei-Serial0/0/0]ospf enable area 1
[Huawei]ospf
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]net
[Huawei-ospf-1-area-0.0.0.1]network 192.168.1.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.1]network 192.168.2.1 0.0.0.0
R2配置
Huawei]int s0/0/0
[Huawei-Serial0/0/0]ip add 192.168.2.2 24
[Huawei-Serial0/0/0]ospf enable area 1
[Huawei-Serial0/0/0]int s0/0/01
[Huawei-Serial0/0/1]ip add 192.168.3.1 24
[Huawei-Serial0/0/1]ospf enable area 0
[Huawei-Serial0/0/1]quit
[Huawei]ospf
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]net
[Huawei-ospf-1-area-0.0.0.1]network 192.168.2.2 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.3.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]int s0/0/2
[Huawei-Serial0/0/2]ip add 192.168.5.1 24
[Huawei-Serial0/0/2]rip
[Huawei-rip-1]network 192.168.5.0
[Huawei-rip-1]default-route originate
R3配置
[Huawei]int s0/0/0
[Huawei-Serial0/0/0]ip add 192.168.3.2 24
[Huawei-Serial0/0/0]ospf enable area 0
[Huawei-Serial0/0/0]int s0/0/1
[Huawei-Serial0/0/1]ip add 192.168.4.1 24
[Huawei-Serial0/0/1]ospf enable area 2
[Huawei-Serial0/0/1]qui
[Huawei]ospf
[Huawei-ospf-1-area-0.0.0.0]network 192.168.3.2 0.0.0.0
[Huawei-ospf-1]area 2
[Huawei-ospf-1-area-0.0.0.2]network 192.168.4.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.2]stub no-summary
R4配置
[Huawei]int s0/0/0
[Huawei-Serial0/0/0]ip add 192.168.4.2 24
[Huawei-Serial0/0/0]ospf enable area 2
[Huawei-Serial0/0/0]int e0/0/0
[Huawei-Ethernet0/0/0]ip add 192.168.7.1 24
[Huawei-Ethernet0/0/0]loopback lo
[Huawei-Ethernet0/0/0]qui
[Huawei]ospf
[Huawei-ospf-1]area 2
[Huawei-ospf-1-area-0.0.0.2]network 192.168.4.2 0.0.0.0
[Huawei-ospf-1-area-0.0.0.2]network 192.168.7.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.2]stub no-summary
R5配置
[Huawei]int s0/0/0
[Huawei-Serial0/0/0]ip add 192.168.5.2 24
[Huawei-Serial0/0/0]int s0/0/1
[Huawei-Serial0/0/1]ip add 192.168.6.1 24
[Huawei-Serial0/0/1]rip
[Huawei-rip-1]network 192.168.5.0
[Huawei-rip-1]network 192.168.6.0
R6配置
[Huawei]int e0/0/0
[Huawei-Ethernet0/0/0]ip add 192.168.8.1 24
[Huawei-Ethernet0/0/0]loopback lo
[Huawei-Ethernet0/0/0]int s0/0/0
[Huawei-Serial0/0/0]ip add 192.168.6.2 24
[Huawei-Serial0/0/0]rip
[Huawei-rip-1]network 192.168.6.0
[Huawei-rip-1]network 192.168.8.0
查看r1 路由表
<Huawei>dis ip rou
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.1 Ethernet0/0/0
192.168.1.1/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/0
192.168.2.0/24 Direct 0 0 D 192.168.2.1 Serial0/0/0
192.168.2.1/32 Direct 0 0 D 127.0.0.1 Serial0/0/0
192.168.2.2/32 Direct 0 0 D 192.168.2.2 Serial0/0/0
192.168.3.0/24 OSPF 10 3124 D 192.168.2.2 Serial0/0/0
192.168.4.0/24 OSPF 10 4686 D 192.168.2.2 Serial0/0/0
192.168.5.0/24 O_ASE 150 1 D 192.168.2.2 Serial0/0/0
192.168.6.0/24 O_ASE 150 1 D 192.168.2.2 Serial0/0/0
192.168.7.0/24 OSPF 10 4687 D 192.168.2.2 Serial0/0/0
192.168.8.0/24 O_ASE 150 1 D 192.168.2.2 Serial0/0/0
查看r2路由表
<Huawei>dis ip rou
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 16 Routes : 16
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 OSPF 10 1563 D 192.168.2.1 Serial0/0/0
192.168.2.0/24 Direct 0 0 D 192.168.2.2 Serial0/0/0
192.168.2.1/32 Direct 0 0 D 192.168.2.1 Serial0/0/0
192.168.2.2/32 Direct 0 0 D 127.0.0.1 Serial0/0/0
192.168.3.0/24 Direct 0 0 D 192.168.3.1 Serial0/0/1
192.168.3.1/32 Direct 0 0 D 127.0.0.1 Serial0/0/1
192.168.3.2/32 Direct 0 0 D 192.168.3.2 Serial0/0/1
192.168.4.0/24 OSPF 10 3124 D 192.168.3.2 Serial0/0/1
192.168.5.0/24 Direct 0 0 D 192.168.5.1 Serial0/0/2
192.168.5.1/32 Direct 0 0 D 127.0.0.1 Serial0/0/2
192.168.5.2/32 Direct 0 0 D 192.168.5.2 Serial0/0/2
192.168.6.0/24 RIP 100 1 D 192.168.5.2 Serial0/0/2
192.168.7.0/24 OSPF 10 3125 D 192.168.3.2 Serial0/0/1
192.168.8.0/24 RIP 100 2 D 192.168.5.2 Serial0/0/2
查看r3路由表
<Huawei>dis ip rou
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 OSPF 10 3125 D 192.168.3.1 Serial0/0/0
192.168.2.0/24 OSPF 10 3124 D 192.168.3.1 Serial0/0/0
192.168.3.0/24 Direct 0 0 D 192.168.3.2 Serial0/0/0
192.168.3.1/32 Direct 0 0 D 192.168.3.1 Serial0/0/0
192.168.3.2/32 Direct 0 0 D 127.0.0.1 Serial0/0/0
192.168.4.0/24 Direct 0 0 D 192.168.4.1 Serial0/0/1
192.168.4.1/32 Direct 0 0 D 127.0.0.1 Serial0/0/1
192.168.4.2/32 Direct 0 0 D 192.168.4.2 Serial0/0/1
192.168.5.0/24 O_ASE 150 1 D 192.168.3.1 Serial0/0/0
192.168.6.0/24 O_ASE 150 1 D 192.168.3.1 Serial0/0/0
192.168.7.0/24 OSPF 10 1563 D 192.168.4.2 Serial0/0/1
192.168.8.0/24 O_ASE 150 1 D 192.168.3.1 Serial0/0/0
查看r4路由表
<Huawei>dis ip rou
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 OSPF 10 1563 D 192.168.4.1 Serial0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.4.0/24 Direct 0 0 D 192.168.4.2 Serial0/0/0
192.168.4.1/32 Direct 0 0 D 192.168.4.1 Serial0/0/0
192.168.4.2/32 Direct 0 0 D 127.0.0.1 Serial0/0/0
192.168.7.0/24 Direct 0 0 D 192.168.7.1 Ethernet0/0/0
192.168.7.1/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/0
查看r5 路由表
<Huawei>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 RIP 100 1 D 192.168.5.1 Serial0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.5.0/24 Direct 0 0 D 192.168.5.2 Serial0/0/0
192.168.5.1/32 Direct 0 0 D 192.168.5.1 Serial0/0/0
192.168.5.2/32 Direct 0 0 D 127.0.0.1 Serial0/0/0
192.168.6.0/24 Direct 0 0 D 192.168.6.1 Serial0/0/1
192.168.6.1/32 Direct 0 0 D 127.0.0.1 Serial0/0/1
192.168.6.2/32 Direct 0 0 D 192.168.6.2 Serial0/0/1
192.168.8.0/24 RIP 100 1 D 192.168.6.2 Serial0/0/1
查看r6路由表
<Huawei>dis ip rou
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 RIP 100 2 D 192.168.6.1 Serial0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.5.0/24 RIP 100 1 D 192.168.6.1 Serial0/0/0
192.168.6.0/24 Direct 0 0 D 192.168.6.2 Serial0/0/0
192.168.6.1/32 Direct 0 0 D 192.168.6.1 Serial0/0/0
192.168.6.2/32 Direct 0 0 D 127.0.0.1 Serial0/0/0
192.168.8.0/24 Direct 0 0 D 192.168.8.1 Ethernet0/0/0
192.168.8.1/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/0