vlan 10

port g1/0/2

quit

vlan 20

port g1/0/3

quit

int g1/0/2

port link-type trunk 

port trunk permit vlan 10 20

quit

int g1/0/3

port link-type trunk 

port trunk permit vlan 10 20

quit

int vlan 10 

ip add 192.168.0.1 24 

quit

int vlan 20

ip add 192.168.1.1 24

quit

ip route-static 0.0.0.0 0.0.0.0 192.168.0.1(设置交换机的静态路由网关)

其他两台类似配置

SW_A:IP 192.168.0.2

SW_B:IP 192.168.0.1 192.168.1.1

SW_C:IP 192.168.1.2