As we learned and understood on Layer-2 Switch users or Ports in the same VLAN can communicate and send data. That is correct and possible if all users are connected on the same Switch. But what if users or Switches are located at other locations, floors, or Buildings. How we will communicate with them in the same VLAN. In this article, we discuss a solution and understand What is Trunk Port in networking, and how it helps to travel multiple VLANs on a single link.
What is the use of Trunk Port in networking
To understand the requirement of this technique, let’s understand that how VLAN works in switching. As we all know, Layer-2 Switch cannot perform Inter-Vlan communication and for Intra-Vlan communication all users should be in same VLAN.
Let understand this with below example,
There are 3 Vlans are configured on both Switches and both are connected with each other via 3 Lan cables. Anything wrong in this design or connectivity?
Now there are another Scenario, on below Switches there 15 Vlans are configured and both switches are connected with 15 Lan cables. Is this any thing found wrong this this design or connectivity? Yes, you are right.
In Diag-1, There are only 3 Vlan and we can connect Three LAN cables between both the switches, but in Diag-2 there are 15 Vlan and need 15 LAN cables to connect both Switches for Intra- VLAN Communication.
If you have 24 port switches, then 15 ports from both switches consumed only for inter-switch connectivity, and there are on 9 ports are left for user connectivity. BAD Design.
What is the difference between Access and trunk port
- Access Port consumes maximum Switch ports for Inter-Switch Connectivity.
- In above Diag, Switch consumed 15 Ports (Fa0/1 to Fa0/15) just for Inter switch connectivity,
- Less user will connect on Access Ports.
- User can only connect 09 Ports (Fa0/16 to Fa0/24) (if there are 24 Port switch)
- Need more Cabling in Access Ports
- Additional Expenses to procure Switches, Cables and maintenance cost.
- Not Easy to manage or troubleshoot the cabling part.
- If Switches are located at different place, building, Floor, rack then connect in this fashion is not possible.
So, what is the solution. Now Trunking is there to resolve this issue and provide a very feasible solution where all VLAN can be carried on a single port or Single LAN Cable.
What is Trunk Port in VLAN
A trunk is a method that carries user traffic for more than one VLAN over a Single LAN Cable or Port.
So, let’s us understand this in simple way.
What is benefits of a Trunk Port
If we do comparison between Without and With VLAN Trunking Design, then we will find that:
- Switch consumed only 01 Port for Inter switch connectivity.
- On this Fa0/1 Trunk Port, all VLAN will travel and will communicate with their respective local VLANs.
- More Ports will be available for end users.
- User can connect on more access ports (Fa0/2 to Fa0/24) (if there are 24 Port switch)
- Need less Cabling.
- No Additional Expenses to procure Switches, Cables and maintenance cost.
- Easy to manage or troubleshoot the cabling part.
- If Switches are located at different place, building, Floor, rack then it is easy to laying Cable and provide connectivity.
Two methods of identifying VLANs over trunk links are:
Inter-Switch Link (ISL)—A Cisco proprietary method that encapsulates the original frame in a header, which contains VLAN information. It is protocol-independent and can identify Cisco Discovery Protocol (CDP) and bridge protocol data unit (BPDU) frames.
802.1Q—Standards-based, tags the frames (inserts a field into the original frame immediately after the source MAC address field), and supports Ethernet and Token Ring networks
How to configure Trunk Port
Before explaining configuration, lets understand few things:
- By default, all Switch ports are part of default VLAN called VLAN-1.
- If you do not want create any other VLAN then, no Trunk Port required.
- If we need to travel multiple VLANs or more than one VLAN from one switch to another then it is required.
- By default, a trunk carries traffic for all VLANs. After Creating , we can allow or remove any specific VLAN to travel.
- Trunk Port should be configured on all switch port with same VLAN, protocol and encapsulation and should be connect with trunk port only on other end.
Step to Configure:
- Create VLANs
- Identify which port needs to use to connect for uplink or downlink with other switches. Mostly these are Fiber Ports.
- Connect both Switches.
- Configure Trunk Port.
- Allow VLAN (if req) else by default all VLAN allowed
Configuration Commands:
int gig0/1
Switch mode trunk
switchport trunk allowed vlan <vlans ID> / all
No shut
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#no shut
Switch#show interfaces fastEthernet 0/1 switchport
Name: Fa0/1
Switchport: Enabled
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
Trunking VLANs Enabled: All
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
Conclusion
Trunk Port is a networking technique which allows to carries more than one VLAN on a single physical connectivity or Ports between network devices. Once VLAN transported from one switch to another via Trunk Port, switch will leave trunk port and distribute the data with their respective VLAN and Access Ports. By Trunking technique, we can save our switch ports. Ports can become trunk ports either by static configuration or dynamic negotiation using Dynamic Trunking Protocol (DTP).
Visit our site: https://www.kbrosistechnologies.com/
Watch more Video https://www.youtube.com/channel/UCpcd6IshE1caAbf9EdJd3gw