詞義
英音:[trʌŋk]美音:[trʌŋk]名詞n.[C]
1.樹幹
The trunk of this tree is four meters thick.
這棵樹的樹幹有四米粗。
2.(旅行用)大皮箱;汽車車尾的行李箱
Let me put your baggage in the trunk.
我來把你的行李放在汽車後部的行李箱内。
3.象鼻;昆蟲等的長嘴
4.軀幹,身軀
The athlete has a powerful trunk.
那個運動員身軀強壯有力。
5.(鐵路,公路等的)幹線
6.大血管,神經幹
7.男用運動短褲;男用泳褲(尤指性感或情趣類)[P]
8.【礦】洗礦槽及物動詞vt.
1.槽内洗選(礦砂)
應用
在路由/交換領域,VLAN的中繼端口叫做trunk。trunk技術用在交換機之間互連,使不同VLAN通過共享鍊路與其它交換機中的相同VLAN通信。交換機之間互連的端口就稱為trunk端口。
trunk是基于OSI第二層數據鍊路層(DataLinkLayer)的技術。兩台交換機上分别創建了多個VLAN(VLAN是基于Layer 2的),在兩台交換機上相同的VLAN(比如VLAN10)要通信,需要将交換機A上屬于VLAN10的一個端口與交換機B上屬于VLAN10的一個端口互連;
如果這兩台交換機其它相同VLAN間需要通信,那麼交換機之間需要更多的互連線,端口利用率就太低了。交換機通過trunk功能,事情就簡單了,隻需要兩台交換機之間有一條互連線,将互連線的兩個端口設置為trunk模式,這樣就可以使交換機上不同VLAN共享這條線路。trunk不能實現不同VLAN間通信,需要通過三層設備(路由/三層交換機)來實現。
劃分
交換端口兩種模式:access和trunk。連接終端(如PC)用access模式,設備級聯用trunk模式。
把access端口加入到某個VLAN,那麼這個端口就隻将這個VLAN的數據轉發給PC,PC發送的數據通過這個端口後會打上這個VLAN的ID,轉發到相同VLAN。(這裡為了簡單表述,混雜模式端口不做讨論;将PC用access模式,其他情況不做讨論。)
配置
Cisco默認的trunk封裝協議為dot1q(802.1q)。
配置方法:
Switch(config)#interface gigabitEthernet 1/1
Switch(config-if)#switchport trunk encapsulation dot1q//默認封裝,該命令可以省略,特殊情況:配置單臂路由,必須敲這條命令。
Switch(config-if)#switchport mode trunk//協議變化,端口協議會down/up轉換一次。
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1,changedState to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1,changedState to up
Switch(config-if)#switchport trunk allowed vlan 10,20//VLAN修剪,add/remove參數增減
Switch(config-if)#exit
驗證方法:
Switch#show interfaces trunk//show interswitchport命令也可以。
Port Mode Encapsulation Status Native vlan
Gig1/1 on 802.1q trunking 1
Port Vlans allowed on trunk
Gig1/1 10,20
Port Vlans allowed and active in management domain
Gig1/1 none
Port Vlans in spanning tree forwarding state and not pruned
Gig1/1 none
或
Switch#show interfaces gigabitEthernet 1/1 switchport//show running inter [interface]驗證方法其實很多的;
Name: Gig1/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none



















