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

Does it make sense use both terms on trunk interface?

sir_ulrick
Level 1
Level 1

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!

5 Replies 5

balaji.bandi
Hall of Fame
Hall of Fame

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.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Seb Rupik
VIP Alumni
VIP Alumni

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.

Without switchport trunk allowed vlan command all vlan are allowed, so what is the reason to add this command?

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.

Martin L
VIP
VIP

use show interface trunk to see difference; my example; Gigx/x have default settings, PO 6 has not;

Port Vlans allowed on trunk
Gig3/0 1-4094
Gig3/2 1-4094
Po6 1,5,10,20,100

interface Port-channel6
switchport trunk allowed vlan 1,5,10,20,100