[vc_row type=”in_container” full_screen_row_position=”middle” scene_position=”center” text_color=”dark” text_align=”left” overlay_strength=”0.3″][vc_column column_padding=”no-extra-padding” column_padding_position=”all” background_color_opacity=”1″ background_hover_color_opacity=”1″ column_shadow=”none” width=”1/1″ tablet_text_alignment=”default” phone_text_alignment=”default” column_border_width=”none” column_border_style=”solid”][nectar_animated_title heading_tag=”h1″ style=”color-strip-reveal” color=”Extra-Color-1″ text=”Configuring VLANs”][/vc_column][/vc_row][vc_row type=”in_container” full_screen_row_position=”middle” scene_position=”center” text_color=”dark” text_align=”left” overlay_strength=”0.3″][vc_column column_padding=”no-extra-padding” column_padding_position=”all” background_color_opacity=”1″ background_hover_color_opacity=”1″ column_shadow=”none” width=”1/1″ tablet_text_alignment=”default” phone_text_alignment=”default” column_border_width=”none” column_border_style=”solid”][vc_column_text]
Configuring VLANs in Global Configuration Mode
If the switch is in VTP server or transparent mode (see the “Configuring VTP” section), you can configure VLANs in global and VLAN configuration modes. When you configure VLANs in global and config-vlan configuration modes, the VLAN configuration is saved in the vlan.dat files, not the running-config or startup-config files. To display the VLAN configuration, enter the show vlan command.
If the switch is in VLAN transparent mode, use the copy running-config startup-config command to save the VLAN configuration to the startup-config file. After you save the running configuration as the startup configuration, the show running-config and show startup-config commands display the VLAN configuration.
Note When the switch boots, if the VTP domain name and VTP mode in the startup-config and vlan.dat files do not match, the switch uses the configuration in the vlan.dat file.
You use the interface configuration command mode to define the port membership mode and add and remove ports from a VLAN. The results of these commands are written to the running-config file, and you can display the contents of the file by entering the show running-config command.
User-configured VLANs have unique IDs from 1 to 4094. To create a VLAN, enter the vlan command with an unused ID. To verify whether a particular ID is in use, enter the show vlan id ID command. To modify a VLAN, enter the vlan command for an existing VLAN.
See the “VLAN Default Configuration” section for the list of default parameters that are assigned when you create a VLAN. If you do not use the media keyword when specifying the VLAN type, the VLAN is an Ethernet VLAN.
To create a VLAN, perform this task:
When you create or modify an Ethernet VLAN, note the following:
•Because Layer 3 ports and some software features require internal VLANs allocated from 1006 and up, configure extended-range VLANs starting with 4094 and work downward.
•You can configure extended-range VLANs only in global configuration mode. You cannot configure extended-range VLANs in VLAN database mode.
•Layer 3 ports and some software features use extended-range VLANs. If the VLAN you are trying to create or modify is being used by a Layer 3 port or a software feature, the switch displays a message and does not modify the VLAN configuration.
This example shows how to create an Ethernet VLAN in global configuration mode and verify the configuration:
1 2 |
Switch# <b class="cBold">configure terminal </b> |
1 2 |
Switch(config)# <b class="cBold">vlan 3 </b> |
1 |
Switch(config-vlan)# <b class="cBold">end</b> |
1 |
Switch# <b class="cBold">show vlan id 3</b> |
1 |
VLAN Name Status Ports |
1 |
---- -------------------------------- --------- ------------------------------- |
1 |
3 VLAN0003 active |
1 |
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 |
1 |
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ |
1 |
3 enet 100003 1500 - - - - - 0 0 |
1 |
Primary Secondary Type Interfaces |
1 |
------- --------- ----------------- ------------------------------------------- |
1 |
Switch# |
Configuring VLANs in VLAN Database Mode
When the switch is in VTP server or transparent mode, you can configure VLANs in the VLAN database mode. When you configure VLANs in VLAN database mode, the VLAN configuration is saved in the vlan.dat file, not the running-config or startup-config files. To display the VLAN configuration, enter the show running-config vlan command.
User-configurable VLANs have unique IDs from 1 to 4094. Database mode supports configuration of IDs from 1 to 1001, but not the extended addresses from 1006 to 4094. To create a VLAN, enter the vlan command with an unused ID. To verify whether a particular ID is in use, enter the show vlan id ID command. To modify a VLAN, enter the vlan command for an existing VLAN.
See the “VLAN Default Configuration” section for a listing of the default parameters that are assigned when you create a VLAN. If you do not use the media keyword when specifying the VLAN type, the VLAN is an Ethernet VLAN.
To create a VLAN, perform this task:
|
|
|||
---|---|---|---|---|
Step 1 |
|
Enters VLAN database mode. |
||
Step 2 |
|
Adds an Ethernet VLAN. Note You cannot delete the default VLANs for these media types: Ethernet VLAN 1 and FDDI or Token Ring VLANs 1002 to 1005. You can use the no keyword to delete a VLAN. |
||
Step 3 |
|
Returns to enable mode. |
||
Step 4 |
|
Verifies the VLAN configuration. |
This example shows how to create an Ethernet VLAN in VLAN database mode and verify the configuration:
1 |
Switch# <b class="cBold">vlan database</b> |
1 2 |
Switch(vlan)# <b class="cBold">vlan 3 </b> |
1 |
VLAN 3 added: |
1 |
Name: VLAN0003 |
1 |
Switch(vlan)# <b class="cBold">exit</b> |
1 |
APPLY completed. |
1 |
Exiting.... |
1 |
Switch# <b class="cBold">show vlan name VLAN0003</b> |
1 |
VLAN Name Status Ports |
1 |
---- -------------------------------- --------- --------------------- |
1 |
3 VLAN0003 active |
1 |
1 |
VLAN Type SAID MTU Parent RingNo BridgeNo Stp Trans1 Trans2 |
1 |
---- ----- ---------- ----- ------ ------ -------- ---- ------ ------ |
1 |
3 enet 100003 1500 - - - - 0 0 |
1 |
Switch# |
[/vc_column_text][/vc_column][/vc_row]
Leave A Comment