Back to Contents Page

VLAN Commands

Dell™ PowerConnect™ 3324/3348 Switch CLI Guide

  vlan database

  vlan

  interface vlan

  interface range vlan

  name

  switchport mode

  switchport access vlan

  switchport trunk allowed vlan

  switchport trunk native vlan

  switchport general allowed vlan

  switchport general pvid

  switchport general ingress-filtering disable

  switchport general acceptable-frame-types tagged-only

  switchport forbidden vlan

  show vlan

  show interfaces switchport



vlan database

Use the vlan database global configuration command to enter the VLAN database configuration mode.

Syntax

vlan database

Default Configuration

This command has no default configuration.

Command Mode

Global Configuration Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example enters the VLAN database mode.

Console # vlan database

Console (config-vlan)#


vlan

Use the vlan interface configuration (VLAN) command to create a VLAN. To delete a VLAN, use the no form of this command.

Syntax

vlan {vlan-range}

no vlan {vlan-range}

Default Configuration

This command has no default configuration.

Command Mode

Interface Configuration (VLAN) Mode

User Guidelines

The maximum number of VLANs is 4095.

Example

The following example creates VLAN number 1972.

Console # vlan database

Console (config-vlan)# vlan 1972


interface vlan

Use the interface vlan global configuration command to enter the interface configuration (VLAN) mode to configure an existing VLAN.

Syntax

interface vlan vlan-id

Default Configuration

This command has no default configuration.

Command Mode

Global Configuration Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example configures the VLAN 1 IP address of 10.1.2.3 and subnet mask 255.0.0.0.

Console (config)# interface vlan 1

Console (config-if)# ip address 10.1.2.3 255.0.0.0


interface range vlan

Use the interface range vlan global configuration command to enter the interface configuration (VLAN) mode with the specified VLAN-list as the context.

Syntax

interface range vlan { vlan-range | all }

Default Configuration

This command has no default configuration.

Command Mode

Global Configuration Mode

User Guidelines

Commands under the interface range context are executed independently on each interface in the range. If the command returns an error on one of the interfaces, an error message is displayed and execution continues on other interfaces.

Example

The following example groups VLAN 221-228 and VLAN 889 to receive the same command.

Console (config)# interface range vlan 221-228, 889

Console (config-if)#


name

Use the name interface configuration command to add a name to a VLAN. To remove the VLAN name, use the no form of this command.

Syntax

name string

no name

Default Configuration

No name is defined.

Command Mode

Interface Configuration (VLAN) Mode

User Guidelines

The VLAN name should be unique.

Example

The following example names VLAN interface 19 as Marketing.

Console (config)# interface vlan 19

Console (config-if)# name Marketing


switchport mode

Use the switchport mode interface configuration command to configure a port VLAN membership mode. To reset the mode to the appropriate default for the port, use the no form of this command.

Syntax

switchport mode { access | trunk | general }

no switchport mode

Default Configuration

All ports are in access mode and belong to the default VLAN (whose VID=1).

Command Mode

Interface Configuration (Ethernet, port-channel) Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example configures port 1/e8 as an untagged layer 2 VLAN interface.

Console (config)# interface ethernet 1/e8

Console (config-if)# switchport mode access


switchport access vlan

The switchport access vlan interface configuration command configures the VLAN ID when the interface is in access mode. To reconfigure the default, use the no form of this command.

Syntax

switchport access vlan vlan-id

no switchport access vlan

Default Configuration

The default VLAN ID is 1.

Command Mode

Interface Configuration (Ethernet, port-channel) Mode

User Guidelines

The command automatically removes the port from the previous VLAN, and adds it to the new VLAN.

Example

The following example configures a VLAN ID of 23 to the untagged layer 2 VLAN interface number 1/e8.

Console (config)# interface ethernet 1/e8

Console (config-if)# switchport mode access

console (config-if)# switchport access vlan 23


switchport trunk allowed vlan

Use the switchport trunk allowed vlan interface configuration command to add or remove VLANs from a trunk port.

Syntax

switchport trunk allowed vlan {add vlan-list | remove vlan-list}

Default Configuration

This command has no default configuration.

Command Mode

Interface Configuration (Ethernet, port-channel) Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example adds VLANs to the allowed list of port 1/e8.

Console (config)# interface ethernet 1/e8

Console (config-if)# switchport mode trunk

Console (config-if)# switchport trunk allowed vlan add 1,2,5-8


switchport trunk native vlan

Use the switchport trunk native vlan interface configuration command to define the port as a member of the specified VLAN, and the VLAN ID as the port default VLAN ID (PVID). To configure the default VLANID, use the no form of this command.

Syntax

switchport trunk native vlan vlan-id

no switchport trunk native vlan

Default Configuration

The default VLAN ID is 1.

Command Mode

Interface Configuration (Ethernet, port-channel) Mode

User Guidelines

Incoming untagged frames are assigned to this VLAN and outgoing traffic from this VLAN is sent untagged (despite the normal situation where traffic sent from a trunk-mode port is all tagged).

