name [vlan-name]
Assigns a name to a VLAN for identification and management purposes in VLAN configuration mode.
Definition: name [vlan-name] is a Cisco IOS vlan config command. Assigns a name to a VLAN for identification and management purposes in VLAN configuration mode.
Overview
The 'name' command in VLAN configuration mode allows a network administrator to assign a descriptive text label to a VLAN, enhancing manageability and readability of the network configuration. VLANs (Virtual Local Area Networks) logically segment a switched network into separate broadcast domains, improving security, performance, and manageability. While VLANs are identified by a numeric ID (1-4094), assigning a name such as 'Engineering' or 'Guest' makes it easier for engineers to understand the purpose of each VLAN without memorizing numbers.
This command is typically used during initial VLAN creation or when reorganizing VLAN assignments. It is a fundamental step in VLAN configuration, often performed after creating the VLAN with the 'vlan <vlan-id>' command. The name is stored in the running configuration and can be saved to the startup configuration.
There is no direct alternative; the name is purely a label and does not affect VLAN operation. However, some organizations use naming conventions to standardize VLAN identification across multiple switches. The command is available in VLAN configuration mode, which is entered via 'vlan <vlan-id>' from global configuration mode.
It requires privilege level 15 (enable mode). The name can be up to 32 characters, and it is case-sensitive. A common mistake is to use spaces or special characters; it is recommended to use alphanumeric characters and hyphens or underscores.
The command does not generate any output; it simply updates the running configuration. The name is visible in 'show vlan' and 'show running-config' outputs. This command is supported in all IOS versions and platforms, including Catalyst switches, routers with switch modules, and IOS-XE devices.
It is a basic but essential command for network documentation and operational clarity.
name [vlan-name]When to Use This Command
- Naming a VLAN to reflect its function, such as 'Engineering' or 'Sales', for easier network management.
- Renaming an existing VLAN to match a new departmental structure.
- Creating a descriptive name for a management VLAN (e.g., 'Management') to distinguish it from data VLANs.
- Standardizing VLAN names across multiple switches for consistent documentation.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| vlan-name | WORD (1-32 characters) | A descriptive name for the VLAN. It can be up to 32 characters long, consisting of alphanumeric characters, hyphens, or underscores. Spaces are not allowed; use hyphens or underscores instead. The name is case-sensitive. Common mistakes include using spaces, exceeding 32 characters, or using special characters like @, #, $. |
Command Examples
Naming VLAN 10 as Engineering
Switch(config-vlan)# name EngineeringNo output is generated; the command simply assigns the name 'Engineering' to the current VLAN.
Verifying VLAN name assignment
Switch# show vlan id 10VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 10 Engineering active Fa0/1, Fa0/2, Fa0/3
The output shows VLAN 10 with name 'Engineering' and its status as active, along with assigned ports.
Understanding the Output
The 'name' command itself produces no output. To verify the VLAN name, use 'show vlan' or 'show vlan id <vlan-id>'. The output displays the VLAN ID, name, status (active or suspended), and ports assigned.
A meaningful name helps identify the VLAN's purpose. Ensure the name is unique and descriptive; duplicate names are not allowed. A missing or default name (e.g., 'VLAN0010') indicates the VLAN has not been explicitly named.
Configuration Scenarios
Assigning a Name to a New VLAN for the Engineering Department
A network administrator needs to create a new VLAN for the Engineering department on a Catalyst switch. The VLAN ID is 10, and it should be named 'Engineering' for easy identification.
Topology
Switch1 (VLAN 10) --- Hosts in Engineering subnetSteps
- 1.Step 1: Enter global configuration mode: Switch> enable
- 2.Step 2: Enter global configuration mode: Switch# configure terminal
- 3.Step 3: Create VLAN 10 and enter VLAN configuration mode: Switch(config)# vlan 10
- 4.Step 4: Assign the name 'Engineering': Switch(config-vlan)# name Engineering
- 5.Step 5: Exit VLAN configuration mode: Switch(config-vlan)# exit
- 6.Step 6: Verify the VLAN configuration: Switch(config)# do show vlan id 10
! Switch# configure terminal Switch(config)# vlan 10 Switch(config-vlan)# name Engineering Switch(config-vlan)# exit Switch(config)# end
Verify: Use 'show vlan id 10' to verify. Expected output includes VLAN ID 10 with name 'Engineering' and status 'active'.
Watch out: If the VLAN name contains a space, the command will fail. Use a hyphen or underscore instead, e.g., 'Engineering-Dept'.
Renaming an Existing VLAN for Guest Network
An existing VLAN 20 was previously used for temporary purposes and now needs to be repurposed for a guest wireless network. The administrator wants to rename it to 'Guest'.
Topology
Switch1 (VLAN 20) --- Wireless APs for guest accessSteps
- 1.Step 1: Enter global configuration mode: Switch> enable
- 2.Step 2: Enter global configuration mode: Switch# configure terminal
- 3.Step 3: Enter VLAN configuration mode for VLAN 20: Switch(config)# vlan 20
- 4.Step 4: Change the name to 'Guest': Switch(config-vlan)# name Guest
- 5.Step 5: Exit VLAN configuration mode: Switch(config-vlan)# exit
- 6.Step 6: Verify the change: Switch(config)# do show vlan name Guest
! Switch# configure terminal Switch(config)# vlan 20 Switch(config-vlan)# name Guest Switch(config-vlan)# exit Switch(config)# end
Verify: Use 'show vlan name Guest' to confirm the VLAN 20 now has name 'Guest'.
Watch out: Renaming a VLAN does not affect its operation or the interfaces assigned to it. However, ensure no other VLAN has the same name; duplicate names are allowed but not recommended.
Troubleshooting with This Command
The 'name' command itself is not typically used for troubleshooting, but verifying VLAN names can help identify misconfigurations. When troubleshooting VLAN issues, start by checking the VLAN database with 'show vlan' or 'show vlan brief'. Look for VLANs that are 'active' or 'suspended'.
If a VLAN is missing or has an unexpected name, it may indicate a configuration error. For example, if a VLAN is named 'default' but should be 'Management', the name can be corrected using the 'name' command. Also, when troubleshooting connectivity, ensure that VLAN names are consistent across switches if using manual configuration; inconsistent naming can lead to confusion but does not affect VLAN operation.
The 'show running-config | section vlan' command displays VLAN configurations, including names. If a VLAN name contains typos or is not descriptive, it can be changed without impacting traffic. However, if a VLAN is not appearing in 'show vlan', it may not have been created or may have been deleted.
Use 'show vlan summary' to see the total number of VLANs. In a multi-switch environment, VLAN names are not propagated via VTP unless VTP version 3 is used; in VTP versions 1 and 2, only VLAN IDs are propagated. Therefore, if VLAN names are important, they must be configured manually on each switch or via VTPv3.
When troubleshooting, also check for VLAN name length; names longer than 32 characters are truncated. The 'name' command does not generate error messages unless the syntax is incorrect. If you receive '% Invalid input detected', check for spaces or special characters.
The command is straightforward, but misconfiguration can lead to operational confusion. Always verify with 'show vlan' after making changes.
CCNA Exam Tips
Remember that VLAN names are case-sensitive and can be up to 32 characters.
The 'name' command is executed in VLAN configuration mode (config-vlan), not global config.
CCNA may test that you can assign a name to a VLAN and verify it with 'show vlan brief'.
Be aware that VLAN 1 and VLANs 1002-1005 are reserved and cannot be renamed.
Common Mistakes
Trying to name a VLAN in global configuration mode instead of VLAN configuration mode.
Using spaces or special characters in the VLAN name (only alphanumeric and underscores are allowed).
Forgetting to exit VLAN configuration mode before verifying the name with 'show vlan'.
name [vlan-name] vs show vlan
Both commands are used in VLAN management but serve different stages: one configures a VLAN name, the other displays the VLAN configuration. They are often confused because both involve VLAN names, but 'name' is a configuration command while 'show vlan' is a verification command.
| Aspect | name [vlan-name] | show vlan |
|---|---|---|
| Mode | VLAN configuration mode | Privileged EXEC mode |
| Purpose | Assign a name to a VLAN | Display VLAN configuration |
| Persistence | Changes are saved to running-config | Displays current state, no changes |
| Effect on switch | Modifies VLAN database | No effect, read-only |
| Typical use | During initial VLAN setup or renaming | After changes, for verification |
Use name [vlan-name] when you need to assign a descriptive label to a VLAN for easier identification in configuration or management.
Use show vlan when you need to verify the current VLAN configurations, including IDs, names, status, and port assignments.
Platform Notes
In IOS-XE, the 'name' command behaves identically to classic IOS. The syntax and output are the same. On NX-OS, the equivalent command is 'vlan <vlan-id>' followed by 'name <vlan-name>' in VLAN configuration mode, which is similar.
For example: 'switch(config)# vlan 10' then 'switch(config-vlan)# name Engineering'. NX-OS also supports VLAN names up to 32 characters. On ASA devices, VLANs are configured differently; the ASA does not have a direct 'name' command for VLANs in the same context.
Instead, VLANs are created under interface configuration with 'interface vlan <id>' and then named using the 'nameif' command. For example: 'ciscoasa(config)# interface vlan 10' then 'ciscoasa(config-if)# nameif engineering'. This is functionally different.
In IOS-XR, VLAN configuration is not typically used in the same way; IOS-XR is more focused on routing and MPLS, and VLANs are configured under the 'l2vpn' or 'bridge-domain' contexts. The 'name' command does not exist in IOS-XR for VLANs. For IOS versions, the command has been consistent from 12.x through 16.x.
There are no significant differences. However, in older IOS versions (12.x), VLAN names were limited to 32 characters as well. The command is available on all Catalyst switches running IOS, including 2960, 3560, 3750, 3850, and 4500 series.
On routers with switch modules (e.g., 1941 with HWIC-4ESW), the command is also supported. Always ensure you are in VLAN configuration mode; entering 'name' in global configuration mode will result in an error.
Related Commands
show vlan
Displays the current VLAN configuration on the switch, including VLAN IDs, names, status, and ports assigned to each VLAN, used to verify VLAN creation and port assignments.
show vlan brief
Displays a summary of all VLANs in the switch database including VLAN ID, name, status, and the access ports assigned to each VLAN.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions