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

The switch port trunk allowed vlan command

DavidZhang47328
Level 1
Level 1

Hi all,

I want to add some allowed

vlan (3400,3410,3420)

in uplink port on 

switch WS-C2960X-24PS-L

and use this command

##switchport trunk allowed vlan add 3400,3410,3420

Why it comes with this:

interface GigabitEthernet1/0/24
switchport trunk allowed vlan 51,52,61,62,100,400,556-558,752,850,988,3400
switchport trunk allowed vlan add 3410,3420

and not this:

switchport trunk allowed vlan 51,52,61,62,100,400,556-558,752,850,988,3400,3410,3420

 

 

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

Hello @DavidZhang47328,

The behavior you described, where the

switchport trunk allowed vlan add

command results in the output you provided, is expected for Cisco Catalyst switches.

When you use the

switchport trunk allowed vlan add

command, it appends the specified

VLANs

to the existing list of allowed

VLANs

on the trunk port. It does not replace the existing

VLANs

but adds the specified

VLANs

to the existing configuration.

In the output you provided, the initial

VLAN

configuration on the

interface GigabitEthernet1/0/24

already includes

VLANs 51, 52, 61, 62, 100, 400, 556-558, 752, 850, 988, and 3400

When you run the

switchport trunk allowed vlan add 3400,3410,3420

command, it adds

VLANs 3410 and 3420

to the existing list of allowed

VLANs

To ensure that your Trunk transport expected vlan, chech it with command

#sh int trunk
Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

5 Replies 5

Hello,

The output is very long. Most switches I have seen do that. It just continues the

VLANs

on the next line but to make sure you understand what its a part of it includes the same line of 

switchport trunk allowed vlan.

 That way you know all of the

VLANs

allowed on the trunk and know what config parameters its a part of.

Hope that helps

-David

the lines are split over multiple lines so each line is less then 80 characters long
this results in multiple 

switchport trunk allowed vlan add ....

lines

this 80 character limit  (terminal window 24x80) will occur in more output and with more configuration commands

Yes. That’s what I say in my original post about the line being truncated. The OP asked why the

switchport vlan add

command was visible on the second line instead of just having several lines of

VLANs

I mentioned it was so you know what part of the configuration it belonged to. Otherwise it’s just a string of

VLAN

numbers under the Interface.

M02@rt37
VIP
VIP

Hello @DavidZhang47328,

The behavior you described, where the

switchport trunk allowed vlan add

command results in the output you provided, is expected for Cisco Catalyst switches.

When you use the

switchport trunk allowed vlan add

command, it appends the specified

VLANs

to the existing list of allowed

VLANs

on the trunk port. It does not replace the existing

VLANs

but adds the specified

VLANs

to the existing configuration.

In the output you provided, the initial

VLAN

configuration on the

interface GigabitEthernet1/0/24

already includes

VLANs 51, 52, 61, 62, 100, 400, 556-558, 752, 850, 988, and 3400

When you run the

switchport trunk allowed vlan add 3400,3410,3420

command, it adds

VLANs 3410 and 3420

to the existing list of allowed

VLANs

To ensure that your Trunk transport expected vlan, chech it with command

#sh int trunk
Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Hi ,

I have run this command

sh int trunk

I can see the

3400,3410, 3420 are the Vlans allowed on trunk

thank you for your help.