Configuring a trunk port on a Cisco switch is essential for enabling the transmission of multiple VLANs across a single physical link. It is an important skill in Cisco's IT infrastructure training.
Trunk ports allow switches to communicate with each other by carrying traffic for multiple VLANs, ensuring efficient data transfer within a network.
This configuration is typically performed on Cisco Catalyst switches, which support various trunking protocols, including IEEE 802.1Q. Properly setting up trunk ports facilitates seamless VLAN management and enhances overall network performance.
In this article, we will learn how to configure trunk port on Cisco switches.
VLAN (Virtual Local Area Network) are logical networks created within a physical network infrastructure.
Trunk ports are used to carry traffic for multiple VLANs across a single link between switches.
Trunk ports support the transmission of traffic from multiple VLANs simultaneously.
Also Read: Configuring 802.1x and Troubleshooting Commands
The native VLAN is the default VLAN for untagged traffic on a trunk port. When frames arrive on a trunk port without a VLAN tag, they are assumed to belong to the native VLAN.
The native VLAN is typically used for management traffic or carries untagged frames, such as frames from devices that are not VLAN-aware. VLAN 1 is the native VLAN on Cisco switches by default. It is recommended to change it.
In summary, trunk ports enable the transportation of VLAN-tagged frames between switches, 802.1Q is the standard protocol used for VLAN tagging, and the native VLAN is the default VLAN for untagged traffic on trunk ports.
Topology Diagram
Tasks
● Please note that the enable password is CISCO.
● To check the default value of the timer for dynamically learned MAC addresses on SW01, use the appropriate command.
✓ Modify the timer on SW01 to expire after 100 seconds of inactivity.
● Configure the interswitch links on SW02, SW03, and SW04 to function as 802.1q VLAN trunks using the following guidelines:
✓ Utilize the "interface range" command whenever possible to minimize repetitive configuration.
✓ Higher-numbered switches should initiate the process of dynamically forming trunks with lower-numbered switches.
✓ The trunk link shared by SW02 (E0/0) and SW03 (E0/1) should have VLAN-2 set as the Native VLAN.
✓ Configure all 802.1q VLAN trunks to only allow VLANs 1-5. Any additional VLANs added in the future should not be permitted on these trunks.
● Set VTP version-2 on all three switches as follows:
✓ VLANs manually configured on SW02 should be propagated to SW03 via VTP.
✓ SW04 should use a VTP mode that allows manual creation and deletion of VLANs but does not dynamically update other switches about changes to its VLAN database.
✓ Secure VTP with a password of "CISCO".
✓ Configure any other necessary parameters for VTP operation at your discretion.
✓ On SW04, configure VLANs 1-5 with the following names:
VLAN-2 = "Payroll"
VLAN-3 = "Engineering"
VLAN-4 = "Marketing"
VLAN-5 = "Executives"
✓ Configure the same VLANs with the same names on SW02 and verify that VTP has successfully propagated this information to SW03.
● Ensure that switchports connecting to routers or PCs cannot form VLAN trunks (except for E0/3 on SW03, which can be ignored for now). Refer to the table below for device names, switchports, and VLAN assignments:
Device Name Switchport VLAN Assignment
SW02 E0/1 VLAN-2
SW02 E0/2 VLAN-2
SW03 E1/0 VLAN-3
SW03 E0/0 VLAN-4
SW04 E0/1 VLAN-5
● To confirm VLAN creation and port assignment on each switch, use the "show vlan brief" command.
Visit CCNA Virtual Lab to practice configuration and verification
The MAC addresses are learned on the switches dynamically and switches keep these mac addresses in their mac tables for 300 seconds (aging time) by default. This can be checked on SW01 as follows.
SW01:
! show mac address-table aging-time ! |
The default value can be changed using the following command, as per task change it to 100 seconds, and verify it again using the above command.
Configure all inter-switch links on SW02, SW03, and SW04 to operate as 802.1q trunks. SW04 and SW03 should initiate the process of dynamically forming trunks towards SW03 and SW02 respectively.
If you seek to achieve the certification and live CCNA BootCamp training online then feel free to contact our learning advisors.
SW04:
! configure terminal ! interface range E0/0, E0/2, E1/0-1 switchport trunk encapsulation dot1q switchport mode dynamic desirable switchport trunk allowed vlan 1-5 ! end ! write ! |
SW03:
! configure terminal ! interface range E0/1 switchport trunk encapsulation dot1q switchport mode dynamic desirable switchport trunk native vlan 2 ! interface range E0/1-2, E1/1 switchport trunk allowed vlan 1-5 ! end ! write ! |
SW02:
! configure terminal ! interface range E0/0 switchport trunk encapsulation dot1q switchport trunk native vlan 2 ! interface range E0/0, E0/3, E1/0 switchport trunk allowed vlan 1-5 ! end ! write ! |
Verify on SW02 and SW03, whether 802.1q trunks are forming between the switches SW02, SW03, and SW04, and native VLAN 2 is there between SW02 and SW03.
SW02:
SW03:
Configure VLANs 1-5 using VTP version 2 on SW02, SW03 and SW04. SW02 is a VTP server that allows to creation of VLANs manually and propagating to SW03. SW04 is VTP transparent, it allows the creation of VLANs but does not dynamically update other switches.
Keep the VTP password and VLAN names as given in the task. Also, assign switchport to their respective VLANs connected to routers or PCs as per the table given in the task.
SW02, SW03 and SW04
! configure terminal ! vtp version 2 ! write ! |
SW04:
! configure terminal ! vtp domain CISCO vtp mode transparent vtp version 2 vtp password CISCO ! vlan 2 name Payroll vlan 3 name Engineering vlan 4 name Marketing vlan 5 name Executives ! interface E0/1 switchport access vlan 5 switchport mode access ! end ! write ! |
SW03:
! configure terminal ! vtp domain CISCO vtp mode client vtp version 2 vtp password CISCO ! nterface E0/0 switchport access vlan 3 switchport mode access ! interface E1/0 switchport access vlan 4 switchport mode access ! end ! write ! |
SW02:
Check on SW03 (VTP client) if VLANs have been propagated in its database from SW02 (VP server) and SW02's access ports are assigned to VLAN 2.
SW03:
! configure terminal ! vtp domain CISCO vtp mode server vtp version 2 vtp password CISCO ! vlan 2 name Payroll vlan 3 name Engineering vlan 4 name Marketing vlan 5 name Executives ! interface range E0/1, E0/2 switchport access vlan 2 switchport mode access ! end ! write ! |
In the output above all vlans are propagated on SW03, it is also showing VTP domain and VTP version correctly.
However, there is an MD5 digest checksum mismatch message appearing, this can be removed by flapping (shut then no shut) the trunk ports, or you can simply ignore them.
Check on SW02 and SW04 if VLANs are created and ports are assigned to correct VLANs.
SW02:
SW04:
In this article, we discussed how to configure trunk ports on Cisco switches, which are essential for carrying VLAN traffic between switches.
We covered key concepts related to trunking, including the configuration steps necessary to set up a trunk port, such as defining the interface mode and specifying the native VLAN.
To learn more about Cisco Enterprise, visit our Cisco Enterprise Training Courses Page.
He is a senior solution network architect and currently working with one of the largest financial company. He has an impressive academic and training background. He has completed his B.Tech and MBA, which makes him both technically and managerial proficient. He has also completed more than 450 online and offline training courses, both in India and ...
More... | Author`s Bog | Book a Meeting