Trunking Protocols Quick Guide

NOTE : This Discussion has been divided into two Parts (check the first Comment right after this discussion for Part 2)

PART 1 :

before i give you a more precise Explanation, let's briefly discuss the theory of How Trunking works :

let's say that we have two Switches : SW1 and SW2 conneted to each Other through Fa0/1 (as Shown in Fig.1 below)

                 Fig.1

What's Trunking?
Trunking is a method of Tagging (or Marking) the Frames Between Switches, were the Tag is the Vlan Number from the Source Interface of that Frame , so that way we can pass Frames from Multiple Vlans through a Trunk Link .
What's a Trunk Link ?
a Trunk Link is a Link that doesn't Belong to any Vlan (you can think of a Trunk Link as an Unbiased Link that accepts any Vlan regardless)
for example between SW1 and SW2 if we had that Link (FA0/1) in Vlan 10 , then FA0/1 Links will only forward the Vlan 10 frames (frames between H1 and H3 which are in Vlan 10) , on the other hand , if we put F0/1 links in Vlan 20 then it woould only forward frames between H2 and H3 (which are in Vlan 20).
but what if we wanted to forward Frames from Both Vlans (Vlan 10 and Vlan 20 ) between FA0/1 Links ?
this's where Trunk Links come into Play, Trunk Links allow for Multiple Vlans to be passed through the Links, by Tagging the frames with the Vlan Number from the interface that Initiated the Frame (the source of the frame), and then send it to the other side of the Link (FA0/1 in this example) so when the other side recieves the frame with a tag of a specific Vlan Number , it will effectively send that frame only to interfaces that has joined the Vlan (and other Trunk Links if existed)
for example, in Fig.1: if we set FA0/1 between SW1 and SW2 to a trunk Link , and then H1 Send a Broadcast Frame (a Frame with a destination of FF:FF:FF:FF:FF:FF) the following steps will happen : (keep an eye on Fig.1 Throughout this example)
1. H1 sends a frame to FF:FF:FF:FF:FF:FF (to the Broadcast Address) out it's interface towards SW1.
2. SW1 receives the frame (with a destination of FF:FF:FF:FF:FF:FF ), and because it's a Broadcast destination SW1 checks if it has any other interfaces in Vlan10, and it realizes that it has no other interfaces in that Vlan, so it checks if it has Trunk Interfaces.
3. SW1 finds out it has a Trunk Link ( after initiating the command: SW1# show interfaces Trunk ) whichs is FA0/1 , so it Tags (Marks) the Frame with a value of 10 (hence, Vlan 10) and floods the frame out that interface to SW2.
4. SW2 Receives the Frame sent from SW1 and (because it's a Trunk Link) it checks the Vlan tag in the Frame, it realizes that (Vlan Tag = 10 ) the Frame Belongs to Vlan 10.
5. SW2 does a look up and checks if it has any more Interfaces that are in Vlan 10 or are a Trunk, and it realizes that FA0/10 is in Vlan 10.
6. SW2 removes the Tag (the Value of 10) from the Frame and Floods the (sends the Broadcast) Frame out Interface FA0/10 to H3.
7. H3 receives the frame on it's Interface and checks the Destination address and realizes it's a Broadcast Frame, so it automatically accepts the frame (because all Hosts accept the Broadcast address frames by default)

now that we have discussed the basic theory of Trunking, and had a basic detailed example of how it works, let's briefly discuss the Types of Trunk :
A ) in General there're two Types of Trunks (or Trunk encapsulations to be more precise..) :
1. ISL (Inter-Switch Link) Trunks: those are the First Type of Trunk encapsulation ever created, by Cisco ,for Cisco Devices (Cisco Proprietary ).
2. 802.1Q Trunks: also known us Dot1q, which are the Industry's standards (hence, are used by every vendor, Cisco or non Cisco devices..)created by IEEE organization, this type is now the commonly deployed trunking method, and is the Cisco Recommended way as well.
one point to keep in mind here is that the Trunk method in one Switch must match on the other side of the Switch on the Link between them (for example in Fig.1 the FA0/1 Link between SW1 and SW2, should either be Encapsulated with ISL or Dot1q), so we cannot have one side of the Link running ISL and the other Side Running Dot1q.

NOTE : i have only gave you a brief introduction of the two trunking Types, just to serve as an Introduction to what is to follow.

B ) Trunking Methods :
now let's Discuss the two methods that we can use to configure our trunks, which there are two ways:
1. Static Trunks:
as the name implies, this method is Static , so you basically just enter the Interface on which you want to change to a trunk and statically set it as a trunk.
Drawback to this method : if the other side is set as an Access Link(a link that belongs to one Vlan only) then we will have problems on the Link, so we have to be very careful.
how to configure it:
for example between SW1 and SW2 :
!__SW1:
enable
configure terminal
interface Fa0/1
switchport mode Trunk
end
!
!__SW2:
enable
configure terminal
interface Fa0/1
switchport mode Trunk
end

