cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
32158
Views
25
Helpful
5
Replies

Is "switchport trunk allowed vlan all" necessary?

tunemore1
Level 1
Level 1

What is is purpose of "switchport trunk allowed vlan all" command?

If the port was set to "switchport mode trunk", is it still necessary to use "switchport trunk allowed vlan all" in order to allow all vlans?

Thanks,

5 Replies 5

mohammedmahmoud
Level 11
Level 11

Hi,

No, all VLANs are allowed by default you don't need this command by default, this command is used to manipulate some design consideration when defining the VLANs that are not allowed to transmit and receive on the trunk port:

This example shows how to define the allowed VLANs list for trunk port Fa0/1 to allow VLANs 1 to 100, VLAN 250, and VLANs 500 to 1005, and how to verify the allowed VLAN list for the trunk:

Switch(config)# interface fa0/1

Switch(config-if)# switchport mode trunk

Switch(config-if)# switchport trunk allowed vlan remove 101-499

Switch(config-if)# switchport trunk allowed vlan add 250

Switch(config-if)# end

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

glen.grant
VIP Alumni
VIP Alumni

I think the only reason it is there is if you happened to have a current trunk pruned only to allow a few vlans and then for some reason want to allow them all . By default they are all allowed.

I think you are right. "Add" and "Remove" are needed but "all" seems a bit redundant.

Hey, I am still hoping somebody will come up with suprise answer. ;)

Hi,

When configuring a port as trunk, all VLANs are allowed by default, you don't need this command, you'll need it to reset allowed VLANs if for any reason you have formerly removed any.

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

ciscokid6969
Level 1
Level 1

FYI ran across this today. Previous admin had made most trunks with this type of command:

switchport trunk allowed vlan 1,2,5,10,20,50,55,60,70,99,999

 

However this necessitated that anytime we added a vlan, we had to go a whole bunch of interfaces and update this. Since we allow all vlans over trunk ports on all switches, running the command:

switchport trunk allowed vlan all

 

on each interface, fixed it and REMOVED the "allowed vlan" line. The 'trunk allowed vlan all' command does not show up the config, which makes me think it is the implicit default as others have stated.

 

just dont run 'no trunk allowed vlan' because that will break your interface :P The correct negate command is the all command above.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco