Missing VLANs are not automatically created in NX-OS

In IOS, if we assign a switchport to a non-existent VLAN, the switch will kindly create the missing VLAN for us. NX-OS does not do that – if a switchport is assigned to a missing VLAN, the interface will be placed in the down state. Let’s look at it…

Here’s an example of an IOS switch which doesn’t have VLAN 2 defined:

IOS_SWITCH(config-if)# sw ac vl 2
% Access VLAN does not exist. Creating vlan 2
IOS_SWITCH(config-if)#

It created the VLAN, assigned it to the interface and took the time to tell us about it.

Let’s compare that with the behavior on NX-OS:

switch(config-if)# sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth1/2, Eth1/3, Eth1/4, Eth1/5
                                                Eth1/6, Eth1/7, Eth1/8, Eth1/9
                                                Eth1/10, Eth1/11, Eth1/12
                                                Eth1/13, Eth1/14, Eth1/15
                                                Eth1/16, Eth1/17, Eth1/18
                                                Eth1/19, Eth1/20, Eth2/1, Eth2/2
                                                Eth2/3, Eth2/4, Eth2/5, Eth2/6

Remote SPAN VLANs
-------------------------------------------------------------------------------

Primary  Secondary  Type             Ports
-------  ---------  ---------------  -------------------------------------------

No VLAN 2 anywhere to be seen – let’s try adding eth1/1 to VLAN 2 now:

switch(config)# int eth1/1
switch(config-if)# sw ac vl 2

Now look at the VLANs on the Nexus (again):

switch(config-if)# sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth1/2, Eth1/3, Eth1/4, Eth1/5
                                                Eth1/6, Eth1/7, Eth1/8, Eth1/9
                                                Eth1/10, Eth1/11, Eth1/12
                                                Eth1/13, Eth1/14, Eth1/15
                                                Eth1/16, Eth1/17, Eth1/18
                                                Eth1/19, Eth1/20, Eth2/1, Eth2/2
                                                Eth2/3, Eth2/4, Eth2/5, Eth2/6

Remote SPAN VLANs
-------------------------------------------------------------------------------

Primary  Secondary  Type             Ports
-------  ---------  ---------------  -------------------------------------------

switch(config-if)#
switch(config-if)# sh int eth1/1 switch
Name: Ethernet1/1
  Switchport: Enabled
  Switchport Monitor: Not enabled
  Operational Mode: access
switch(config-if)# sh run int eth1/1
version 4.0(1a)N1(1)

interface Ethernet1/1
  speed 1000
  switchport access vlan 2

switch(config-if)#

Be aware of this behavior in NX-OS – it doesn’t like IOS-style VLAN shorthand!

Related posts:

  1. VLANs in IOS and NX-OS There are always limitations and system-reserved resources on network platforms....
  2. EtherChannel behavior in NX-OS I’ve had a lot of discussions with clients about the...
  3. The FEX information is cached until it’s re-assigned to a different FEX Continuing our journey into the world of FEXs on the...
  4. Nexus (NX-OS) protocol support (and cleanup) Over the years, Cisco has been very instrumental in the...
  5. NX-OS – great interface range support (as I’ve been working with NX-OS as of late, I...

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: , , , , , , , , , , , , , , , , ,

Leave a Reply

You must be logged in to post a comment.