不同交换机,相同VLAN间的通信(仅供参考)
场景
你是你们公司的网络管理员。当前网络中需要部署VLAN。购置了两台交换机。你需要部署VLAN和其他特性。
具体代码
##交换机S1
undo ter mon
system
sysname S1
int g0/0/9
undo negotiation auto
speed 100
duplex full
quit
int g0/0/10
undo negotiation auto
speed 100
duplex full
quit
int Eth-Trunk 1
quit
interface g0/0/9
eth-trunk 1
int g0/0/10
eth-trunk 1
interface Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan all
int g0/0/1
port link-type access
int g0/0/2
port link-type access
vlan 3
port g0/0/1
vlan 4
port g0/0/2
vlan 5
---------------------------------
##交换机S2
undo ter mon
system
sysname S2
int g0/0/9
undo negotiation auto
speed 100
duplex full
quit
int g0/0/10
undo negotiation auto
speed 100
duplex full
quit
int Eth
-Trunk 1
trunkport g0/0/9
trunkport g0/0/10
quit
interface Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan all
vlan batch 3 to 5
int g0/0/1
port link-type access
port default vlan 4
int g0/0/2
port link-type access
port default vlan 5
quit
------------------------------------------
##PC机配置
电脑CLIENT0 单独属于一个vlan 3, 设置IP地址为
10.0.0.1 255.255.255.0
电脑CLIENT1、 CLIENT2属于vlan 4, 设置IP地址分别为
10.0.1.1 255.255.255.0
10.0.1.2 255.255.255.0
电脑CLIENT3 单独属于一个vlan 5, 设置IP地址为
10.0.2.1 255.255.255.0