state active
Sets the administrative state of a VLAN to active, enabling it for Layer 2 switching.
Overview
The 'state active' command in Cisco NX-OS (Nexus) is used within VLAN configuration mode to set the administrative state of a VLAN to active. This enables the VLAN to participate in Layer 2 switching, allowing traffic to be forwarded across interfaces assigned to that VLAN. When a VLAN is created, it is automatically placed in the active state, so this command is typically only needed if the VLAN was previously suspended using the 'shutdown' command. The concept behind this command is the administrative state of a VLAN, which determines whether the VLAN is operational. A VLAN in the active state will forward traffic, learn MAC addresses, and participate in spanning tree. In contrast, a suspended VLAN will not forward any traffic, effectively isolating all ports in that VLAN. This command is used during initial VLAN configuration, after troubleshooting, or when re-enabling a VLAN that was disabled for maintenance. On Cisco NX-OS, VLAN configuration is performed in the global configuration mode, not in a separate VLAN database mode as in classic IOS. This command fits into troubleshooting workflows when verifying that a VLAN is operational; if traffic is not being forwarded, checking the VLAN state with 'show vlan' is a first step. If the VLAN is suspended, using 'state active' can quickly restore connectivity.
state activeWhen to Use This Command
- Activating a newly created VLAN to allow traffic forwarding.
- Re-enabling a VLAN after troubleshooting or maintenance.
- Ensuring a VLAN is active before assigning interfaces to it.
- Preparing a VLAN for use in a VPC or vPC environment.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| active | active | Sets the VLAN administrative state to active. This is the only keyword for this command; there is no 'suspend' keyword (use 'shutdown' instead). |
Command Examples
Activate VLAN 100
vlan 100
state activeEnters VLAN configuration mode for VLAN 100 and sets its state to active. No output is displayed on success.
Verify VLAN state after activation
show vlan id 100VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 100 VLAN0100 active Eth1/1, Eth1/2
The 'Status' field shows 'active', confirming the VLAN is operational. The 'Ports' column lists interfaces assigned to this VLAN.
Understanding the Output
The 'state active' command itself produces no output when successful. To verify the VLAN state, use 'show vlan id <vlan-id>'. In the output, the 'Status' column indicates the administrative state: 'active' means the VLAN is enabled and forwarding traffic; 'suspend' or 'shutdown' indicates it is disabled. A healthy VLAN shows 'active' and has interfaces listed under 'Ports'. If the VLAN is not active, check for misconfigurations or resource limitations. The 'Name' field is user-defined or auto-generated. The 'Ports' field lists all access and trunk ports that are members of the VLAN and are in an up/up state.
Configuration Scenarios
Activating a Suspended VLAN
A VLAN was suspended during maintenance and needs to be re-enabled.
Topology
N/ASteps
- 1.Enter global configuration mode: configure terminal
- 2.Enter VLAN configuration mode for VLAN 200: vlan 200
- 3.Activate the VLAN: state active
- 4.Exit configuration mode: end
- 5.Verify: show vlan id 200
! Enter configuration commands configure terminal vlan 200 state active end
Verify: Use 'show vlan id 200' to confirm the status is 'active'.
Watch out: If the VLAN is not suspended, the command has no effect; it is idempotent.
Troubleshooting with This Command
When troubleshooting VLAN issues on Cisco NX-OS, the 'state active' command is used to ensure the VLAN is administratively up. If a VLAN is not forwarding traffic, first check its state with 'show vlan'. If the status shows 'suspend' or 'shutdown', the VLAN is disabled. Use 'state active' to re-enable it. However, if the VLAN remains inactive after applying this command, check for other issues such as: the VLAN not being created (use 'vlan <id>' to create it), the VLAN being a reserved VLAN (1, 1002-1005), or the VLAN being part of a VDC that is not in the correct state. Also, ensure that the VLAN is not being filtered by VACLs or that the interfaces are not in a down state. On NX-OS, the 'state active' command is straightforward, but it is important to remember that it only affects the Layer 2 VLAN, not any associated SVI (interface vlan). To bring up an SVI, use 'no shutdown' on the interface. In a vPC environment, VLAN states must be consistent across both peer switches. Use 'show vpc consistency-parameters vlan' to verify. If the VLAN state is inconsistent, the vPC may not form correctly. Always verify the VLAN state after making changes.
CCNA Exam Tips
Remember that 'state active' is the default state for a VLAN; you only need to use it if the VLAN was previously suspended.
On NX-OS, VLANs are created in the 'configure terminal' context, not in VLAN database mode like classic IOS.
Be aware that VLAN 1 and VLANs 1002-1005 are reserved and cannot be deleted or suspended.
Common Mistakes
Forgetting to exit VLAN configuration mode before applying other commands; use 'exit' or 'end'.
Attempting to activate a VLAN that does not exist; create it first with 'vlan <id>'.
Confusing 'state active' with 'no shutdown' on an SVI; 'state active' is for Layer 2 VLANs, not SVIs.
Platform Notes
On Cisco NX-OS, VLAN configuration is done in the global configuration mode, unlike classic IOS which uses a separate 'vlan database' mode. The 'state active' command is specific to NX-OS; in classic IOS, the equivalent is 'no shutdown' under VLAN configuration mode. However, in NX-OS, 'shutdown' suspends the VLAN, and 'state active' resumes it. There is no 'no shutdown' command for VLANs in NX-OS. For SVIs, 'no shutdown' is used. On other platforms like IOS-XE, VLANs are active by default and cannot be suspended; instead, you can shut down the SVI. NX-OS also supports VLANs in the range 1-4094, with VLANs 1 and 1002-1005 being reserved. The 'state active' command is available from NX-OS version 5.0 onwards. In earlier versions, VLANs were always active once created. Understanding these differences is crucial for multi-platform environments.
Related Commands
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions