VLAN Configuration


This section describes how to configure a VLAN, and includes the following topics:

Information About VLANs

Guidelines and Limitations

Creating a VLAN

Configuring VLAN Characteristics

Verifying a VLAN Configuration

Additional References

Feature History for VLANs


Note For information about private VLANs, see Chapter 4, "Private VLAN Configuration."


Information About VLANs

Physical NICs are always assigned as trunk ports, which transmit either VLAN tagged or untagged packets. A vswitch can have the following VLAN configurations:

Configuration
Description

External switch tagging (EST)

Physical NICs are untagged and all VNICs are access ports.
EST is enabled by default and is used when the VNIC's VLAN is set to 0 or left blank.

Virtual switch tagging (VST)

All physical NIC ports are tagged and VNICs are access ports.
VST is enabled whenever the VNIC's VLAN is set to any value between 1 and 4094 inclusive.

Virtual machine guest tagging (VGT)

All physical NIC ports are tagged. VNICs are trunk ports. To configure VGT, the VLAN is set to 4095 on the VNIC connected to the virtual machine.


Physical ports are always trunk ports by default. The virtual machine interfaces can be either access ports or trunk ports. If a VEthernet interface is set as a trunk port, the VLAN is 4095.

VEthernet interfaces assigned to specific VLANs are tagged with the VLAN when transmitted. A VEthernet interface that is not assigned to a specific VLAN, or assigned to VLAN 0, are transmitted as untagged on the physical NIC interfaces. On the transmit side, this is equivalent to the native VLAN available in Cisco switches. When the VLAN is not specified, it is assumed to be 0.

Table 3-1 summarizes the actions taken on packets recieved by the virtual ethernet module (VEM) based on VLAN tagging.

Table 3-1 VLAN Tagging within a Virtual Ethernet Module  

Port Type
Packet received
Action

Access

Tagged

The packet is dropped.

Access

Untagged

VEM adds access VLAN to the packet.

Trunk

Tagged

No action is taken on the packet.

Trunk

Untagged

VEM adds native VLAN tag to packet.


Guidelines and Limitations

This section includes the following topics:

Maximum Allowed VLANs and MAC Addresses per VLAN

How Cisco Nexus 1000V VLANs are Numbered

Maximum Allowed VLANs and MAC Addresses per VLAN

Table 3-2 lists the Cisco Nexus 1000V VLAN and MAC address limitations.

Table 3-2 Cisco Nexus 1000V VLAN Limits 

Feature
Maximum Limit

Number of active VLANs

512

MAC addresses per VLAN within a VEM

1024


How Cisco Nexus 1000V VLANs are Numbered

In accordance with the IEEE 802.1Q standard, up to 4094 VLANs (numbered 1-4094) are supported in Cisco Nexus 1000V, and are organized as shown in Table 3-3.

Table 3-3 Cisco Nexus 1000V VLAN Numbering 

VLANs Numbers
Range
Usage

1

Normal

Cisco Nexus 1000V default. You can use this VLAN, but you cannot modify or delete it.

2-1005

Normal

You can create, use, modify, and delete these VLANs.

1006-4094

Extended

You can create, name, and use these VLANs. You cannot change the following parameters:

State is always active.

VLAN is always enabled. You cannot shut down these VLANs.

Note The extended system ID is always automatically enabled.

3968-4047 and 4094

Internally allocated

You cannot use, create, delete, or modify these VLANs. You can display these VLANs.

Cisco Nexus 1000V allocates these 80 VLANs, plus VLAN 4094, for features, like diagnostics, that use internal VLANs for their operation.



Note For information about diagnostics, see the document,
Cisco Nexus 1000V System Management Configuration Guide, Release 4.0(4)SV1(1).


Creating a VLAN

Use this procedure to do one of the following:

Create a single VLAN that does not already exist.

Create a range of VLANs that do not already exist.

Delete an existing VLAN.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:


Note All interfaces and all ports configured as switchports are in VLAN 1 by default.



Note Be aware that the NX-OS commands may differ from those used in Cisco IOS.


You are logged in to the CLI in EXEC mode.

VLAN characteristics are configured in the VLAN submode. To configure a VLAN that is already created, see the procedure, Configuring VLAN Characteristics.

