一.拓扑图
二.需求分析:
1.划分网段
2.配置ip
3.配HCP
4.配Telent
5.配路由;未知网段/汇总网段
6.缺省路由
7.空接口路由
8.浮动静态路由
三.操作
1.划分网段
192.168.1.0/24
192.168.1.000 00000 -- 192.168.1.0/27 --骨干
192.168.1.000 000 00 -- 192.168.1.0/30 -- 192.168.1.1-1.2
192.168.1.000 000 00
192.168.1.000 000 01
192.168.1.000 000 10
192.168.1.000 000 11
192.168.1.000 001 00 -- 192.168.1.4/30 -- 192.168.1.5-1.6
192.168.1.000 010 00 -- 192.168.1.8/30
192.168.1.000 011 00 -- 192.168.1.12/30
192.168.1.000 100 00 -- 192.168.1.16/30
192.168.1.000 101 00 -- 192.168.1.20/30
192.168.1.000 110 00
192.168.1.000 111 00
192.168.1.000 0000 -- 192.168.1.32/27 --R1 环回
192.168.1.001 0 0000 -- 192.168.1.32/28
192.168.1.001 0 0000 -- 192.168.1.48/28
192.168.1.000 00000 -- 192.168.1.64/27 -- R2环回
192.168.1.001 0 0000 -- 192.168.1.64/28
192.168.1.001 0 0000 -- 192.168.1.80/28
192.168.1.000 00000 -- 192.168.1.96/27 -- R3环回
192.168.1.001 0 0000 -- 192.168.1.96/28
192.168.1.001 0 0000 -- 192.168.1.112/28
192.168.1.000 00000 -- 192.168.1.128/27 -- R4环回
192.168.1.001 0 0000 -- 192.168.1.128/28
192.168.1.001 0 0000 -- 192.168.1.144/28
192.168.1.000 00000 -- 192.168.1.160/27
192.168.1.000 00000 -- 192.168.1.0/27
192.168.1.000 00000 -- 192.168.1.0/27
192.168.1.000 00000 -- 192.168.1.0/27
2.配置ip
RI
[Huawei]sysname R1
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
Jul 26 2024 15:41:48-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 add 192.168.1.5 30
Jul 26 2024 15:42:15-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]q
[R1]int LoopBack 1
[R1-LoopBack1]ip add 192.168.1.49 28
[R1-LoopBack1]
R2
[Huawei]sysname R2
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
Jul 26 2024 15:46:47-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 add 192.168.1.9 30
Jul 26 2024 15:47:29-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 0
[R2-LoopBack0]ip add 192.168.1.65 28
[R2-LoopBack0]int l 1
[R2-LoopBack1]ip add 192.168.1.81 28
[R2-LoopBack1]q
R3
R3]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
Jul 26 2024 23:11:35-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 add 192.168.1.13 30
Jul 26 2024 23:11:54-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 l 0
[R3-LoopBack0]ip add 192.168.1.97 28
[R3-LoopBack0]int l 1
[R3-LoopBack1]ip add 192.168.1.113 28
[R3-LoopBack1]q
R4
[R4]int g 0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.1.10 30
Jul 26 2024 23:15:03-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 add 192.168.1.14 30
Jul 26 2024 23:15:15-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 g 0/0/2
[R4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
[R4-GigabitEthernet0/0/2]
Jul 26 2024 23:18:37-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 add 192.168.1.21 30
[R4-GigabitEthernet4/0/0]
Jul 26 2024 23:19:35-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 l 0
[R4-LoopBack0]ip add 192.168.1.129 28
[R4-LoopBack0]int l 1
[R4-LoopBack1]ip add 192.168.1.145 28
[R4-LoopBack1]q
R5
[R5]int g 0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
Jul 26 2024 23:24:01-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 add 192.168.1.22 30
Jul 26 2024 23:24: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]int g 0/0/2
[R5-GigabitEthernet0/0/2]ip add 192.168.1.161 27
[R5-GigabitEthernet0/0/2]
Jul 26 2024 23:25:11-08:00 R5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[R5-GigabitEthernet0/0/2]
3.配HCP
R5
[R5]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R5]ip pool bb
Info: It's successful to create an IP address pool.
[R5-ip-pool-bb]network 192.168.1.160 mask 27
[R5-ip-pool-bb]gateway-list 192.168.1.161
[R5-ip-pool-bb]dns-list 8.8.8.8
[R5-ip-pool-bb]q
[R5]int g 0/0/2
[R5-GigabitEthernet0/0/2]dhcp select global
[R5-GigabitEthernet0/0/2]
PC1
PC2
4.配Telent
R2
[R2]user-interface vty 0 4
[R2-ui-vty0-4]authentication-mode aaa
[R2-ui-vty0-4]quit
[R2]aaa
[R2-aaa]local-user A2 password cipher admin
Info: Add a new user.
[R2-aaa]local-user A2 privilege level ?
INTEGER<0-15> Level value
[R2-aaa]local-user A2 privilege level 15
Info: Add a new user.
[R2-aaa]local-user A2 service-type telnet
[R2-aaa]
R3
[R3]user-interface vty 0 4
[R3-ui-vty0-4]authentication-mode aaa
[R3-ui-vty0-4]quit
[R3]aaa
[R3-aaa]local-user A3 password cipher admin
Info: Add a new user.
[R3-aaa]local-user A3 privilege level 15
[R3-aaa]local-user A3 service-type telnet
[R3-aaa]
R4
[R4]user-interface vty 0 4
[R4-ui-vty0-4]authentication-mode aaa
[R4-ui-vty0-4]quit
[R4]aaa
[R4-aaa]local-user A4 password cipher admin
Info: Add a new user.
[R4-aaa]local-user A4 privilege level 15
[R4-aaa]local-user A4 service-type telnet
[R4-aaa]
R5
[R5]user-interface vty 0 4
[R5-ui-vty0-4]authentication-mode aaa
[R5-ui-vty0-4]quit
[R5]aaa
[R5-aaa]local-user A5 password cipher admin
Info: Add a new user.
[R5-aaa]local-user A5 privilege level 15
[R5-aaa]local-user A5 service-type telnet
[R5-aaa]
R1
5.配路由;未知网段/汇总网段
R1
[R1]ip route-static 192.168.1.8 30 192.168.1.2
[R1]ip route-static 192.168.1.12 30 192.168.1.6
[R1]ip route-static 192.168.1.64 27 192.168.1.2
[R1]ip route-static 192.168.1.96 27 192.168.1.6
[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
R2
[R2]ip route-static 192.168.1.4 30 192.168.1.1
[R2]ip route-static 192.168.1.12 30 192.168.1.10
[R2]ip route-static 192.168.1.32 27 192.168.1.1
[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.128 27 192.168.1.10
R3
[R3]ip route-static 192.168.1.0 30 192.168.1.5
[R3]ip route-static 192.168.1.8 30 192.168.1.14
[R3]ip route-static 192.168.1.64 27 192.168.1.14
[R3]ip route-static 192.168.1.64 27 192.168.1.5
[R3]ip route-static 192.168.1.128 27 192.168.1.14
[R3]ip route-static 192.168.1.32 27 192.168.1.5
R4
[R4]ip route-static 192.168.1.0 30 192.168.1.9
[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.64 27 192.168.1.9
[R4]ip route-static 192.168.1.96 27 192.168.1.13
6.缺省路由
R5
[R5]ip route-static 192.168.1.0 30 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.17
[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.96 27 192.168.1.17
[R5]ip route-static 192.168.1.64 27 192.168.1.17
[R5]ip route-static 192.168.1.32 27 192.168.1.17
7.空接口路由
[R1]ip route-static 192.168.1.32 27 NULL 0
[R2]ip route-static 192.168.1.64 27 NULL 0
[R3]ip route-static 192.168.1.96 27 NULL 0
[R4]ip route-static 192.168.1.128 27 NULL 0
8.浮动静态路由
R5
[R5]ip route-static 192.168.1.0 30 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.4 30 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.8 30 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.12 30 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.32 27 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.64 27 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.96 27 192.168.1.21 pre 61
[R5]ip route-static 192.168.1.128 27 192.168.1.21 pre 61
R4
[R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61