Monday, June 1, 2009

Trunk Port in Depth


Trunk port is a port which carries multiple VLAN information (traffic). Two types of encapsulation are available i.e. ISL and Dot1q. On certain switches only Dot1q is available it depends on which series of switch are you using. There is difference between these two some of the features are:
ISL: It’s a Proprietary Protocol and frame is encapsulated (double Tagging) with a total size of 30 bytes (26 Bytes Header and 4-bytes Tail) and is done on the whole frame, it’s a protocol independent means frame is encapsulated and have no concern with internal data and support PVST (per VLAN spanning Tree) and have no use in VoIP environment. 10 bits is kept reserved so we can create VLAN up to 1024 and we can configure from 2 to 1001 as VLAN 1 and VLAN 2-5 are reserved.
DOT1Q: It’s a non-proprietary protocol and a small tagged is attached to a side of frame of size 4-bytes. It’s a protocol dependent and has support for VoIP and there is three bits space reserved for PRI (priority) used to give preference to whom and not to who called dot1p acts as a class of service. 12 bits are kept reserved so the range of VLAN goes up to 4096. DOT1Q also support Native VLAN (Native VLAN is untagged VLAN means if there is any traffic comes from switch-A which is untagged so it will be received by VLAN on the other side which is declared as a Native VLAN and it is recommended that keep same VLAN as a Native on both side.

Negotiation: If there are two switches with both the encapsulation available on both side so the negotiation will be done on ISL and Trunk port will be established, if there is ISL and DOT1Q on one side and ISL only on the other side so negotiation will be done using DOT1Q and Trunk Port will be established.
Now to start with the Lab makes sure that the switches are Zero Meter and for that enter the following command:

Switch-A # show vtp status
VTP Version : 2
Configuration Revision : 5
Maximum VLANs supported locally : 1005
Number of existing VLANs : 10
VTP Operating Mode : Server
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x77 0xA2 0x57 0xB9 0xDB 0x6E 0xC4 0x8C
If you can see the revision number it is 5, so to bring the switch to zero meters we have to delete all VLAN but remember by deleting VLAN the revision number will still 5 as there is a Database maintaining with the name of “VLAN.dat” so we have to delete that also.

Switch-A # delete flash: vlan.dat
Delete filename [vlan.dat]?
Delete flash:/vlan.dat? [Confirm]

Switch-A # write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]

Switch-A # show vtp status
VTP Version : 2
Configuration Revision : 0
Maximum VLANs supported locally : 1005
Number of existing VLANs : 10
VTP Operating Mode : Server
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x77 0xA2 0x57 0xB9 0xDB 0x6E 0xC4 0x8C

Repeate all these commands on both switches and then give the following command.

Switch-A # show interface trunk

Port Mode Encapsulation Status Native vlan
Fa0/1 desirable 802.1q trunking 1
Fa0/2 desirable 802.1q trunking 1
Fa0/3 desirable 802.1q trunking 1

Port Vlans allowed on trunk
Fa0/1 1-1005
Fa0/2 1-1005
Fa0/3 1-1005

Port Vlans allowed and active in management domain
Fa0/1 1,1002,1003,1004,1005
Fa0/2 1,1002,1003,1004,1005
Fa0/3 1,1002,1003,1004,1005

Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,1002,1003,1004,1005
Fa0/2 1,1002,1003,1004,1005
Fa0/3 1,1002,1003,1004,1005

If you notice the mode which is desirable, we can have three conditions for the trunk port i.e. The mode can be desirable desirable, desirable auto and auto auto. so Trunk prot will be established between desirable desirable and desirbale auto while no trunk port between auto auto because when port is in auto mode so it waits for the DTP to recieve so both ports will be waiting for the DTP and no trunk port will be established. In the above case all states are desirable, lets see all three cases.
To change the mode give the following command.

switch-A(config) # interface fastethernet 0/2
switch-A(config-if) # switchport mode dynamic auto

switch-A # show interface trunk


Port Mode Encapsulation Status Native vlan
Fa0/1 desirable 802.1q trunking 1
Fa0/2 auto 802.1q trunking 1

Port Vlans allowed on trunk
Fa0/1 1-1005
Fa0/2 1-1005
Fa0/3 1-1005

Port Vlans allowed and active in management domain
Fa0/1 1,1002,1003,1004,1005
Fa0/2 1,1002,1003,1004,1005
Fa0/3 1,1002,1003,1004,1005

Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,1002,1003,1004,1005
Fa0/2 1,1002,1003,1004,1005
Fa0/3 1,1002,1003,1004,1005

Now you can see that when we made the state auto for 0/3 interfae on both side so no trunk link is established. The method shown above is the dynamic method.

The Static method for trunk port is to shutdown the DTP packet first, lets try for the 0/3 interface. The correct sequence is as follow:

switch-A (config) # interface fastethernet 0/3
switch-A (config) # shutdown
switch-A (config) # switchport nonegotiate
switch-A (config) # switchport mode trunk
switch-A (config) # no shutdown


Now give the command as follow to see the result

switch-A # show interface trunk

Port Mode Encapsulation Status Native vlan
Fa0/1 desirable 802.1q trunking 1
Fa0/2 auto 802.1q trunking 1
Fa0/3 on 802.1q trunking 1

Port Vlans allowed on trunk
Fa0/1 1-1005
Fa0/2 1-1005
Fa0/3 1-1005

Port Vlans allowed and active in management domain
Fa0/1 1,1002,1003,1004,1005
Fa0/2 1,1002,1003,1004,1005
Fa0/3 1,1002,1003,1004,1005

Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,1002,1003,1004,1005
Fa0/2 1,1002,1003,1004,1005
Fa0/3 1,1002,1003,1004,1005

If you can see the above output so the 0/3 shows state is ON means that trunk port is configured manually.

This is just a window to the trunk port configurations.

Hope it will be informative for you.

7 comments:

nayyares said...
This comment has been removed by the author.
nayyares said...

nice post, i had a lot of problem in understanding trunk link/port concept at my time. you have explained it very nice.

thanks

SOHAIL AKHTAR said...

@Nayyar....Its a pleasure that atleast you get some help (knowledge) from my blog. Thnx

ninest123 said...

replica watches, ugg boots, ralph lauren pas cher, oakley sunglasses, louis vuitton, nike roshe run, chanel handbags, burberry, kate spade outlet, louis vuitton outlet, nike outlet, longchamp, louboutin shoes, gucci outlet, ray ban sunglasses, air jordan pas cher, nike free, jordan shoes, sac longchamp, uggs on sale, louboutin, nike free, cheap oakley sunglasses, nike air max, prada outlet, air max, christian louboutin outlet, tory burch outlet, longchamp pas cher, polo ralph lauren outlet, ugg boots, polo ralph lauren outlet, louis vuitton, replica watches, nike air max, louboutin pas cher, oakley sunglasses, tiffany jewelry, oakley sunglasses, ray ban sunglasses, louis vuitton, prada handbags, michael kors, ray ban sunglasses, louis vuitton outlet, louboutin outlet, longchamp outlet, oakley sunglasses, longchamp outlet, tiffany and co

ninest123 said...

michael kors, hermes, michael kors outlet, converse pas cher, vans pas cher, true religion jeans, michael kors, nike roshe, tn pas cher, michael kors outlet, michael kors outlet, michael kors outlet, north face, nike air max, mulberry, coach outlet, nike air max, ugg boots, nike free run uk, north face, replica handbags, nike air max, sac guess, michael kors outlet, lululemon, true religion jeans, abercrombie and fitch, nike blazer, hollister pas cher, michael kors, new balance pas cher, hogan, oakley pas cher, kate spade handbags, true religion outlet, coach outlet, air force, burberry outlet online, vanessa bruno, ugg boots, timberland, ray ban pas cher, true religion jeans, coach purses, lacoste pas cher, hollister, burberry, ralph lauren uk, ray ban uk, michael kors

ninest123 said...

vans shoes, beats by dre, ghd, lancel, herve leger, new balance, ray ban, ralph lauren, abercrombie and fitch, celine handbags, north face outlet, birkin bag, louboutin, chi flat iron, soccer jerseys, nike air max, ferragamo shoes, mont blanc, insanity workout, hollister, jimmy choo shoes, nfl jerseys, soccer shoes, nike huarache, nike air max, nike roshe, wedding dresses, instyler, iphone cases, p90x workout, timberland boots, reebok shoes, mcm handbags, gucci, oakley, hollister, asics running shoes, valentino shoes, longchamp, converse, vans, converse outlet, baseball bats, hollister, north face outlet, bottega veneta, lululemon, babyliss, mac cosmetics, nike trainers

ninest123 said...

bottes ugg, ugg boots uk, ugg,uggs,uggs canada, canada goose uk, canada goose outlet, pandora jewelry, moncler, hollister, marc jacobs, swarovski, juicy couture outlet, replica watches, canada goose, moncler, swarovski crystal, links of london, wedding dresses, moncler outlet, thomas sabo, karen millen, pandora jewelry, moncler, montre pas cher, juicy couture outlet, ugg pas cher, louis vuitton, moncler, moncler, louis vuitton, moncler, louis vuitton, supra shoes, coach outlet, canada goose, toms shoes, ugg,ugg australia,ugg italia, moncler, doudoune canada goose, canada goose, canada goose outlet, louis vuitton, pandora charms, canada goose, sac louis vuitton pas cher, pandora charms