一、实验要求
1.除R5环回地址固定以外,其他所有网段基于192.168.1.10/24进行合理的IP地址划分
2.R1-2-4路由器上均存在两个环回,用来模拟用户网段,地址使用192.168.1.0/24划分
3.R1-R4上不能直接写去往5.5.5.5/24网段路由,但仍可访问
4.全网可达,尽量减少每台路由表路由条目
5.R4-R5之间,正常走1000M链路,故障走100M链路
6.PC1和PC2使用DHCP动态获取IP地址
二、实验拓扑
三、实验步骤
1.IP地址部署
骨干链路:
192.168.1.0 30
192.168.1.4 30
192.168.1.8 30
192.168.1.12 30
192.168.1.16 30
192.168.1.20 30
R3:
192.168.1.128 27
R5:
5.5.5.5 24
R1环回:
192.168.1.32 28
192.168.48 28
R2环回:
192.168.1.64 28
192.168.1.80 28
R4环回:
192.168.1.96 28
192.168.1.112 28
2.IP地址配置
R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
[R1-GigabitEthernet0/0/1]
Jul 10 2023 09:23:09-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1]int LoopBack 0
[R1-LoopBack0]ip add 192.168.1.33 28
[R1-LoopBack0]Q
[R1]INT L
[R1]INT LoopBack 1
[R1-LoopBack1]ip add 192.168.1.49 28
R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
Jul 10 2023 09:27:23-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]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
Jul 10 2023 09:27:41-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R2-GigabitEthernet0/0/1]q
[R2]int L
[R2]int LoopBack 0
[R2-LoopBack0]ip add 192.168.1.65 28
[R2-LoopBack0]int L
[R2-LoopBack0]q
[R2]int LoopBack 1
[R2-LoopBack1]ip add 192.168.1.81 28
R3
[R3]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 192.168.1.129 27
Jul 10 2023 09:35:17-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
Jul 10 2023 11:19:24-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.13 30
[R3-GigabitEthernet0/0/1]
Jul 10 2023 11:19:49-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state
R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.1.10 30
Jul 10 2023 09:33:22-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
[R4-GigabitEthernet0/0/1]
Jul 10 2023 09:33:47-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]q
[R4]int L
[R4]int LoopBack 0
[R4-LoopBack0]ip add 192.168.1.97 28
[R4-LoopBack0]q
[R4]int L
[R4]int LoopBack 1
[R4-LoopBack1]ip add 192.168.1.113 28[R4]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
[R4-GigabitEthernet0/0/2]
Jul 10 2023 09:48:49-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]: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]
Jul 10 2023 09:49:13-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet4/0/0 has entered the UP state.
R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
Jul 10 2023 09:50:17-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
Jul 10 2023 09:50:33-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 L
[R5]int LoopBack 0
[R5-LoopBack0]ip add 5.5.5.5 24
2.静态路由配置
R1
[R1]ip route-static 192.168.1.64 28 192.168.1.2
[R1]ip route-static 192.168.1.80 28 192.168.1.2
[R1]ip route-static 192.168.1.8 30 192.168.1.2
[R1]ip route-static 192.168.1.96 28 192.168.1.2
[R1]ip route-static 192.168.1.112 28 192.168.1.2
[R1]ip route-static 192.168.1.16 30 192.168.1.2
[R1]ip route-static 192.168.1.20 30 192.168.1.2
[R1]ip route-static 192.168.1.128 27 192.168.1.6
[R1]ip route-static 192.168.1.12 30 192.168.1.6
[R1]ip route-static 192.168.1.96 28 192.168.1.6
[R1]ip route-static 192.168.1.112 28 192.168.1.6
[R1]ip route-static 192.168.1.16 30 192.168.1.6
[R1]ip route-static 192.168.1.20 30 192.168.1.6
R2
[R2]ip route-static 192.168.1.96 28 192.168.1.10
[R2]ip route-static 192.168.1.112 28 192.168.1.10
[R2]ip route-static 192.168.1.16 30 192.168.1.10
[R2]ip route-static 192.168.1.20 30 192.168.1.10
[R2]ip route-static 192.168.1.12 30 192.168.1.10
[R2]ip route-static 192.168.1.128 27 192.168.1.10
[R2]ip route-static 192.168.1.32 28 192.168.1.1
[R2]ip route-static 192.168.1.48 28 192.168.1.1
[R2]ip route-static 192.168.1.4 30 192.168.1.1
[R2]ip route-static 192.168.1.128 27 192.168.1.1
R3
[R3]ip route-static 192.168.1.32 28 192.168.1.5
[R3]ip route-static 192.168.1.48 28 192.168.1.5
[R3]ip route-static 192.168.1.0 30 192.168.1.5
[R3]ip route-static 192.168.1.64 28 192.168.1.5
[R3]ip route-static 192.168.1.80 28 192.168.1.5
[R3]ip route-static 192.168.1.64 28 192.168.1.14
[R3]ip route-static 192.168.1.80 28 192.168.1.14
[R3]ip route-static 192.168.1.8 30 192.168.1.14
[R3]ip route-static 192.168.1.96 28 192.168.1.14
[R3]ip route-static 192.168.1.112 28 192.168.1.14
[R3]ip route-static 192.168.1.16 30 192.168.1.14
[R3]ip route-static 192.168.1.20 30 192.168.1.14
R4
[R4]ip route-static 192.168.1.64 28 192.168.1.9
[R4]ip route-static 192.168.1.80 28 192.168.1.9
[R4]ip route-static 192.168.1.0 30 192.168.1.9
[R4]ip route-static 192.168.1.32 28 192.168.1.9
[R4]ip route-static 192.168.1.48 28 192.168.1.9
[R4]ip route-static 192.168.1.128 27 192.168.1.13
[R4]ip route-static 192.168.1.4 30 192.168.1.13
[R4]ip route-static 192.168.1.32 28 192.168.1.13
[R4]ip route-static 192.168.1.48 28 192.168.1.13
R5
[R5]ip route-static 192.168.1.96 28 192.168.1.17
[R5]ip route-static 192.168.1.112 28 192.168.1.17
[R5]ip route-static 192.168.1.8 30 192.168.1.17
[R5]ip route-static 192.168.1.64 28 192.168.1.17
[R5]ip route-static 192.168.1.80 28 192.168.1.17
[R5]ip route-static 192.168.1.0 30 192.168.1.17
[R5]ip route-static 192.168.1.32 28 192.168.1.17
[R5]ip route-static 192.168.1.48 28 192.168.1.17
[R5]ip route-static 192.168.1.96 28 192.168.1.21
[R5]ip route-static 192.168.1.112 28 192.168.1.21
[R5]ip route-static 192.168.1.12 30 192.168.1.17
[R5]ip route-static 192.168.1.128 27 192.168.1.17
[R5]ip route-static 192.168.1.4 30 192.168.1.17
[R5]ip route-static 192.168.1.8 30 192.168.1.21
[R5]ip route-static 192.168.1.64 28 192.168.1.21
[R5]ip route-static 192.168.1.80 28 192.168.1.21
[R5]ip route-static 192.168.1.0 30 192.168.1.21
[R5]ip route-static 192.168.1.32 28 192.168.1.21
[R5]ip route-static 192.168.1.48 28 192.168.1.21
[R5]ip route-static 192.168.1.12 30 192.168.1.21
[R5]ip route-static 192.168.1.128 27 192.168.1.21
[R5]ip route-static 192.168.1.4 30 192.168.1.21
3.缺省路由
R1
[R1]ip route-static 0.0.0.0 0 192.168.1.2
[R1]ip route-static 0.0.0.0 0 192.168.1.6
R2
[R2]ip route-static 0.0.0.0 0 192.168.1.10
R3
[R3]ip route-static 0.0.0.0 0 192.168.1.14
R4
[R4]ip route-static 0.0.0.0 0 192.168.1.18
[R4]ip route-static 0.0.0.0 0 192.168.1.22
测试:
4.浮动luyou
[R5]ip route-static 192.168.1.96 28 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.112 28 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.8 30 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.64 28 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.80 28 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.0 30 192.168.1.18 preference 6
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.32 28 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.48 28 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.12 30 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.128 27 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R5]ip route-static 192.168.1.4 30 192.168.1.18 preference 61
Error: The next-hop address is invalid.
[R4]ip route-static 0.0.0.0 0 192.168.1.18 preference 61
Info: Succeeded in modifying route.
Jul 10 2023 11:39:25-08:00 R4 %%01RM/4/IPV4_DEFT_RT_CHG(l)[0]:IPV4 default Route
is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=GigabitEt
hernet0/0/2, Nexthop=192.168.1.18, Neighbour=0.0.0.0, Preference=1023410176, Lab
el=NULL, Metric=0)
测试:
5.DHCP
[R3]dhcp ena
[R3]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R3]ip pool a
Info: It's successful to create an IP address pool.
[R3-ip-pool-a]network 192.168.1.128 mask 27
[R3-ip-pool-a]gateway-list 192.168.1.129
[R3-ip-pool-a]dns-list 114.114.114.114 8.8.8.8
[R3-ip-pool-a]q
[R3]int g0/0/2
[R3-GigabitEthernet0/0/2]dhcp se
[R3-GigabitEthernet0/0/2]dhcp select g
[R3-GigabitEthernet0/0/2]dhcp select global
[R3-GigabitEthernet0/0/2]q
测试: