原来的基础上,增加一台交换机,接口1、2、/4配置成trunk,路由器进入子接口,最后配置主机的网关
左边交换机:
sys
valn 10
vlan 20
interface gi 1/01/
port link-type access
port access vlan 10
interface gi 1/0/2
port link-type access
port access vlan 10
interface gi 1/0/3
port link-type access
port access vlan 20
interface gi 1/0/4
port link-type access
port access vlan 20
qu
interface gi 1/0/48
port link-type trunk
port trunk permit vlan 10 20
右边交换机:
sys
vlan 10
vlan 20
interface gi 1/0/1
port link-type access
port access vlan 10
interface gi 1/0/2
port link-type access
port access vlan 20
qu
interface gi 1/0/48
port link-type trunk
port trunk permit vlan 10 20
上面交换机:
sys
vlan 10
vlan 20
interface range gi 1/0/1 to 1/0/2
port link-type trunk
port trunk permit vlan 10 20
interface gi 1/0/48
port link-type trunk
port trunk permit vlan 10 20
路由器:
sys
interface gi 0/0.10
vlan-type dot1q vid 10
ip address 192.168.10.254 24
interface gi 0/0.20
vlan-type dot1q vid 20
ip address 192.168.20.254 24
原文:https://www.cnblogs.com/danmin/p/10864560.html