this trunking method is sometimes called the On Mode (because we have to set the Trunk method On Manually )

NOTE!: Notice that we used the configuration on Layer 2 Switches (like 2950, or 2960
Switches..etc), where the encapsulation method defaults to 802.1Q (Dot1q) encapsulation.
in Layer 3 Switches (like Catalyst 3550, or 3560,and 3750..etc) we will have to Manually set the Trunking method (using the interface command : Switchport trunk encapsulation dot1q)
so if SW1 and SW2 were to be Layer 3 switches, thenour configuration would be the following :
!__SW1&SW2:
enable
configure terminal
interface Fa0/1
switchport trunk encapsulation dot1q
switchport mode Trunk
end

2.Dynamic Trunks:
as we discussed earlier in Static Trunks, that the issue with static trunks is that they are static (hense, are more prone to Human Mistakes), one problem might be that a network engineer sets one end of the Link as a Trunk port, while leaving the other side as an Access port.
to solve this Static, sometimes problematic issue, Dynamic Trunks were Created:
as the name implies, Dynamic trunks negotiate the Trunk Type (802.1Q or ISL) and the Link Type (Access port or a Static Port) Dynamically .
but how does that happen ?
Dynamic Trunking send a frame called DTP (Dynamic Trunking Protocol ) frame,
which informs the other side of the link that it wants to become a Trunk.
There are two Types of Dynamic Trunks:
a ) Dynamic Desirable: this type means that the Switch's Interface wants to become a Trunk,so it sends a DTP frame to the other side asking it to become a Trunk Link, if the other side of the link sends a reply, then the Link becomes a trunk, else if the other side does not send back a reply, then the link becomes an Access Link.
b ) Dynamic Auto: this type means that the switch's interface does not mind becoming a Trunk, but it's NOT Motivation to do so, what do i mean by "NOT Motivated to do so" ?
it means that the Auto Link will not send DTP frames, asking to become a Trunk. instead it will just listen for DTP frames, and if it receives one, then it will become a Trunk port, else if it doesn't receive a DTP frame, then it will become an Access link. so basically Dynamic Auto is almost the same as Dynamic Desirable, only that it does NOT send DTP Frames.

NOTE: by default ,Static Trunks also send DTP frames to the other side of the link asking them to become a trunk, but unlike the Dynamic Desirable, Static Trunks become Trunk Links regardless of whether they receive a DTP reply from the other side or Not.

If you need me, @Bugazia Me, and i'll be there .

Comments

  • BugaziaBugazia ✭✭✭
    edited June 2017

    Part 2:
    CONCLUSION:

    Effectively, we then Have 3 types of Trunk Links:
    1) ON (Statically Set On) : sends DTP frames by default, but it will remain a trunk regardless. (we can stop them from sending DTP frames by initiating the interface level command : " Switchport Trunk Nonegotiate ")
    2) Dynamic Desirable : sends DTP frames, and replies to DTP Frames, but if no DTP Frames were received, then it becomes an Access port.
    3)Dynamic Auto : Doesn't send DTP frames, but it does reply to DTP frames if it receives any. if no DTP Frames were received, then it becomes an Access port.

    There are two encapsulation Protocols:
    1) ISL.
    2) Dot1q.

    keep in mind :
    Layer 2 switches -> have dot1q encapsulation on by default.
    Layer 3 switches -> negotiate the encapsulation method:
    they first try to become ISL, if that Fails then they try to become Dot1q.

    the table below summarizes the Compatible Options and Incompatible Options (that result in an Error) Between SW1 and SW2 (for Both Access and Trunk port modes):

    your feedback is Highly appreciated ..
    I hope that this information was helpful to you and good luck with your CCNP Switch Studies :)

    If you need me, @Bugazia Me, and i'll be there .

Sign In or Register to comment.