1.全网可达
2.拓扑中所需地址全部基于192.168.0.0/24划分所得
3.静态路由(不许使用其他动态)
4.R8环回需要汇总
网段划分及各路由器的静态路由到达部分网段
1.全网可达
2.拓扑中所需地址全部基于192.168.0.0/24划分所得
3.静态路由(不许使用其他动态)
4.R8环回需要汇总
192.168.0.0/24
192.168.0.0/28
192.168.0.0/30
192.168.0.4/30
192.168.0.8/30
192.168.0.16/28
192.168.0.32/28
192.168.0.48/28
192.168.0.64/28
192.168.0.80/28
192.168.0.96/28
192.168.0.112/28
192.168.0.128/28
R1:
ip route-static 192.168.0.32 28 192.168.0.18
ip route-static 192.168.0.48 28 192.168.0.18
ip route-static 192.168.0.48 28 192.168.0.98
ip route-static 192.168.0.64 28 192.168.0.18
ip route-static 192.168.0.64 28 192.168.0.98
ip route-static 192.168.0.80 28 192.168.0.98
ip route-static 192.168.0.112 28 192.168.0.98
ip route-static 192.168.0.128 28 192.168.0.98
R2:
ip route-static 192.168.0.96 28 192.168.0.17
ip route-static 192.168.0.48 28 192.168.0.34
ip route-static 192.168.0.64 28 192.168.0.34
ip route-static 192.168.0.80 28 192.168.0.34
ip route-static 192.168.0.112 28 192.168.0.17
ip route-static 192.168.0.112 28 192.168.0.34
ip route-static 192.168.0.128 28 192.168.0.17
ip route-static 192.168.0.128 28 192.168.0.34
R3:
ip route-static 192.168.0.16 28 192.168.0.33
ip route-static 192.168.0.96 28 192.168.0.81
ip route-static 192.168.0.112 28 192.168.0.81
ip route-static 192.168.0.128 28 192.168.0.81
R4:
ip route-static 192.168.0.16 28 192.168.0.97
ip route-static 192.168.0.32 28 192.168.0.82
ip route-static 192.168.0.48 28 192.168.0.82
ip route-static 192.168.0.64 28 192.168.0.82
R5:
ip route-static 192.168.0.16 28 192.168.0.49
ip route-static 192.168.0.32 28 192.168.0.49
ip route-static 192.168.0.80 28 192.168.0.49
ip route-static 192.168.0.96 28 192.168.0.49
ip route-static 192.168.0.112 28 192.168.0.49
ip route-static 192.168.0.128 28 192.168.0.49
ip route-static 192.168.0.16 28 192.168.0.65 preference 61
ip route-static 192.168.0.32 28 192.168.0.65 preference 61
ip route-static 192.168.0.80 28 192.168.0.65 preference 61
ip route-static 192.168.0.96 28 192.168.0.65 preference 61
ip route-static 192.168.0.112 28 192.168.0.65 preference 61
ip route-static 192.168.0.128 28 192.168.0.65 preference 61
R1配置命令:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1
[R1]int lo0
[R1-LoopBack0]ip add 192.168.0.1 30
[R1-LoopBack0]int lo1
[R1-LoopBack1]ip add 192.168.0.5 30
[R1-LoopBack1]int lo2
[R1-LoopBack2]ip add 192.168.0.9 30
[R1-LoopBack2]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.0.17 28
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.0.97 28
[R1-GigabitEthernet0/0/1]q
[R1]ip route-static 192.168.0.32 28 192.168.0.18
[R1]ip route-static 192.168.0.48 28 192.168.0.18
[R1]ip route-static 192.168.0.64 28 192.168.0.18
[R1]ip route-static 192.168.0.80 28 192.168.0.98
[R1]ip route-static 192.168.0.112 28 192.168.0.98
[R1]ip route-static 192.168.0.128 28 192.168.0.98
[R1]ip route-static 192.168.0.0 28 NULL 0
[R1]ip route-static 0.0.0.0 0 192.168.0.18
[R1]ip route-static 0.0.0.0 0 192.168.0.98
[R1]q
<R1>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<R1>display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 8 Routes : 9 Configured Routes : 9
Static routing table status : <Active>
Destinations : 8 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.0.18 GigabitEthernet0/0/0
Static 60 0 RD 192.168.0.98 GigabitEthernet0/0/1
192.168.0.0/28 Static 60 0 D 0.0.0.0 NULL0
192.168.0.32/28 Static 60 0 RD 192.168.0.18 GigabitEthernet0/0/0
192.168.0.48/28 Static 60 0 RD 192.168.0.18 GigabitEthernet0/0/0
192.168.0.64/28 Static 60 0 RD 192.168.0.18 GigabitEthernet0/0/0
192.168.0.80/28 Static 60 0 RD 192.168.0.98 GigabitEthernet0/0/1
192.168.0.112/28 Static 60 0 RD 192.168.0.98 GigabitEthernet0/0/1
192.168.0.128/28 Static 60 0 RD 192.168.0.98 GigabitEthernet0/0/1
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
R2配置命令:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.0.18 28
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.0.33 28
[R2-GigabitEthernet0/0/1]q
[R2]ip route-static 192.168.0.96 28 192.168.0.17
[R2]ip route-static 192.168.0.112 28 192.168.0.17
[R2]ip route-static 192.168.0.128 28 192.168.0.17
[R2]ip route-static 192.168.0.48 28 192.168.0.34
[R2]ip route-static 192.168.0.64 28 192.168.0.34
[R2]ip route-static 192.168.0.80 28 192.168.0.34
[R2]ip route-static 192.168.0.112 28 192.168.0.34
[R2]ip route-static 192.168.0.128 28 192.168.0.34
[R2]ip route-static 192.168.0.0 28 192.168.0.17
[R2]ip route-static 0.0.0.0 0 192.168.0.34
[R2]q
<R2>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<R2>display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 8 Routes : 10 Configured Routes : 10
Static routing table status : <Active>
Destinations : 8 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.0.34 GigabitEthernet0/0/1
192.168.0.0/28 Static 60 0 RD 192.168.0.17 GigabitEthernet0/0/0
192.168.0.48/28 Static 60 0 RD 192.168.0.34 GigabitEthernet0/0/1
192.168.0.64/28 Static 60 0 RD 192.168.0.34 GigabitEthernet0/0/1
192.168.0.80/28 Static 60 0 RD 192.168.0.34 GigabitEthernet0/0/1
192.168.0.96/28 Static 60 0 RD 192.168.0.17 GigabitEthernet0/0/0
192.168.0.112/28 Static 60 0 RD 192.168.0.17 GigabitEthernet0/0/0
Static 60 0 RD 192.168.0.34 GigabitEthernet0/0/1
192.168.0.128/28 Static 60 0 RD 192.168.0.17 GigabitEthernet0/0/0
Static 60 0 RD 192.168.0.34 GigabitEthernet0/0/1
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
R3配置命令:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.0.34 28
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.0.82 28
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 192.168.0.49 28
[R3-GigabitEthernet0/0/2]int e4/0/0
[R3-Ethernet4/0/0]ip add 192.168.0.65 28
[R3-Ethernet4/0/0]q
[R3]ip route-static 192.168.0.16 28 192.168.0.33
[R3]ip route-static 192.168.0.96 28 192.168.0.81
[R3]ip route-static 192.168.0.112 28 192.168.0.81
[R3]ip route-static 192.168.0.128 28 192.168.0.81
[R3]ip route-static 192.168.0.0 28 192.168.0.33
[R3]ip route-static 192.168.0.0 28 192.168.0.81
[R3]ip route-static 0.0.0.0 0 192.168.0.50
[R3]q
<R3>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<R3>display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 6 Routes : 8 Configured Routes : 8
Static routing table status : <Active>
Destinations : 6 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.0.50 GigabitEthernet0/0/2
192.168.0.0/28 Static 60 0 RD 192.168.0.33 GigabitEthernet0/0/0
Static 60 0 RD 192.168.0.81 GigabitEthernet0/0/1
192.168.0.16/28 Static 60 0 RD 192.168.0.33 GigabitEthernet0/0/0
192.168.0.96/28 Static 60 0 RD 192.168.0.81 GigabitEthernet0/0/1
192.168.0.112/28 Static 60 0 RD 192.168.0.81 GigabitEthernet0/0/1
192.168.0.128/28 Static 60 0 RD 192.168.0.81 GigabitEthernet0/0/1
Static routing table status : <Inactive>
Destinations : 1 Routes : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 61 0 R 192.168.0.66 Ethernet4/0/0
R4配置命令:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.0.81 28
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.0.98 28
[R4-GigabitEthernet0/0/1]int g0/0/2.1
[R4-GigabitEthernet0/0/2.1]ip add 192.168.0.113 28
[R4-GigabitEthernet0/0/2.1]dot1q termination vid 2
[R4-GigabitEthernet0/0/2.1]arp broadcast enable
[R4-GigabitEthernet0/0/2.1]int g0/0/2.2
[R4-GigabitEthernet0/0/2.2]ip add 192.168.0.129 28
[R4-GigabitEthernet0/0/2.2]dot1q termination vid 3
[R4-GigabitEthernet0/0/2.2]arp broadcast enable
[R4-GigabitEthernet0/0/2.2]q
[R4]ip pool a
Info: It's successful to create an IP address pool.
[R4-ip-pool-a]net
[R4-ip-pool-a]network 192.168.0.112 mask 255.255.255.240
[R4-ip-pool-a]gateway-list 192.168.0.113
[R4-ip-pool-a]dns-list 8.8.8.8
[R4-ip-pool-a]ip pool b
Info: It's successful to create an IP address pool.
[R4-ip-pool-b]netbios-type
[R4-ip-pool-b]network 192.168.0.128 mask 255.255.255.240
[R4-ip-pool-b]gateway-list 192.168.0.129
[R4-ip-pool-b]dns-list 8.8.8.8
[R4-ip-pool-b]int g0/0/2.1
[R4-GigabitEthernet0/0/2.1]dhcp select global
Error: Please enable DHCP in the global view first.
[R4-GigabitEthernet0/0/2.1]q
[R4]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R4]int g0/0/2.1
[R4-GigabitEthernet0/0/2.1]dhcp select global
[R4-GigabitEthernet0/0/2.1]int g0/0/2.2
[R4-GigabitEthernet0/0/2.2]dhcp select global
[R4-GigabitEthernet0/0/2.2]q
[R4]ip route-static 192.168.0.16 28 192.168.0.97
[R4]ip route-static 192.168.0.32 28 192.168.0.82
[R4]ip route-static 192.168.0.48 28 192.168.0.82
[R4]ip route-static 192.168.0.64 28 192.168.0.82
[R4]ip route-static 192.168.0.0 28 192.168.0.97
[R4]ip route-static 0.0.0.0 0 192.168.0.82
<R4>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<R4>display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 6 Routes : 6 Configured Routes : 6
Static routing table status : <Active>
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 192.168.0.82 GigabitEthernet0/0/0
192.168.0.0/28 Static 60 0 RD 192.168.0.97 GigabitEthernet0/0/1
192.168.0.16/28 Static 60 0 RD 192.168.0.97 GigabitEthernet0/0/1
192.168.0.32/28 Static 60 0 RD 192.168.0.82 GigabitEthernet0/0/0
192.168.0.48/28 Static 60 0 RD 192.168.0.82 GigabitEthernet0/0/0
192.168.0.64/28 Static 60 0 RD 192.168.0.82 GigabitEthernet0/0/0
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
R5配置命令:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.0.50 28
[R5-GigabitEthernet0/0/0]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 192.168.0.66 28
[R5-GigabitEthernet0/0/1]int g0/0/2
[R5-GigabitEthernet0/0/2]ip add 100.1.1.1 24
[R5-GigabitEthernet0/0/2]q
[R5]ip route-static 192.168.0.16 28 192.168.0.49
[R5]ip route-static 192.168.0.32 28 192.168.0.49
[R5]ip route-static 192.168.0.80 28 192.168.0.49
[R5]ip route-static 192.168.0.96 28 192.168.0.49
[R5]ip route-static 192.168.0.112 28 192.168.0.49
[R5]ip route-static 192.168.0.128 28 192.168.0.49
[R5]ip route-static 192.168.0.0 28 192.168.0.49
[R5]ip route-static 192.168.0.0 28 192.168.0.65
[R5]ip route-static 0.0.0.0 0 100.1.1.2
[R5]acl 2000
[R5-acl-basic-2000]rule 1 permit source any
[R5-acl-basic-2000]int g0/0/2
[R5-GigabitEthernet0/0/2]nat outbound 2000
[R5-GigabitEthernet0/0/2]q
[R5]q
<R5>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<R5>display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 8 Routes : 9 Configured Routes : 9
Static routing table status : <Active>
Destinations : 8 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 100.1.1.2 GigabitEthernet0/0/2
192.168.0.0/28 Static 60 0 RD 192.168.0.49 GigabitEthernet0/0/0
Static 60 0 RD 192.168.0.65 GigabitEthernet0/0/1
192.168.0.16/28 Static 60 0 RD 192.168.0.49 GigabitEthernet0/0/0
192.168.0.32/28 Static 60 0 RD 192.168.0.49 GigabitEthernet0/0/0
192.168.0.80/28 Static 60 0 RD 192.168.0.49 GigabitEthernet0/0/0
192.168.0.96/28 Static 60 0 RD 192.168.0.49 GigabitEthernet0/0/0
192.168.0.112/28 Static 60 0 RD 192.168.0.49 GigabitEthernet0/0/0
192.168.0.128/28 Static 60 0 RD 192.168.0.49 GigabitEthernet0/0/0
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
ISP配置命令:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ISP
[ISP]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 100.1.1.2 24
<ISP>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
LSW1配置命令:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys LSW1
[LSW1]vlan batch 2 3
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]int e0/0/1
[LSW1-Ethernet0/0/1]port link-type trunk
[LSW1-Ethernet0/0/1]port trunk allow-pass vlan all
[LSW1-Ethernet0/0/1]int e0/0/4
[LSW1-Ethernet0/0/4]port link-type trunk
[LSW1-Ethernet0/0/4]port trunk allow-pass vlan all
[LSW1-Ethernet0/0/4]int e0/0/2
[LSW1-Ethernet0/0/2]port link-type access
[LSW1-Ethernet0/0/2]port default vlan 2
[LSW1-Ethernet0/0/2]int e0/0/3
[LSW1-Ethernet0/0/3]port link-type access
[LSW1-Ethernet0/0/3]port default vlan 3
[LSW1-Ethernet0/0/3]q
[LSW1]q
<LSW1>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Jul 17 2023 15:57:17-08:00 LSW1 %%01CFM/4/SAVE(l)[0]:The user chose Y when decid
ing whether to save the configuration to the device.
<LSW1>display vlan
The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:Eth0/0/1(U) Eth0/0/4(U) Eth0/0/5(D) Eth0/0/6(D)
Eth0/0/7(D) Eth0/0/8(D) Eth0/0/9(D) Eth0/0/10(D)
Eth0/0/11(D) Eth0/0/12(D) Eth0/0/13(D) Eth0/0/14(D)
Eth0/0/15(D) Eth0/0/16(D) Eth0/0/17(D) Eth0/0/18(D)
Eth0/0/19(D) Eth0/0/20(D) Eth0/0/21(D) Eth0/0/22(D)
GE0/0/1(D) GE0/0/2(D)
2 common UT:Eth0/0/2(U)
TG:Eth0/0/1(U) Eth0/0/4(U)
3 common UT:Eth0/0/3(U)
TG:Eth0/0/1(U) Eth0/0/4(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
2 enable default enable disable VLAN 0002
3 enable default enable disable VLAN 0003
LSW2配置命令:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys LSW2
[LSW2]int e0/0/1
[LSW2-Ethernet0/0/1]port link-type trunk
[LSW2-Ethernet0/0/1]port trunk allow-pass vlan all
[LSW2-Ethernet0/0/1]int e0/0/2
[LSW2-Ethernet0/0/2]port link-type access
[LSW2-Ethernet0/0/2]port default vlan 2
Error: The VLAN does not exist.
[LSW2-Ethernet0/0/2]q
[LSW2]vlan batch 2 3
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW2]int e0/0/2
[LSW2-Ethernet0/0/2]port link-type access
[LSW2-Ethernet0/0/2]port default vlan 2
[LSW2-Ethernet0/0/2]int e0/0/3
[LSW2-Ethernet0/0/3]port link-type access
[LSW2-Ethernet0/0/3]port default vlan 3
[LSW2-Ethernet0/0/3]q
[LSW2]q
<LSW2>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Jul 17 2023 15:57:21-08:00 LSW2 %%01CFM/4/SAVE(l)[0]:The user chose Y when decid
ing whether to save the configuration to the device.
<LSW2>display vlan
The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:Eth0/0/1(U) Eth0/0/4(D) Eth0/0/5(D) Eth0/0/6(D)
Eth0/0/7(D) Eth0/0/8(D) Eth0/0/9(D) Eth0/0/10(D)
Eth0/0/11(D) Eth0/0/12(D) Eth0/0/13(D) Eth0/0/14(D)
Eth0/0/15(D) Eth0/0/16(D) Eth0/0/17(D) Eth0/0/18(D)
Eth0/0/19(D) Eth0/0/20(D) Eth0/0/21(D) Eth0/0/22(D)
GE0/0/1(D) GE0/0/2(D)
2 common UT:Eth0/0/2(U)
TG:Eth0/0/1(U)
3 common UT:Eth0/0/3(U)
TG:Eth0/0/1(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
2 enable default enable disable VLAN 0002
3 enable default enable disable VLAN 0003