要求:不同VLAN间实现通信
拓朴图:
PC基本配置:
PC1
PC2
PC3
PC4
交换机基础配置:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys SW1
[SW1]vlan b 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]p l a
[SW1-Ethernet0/0/1]p de v 10
[SW1-Ethernet0/0/1]q
[SW1]int e0/0/2
[SW1-Ethernet0/0/2]p l a
[SW1-Ethernet0/0/2]p de v 10
[SW1-Ethernet0/0/2]q
[SW1]int e0/0/3
[SW1-Ethernet0/0/3]p l a
[SW1-Ethernet0/0/3]p de v 20
[SW1-Ethernet0/0/3]q
[SW1]int e0/0/4
[SW1-Ethernet0/0/4]p l a
[SW1-Ethernet0/0/4]p de v 20
[SW1-Ethernet0/0/4]q
[SW1]int vlanif 10
[SW1-Vlanif10]ip add 192.168.1.254 255.255.255.0
[SW1-Vlanif10]int vlanif 20
[SW1-Vlanif20]ip add 192.168.2.254 255.255.255.0
[SW1-Vlanif20]q
[SW1]
实验结果:
所有pc都互通