Configuring a VLAN
Command or Action
Step 3
name vlan-name
Example:
switch(config-vlan)# name accounting
Step 4
state {active | suspend}
Example:
switch(config-vlan)# state active
Step 5
no shutdown
Example:
switch(config-vlan)# no shutdown
Step 6
exit
Example:
switch(config-vlan)# exit
switch(config)#
Step 7
show vlan
Example:
switch# show vlan
Step 8
show vtp status
Example:
switch# show vtp status
Step 9
copy running-config startup-config
Example:
switch(config)# copy running-config
startup-config
This example shows how to configure optional parameters for VLAN 5:
switch# config t
switch(config)# vlan 5
switch(config-vlan)# name accounting
switch(config-vlan)# state active
switch(config-vlan)# no shutdown
switch(config-vlan)# exit
switch(config)#
Cisco Nexus 7000 Series NX-OS Layer 2 Switching Configuration Guide, Release 5.x
32
Purpose
Names the VLAN. You can enter up to 32 alphanumeric characters to
name the VLAN. You cannot change the name of VLAN1 or the internally
allocated VLANs. The default value is VLANxxxx where xxxx represents
four numeric digits (including leading zeroes) equal to the VLAN ID
number.
The system vlan long-name command allows you to enable VLAN names
that have up to 128 characters.
Sets the state of the VLAN to active or suspend. While the VLAN state
is suspended, the ports associated with this VLAN become inactive, and
that VLAN does not pass any traffic. The default state is active. You
cannot suspend the state for the default VLAN or VLANs 1006 to 4094.
Enables the VLAN. The default value is no shutdown (or enabled). You
cannot shut down the default VLAN, VLAN1, or VLANs 1006 to 4094.
Exits VLAN configuration submode.
(Optional)
Displays information about the VLANs.
(Optional)
Displays information about the VLAN Trunking Protocol (VTP).
(Optional)
Copies the running configuration to the startup configuration.
Commands entered in VLAN configuration submode are
Note
immediately executed. Beginning with Cisco Release 5.1 for
Nexus 7000 series devices, you must exit the VLAN configuration
submode for configuration changes to take effect.
Configuring VLANs