11-20-2022 08:52 PM
Hello,
We have C3850 24ports and we are adding vlans on the 10G trunk port. The command use were:
(config-if)#switchport trunk allowed vlan add 429
(config-if)#switchport trunk allowed vlan add 430
(config-if)#switchport trunk allowed vlan add 431
(config-if)#switchport trunk allowed vlan add 432
But then when we check, instead of adding into the current line of allowed vlan, it creates another line like in the image below:
We expect it to be like this:
The trunking is ok and the data is flowing. We're just really puzzled why it is like that. You know, it's not usually what we see. Did you experience it before?
Solved! Go to Solution.
11-20-2022 10:43 PM
I agree with @Kasun Bandara that what you are experiencing is expected behavior. It is how the parser works as it builds the output of show run. There is a limit on the length of a line of output. When the number of vlans on a trunk is greater than will fit on a single line then the second (and following) lines appear and use the vlan add form of the command.
11-20-2022 08:56 PM - edited 11-20-2022 09:00 PM
There is nothing wrong with that config. The VLANs are there. The allowed VLANs are from 429 to 432.
Gone were the days where the VLANs were listed down individually and making the configuration look very long.
@HHUBS wrote:
(config-if)#switchport trunk allowed vlan add 429
(config-if)#switchport trunk allowed vlan add 430
(config-if)#switchport trunk allowed vlan add 431
(config-if)#switchport trunk allowed vlan add 432
And this can be expressed in a single line: switchport trunk allowed vlan add 429-432
11-20-2022 09:23 PM
its ok. it happens when list of VLANs, is over the limitation of single line
11-20-2022 10:43 PM
I agree with @Kasun Bandara that what you are experiencing is expected behavior. It is how the parser works as it builds the output of show run. There is a limit on the length of a line of output. When the number of vlans on a trunk is greater than will fit on a single line then the second (and following) lines appear and use the vlan add form of the command.
11-21-2022 03:38 AM - edited 11-21-2022 03:38 AM
Hello
Its by default, after 12 entries, it will parse onto an additional allowed line
11-21-2022 07:10 AM
Thanks all for your comments. Last question, @paul driver can you refer me to the doc that states that 12 entry limit?
11-21-2022 09:06 AM - edited 11-21-2022 09:09 AM
Hello
Don’t believe there is one tbh- The value i stated seems to be a default as i’ve tested this on to both IOS and XE software and checked older ios running on live production hardware and 12 vlan statements (not vlans) seems to be a recurring value per line even in your OP 12 looks like the limit.
However the basic answer to your question was already answered by @Richard Burts and @Leo Laohoo which is what you see is expected behaviour when pruning trunk interfaces with multiple vlans
11-21-2022 10:25 PM
I am glad that our explanations have been helpful. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.
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