需求:隨着公司規模的擴大,發現一個交換機的接口不夠用了,需要多台交換機
方案:使用trunk封裝實現多交換之間vlan內通信。
switch0交換機的配置
Switch>enable
Switch#configure terminal
Switch(config)#vlan 2
Switch(config-vlan)#vlan 3
Switch(config-vlan)#exit
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/3
Switch(config-if)#switchport mode trunk
switch1交換機的配置
Switch>enable
Switch#configure terminal
Switch(config)#vlan 2
Switch(config-vlan)#vlan 3
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#switchport access vlan 3
測試: