08-06-2022 08:35 AM
Hi,
please someone tell me the difference of switchport trunk encapsulation dot1q vs switchport trunk allowed vlan
08-06-2022 08:52 AM
- There is no difference between the two because both elements are unrelated, encapsulation specified the trunk-protocol as denoted , allowed vlan(s) specifies which vlans are allowed on the trunk.
M.
08-06-2022 08:54 AM
that means I can use both the commands together ?
08-06-2022 09:18 AM
- You can't use them together on the same command line, because they need to execute different things.
M.
08-06-2022 09:41 AM
there are two protocol tag the frame pass through the Trunk ISL and dot1Q
we use
switchport trunk encapsulation dot1q
to specific the protocol dot1q
to config the VLAN allow to pass through the trunk we use the command
switchport trunk allowed vlan
Yes you can use both command under same port.
08-08-2022 01:28 AM
The 2 commands are somewhat related but are quite different. If you want a switch port to operate as a trunk then the most important required command is switchport mode trunk. After defining the port as a trunk there are other commands that you might use.
switchport trunk encapsulation dot1q is an optional command that defines the encapsulation type of this trunk. dot1q is the default encapsulation type and the other type is isl. It has been a very long time since I have seen a switch configured to use isl, so the command to set encapsulation type is not used very frequently in live environments.
When a switch port is configured as a trunk, by default all vlans are carried on the trunk. If you want to specify that only certain vlans are to be carried on this trunk you would use the command switchport trunk allowed vlan.
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