You are familiar with the section, How Cisco Nexus 1000V VLANs are Numbered.

Newly-created VLANs remain unused until Layer 2 ports are assigned to them.

When you delete a specified VLAN, the ports associated to that VLAN are shut down and no traffic flows. When you delete a specified VLAN from a trunk port, only that VLAN is shut down and traffic continues to flow on all the other VLANs through the trunk port.

However, the system retains all the VLAN-to-port mapping for that VLAN, and when you reenable, or re-create, that specified VLAN, the system automatically reinstates all the original ports to that VLAN. Note that the static MAC addresses and aging time for that VLAN are not restored when the VLAN is reenabled.

For information about the following, see the document, Cisco Nexus 1000V Interface Configuration Guide, Release 4.0(4)SV1(1).

Assigning Layer 2 interfaces to VLANs (access or trunk ports).

Configuring ports as VLAN access or trunk ports and assigning ports to VLANs.

SUMMARY STEPS

1. config t

2. show vlan

3. {no}vlan {vlan-id | vlan-range}

4. exit

5. show vlan id <vlan-id>

6. copy running-config startup-config

DETAILED STEPS

 
Command
Purpose

Step 1 

config t


Example:

n1000v# config t

n1000v(config)#

Places you in CLI Global Configuration mode.

Step 2 

show vlan


Example:

n1000v(config)# show vlan

Displays the VLANs that already exist.

Step 3 

{no} vlan {vlan-id | vlan-range}


Creates or deletes, and saves in the running configuration, a VLAN or a range or VLANs.

To configure the VLAN, see the procedure, Configuring VLAN Characteristics.

Note If you enter a VLAN ID that is already assigned, you are placed into the VLAN Configuration mode for that VLAN.

Note If you enter a VLAN ID that is assigned to an internally allocated VLAN, the system returns an error message.

Note From the VLAN Configuration mode, you can also create and delete VLANs.

 

Example:

n1000v(config)# vlan 5

n1000v(config-vlan)#

This example shows VLAN 5 being created.

The VLAN is activated and you are automatically placed into a submode for configuring VLAN 5.

 

Example:

n1000v# config t 
n1000v(config)# vlan 15-20
n1000v(config-vlan)#


This example shows the range, VLAN 15-20, being created.

The VLANs in the range are activated, and you are automatically placed into a submode for configuring VLAN 15-20.

Note If you create a range of VLANs that includes an unusable VLAN, all VLANs in the range are created except those that are unusable; and Cisco Nexus 1000V returns a message listing the failed VLANs.

 

Example:

n1000v(config)# no vlan 3967

n1000v(config)#

This example shows VLAN 3967 being deleted, using the no form of the command.

Step 4 

exit


Example:

n1000v(config-vlan)# exit

n1000v(config)#

Exits the VLAN mode and returns you to CLI  GLobal Configuration mode.

Step 5 

show vlan id 5


Example:

n1000v(config)# show vlan id 5

(Optional) Displays the VLAN configuration.

Step 6 

copy running-config startup-config


Example:

n1000v(config)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Example:
n1000v# config t 
n1000v(config)# vlan 5
n1000v(config-vlan)# exit
n1000v(config)# show vlan id 5

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
5    VLAN0005                         active    

VLAN Type
---- -----
5    enet  

Remote SPAN VLAN
----------------
Disabled 

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

