VLAN commands

Use these M4500 CLI commands to create and name VLANs and configure port VLAN membership, tagging, native VLAN, ingress filtering, and frame types.

This section describes the commands you use to configure VLAN settings.

vlan database

This command gives you access to the VLAN Config mode, which allows you to configure VLAN characteristics.

Format vlan database
Mode Global Config

vlan

This command creates a new VLAN and assigns it an ID. The ID is a valid VLAN identification number (ID 1 is reserved for the default VLAN). VLAN range is 1-4093.

Format vlan <vlan-list>
Mode VLAN Config

no vlan

This command deletes an existing VLAN. The ID is a valid VLAN identification number (ID 1 is reserved for the default VLAN). The VLAN range is 1-4093.

Format no vlan <vlan-list>
Mode VLAN Config

vlan makestatic

This command changes a dynamically created VLAN to a static VLAN (one that is permanently configured and defined). The ID is a valid VLAN identification number. VLAN range is 2-4093.

Format vlan makestatic <2-4093>
Mode VLAN Config

vlan name

This command changes the name of a VLAN. The name is an alphanumeric string of up to 32 characters, and the ID is a valid VLAN identification number. ID range is 1-4093.

Default

VLAN ID 1 - default

Other VLANS - blank string

Format vlan name <1-4093> <newname>
Mode VLAN Config

no vlan name

This command sets the name of a VLAN to a blank string.

Format no vlan name <1-4093>
Mode VLAN Config

switchport acceptable-frame-types

This command sets the frame acceptance mode per interface. For VLAN Only mode, untagged frames or priority frames received on this interface are discarded. For Admit All mode, untagged frames or priority frames received on this interface are accepted and assigned the value of the interface VLAN ID for this port. With either option, VLAN tagged frames are forwarded in accordance with the IEEE 802.1Q VLAN specification.

Default all
Format switchport acceptable-frame-types {all | tagged | untagged}
Mode Interface Config

no switchport acceptable-frame-types

This command resets the frame acceptance mode for the interface to the default value.

Format no switchport acceptable-frame-types
Mode Interface Config

switchport acceptbale-frame-type all

This command sets the frame acceptance mode for all interfaces. For VLAN Only mode, untagged frames or priority frames received on this interface are discarded. For Admit All mode, untagged frames or priority frames received on this interface are accepted and assigned the value of the interface VLAN ID for this port. With either option, VLAN tagged frames are forwarded in accordance with the IEEE 802.1Q VLAN specification.

Default all
Format switchport acceptable-frame-types all {all | tagged | untagged}
Mode Global Config

no switchport acceptable-frame-types all

This command resets the frame acceptance mode for all interfaces to the default value.

Format no switchport acceptable-frame-types all
Mode Global Config

switchport ingress-filtering

This command enables ingress filtering. If ingress filtering is disabled, frames received with VLAN IDs that do not match the VLAN membership of the receiving interface are admitted and forwarded to ports that are members of that VLAN.

Default disabled
Format switchport ingress-filtering
Mode Interface Config

no switchport ingress-filtering

This command disables ingress filtering. If ingress filtering is disabled, frames received with VLAN IDs that do not match the VLAN membership of the receiving interface are admitted and forwarded to ports that are members of that VLAN.

Format no switchport ingress-filtering
Mode Interface Config

switchport ingress-filtering all

This command enables ingress filtering for all interfaces. If ingress filtering is disabled, frames received with VLAN IDs that do not match the VLAN membership of the receiving interface are admitted and forwarded to ports that are members of that VLAN.

Default disabled
Format switchport ingress-filtering all
Mode Global Config

no switchport ingress-filtering all

This command disables ingress filtering for all interfaces. If ingress filtering is disabled, frames received with VLAN IDs that do not match the VLAN membership of the receiving interface are admitted and forwarded to ports that are members of that VLAN.

Format no switchport ingress-filtering all
Mode Global Config

switchport native vlan

This command changes the VLAN ID which will be assigned to untagged or priority tagged frames per interface.

Default 1
Format switchport native vlan <1-4093>
Mode Interface Config

no switchport native vlan

This command sets the VLAN ID per interface to 1.

Format no switchport native vlan
Mode Interface Config

switchport native vlan all

This command changes the VLAN ID which will be assigned to untagged or priority tagged frames for all interfaces.

Default 1
Format switchport native vlan all <1-4093>
Mode Global Config

no switchport native vlan all

This command sets the VLAN ID for all interfaces to 1.

Format no switchport native vlan all
Mode Global Config

switchport allowed vlan

This command configures the degree of participation for a specific interface in a VLAN. The ID is a valid VLAN identification number, and the interface is a valid interface number.

Format switchport allowed vlan {add [tagged | untagged] | remove} <vlan-list>
Mode Interface Config

switchport allowed vlan all

This command configures the degree of participation for all interfaces in a VLAN. The ID is a valid VLAN identification number.

Format switchport allowed vlan {add {tagged | untagged} | remove} all <1-4093>
Mode Global Config

switchport tagging

This command configures the tagging behavior for a specific interface in a VLAN to enable. If tagging is enabled, traffic is transmitted as tagged frames. If tagging is disabled, traffic is transmitted as untagged frames. The ID is a valid VLAN identification number.

Default Disable
Format switchport tagging <vlan-list>
Mode Interface Config

no switchport tagging

This command configures the tagging behavior for a specific interface in a VLAN to disabled. If tagging is disabled, traffic is transmitted as untagged frames. The ID is a valid VLAN identification number.

