Command:

set vlan

Mode:

Switch> (enable)


Syntax:

set vlan {vlan} {mod/port}

set vlan {vlan} [name {name}] [type {type}] [state {state}] [said {said}] [mtu {mtu}]
[mode {bridge_mode}] [stp {stp_type}] [translation vlan_num]
[pvlan-type {pvlan_type}] [rspan]


Syntax Description:

vlan

Variable that specifies the number of the VLAN.

mod/port

Variable that specifies the number of the module and port.

name name

(Optional) Keyword and variable that defines a text string used as the name of the VLAN (1 to 32 characters).

type type

(Optional) Keyword and variable that identify the VLAN type as 802.1Q.

state state

(Optional) Keyword and variable that specify whether the state of the VLAN is active or suspended. VLANs in suspended state do not pass packets.

said said

(Optional) Keyword and variable that specify the security association identifier; valid values are from 1 to 4294967294.

mtu mtu

(Optional) Keyword and variable that specify the maximum transmission unit (packet size, in bytes) that the VLAN can use; valid values are from 576 to 18190.

mode bridge_mode

(Optional) Keyword and variable that specify the bridge mode; valid values are srt and srb.

stp stp_type

(Optional) Keyword and variable that specify the version of the Spanning Tree Protocol to use: source routing transparent (ieee), source route bridging (ibm), automatic source selection (auto).

translation vlan_num

(Optional) Keyword and variable that specify a translational VLAN used to translate FDDI to Ethernet; valid values are from 1 to 1005.

pvlan-type pvlan-type

(Optional) Keyword and variable that specify the private VLAN type. See the "Usage Guidelines" section below for valid values.

rspan

(Optional) Keyword that creates a VLAN for remote SPAN.

 


Command Description:

Use the set vlan command to group ports into a VLAN.

The VLAN numbers are always ISL VLAN identifiers, and not 802.1q VLAN identifiers.

VLAN 1 parameters are factory configured and cannot be changed.

If you specify a range of VLANs, you cannot use the VLAN name.

If you enter the mistp-instance none command, the specified VLANs are unmapped from any instance they are mapped to.

If you are configuring normal range VLANs, you cannot use the set vlan command until the Catalyst 4000 family switch is either in VTP transparent mode (set vtp mode transparent) or until a VTP domain name has been set (set vtp domain name). To create a private VLAN, UTP mode must be transparent.

You cannot set multiple VLANs for ISL ports using this command. The VLAN name can be from 1 to 32 characters in length. If you are adding a new VLAN or modifying an existing VLAN, the VLAN number must be within the range of 1 to 1000 and 1025 to 4094.

If you want to use the extended range VLANs (1025 to 4094), you must enable the MAC address reduction feature using the set spantree macreduction command. When you enable MAC address reduction, the pool of MAC addresses used for the VLAN spanning tree is disabled, leaving a single MAC address that identifies the switch.

You must configure a private VLAN on the supervisor engine.

Valid values for pvlan-type are the following:

Only regular VLANs with no access ports assigned to them can be used in private VLANs. Do not use the set vlan command to add ports to a private VLAN; use the set pvlan command to add ports to a private VLAN.

VLANs 1001, 1002, 1003, 1004, and 1005 cannot be used in private VLANs.

VLANs in a suspended state do not pass packets.

 


Example:

This example shows how to set VLAN 850 to include ports 4 through 6on module 3. Because ports 4 through 6 were originally assigned to VLAN 1, the message reflects the modification of VLAN 1:

Console> (enable) set vlan 850 3/4-6

VLAN 850 modified.
VLAN 1 modified.
VLAN  Mod/Ports
---- -----------------------
850   3/4-6
Console> (enable)
 

This example shows how to set VLAN 7 as a primary VLAN:

Console> (enable) set vlan 7 pvlan-type primary
Console> (enable)
 

This example shows how to set VLAN 901 as an isolated VLAN:

Console> (enable) set vlan 901 pvlan-type isolated
Console> (enable)
 

This example shows how to set VLAN 903 as a community VLAN:

Console> (enable) set vlan 903 pvlan-type community
Console> (enable)

This example shows how to set VLAN 2 as an RSPAN vlan:

Console> (enable) set vlan 2 rspan
VTP advertisements transmitting temporarily stopped,
and will resume after the command finishes.
Vlan 2 configuration successful
Console> (enable)

 


Misconceptions:
None

Related Commands:
show vlan
clear vlan

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)