name [vlan-name]
Assigns a descriptive name to a VLAN for easier identification in configurations and show commands.
Overview
The 'name' command in Cisco NX-OS VLAN configuration mode assigns a descriptive label to a VLAN. VLANs are Layer 2 broadcast domains that segment network traffic; while VLANs are identified by a numeric ID (1-4094), names provide human-readable context. This command is essential in enterprise networks where dozens or hundreds of VLANs exist, making it impractical to remember each number's purpose. For example, VLAN 100 might be 'Guest_WiFi', VLAN 200 'Servers', and VLAN 300 'Management'. On Nexus switches, the name is stored in the running configuration and can be up to 32 characters, supporting alphanumeric characters, hyphens, underscores, and dots. The command is straightforward: enter VLAN configuration mode for the target VLAN (e.g., 'vlan 10') and issue 'name <string>'. To remove a name, use the 'no' form. The name does not affect VLAN operation; it purely aids administration. In troubleshooting workflows, consistent naming helps quickly identify VLANs in 'show vlan' output, reducing errors during changes. NX-OS also supports VLAN names in XML output for automation. This command is foundational for VLAN management and is often one of the first steps when creating VLANs.
name [vlan-name]When to Use This Command
- Naming VLAN 10 as 'Engineering' to clearly identify its purpose in a multi-VLAN network.
- Renaming a VLAN from a generic number to a department name for better manageability.
- Using descriptive names for voice VLANs (e.g., 'Voice_VLAN') to differentiate from data VLANs.
- Standardizing VLAN names across multiple Nexus switches for consistent documentation.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| vlan-name | WORD | A descriptive string for the VLAN. Maximum 32 characters. Allowed characters: alphanumeric, hyphen, underscore, dot. No spaces. Case-sensitive. |
Command Examples
Assign a name to VLAN 10
switch(config-vlan)# name EngineeringThe command executes without output; the VLAN name is set to 'Engineering'.
Remove a VLAN name
switch(config-vlan)# no name EngineeringThe 'no' form removes the name, reverting to the default (empty or VLAN number).
Understanding the Output
The 'name' command does not produce output upon successful execution. To verify the VLAN name, use 'show vlan id <vlan-id>' or 'show vlan brief'. In the output, look for the 'Name' field under the VLAN entry. A healthy value is a descriptive string; an empty name or 'VLANxxxx' indicates no name assigned. There are no problem values per se, but missing names can lead to confusion in large deployments.
Configuration Scenarios
Naming VLANs for a Campus Network
A university campus network with separate VLANs for students, faculty, and administration.
Topology
[Core] --- [Distribution] --- [Access]Steps
- 1.Enter global configuration mode: configure terminal
- 2.Create VLAN 10: vlan 10
- 3.Name it: name Students
- 4.Repeat for VLAN 20 (Faculty) and VLAN 30 (Admin).
- 5.Exit and verify: end; show vlan brief
! Configuring VLAN names vlan 10 name Students vlan 20 name Faculty vlan 30 name Admin
Verify: Use 'show vlan brief' to see the names in the 'Name' column.
Watch out: If you mistype a name, you must re-enter the VLAN config mode and reissue the 'name' command; there is no edit command.
Troubleshooting with This Command
When troubleshooting VLAN naming issues on Cisco NX-OS, start by verifying the VLAN exists with 'show vlan id <vlan-id>'. If the VLAN is not listed, it may not be created. If the name appears incorrect or missing, check the running configuration with 'show running-config vlan'. The name command is simple, but common issues include: (1) Not being in the correct VLAN configuration mode – ensure you are in 'config-vlan' mode (prompt shows 'switch(config-vlan)#'). (2) Using invalid characters – NX-OS rejects spaces and most special characters; stick to alphanumeric, hyphens, underscores, and dots. (3) Exceeding 32 characters – the command will be rejected with an error. (4) Forgetting to save the configuration – names are lost after reload if not saved to startup-config. To verify, use 'show vlan name <name>' to search by name. If a VLAN name is duplicated, NX-OS allows it, but it can cause confusion; best practice is unique names. In automation scripts, ensure the name string is properly escaped. The 'no name' command removes the name, reverting to default (empty). There is no impact on traffic; naming is purely cosmetic.
CCNA Exam Tips
Remember that VLAN names are case-sensitive and can be up to 32 characters on NX-OS.
The 'name' command is configured in VLAN configuration mode, not global config.
On the exam, be aware that 'no name' removes the name but does not delete the VLAN.
Common Mistakes
Forgetting to enter VLAN configuration mode before using 'name' – results in '% Invalid command' error.
Using spaces or special characters that are not allowed – NX-OS accepts alphanumeric, hyphens, underscores, and dots.
Assuming VLAN names are automatically applied to interfaces – they are only for identification.
Platform Notes
On Cisco IOS, the VLAN name command is identical in syntax and behavior. However, on NX-OS, VLAN names are case-sensitive and support a slightly different character set (dots and underscores are allowed). On IOS, names are also case-sensitive but may have different length limits (typically 32 characters as well). On other platforms like Juniper Junos, VLAN names are configured under 'vlans' hierarchy with 'vlan-name' statement. On Arista EOS, the command is 'name' under 'vlan' configuration mode, similar to NX-OS. NX-OS also supports VLAN names in the 'vlan database' mode on older versions, but modern NX-OS uses 'configure terminal' then 'vlan <id>'. There are no version-specific differences for this command; it has been consistent across NX-OS releases. For automation, NX-OS supports JSON output for 'show vlan' which includes the name field.
Related Commands
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions