#sw1配置
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
undo shutdown
#
interface GigabitEthernet0/0/1
eth-trunk 1
undo shutdown
#
interface GigabitEthernet0/0/2
eth-trunk 1
undo shutdown
#sw2配置
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
undo shutdown
#
interface GigabitEthernet0/0/1
eth-trunk 1
undo shutdown
#这里关闭端口进行测试,pc1和pc2连接正常。
interface GigabitEthernet0/0/2
shutdown
eth-trunk 1