cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
476748
Views
24
Helpful
1
Comments
TCC_2
Level 10
Level 10

 

Introduction


VLAN stands for Virtual Local Area Network.In one physical cisco switch; you can create multiple VLANs that connect to different network. This document provides basic information on how to create VLANs on Catalyst switches that run Catalyst OS (CatOS) and Cisco IOS System Software.

Description:

VLANs are created by number. The two ranges of VLANs are as follows:

 

    1) The standard range consists of VLANs 1 to 1000.

 

    2) The extended range consists of VLANs 1025 to 4096.

 

Every switch comes with the default VLAN 1 and all L2 the ports of switch are part of the default VLAN 1.The VLAN configuration steps for all the Catalyst switches are practically identical

Configuring VLANs On IOS:

In Cisco IOS system VLANs can be configured in two configuration modes:

    1) Config-vlan mode  

    2) VLAN database mode (Now days most of the new switches doesn't support VLAN database mode)

Configuring vlan using Config-vlan mode:

Configuration Steps:

1) Issue the "configure terminal" command in order to enter the global configuration mode.

2) Create vlan using "vlan <number>" command and can assign name to vlan for description.
2) Issue the "interface [type] mod/port>" command in order to enter the interface configuration mode.
3) Issue the "switchport mode access" command in order to configure the port mode.
4) Issue the "switchport access <vlan-id>" command in order to enter the VLAN membership mode for the port.
5) Issue the "show vlan" command in order to verify the VLAN configuration.

Configuration Example:

SW1(config)#vlan 11
SW1(config-vlan)#name Accounting
SW1(config-vlan)#exit
SW1(config)#int fa1/0
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 11
SW1(config-if)#end

Configuring Vlan using VLAN database mode:

Configuration Steps:

    1) Issue the "vlan database" command at the enable prompt in order to enter the VLAN database mode.

    2) Issue the "vlan vlan-id> name vlan-name" command at the vlan database prompt in order to add an Ethernet VLAN and assign it a number. If no name is entered for the VLAN, the default is to append the VLAN ID to the word VLAN.
    3) Update the VLAN database, propagate it throughout the administrative domain and issue the "apply" command and "exit" command in order to return to the privileged EXEC mode.       
    4) under the interface use "switchport mode access" command in order to configure the port mode(default l2 port is access) and "switchport access vlan-id>" command in order to enter the VLAN membership mode for the port.
    5) Issue the "show vlan" command in order to verify the VLAN configuration.

Configuration Example:

SW1#vlan database
% Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.

 

SW1(vlan)#vlan 2 name user
VLAN 2 added:
    Name: user
SW1(vlan)#apply
APPLY completed.
SW1(vlan)#exit
APPLY completed.
Exiting....
SW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#int fa1/0
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 2
SW1(config-if)#end

Configuring VLANs On CAT OS:

VLANs are created using the "set vlan" command for CAT OS devices:

 

configuration steps:
1) Issue "set vlan vlan-id [name name]" to create vlan.

VLAN 1 is by default the inband (SC0) interface of a switch

2) Issue "set Vlan {vlan number} {mod-num/port-num}" in order to enter the VLAN membership mode for the port


Extended VLANs support VLANs up to 4096 in accordance with the 802.1Q standard. Currently only switches running CATOS 6.1 or greater can support creation and assignment of VLANs in the extended range. You cannot currently use VTP to manage VLANs in the extended range, and these VLANs cannot be passed over an Inter-Switch Link (ISL) trunk link.

 

To allow these switches to use the extended range, you must first enable “spanningtree macreduction” to allow the switch to support a large number of spanning-tree instances with a very limited number of MAC addresses and still maintain the IEEE 802.1D bridge ID requirement for each STP instance.
NOTE:After you have created a VLAN in the extended range, you cannot disable this feature unless you first delete the VLAN.

 

To Create a VLAN in the extended range use “set vlan vlan-id [name name]” command.Here the vlan-id would be a number from 1025 to 4096. Numbers 1001 to 1024 are reserved by Cisco and cannot be configured.

                                   

Base Initial configuration:

 

 

Related Information:

Creating Ethernet VLANs on Catalyst Switches

Configuring VLANs

Comments
iroperto1
Level 1
Level 1

the command vlan database is no longer use, but this article is great. 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: