实验要求实现全网互通
R1的配置
<Huawei>
<Huawei>
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sy
[Huawei]sysname R1
[R1]inter
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip add
[R1-GigabitEthernet0/0/0]ip address 192.168.80.1 24
[R1]interface g0/0/2
[R1-GigabitEthernet0/0/2]ip add
[R1-GigabitEthernet0/0/2]ip address 192.168.90.1 24
R1-GigabitEthernet0/0/2]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add
[R1-GigabitEthernet0/0/1]ip address 192.168.100.1 24
[R1]ip rou
[R1]ip route-s
[R1]ip route-static 192.168.70.0 24 192.168.90.2
[R1]ip route-static 192.168.70.0 24 192.168.100.2 pre 70
[R1] ip rou
[R1]ip route
[R1]ip route-static 192.168.0.0 16 192.168.80.254
R2的配置
<Huawei>sys
<Huawei>system-view sys
<Huawei>system-vie
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]inter
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip add
[R2-GigabitEthernet0/0/0]ip address 192.168.90.2 24
R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip
[R2-GigabitEthernet0/0/1]ip a
[R2-GigabitEthernet0/0/1]ip addres
[R2-GigabitEthernet0/0/1]ip address 192.168.120.1 24
[R2]ip rou
[R2]ip route-s
[R2]ip route-static 192.168.0.0 16 192.168.90.1
[R2]ip route-static 192.168.70.0 24 192.168.120.2
R3 的配置
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys E3
[E3]sys R3
[R3]inter
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip add
[R3-GigabitEthernet0/0/1]ip address 192.168.110.1 24
[R3-GigabitEthernet0/0/1]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add
[R3-GigabitEthernet0/0/0]ip address 192.168.100.2 24
[R3]ip route-static 192.168.70.0 24 192.168.110.2
[R3]ip route-static 192.168.0.0 16 192.168.100.1
R4 的配置
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname R4
[R4]inter
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]ip add
[R4-GigabitEthernet0/0/1]ip address 192.168.110.2 24
[R4-GigabitEthernet0/0/1]int
[R4-GigabitEthernet0/0/1]int g0/0/0
[R4-GigabitEthernet0/0/0]ip ad
[R4-GigabitEthernet0/0/0]ip address 192.168.120.2 24
[R4-GigabitEthernet0/0/0]q
[R4]inter
[R4]interface g0/0/2
[R4-GigabitEthernet0/0/2]ip add
[R4-GigabitEthernet0/0/2]ip address 192.168.70.2 24
[R4]ip route-static 0.0.0.0 0 192.168.110.1
[R4]ip route-static 0.0.0.0 0 192.168.120.1
交换机SW1配置
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sy
[Huawei]sysname SW1
[SW1]vlan ba
[SW1]vlan batch 10 20 30 40 50 60 80
[SW1]interface e0/0/1
[SW1-Ethernet0/0/1]p l a
[SW1-Ethernet0/0/1]p d v 10
SW1-Ethernet0/0/1]
[SW1-Ethernet0/0/1]q
[SW1]int
[SW1]interface e0/0/2
[SW1-Ethernet0/0/2]p l a
[SW1-Ethernet0/0/2]p d v 20
[SW1]inter
[SW1]interface e0/0/6
[SW1-Ethernet0/0/6]p l t
[SW1-Ethernet0/0/6]p t a v a
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]tru
[SW1-Eth-Trunk1]trunkport e0/0/4
[SW1-Eth-Trunk1]trunkport e0/0/3
[SW1-Eth-Trunk1]trunkport e0/0/5
[SW1]int Eth-t
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]m l
SW2的配置
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW2
[SW2]
Apr 7 2021 14:27:44-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 4, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW2]
[SW2]
[SW2]vlan b
[SW2]vlan batch 30 40
[SW2]interface e0/0/1
[SW2-Ethernet0/0/1]p l a
[SW2-Ethernet0/0/1]p d v 30
[SW2-Ethernet0/0/1]q
[SW2]interface e0/0/2
[SW2-Ethernet0/0/2]p l a
[SW2-Ethernet0/0/2]p d v 40
[SW2]inter
[SW2]interface e0/0/9
[SW2-Ethernet0/0/9]p l t
[SW2]int e
[SW2]int Eth-t
[SW2]int Eth-Trunk 1
[SW2-Eth-Trunk1]t
[SW2-Eth-Trunk1]trunkport e0/0/5
[SW2-Eth-Trunk1]trunkport e0/0/3
[SW2-Eth-Trunk1]p l t
[SW2-Eth-Trunk1]p t a v a
[SW2]int Eth-Trunk 2
[SW2-Eth-Trunk2]tru
[SW2-Eth-Trunk2]trunkport e0/0/7
[SW2-Eth-Trunk2]trunkport e0/0/4
[SW2-Eth-Trunk2]trunkport e0/0/8
[SW2-Eth-Trunk2]p l t
[SW2-Eth-Trunk2]p t a v a
SW3的配置
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname SW3
[SW3]vlan batch 10 20 30 40 50 60
[SW3]interface e0/0/5
[SW3-Ethernet0/0/5]p l a
[SW3-Ethernet0/0/5]p d v 50
[SW3-Ethernet0/0/5]q
[SW3]interface e0/0/6
[SW3-Ethernet0/0/6]p l a
[SW3-Ethernet0/0/6]p d v 60
[SW3]interface e0/0/1
[SW3-Ethernet0/0/1]p l t
[SW3-Ethernet0/0/1]p t a v a
[SW3]int Eth-Trunk 2
[SW3-Eth-Trunk2]trunkport e0/0/4
[SW3-Eth-Trunk2]trunkport e0/0/2
[SW3-Eth-Trunk2]p l t
[SW3-Eth-Trunk2]p t a v a
SW4的配置
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW4
[SW4]
Apr 7 2021 14:53:48-08:00 SW4 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 4, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW4]
[SW4]
[SW4]int
[SW4]interface g0/0/1
[SW4-GigabitEthernet0/0/1]p l t
[SW4-GigabitEthernet0/0/1]p t a v a
[SW4]vlan 10 20 30 40 50 60 80
[SW4-Vlanif10]
Apr 7 2021 15:21:09-08:00 SW4 %%01IFNET/4/IF_STATE(l)[3]:Interface Vlanif10 has
turned into UP state.
[SW4-Vlanif10]ip add
[SW4-Vlanif10]ip address 192.168.10.254 24
[SW4]int Vlanif 20
[SW4-Vlanif20]
Apr 7 2021 15:21:32-08:00 SW4 %%01IFNET/4/IF_STATE(l)[5]:Interface Vlanif20 has
turned into UP state.
[SW4-Vlanif20]ip ad
[SW4-Vlanif20]ip address 192.168.20.254 24
[SW4]int Vlanif 30
[SW4-Vlanif30]ip address 192.168.30.254 24
[SW4]int Vlanif 40
[SW4-Vlanif40]ip address 192.168.40.254 24
[SW4]int Vlanif 50
[SW4-Vlanif50]ip address 192.168.50.254 24
[SW4]int Vlanif 60
[SW4-Vlanif60]ip address 192.168.60.254 24
[SW4]int g0/0/4
[SW4-GigabitEthernet0/0/4]p l a
[SW4-GigabitEthernet0/0/4]p d v 80
[SW4]int Vlanif 80
[SW4-Vlanif80]ip address 192.168.80.254 24
[SW4]interface g0/0/2
[SW4-GigabitEthernet0/0/2]p l t
[SW4-GigabitEthernet0/0/2]p t a v a
[SW4]interface g0/0/3
[SW4-GigabitEthernet0/0/3]p l t
[SW4-GigabitEthernet0/0/3]p t a v a
[SW4]ip route-static 0.0.0.0 0 192.168.80.254
ip route-static 0.0.0.0 0 192.168.80.1