192.168.1.0/24 划分8个网段
192.168.1.000 00000/27 ---骨干
192.168.1.000 000 00/30 192.168.1.0/30
192.168.1.000 001 00/30 192.168.1.4/30
192.168.1.000 010 00/30 192.168.1.8/30
192.168.1.000 011 00/30 192.168.1.12/30
192.168.1.000 100 00/30 192.168.1.16/30
192.168.1.000 101 00/30 192.168.1.20/30
192.168.1.000 110 00/30
192.168.1.000 111 00/30
192.168.1.001 00000/27 ---R1
192.168.1.001 0 0000/28 192.168.1.32/28
192.168.1.001 1 0000/28 192.168.1.48/28
192.168.1.001 00000/27 ---R2
192.168.1.001 0 0000/28 192.168.1.64/28
192.168.1.001 1 0000/28 192.168.1.80/28
192.168.1.011 00000/27 ---R3 192.168.1.96/27
192.168.1.100 00000/27 ---R4
192.168.1.100 0 0000/28 192.168.1.128/28
192.168.1.100 1 0000/28 192.168.1.144/28
192.168.1.101 00000/27 ---R5 192.168.1.160/27
192.168.1.110 00000/27
192.168.1.111 00000/27
R1
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
Mar 24 2022 14:16:45-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 g 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
Mar 24 2022 14:17:07-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]q
[r1]int l0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]int l1
[r1-LoopBack1]ip address 192.168.1.49 28
[r1-LoopBack1]q
[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
[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 19.168.1.12 30 192.168.1.6
[r1]ip route-static 192.168.1.96 27 192.168.1.6
[r1]display this
[V200R003C00]
#
sysname r1
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
ip route-static 0.0.0.0 0.0.0.0 192.168.1.6
ip route-static 19.168.1.12 255.255.255.252 192.168.1.6
ip route-static 192.168.1.8 255.255.255.252 192.168.1.2
ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
#
return
[r1]ip route-static 192.168.1.32 27 NULL 0
[r1]aaa
[r1-aaa]local-user zyy
access-limit Set access limit of user(s)
ftp-directory Set user(s) FTP directory permitted
idle-timeout Set the timeout period for terminal user(s)
password Set password
privilege Set admin user(s) level
service-type Service types for authorized user(s)
state Activate/Block the user(s)
user-group User group
[r1-aaa]local-user zyy privilege level 15 password cipher 021117
[r1-aaa]local-user zyy service-type telnet
[r1-aaa]q
[r1]user-interface vty 0 4
[r1-ui-vty0-4]authentication-mode aaa
[r1-ui-vty0-4]q
R2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
Mar 24 2022 14:18:24-08:00 r2 %%01IFNET/4/LINK_STATE(l)[2]: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
Mar 24 2022 14:18:49-08:00 r2 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r2-GigabitEthernet0/0/1]int l0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]int l1
[r2-LoopBack1]ip address 192.168.1.81 28
[r2-LoopBack1]q
[r2]ip route-static 0.0.0.0 0 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
[r2]display this
[V200R003C00]
#
sysname r2
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.10
ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
#
return
[r2] ip route-static 192.168.1.64 27 NULL 0
R3
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
Mar 24 2022 14:20:10-08:00 r3 %%01IFNET/4/LINK_STATE(l)[3]: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
Mar 24 2022 14:20:34-08:00 r3 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r3-GigabitEthernet0/0/1]int g 0/0/2
[r3-GigabitEthernet0/0/2]ip address 192.168.1.97 27
[r3-GigabitEthernet0/0/2]q
[r3]dhcp enable ip pool aa
[r3-ip-pool-aa]network 192.168.1.96 mask 27
[r3-ip-pool-aa]gateway-list 192.168.1.97
[r3-ip-pool-aa]q
[r3]int g 0/0/2
[r3-GigabitEthernet0/0/2]dhcp select global
[r3]ip route-static 0.0.0.0 0 192.168.1.14
[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] display this
[V200R003C00]
#
sysname r3
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.14
ip route-static 192.168.1.32 255.255.255.252 192.168.1.5
ip route-static 192.168.1.0 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.14
#
return
[r3]
R4
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
Mar 24 2022 14:26:58-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
Mar 24 2022 14:27:26-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 g 0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
[r4-GigabitEthernet0/0/2]int g 4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
[r4-GigabitEthernet4/0/0]int l0
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack0]int l1
[r4-LoopBack1]ip address 192.168.1.145 28
[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 preference 61
[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
[r4] display this
[V200R003C00]
#
sysname r4
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.18
ip route-static 0.0.0.0 0.0.0.0 192.168.1.22 preference 61
ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
ip route-static 192.168.1.4 255.255.255.252 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
ip route-static 192.168.1.96 255.255.255.224 192.168.1.13
#
return
[r4]ip route-static 192.168.1.0 24 NULL 0
[r4]ip route-static 192.168.1.160 27 192.168.1.18
[r4]ip route-static 192.168.1.160 27 192.168.1.22 preference 61
[r4]ip route-static 0.0.0.0 0 GigabitEthernet 0/0/2 192.168.1.18
R5
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
Mar 24 2022 14:32: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 g 0/0/2
[r5-GigabitEthernet0/0/2]ip address 192.168.1.22 30
[r5-GigabitEthernet0/0/2]int l0
[r5-LoopBack0]ip address 192.168.1.161 27
[r5]ip route-static 0.0.0.0 0 12.0.0.2
[r5]ip route-static 192.168.1.0 24 192.168.1.17
[r5]ip route-static 192.168.1.0 24 192.168.1.21 preference
[r5]ip route-static 192.168.1.
[r5]acl 2000
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5-acl-basic-2000]q
[r5]int g 0/0/1
[r5-GigabitEthernet0/0/1]nat outbound 2000
[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 inside 192.168.1.1 23
Warning:The port 23 is well-known port.If you continue it may cause function failure.
Are you sure to continue?[Y/N]:y
[r5-GigabitEthernet0/0/1]
R6
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys isp
[isp]int g 0/0/0
[isp-GigabitEthernet0/0/0]ip address 12.0.0.2 24
Mar 24 2022 14:44:02-08:00 isp %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[isp-GigabitEthernet0/0/0]int l0
[isp-LoopBack0]ip address 1.1.1.1 24
[isp-LoopBack0]q
[isp]telnet 12.0.0.1
Press CTRL_] to quit telnet mode
Trying 12.0.0.1 ...
Connected to 12.0.0.1 ...
Login authentication
Username:zyy
Password:
-----------------------------------------------------------------------------
User last login information:
-----------------------------------------------------------------------------
Access Type:Telnet
IP-Address :192.168.1.2
Time :2022-03-23 09:43:07-08:00
-----------------------------------------------------------------------------
<r1>