实验要求:
1.除了R5的环回地址固定5.5.5.0/24,其他网段基于192.168.1.0/24进行合理划分;
2.R1-R4每个路由器存在两个环回接口,模拟PC,地址也在192.168.1.0/24网络内;
3.R1-R4不能直接编写到达5.5.5.0/24的静态路由,但依然可以访问;
4.全网可达,尽量减少每台路由器路由条目数量,避免环路;
5.R4与R5间,正常1000M链路通信,故障时自动改为100M
实验步骤:
2、配置IP地址部分和环回口地址
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
Jun 19 2023 01:34:16-08:00 R1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
Jun 19 2023 01:34:45-08:00 R1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]quit
[R1]int lo
[R1]int LoopBack 0
[R1-LoopBack0]ip add 192.168.1.33 28
[R1-LoopBack0]q
[R1]int lo
[R1]int LoopBack 1
[R1-LoopBack1]ip add 192.168.1.49 28
[R1-LoopBack1]q
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.1.1 30
Jun 19 2023 01:44:38-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R2-GigabitEthernet0/0/0]
[R2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
Jun 19 2023 01:46:18-08:00 R2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R2-GigabitEthernet0/0/1]q
[R2]int lo
[R2]int LoopBack 0
[R2-LoopBack0]ip add 192.168.1.65 28
[R2-LoopBack0]q
[R2]int lo
[R2]int LoopBack 1
[R2-LoopBack1]ip add 192.168.1.81 28
[R2-LoopBack1]q
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.1.13 30
Jun 19 2023 01:52:12-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.1.6 30
Jun 19 2023 01:52:36-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R3-GigabitEthernet0/0/1]q
[R3]int lo
[R3]int LoopBack 0
[R3-LoopBack0]ip add 192.168.1.97 28
[R3-LoopBack0]q
[R3]int lo
[R3]int LoopBack 1
[R3-LoopBack1]ip add 192.168.1.113 28
[R3-LoopBack1]q
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.1.10 30
Jun 19 2023 01:59:31-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.1.14 30
Jun 19 2023 02:00:01-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
[R4-GigabitEthernet0/0/2]
Jun 19 2023 02:00:35-08:00 R4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[R4-GigabitEthernet0/0/2]int g4/0/0
[R4-GigabitEthernet4/0/0]ip add 192.168.1.21 30
[R4-GigabitEthernet4/0/0]
Jun 19 2023 02:01:08-08:00 R4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet4/0/0 has entered the UP state.
[R4-GigabitEthernet4/0/0]q
[R4]int lo
[R4]int LoopBack 0
[R4-LoopBack0]ip add 192.168.1.129 28
[R4-LoopBack0]q
[R4]int lo
[R4]int LoopBack 1
[R4-LoopBack1]ip add 192.168.1.145 28
[R4-LoopBack1]q
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
Jun 19 2023 02:04:27-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R5-GigabitEthernet0/0/0]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 192.168.1.22 30
Jun 19 2023 02:04:58-08:00 R5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R5-GigabitEthernet0/0/1]q
[R5]int lo
[R5]int LoopBack 0
[R5-LoopBack0]ip add 5.5.5.5 24
[R5-LoopBack0]q
3、设置静态路由
分别给R1、R2、R3、R4、R5设置静态电路,按顺时针的方向
3、设置静态路由
分别给R1、R2、R3、R4、R5设置静态电路,按顺时针的方向
但R1、R2、R3、R4都需要给R5一条缺省路由,若不给则
正常来说不管在那个路由器上要都是能通的
所以要分别配缺省路由
能成功ping出5.5.5.5后就达到了全网通
4、检查路由器的路由表
设置防环回机制:
配置成功后,路由表里会出现防环的条目,接口是空接口
5、修改优先级
要实现故障时要从千兆自动变到百兆,修改优先级
R4有一个缺省路由,只要修改它的优先级大于60就能实现
6、测试
手动关闭R5的一个接口,再观察它的路由表,检验是否成功