Configuring VLAN on Cisco IOS Switch

Configuring VLAN on Cisco IOS Switch

You are here:
Estimated reading time: 1 min

This article covers how to configure VLAN on CISCO Switches.

  1. First look at the default VLAN Configuration

    Swtich#show vlan
    
    VLAN Name                             Status    Ports
    ---- -------------------------------- --------- -------------------------------
    1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                    Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                    Fa0/9, Fa0/10, Fa0/12
                                                    Fa0/13, Fa0/14, Fa0/22
                                                    Fa0/23, Fa0/24, Gi0/1, Gi0/2
    1002 fddi-default                     act/unsup
    1003 token-ring-default               act/unsup
    1004 fddinet-default                  act/unsup
    1005 trnet-default                    act/unsup


  2.  Create a new VLAN

    Switch(config)#vlan 50
    Switch(config-vlan)#name VLANNAME
    Switch(config-vlan)#exit
    Replace VLANNAME with the name of your VLAN
  3. Check the newly created VLAN

    SW1#show vlan
    
    VLAN Name                             Status    Ports
    ---- -------------------------------- --------- -------------------------------
    
    1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                    Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                    Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                    Fa0/13, Fa0/14, Fa0/15,
                                                    Fa0/23, Fa0/24, Gi0/1, Gi0/2
    50   Newvlan                          active
  4. Now VLAN 50 has been created. Now you need to associate VLAN to the network ports. 

    Switch(config)interface fa0/1
    Switch(config-if)#switchport mode access
    Switch(config-if)#switchport access vlan 50
    
    Switch(config)interface fa0/2
    Switch(config-if)#switchport mode access
    Switch(config-if)#switchport access vlan 50
  5. Check VLAN port association

    SW1#show vlan 
    
    VLAN Name                             Status    Ports
    ---- -------------------------------- --------- -------------------------------
    
    1    default                          active    Fa0/3, Fa0/4
                                                    Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                    Fa0/9, Fa0/10,, Fa0/12
                                                    Fa0/13, Fa0/14, Fa0/15,
                                                    Fa0/23, Fa0/24, Gi0/2
    
    50   NEWVLAN                         active    Fa0/1, Fa0/2
      
Still Need Help? Open a Ticket

Let one of our experienced engineer resolve the issue

Was this article helpful?
Dislike 0