Tuesday, December 13, 2016

Leave a Comment

Trunking Theory

                    When we were talking about Vlan’s we said that a way that we could interconnect Switches if those Switches had multiple Vlans, was to dedicate a Port on each Switch for each Vlan for example, if i am going from the Floor 2 Switch on picture.
                Down to the Floor 1 Switch, i might have a Port on Floor 2, that was dedicated for the Accounting Vlan and Port on the Floor1 Switch that dedicated for the Accounting Vlan, similarly i might have a Port that’s dedicated for the Sales vlan and as you see, i have just got a couple of Switches with a couple of Vlans this is not gonna scale very.
             Well for example, the Floor1 Switch is also got a Port Dedicated for just for the Sales Vlan and its gonna have a Port dedicated just for the Accounting Vlan to get down to this Router.
                  It’s already using up 4 Ports for just to get to other infrastructure devices and a solution to a situation like this is to use Trunk Ports.
                                                     And the Trunk ports is as supposed to an Access Port and, “An Access Port typically has one and only one Vlan Associated with it but a Special Trunk Port can have Multiple Vlans flowing over that port” we can have Accounting traffic, Sales traffic peacefully co-existing on this same Single Link, a Single Trunk One Link and if we had 10 Vlans, can you imagine that, how many number of ports we would save there instead of dedicating 10 ports one per vlan, now we just One Port a Trunk Port, and that Single Trunk Port can carry traffic for Multiple Vlans.
            There is a question that first comes up though that is, how we determined the Vlan to which our frame belong for example of, we have 2nd Accounting Computer on Floor1 and its sends out a Packet going to the 1st Accounting Computer on Floor2, it’s gonna go into the Switch and Floor 1 Switch is gonna send a Packet up the Trunk or the Frame is gonna be sent up the Trunk.
                  When it gets to this Point on this Switch, how does that Switch know, the Vlan to which that frame belongs. Well what we can do is, to Color or to Tag our frames to indicate that frames Vlan membership in our example, the Floor 2 Switch receives that frame and it has no question about, where that frame is destined, it looks at the Tag and it says Oh! this is a Blue Frame or maybe it’s in Vlan 100” and it knows, it needs to go out a Vlan 100 Port and we gonna send that frame out to the destination PC in the Accounting Vlan.
                   And many of our Cisco Switches support a couple of different Trunking types, we have the Cisco proprietary ISL the Inter-Switch Link Trunking type.
               Interestingly Cisco use to prompt this as the preferred type of Trunk, but now Cisco is suggesting now we use the industry standard 802.1Q that the Ethernet Trunking type, that we typically see it’s IEEE 802.1Q commonly called “A Dot1Q Trunk” for short.
                     Now little bit more specific about how the Tagging, how the coloring over frame on Dot1Q Trunk actually works.
                  On picture, we single format of an IEEE 802.1Q Frame in addition to the fields making up an Ethernet frame, notice that we have 4 Bytes or 4 Tagged Bytes have been added.
