10-28-2019 07:31 AM
Hi averybody,
Im checking different configuration in internet investigating about trunk mode and I can see follow on a router interface:
interface FastEthernet0/4
switchport trunk native vlan 100
switchport trunk allowed vlan 1,10,20,30,100,1002-1005
switchport mode trunk
I thought that using switchport mode trunk it was not necessary to add "switchport trunk allowed....." Is it correct this configuration? If yes, this port act as trunk allowing pass all vlan's or only should allow vlan 1,10,20,30,100,1002-1005?
Thanks!
10-28-2019 07:37 AM - edited 10-28-2019 07:38 AM
If you leave command under interface switch mode trunk (this means all the VLAN allowed). - without any allowed vlan statement.
switchport trunk allowed vlan 1,10,20,30,100,1002-1005 - This one only allowed mentioned VLANs on trunk, rest will be dropped.
10-28-2019 07:39 AM
Hi there,
switchport trunk allowed vlan is an optional command on a trunk interface. It explicitly defines the list of VLAN IDs that will be allowed on a trunk link. If the command is omitted then all VLAN IDs are implicitly allowed.
cheers,
Seb.
10-29-2019 12:30 AM
Without switchport trunk allowed vlan command all vlan are allowed, so what is the reason to add this command?
10-29-2019 12:48 AM
It allows you to manually specify which VLANs are to be permitted on the trunk link.
It you do not use the command and just have switchport mode trunk then all VLANs will be permitted on the trunk link. If you are using VTP then the VLANs not used by downstream switches will be automatically pruned...but you won't encounter VTP in production that often, so you should manually set the permitted VLAN list.
cheers,
Seb.
10-28-2019 09:18 AM
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