创建vlan并划分接口:
[sw1]interface Eth0/0/1
[sw1-Ethernet0/0/1]port link-type access
[sw1-Ethernet0/0/1]port default vlan 1
[sw1]interface Eth0/0/2
[sw1-Ethernet0/0/2]port link-type access
[sw1-Ethernet0/0/2]port default vlan 2
[sw2]interface Eth0/0/1
[sw2-Ethernet0/0/1]port link-type access
[sw2-Ethernet0/0/1]port default vlan 1
[sw2]interface Eth0/0/2
[sw2-Ethernet0/0/2]port link-type access
[sw2-Ethernet0/0/2]port default vlan 2
ethtruck的配置
[sw1]interface Eth-Trunk 0
[sw1-Eth-Trunk0]int g0/0/2
[sw1-GigabitEthernet0/0/2]eth-trunk 0
[sw2]interface Eth-Trunk 0
[sw2-GigabitEthernet0/0/2]eth-trunk
[sw2-GigabitEthernet0/0/3]eth-trunk 0
交换机设