Format no switchport tagging <vlan-list>
Mode Interface Config

switchport tagging all

This command configures the tagging behavior for all interfaces in a VLAN to be enabled. If tagging is enabled, traffic is transmitted as tagged frames. If tagging is disabled, traffic is transmitted as untagged frames. The ID is a valid VLAN identification number.

Default Disable
Format switchport tagging all <1-4093>
Mode Global Config

no switchport tagging all

This command configures the tagging behavior for all interfaces in a VLAN to disabled. If tagging is disabled, traffic is transmitted as untagged frames. The ID is a valid VLAN identification number.

Format no switchport tagging all <1-4093>
Mode Global Config

show vlan

This command displays brief information on a list of all configured VLANs.

Format show vlan
Mode

Privileged EXEC

User EXEC

Display Message

Term Definition
VLAN ID There is a VLAN Identifier (vlanid) associated with each VLAN. The range of the VLAN ID is 1 to 4093.
VLAN Name A string associated with this VLAN as a convenience. It can be up to 16 alphanumeric characters, including blanks. The default is blank. VLAN ID 1 is always named `Default`. This field is optional.
VLAN Type Type of VLAN, which can be Default, (VLAN ID = 1), can be static (one that is configured and permanently defined), or Dynamic (one that is created by GVRP registration).
Interface(s) Indicates by slot id and port number which port belongs to this VLAN.

show vlan id

This command displays detailed information, including interface information, for a specific VLAN.

Format show vlan {id <1-4093> | name <vlanname>}
Mode

Privileged EXEC

User EXEC

Display Message

Term Definition
VLAN ID There is a VLAN Identifier (VID) associated with each VLAN. The range of the VLAN ID is 1 to 4093.
VLAN Name A string associated with this VLAN as a convenience. It can be up to 32 alphanumeric characters, including blanks. The default is blank. VLAN ID 1 is always named `Default`. This field is optional.
VLAN Type Type of VLAN, which can be Default, (VLAN ID = 1), can be static (one that is configured and permanently defined), or Dynamic (one that is created by GVRP registration).
Interface Indicates by slot id and port number which port is controlled by the fields on this line.

Current:

Include

Exclude

Autodetect

Determines the degree of participation of this port in this VLAN. The permissible values are:

This port is always a member of this VLAN. This is equivalent to

registration fixed in the IEEE 802.1Q standard.

This port is never a member of this VLAN. This is equivalent to registration

forbidden in the IEEE 802.1Q standard.

Specifies to allow the port to be dynamically registered in this VLAN via

GVRP. The port will not participate in this VLAN unless a join request is received on this port. This is equivalent to registration normal in the IEEE 802.1Q standard.

Configured:

Include

Exclude

Autodetect

Determines the configured degree of participation of this port in this VLAN. The permissible values are:

This port is always a member of this VLAN. This is equivalent to

registration fixed in the IEEE 802.1Q standard.

This port is never a member of this VLAN. This is equivalent to registration

forbidden in the IEEE 802.1Q standard.

Specifies to allow the port to be dynamically registered in this VLAN via

GVRP. The port will not participate in this VLAN unless a join request is received on this port. This is equivalent to registration normal in the IEEE 802.1Q standard.

Tagging:

Tagged

Select the tagging behavior for this port in this VLAN:

Specifies to transmit traffic for this VLAN as tagged frames.

Untagged Specifies to transmit traffic for this VLAN as untagged frames.

show vlan internal usage

This command displays information about the VLAN ID allocation on the switch.

Format show vlan internal usage
Mode

Privileged EXEC

User EXEC

Display Message

Parameter Definition
Base VLAN ID Identifies the base VLAN ID for Internal allocation of VLANs to the routing interface.
Allocation policy Identifies whether the system allocates VLAN IDs in ascending or descending order.

show interface switchport

This command displays VLAN port information.

Format show interface switchport {<slot/port> | port-channel <1-64>}
Mode

Privileged EXEC

User EXEC

Display Message

Term Definition
Interface Indicates by slot id and port number which port is controlled by the fields on this line. It is possible to set the parameters for all ports by using the selectors on the top line.
Native VLAN The VLAN ID that this port will assign to untagged frames or priority tagged frames received on this port. The value must be for an existing VLAN. The factory default is 1.
Mode Indicates this interface is operating on Access mode or General mode.
Ingress Filtering May be enabled or disabled. When enabled, the frame is discarded if this port is not a member of the VLAN with which this frame is associated. In a tagged frame, the VLAN is identified by the VLAN ID in the tag. In an untagged frame, the VLAN is the Port VLAN ID specified for the port that received this frame. When disabled, all frames are forwarded in accordance with the 802.1Q VLAN bridge specification. The factory default is disabled.
Term Definition
Acceptable Frame Type Specifies the types of frames that may be received on this port. The options are 'VLAN only' and 'Admit All'. When set to 'VLAN only', untagged frames or priority tagged frames received on this port are discarded. When set to 'Admit All', untagged frames or priority tagged frames received on this port are accepted and assigned the value of the Port VLAN ID for this port. With either option, VLAN tagged frames are forwarded in accordance to the 802.1Q VLAN specification.

show vlan private-vlan

This command displays private vlan information.

Format show vlan private-vlan [type]
Mode Privileged Exec

show vlan remote-span

This command displays remote-span information.

Format show vlan private-vlan
Mode Privileged Exec