Ø  2 Tag Protocol Identifier Bytes
Ø  2 Tag Controller Identifier Bytes
                       And inside of these 4 Bytes, we have 12 Bits set indicating to Vlan ID.
                 And we have 3 Bits that indicate the Priority of this frame, these bits are called the “COS or the Class of Service Bits.

                 But these Bits there are 3 of them, they can indicate the Priority of our frame think about how many possible values do we have if we have 3 Bits are disposal of 23 =8, we got 8 possible values and that gonna be in a range of 0-7.
                However Cisco says “we should not use the Values of 6 and 7 they reserved for Networks use” meaning that on our Networks, we should not configure any traffic other than possibly Routing traffic, as having a COS value greater then 5, typically if we doing something like Voice over our Network that Voice media is gonna be given a COS value of 5 and we said that we gonna be adding 4 Bytes to these frame going over a Dot1q Trunk, and 12 Bits inside of those 4 Bytes are gonna be indicating the Vlan ID. Well, there is a Special Vlan called the Native Vlan.
                     The Native Vlan does not have these extra Bytes, its Untagged Vlan and by default on our Cisco Catalyst Switches that Native Vlan default to Vlan 1, however we can change it, here is a big point, if we do change it, we want the Switches at each end of this Trunk to agree on what is the Native Vlan, let’s say that we had one Switch configured with Native Vlan of 100 and it connected over a Trunk to another Switch, but that other Switch was configured with Native Vlan of 200, what would happen if we sent from our original Switch a frame is a member of Vlan 100.
                 Well that original Switch Vlan 100 is the Native Vlan, it’s gonna be Untagged when it reaches the Second Switch, the Second Switch is gonna look at it and say “Oh! this is an Untagged Frame, this must belong to the Native Vlan of 200 according to that other Switch”, that allow us to do something called Vlan Hopping going from one Vlan to another Vlan because the Switches don’t agree on who should be the Native Vlan, we don’t want to do that we wanna make sure that, the Switches that each end of Trunk agree on the Native Vlan, and in upcoming session we gonna see how to configure a Native Vlan on a Trunk, and we also gonna see how to configure Trunks.
                Interestingly Trunks can be dynamically negotiated and Broad up between couple of Switches, we can have Switchport set to different Trunking modes, let’s see how it works.
                           Let’s imagine that we have these two Switches interconnected with a link
               And we want to form a Trunk between these Switches, we have different Trunking modes that we can configure on the Switch Ports, here they are as a reference for you we got these 4 modes.
                     If we tell a Port that you are an Access Port, it is not going to be a Trunk Ports, it’s going to be an Access Port which usually means that its only gonna be participated on a single Vlan because usually means, there is an exception with Voice Vlans there we talked about later but typically an Access Port belongs to one and only one Vlan.
                 If we tell a Port that “Hey! You are Trunk Port”, that means it’s a Trunk Port really doesn’t matter what the other side is doing, that Port is gonna be a Trunk Port but we can have a Trunk dynamic formed between 2 Switches that are willing to form a Trunk on their Ports.
                   We can have either the Dynamic Desirable Mode set on a Port or Dynamic Auto, the way a Trunk is dynamically formed is using a Protocol a called “DTP” or Dynamic Trunking Protocol”.
                                             And both the Trunk and the Dynamic Desirable modes will send DTP Frames to the other side, if a Dynamic Desirable or a Dynamic Auto Port receives a DTP frame, it knows that “Hey! The other side of this link is wants to become a Trunk” and we are good with that, let’s form a Trunk.
                     Notice thought the Trunk Mode and Dynamic Desirable they originate DTP frames, the Dynamic Auto Mode does not, its wiling to become a Trunk if it happens to receive a DTP frame but it’s not gonna send one that’s the difference between Dynamic Desirable and Dynamic Auto.

And all of these different Modes, let’s check out different combination and permutation that we might have, and ask will a Trunk will formed with different combination of Trunking Modes.
               
               If we have one side of our link set to the Access Mode, for example if Switch Sw1 set to the Access Mode and really doesn’t matter what Switch Sw2 is set to because a Trunk is not gonna be formed in that case, because we told one side it doesn’t matter if you receive DTP frame you are in Access Port and if we hard code one side to be an Access Port, it’s not gonna be Trunk.
                       What if one Side is set to Trunk and the other side is set to either Dynamic Desirable or Dynamic Auto, and either case a Trunk is going to be formed, remember that Port configured for Trunk mode is going to send a DTP frames and either a Dynamic Desirable or a Dynamic Auto port will form a Trunk if it receives a DTP frames, and it’s gonna be receiving the DTP frames from the other side of the link configured as a Trunk.
                      And if both side is set to Trunk obviously, a Trunk is gonna be formed, it really doesn’t matter, that they happen to be sending a DTP frames, they are not looking for DTP frames there are just both independently told, you are Trunk and as a result we gonna have a Trunk between those Switches.

                       And it’s get bit a trickier though, when we get to the different Dynamic modes for example, Dynamic Desirable on both sides will a Trunk be formed here, actually YES remember what Dynamic desirable does, it’s desiring to set it to Trunk and as a result it’s going to initiate, it’s going to send DTP frames the other side is gonna see the DTP frames and say “Great! let’s be a Trunk”, and Trunk is gonna be formed.
                        What about Dynamic Desirable on one side and Dynamic Auto on the other side, well Dynamic Desirable is gonna be sending DTP frames but Dynamic Auto port is not going to be sending or we should say “it’s not going to be initiating DTP frames but when it receives the DTP frames from the Dynamic Desirable side” it gonna say “Oh! the other side want to be a Trunk, i am willing to do that”, let’s form a Trunk and Trunk is going to formed.

                       But if both sides are set to Dynamic Auto, and that case both Ports are willing to form a Trunk however, no one is initiating it, neither side is going to initiate a DTP frame and as a result, even though both sides are willing, a Trunk is not going to be formed.
Those are some different ways that we can Dynamically and Statically form a Trunk between a couple of Cisco Catalyst Switches.


                     If You Like the Post. Don’t forget 
            to “Subscribe/Share/Comment”. Thank You.

0 comments:

Post a Comment