10-06-2015 12:25 PM - edited 03-08-2019 02:05 AM
Hello All,
Today my team was tasking with adding a vlan to a few of the port channels that lead from our 7ks to our 5ks. Below is an example of the changes we made and the outcome we received.
The 7k had a port-channel configured very similarly to the config below:
interface port-channel99
description TEST PrtChnl99
switchport
switchport mode trunk
swithchport trunk allowed vlan 31,55,100,113-115,171-172,208-209,212-216
switchport trunk allowed vlan add 1210-1214
!
interface Ethernet3/5
description to TEMP NOTHING
switchport
switchport mode trunk
switchport trunk allowed vlan 31,55,100,113-115,171-172,208-209,212-216
switchport trunk allowed vlan add 1210-1214
channel-group 30 mode active
no shutdown
!
interface Ethernet3/6
description to TEMP NOTHING
switchport
switchport mode trunk
switchport trunk allowed vlan 31,55,100,113-115,171-172,208-209,212-216
switchport trunk allowed vlan add 1210-1214
channel-group 30 mode active
no shutdown
Our changes were written out as follows:
*******************
conf t
interface port-channel99
switchport trunk allowed vlan 31,55,100,112-115,171-172,208-209,212-216
end
*****************
Our resulting config looked like this:
********************
interface port-channel99
description TEST PrtChnl99
switchport
switchport mode trunk
swithchport trunk allowed vlan 31,55,100,112-115,171-172,208-209,212-216
switchport trunk allowed vlan add 1210-1214
!
interface Ethernet3/5
description to TEMP NOTHING
switchport
switchport mode trunk
switchport trunk allowed vlan 31,55,100,112-115,171-172,208-209,212-216
channel-group 30 mode active
no shutdown
!
interface Ethernet3/6
description to TEMP NOTHING
switchport
switchport mode trunk
switchport trunk allowed vlan 31,55,100,113-115,171-172,208-209,212-216
channel-group 30 mode active
no shutdown
*******************************
While the switch port accepted us adding vlan112 to the allowed vlans list it erased the switchport trunk allowed vlan add commands!! Does anyone have any information regarding why this happened? We had very similar changes on our 5ks and it did not result in us losing the switchport trunk allowed vlans add command.
If there is any other information you need from me please let me know and I will do my best to provide it to you.
Regards,
BFrazier
10-06-2015 07:28 PM
Hi,
switchport trunk allowed vlan add command is how you add new vlans to existing ones, but the command itself should not appear in the config exactly that way unless there is a bug in the OS. It should simply list the vlan like this command:
switchport trunk allowed vlan 31,55,100,113-115,171-172,208-209,212-216
Now try adding 1210-1214 and see if they show up like this:
switchport trunk allowed vlan 31,55,100,113-115,171-172,208-209,212-216,1210-1214
HTH
12-21-2015 03:09 AM
This is normal behavior, and not a bug.
consider that there is no text wrapping in the display:
a list of Vlans configured as:
switchport trunk allowed vlan 1, 3, 5, 7, 9, 11, 13, 15, 17, 19-21, 101, 123, 125, 127, 129, 131, 150, 1024, 1666, 1890, 1990
would show as something like:
$127, 129, 131, 150, 1024, 166, 1890, 1990$
Therefore configuration may be entered as:
switchport trunk allowed vlan 1, 3, 5, 7, 9, 11, 13, 15, 17, 19-21, 101, 123, 125, 127, 129, 131, 150, 1024, 1666, 1890, 1990
or
switchport trunk allowed vlan 1, 3, 5,
switchport trunk allowed vlan add 7, 9, 11
switchport trunk allowed vlan add 13, 15, 17, 19-21
switchport trunk allowed vlan add 101, 123, 125 1024
switchport trunk allowed vlan add 1666, 1890, 1990
switchport trunk allowed vlan add 127, 129, 131, 150
(or even 1 per line)
but will always show in the configuration as:
switchport trunk allow vlan [as many as can fit on a single displayable line with no truncate]
switchport trunk allowed vlan add [as many as can fit on a single line with no truncate]
and further statements as necessary.
E.g no matter what you write the following will happen:
The VLANS will display in numerical order, (e.g. those 127, 129, 131, 150 vlans in the example above will be shifted from the end to midway through)
truncation will always be applied if it is appropriate:
switchport trunk allowed vlan 1, 2, 3, 4, 5
will always show as:
switchport trunk allowed vlan 1-5
the line will never overflow the line buffer of the console.
(e.g huge list of VLANS is truncated to a vlan a,b,c, then followed by as many vlan add d,e,f lines until it takes to get to the end of the list.)
so in the example:
switchport trunk allowed vlan 31,55,100,113-115,171-172,208-209,212-216
adding vlans 1210-1214
may rightfully show as
switchport trunk allowed vlan 31,55,100,113-115,171-172,208-209,212-216
switchport trunk allowed vlan add 1210-1214
10-07-2015 07:56 AM
Hi,
Switch port trunk allowed vlan add the lan to trunk list and does not show in interface configuration, As told by Reza.
Normally , When you don't use add/remove you're telling the port to only configure the new VLAN.
Hope it Helps..
-GI
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: