Create VLAN Command Guide | Generated by AI
Question: After logging into the switch, what command is used to create a VLAN in global configuration mode?
Answer:
To create a VLAN on a Cisco switch (or similar CLI-based network devices) after logging in and entering global configuration mode, you use the following command:
vlan <vlan-id>
Explanation:
vlan: This is the command keyword that tells the switch you want to create or configure a VLAN.<vlan-id>: This is a placeholder for the actual VLAN number you wish to create. Valid VLAN IDs typically range from 1 to 4094, though some ranges are reserved (e.g., VLAN 1 is default, VLANs 1002–1005 are reserved for legacy token ring/FDDI).
Step-by-Step Example:
- Log in to the switch.
- Enter privileged EXEC mode:
enable - Enter global configuration mode:
configure terminal - Create a VLAN (for example, VLAN 10):
vlan 10 - (Optional) Name the VLAN:
name Sales - Exit configuration mode:
end
After executing vlan 10, the switch enters VLAN configuration mode (config-vlan#), where you can optionally assign a name or other parameters to the VLAN.
This matches the reference answer provided: vlan vlan-id.
References: