拓补图:
【实验步骤】
LSW1配置:
The device is running!
<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in e
Info: Information center is disabled.
[Huawei]sys maluoying
[maluoying]vlan batch 10
Info: This operation may take a few seconds. Please wait for a moment...done.
[maluoying]int e0/0/1
[maluoying-Ethernet0/0/1]port link-type access
[maluoying-Ethernet0/0/1]port default vlan 10
[maluoying-Ethernet0/0/1]int e0/0/2
[maluoying-Ethernet0/0/2]port link-type access
[maluoying-Ethernet0/0/2]port default vlan 10
[maluoying-Ethernet0/0/2]int e0/0/2
[maluoying-Ethernet0/0/2]int e0/0/3
[maluoying-Ethernet0/0/3]port link-type trunk
[maluoying-Ethernet0/0/3]port trunk allow-pass vlan all
[maluoying-Ethernet0/0/3] User interface con0 is available
LSW2配置:
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in e
Info: Information center is disabled.
[Huawei]sys maluoying
[maluoying]vlan 20
[maluoying-vlan20]q
[maluoying]int e0/0/1
[maluoying-Ethernet0/0/1]port link-type access
[maluoying-Ethernet0/0/1]port default vlan 20
[maluoying-Ethernet0/0/1]int e0/0/2
[maluoying-Ethernet0/0/2]port link-type access
[maluoying-Ethernet0/0/2]port default vlan 20
[maluoying-Ethernet0/0/2]int e0/0/3
[maluoying-Ethernet0/0/3]port link-type trunk
[maluoying-Ethernet0/0/3]port trunk allow-pass vlan all
[maluoying-Ethernet0/0/3]
[maluoying-Ethernet0/0/3]User interface con0 is available
^
Error: Unrecognized command found at '^' position.
[maluoying-Ethernet0/0/3]User interface con0 is available
^
Error: Unrecognized command found at '^' position.
[maluoying-Ethernet0/0/3]
LSW3配置:
The device is running!
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in e
Info: Information center is disabled.
[Huawei]sys maluoying
[maluoying]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[maluoying]int vlanif 10
[maluoying-Vlanif10]ip add 192.168.10.254 24
[maluoying-Vlanif10]int vlanif 20
[maluoying-Vlanif20]ip add 192.168.20.254 24
[maluoying-Vlanif20]int g0/0/1
[maluoying-GigabitEthernet0/0/1]port link-type trunk
[maluoying-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[maluoying-GigabitEthernet0/0/1]int g0/0/1
[maluoying-GigabitEthernet0/0/1]int g0/0/2
[maluoying-GigabitEthernet0/0/2]port link-type trunk
[maluoying-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[maluoying-GigabitEthernet0/0/2]disp this
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
return
[maluoying-GigabitEthernet0/0/2]q
<maluoying>disp ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.10.0/24 Direct 0 0 D 192.168.10.254 Vlanif10
192.168.10.254/32 Direct 0 0 D 127.0.0.1 Vlanif10
192.168.20.0/24 Direct 0 0 D 192.168.20.254 Vlanif20
192.168.20.254/32 Direct 0 0 D 127.0.0.1 Vlanif20
<maluoying>
PC1配置:
PC2配置:
PC3配置:
PC4配置:
【实验记录】