cc/td/doc/product/lan/cat4224
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Command Reference for Voice VLAN
interface range
interface vlan
monitor session
spanning-tree
spanning-tree portfast
switchport access
switchport voice vlan

Command Reference for Voice VLAN


This section provides reference information for the following voice VLAN commands:

interface range

The interface range command allows you to configure multiple interfaces with the same configuration parameters. By using this command, you enter range configuration mode. While you are in this mode, the command parameters that you enter are attributed to all interfaces within the range specified.

Syntax

interface range {{ethernet | fastethernet} slot/interface - interface}
[, {{ethernet | fastethernet} slot/interface - interface}]

Syntax Description

slot

Slot number.

interface

Interface number.

Defaults

None.

Command Modes

Global configuration

Usage Guidelines

The space before the dash is required. You can enter up to five comma-separated ranges. You are not required to enter spaces before or after the comma.

If you enter multiple configuration commands while you are in interface range mode, each command is executed as it is entered. If you exit interface range configuration mode while the commands are being executed, some commands may not be executed on all interfaces in the range. Wait until the command prompt reappears before exiting interface range configuration mode.

Example

The following example shows how to select the Fast Ethernet interfaces 5/1 to 5/5:

Gateway (config)# interface range fastethernet 5/1 - 5

interface vlan

Use the interface vlan configuration command to configure an interface type, create a switch virtual interface to be used as the routed VLAN interface, and to enter interface configuration mode.

Syntax

interface vlan number

no interface vlan number

Syntax Description

number

Valid VLAN IDs are from 1 to 1005. Do not enter leading zeroes.

Defaults

The default management VLAN interface is VLAN 1.

Command Modes

Global configuration.

Usage Guidelines

To enable inter-VLAN routing, configure an interface VLAN with a VLAN number.

Example

The following example shows how to enter configuration mode for vlan 3:

Switch# configure terminal
Switch(config)# interface vlan 3
Switch(config-if)#

monitor session

Use the monitor session configuration command to set a port session.

Syntax

monitor session number destination_interface

monitor session number source_interface

Syntax Description

number

Session number

destination_interface

SPAN destination interface

source_interface

SPAN source interface

Defaults

None.

Command Modes

Interface configuration.

Usage Guidelines

You can span only selected interfaces. You cannot span VLANs.

Examples

The following example shows how to set up a port monitor session. For this example, we configure two sessions in global configuration mode.

In session 1, int Fas 5/2 will mirror all of its packets to 5/9:

sjc12-42a-sw1(config)#monitor session 1 source interface fast 5/2
sjc12-42a-sw1(config)#monitor session 1 dest int fas 5/9

In session 2, int fas 5/3 will mirror all of its packets to 5/13:

sjc12-42a-sw1(config)#monitor session 2 source int fas 5/3
sjc12-42a-sw1(config)#monitor session 2 destination int fas 5/13

You can sees what is being mirrored by entering the show monitor session command in privileged EXEC mode:

sjc12-42a-sw1#sho monitor
Session 1
Source Ports:
Both: FastEthernet5/2
Destination Ports:FastEthernet5/13
Session 2
Source Ports:
Both: FastEthernet5/3
Destination Ports:FastEthernet5/13

spanning-tree

Use the spanning-tree global configuration command to enable Spanning Tree Protocol (STP) on a VLAN. Use the no form of the command to disable STP on a VLAN.

Syntax

spanning-tree [vlan stp-list]

no spanning-tree [vlan stp-list]

Syntax Description

vlan stp-list

(Optional) List of spanning-tree instances. Each spanning-tree instance is associated with a VLAN ID. Valid IDs are from 1 to 1005. Enter each VLAN ID separated by a space. Do not enter leading zeroes. Ranges are not supported.

Defaults

STP is enabled.

Command Modes

Global configuration.

Usage Guidelines

