PC
192.168.10.1、192.168.10.2
192.168.20.1、192.168.20.2
192.168.10.3、192.168.10.4
192.168.20.3、192.168.20.4
S3700
system-view
vlan batch 10 20
int e0/0/1
port link-type access
port default vlan 10
int e0/0/2
port link-type access
port default vlan 10
int e0/0/3
port link-type access
port default vlan 20
int e0/0/4
port link-type access
port default vlan 20
int g0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
S5700
int g0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
int g0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
qu
interface vlanif 10
ip address 192.168.10.254 24
interface vlanif 20
ip address 192.168.20.254 24
原文:https://www.cnblogs.com/X-Lee/p/11942002.html