The Vlan [Vlan Number] Cisco command

Command Name: vlan [vlan number]

Platforms: All Cisco switches, routers, and firewalls that support VLANs.

Syntax: vlan [vlan number]

Description: The 'vlan [vlan number]' command is used to create a new VLAN with the specified VLAN ID.

Usage: To create a new VLAN with VLAN ID 10, you would use the following command:

vlan 10

Once you have created a VLAN, you can configure various settings for it, such as the VLAN name, description, and allowed protocols. You can also use the 'vlan [vlan number]' command to modify or delete an existing VLAN.

Additional Information:

vlan [vlan number] Usage Examples

Here are some examples for the Cisco command 'vlan [vlan number]':

  1. Create a New VLAN:

    • vlan 10
    • This command creates a new VLAN with the ID 10.
  2. Specify a VLAN Name:

    • vlan 10 name Marketing
    • This command creates a new VLAN with the ID 10 and assigns it the name "Marketing".
  3. Add an Interface to a VLAN:

    • interface gigabitethernet 0/1
    • switchport access vlan 10
    • This command adds the interface GigabitEthernet 0/1 to VLAN 10.
  4. Remove an Interface from a VLAN:

    • interface gigabitethernet 0/1
    • switchport access vlan none
    • This command removes the interface GigabitEthernet 0/1 from its current VLAN and sets it to "none".
  5. Enable VLAN Trunking:

    • interface gigabitethernet 0/1
    • switchport trunk allowed vlan 10,20,30
    • This command enables VLAN trunking on the interface GigabitEthernet 0/1 and allows VLANs 10, 20, and 30 to pass through.
  6. Configure VLAN Membership for a Trunk Interface:

    • interface gigabitethernet 0/1
    • switchport trunk native vlan 10
    • This command sets the native VLAN for the trunk interface GigabitEthernet 0/1 to VLAN 10. This means that untagged frames received on this interface will be considered to belong to VLAN 10.
  7. Configure IP Addressing on a VLAN Interface:

    • interface vlan 10
    • ip address 192.168.10.1 255.255.255.0
    • This command assigns the IP address 192.168.10.1 to the VLAN interface VLAN 10.
  8. Enable DHCP Server on a VLAN Interface:

    • interface vlan 10
    • ip dhcp pool TestPool
    • This command enables a DHCP server on the VLAN interface VLAN 10 and creates a DHCP pool named "TestPool".
  9. Configure VLAN Routing:

    • ip routing
    • router eigrp 100
    • network 192.168.10.0 0.0.0.255
    • This configures IP routing on the device and enables the Enhanced Interior Gateway Routing Protocol (EIGRP) with the ID 100. It also specifies that the network 192.168.10.0/24 should be routed through EIGRP.
  10. Verify VLAN Configuration:

    • show vlan
    • This command displays information about all configured VLANs.

    • show vlan brief

    • This command provides a summary of all configured VLANs, including their IDs, names, and status.

Remember that the actual syntax and options available for the 'vlan [vlan number]' command may vary depending on the specific Cisco device and IOS version you are using. Always refer to the official Cisco documentation for detailed information and the latest syntax.