The port is added as a member in the VLAN. If the port is already a member in the VLAN (not as a native), it should be removed from the VLAN first.

Example

The following example defines port 1/e8, in trunk mode, and is configured to use VLAN number 123 as the native VLAN.

console (config)# interface ethernet 1/e8

Console (config-if)# switchport mode trunk

console (config-if)# switchport trunk native vlan 123


switchport general allowed vlan

Use the switchport general allowed vlan interface configuration command to add and remove VLANs from a port in general mode.

Syntax

switchport general allowed vlan add vlan-list [ tagged | untagged ]

switchport general allowed vlan remove vlan-list

Default Configuration

This command has no default configuration.

Command Mode

Interface Configuration (Ethernet, port-channel) Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example shows how to add VLANs to the allowed list.

console (config)# interface ethernet 1/e8

Console (config-if)# switchport mode general

Console (config-if)# switchport general allowed vlan add 1,2,5,6 tagged


switchport general pvid

Use the switchport general pvid interface configuration command to configure the Port VLAN ID (PVID) when the interface is in general mode. To configure the default value, use the no form of this command.

Syntax

switchport general pvid vlan-id

no switchport general pvid

Default Configuration

The default VLAN ID is 1.

Command Mode

Interface Configuration (Ethernet, port-channel) Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example configures the PVID for port 1/e8, when the interface is in general mode.

Console (config)# interface ethernet 1/e8

Console (config-if)# switchport mode general

Console (config-if)# switchport general pvid 234


switchport general ingress-filtering disable

Use the switchport general ingress-filtering disable interface configuration command to disable port ingress filtering. To enable ingress filtering on a port, use the no form of this command.

Syntax

switchport general ingress-filtering disable

no switchport general ingress-filtering disable

Default Configuration

Ingress filtering is enabled.

Command Mode

Interface Configuration (Ethernet, port-channel) Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example disables port ingress filtering on port 1/e8.

Console (config)# interface ethernet 1/e8

Console (config-if)# switchport general ingress-filtering disable


switchport general acceptable-frame-types tagged-only

Use the switchport general acceptable-frame-types tagged-only interface configuration command to discard untagged frames at ingress. To enable untagged frames at ingress, use the no form of this command.

Syntax

switchport general acceptable-frame-types tagged-only

no switchport general acceptable-frame-types tagged-only

Default Configuration

All frame types are accepted at ingress.

Command Mode

Interface Configuration (Ethernet, port-channel) Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example configures port 1/e8 to discard untagged frames at ingress.

Console (config)# interface ethernet 1/e8

Console (config-if)# switchport general acceptable-frame-types tagged-only


switchport forbidden vlan

Use the switchport forbidden vlan interface configuration command to forbid adding specific VLANs to a port. This command prevents GVRP from automatically making these VLANs active on the selected ports. To allow the addition of specific VLANs to the port, use the no form of this command.

Syntax

switchport forbidden vlan {add vlan-list | remove vlan-list}

Default Configuration

All VLANs are allowed.

Command Mode

Interface Configuration (Ethernet, port-channel) Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example forbids adding VLANs 234-256 to port 1/e8.

Console (config)# interface ethernet 1/e8

Console (config-if)# switchport forbidden vlan add 234-256


show vlan

Use the show vlan privileged EXEC command to display VLAN information.

Syntax

show vlan [id vlan-id | name vlan-name]

Default Configuration

This command has no default configuration.

Command Mode

Privileged EXEC Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example displays all VLAN information.

Console# show vlan

VLAN Name Ports Type

-------- --------------- ------ -----

1 default 1/e1-2 Other

2/e1-4

10 VLAN0010 1/e3-4 dynamic

11 VLAN0011 1/e1-2 permanent

20 VLAN0020 1/e3-4 permanent

21 VLAN0021 permanent

30 VLAN0030 permanent

31 VLAN0031 permanent


show interfaces switchport

Use the show interfaces switchport privileged EXEC command to display switchport configuration.

Syntax

show interfaces switchport {ethernet interface | port-channel port-channel-number}

Default Configuration

This command has no default configuration.

Command Mode

Privileged EXEC Mode

User Guidelines

There are no user guidelines for this command.

Example

The following example displays switchport configuration for port 1/e1.

Console# show interface switchport ethernet 1/e1

Port 1/e1:

VLAN Membership mode: General

PVID: 1 (default)

Ingress Filtering: Enabled

Acceptable Frame Type: All

GVRP status: Enabled

Port 1/e1 is member in:

VLAN Name Egress rule

---- --------- -----------

1 default untagged

8 VLAN008 untagged

11 VLAN0011 tagged

19 IPv6 VLAN untagged

72 VLAN0072 untagged

Forbidden VLANS:

VLAN Name

---- ---------

73 Out

Classification rules:

Protocol Group VLAN

-------------- ----

2 19

3 72


Back to Contents Page