1-1 What’s Trunk port?

A trunk port is a port that is assigned to carry traffic for all the VLANs.Trunk send Untagged and Tagged information. There are two standards for Trunking:

  • ISL(Cisco)

  • 802.1Q(Industry Standard) is 4 Byte which is considered without Native Vlan

Example:

Trunk between two switches
Enter a caption for this image (optional)
sw1(config)# int fa0/1
sw1(config-if)# switchport mode trunk
sw2(config)# int fa0/1
sw2(config-vlan)# switchport mode trunk

In older version of Cisco devices first you have to write:

switchport encapsulation dot1q

then

switchport mode trunk

1-2 Changing Native Vlan

For changing Native Vlan just write:

sw1(config)# int fa0/1
sw1(config-if)# switchport trunk native vlan 20
1-3 Allow Specific Vlan

To allow specific vlan just write:

sw1(config)# int fa0/1
sw1(config-if)# switchport allowed vlan 10,20,30

In above-mentioned code, just vlan 10, 20, 30 allowed through trunk port

You can use switchport command with add/all/except/none

sw1(config-if)# switchport allowed vlan 10,20,30
sw1(config-if)# switchport allowed vlan add/all/except/none 10,20,30
1-4 How to see trunk port
switch# show interface trunk
or
switch# show interface fa0/1 switchport