Software version: 12.2(33)SXI7
So this is a typical stupid question. How do you add VLANs to a trunk?
Assuming you started with a port with default configuration on it, it would be:
interface switchport switchport mode trunk switchport trunk encapsulation dot1q switchport trunk allowed vlan switchport trunk native vlan
Now, I was interrupted while doing this by someone interjecting and stating categorically, that
switchport trunk allowed vlan ```
``` switchport trunk allowed vlan add ```
Not really the way I would do it on a new switchport, but not wanting to hurt feelings I proceeded and saw this:
``` TEST(config-if)#switchport trunk allowed vlan add 10,20,30 TEST(config-if)#do show run int gi9/14 Building configuration...
Current configuration : 279 bytes ! interface GigabitEthernet9/14 description TEST switchport switchport trunk encapsulation dot1q switchport mode trunk shutdown storm-control broadcast level 0.50 storm-control multicast level 0.50 no cdp enable no lldp transmit no lldp receive end ```
To cut a long story short, the switch takes the configuration, but doesn’t apply it. It lead to a lot of head scratching, because you’d think it should work. Switchport state when doing:
``` show interface gi9/14 trunk ```
Shows a state of “other”
``` show interface gi9/14 capabilities ```
was not much help either.
Any CCNP student can tell you, that this is probably due to `switchport trunk allowed vlan add ` not being applicable to ports that have all vlans trunked on them (which is the Cisco default). I'd guess as soon as `switchport mode trunk` is entered in the CLI, adding VLANs using the `switchport trunk allowed vlan add ` becomes inapplicable.
Still, it would be nice to have an error message confirming it instead of a silent failure.