HCIA静态路由综合实验

实验题目

在这里插入图片描述

一、首要的是“IP地址的规划”

首先,子网划分最多划分到 “/30” ,那么主机位就省下两个,即 “01 和 10” 因为主机位全0全1都是不可用的,那么其存在的意义就特别适合骨干网段因为骨干网段就只需要两个IP
地址规划是为了后期好汇总防止黑洞的产生,所以R1-R4每个路由器的两个环回接口可以看成汇总后的一个总接口,而骨干网段都可以看成 “/30” 网段,所以一共有 “R1-R4加主干”5个网段所以要借3位因为两位的话2的2次方才4个网段,不够5个网段,所以要3为,即2的3次方8个网段
所以一下就是划分的网段

192.168.1.0/27 — 骨干
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   192.168.1.24/30    192.168.1.28/30

然后R1-R4继续划分两个环回接口

192.168.1.32/27 — R1   192.168.1.32/28    192.168.1.48/28
192.168.1.64/27 — R2   192.168.1.64/28    192.168.1.80/28
192.168.1.96/27 — R3   192.168.1.96/28    192.168.1.112/28
192.168.1.128/27 — R4   192.168.1.128/28     192.168.1.144/28

下面3个是预留IP,因为未来网络会升级扩大,所以该3个IP并没有浪费

192.168.1.160/27
192.168.1.192/27
192.168.1.224/27

下图为规划图
在这里插入图片描述

IP地址配置

R1配置

< Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
Jul 13 2021 21:31:12-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
Jul 13 2021 21:31:35-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-GigabitEthernet0/0/1]q
[r1]int loopback 0
[r1-LoopBack0]ip add 192.168.1.33 28
[r1-LoopBack0]int loopback 1
[r1-LoopBack1]ip add 192.168.1.49 28
[r1-LoopBack1]q
[r1]display ip interface brief       #查看配置情况
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/30 up up
GigabitEthernet0/0/1 192.168.1.5/30 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.33/28 up up(s)
LoopBack1 192.168.1.49/28 up up(s)
NULL0 unassigned up up(s)
[r1]

R2配置

< Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
Jul 13 2021 21:37:41-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 g 0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
Jul 13 2021 21:38:14-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 loopback 0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]int loopback 1
[r2-LoopBack1]ip address 192.168.1.81 28
[r2-LoopBack1]q
[r2]display ip interface brief        #查看配置情况
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.2/30 up up
GigabitEthernet0/0/1 192.168.1.9/30 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.65/28 up up(s)
LoopBack1 192.168.1.81/28 up up(s)
NULL0 unassigned up up(s)

R3配置

< Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r3
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
Jul 13 2021 21:43:57-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 g 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
Jul 13 2021 21:44:16-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 loopback 0
[r3-LoopBack0]ip address 192.168.1.97 28
[r3-LoopBack0]int loopbcak 1
[r3-LoopBack1]ip address 192.168.1.113 28
[r3-LoopBack1]q
[r3]display ip interface brief        #查看配置情况
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.6/30 up up
GigabitEthernet0/0/1 192.168.1.13/30 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.97/28 up up(s)
LoopBack1 192.168.1.113/28 up up(s)
NULL0 unassigned up up(s)

R4配置

< Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r4
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
Jul 13 2021 21:47:21-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 g 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
Jul 13 2021 21:47:52-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 loopback 0
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack0]int loopback 1
[r4-LoopBack1]ip address 192.168.1.145 28
[r4-LoopBack1]int g 0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
Jul 13 2021 21:48:41-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 g 4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
[r4-GigabitEthernet4/0/0]
Jul 13 2021 21:49:33-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]display ip interface brief        #查看配置情况
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 7
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 7
The number of interface that is DOWN in Protocol is 0
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.14/30 up up
GigabitEthernet0/0/1 192.168.1.10/30 up up
GigabitEthernet0/0/2 192.168.1.17/30 up up
GigabitEthernet4/0/0 192.168.1.21/30 up up
LoopBack0 192.168.1.129/28 up up(s)
LoopBack1 192.168.1.145/28 up up(s)
NULL0 unassigned up up(s)

R5配置

< Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r5
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]
[r5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
Jul 13 2021 21:53:52-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 g 0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.1.22 30
[r5-GigabitEthernet0/0/1]
Jul 13 2021 21:54:09-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]int l0
[r5-LoopBack0]ip address 5.5.5.5 24
[r5-LoopBack0]q
[r5]display ip interface brief        #查看配置情况
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.18/30 up up
GigabitEthernet0/0/1 192.168.1.22/30 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 5.5.5.5/24 up up(s)
NULL0 unassigned up up(s)

链路连接

R1配置

< r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.6
[r1]ip route-static 192.168.1.16 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 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 27 192.168.1.6

R2配置

< r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]ip route-static 192.168.1.128 27 192.168.1.10
[r2]ip route-static 192.168.1.16 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.96 27 192.168.1.10
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip route-static 192.168.1.32 27 192.168.1.1

R3配置

< r3>sys
Enter system view, return user view with Ctrl+Z.
[r3]ip route-static 192.168.1.32 27 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 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 192.168.1.8 30 192.168.1.14
[r3]ip route-static 192.168.1.128 27 192.168.1.14
[r3]ip route-static 192.168.1.16 30 192.168.1.14

R4配置

< r4>system-view
Enter system view, return user view with Ctrl+Z.
[r4]ip route-static 192.168.1.96 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 27 192.168.1.13
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.64 27 192.168.1.9

R5配置

< r5>system-view
Enter system view, return user view with Ctrl+Z.
[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.1
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.1

配置缺省

R1配置

< r1>system-view
Enter system view, return user view with Ctrl+Z.
[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>system-view
Enter system view, return user view with Ctrl+Z.
[r2]ip route-static 0.0.0.0 0 192.168.1.10

R3配置

< r3>system-view
Enter system view, return user view with Ctrl+Z.
[r3]ip route-static 0.0.0.0 0 192.168.1.14

R4配置

< r4>system-view
Enter system view, return user view with Ctrl+Z.
[r4]ip route-static 0.0.0.0 0 192.168.1.18

题4中说“避免环路”

那么R1-R4要配置空接口

R1配置

< r1>sys
Enter system view, return user view with Ctrl+Z.
[r1]ip rou 192.168.1.32 27 nu0

R2配置

< r2>sys
Enter system view, return user view with Ctrl+Z.
[r2]ip rou 192.168.1.64 27 nu0

R3配置

< r3>sys
Enter system view, return user view with Ctrl+Z.
[r3]ip rou 192.168.1.96 27 nu0

R4配置

< r4>sys
Enter system view, return user view with Ctrl+Z.
[r4]ip rou 192.168.1.128 27 nu0

题5要求配置

R1配置

< r1>system-view
Enter system view, return user view with Ctrl+Z.
[r1]ip rou 192.168.1.20 30 192.168.1.2
[r1]ip rou 192.168.1.20 30 192.168.1.6

R2配置

< r2>system-view
Enter system view, return user view with Ctrl+Z.
[r2]ip rou 192.168.1.20 30 192.168.1.10

R3配置

< r3>system-view
Enter system view, return user view with Ctrl+Z.
[r3]ip rou 192.168.1.20 30 192.168.1.14

R4配置

< r4>system-view
Enter system view, return user view with Ctrl+Z.
[r4]ip rou 0.0.0.0 0 192.168.1.22 pre 61

R5配置

< r5>system-view
Enter system view, return user view with Ctrl+Z.
[r5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 pre 61

以上操作基本就把该实验完成了
最后验证就需要断开R4的0/0/2口进行测试

< r4>system-view
Enter system view, return user view with Ctrl+Z.
[r4]int g 0/0/2
[r4-GigabitEthernet0/0/2]shutdown
Jul 14 2021 00:03:41-08:00 r4 %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEthern
et0/0/2 has turned into DOWN state.

利用R1来ping

< r1>ping 5.5.5.5
PING 5.5.5.5: 56 data bytes, press CTRL_C to break
Request time out
Reply from 5.5.5.5: bytes=56 Sequence=2 ttl=253 time=50 ms
Reply from 5.5.5.5: bytes=56 Sequence=3 ttl=253 time=50 ms
Reply from 5.5.5.5: bytes=56 Sequence=4 ttl=253 time=30 ms
Reply from 5.5.5.5: bytes=56 Sequence=5 ttl=253 time=30 ms
— 5.5.5.5 ping statistics —
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 30/40/50 ms

能ping通,那么实验完成。

猜你喜欢

转载自blog.csdn.net/Nirvana92/article/details/131858593
今日推荐