n1000v(config)# copy run start
[########################################] 100%
n1000v(config)# 

Configuring VLAN Characteristics

Use this procedure to configure the following for a VLAN that has already been created:

Name the VLAN.

The operational state (active, suspend) of the VLAN.

The VLAN media type (Ethernet).

Shut down switching on the VLAN.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

Some characteristics cannot be modified on some VLANs. For more information, see the "How Cisco Nexus 1000V VLANs are Numbered" section.


Note Commands entered in the VLAN configuration submode are immediately saved to the running configuration.


SUMMARY STEPS

1. config t

2. vlan {vlan-id | vlan-range}

3. name vlan-name

4. state {active | suspend}

5. no shutdown

6. exit

7. show vlan id

8. copy running-config startup-config

DETAILED STEPS

 
Command
Purpose

Step 1 

config t


Example:

n1000v# config t

n1000v(config)#

Places you into the CLI  Global Configuration mode.

Step 2 

vlan {vlan-id | vlan-range}


Example:

n1000v(config)# vlan 5

n1000v(config-vlan)#

Places you into the VLAN Configuration mode for the specified VLAN.

Note If the VLAN does not already exist, the system creates it and then places you in the VLAN Configuration mode for that VLAN.

Step 3 

name vlan-name


Example:

n1000v(config-vlan)# name accounting

Names the VLAN and saves it in the running configuration.

Up to 32 alphanumeric characters

You cannot change the name of VLAN1 nor the VLANs reserved for internal use.

The default name is VLANxxxx where xxxx represent four numeric digits (including leading zeroes) equal to the VLAN ID number.

Step 4 

state {active | suspend}


Example:

n1000v(config-vlan)# state active

Changes the operational state of the VLAN and saves it in the running configuration.

Allowable entries are:

Active (default)

Suspend

While the VLAN state is suspended, the ports associated with this VLAN are shut down, and that VLAN does not pass any traffic.

Note You cannot suspend the state for the default VLAN or VLANs 1006 to 4094.

Step 5 

no shutdown


Example:

n1000v(config-vlan)# no shutdown

Enables VLAN switching in the running configuration.

Allowable entries are:

no shutdown (default)

shutdown

Note You cannot shut down the default VLAN, VLAN1, or VLANs 1006 to 4094.

Step 6 

exit


Example:

n1000v(config-vlan)# exit

n1000v(config)#

Returns you to CLI  Global Configuration mode.

Step 7 

show vlan [id <vlan-id>]


Example:

n1000v(config)# show vlan id 5

(Optional) Displays the VLAN configuration.

Step 8 

copy running-config startup-config


Example:

n1000v(config)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Example:
n1000v# config t 
n1000v(config)# vlan 5
n1000v(config-vlan)# name accounting
n1000v(config-vlan)# state active
n1000v(config-vlan)# no shutdown
n1000v(config-vlan)# exit
n1000v(config)# show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth2/1, Eth2/2, Eth2/3, Eth2/5
                                                Eth2/7, Eth2/8, Eth2/9, Eth2/10
                                                Eth2/15, Eth2/21, Eth2/22
                                                Eth2/23, Eth2/24, Eth2/25
                                                Eth2/46, Eth2/47, Eth2/48
5    accounting                       active    
6    VLAN0006                         active    
7    VLAN0007                         active    
8    test                             active    
9    VLAN0009                         active    
10   VLAN0010                         active    
50   VLAN0050                         active    Eth2/6
100  trunked                          active    
200  VLAN0200                         active    
201  VLAN0201                         active    
202  VLAN0202                         active    
3966 VLAN3966                         active    
n1000v(config)# 

Verifying a VLAN Configuration

Use the following commands to display and verify a VLAN configuration.

Command
Purpose

show running-config vlan <vlan-id>

Displays VLAN information in the running configuration.

show vlan [all-ports | brief | id <vlan-id> | name <name> | dot1q tag native]

Displays VLAN information as specified.

show vlan summary

Displays a summary of VLAN information.


Example:

n1000v(config)# show vlan summary

Number of existing VLANs : 13

Number of existing user VLANs : 12

Number of existing extended VLANs : 1

n1000v(config)#

Additional References

For additional information related to implementing VLANs, see the following sections:

Related Documents

Standards

Related Documents

Related Topic
Document Title

Private VLANs

Chapter 4, "Private VLAN Configuration."

Interfaces, VLAN interfaces (SVIs), IP addressing and port channels

Cisco Nexus 1000V Interface Configuration Guide, Release 4.0(4)SV1(1)

Getting Started with Cisco Nexus 1000V and the CLI

Cisco Nexus 1000V Getting Started Guide, Release 4.0(4)SV1(1)

System management

Cisco Nexus 1000V System Management Configuration Guide, Release 4.0(4)SV1(1)

Release notes

Cisco Nexus 1000V Release Notes, Release 4.0(4)SV1(1)

Layer 2 commands

Cisco Nexus 1000V Command Reference, Release 4.0(4)SV1(1)


Standards

Standards
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


Feature History for VLANs

This section provides the VLAN release history.

Feature Name
Releases
Feature Information

VLANs

4.0(4)SV1(1)

This feature was introduced.