HUAWEI——动态路由(RIPv2)
程序员文章站
2024-03-21 08:59:16
...
实验名称:
动态路由(RIPv2)试验
实验拓扑:
实验目的:
使用动态路由协议RIPv2使全网互通,PC1可以ping通PC2
实验步骤:
- 开启所有设备;
- 规划拓扑,划分网段(如拓扑图所示);
- 配置接口地址以及PC1和PC2的IP地址、子网掩码、网关;
- 进入AR1,运行RIP,版本2,关闭自动汇总,宣告直连网段192.168.1.0和12.0.0.0;
- 进入AR2,运行RIP,版本2,关闭自动汇总,宣告直连网段12.0.0.0和23.0.0.0;
- 进入AR3,运行RIP,版本2,关闭自动汇总,宣告直连网段192.168.2.0和23.0.0.0;
- 查看每个路由器的路由表
- 测试,打开PC1命令行,ping192.168.2.2;
实验命令:
AR1:
<Huawei>system-view
[Huawei]sysname r2
[r2]int GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/1]ip address 192.168.1.1 24
[r2-GigabitEthernet0/0/1]quit
[r2]int GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[r2-GigabitEthernet0/0/0]quit
[r2]rip 10
[r2-rip-10]version 2
[r2-rip-10]undo summary
[r2-rip-10]network 192.168.1.0
[r2-rip-10]network 12.0.0.0
[r2-rip-10]quit
AR2:
<Huawei>system-view
[Huawei]sysname r2
[r2]int GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/1]ip address 12.1.1.2 24
[r2-GigabitEthernet0/0/1]quit
[r2]int GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/0]ip address 23.1.1.1 24
[r2-GigabitEthernet0/0/0]quit
[r2]rip 10
[r2-rip-10]version 2
[r2-rip-10]undo summary
[r2-rip-10]network 12.0.0.0
[r2-rip-10]network 23.0.0.0
[r2-rip-10]quit
AR3:
<Huawei>system-view
[Huawei]sysname r2
[r2]int GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/1]ip address 23.1.1.2 24
[r2-GigabitEthernet0/0/1]quit
[r2]int GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[r2-GigabitEthernet0/0/0]quit
[r2]rip 10
[r2-rip-10]version 2
[r2-rip-10]undo summary
[r2-rip-10]network 192.168.2.0
[r2-rip-10]network 23.0.0.0
[r2-rip-10]quit
实验验证:
R1路由器路由表:
[r1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Direct 0 0 D 12.1.1.1 GigabitEthernet0/0/1
12.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
12.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
23.1.1.0/24 RIP 100 1 D 12.1.1.2 GigabitEthernet0/0/1
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
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.1 GigabitEthernet0/0/0
192.168.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
192.168.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
192.168.2.0/24 RIP 100 2 D 12.1.1.2 GigabitEthernet0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
R2路由器路由表:
[r2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 Direct 0 0 D 12.1.1.2 GigabitEthernet0/0/0
12.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
12.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
23.1.1.0/24 Direct 0 0 D 23.1.1.1 GigabitEthernet0/0/1
23.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
23.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
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
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 RIP 100 1 D 12.1.1.1 GigabitEthernet0/0/0
192.168.2.0/24 RIP 100 1 D 23.1.1.2 GigabitEthernet0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
R3路由器路由表:
[r3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
12.1.1.0/24 RIP 100 1 D 23.1.1.1 GigabitEthernet0/0/0
23.1.1.0/24 Direct 0 0 D 23.1.1.2 GigabitEthernet0/0/0
23.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
23.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/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
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 RIP 100 2 D 23.1.1.1 GigabitEthernet0/0/0
192.168.2.0/24 Direct 0 0 D 192.168.2.1 GigabitEthernet0/0/1
192.168.2.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
192.168.2.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0