12-20-2014 08:33 AM - edited 03-07-2019 09:58 PM
12-20-2014 11:30 AM
Here is an example drawn from a working trunk on a 6500
interface GigabitEthernet2/48
description example of a trunk
switchport
switchport trunk encapsulation dot1q
switchport trunk native vlan 105
switchport trunk allowed vlan 105,123,127
switchport mode trunk
HTH
Rick
12-22-2014 04:51 PM
I'm using Packet Tracer but I don't see this line exist
Switch(config-if)#switchport trunk encapsulation dot1q
What is this line for?
12-22-2014 09:51 PM
Encapsulation dot1q
To correctly deliver the traffic on a trunk port with several VLANs, the device uses the IEEE 802.1Q encapsulation (tagging) method that uses a tag that is inserted into the frame header. This tag carries information about the specific VLAN to which the frame and packet belong. This method allows packets that are encapsulated for several different VLANs to traverse the same port and maintain traffic separation between the VLANs. The encapsulated VLAN tag also allows the trunk to move traffic end-to-end through the network on the same VLAN.
A trunk is a point-to-point link between the device and another networking device. Trunks carry the traffic of multiple VLANs over a single link and allow you to extend VLANs across an entire network.
you will get more understanding from the URL
http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli_rel_4_0_1a/CLIConfigurationGuide/AccessTrunk.html#wp1206629
12-23-2014 11:03 AM
Some switches support multiple encapsulation types.
If the command is not available then don't worry about it. It simply means that the switch only supports that encapsulation so there is no need for the command.
Jon
12-21-2014 10:00 PM
Here is the link were you will get sample configuration.
http://apacketslife.com/blog/2013/07/22/vlan-trunk-configuration/
12-21-2014 10:02 PM
Here goes the configuration
3560 – example
Switch(config)#int fa0/2
Switch(config-if)#switchport
Switch(config-if)#switchport trunk encapsulation ?
dot1q Interface uses only 802.1q trunking encapsulation when trunking
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport trunk native vlan ?
<1-1005> VLAN ID of the native VLAN when this port is in trunking mode
Switch(config-if)#switchport trunk native vlan 3
Switch(config-if)#switchport trunk allowed vlan ?
WORD VLAN IDs of the allowed VLANs when this port is in trunking mode
add add VLANs to the current list
all all VLANs
except all VLANs except the following
none no VLANs
remove remove VLANs from the current list
Switch(config-if)#switchport trunk allowed vlan 1 – 5 , 23 , 34
Switch(config-if)#switchport mode ?
access Set trunking mode to ACCESS unconditionally
dynamic Set trunking mode to dynamically negotiate access or trunk mode
trunk Set trunking mode to TRUNK unconditionally
Switch(config-if)#switchport mode trunk
Ok so now let’s confirm the port by using the show interface trunk command….
sh int trunk
Port Mode Encapsulation Status Native vlan
Fa0/2 on 802.1q trunking 3
Port Vlans allowed on trunk
Fa0/2 1-1005
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide