07-05-2023
08:24 PM
- last edited on
07-06-2023
09:57 PM
by
Translator
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
Solved! Go to Solution.
07-05-2023
09:55 PM
- last edited on
07-06-2023
10:08 PM
by
Translator
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
07-05-2023
08:31 PM
- last edited on
07-06-2023
09:59 PM
by
Translator
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
07-06-2023
05:53 AM
- last edited on
07-06-2023
10:01 PM
by
Translator
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
07-06-2023
10:45 AM
- last edited on
07-06-2023
10:04 PM
by
Translator
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.
07-05-2023
09:55 PM
- last edited on
07-06-2023
10:08 PM
by
Translator
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
07-05-2023
10:26 PM
- last edited on
07-06-2023
10:09 PM
by
Translator
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.
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