Disabling STP causes the VLAN or list of VLANs to stop participating in STP. Ports that are administratively down remain down. Received Bridge Protocol Data Units (BPDUs) are forwarded like other multicast frames. The VLAN does not detect and prevent loops when STP is disabled.

You can disable STP on a VLAN that is not currently active, and verify the change by using the privileged EXEC show running-config or the show spanning-tree vlan stp-list command. The setting takes effect when the VLAN is activated.

If the variable stp-list is omitted, the command applies to the STP instance associated with VLAN 1.

You can enable STP on a VLAN that has no ports assigned to it.

Example

The following example shows how to disable STP on VLAN 5:

Switch(config)# no spanning-tree vlan 5

You can verify the previous command by entering the show spanning-tree command in privileged EXEC mode. In this instance, VLAN 5 does not appear in the list.

spanning-tree portfast

Use the spanning-tree portfast interface configuration command to enable the Port Fast feature on a port in all its associated VLANs. When the Port Fast feature is enabled, the port changes directly from a blocking state to a forwarding state without making the intermediate STP status changes. Use the no form of this command to return the port to default operation.

Syntax

spanning-tree portfast

no spanning-tree portfast

Syntax Description

This command has no keywords or arguments.

Defaults

The Port Fast feature is disabled; however, it is automatically enabled on dynamic-access ports.

Command Modes

Interface configuration.

Usage Guidelines

This feature should be used only on ports that connect to end stations. It affects all VLANs on the port.

A port with the Port Fast feature enabled is moved directly to the spanning-tree forwarding state.

Example

The following example shows how to enable the Port Fast feature on fixed port 2.

Switch(config-if)# spanning-tree portfast fa5/2

You can verify the previous command by entering the show running-config in privilege EXEC mode.

switchport access

Use the switchport access interface configuration command to configure a port as a static-access port. The port operates as a member of the configured VLAN.

Use the no form of this command to reset the access mode to the default VLAN for the switch.

Syntax

switchport access vlan vlan-id

no switchport access vlan vlan-id

Syntax Description

vlan vlan-id

ID of the VLAN. Valid IDs are from 1 to 1005. Do not enter leading zeroes.

Defaults

All ports are in static-access mode in VLAN 1.

Command Modes

Interface configuration.

Usage Guidelines

An access port can be assigned to only one VLAN.

When the no switchport access vlan form is used, the access mode is reset to static access on VLAN 1.

Example

The following example shows how to assign a port to VLAN 2 (instead of the default VLAN 1):

Switch(config-if)# switchport access vlan 2

You can verify the previous command by entering the show interface interface-id switchport command in privileged EXEC mode and examining information in the Administrative Mode and Operational Mode rows.

switchport voice vlan

Use the switchport voice vlan interface configuration command to configure the voice VLAN on the port. Use the no form of this command to return the setting to its default.

Syntax

switchport voice vlan {vlan-id | dot1p | none | untagged}

no switchport voice vlan

Syntax Description

vlan-id

VLAN used for voice traffic. Valid IDs are from 1 to 1001 (IDs 1002 to 4095 are not supported on Catalyst 4224 switches).

Do not enter leading zeroes.

dot1p

The telephone uses priority tagging and uses an 802.1Q VLAN ID of 0.

none

The telephone is not instructed through the CLI about the voice VLAN.

The telephone uses the configuration from the telephone key pad.

untagged

The telephone does not tag frames. The switch port can be an access port or an 802.1Q trunk port.

Defaults

The switch default is not to configure the telephone automatically (none).

The Cisco 7960 IP Phone default is to generate an 802.1Q/802.1P frame.

Command Modes

Interface configuration.

Usage Guidelines

Ports that are not configured as trunk ports but have a configured voice VLAN are access ports with a voice VLAN ID (VVID).

Example

The following example shows how to configure VLAN 2 as the voice VLAN:

Switch(config-if)# switchport voice vlan 2

You can verify the previous command by entering the show interface interface-id switchport command in privileged EXEC mode.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Sat Apr 5 04:04:17 PST 2003
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.