现有两个电脑通过交换机直接连接在一起
pc1:
pc2:
正常状态下是可以ping成功的
现在先进入交换机命令行界面,创建两个vlan
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan 10
[Huawei-vlan10]q
[Huawei]vlan 20
[Huawei-vlan20]q
再进入对应的串口,设置交换机的串口模式
port link-type access //设置交换机的接口模式
port default vlan 10 //设置接口的vlan
display vlan可以查看当前交换机下的vlan
尝试用pc1访问pc2,发现不能实现通信
现在添加一个交换机,再在交换机下添加两个pc设备
进入1交换机设置串口003可以通过vlan10和vlan20的数据
[Huawei]int g0/0/3 //进入串口
[Huawei-GigabitEthernet0/0/3]port link-type trunk //设置交换机串口模式
[Huawei-GigabitEthernet0/0/3]
May 29 2024 18:48:50-08:00 Huawei 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 10, t
he change loop count is 0, and the maximum number of records is 4095.
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 //允许vlan10通过
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan 20 //允许vlan20通过
[Huawei-GigabitEthernet0/0/3]
May 29 2024 18:49:30-08:00 Huawei 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 12, t
he change loop count is 0, and the maximum number of records is 4095.
进入交换机2 创建vlan10和vlan20,并且把串口2加入vlan10,串口3加入vlan20 。进入串口一设置串口模式为trunk,并且运行vlan10和vlan20通过
结果发现pc1可以ping通另一个交换机下的vlan10口,却ping不通另一个交换机下的vlan 20口