eNSP练习:跨交换机的vlan划分

跨交换机划分vlan就是用两台或者多台交换机连接起来进行vlan划分
这次的模拟实验用了 2个服务器+2台交换机+4个PC机
PC1和PC3属于vlan10
PC2和PC4属于vlan20
两台服务器属于vlan30
PC1: 192.168.1.1
PC2: 192.168.1.2
PC3: 192.168.1.3
PC4: 192.168.1.4
server1: 192.168.1.100
server2: 192.168.1.200
网关都是 192.168.1.254。子网掩码都是255.255.255.0
eNSP练习:跨交换机的vlan划分_第1张图片

LSW3的配置命令如下
sys
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]int e0/0/4
[Huawei-Ethernet0/0/4]port link-type trunk
[Huawei-Ethernet0/0/4]port trunk allow-pass vlan all
[Huawei-Ethernet0/0/4]q
[Huawei]vlan 10
[Huawei-vlan10]port e0/0/1
[Huawei-vlan10]q
[Huawei]vlan 20
[Huawei-vlan20]port e0/0/2
[Huawei-vlan20]q
[Huawei]vlan 30
[Huawei-vlan30]port e0/0/3
[Huawei-vlan30]q
[Huawei]dis vlan
eNSP练习:跨交换机的vlan划分_第2张图片

LSW2的配置命令如下

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]int e0/0/4
[Huawei-Ethernet0/0/4]port link-type trunk
[Huawei-Ethernet0/0/4]port trunk allow-pass vlan all
[Huawei-Ethernet0/0/4]q
[Huawei]vlan 10
[Huawei-vlan10]port e0/0/1
[Huawei-vlan10]q
[Huawei]vlan 20
[Huawei-vlan20]port e0/0/2
[Huawei-vlan20]q
[Huawei]vlan 30
[Huawei-vlan30]port e0/0/3
[Huawei-vlan30]q
[Huawei]dis vlan
eNSP练习:跨交换机的vlan划分_第3张图片
eNSP练习:跨交换机的vlan划分_第4张图片
配置完成后,可以看到PC1能ping通PC3(因为这两个是在同一个vlan内的),但ping不通服务器和PC2。PC1和PC3互通,PC2和PC4互通
eNSP练习:跨交换机的vlan划分_第5张图片
eNSP练习:跨交换机的vlan划分_第6张图片

你可能感兴趣的:(ensp)