题目
解决步骤
- 划分网段
基于192.168.1.0/24网段,分为骨干链路(路由器直接相连)和环回链路。将192.168.1.0/24分为两个网段,一个配置骨干链路(192.168.1.0/25),一个配置环回链路(192.168.1.128/24)。
- 骨干链路一共两个网段。因为骨干链路一共就两个ip分配给两个路由的接口,所以主机位就2位(因为主机位全0和全1不能分配)该网段应为192.168.1.0/30和192.168.1.4/30。
- 环回链路一共四个网段,AR1和AR2分别有两个环回接口。先分别分配两个网段给路由,再从中分配两个网段给路由。AR1(192.168.1.128/27和192.168.1.160/27),AR2(192.168.1.192/27和192.168.1.224/27)
2.分配接口ip
- 配置AR1的接口
<Huawei>sy
[Huawei]sysname AR1
[AR1]interface g 0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
Jan 29 2024 17:36:16-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[AR1-GigabitEthernet0/0/0]q
[AR1]interface LoopBack 0
[AR1-LoopBack0]ip address 192.168.1.129 27
[AR1-LoopBack0]q
[AR1]interface LoopBack 1
[AR1-LoopBack1]ip address 192.168.1.177 27
[AR1-LoopBack1]q
[AR1]
<AR1>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
- 配置AR2接口
<Huawei>system-view
[Huawei]sysname AR2
[AR2]interface GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[AR2-GigabitEthernet0/0/0]q
[AR2]interface g 0/0/1
[AR2-GigabitEthernet0/0/1]ip address 192.168.1.5 30.
[AR2-GigabitEthernet0/0/1]q
[AR2]interface LoopBack 0
[AR2-LoopBack0]ip address 192.168.1.193 27
[AR2-LoopBack0]q
[AR2]interface LoopBack 1
[AR2-LoopBack1]ip address 192.168.1.225 27
[AR2-LoopBack1]q
<AR2>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
- 配置AR3接口
<Huawei>system-view
[Huawei]sysname AR3
[AR3]interface g 0/0/0
[AR3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[AR3-GigabitEthernet0/0/0]q
[AR3]interface LoopBack 0
[AR3-LoopBack0]ip address 3.3.3.1 24
[AR3-LoopBack0]q
[AR3]
<AR3>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
3.ip宣告
- AR1
[AR1-rip-1]network 192.168.1.0//宣告ip主类(A类地址前8位,B类前16,C类前24)
- AR2
<AR2>system-view
[AR2]rip 1
[AR2-rip-1]version 2
[AR2-rip-1]undo summary //关闭自动汇总
[AR2-rip-1]network 192.168.1.0
<AR2>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
- AR3
<AR3>system-view
[AR3]rip 1
[AR3-rip-1]version 2
[AR3-rip-1]network 192.168.1.0
[AR3-rip-1]network 0.0.0.0
[AR3-rip-1]
<AR3>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y