Table Of Contents
set snmp extendedrmon vlanagent
set snmp extendedrmon vlanmode
set spantree multicast-address
set spantree portfast bpdu-guard
2set qos defaultcos
Use the set qos defaultcos command to define the default CoS value for the entire switch.
set qos defaultcos cos_value
Syntax Description
Defaults
The default CoS value for the entire switch is 0.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 4000 family switches and the Catalyst 2948G and
2980G switch.Examples
This example shows how to set the switch default CoS to 7:
Console> (enable) set qos defaultcos 7qos defaultcos set to 7Console> (enable)This example shows how to set the switch default CoS to 4:
Console> (enable) set qos defaultcos 4qos defaultcos set to 4Console> (enable)Related Commands
set qos ip-filter
Use the set qos ip-filter command to create access control entries (ACEs) with Layer 3 values or with both Layer 3 and 4 values.
set qos ip-filter cos {src_ip_addr_spec} {dest_ip_addr_spec} [before ACE# | modify ACE#]
set qos ip-filter cos protocol {src_ip_addr_spec} {src_port} {dest_ip_addr_spec}{dest_port}
[before ACE# | modify ACE#]Syntax Description
Defaults
This command has no default setting.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported only on Catalyst 5000 family switches with Supervisor Engine II G or III G, or Supervisor Engine III or III F with the NFFC II.
If you do not specify the before ACE# argument, the new entry is placed after the last. The ACE number of any entry is its current position in the list. These can be viewed by the show qos ip command.
If you do not enter the protocol variable, the set qos ip-filter command specifies an ACE that is independent of the Layer 4 protocol and port. If you enter the protocol variable, the command specifies an ACE that matches specific Layer 4 protocols and ports.
The dest_ip_addr_spec and src_ip_addr_spec variables are entered in the following format:
{any | {host ip_addr} | {ip_addr ip_addr_mask}}
where:
•
any is a keyword that specifies the ip_addr ip_addr_mask as 0.0.0.0 255.255.255.255.
•
host ip_addr is a keyword and variable that specifies the IP address of the host and the subnet mask of the specified IP address.
Layer 4 ports can only be specified for unicast addresses. If the destination address specifies a multicast address, and you enter the set qos ip-filter {dest_ip_addr} {src_ip_addr mask} protocol [dst_port src_port] cos [before ACE#] command, an error is displayed. If the destination address includes multicast addresses and the same command is used, a message displays that the command only applies to unicast addresses.
If you enter a 0 for the src_port variable, it means any source port matches.
If you enter a 0 for the dest_port variable, it means any destination port matches.
Examples
This example shows how to create ACEs and an ACE within the list and verify the configuration using the show qos ip command:
Console>(enable) set qos ip-filter 7 100.100.1.1 255.255.255.0 200.200.1.1 255.255.255.0qos ip-filter is set successfully.Console> (enable)Console> (enable) show qos ipThere are 1 IP filter(s).ACE# Dest IP and Mask Src IP and Mask---- -------------------------------- --------------------------------1 100.100.1.1 255.255.255.0 200.200.1.1 255.255.255.0Protocol Dst Port Src Port CoS-------- -------- -------- ---both 0 0 7Console> (enable)Console> (enable) set qos ip-filter 4 tcp 120.100.1.1 255.255.255.0 47 210.210.1.1 255.255.255.0 23qos ip-filter is set successfully.Console> (enable)Console> (enable) show qos ipThere are 2 IP filter(s).ACE# Dest IP and Mask Src IP and Mask---- -------------------------------- --------------------------------1 100.100.1.1 255.255.255.0 200.200.1.1 255.255.255.0Protocol Dst Port Src Port CoS-------- -------- -------- ---both 0 0 72 120.100.1.1 255.255.255.0 210.210.1.1 255.255.255.0Protocol Dst Port Src Port CoS-------- -------- -------- ---tcp 23 47 4Console> (enable)Console> (enable) set qos ip-filter 1 20.20.20.1 255.0.0.0 30.30.1.1 255.0.0.0 before 1qos ip-filter is set successfully.Console> (enable)Console> (enable) show qos ipThere are 3 IP filter(s).ACE# Dest IP and Mask Src IP and Mask---- -------------------------------- --------------------------------1 20.20.20.1 255.0.0.0 30.30.1.1 255.0.0.0Protocol Dst Port Src Port CoS-------- -------- -------- ---both 0 0 12 100.100.1.1 255.255.255.0 200.200.1.1 255.255.255.0Protocol Dst Port Src Port CoS-------- -------- -------- ---both 0 0 73 120.100.1.1 255.255.255.0 210.210.1.1 255.255.255.0Protocol Dst Port Src Port CoS-------- -------- -------- ---tcp 23 47 4Console> (enable)Related Commands
show qos ip
clear qos ip-filterset qos mac-cos
Use the set qos mac-cos command to map a CoS value to a MAC address and VLAN pair.
set qos mac-cos dest_mac vlan cos
Syntax Description
dest_mac
MAC address of the destination host.
vlan
Number of the VLAN; valid values are 1 to 1001.
cos
CoS value; valid values are 0 to 7, with the higher numbers representing higher priority.
Defaults
This command has no default setting.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported only on Catalyst 5000 family switches with Supervisor Engine II G or III G, or Supervisor Engine III or III F with the NFFC II.
The set qos mac-cos command creates a permanent CAM entry that remains in the CAM table until the active supervisor is reset.
The port associated with the MAC address is learned when the first packet with this source MAC address is received. These entries are not aged out.
If you enter the show cam command, entries made with the set qos mac-cos command are displayed as dynamic. Entries made using the set qos mac-cos command do not age out.
Examples
This example shows how to map a CoS value to a MAC address and VLAN:
Console> (enable) set qos mac-cos 0f-ab-12-12-00-13 2 3CoS 3 is assigned to 0f-ab-12-12-00-13 vlan 2.Console> (enable)Related Commands
clear qos mac-cos
show qos mac-cosset qos map
Use the set qos map command to associate CoS values to a transmit queue and drop threshold.
set qos map port_type q# threshold# cos coslist
Syntax Description
Defaults
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches, Catalyst 4000 family switches, and the 2948G and 2980G switch.
On the Catalyst 5000 family switches, this command is supported only with Supervisor Engine II G or III G, or Supervisor Engine III or III F with the NFFC II.
Examples
This example shows how to assign the CoS values 1 and 2 to the first transmit queue and the first drop threshold for that queue on a 1q4t port (Catalyst 5000 family switches):
Console> (enable) set qos map 1q4t 1 1 cos 1-2Qos tx priority queue and threshold mapped to cos successfully.Console> (enable)This example shows how to assign the CoS values 4 through 7 to the first transmit queue and the second drop threshold for that queue on a 1q4t port (Catalyst 5000 family switches):
Console> (enable) set qos map 1q4t 1 2 cos 4-7Qos tx priority queue and threshold mapped to cos successfully.Console> (enable)This example shows how to map CoS values 4 through 7 to the second transmit queue and the first drop threshold for that queue on a 2q1t port (Catalyst 4000 family, 2948G, and 2980G switches):
Console> (enable) set qos map 2q1t 2 1 cos 4-7Qos tx priority queue and threshold mapped to cos successfully.Console> (enable)Related Commands
set qos policy-source
Use the set qos policy-source command to set the QoS policy source.
set qos policy-source local | cops
Syntax Description
local
Keyword that specifies to set the policy source to local NVRAM configuration.
cops
Keyword that specifies to set the policy source to COPS configuration.
Defaults
The default is all ports are set to local.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches.
When you set the policy source to local, the QoS policy is taken from local configuration stored in NVRAM. If you set the policy source to local after it was set to COPS, the QoS policy reverts back to the local configuration stored in NVRAM.
When you set the policy source to COPS, all configuration that is global to the device, such as the DSCP to marked-down DSCP, is taken from policy downloaded to the PEP by the PDP. Configuration of each physical port, however, is taken from COPS only if the policy source for that port has been set to COPS.
Examples
This example shows how to set the policy source to COPS:
Console> (enable) set qos policy-source copsQoS policy source for the switch set to COPS.Console> (enable)This example shows how to set the policy source to local NVRAM:
Console> (enable) set qos policy-source localQoS policy source for the switch set to local.Console> (enable)This example shows the output if you attempt to set the policy source to COPS and no COPS servers are available:
Console> (enable) set qos policy-source copsQoS policy source for the switch set to COPS.Warning: No COPS servers configured. Use the `set cops server' commandto configure COPS servers.Console> (enable)Related Commands
clear qos config
show qos info
show qos policy-sourceset qos router-mac
Use the set qos router-mac command to specify router MAC addresses for ACE-based classification.
set qos router-mac mac_address vlan
Syntax Description
Defaults
This command has no default setting.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported only on Catalyst 5000 family switches with Supervisor Engine II G or
III G, or Supervisor Engine III or III F with the NFFC II.This command is not supported by the MLS-RP.
Use this command to specify the MAC address of a router for which to perform ACE-based classification. For IPv4 traffic destined for a router, QoS can classify packets that match an Access-Control Entry (ACE) by setting the IP precedence bits (in the IP TOS header) and CoS value in the frame header.
If you are using MLS, QoS can perform ACE-based classification only for traffic that is switched using MLS. ACE-based classification is performed at the switch egress port as the flow is being multilayer switched. QoS cannot perform ACE-based classification on traffic that the MLS-RP routes off the switch. QoS learns the address of the MLS-RP automatically when MLS is configured on the switch.
Examples
This example shows how to set the router MAC address on a specific VLAN:
Console> (enable) set qos router-mac 00-40-0b-30-03-48 2Router MAC/Vlan is set for QoS.Console> (enable)Related Commands
clear qos router-mac
show qos mac-cosset qos wred-threshold
Use the set qos wred-threshold command to specify the transmit queue drop thresholds on all ports in the switch.
set qos wred-threshold port_type [rx | tx] queue {q# thr1 thr2 thr3 thr4}
Syntax Description
Defaults
The defaults are output queuing and the threshold values are 30%, 50%, 80%, and 100%.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported only on Catalyst 5000 family switches with Supervisor Engine II G or III G, or Supervisor Engine III or III F with the NFFC II.
The number preceding the t letter in the port_type (1q4t) determines the number of threshold values the hardware supports. For example, with 1q4t, the number of thresholds specified is four.
The number preceding the q letter in the port_type determines the number of the queues that the hardware supports. For example, with 1q4t, the number of queues specified is one.
The transmit drop threshold percentages specified select a buffer usage level where each threshold applies.
The percentages to buffer usage level are as follows:
•
1% is a threshold when 2,044 bytes of the transmit queue buffer have been used
•
2% and 3% = 4,092 bytes have been used
•
4% through 7% = 8,188 bytes have been used
•
8% through 14% = 16,380 bytes have been used
•
15% through 28% = 32,767 bytes have been used
•
29% through 57% = 65,532 bytes have been used
•
58% through 100% = 131,068 bytes have been used
Due to the granularity of programming the hardware, the values set in hardware will be close approximations of the values provided.
Examples
This example shows how to configure the transmit queue drop thresholds.
Console> (enable) set qos wred-threshold 1q4t tx queue 1 30 50 80 100Transmit drop thresholds for queue 1 set at 30% 50% 80% 100%Console> (enable)Related Commands
set radius deadtime
Use the set radius deadtime command to set the time to skip RADIUS servers that do not reply.
set radius deadtime minutes
Syntax Description
minutes
The length of time a RADIUS server does not respond to an authentication request; valid values are 0 to 1440 minutes.
Defaults
The default is 0 minutes.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
If only one RADIUS server is configured or if all the configured servers are marked dead, deadtime will be ignored because there are no alternate servers available. By default, the deadtime will be 0 minutes, that is, the RADIUS servers will not be marked dead if they do not respond.
Examples
This example shows how to set the RADIUS deadtime to 10 minutes:
Console> (enable) set radius deadtime 10Radius deadtime set to 10 minutes.Console> (enable)Related Commands
set radius key
Use the set radius key command to set the encryption and authentication for all communication between the RADIUS client and the server.
set radius key {key}
Syntax Description
The command has no keywords or arguments.
Defaults
The default of the key is set to NULL.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
The key you set must be the same one as configured in the RADIUS server. All leading spaces are ignored, spaces within and at the end of the key are not ignored. Double quotes are not required even if there are spaces in the key, unless the quotes themselves are part of the key. The length of the key is limited to 65 characters. It can include any printable ASCII character except tabs.
Examples
This example shows how to set the RADIUS encryption and authentication key to Make my day:
Console> (enable) set radius key Make my dayRadius key set to Make my day.Console> (enable)Related Commands
set radius retransmit
Use the set radius retransmit command to specify the number of times the RADIUS servers are tried before giving up on the server.
set radius retransmit count
Syntax Description
count
Number of times the RADIUS servers are tried before giving up on the server; valid values are 1 to 100.
Defaults
The default is two times (three attempts).
Command Types
Switch command.
Command Modes
Privileged.
Examples
This example shows how to set the retransmit attempts to 3:
Console> (enable) set radius retransmit 3Radius retransmit count set to 3.Console> (enable)Related Commands
set radius server
Use the set radius server command to set up the RADIUS server.
set radius server ipaddr [auth-port port] [acct-port port][primary]
Syntax Description
Defaults
The default auth-port is 1812. The default acct-port is 1813.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
You can add up to three RADIUS servers.
The RADIUS server will not be used for authentication if the port number is set to 0.
Examples
This example shows how to add a primary server using an IP alias:
Console> (enable) set radius server tampa.users.comtampa.users.com added to RADIUS server table as primary server.Console> (enable)Related Commands
set radius timeout
Use the set radius timeout command to set the time between retransmissions to the RADIUS server.
set radius timeout seconds
Syntax Description
Defaults
The default timeout is 5 seconds.
Command Types
Switch command.
Command Modes
Privileged.
Examples
This example shows how to set the time between retransmissions to 7 seconds:
Console> (enable) set radius timeout 7Radius timeout set to 7 seconds.Console> (enable)Related Commands
set rcp username
Use the set rcp username command to specify your username for rcp file transfers.
set rcp username username
Syntax Description
Defaults
There are no default settings for this command.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
Username must be different from "root" and not a null string. The only case where rcp username is not used is for the VMPS database. For the VMPS database, an rcp VMPS username is used.
Examples
This example shows how to set the username for rcp:
Console> (enable) set rcp username jdoeConsole> (enable)Related Commands
set rgmp
Use the set rgmp command to enable or disable the RGMP feature on the switch.
set rgmp {enable | disable}
Syntax Description
Defaults
The default is RGMP is disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches.
RGMP is a global command. You cannot enable or disable RGMP on a per-VLAN basis.
The RGMP feature is operational only if IGMP snooping is enabled on the switch (see the set igmp command).
Examples
This example shows how to enable RGMP on the switch:
Console> (enable) set rgmp enableRGMP is enabled.Console> (enable)This example shows how to disable RGMP on the switch:
Console> (enable) set rgmp disableRGMP is disabled.Console> (enable)Related Commands
show rgmp group
show rgmp statistics
clear rgmp statistics
set igmp
set igmp fastleaveset rsmautostate
Use the set rsmautostate command to enable and disable line protocol state determination of the RSMs due to port state changes. When you enable rsmautostate, VLAN interfaces on the RSM are active only when there is at least one other active interface within the Catalyst 5000 family and 2926G series switches. This interface could be a physical end-user port, a trunk connection for which the VLAN is active, or another RSM with an equivalent VLAN interface.
set rsmautostate {enable | disable}
Syntax Description
enable
Keyword that specifies to activate line protocol state determination.
disable
Keyword that specifies to deactivate line protocol state determination.
Defaults
The default configuration has line protocol state determination disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches.
This command is useful for discontinuing the advertisement of routing paths when access to them is severed (either through fault or administrative disabling).
If you disable rsmautostate, you might have to use the shutdown/no shutdown Cisco IOS command to disable and then restart the VLAN interface to bring the RSM back up.
Examples
This example shows how to enable the line protocol state determination of the RSM:
Console> (enable) set rsmautostate enableConsole> (enable)This example shows how to disable the line protocol state determination of the RSM:
Console> (enable) set rsmautostate disableConsole> (enable)Related Commands
set snmp access
Use the set snmp access command to define the access rights of an SNMP group with a specific security model in different security levels.
set snmp access {-hex} {groupname} {security-model {v1 | v2c}} [read {-hex} {readview}]
[write {-hex} {writeview}] [notify {-hex} {notifyview}] [volatile | nonvolatile]set snmp access {-hex} {groupname} {security-model v3 {noauthentication | authentication
| privacy}} [read {-hex} {readview}] [write {-hex} {writeview}] [notify {-hex}
{notifyview}] [volatile | nonvolatile]Syntax Description
Defaults
The defaults are as follows:
•
storage type is nonvolatile.
•
read readview is Internet OID space.
•
write writeview is NULL OID.
•
notify notifyview is NULL OID.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
If you use special characters for groupname, readview, writeview, and notifyview (nonprintable delimiters for these parameters), you must use a hexadecimal keyword, which is one or two hexadecimal digits separated by a colon (:); for example, 00:ab:34.
readview is assumed to be every object belonging to the Internet (1.3.6.1) OID space; you can use the read option to override this state.
For writeview, you must also configure write access.
For notifyview, if a view is specified, any notifications in that view are sent to all users associated with the group (an SNMP server host configuration must exist for the user).
Examples
This example shows how to set the SNMP access rights for a group:
Console> (enable) set snmp access cisco-group security-model v3 authenticationSNMP access group was set to cisco-group version v3 level authentication, readview internet, nonvolatile.Console> (enable)Related Commands
set snmp community
Use the set snmp community command to set SNMP communities and associated access types.
set snmp community {read-only | read-write | read-write-all} [community_string]
Syntax Description
Defaults
The default configuration has the following communities and access types defined:
•
public—read-only
•
private—read-write
•
secret—read-write-all
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
There are three configurable SNMP communities, one for each access type. If you do not specify the community string, the community string configured for that access type is cleared.
Examples
This example shows how to set read-write access to the SNMP community called yappledapple:
Console> (enable) set snmp community read-write yappledappleSNMP read-write community string set.Console> (enable)This example shows how to clear the community string defined for read-only access:
Console> (enable) set snmp community read-onlySNMP read-only community string cleared.Console> (enable)Related Commands
set snmp extendedrmon
Use the set snmp extendedrmon command to enable or disable the Network Analysis Module.
set snmp extendedrmon {enable | disable}
Syntax Description
enable
Keyword that specifies to enable the Network Analysis Module.
disable
Keyword that specifies to disable the Network Analysis Module.
Defaults
The default is enabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches and the Catalyst 2926G series switches.
Examples
This example shows how to enable the Network Analysis Module:
Console> (enable) set snmp extendedrmon enableSnmp extended RMON module enabledConsole> (enable)This example shows how to disable the Network Analysis Module:
Console> (enable) set snmp extendedrmon disableSnmp extended RMON module disabledConsole> (enable)Related Commands
set snmp extendedrmon netflow
Use the set snmp extendedrmon netflow command to enable or disable the Network Analysis Module to receive the NDE stream from an NFFC or NFFC II and present the resulting statistics on reserved ifIndex.3000.
set snmp extendedrmon netflow {enable password | disable}
Syntax Description
Defaults
The default is SNMP-extended RMON NetFlow disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches and the Catalyst 2926G series switches.
To enable the NetFlow Monitor option, you must purchase a NetFlow Monitor option license from your Cisco sales representative.
The option license has a registration key and URL on it. Access the URL and enter the registration key and the MAC address of the Network Analysis Module to generate the password for your Network Analysis Module.
Examples
This example shows how to enable SNMP-extended RMON NetFlow support:
Console> (enable) set snmp extendedrmon netflow enable <password>Snmp extended RMON netflow enabledConsole> (enable)This example shows how to disable SNMP-extended RMON NetFlow support:
Console> (enable) set snmp extendedrmon netflow disableSnmp extended RMON netflow disabledConsole> (enable)Related Commands
set snmp extendedrmon vlanagent
Use the set snmp extendedrmon vlanagent command to enable or disable the VLANagent option. If the VLANagent option is enabled, the NAM aggregates statistics by VLAN as well as by port.
set snmp extendedrmon vlanagent {enable | disable}
Syntax Description
enable
Keyword that specifies to activate SNMP-extended RMON VLANagent support.
disable
Keyword that specifies to deactivate SNMP-extended RMON VLANagent support.
Defaults
The default is SNMP-extended RMON VLANagent disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches and the Catalyst 2926G series switches.
The VLANagent option imposes an increased load on the NAM and might not be suitable for use on a heavily loaded switch or when the switch is configured to analyze a high volume of network traffic.
Examples
This example shows how to enable extended RMON VLANagent support:
Console> (enable) set snmp extendedrmon vlanagent enableSnmp extended RMON vlanagent enabledConsole> (enable)This example shows how to disable extended RMON VLANagent support:
Console> (enable) set snmp extendedrmon vlanagent disableSnmp extended RMON vlanagent disabledConsole> (enable)Related Commands
set snmp extendedrmon vlanmode
Use the set snmp extendedrmon vlanmode command to enable or disable the VLAN monitor option. If the VLAN monitor option is enabled, the Network Analysis Module aggregates statistics by VLAN, instead of by source MAC address.
set snmp extendedrmon vlanmode {enable | disable}
Syntax Description
enable
Keyword that activates SNMP-extended RMON VLAN mode support.
disable
Keyword that deactivates SNMP-extended RMON VLAN mode support.
Defaults
The default is SNMP-extended RMON VLAN mode disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches and the Catalyst 2926G series switches.
Examples
This example shows how to enable extended-RMON VLAN mode support:
Console> (enable) set snmp extendedrmon vlanmode enableSnmp extended RMON vlanmode enabledConsole> (enable)This example shows how to disable extended-RMON VLAN mode support:
Console> (enable) set snmp extendedrmon vlanmode disableSnmp extended RMON vlanmode disabledConsole> (enable)Related Commands
set snmp group
Use the set snmp group command to establish the relationship between an SNMP group and a user with a specific security model.
set snmp group {-hex} {groupname} user {-hex} {username} {security-model {v1 | v2c |
v3}} [volatile | nonvolatile]Syntax Description
Defaults
This command has no default settings.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
If you use special characters for groupname or username (nonprintable delimiters for these parameters), you must use a hexadecimal keyword, which is one or two hexadecimal digits separated by a colon (:); for example, 00:ab:34.
Examples
This example shows how to set the SNMP group:
Console> (enable) set snmp group cisco-group user joe security-model v3SNMP group was set to cisco-group user joe and version v3,nonvolatile.Console> (enable)Related Commands
clear snmp group
show snmp groupset snmp notify
Use the set snmp notify command to set the notifyname in the snmpNotifyTable and set the notifytag in the snmpTargetAddrTable.
set snmp notify {-hex} {notifyname} tag {-hex} {notifytag} [trap | inform] [volatile |
nonvolatile]Syntax Description
Defaults
The defaults are as follows:
•
Storage type is volatile.
•
Notify type is trap.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
If you use special characters for the notifyname and notifytag (nonprintable delimiters for these parameters), you must use a hexadecimal keyword, which is one or two hexadecimal digits separated by a colon (:); for example, 00:ab:34.
Examples
This example shows how to set the SNMP notify for a specific notifyname:
Console> (enable) set snmp notify hello tag world informSNMP notify name was set to hello with tag world notifyType inform, and storageType nonvolatile.Console> (enable)Related Commands
clear snmp notify
show snmp notifyset snmp rmon
Use the set snmp rmon command to enable or disable SNMP RMON support.
set snmp rmon {enable | disable}
Syntax Description
enable
Keyword that specifies to activate SNMP RMON support.
disable
Keyword that specifies to deactivate SNMP RMON support.
Defaults
The default for RMON support is disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
RMON statistics are collected on a segment basis instead of a repeater-port basis for the Catalyst 5000 family, 4000 family, 2926G series, 2948G, and 2980G group switching Ethernet modules (WS-X5020 and WS-X5223).
The RMON feature deinstalls the domains for all of the interfaces on an Ethernet module that has been removed from the system.
RMON is supported on Ethernet, Fast Ethernet, Gigabit Ethernet, and Token Ring switch ports.
When RMON is enabled, the supported RMON groups for Ethernet ports are Statistics, History, Alarms, and Events, as specified in RFC 1757.
When RMON is enabled, the supported RMON groups for Token Ring ports are Mac-Layer Statistics, Promiscuous Statistics, Mac-Layer History, Promiscuous History, Ring Station Order Table, Alarms, and Events, as specified in RFC 1513 and RFC 1757.
Use of this command requires a separate software license.
Examples
This example shows how to enable RMON support:
Console> (enable) set snmp rmon enableSNMP RMON support enabled.Console> (enable)This example shows how to disable RMON support:
Console> (enable) set snmp rmon disableSNMP RMON support disabled.Console> (enable)Related Commands
set snmp targetaddr
Use the set snmp targetaddr command to configure the SNMP target address entries in the snmpTargetAddressTable.
set snmp targetaddr {-hex} {addrname} param {-hex} {paramsname}{ipaddr} [udpport
{port}] [timeout {value}] [retries {value}] [volatile | nonvolatile] [taglist {{-hex} tag}]
[{-hex} tag tagvalue]Syntax Description
Defaults
The defaults are as follows:
•
storage type is nonvolatile.
•
udpport is 162.
•
timeout is 1500.
•
retries is 3.
•
taglist is NULL.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
If you use special characters for the addrname, paramsname, tag, and tagvalue (nonprintable delimiters for these parameters), you must use a hexadecimal keyword, which is one or two hexadecimal digits separated by a colon (:); for example, 00:ab:34.
The maximum tagvalue and taglist length is 255 bytes.
Examples
This example shows how to set the target address in the snmpTargetAddressTable:
Console> (enable) set snmp targetaddr foo param bar 10.1.2.4 udp 160 timeout 10 retries 3 taglist tag1 tag2 tag3SNMP targetaddr name was set to foo with param bar ipAddr 10.1.2.4, udpport 160, timeout 10, retries 3, storageType nonvolatile with taglist tag1 tag2 tag3.Console> (enable)Related Commands
clear snmp targetaddr
show snmp targetaddrset snmp targetparams
Use the set snmp targetparams command to configure the SNMP parameters used in the snmpTargetParamsTable when generating a message to a target.
set snmp targetparams {-hex} {paramsname} user {-hex} {username} {security-model
{v1 | v2c}} {message-processing {v1 | v2c | v3}} [volatile | nonvolatile]set snmp targetparams {-hex} {paramsname} user {-hex} {username} {security-model v3}
{message-processing v3 {noauthentication | authentication | privacy}} [volatile |
nonvolatile]Syntax Description
Defaults
The default storage type is volatile.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
If you use special characters for the paramsname and username(nonprintable delimiters for these parameters), you must use a hexadecimal keyword, which is one or two hexadecimal digits separated by a colon (:); for example, 00:ab:34.
Examples
This example shows how to set target parameters in the snmpTargetParamsTable:
Console> (enable) set snmp targetparams bar user joe security-model v3 message-processing v3 authenticationSNMP target params was set to bar v3 authentication, message-processing v3, user joe nonvolatile.Console> (enable)Related Commands
clear snmp targetparams
show snmp targetparamsset snmp trap
Use the set snmp trap command to enable or disable the different SNMP traps on the system or to add an entry into the SNMP authentication trap receiver table.
set snmp trap {enable | disable} [all | module | chassis | bridge | repeater | auth | vtp |
ippermit | vmps | config | entity | stpx | syslog]set snmp trap rcvr_addr rcvr_community
Syntax Description
Defaults
The default configuration has SNMP traps disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
An IP permit trap is sent when unauthorized access based on the IP permit list is attempted.
Use the show snmp command to verify that the appropriate traps were configured.
Examples
This example shows how to enable SNMP chassis traps:
Console> (enable) set snmp trap enable chassisSNMP chassis alarm traps enabled.Console> (enable)This example shows how to enable all traps:
Console> (enable) set snmp trap enableAll SNMP traps enabled.Console> (enable)This example shows how to disable SNMP chassis traps:
Console> (enable) set snmp trap disable chassisSNMP chassis alarm traps disabled.Console> (enable)This example shows how to add an entry in the SNMP trap receiver table:
Console> (enable) set snmp trap 192.122.173.42 publicSNMP trap receiver added.Console> (enable)Related Commands
clear ip permit
clear port filter
set ip permit
show ip permit
show port counters
show snmp
test snmp trapset snmp user
Use the set snmp user command to configure a new SNMP user.
set snmp user {-hex} {username} {remote {engineid}} [authentication {md5 | sha |
authpassword}] [privacy {privpassword}] [volatile | nonvolatile]Syntax Description
Defaults
The default storage type is volatile.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
If you use special characters for username (nonprintable delimiters for this parameter), you must use a hexadecimal keyword, which is one or two hexadecimal digits separated by a colon (:); for example, 00:ab:34.
authpassword and privpassword must be hexadecimal characters without delimiters in between.
If authentication is not specified, the security level default will be noauthentication. If privacy is not specified, the default will be no privacy.
Examples
This example shows how to set a specific user name:
Console> (enable) set snmp user joeSnmp user was set to joe authProt no-auth privProt no-priv with engineid 00:00.Console> (enable)This example shows how to set a specific user name, authentication, and authpassword:
Console> (enable) set snmp user John authentication md5 arizona2Snmp user was set to John authProt md5 authPasswd arizona2. privProt no-priv wi.Console> (enable)Related Commands
set snmp view
Use the set snmp view command to configure the SNMP MIB view.
set snmp view {-hex} {viewname} {subtree} [mask] [included | excluded] [volatile |
nonvolatile]Syntax Description
Defaults
The defaults are as follows:
•
storage type is volatile.
•
bit mask is NULL.
•
MIB subtree is included.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
If you use special characters for viewname (nonprintable delimiters for this parameter), you must use a hexadecimal keyword, which is one or two hexadecimal digits separated by a colon (:); for example, 00:ab:34.
A MOB subtree with a mask defines a view subtree. The MIB subtree can be in OID format or a text name mapped to a valid OID.
Examples
This example shows how to assign a subtree to the view public:
Console> (enable) set snmp view public 1.3.6.1 includedSnmp view name was set to public with subtree 1.3.6.1 included, nonvolatile.Control> (enable)This example shows the response when the subtree is incorrect:
Console> (enable) set snmp view stats statistics excludedStatistics is not a valid subtree OIDControl> (enable)Related Commands
set span
Use the set span command to enable or disable SPAN and to set up the switch port and VLAN analyzer for multiple SPAN sessions.
set span disable [dest_mod/dest_port | all]
set span {src_mod/src_ports... | src_vlan... | sc0} {dest_mod/dest_port} [rx | tx | both]
[inpkts {enable | disable}] [learning {enable | disable}] [multicast {enable | disable}]
[create]Syntax Description
Defaults
The default has no SPAN set up.
learning is enabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
You can configure multiple SPAN sessions to run at the same time. One ingress span session (RX or Both direction) and four egress span sessions (TX direction only) can be configured.
A trunk port can be configured as a source or destination port. If the destination port is a trunk port, the outgoing packets through the SPAN port will carry ISL or 802.1Q VLAN headers.
If SPAN is enabled, and you change the VLAN configuration of the SPAN port (destination), you must disable SPAN before the new configuration will be in effect.
If SPAN is enabled, and you disable a source or destination port, the SPAN function will not work until you enable SPAN on both ports.
You can configure a disabled port to be a source or destination port, but the SPAN function will not work until you enable SPAN on both ports.
If SPAN is enabled for monitoring a particular VLAN, the number of ports being monitored changes when you move a switched port into or out of the specified monitored VLAN.
FDDI port can also be a source port.
Source and destination ports cannot be the same port.
After SPAN is enabled, if no parameters were ever set, the first configured SPAN is used as a reference.
You can configure additional SPAN ports which monitor VLANs only. These ports support a source of one or more VLANs and require the destination port to be a trunk-capable port. This port will filter all traffic except traffic from the configured VLAN for that port.
For monitoring inbound traffic, only one ingress session (or both direction) SPAN is allowed regardless of the port-based SPAN. An egress SPAN can coexist with other SPAN sessions.
Use either a dedicated RMON probe (such as the Catalyst 5000 family Network Analysis Module) or a network analyzer to monitor ports.
Use the inpkts keyword with the enable option to allow the SPAN destination port to receive normal incoming traffic in addition to the traffic mirrored from the SPAN source. Use the disable option to prevent the SPAN destination port from receiving normal incoming traffic.
The keyword learning is dependent on the inpkts option. If the inpkts option is disabled, learning will not take effect. The inpkts option must be set to enable to use learning.
When the keyword learning is enabled, the dont_learn control bit is disabled, allowing the system to learn a packet's source address. When learning is disabled, the packet is forwarded to its destination as usual.
You can specify an RSM port as the SPAN source port. However, you cannot specify an RSM port as the SPAN destination port. The source and destination ports have to be within the module.
If you are configuring SPAN on the Catalyst 5000 family and 2926G series Gigabit EtherChannel switching module, the source and destination ports must be on the same module. This restriction does not apply to the following:
•
Three-port Gigabit Ethernet module (WS-X5403)
•
Catalyst 4000 family, 2948G, 2980G switch modules
If you are configuring the Gigabit EtherChannel switching module VLAN, only the both argument is allowed, you cannot specify tx or rx.
Catalyst 4000 family, 2948G, 2980G switches do not support the sc0 keyword.
Catalyst 4000 family, 2948G, 2980G switches do not permit you to disable multicast on SPAN ports.
The Token Ring port can be a source or destination port. When monitoring the tx direction, only one source port is allowed, and the Token Ring module does not support the inpkts option. A Token Ring port can only monitor another Token Ring port.
If you are running a supervisor engine software release prior to release 4.5(1), we recommend that you configure only a single source port to be monitored. With the supervisor engine software release 4.5(1) and later, a single source port will be the standard Token Ring SPAN configuration.
You cannot monitor a VLAN to which none of the ports belong.
Examples
This example shows how to configure SPAN so that both the transmit traffic and receive traffic on the source port (1/1) is mirrored to the destination port (2/1), and how to verify SPAN configuration:
Console> (enable) set span 1/1 2/1Enabled monitoring of Port 1/1 transmit/receive traffic by Port 2/1Console> (enable) show spanStatus : enabledAdmin Source : Port 1/1Oper Source : Port 1/1Destination : Port 2/1Direction : transmit/receiveIncoming Packets: disabledConsole> (enable)This example shows how to set VLAN 522 as the SPAN source and port 2/1 as the SPAN destination:
Console> (enable) set span 522 2/1Enabled monitoring of VLAN 522 transmit/receive traffic by Port 2/1Console> (enable) show spanStatus : enabledAdmin Source : VLAN 522Oper Source : Port 3/1-2Destination : Port 2/1Direction : transmit/receiveIncoming Packets: disabledConsole> (enable)This example shows how to set VLAN 522 as the SPAN source and port 2/12 as the SPAN destination:
Console> (enable) set span 522 2/12 tx inpkts enableSPAN destination port incoming packets enabled.Enabled monitoring of VLAN 522 transmit traffic by Port 2/12Console> (enable) show spanStatus : enabledAdmin Source : VLAN 522Oper Source : Port 2/1-2Destination : Port 2/12Direction : transmitIncoming Packets: enabledConsole> (enable)This example shows how to enable learning on the SPAN source and port 1/1:
Console> (enable) set span 522 1/1 learning enableOverwrote Port 1/1 to monitor transmit/receive traffic of VLAN 522Incoming Packets disabled. Learning enabled. Multicast enabled.Console> (enable)This example shows how to disable learning on the SPAN source and port 1/1:
Console> (enable) set span 522 1/1 learning disableOverwrote Port 1/1 to monitor transmit/receive traffic of VLAN 522Incoming Packets disabled. Learning disabled. Multicast enabled.Console> (enable)Related Commands
set spantree backbonefast
Use the set spantree backbonefast command to enable or disable the spanning-tree Backbone Fast Convergence feature.
set spantree backbonefast {enable | disable}
Syntax Description
enable
Keyword that specifies to enable Backbone Fast Convergence.
disable
Keyword that specifies to disable Backbone Fast Convergence.
Defaults
The default configuration has Backbone Fast Convergence disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
Backbone Fast Convergence is not supported on Token Ring VLANs.
For Backbone Fast Convergence to work, you must enable it on all switches in the network.
Examples
This example shows how to enable Backbone Fast Convergence:
Console> (enable) set spantree backbonefast enableBackbonefast enabled for all VLANs.Console> (enable)Related Commands
set spantree disable
Use the set spantree disable command to disable the spanning-tree algorithm for all VLANs.
set spantree disable all
Syntax Description
Defaults
The default configuration has all spanning trees enabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
The all option is supported only on systems configured with a Supervisor Engine III, Supervisor Engine III FSX, or Supervisor Engine III FLX and an NFFC or NFFC II. You cannot enable or disable spanning tree on a per-VLAN basis.
Examples
This example shows how to disable the spanning-tree algorithm:
Console> (enable) set spantree disable al1VLAN 1 bridge spanning tree disabled.Console> (enable)Related Commands
set spantree enable
show spantreeset spantree enable
Use the set spantree enable command to enable the spanning-tree algorithm for a VLAN or all VLANs.
set spantree enable all
Syntax Description
Defaults
The default configuration has all spanning trees enabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
The all option is supported only on systems configured with a Supervisor Engine III, Supervisor Engine III FSX, or Supervisor Engine III FLX and an NFFC or NFFC II. You cannot enable or disable spanning tree on a per VLAN basis.
Examples
This example shows how to activate the spanning-tree algorithm 1:
Console> (enable) set spantree enable allVLAN 1 bridge spanning tree enabled.Console> (enable)Related Commands
set spantree disable
show spantreeset spantree fwddelay
Use the set spantree fwddelay command to set the bridge forward delay for a VLAN.
set spantree fwddelay delay [vlan]
Syntax Description
Defaults
The default configuration has the bridge forward delay set to 15 seconds for all VLANs.
Command Types
Switch command.
Command Modes
Privileged.
Examples
This example shows how to set the bridge forward delay for VLAN 100 to 16 seconds:
Console> (enable) set spantree fwddelay 16 100Spantree 100 forward delay set to 16 seconds.Console> (enable)Related Commands
set spantree hello
Use the set spantree hello command to set the bridge hello time for a VLAN.
set spantree hello interval [vlan]
Syntax Description
Defaults
The default configuration has the bridge hello time set to two seconds for all VLANs.
Command Types
Switch command.
Command Modes
Privileged.
Examples
This example shows how to set the spantree hello time for VLAN 100 to three seconds:
Console> (enable) set spantree hello 3 100Spantree 100 hello time set to 3 seconds.Console> (enable)Related Commands
set spantree maxage
Use the set spantree maxage command to set the bridge maximum aging time for a VLAN.
set spantree maxage agingtime [vlan]
Syntax Description
Defaults
The default configuration is 20 seconds for all VLANs.
Command Types
Switch command.
Command Modes
Privileged.
Examples
This example shows how to set the maximum aging time for VLAN 1000 to 25 seconds:
Console> (enable) set spantree maxage 25 1000Spantree 1000 max aging time set to 25 seconds.Console> (enable)Related Commands
set spantree multicast-address
Use the set spantree multicast-address command to specify the bridge functional address instead of the IEEE Spanning-Tree Protocol address when you configure a TrBRF to use the IEEE Spanning-Tree Protocol.
set spantree multicast-address trbrf_num {ieee | ibm}
Syntax Description
Defaults
The default configuration has IEEE.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches.
This command applies only to Token Ring modules and only to a TrBRF that runs IEEE Spanning-Tree Protocol.
Examples
The following example shows how to specify the bridge functional address to be used:
Console> (enable) set spantree multicast-address 1 ibmRelated Commands
set spantree portcost
Use the set spantree portcost command to set the path cost for a port or TrCRF.
set spantree portcost {mod_num/port_num | trcrf} cost
Syntax Description
Defaults
The default configuration is as follows:
10-Gbps module port cost = 2
1-Gbp module port cost = 4
622-Mbps module port cost = 6
155-Mbps module port cost = 14
100-Mbps module port cost = 19
45-Mbps module port cost = 39
16-Mbp module port cost = 80
10-Mbps module port cost = 100
4-Mbps module port cost = 250
10/100-Mbps module port cost = See "Usage Guidelines"
4/16-Mbps module port cost = See "Usage Guidelines"
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
The Spanning-Tree Protocol uses port path costs to determine which port to select as a forwarding port. You should assign lower numbers to ports attached to faster media (such as full duplex) and higher numbers to ports attached to slower media. The possible range is 0 to 65535.
For 10/100 and 4/16 modules, the default port cost is set automatically depending on the current speed of the port. For example, if a 10/100 port is working at 10 Mbps, the port cost is 100. If the port speed changes to 100 Mbps, the port cost adjusts automatically to 19.
The Catalyst 2948G and 2980G switches are fixed configuration switches. Ports are located on module 2 for the 2948G and on modules 2 and 3 for the 2980G; for this reason, if you enter 1/N for the module/port number, an error message is displayed.
Examples
The following example shows how to set the port cost for port 12 on module 2 to 19:
Console> (enable) set spantree portcost 2/12 19Spantree port 2/12 path cost set to 19.Console> (enable)Related Commands
set spantree portfast
Use the set spantree portfast command to allow a port that is connected to a single workstation or PC to start faster when it is connected.
set spantree portfast mod_num/port_num {enable | disable}
Syntax Description
Defaults
The default configuration has the port fast-start feature disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
The Catalyst 2948G and 2980G switches are fixed configuration switches. Ports are located on module 2 for the 2948G and on modules 2 and 3 for the 2980G; for this reason, if you enter 1/N for the module/port number, an error message is displayed.
When a port configured with the spantree portfast enable command is connected, the port immediately enters the spanning-tree forwarding state instead of going through the normal spanning-tree states such as listening and learning. Use this command on ports that are connected to a single workstation or PC only; do not use it on ports that are connected to networking devices such as hubs, routers, switches, bridges, or concentrators.
Examples
This example shows how to enable the spanning-tree port fast-start feature on port 2 on module 1:
Console> (enable) set spantree portfast 1/2 enableWarning: Spantree port fast start should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc. to a fast start port can cause temporary spanning tree loops. Use with caution.Spantree port 1/2 fast start enabled.Console> (enable)Related Commands
set spantree portfast bpdu-guard
Use the set spantree portfast bpdu-guard command to enable and disable BPDU Guard on the switch. You can prevent loops by moving a non-trunking port configured for PortFast into an ErrDisable state when a BPDU is received on that port.
set spantree portfast bpdu-guard {enable | disable}
Syntax Description
enable
Keyword that specifies to enable the spanning-tree PortFast BPDU-Guard.
disable
Keyword that specifies to disable the spanning-tree PortFast BPDU-Guard.
Defaults
The default configuration has PortFast BPDU-Guard disabled.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
The Catalyst 2948G and 2980G switches are fixed configuration switches. Ports are located on module 2 for the 2948G and on modules 2 and 3 for the 2980G; for this reason, if you enter 1/N for the module/port number, an error message is displayed.
When you enable PortFast BPU-Guard, a non-trunking PortFast-enabled port is moved into an ErrDisable state when a BPDU is received on that port. When PortFast BPDU Guard is disabled, a PortFast enabled non-trunking port will stay up when it receives BPDUs, which may cause spanning-tree loops.
Examples
This example shows how to enable the spanning-tree PortFast BPDU-Guard:
Console> (enable) set spantree portfast bpdu-guard enableSpantree portfast bpdu-guard enabled on this switch.Console> (enable)This example shows how to disable the spanning-tree PortFast BPDU-Guard:
Console> (enable) set spantree portfast bpdu-guard disableSpantree portfast bpdu-guard disabled on this switch.Console> (enable)Related Commands
set spantree portpri
Use the set spantree portpri command to set the bridge priority for a spanning-tree port or TrCRF.
set spantree portpri {mod_num/port_num | trcrf} [priority | trcrf_priority]
Syntax Description
Defaults
The default configuration has all ports with bridge priority set to 32.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
The Catalyst 2948G and 2980G switches are fixed configuration switches. Ports are located on module 2 for the 2948G and on modules 2 and 3 for the 2980G; for this reason, if you enter 1/N for the module/port number, an error message is displayed.
The specified bridge priority on an ATM port applies to all emulated LANs on that port.
Examples
This example shows how to set the priority of port 1 on module 4 to 63:
Console> (enable) set spantree portpri 4/1 63Bridge port 4/1 priority set to 63.Console> (enable)Related Commands
set spantree portstate
Use the set spantree portstate command to manually set the state of a TrCRF.
set spantree portstate trcrf {block | forward | auto} [trbrf]
Syntax Description
Defaults
There is no default configuration for this command.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This command is supported by the Catalyst 5000 family switches.
Use this command only to set the port state when the TrCRF is in SRT mode and the TrBRF is running the IBM Spanning-Tree Protocol, or the TrCRF is in SRB mode and the TrBRF is running the IEEE Spanning-Tree Protocol.
When you enable Spanning-Tree Protocol, every switch in the network goes through the blocking state and the transitory states of listening and learning at power up. If properly configured, the ports then stabilize to the forwarding or blocking state. However, with TrBRFs and TrCRFs, there are two exceptions to this rule that require you to manually set the state of the logical ports of a TrBRF:
•
The TrBRF is running the IBM Spanning-Tree Protocol, and the TrCRF is in SRT mode.
•
The TrBRF is running the IEEE Spanning-Tree Protocol, and the TrCRF is in SRB mode.
If either condition exists, use the set spantree portstate command to manually set the state of a TrCRF to blocked or forwarding mode or set the Spanning-Tree Protocol to determine the correct state automatically.
Examples
This example shows the manual setting of TrCRF 900 to a forwarding state:
Console> (enable) set spantree portstate 900 forwardreserve_nvram : requested by block = 0reserve_nvram : granted to block = 0release_nvram : releasing block = 0Console> (enable)Related Commands
show spantree
show spantree portstateset spantree portvlancost
Use the set spantree portvlancost command to assign a lower path cost to a set of VLANs on a port.
set spantree portvlancost mod_num/port_num [cost cost_value] [preferred_vlans]
Syntax Description
Defaults
The value specified is used as the path cost of the port for the specified set of VLANs. The rest of the VLANs have a path cost equal to the port path cost, set via the set spantree portcost command (if not set, the value is the default path cost of the port).
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
Follow these guidelines when you set the path cost for VLANs on a port:
•
The cost value specified is used as the path cost of the port for the specified set of VLANs. The rest of the VLANs have a path cost equal to the port path cost set through the set spantree portcost command. If not set, the value is the default path cost of the port.
•
You must supply a vlan_list argument when you first set the cost value. When you subsequently set a new cost value, all cost values previously set by entering this command are changed to the new cost value. If you have never explicitly set a cost value for a VLAN by entering this command, the cost value for the VLAN does not change.
•
If you do not explicitly specify a cost value but cost values were specified previously, the port VLAN cost is set to 1 less than the current port cost for a port. However, this reduction might not assure load balancing in all cases.
•
When setting the path cost for extended-range VLANs, you can create a maximum of 64 nondefault entries or create entries until NVRAM is full.
The Catalyst 2948G and 2980G switches are fixed configuration switches. Ports are located on module 2 for the 2948G and on modules 2 and 3 for the 2980G; for this reason, if you enter 1/N for the module/port number, an error message is displayed.
Examples
These examples show various ways to use the set spantree portvlancost command:
Console> (enable) set spantree portvlancost 2/10 cost 25 1-20Cannot set portvlancost to a higher value than the port cost, 10, for port 2/10.Console> (enable)Console> (enable) set spantree portvlancost 2/10 1-20Port 2/10 VLANs 1-20 have a path cost of 9.Console> (enable)Console> (enable) set spantree portvlancost 2/10 cost 4 1-20Port 2/10 VLANs 1-20 have path cost 4.Port 2/10 VLANs 21-1000 have path cost 10.Console> (enable)Console> (enable) set spantree portvlancost 2/10 cost 6 21Port 2/10 VLANs 1-21 have path cost 6.Port 2/10 VLANs 22-1000 have path cost 10.Console> (enable)These examples show how to use the set spantree portvlancost command without explicitly
specifying cost:Console> (enable) set spantree portvlancost 1/2Port 1/2 VLANs 1-1005 have path cost 3100.Console> (enable)Console> (enable) set spantree portvlancost 1/2 21Port 1/2 VLANs 1-20,22-1005 have path cost 3100.Port 1/2 VLANs 21 have path cost 3099.Console> (enable)Related Commands
show spantree
clear spantree portvlancostset spantree portvlanpri
Use the set spantree portvlanpri command to set the port priority for a subset of VLANs in the trunk port.
set spantree portvlanpri mod_num/port_num priority [vlans]
Syntax Description
Defaults
The default configuration has the port VLAN priority set to 0, with no VLANs specified.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
The Catalyst 2948G and 2980G switches are fixed configuration switches. Ports are located on module 2 for the 2948G and on modules 2 and 3 for the 2980G; for this reason, if you enter 1/N for the module/port number, an error message is displayed.
Use this command to add VLANs to a specified port priority level. Subsequent calls to this command do not replace VLANs that are already set at a specified port priority level.
This feature is not supported for the RSM.
The set spantree portvlanpri command applies only to trunk ports. Do not use Token Ring ports as trunk ports. If you enter this command, you see this message:
Port xx is not a trunk-capable portExamples
This example shows how to set the port priority for module 1, port 2, on VLANs 21 to 40:
Console> (enable) set spantree portvlanpri 1/2 16 21-40Port 1/2 vlans 3,6-20,41-1000 using portpri 32Port 1/2 vlans 1-2,4-5,21-40 using portpri 16Console> (enable)Related Commands
clear spantree portvlanpri
show spantreeset spantree priority
Use the set spantree priority command to set the bridge priority for a VLAN.
set spantree priority bridge_priority [vlan]
Syntax Description
Defaults
The default configuration has the bridge priority set to 32768.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
This feature is not supported for the RSM.
Examples
This example shows how to set the bridge priority of VLAN 1 to 4096:
Console> (enable) set spantree priority 4096VLAN 1 bridge priority set to 4096.Console> (enable)Related Commands
