0% found this document useful (0 votes)
42 views9 pages

VLAN Trunking and Encapsulation Guide

Uploaded by

Riyaz Admin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views9 pages

VLAN Trunking and Encapsulation Guide

Uploaded by

Riyaz Admin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

PM Networking

CCNA
Exam (200-301) v1.1
Study Companion

www.pmnetworking.in +91-85118 26341


What is Trunking?
Trunking is a method used in networking to carry multiple VLANs over a single physical link between two network
devices. A trunk port can carry traffic from multiple VLANs, whereas an access port can only carry traffic from one
VLAN.

Why Do We Need Trunking?

● Trunking allows multiple VLANs to be carried over a single link, reducing the need for multiple physical
connections.

● Instead of having separate cables for each VLAN, trunking uses a single cable, saving physical ports and
reducing cable clutter.

What are the Challenges Without Trunking?

● Without trunking, you would need a separate physical connection for each VLAN, which is impractical and
costly.
● Managing multiple physical links for each VLAN can make the network design more complex and harder to
manage.

● As the number of VLANs increases, the network becomes harder to scale without trunking.

How does a trunk port determine which VLAN to forward a frame to?

● A trunk port works by tagging Ethernet frames with VLAN information so that the receiving device knows
which VLAN the frame belongs to and this is called Encapsulations.
● When a frame travels across a trunk port, it carries a VLAN tag that identifies its VLAN.

What do you mean by Encapsulation? Is there any protocol that helps in


Encapsulation on Trunk Port?

Encapsulation refers to the method of adding VLAN information to Ethernet frames as they pass through a trunk
port.

Yes, two types of Protocol help in Tagging.

1. ISL (Inter-Switch Link)


2. Dot1Q (802.1Q)
Dot1Q (802.1Q):

● IEEE 802.1Q (commonly referred to as Dot1Q) is the industry-standard protocol used for VLAN tagging in
Ethernet frames.

● It is an Open Standard.

● Dot1Q inserts a 4-byte tag into the Ethernet frame header. This tag provides information that identifies the
VLAN to which the frame belongs.

● When traffic originates from the native VLAN, Dot1Q does not tag the frame. This means that when a frame
from the native VLAN passes over a trunk link, it appears as an untagged frame.

● The total size of DOT1Q is 4 bytes. And this Four byte is also subdivided.

❖ Tag Protocol Identifier (TPID): Size is 2 bytes. Always set to 0x8100 to indicate that the frame is VLAN-tagged.

❖ Priority Code Point (PCP): Size is 3 bits. Used for Quality of Service (QoS) to prioritize traffic. Ranges from 0
to 7, where 7 is the highest priority.

❖ Drop Eligible Indicator (DEI): Size is 1 bit. Indicates whether the frame can be dropped if the network is
congested.
❖ VLAN Identifier (VID): Size is 12 bits. Identifies the VLAN to which the frame belongs. Values from 0 to 4095,
where 0 and 4095 are reserved, leaving 1 to 4094 as valid VLAN IDs.

Note: If the native VLAN is not consistent across all trunk links between switches, it can lead to VLAN mismatches.
For example, if one switch treats VLAN 10 as the native VLAN and another switch treats VLAN 20 as the native
VLAN, untagged frames might be mistakenly assigned to the wrong VLAN.

ISL (Inter-Switch Link)

❖ Developed by Cisco, not commonly used anymore.


❖ Encapsulates the entire Ethernet frame with an additional 30-byte ISL header.
❖ ISL has a larger overhead compared to Dot1Q due to its encapsulation method.

Command to Configure a Trunk Port on the Switch:

Switch(config)# interface gig0/1


Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk encapsulation dot1q
Command to configure Encapsulation Protocol:

Switch(config-if)# switchport trunk encapsulation dot1q


Switch(config-if)# switchport trunk encapsulation isl

How to Allow VLANs on Trunk?

By default, a trunk port allows traffic from all VLANs. But this is not good from a Security perspective So You can
restrict this to specific VLANs.

Switch(config-if)# switchport trunk allowed vlan 10,20,30

Can We Configure One Interface with ISL and Another with Dot1Q?
No, you cannot mix ISL and Dot1Q on different interfaces connected by a trunk. Both ends of the trunk link must
use the same encapsulation method for the VLAN tagging to be understood correctly by both devices.

What do you mean by Native VLAN?

❖ The native VLAN is a special VLAN on a switch that handles untagged traffic on a trunk link.
❖ By default, VLAN 1 is the native VLAN, but this can be changed to any VLAN.
❖ The native VLAN is unique because when a frame from the native VLAN is sent across a trunk link, it is sent
without a VLAN tag.
❖ This untagged frame is then recognized by the receiving switch as belonging to the native VLAN.

When a switch receives a packet without a VLAN tag (an untagged packet), how will
process this?

❖ When a switch receives an untagged packet on a trunk port, it needs to decide how to handle that packet
because trunk ports are usually used to carry traffic for multiple VLANs, each identified by a VLAN tag.

❖ There is some traffic that you will see untagged on the network which means it belongs to native vlan like
Protocols like CDP (Cisco Discovery Protocol), LLDP (Link Layer Discovery Protocol), VTP (VLAN Trunking
Protocol), and DTP (Dynamic Trunking Protocol) typically send untagged frames. These protocols are used
for network management and device discovery.

❖ Apart from this, it is also possible any user device is connected to the Native vlan port and that device is
sending a packet, so in this also switch forward that type of packet without Tagging.

Give me a Real Scenario-based example of How the Switch Handles Untagged Traffic on a Trunk Port.
Scenario:

You have two switches, Switch A and Switch B, connected by a trunk link on GigabitEthernet 0/24.
The native VLAN on this trunk link is VLAN 99.
VLANs 10 and 20 are also being carried across this trunk link.

Now What Happens:

● Device D1 is connected to Switch A and belongs to VLAN 99.


● Device D2 is connected to Switch B and also belongs to VLAN 99.
● When D1 sends a packet because it's on the native VLAN (VLAN 99), the switch doesn’t add a VLAN tag to the
packet—it sends it untagged.
● Switch A receives this untagged packet on its trunk port and forwards it across the trunk link to Switch B,
also untagged.
● Switch B receives the untagged packet on its trunk port and associates it with VLAN 99 because VLAN 99 is
the native VLAN on the trunk port.
● Switch B then forwards the packet to Device D2, which is also part of VLAN 99.

Command to Tag the Native VLAN : Switch(config-if)# vlan dot1q tag native
PM Networking
www.pmnetworking.in +91-85118 26341

You might also like