标签:同VLAN互通
利用access(接入)模式实现同VLAN互通
同VLAN互通
Sw1设置
<sw1>system-view
进入系统视图加入VLAN 10
[sw1]vlan 10
进入接口
[sw1]interface gig0/0/1
端口连接类型为接入模式
[sw1-gig0/0/1]port link-type access
端口加入默认VLAN 10
[sw1-gig0/0/1]port default vlan 10
[sw1]interface gig0/0/2
[sw1-gig0/0/2]port link-type access
[sw1-gig0/0/2]port default vlan 10
PC设置
Pc1:192.168.1.1 255.255.255.0
Pc2:192.168.1.2 255.255.255.0
结果:实现pc1与pc2互通
Sw1设置
[sw1]vlan 30
[sw1]interface gig0/0/3
[sw1-gig0/0/3]port link-type access
[sw1-gig0/0/3]port default vlan 30
[sw1]interface gig0/0/4
[sw1-gig0/0/4]port link-type access
[sw1-gig0/0/4]port default vlan 30
Sw2设置
[sw2]vlan 30
[sw2]interface gig0/0/1
[sw2-gig0/0/1]port link-type access
[sw2-gig0/0/1]port default vlan 30
[sw2]vlan 30
[sw2]interface gig0/0/2
[sw2-gig0/0/2]port link-type access
[sw2-gig0/0/2]port default vlan30
Pc 设置
Pc5:192.168.3.1 255.255.255.0
Pc3:192.168.3.2 255.255.255.0
结果:实现pc5与pc3互通
标签:同VLAN互通
原文地址:http://blog.51cto.com/13721794/2112100