What is Trunk Port in Networking

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.

Trunk Port in Networking
Trunk Port in Networking

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,

 

VLAN Connectivity
Diag-1 VLAN Connectivity

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.

Multi-Vlan Connectivity
Diag-2 Multi-Vlan Connectivity

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

  1. Access Port consumes maximum Switch ports for Inter-Switch Connectivity.
    1. In above Diag, Switch consumed 15 Ports (Fa0/1 to Fa0/15) just for Inter switch connectivity,
  2. Less user will connect on Access Ports.
    1. User can only connect 09 Ports (Fa0/16 to Fa0/24) (if there are 24 Port switch)
  3. Need more Cabling in Access Ports
  4. Additional Expenses to procure Switches, Cables and maintenance cost.
  5. Not Easy to manage or troubleshoot the cabling part.
  6. 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.

VLAN Trunking technique
VLAN Trunking technique

What is benefits of a Trunk Port

If we do comparison between Without and With VLAN Trunking Design, then we will find that:

  1. Switch consumed only 01 Port for Inter switch connectivity.
  2. On this Fa0/1 Trunk Port, all VLAN will travel and will communicate with their respective local VLANs.
  3. More Ports will be available for end users.
    1. User can connect on more access ports (Fa0/2 to Fa0/24) (if there are 24 Port switch)
  4. Need less Cabling.
  5. No Additional Expenses to procure Switches, Cables and maintenance cost.
  6. Easy to manage or troubleshoot the cabling part.
  7. 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:

  1. By default, all Switch ports are part of default VLAN called VLAN-1.
  2. If you do not want create any other VLAN then, no Trunk Port required.
  3. If we need to travel multiple VLANs or more than one VLAN from one switch to another then it is required.
  4. By default, a trunk carries traffic for all VLANs. After Creating , we can allow or remove any specific VLAN to travel.
  5. 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:

  1. Create VLANs
  2. Identify which port needs to use to connect for uplink or downlink with other switches. Mostly these are Fiber Ports.
  3. Connect both Switches.
  4. Configure Trunk Port.
  5. 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

Trunk Config
Config

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 

https://www.youtube.com/channel/UCTbOmLTSlHggEBkt5wFGNRA

Please Share