TRUNKS

advertisement

TRUNKS

• TRUNK:

• Trunking is a layer 2 feature.

• A Trunk port in a switch is a port which is used to connect to another switch.

• A Trunk port transfers tagged packet.

• Vlan information is freely moved from one switch to another switch.

• The tags are not removed. They are only removed when the information is passed to a computer or access port device.

• The Two types of tagging:

• ISL (Cisco Proprietary) [Encapsulates entire frame]

• 802.1Q (Standard) [Inserts tags in frame than encapsulating it]

TRUNKS

As Vlan tag is 16 Bits (2 Bytes), ISL adds extra 24 Bytes with not so useful things to make the packet size enormously big.

• 802.1Q is only a 4 Byte tag containing priority bit (3 bits in size) it does not adds new header, 2 Byte of vlan and CoS (Class of Service field) is inclusive in 4 Bytes.

• Native Vlan Mismatch:

• When switches receives an untagged packet (Trunks work with tagged packets) it puts the packet in Native Vlan. So if the Native

Vlan numbers are different in switches it give Mismatch error.

Biggest use of Native Vlan is used in VOIP. Please note that phone act like a HUB (But its debatable)

• Phones and PC data should be on different Vlans. Due to security and performance issue.

TRUNKS

• To run Phone and PC on different Vlans we create a Trunk on Switch and the cable goes into phone which automatically understand tagged packets and resend the tagged packets to switch. But The PC which is connected with the other port of the phone and the packets its sending to the switch are Not Tagged because Computers can’t tag packets, thus sending untagged packets to the trunkport and thus creating a scenario of Vlan Mismatch

• To overcome the above problem we setup the PC’s member of same

Vlan as we set the Native Vlan to. E.g If Native Vlan is Vlan 10,

Computers should be member of Vlan 10.

• DTP:

• Switches Automaticall Negotiate Trunk Connections using

DTP(Dynamic Trunking Protocol)

TRUNKS

• Trunk Communication:

• Ports can be set in Access, Trunk, Dynamic Auto, Dynamic Desireable and Non-Negotiate modes.

• By Default Switches are in Dynamic Desirable mode, which means if this port I connected with Switch it converts to Trunk , but if its connected with PC it becomes Access port. (Big Security Issue if some one connects a switch with it and use it for malicious purpose.

• To Check mode of Switch:

• Switch# show interface fa 0/1 switchport  -

• Check the line Administrative mode and Operational Mode , the first is what you set and the second is what its working at the moment.

TRUNKS

• A good practice is to hardcode it as access port.

• Dynamic Auto:

• If both sides are auto none will become a trunk.

• If one side is Auto and other side is Dynamic Desirable then they will become a trunk.

• Trunk:

• Trunk will not become Access, it will send DTP packets and if the other side is anything but access & non-negotiate it will be automatically converted to Trunk.

• Non-Negotiate:

• It setup as trunk but does not sends DTP packets (Best options)

TRUNKS

• Configuring a Trunk port:

• Switch# conf t 

• Switch(config)# int fa 0/1 

• Switch(config-if)# switchport trunk encapsulation dot1q 

• Switch(config-if)# switchport mode trunk 

• Note: In switches which only supports dot1q and not ISL we issue following command to make it trunk:

• Switch(config)# int fa 0/1 

• Switch(config-if)# switchport mode trunk 

• Non-Negotiate:

• Switch(config-if)# switchport nonegotiate 

TRUNKS

• Native Vlan :

• To Setup Native Vlan for an untagged packet we setup it as below:

• Switch(config)# int fa 0/1 

• Switch(config-if)# switchport trunk native vlan (vlan #) 

• To stop vlan to cross the trunk

• Switch(config)# int fa 0/1 

• Switch(config-if)# switchport trunk allowed vlan 10, 20 etc.

• Please check By typing ? infront of vlan for options.

• To verify all

• Switch# show int fa 0/1 

• Switch# show int fa 0/1 switchport 

• Switch# show int fa 0/1 trunk 

Download