Catalyst 6500 Series Command Reference, 6.3 and 6.4
set rgmp to set spantree portvlanpri

Table Of Contents

set rgmp

set rspan

set security acl adjacency

set security acl capture-ports

set security acl ip

set security acl ipx

set security acl log

set security acl mac

set security acl map

set snmp access

set snmp community

set snmp extendedrmon netflow

set snmp group

set snmp notify

set snmp rmon

set snmp rmonmemory

set snmp targetaddr

set snmp targetparams

set snmp trap

set snmp user

set snmp view

set span

set spantree backbonefast

set spantree bpdu-skewing

set spantree defaultcostmode

set spantree disable

set spantree enable

set spantree fwddelay

set spantree guard

set spantree hello

set spantree macreduction

set spantree maxage

set spantree mode

set spantree portcost

set spantree portfast

set spantree portfast bpdu-filter

set spantree portfast bpdu-guard

set spantree portinstancecost

set spantree portinstancepri

set spantree portpri

set spantree portvlancost

set spantree portvlanpri


set rgmp

Use the set rgmp command to enable or disable the RGMP feature on the switch.

set rgmp {enable | disable}

Syntax Description 

enable

Keyword to enable RGMP on the switch.

disable

Keyword to disable RGMP on the switch.


Defaults

The default is RGMP is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

The set rgmp command affects the entire switch. 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 enable
RGMP is enabled.
Console> (enable)

This example shows how to disable RGMP on the switch:

Console> (enable) set rgmp disable
RGMP is disabled.
Console> (enable)

Related Commands

show rgmp group
show rgmp statistics
clear rgmp statistics
set igmp

set rspan

Use the set rspan command set to create remote SPAN sessions.

set rspan disable source [rspan_vlan | all]

set rpsan disable destination [mod/port | all]

set rspan source {src_mod/src_ports... | vlans... | sc0} {rspan_vlan} [rx | tx | both]
[
multicast {enable | disable}] [filter vlans...] [create]

set rspan destination mod/port {rspan_vlan} [inpkts {enable | disable}]
[
learning {enable | disable}] [create]

Syntax Description

disable source

Keywords to disable remote SPAN source information.

rspan_vlan

(Optional) Remote SPAN VLAN.

all

(Optional) Keyword to disable all remote SPAN source or destination sessions.

disable destination

Keywords to disable remote SPAN destination information.

mod/port

(Optional) Remote SPAN destination port.

src_mod/src_ports...

Monitored ports (remote SPAN source).

vlans...

Monitored VLANs (remote SPAN source).

sc0

Keyword to specify the inband port is a valid source.

rx

(Optional) Keyword to specify that information received at the source (ingress SPAN) is monitored.

tx

(Optional) Keyword to specify that information transmitted from the source (egress SPAN) is monitored.

both

(Optional) Keyword to specify that information both transmitted from the source (ingress SPAN) and received (egress SPAN) at the source are monitored.

multicast enable

(Optional) Keywords to enable monitoring multicast traffic (egress traffic only).

multicast disable

(Optional) Keywords to disable monitoring multicast traffic (egress traffic only).

filter vlans

(Optional) Keywords to monitor traffic on selected VLANs on source trunk ports.

create

(Optional) Keyword to create a new remote SPAN session instead of overwriting the previous SPAN session.

inpkts enable

(Optional) Keywords to allow the remote SPAN destination port to receive normal ingress traffic (from the network to the bus) while forwarding the remote SPAN traffic.

inpkts disable

(Optional) Keywords to disable the receiving of normal inbound traffic on the remote SPAN destination port.

learning enable

(Optional) Keywords to enable learning for the remote SPAN destination port.

learning disable

(Optional) Keywords to disable learning for the remote SPAN destination port.


Defaults

The defaults are as follows:

Remote SPAN is disabled.

No VLAN filtering.

Monitoring multicast traffic is enabled.

Learning is enabled.

inpkts is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

The rspan_vlan variable is optional in the set rspan disable source command and required in the set rspan source and set rspan destination command set.

After you enable SPAN, system defaults are used if no parameters were ever set. If you changed parameters, these are stored in NVRAM, and the new parameters are used.

Use a network analyzer to monitor ports.

Use the inpkts keyword with the enable option to allow the remote SPAN destination port to receive normal incoming traffic in addition to the traffic mirrored from the remote SPAN source. Use the disable option to prevent the remote SPAN destination port from receiving normal incoming traffic.

You can specify an MSM port as the remote SPAN source port. However, you cannot specify an MSM port as the remote SPAN destination port.

When you enable the inpkts option, a warning message notifies you that the destination port does not join STP and may cause loops if this option is enabled.

If you do not specify the keyword create and you have only one session, the session will be overwritten. If a matching rspan_vlan or destination port exists, the particular session will be overwritten (with or without specifying create). If you specify the keyword create and there is no matching rspan_vlan or destination port, the session will be created.

Each switch can source only one remote SPAN session (ingress, egress, or both). When you configure a remote ingress or bidirectional SPAN session in a source switch, the limit for local ingress or bidirectional SPAN session is reduced to one. There are no limits on the number of remote SPAN sessions carried across the network within the remote SPAN session limits.

You can configure any VLAN as a remote SPAN VLAN as long as these conditions are met:

The same remote SPAN VLAN is used for a remote SPAN session in the switches.

All the participating switches have appropriate hardware and software.

No unwanted access port is configured in the remote SPAN VLAN.

Examples

This example shows how to disable all enabled source sessions:

Console> (enable) set rspan disable source all
This command will disable all remote span source session(s).
Do you want to continue (y/n) [n]? y
Disabled monitoring of all source(s) on the switch for remote span.
Console> (enable) 

This example shows how to disable one source session to a specific VLAN:

Console> (enable) set rspan disable source 903
Disabled monitoring of all source(s) on the switch for rspan_vlan 903.
Console> (enable) 

This example shows how to disable all enabled destination sessions:

Console> (enable) set rspan disable destination all
This command will disable all remote span destination session(s).
Do you want to continue (y/n) [n]? y
Disabled monitoring of remote span traffic on ports 9/1,9/2,9/3,9/4,9/5,9/6.
Console> (enable) 

This example shows how to disable one destination session to a specific port:

Console> (enable) set rspan disable destination 4/1
Disabled monitoring of remote span traffic on port 4/1.
Console> (enable) 

Related Commands

show rspan

set security acl adjacency

Use the set security acl adjacency command to set an entry for the adjacency table.

set security acl adjacency adjacency_name dest_vlan dest_mac [[source_mac] |
[
source_mac mtu mtu_size] | [mtu mtu_size]]

Syntax Description 

adjacency_name

Name of the adjacency table entry.

dest_vlan

Name of the destination VLAN.

dest_mac

Destination MAC address.

source_mac

(Optional) Source MAC address.

mtu mtu_size

(Optional) Keyword and variable to specify packet size in bytes.


Defaults

The default size for the MTU is 9600 bytes.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

The order of ACEs in a PBF VACL is important. The adjacency table entry has to be defined in the VACL before the redirect ACE because the redirect ACE uses it to redirect traffic. Refer to the Catalyst 6000 Family Software Configuration Guide for detailed information on configuring PBF VACLs.

You can set the MTU for cases in which jumbo frames are sent using PBF.

Examples

This example shows how to set an entry for the adjacency table:

Console> (enable) set security acl adjacency ADJ1 11 0-0-0-0-0-B 0-0-0-0-0-A
Console> (enable)

This example shows how to set an entry for the adjacency table with a specific MTU size:

Console> (enable) set security acl adjacency a_1 2 0-0a-0a-0a-0a-0a 9000
Console> (enable)

Related Commands

clear security acl
commit
show security aclo

set security acl capture-ports

Use the set security acl capture-ports command to set the ports (specified with the capture option in the set security acl ip, set security acl ipx, and set security acl mac commands) to show traffic captured on these ports.

set security acl capture-ports {mod/ports...}

Syntax Description

mod/ports...

Module and port number.


Defaults

This command has no default settings.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

Configurations you make by entering this command are saved in NVRAM. This command does not require that you enter the commit command.

The module and port specified in this command are added to the current ports configuration list.

This command works with Ethernet ports only; you cannot set ATM ports.

The ACL capture will not work unless the capture port is in the spanning tree forwarding state for the VLAN.

Examples

This example shows how to set a port to capture traffic:

Console> (enable) set security acl capture-ports 3/1
Successfully set 3/1 to capture ACL traffic.
Console> (enable) 

This example shows how to set multiple ports to capture traffic:

Console> (enable) set security acl capture-ports 1/1-10
Successfully set the following ports to capture ACL traffic: 1/1-2.
Console> (enable) 

Related Commands

clear security acl capture-ports
show security acl capture-ports

set security acl ip

Use the set security acl ip command set to create a new entry in a standard IP VACL and append the new entry at the end of the VACL.

set security acl ip {acl_name} {permit | deny} {src_ip_spec} [before editbuffer_index |
modify editbuffer_index] [log]

set security acl ip {acl_name} [permit | deny] arp

set security acl ip {acl_name} {permit | deny | redirect {adj_name | mod_num/port_num}} {protocol} {src_ip_spec} {dest_ip_spec} [precedence precedence] [tos tos] [fragment] [capture] [before editbuffer_index | modify editbuffer_index] [log]

set security acl ip {acl_name} {permit | deny | redirect {mod_num/port_num}} [ip]
{
src_ip_spec} {dest_ip_spec} [precedence precedence] [tos tos] [fragment] [capture]
[
before editbuffer_index | modify editbuffer_index] [log]

set security acl ip {acl_name} {permit | deny | redirect {mod_num/port_num}} [icmp | 1]
{
src_ip_spec} {dest_ip_spec} [icmp_type] [icmp_code] | [icmp_message]
[
precedence precedence] [tos tos] [fragment] [capture] [before editbuffer_index |
modify editbuffer_index] [log]

set security acl ip {acl_name} {permit | deny | redirect {mod_num/port_num}} [tcp | 6]
{
src_ip_spec} [operator port [port]] {dest_ip_spec} [operator port [port]] [established]
[
precedence precedence] [tos tos] [fragment] [capture] [before editbuffer_index |
modify editbuffer_index] [log]

set security acl ip {acl_name} {permit | deny | redirect {mod_num/port_num}} [udp | 17]
{
src_ip_spec} [operator port [port]] {dest_ip_spec} [operator port [port]]
[
precedence precedence] [tos tos] [fragment] [capture] [before editbuffer_index |
modify editbuffer_index] [log]

Syntax Description

acl_name

Unique name that identifies the lists to which the entry belongs.

permit

Keyword to allow traffic from the source IP address.

deny

Keyword to block traffic from the source IP address.

src_ip_spec

Source IP address and the source mask. See the "Usage Guidelines" section for the format.

before editbuffer_index

(Optional) Keyword and variable to insert the new ACE in front of another ACE.

modify editbuffer_index

(Optional) Keyword and variable to replace an ACE with the new ACE.

log

(Optional) Keyword to log denied packets.

arp

Keyword to specify ARP.

redirect

Keyword to specify to which switched ports the packet is redirected.

mod_num/port_num

Number of the module and port.

adj_name

Name of the adjacency table entry.

protocol

Keyword or number of an IP protocol; valid numbers are from 0 to 255 representing an IP protocol number. See the "Usage Guidelines" section for the list of valid keywords.

dest_ip_spec

Destination IP address and the destination mask. See the "Usage Guidelines" section for the format.

precedence precedence

(Optional) Keyword and variable to specify the precedence level; valid values are from 0 to 7 or by name. See the "Usage Guidelines" section for a list of valid names.

tos tos

(Optional) Keyword and variable to specify the type of service level; valid values are from 0 to 15 or by name. See the "Usage Guidelines" section for a list of valid names.

fragment

(Optional) Keyword to filter IP traffic that carries fragments.

capture

(Optional) Keyword to specify packets are switched normally and captured; permit must also be enabled.

ip

(Optional) Keyword to match any Internet Protocol packet.

icmp | 1

(Optional) Keyword or number to match ICMP packets.

icmp-type

(Optional) ICMP message type name or a number; valid values are from 0 to 255. See the "Usage Guidelines" section for a list of valid names.

icmp-code

(Optional) ICMP message code name or a number; valid values are from 0 to 255. See the "Usage Guidelines" section for a list of valid names.

icmp-message

(Optional) ICMP message type name or ICMP message type and code name. See the "Usage Guidelines" section for a list of valid names.

tcp | 6

(Optional) Keyword or number to match TCP packets.

operator

(Optional) Operands; valid values include lt (less than), gt (greater than), eq (equal), neq (not equal), and range (inclusive range).

port

(Optional) Number or name of a TCP or UDP port; valid port numbers are from 0 to 65535. See the "Usage Guidelines" section for a list of valid names.

established

(Optional) Keyword to specify an established connection; used only for TCP protocol.

udp | 17

(Optional) Keyword or number to match UDP packets.


Defaults

There are no default ACLs and no default ACL-VLAN mappings. By default, ARP is enabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

Configurations you make by entering this command are saved to NVRAM and hardware only after you enter the commit command. Enter ACEs in batches and then enter the commit command to save them in NVRAM and in the hardware.

The arp keyword is supported on switches configured with the Supervisor Engine 2 with Layer 3 Switching Engine II (PFC2). If you use the arp keyword, this is supported on a per-ACL basis only; either ARP is allowed or ARP is denied.

If you use the fragment keyword in an ACE, this ACE applies to nonfragmented traffic and to the fragment with offset equal to zero in a fragmented flow.

A fragmented ACE that permits Layer 4 traffic from host A to host B also permits fragmented traffic from host A to host B regardless of the Layer 4 port.

If you use the capture keyword, the ports that capture the traffic and transmit out are specified by entering the set security acl capture-ports command.

When you enter the ACL name, follow these naming conventions:

Maximum of 32 characters long and may include a-z, A-Z, 0-9, the dash character (-), the underscore character (_), and the period character (.)

Must start with an alpha character and must be unique across all ACLs of all types

Case sensitive

Cannot be a number

Must not be a keyword; keywords to avoid are all, default-action, map, help, and editbuffer

When you specify the source IP address and the source mask, use the form source_ip_address source_mask and follow these guidelines:

The source_mask is required; 0 indicates a care bit, 1 indicates a don't-care bit.

Use a 32-bit quantity in four-part dotted-decimal format.

Use the keyword any as an abbreviation for a source and source-wildcard of 0.0.0.0 255.255.255.255.

Use host source as an abbreviation for a source and source-wildcard of source 0.0.0.0.

When you enter a destination IP address and the destination mask, use the form destination_ip_address destination_mask. The destination mask is required.

Use a 32-bit quantity in a four-part dotted-decimal format.

Use the keyword any as an abbreviation for a source and source-wildcard of 0.0.0.0 255.255.255.255.

Use host/source as an abbreviation for a destination and destination-wildcard of destination 0.0.0.0.

The log keyword is an option of deny only. If you want to change an existing VACL configuration to deny with log, you must first clear the VACL and then set it again.

The log keyword is supported on systems configured with Supervisor Engine 2 with Layer 3 Switching Engine II (PFC2) only.

Valid names for precedence are critical, flash, flash-override, immediate, internet, network, priority, and routine.

Valid names for tos are max-reliability, max-throughput, min-delay, min-monetary-cost, and normal.

Valid protocol keywords include icmp (1), ip, ipinip (4), tcp (6), udp (17), igrp (9), eigrp (88), gre (47), nos (94), ospf (89), ahp (51), esp (50), pcp (108), and pim (103). The IP number is displayed in parentheses. Use the keyword ip to match any Internet Protocol.

ICMP packets that are matched by ICMP message type can also be matched by the ICMP message code.

Valid names for icmp_type and icmp_code are administratively-prohibited, alternate-address, conversion-error, dod-host-prohibited, dod-net-prohibited, echo, echo-reply, general-parameter-problem, host-isolated, host-precedence-unreachable, host-redirect, host-tos-redirect, host-tos-unreachable, host-unknown, host-unreachable, information-reply, information-request, mask-reply, mask-request, mobile-redirect, net-redirect, net-tos-redirect, net-tos-unreachable, net-unreachable, network-unknown, no-room-for-option, option-missing, packet-too-big, parameter-problem, port-unreachable, precedence-unreachable, protocol-unreachable, reassembly-timeout, redirect, router-advertisement, router-solicitation, source-quench, source-route-failed, time-exceeded, timestamp-reply, timestamp-request, traceroute, ttl-exceeded, and unreachable.

If the operator is positioned after the source and source-wildcard, it must match the source port. If the operator is positioned after the destination and destination-wildcard, it must match the destination port. The range operator requires two port numbers. All other operators require one port number.

TCP port names can be used only when filtering TCP. Valid names for TCP ports are bgp, chargen, daytime, discard, domain, echo, finger, ftp, ftp-data, gopher, hostname, irc, klogin, kshell, lpd, nntp, pop2, pop3, smtp, sunrpc, syslog, tacacs-ds, talk, telnet, time, uucp, whois, and www.

UDP port names can be used only when filtering UDP. Valid names for UDP ports are biff, bootpc, bootps, discard, dns, dnsix, echo, mobile-ip, nameserver, netbios-dgm, netbios-ns, ntp, rip, snmp, snmptrap, sunrpc, syslog, tacacs-ds, talk, tftp, time, who, and xdmcp.

The number listed with the protocol type is the layer protocol number (for example, udp | 17).

If no layer protocol number is entered, you can enter the following syntax:

set security acl ip {acl_name} {permit | deny} {src_ip_spec} [before editbuffer_index |
modify editbuffer_index]

If a Layer 4 protocol is specified, you can enter the following syntax:

set security acl ip {acl_name} {permit | deny | redirect mod_num/port_num} {protocol}
{
src_ip_spec} {dest_ip_spec} [precedence precedence] [tos tos] [capture]
[
before editbuffer_index | modify editbuffer_index]

For IP, you can enter the following syntax:

set security acl ip {acl_name} {permit | deny | redirect {mod_num/port_num}} [ip]
{
src_ip_spec} {dest_ip_spec} [precedence precedence] [tos tos] [capture]
[
before editbuffer_index | modify editbuffer_index]

For ICMP, you can enter the following syntax:

set security acl ip {acl_name} {permit | deny | redirect {mod_num/port_num}} [icmp | 1]
{
src_ip_spec} {dest_ip_spec} [icmp_type] [icmp_code] | [icmp_message]
[
precedence precedence] [tos tos] [capture] [before editbuffer_index |
modify editbuffer_index]

For TCP, you can use the following syntax:

set security acl ip {acl_name} {permit | deny | redirect {mod_num/port_num}} [tcp | 6]
{
src_ip_spec} [operator port [port]] {dest_ip_spec} [operator port [port]] [established]
[
precedence precedence] [tos tos] [capture] [before editbuffer_index |
modify editbuffer_index]

For UDP, you can use the following syntax:

set security acl ip {acl_name} {permit | deny | redirect {mod_num/port_num}} [udp | 17]
{src_ip_spec} [operator port [port]] {dest_ip_spec} [operator port [port]]
[precedence precedence] [tos tos] [capture] [before editbuffer_index |
modify editbuffer_index]

Examples

These examples show different ways to use the set security acl ip commands to configure IP security ACL:

Console> (enable) set security acl ip IPACL1 deny 1.2.3.4 0.0.0.0
IPACL1 editbuffer modified.  Use `commit' command to apply changes.
Console> (enable) 

Console> (enable) set security acl ip IPACL1 deny host 171.3.8.2 before 2 
IPACL1 editbuffer modified. Use `commit' command to apply changes.
Console> (enable)

Console> (enable) set security acl ip IPACL1 permit any any
IPACL1 editbuffer modified. Use `commit' command to apply changes.
Console> (enable) 

Console> (enable) set security acl ip IPACL1 redirect 3/1 ip 3.7.1.2 0.0.0.255 host 
255.255.255.255 precedence 1 tos min-delay
IPACL1 editbuffer modified. Use `commit' command to apply changes.
Console> (enable) 

Console> (enable) set security acl ip IPACL1 permit ip host 60.1.1.1 host 60.1.1.98 
capture 
IPACL1 editbuffer modified. Use 'commit' command to apply changes.

Related Commands

clear security acl
clear security acl capture-ports
clear security acl map
commit
show security acl
show security acl capture-ports
set security acl map
set security acl capture-ports

set security acl ipx

Use the set security acl ipx command to create a new entry in a standard IPX VACL and to append the new entry at the end of the VACL.

set security acl ipx {acl_name} {permit | deny | redirect mod_num/port_num} {protocol}
{
src_net} [dest_net.[dest_node] [[dest_net_mask.]dest_node_mask]] [capture]
[
before editbuffer_index | modify editbuffer_index]

Syntax Description

acl_name

Unique name that identifies the list to which the entry belongs.

permit

Keyword to allow traffic from the specified source IPX address.

deny

Keyword to block traffic from the specified source IPX address.

redirect

Keyword to redirect traffic from the specified source IPX address.

mod_num/port_num

Number of the module and port.

protocol

Keyword or number of an IPX protocol; valid values are from 0 to 255 representing an IPX protocol number. See the "Usage Guidelines" section for a list of valid keywords amd corresponding numbers.

src_net

Number of the network from which the packet is being sent. See the "Usage Guidelines" section for format guidelines.

dest_net.

(Optional) Number of the network from which the packet is being sent.

.dest_node

(Optional) Node on destination-network to which the packet is being sent.

dest_net_mask.

(Optional) Mask to be applied to the destination network. See the "Usage Guidelines" section for format guidelines.

dest_node_mask

(Optional) Mask to be applied to the destination-node. See the "Usage Guidelines" section for format guidelines.

capture

(Optional) Keyword to specify packets are switched normally and captured.

before editbuffer_index

(Optional) Keyword and variable to insert the new ACE in front of another ACE.

modify editbuffer_index

(Optional) Keyword and variable to replace an ACE with the new ACE.


Defaults

There are no default ACLs and no default ACL-VLAN mappings.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

Configurations you make by entering this command are saved to NVRAM and hardware only after you enter the commit command. Enter ACEs in batches and then enter the commit command to save all of them in NVRAM and in the hardware.

If you use the capture keyword, the ports that capture the traffic and transmit out are specified by entering the set security acl capture-ports command.

When you enter the ACL name, follow these naming conventions:

Maximum of 32 characters long and may include a-z, A-Z, 0-9, the dash character (-), the underscore character (_), and the period character (.)

Must start with an alpha character and must be unique across all ACLs of all types

Case sensitive

Cannot be a number

Must not be a keyword; keywords to avoid are all, default-action, map, help, and editbuffer

Valid protocol keywords include ncp (17), netbios (20), rip (1), sap (4), and spx (5).

The src_net and dest_net variables are eight-digit hexadecimal numbers that uniquely identify network cable segments. When you specify the src_net or dest_net, use the following guidelines:

It can be a number in the range 0 to FFFFFFFF. A network number of -1 or any matches all networks.

You do not need to specify leading zeros in the network number. For example, for the network number 000000AA, you can enter AA.

The .dest_node is a 48-bit value represented by a dotted triplet of 4-digit hexadecimal numbers (xxxx.xxxx.xxxx).

The dest_net_mask is an eight-digit hexadecimal mask. Place ones in the bit positions you want to mask. The mask must be immediately followed by a period, which must in turn be immediately followed by the destination-node-mask. You can enter this value only when dest_node is specified.

The dest_node_mask is a 48-bit value represented as a dotted triplet of 4-digit hexadecimal numbers (xxxx.xxxx.xxxx). Place ones in the bit positions you want to mask. You can enter this value only when dest_node is specified.

The dest_net_mask is an eight-digit hexadecimal number that uniquely identifies the network cable segment. It can be a number in the range 0 to FFFFFFFF. A network number of -1 or any matches all networks. You do not need to specify leading zeros in the network number. For example, for the network number 000000AA, you can enter AA. Following are dest_net_mask examples:

123A

123A.1.2.3

123A.1.2.3 ffff.ffff.ffff

1.2.3.4 ffff.ffff.ffff.ffff

Use the show security acl command to display the list.

Examples

This example shows how to block traffic from a specified source IPX address:

Console> (enable) set security acl ipx IPXACL1 deny 1.a
IPXACL1 editbuffer modified. Use `commit' command to apply changes.
Console> (enable)

This example shows how to deny traffic from hosts in specific subnet (10.1.2.0/8):

Console> (enable) set security acl ipx SERVER deny ip 10.1.2.0 0.0.0.255 host 10.1.1.100
IPXACL1 editbuffer modified. Use `commit' command to apply changes.
Console> (enable)

Related Commands

clear security acl
clear security acl capture-ports
clear security acl map
commit
show security acl
show security acl capture-ports
set security acl map
set security acl capture-ports

set security acl log

Use the set security acl log command set to configure the security ACL log table.

set security acl log maxflow max_number

set security acl log ratelimit pps

Syntax Description

maxflow max_number

Keyword and variable to specify the maximum flow pattern number in packets per second; valid values are from 256 to 2048.

ratelimit pps

Keyword and variable to specify the redirect rate in packets per second; valid values are from 500 to 5000.


Defaults

The default max_number is 500 pps and the default ratelimit is 2500 pps.

Command Types

Switch command.

Command Modes

Normal.

Usage Guidelines

The command is supported on systems configured with Supervisor Engine 2 with Layer 3 Switching Engine II (PFC2) only.

The set security acl log maxflow command tries to allocate a new log table based on the maximum flow pattern number to store logged packet information. If successful, the new buffer replaces the old one and all flows in the old table are cleared. If either memory is not enough or the maximum number is over the limit, an error message is displayed and the command is dropped.

The set security acl log ratelimit command tries to set the redirect rate in packets per second. If the configuration is over the range, the command is discarded and the range is displayed on the console.

Examples

This example shows how to set the maximum flow:

Console> (enable) set security acl log maxflow 322
Log table size set to 322 flow entries.
Console> (enable)  

This example shows how to set the rate limit:

Console> (enable) set security acl log ratelimit 3444
Max logging eligible packet rate set to 3444pps.
Console> (enable) 

Related Commands

clear security acl log flow
set security acl log
show security acl log

set security acl mac

Use the set security acl mac command to create a new entry in a non-IP or non-IPX protocol VACL and to append the new entry at the end of the VACL.

set security acl mac {acl_name} {permit | deny} {src_mac_addr_spec}
{
dest_mac_addr_spec} [ether-type] [capture] [before editbuffer_index |
modify editbuffer_index]

Syntax Description

acl_name

Unique name that identifies the list to which the entry belongs.

permit

Keyword to allow traffic from the specified source MAC address.

deny

Keyword to block traffic from the specified source MAC address.

src_mac_addr_spec

Source MAC address and mask in the form source_mac_address source_mac_address_mask.

dest_mac_addr_spec

Destination MAC address and mask.

ether-type

(Optional) Number or name that matches the ethertype for Ethernet-encapsulated packets; valid values are 0x0600, 0x0601, 0x0BAD, 0x0BAF, 0x6000-0x6009, 0x8038-0x8042, 0x809b, and 0x80f3. See the "Usage Guidelines" section for a list of valid names.

capture

(Optional) Keyword to specify packets are switched normally and captured.

before editbuffer_index

(Optional) Keyword and variable to insert the new ACE in front of another ACE.

modify editbuffer_index

(Optional) Keyword and variable to replace an ACE with the new ACE.


Defaults

There are no default ACLs and no default ACL-VLAN mappings.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

Configurations you make by entering this command are saved to NVRAM and hardware only after you enter the commit command. Enter ACEs in batches and then enter the commit command to save all of them in NVRAM and in the hardware.

If you use the capture keyword, the ports that capture the traffic and transmit out are specified by entering the set security acl capture-ports command.

When you enter the ACL name, follow these naming conventions:

Maximum of 32 characters long and may include a-z, A-Z, 0-9, the dash character (-), the underscore character (_), and the period character (.)

Must start with an alpha character and must be unique across all ACLs of all types

Case sensitive

Cannot be a number

Must not be a keyword; keywords to avoid are all, default-action, map, help, and editbuffer

The src_mac_addr_spec is a 48-bit source MAC address and mask and entered in the form of source_mac_address source_mac_address_mask (for example, 08-11-22-33-44-55 ff-ff-ff-ff-ff-ff). Place ones in the bit positions you want to mask. When you specify the src_mac_addr_spec, follow these guidelines:

The source_mask is required; 0 indicates a care bit, 1 indicates a don't-care bit.

Use a 32-bit quantity in four-part dotted-decimal format.

Use the keyword any as an abbreviation for a source and source-wildcard of 0.0.0.0 255.255.255.255.

Use host source as an abbreviation for a source and source-wildcard of source 0.0.0.0.

The dest_mac_spec is a 48-bit destination MAC address and mask and entered in the form of dest_mac_address dest_mac_address_mask (for example, 08-00-00-00-02-00/ff-ff-ff-00-00-00). Place ones in the bit positions you want to mask. The destination mask is mandatory. When you specify the dest_mac_spec, use the following guidelines:

Use a 48-bit quantity in 6-part dotted-hexadecimal format for a source address and mask.

Use the keyword any as an abbreviation for a source and source-wildcard of 0-0-0-0-0-0-0 ff-ff-ff-ff-ff-ff.

Use host source as an abbreviation for a destination and destination-wildcard of destination 0-0-0-0-0-0.

Valid names for ethertypes (and corresponding numbers) are Ethertalk (0x809B), AARP (0x8053), dec-mop-dump (0x6001), dec-mop-remote-console (0x6002), dec-phase-iv (0x6003), dec-lat (0x6004), dec-diagnostic-protocol (0x6005), dec-lavc-sca (0x6007), dec-amber (0x6008), dec-mumps (0x6009), dec-lanbridge (0x8038), dec-dsm (0x8039), dec-netbios (0x8040), dec-msdos (0x8041), banyan-vines-echo (0x0baf), xerox-ns-idp (0x0600), and xerox-address-translation (0x0601).

Use the show security acl command to display the list.

Examples

This example shows how to block traffic to an IP address:

Console> (enable) set security acl mac MACACL1 deny 01-02-02-03-04-05
MACACL1 editbuffer modified. User `commit' command to apply changes.
Console> (enable)

Related Commands

clear security acl
clear security acl capture-ports
clear security acl map
commit
show security acl
show security acl capture-ports
set security acl map
set security acl capture-ports

set security acl map

Use the set security acl map command to map an existing VACL to a VLAN.

set security acl map acl_name vlan

Syntax Description

acl_name

Unique name that identifies the list to which the entry belongs.

vlan

Number of the VLAN to be mapped to the VACL; valid values are from 1 to 1005 and from 1025 to 4094.


Defaults

There are no default ACLs and no default ACL-VLAN mappings.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

Configurations you make by entering this command are saved in NVRAM. This command does not require that you enter the commit command. Each VLAN can be mapped to only one ACL of each type (IP, IPX, and MAC). An ACL can be mapped to a VLAN only after you have committed the ACL.

When you enter the ACL name, follow these naming conventions:

Maximum of 32 characters long and may include a-z, A-Z, 0-9, the dash character (-), the underscore character (_), and the period character (.)

Must start with an alpha character and must be unique across all ACLs of all types

Case sensitive

Cannot be a number

Must not be a keyword; keywords to avoid are all, default-action, map, help, and editbuffer


Caution Use the copy command to save the ACL configuration to Flash memory.

Examples

This example shows how to map an existing VACL to a VLAN:

Console> (enable) set security acl map IPACL1 1
ACL IPACL1 mapped to vlan 1
Console> (enable)

This example shows the output if you try to map an ACL that has not been committed:

Console> (enable) set security acl map IPACL1 1
Commit ACL IPACL1 before mapping.
Console> (enable)

This example shows the output if you try to map an ACL that is already mapped to a VLAN for the ACL type (IP, IPX, or MAC):

Console> (enable) set security acl map IPACL2 1
Mapping for this type already exists for this VLAN.
Console> (enable)

Related Commands

clear security acl
clear security acl map
commit
show security acl

set snmp access

Use the set snmp access command set to define the access rights of an SNMP group.

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}] [context [-hex] contextname [exact | prefix]] [volatile | nonvolatile]

Syntax Description

-hex

(Optional) Keyword to display the groupname, readview, writeview, notifyview, and contextname in a hexadecimal format.

groupname

Name of the SNMP group.

security-model v1 | v2c

Keywords to specify security-model v1 or v2c.

read readview

(Optional) Keyword and variable to specify the name of the view that allows you to see the MIB objects.

write writeview

(Optional) Keyword and variable to specify the name of the view that allows you to configure the contents of the agent.

notify notifyview

(Optional) Keyword and variable to specify the name of the view that allows you to send a trap about MIB objects.

v3

Keyword to specify security model v3.

noauthentication

Keyword to specify security model is not set to use authentication protocol.

authentication

Keyword to specify the type of authentication protocol.

privacy

Keyword to specify the messages sent on behalf of the user are protected from disclosure.

volatile

(Optional) Keyword to specify that the storage type is defined as temporary memory and the content is deleted if the device is turned off.

nonvolatile

(Optional) Keyword to specify that the storage type is defined as persistent memory and the content remains after the device is turned off and on again.

context contextname

(Optional) Keyword and variable to specify the name of the context string and the way to match the context string; maximum of 32 characters.

exact

(Optional) Keyword to specify that an exact match between the contextname and the value of vacmAccessContextPrefix is required to select this entry.

prefix

(Optional) Keyword to specify that only a match between vacmAccessContextPrefix and the starting portion of contextname is required to select this entry.


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.

context contextname is a NULL string.

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).

For contextname, the string is treated as either a full context name or the prefix of a context name, depending on whether you enter the exact or prefix keyword. If you enter the prefix keyword, this allows you to enter a simple form of wildcarding. For example, if you enter a contextname of vlan, vlan-1 and vlan-100 will be selected.

If you do not enter a context name, a NULL context string is used.

Examples

This example shows how to set the SNMP access rights for a group:

Console> (enable) set snmp access cisco-group security-model v3 authentication
SNMP access group was set to cisco-group version v3 level authentication, readview 
internet, nonvolatile.
Console> (enable) 

Related Commands

clear snmp access
show snmp access
show snmp context

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

read-only

Keyword to assign read-only access to the specified SNMP community.

read-write

Keyword to assign read-write access to the specified SNMP community.

read-write-all

Keyword to assign read-write access to the specified SNMP community.

community_string

(Optional) Name of the SNMP community.


Defaults

The default is the following communities and access types are 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.

To support the access types, you also need to configure four MIB tables: vacmContextTable, vacmSecurityToGroupTable, vacmAccessTable, and vacmViewTreeFamilyTable. Use the clear config snmp command to reset these tables to the default values.

Examples

This example shows how to set read-write access to the SNMP community called yappledapple:

Console> (enable) set snmp community read-write yappledapple
SNMP read-write community string set to yappledapple.
Console> (enable)

This example shows how to clear the community string defined for read-only access:

Console> (enable) set snmp community read-only
SNMP read-only community string cleared.
Console> (enable)

Related Commands

clear config
clear snmp community
show snmp
show snmp community

set snmp extendedrmon netflow

Use the set snmp extendedrmon netflow command to enable or disable the SNMP extended RMON support for the NAM module.

set snmp extendedrmon netflow {enable | disable} {mod}

Syntax Description

enable

Keyword to enable the extended RMON support.

disable

Keyword to disable the extended RMON support.

mod

Module number of the extended RMON NAM.


Defaults

The default is SNMP-extended RMON NetFlow is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Examples

This example shows how to enable SNMP-extended RMON NetFlow support:

Console> (enable) set snmp extendedrmon netflow enable 2
Snmp extended RMON netflow enabled
Console> (enable) 

This example shows how to disable SNMP-extended RMON NetFlow support:

Console> (enable) set snmp extendedrmon netflow disable 2
Snmp extended RMON netflow disabled
Console> (enable) 

This example shows the response when the SNMP-extended RMON NetFlow feature is not supported:

Console> (enable) set snmp extendedrmon enable 4 
NAM card is not installed. 
Console> (enable) 

Related Commands

set snmp rmon
show snmp

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

-hex

(Optional) Keyword to display the groupname and username in a hexadecimal format.

groupname

Name of the SNMP group that defines an access control; the maximum length is 32 bytes.

user

Keyword to specify the SNMP group username.

username

Name of the SNMP user that belongs to the SNMP group; the maximum length is 32 bytes.

security-model v1 | v2c | v3

Keywords to specify security-model v1, v2c, or v3.

volatile

(Optional) Keyword to specify that the storage type is defined as temporary memory and the content is deleted if the device is turned off.

nonvolatile

(Optional) Keyword to specify that the storage type is defined as persistent memory and the content remains after the device is turned off and on again.


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 v3
SNMP group was set to cisco-group user joe and version v3,nonvolatile.
Console> (enable)

Related Commands

clear snmp group
show snmp group

set snmp notify

Use the set snmp notify command to set the notifyname entry in the snmpNotifyTable and the notifytag entry in the snmpTargetAddrTable.

set snmp notify [-hex] {notifyname} tag [-hex] {notifytag}
[
trap | inform] [volatile | nonvolatile]

Syntax Description

-hex

(Optional) Keyword to display the notifyname and notifytag in a hexadecimal format.

notifyname

Identifier to index the snmpNotifyTable.

tag

Keyword to specify the tag name in the taglist.

notifytag

Name of entries in the snmpTargetAddrTable.

trap

(Optional) Keyword to specify all messages that contain snmpv2-Trap PDUs.

inform

(Optional) Keyword to specify all messages that contain InfoRequest PDUs.

volatile

(Optional) Keyword to specify that the storage type is defined as temporary memory and the content is deleted if the device is turned off.

nonvolatile

(Optional) Keyword to specify that the storage type is defined as persistent memory and the content remains after the device is turned off and on again.


Defaults

The defaults are storage type is volatile and 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 inform
SNMP notify name was set to hello with tag world notifyType inform, and storageType 
nonvolatile.
Console> (enable)

Related Commands

clear snmp notify
show snmp notify

set snmp rmon

Use the set snmp rmon command to enable or disable SNMP RMON support.

set snmp rmon {enable | disable}

Syntax Description

enable

Keyword to activate SNMP RMON support.

disable

Keyword to deactivate SNMP RMON support.


Defaults

The default is RMON support is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

RMON statistics are collected on a segment basis.

The RMON feature deinstalls all of the domains for all of the interfaces on an Ethernet module that has been removed from the system.

When you enable RMON, the supported RMON groups for Ethernet ports are Statistics, History, Alarms, and Events as specified in 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 enable
SNMP RMON support enabled.
Console> (enable)

This example shows how to disable RMON support:

Console> (enable) set snmp rmon disable
SNMP RMON support disabled.
Console> (enable)

Related Commands

show port counters

set snmp rmonmemory

Use the set snmp rmonmemory command to set the memory usage limit in percentage.

set snmp rmonmemory percentage

Syntax Description

percentage

Memory usage limit; see the "Usage Guidelines" section for additional information.


Defaults

The default is 85 percent.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

When using this command, setting the percentage value to 85 does not mean that RMON can use 85 percent of memory, it means that you cannot create new RMON entries or restore entries from the NVRAM if the memory usage exceeds 85 percent.

If you expect the device to run other sessions such as Telnet, a lower value should be set to the memory limit. Otherwise, the new Telnet sessions may fail because the available memory is not enough.

Examples

This example shows how to set the memory usage limit:

Console> (enable) set snmp rmonmemory 90
Console> (enable) 

Related Commands

show snmp rmonmemory

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

-hex

(Optional) Keyword to display addrname, paramsname, tagvalue, and tag in a hexadecimal format.

addrname

Unique identifier to index the snmpTargetAddrTable; the maximum length is 32 bytes.

param

Keyword to specify an entry in the snmpTargetParamsTable that provides parameters to be used when generating a message to the target; the maximum length is 32 bytes.

paramsname

Entry in the snmpTargetParamsTable; the maximum length is 32 bytes.

ipaddr

IP address of the target.

udpport port

(Optional) Keyword and variable to specify which UDP port of the target host to use.

timeout value

(Optional) Keyword and variable to specify the number of timeouts.

retries value

(Optional) Keyword and variable to specify the number of retries.

volatile

(Optional) Keyword to specify that the storage type is defined as temporary memory and the content is deleted if the device is turned off.

nonvolatile

(Optional) Keyword to specify that the storage type is defined as persistent memory and the content remains after the device is turned off and on again.

taglist tag

(Optional) Keyword and variable to specify a tag name in the taglist.

tag tagvalue

(Optional) Keyword and variable to specify the tag name.


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 tag3
SNMP 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 targetaddr

set snmp targetparams

Use the set snmp targetparams command set 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

-hex

(Optional) Keyword to display the paramsname and username in a hexadecimal format.

paramsname

Name of the parameter in the snmpTargetParamsTable; the maximum length is 32 bytes.

user

Keyword to specify the SNMP group username.

username

Name of the SNMP user that belongs to the SNMP group; the maximum length is 32 bytes.

security-model
v1
| v2c

Keywords to specify security-model v1 or v2c.

message-processing
v1
| v2c | v3

Keywords to specify the version number used by the message processing model.

security-model v3

Keyword to specify security-model v3.

message-processing
v3

Keywords to specify v3 is used by the message-processing model.

noauthentication

Keyword to specify the security model is not set to use the authentication protocol.

authentication

Keyword to specify the type of authentication protocol.

privacy

Keyword to specify the messages sent on behalf of the user are protected from disclosure.

volatile

(Optional) Keyword to specify that the storage type is defined as temporary memory and the content is deleted if the device is turned off.

nonvolatile

(Optional) Keyword to specify that the storage type is defined as persistent memory and the content remains after the device is turned off and on again.


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 authentication
SNMP target params was set to bar v3 authentication, message-processing v3, user joe 
nonvolatile.
Console> (enable)

Related Commands

clear snmp targetparams
show snmp targetparams

set snmp trap

Use the set snmp trap command set 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 | auth | bridge | chassis | config | entity | entityfru |
envfan
| envpower | envshutdown | ippermit | module | stpx | syslog | system |
vmps | vtp]

set snmp trap rcvr_addr rcvr_community [port rcvr_port] [owner rcvr_owner] [index rcvr_index]

Syntax Description

enable

Keyword to enable SNMP traps.

disable

Keyword to disable SNMP traps.

all

(Optional) Keyword to specify all trap types and port traps. See the "Usage Guidelines" section before using this option.

auth

(Optional) Keyword to specify the authenticationFailure trap from RFC 1157.

bridge

(Optional) Keyword to specify the newRoot and topologyChange traps from RFC 1493 (the BRIDGE-MIB).

chassis

(Optional) Keyword to specify the chassisAlarmOn and chassisAlarmOff traps from the CISCO-STACK-MIB.

config

(Optional) Keyword to specify the sysConfigChange trap from the CISCO-STACK-MIB.

entity

(Optional) Keyword to specify the entityMIB trap from the ENTITY-MIB.

entityfru

(Optional) Keyword to specify the entity field replaceable unit (FRU).

envpower

(Optional) Keyword to specify the environmental power.

envshutdown

(Optional) Keyword to specify the environmental shutdown.

ippermit

(Optional) Keyword to specify the IP Permit Denied access from the CISCO-STACK-MIB.

module

(Optional) Keyword to specify the moduleUp and moduleDown traps from the CISCO-STACK-MIB.

stpx

(Optional) Keyword to specify the STPX trap.

syslog

(Optional) Keyword to specify the syslog notification traps.

system

(Optional) Keyword to specify the system.

vmps

(Optional) Keyword to specify the vmVmpsChange trap from the CISCO-VLAN-MEMBERSHIP-MIB.

vtp

(Optional) Keyword to specify the VTP from the CISCO-VTP-MIB.

rcvr_addr

IP address or IP alias of the system to receive SNMP traps.

rcvr_community

Community string to use when sending authentication traps.

port rcvr_port

(Optional) Keyword and variable to specify the UDP port and port number; valid values are from 0 to 65535.

owner rcvr_owner

(Optional) Keyword and variable to specify the user who configured the settings for the SNMP trap; the valid value is a character string from 1 to 21 characters in length.

index rcvr_index

(Optional) Keyword and variable variable to specify index entries with the same rcvr_addr; valid values are from 0 to 65535.


Defaults

The default is SNMP traps are 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 the appropriate traps were configured.

To use this command, you must configure all notification tables: snmpTargetAddrTable, snmpTargetParamsTable, and snmpNotifyTable.

Use the all option to enable or disable all trap types and port traps.

Use the set port trap command to enable or disable a single port or a range of ports.

The rcvr_index is required only when you want to enter another entry with the same rcvr_addr.

Examples

This example shows how to enable SNMP chassis traps:

Console> (enable) set snmp trap enable chassis
SNMP chassis alarm traps enabled.
Console> (enable) 

This example shows how to enable all traps:

Console> (enable) set snmp trap enable
All SNMP traps enabled.
Console> (enable) 

This example shows how to disable SNMP chassis traps:

Console> (enable) set snmp trap disable chassis
SNMP 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 public
SNMP trap receiver added.
Console> (enable) 

Related Commands

show snmp
test snmp trap
clear snmp trap
set port trap

set 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

-hex

(Optional) Keyword to display username in a hexadecimal format.

username

Name of the SNMP user.

remote engineid

Keyword and variable to specify the remote SNMP engine ID.

authentication

(Optional) Keyword to specify the authentication protocol.

md5

Keyword to specify HMAC-MD5-96 authentication protocol.

sha

Keyword to specify HMAC-SHA-96 authentication protocol.

authpassword

Password for authentication.

privacy privpassword

(Optional) Keyword and variable to enable the host to encrypt the contents of the message sent to or from the agent; the maximum length is 32 bytes.

volatile

(Optional) Keyword to specify that the storage type is defined as temporary memory and the content is deleted if the device is turned off.

nonvolatile

(Optional) Keyword to specify that the storage type is defined as persistent memory and the content remains after the device is turned off and on again.


Defaults

The default storage type is volatile. If you do not specify authentication, the security level default will be noauthentication. If you do not specify privacy, the default will be no privacy.

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.

Examples

This example shows how to set a specific username:

Console> (enable) set snmp user joe
Snmp 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 username, authentication, and authpassword:

Console> (enable) set snmp user John authentication md5 arizona2
Snmp user was set to John authProt md5 authPasswd arizona2. privProt no-priv wi.
Console> (enable)

Related Commands

clear snmp user
show snmp user

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

-hex

(Optional) Keyword to display the viewname in a hexadecimal format.

viewname

Name of a MIB view.

subtree

MIB subtree.

mask

(Optional) Keyword to specify that the bit mask is used with the subtree. A bit mask can be all ones, all zeros, or any combination; the maximum length is 3 bytes.

included | excluded

(Optional) Keywords to specify that the MIB subtree is included or excluded.

volatile

(Optional) Keyword to specify that the storage type is defined as temporary memory and the content is deleted if the device is turned off.

nonvolatile

(Optional) Keyword to specify that the storage type is defined as persistent memory and the content remains after the device is turned off and on again.


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 MIB 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 included
Snmp 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 excluded
Statistics is not a valid subtree OID
Control> (enable)

Related Commands

clear snmp view
show snmp view

set span

Use the set span command set 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_vlans | sc0} {dest_mod/dest_port} [rx | tx | both] [inpkts
{enable | disable}] [learning {enable | disable}] [multicast {enable | disable}]
[
filter vlans...] [create]

Syntax Description

disable

Keyword to disable SPAN.

dest_mod

(Optional) Monitoring module (SPAN destination).

dest_port

(Optional) Monitoring port (SPAN destination).

all

(Optional) Keyword to disable all SPAN sessions.

src_mod

Monitored module (SPAN source).

src_ports

Monitored ports (SPAN source).

src_vlans

Monitored VLANs (SPAN source).

sc0

Keyword to specify the inband port is a valid source.

rx

(Optional) Keyword to specify that information received at the source (ingress SPAN) is monitored.

tx

(Optional) Keyword to specify that information transmitted from the source (egress SPAN) is monitored.

both

(Optional) Keyword to specify that information both transmitted from the source (ingress SPAN) and received (egress SPAN) at the source are monitored.

inpkts enable

(Optional) Keywords to enable the receiving of normal inbound traffic on the SPAN destination port.

inpkts disable

(Optional) Keywords to disable the receiving of normal inbound traffic on the SPAN destination port.

learning enable

(Optional) Keywords to enable learning for the SPAN destination port.

learning disable

(Optional) Keywords to disable learning for the SPAN destination port.

multicast enable

(Optional) Keywords to enable monitoring multicast traffic (egress traffic only).

multicast disable

(Optional) Keywords to disable monitoring multicast traffic (egress traffic only).

filter vlans

(Optional) Keyword and variable to monitor traffic on selected VLANs on source trunk ports.

create

(Optional) Keyword to create a SPAN port.


Defaults

The default is SPAN is disabled, no VLAN filtering is enabled, multicast is enabled, input packets are disabled, and learning is enabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

After you enable SPAN, system defaults are used if no parameters were ever set. If you changed parameters, the old parameters are stored in NVRAM, and the new parameters are used.

Use a network analyzer to monitor ports.

If you specify multiple SPAN source ports, the ports can belong to different VLANs.

A maximum of two rx or both SPAN sessions and four tx SPAN sessions can exist simultaneously. If you use a remote SPAN station, the maximum number of rx or both SPAN sessions is one.

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.

You can specify an MSM port as the SPAN source port. However, you cannot specify an MSM port as the SPAN destination port.

When you enable the inpkts option, a warning message notifies you that the destination port does not join STP and may cause loops if this option is enabled.

When you configure multiple SPAN sessions, the destination module number/port number must be known to index the particular SPAN session.

If you do not specify the keyword create and you have only one session, the session will be overwritten. If a matching destination port exists, the particular session will be overwritten (with or without specifying create). If you specify the keyword create and there is no matching destination port, the session will be created.

Examples

This example shows how to configure SPAN so that both transmit and receive traffic from port 1/1 (the SPAN source) is mirrored on port 2/1 (the SPAN destination):

Console> (enable) set span 1/1 2/1
Enabled monitoring of Port 1/1 transmit/receive traffic by Port 2/1
Console> (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/1
Enabled monitoring of VLAN 522 transmit/receive traffic by Port 2/1
Console> (enable) 

This example shows how to set VLAN 522 as the SPAN source and port 3/12 as the SPAN destination. Only transmit traffic is monitored. Normal incoming packets on the SPAN destination port are allowed:

Console> (enable) set span 522 2/12 tx inpkts enable
SPAN destination port incoming packets enabled.
Enabled monitoring of VLAN 522 transmit traffic by Port 2/12
Console> (enable) 

This example shows how to set port 3/2 as the SPAN source and port 2/2 as the SPAN destination:

Console> (enable) set span 3/2 2/2 tx create
Enabled monitoring of port 3/2 transmit traffic by Port 2/1
Console> (enable)

This example shows how to disable SPAN if multiple SPAN sessions are not defined:

Console> (enable) set span disable
This command WILL disable your span session(s). 
Do you want to continue (y/n) [n]?y 
Disabled all sessions 
Console> (enable) 

This example shows what happens if you try to enter the set span disable command (without the destination module number/port number defined) and multiple SPAN sessions are defined:

Console> (enable) set span disable
Multiple active span sessions. Please specify span destination to disable.
Console> (enable) 

Related Commands

clear config
show span

set spantree backbonefast

Use the set spantree backbonefast command to enable or disable the spanning tree BackboneFast Convergence feature.

set spantree backbonefast {enable | disable}

Syntax Description

enable

Keyword to enable BackboneFast Convergence.

disable

Keyword to disable BackboneFast Convergence.


Defaults

The default is BackboneFast convergence is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

For BackboneFast Convergence to work, you must enable it on all switches in the network.

When you try to enable BackboneFast and the switch is in MISTP or MISTP-PVST+ mode, this message displays:

Cannot enable backbonefast when the spantree mode is MISTP-PVST+.

Examples

This example shows how to enable BackboneFast Convergence:

Console> (enable) set spantree backbonefast enable
Backbonefast enabled for all VLANs.
Console> (enable) 

Related Commands

show spantree

set spantree bpdu-skewing

Use the set spantree bpdu-skewing command to enable or disable collection of the spanning tree BPDU skewing detection statistics.

set spantree bpdu-skewing {enable | disable}

Syntax Description

enable

Keyword to enable BPDU skewing detection statistics collection.

disable

Keyword to disable BPDU skewing detection statistics collection.


Defaults

The default is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

You can use this command to troubleshoot slow network convergence due to skewing. Skewing occurs when spanning tree timers lapse, expected BPDUs are not received, and spanning tree detects topology changes. The difference between the expected result and the BPDUs actually received is a "skew." The skew causes BPDUs to reflood the network to keep the spanning tree topology database up to date.

Examples

This example shows how to enable the BPDU skew detection feature:

Console> (enable) set spantree bpdu-skewing enable
Spantree bpdu-skewing enabled on this switch. 
Console> (enable) 

This example shows how to disable the BPDU skew detection feature:

Console> (enable) set spantree bpdu-skewing disable
Spantree bpdu-skewing disabled on this switch. 
Console> (enable) 

Related Commands

show spantree bpdu-skewing

set spantree defaultcostmode

Use the set spantree defaultcostmode command to specify the spanning tree default port cost mode.

set spantree defaultcostmode {short | long}

Syntax Description

short

Keyword to set the default port cost for port speeds slower than 10 Gb.

long

Keyword to set the default port cost mode port speeds of 10 Gb and faster.


Defaults

The default is short.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

The set spantree defaultcostmode long command is available in PVST+ mode only. If you enter this command in MISTP or MISTP-PVST+ mode, this message displays:

In MISTP or MISTP-PVST+ mode, default portcost and portinstancecost always
use long format default values.

All switches in a network must have the same default. If any switch in the network supports port speeds of 10 Gb and greater, the default cost mode must be set to long on all the switches in the network.

For port speeds of 1 Gb and greater, the default port cost should be set to long. For port speeds less than 10 Gb, the default port cost can be set to short.

The default path cost is based on port speed; see Table 2-21 and Table 2-22 for default settings.

Table 2-21 Default Port Cost—Short Mode

Port Speed
Default Port Cost

4 Mb

250

10 Mb

100

16 Mb

62

100 Mb

19

155 Mb

14

1 Gb

4

10 Gb

2


Table 2-22 Default Port Cost—Long Mode

Port Speed
Default Port Cost

100 Kb

200,000,000

1 Mb

20,000,000

10 Mb

2,000,000

100 Mb

200,000

1 Gb

20,000

10 Gb

2,000

100 Gb

200

1 Tb

20

10 Tb

2


Examples

This example shows how to set the spanning tree default port cost mode:

Console> (enable) set spantree defaultcostmode long
Portcost and portvlancost set to use long format default values.
Console> (enable) 

Related Commands

show spantree defaultcostmode

set spantree disable

Use the set spantree disable command set to disable the spanning tree algorithm for all VLANs or a specific VLAN or disable spanning tree instance.

set spantree disable vlan

set spantree disable all

set spantree disable mistp-instance instance

set spantree disable mistp-instance all

Syntax Description

vlan

Number of the VLAN; valid values are from 1 to 1005 and from 1025 to 4094.

all

Keyword to specify all VLANs.

mistp-instance instance

Keyword and variable to specify the instance number; valid values are from 1 to 16.

mistp-instance all

Keywords to delete all instances.


Defaults

The default is spanning tree is enabled, and all instances are enabled (flooding disabled).

Command Types

Switch command.

Command Modes

Privileged.

If you do not specify a VLAN number or an instance number, 1 is assumed.

When an instance is enabled, the Spanning Tree Protocol starts running on that instance.

When an instance is disabled, the switch stops sending out config TLVs for that instance and starts flooding incoming TLVs for the same instance (but checks the VLAN mapping on the incoming side). All the traffic running on the VLANs mapped to the instance is flooded as well.

Examples

This example shows how to disable the spanning tree for VLAN 1:

Console> (enable) set spantree disable 1
VLAN 1 bridge spanning tree disabled.
Console> (enable) 

This example shows how to disable spanning tree for a specific instance:

Console> (enable) set spantree disable mistp-instance 2
MI-STP instance 2 disabled.
Console> (enable) 

Related Commands

set spantree enable
show spantree

set spantree enable

Use the set spantree enable command set to enable the spanning tree algorithm for all VLANs, a specific VLAN, a specific instance, or all instances.

set spantree enable vlans

set spantree enable all

set spantree enable mistp-instance instance

set spantree enable mistp-instance all

Syntax Description

vlans

Number of the VLAN; valid values are from 1 to 1005 and from 1025 to 4094.

all

Keyword to specify all VLANs.

mistp-instance instance

Keyword and variable to specify the instance number; valid values are from 1 to 16.

mistp-instance all

Keywords to enable all instances.


Defaults

The default is enabled, and all instances are enabled (flooding disabled).

Command Types

Switch command.

Command Modes

Privileged.

MISTP and VTP pruning cannot be enabled at the same time.

If you do not specify a VLAN number or an instance number, 1 is assumed.

Examples

This example shows how to activate spanning tree for VLAN 1:

Console> (enable) set spantree enable 1
VLAN 1 bridge spanning tree enabled.
Console> (enable) 

This example shows how to activate spanning tree for an instance:

Console> (enable) set spantree enable mistp-instance 1
-STP instance 1 enabled.
Console> (enable) 

Related Commands

set spantree disable
show spantree

set spantree fwddelay

Use the set spantree fwddelay command to set the bridge forward delay for a VLAN or an instance.

set spantree fwddelay delay [vlans]

set spantree fwddelay delay mistp-instance [instances]

Syntax Description

delay

Number of seconds for the bridge forward delay; valid values are from 4 to 30 seconds.

vlans

(Optional) Number of the VLAN; valid values are from 1 to 1005 and from 1025 to 4094.

mistp-instance instances

Keyword and optional variable to specify the instance number; valid values are from 1 to 16.


Defaults

The default is the bridge forward delay is set to 15 seconds for all VLANs.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

If you do not specify a VLAN number or an instance number, 1 is assumed.

If you enable MISTP, you cannot set the VLAN bridge forward delay.

If you enable PVST+, you cannot set the instance bridge forward delay.

Examples

This example shows how to set the bridge forward delay for VLAN 100 to 16 seconds:

Console> (enable) set spantree fwddelay 16 100
Spantree 100 forward delay set to 16 seconds.
Console> (enable)

This example shows how to set the bridge forward delay for an instance to 16 seconds:

Console> (enable) set spantree fwddelay 16 mistp-instance 1
Instance 1 forward delay set to 16 seconds.
Console> (enable)

Related Commands

show spantree

set spantree guard

Use the set spantree guard command to enable or disable the spanning tree root guard or loop guard feature on a per-port basis.

set spantree guard {none | root | loop} mod/port

Syntax Description

none

Keyword to disable the spanning tree guard feature.

root

Keyword to enable the root guard feature.

loop

Keyword to enable the loop guard feature.

mod/port

Number of the module and ports on the module.


Defaults

The default is root guard and loop guard are disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

If you enable loop guard on a channel and the first link becomes unidirectional, loop guard will block the entire channel until the affected port is removed from the channel.

You may want to prevent switches from becoming the root switch. The root guard feature forces a port to become a designated port so that no switch on the other end of the link can become a root switch.

When you enable root guard, it is automatically applied to all of the active instances or VLANs to which that port belongs. When you disable root guard, it is disabled for the specified port(s). If a port goes into the root-inconsistent state, it automatically goes into the listening state.

Use care when enabling loop guard. Loop guard is useful only in those topologies where there are blocked ports. Topologies where there are no blocked ports are loop free by definition and do not need this feature to be enabled.

Loop guard should be enabled only on root and alternate root ports.

Loop guard should be used mainly on access switches.

When you enable loop guard, it is automatically applied to all of the active instances or VLANs to which that port belongs. When you disable loop guard, it is disabled for the specified port(s). Disabling loop guard moves all loop-inconsistent ports to the listening state.

You cannot enable loop guard on PortFast-enabled or dynamic VLAN ports.

You cannot enable PortFast on loop guard-enabled ports.

You cannot enable loop guard if root guard is enabled.

Examples

This example shows how to enable root guard:

Console> (enable) set spantree guard root 5/1
Rootguard on port 5/1 is enabled.
Warning!! Enabling rootguard may result in a topolopy change.
Console> (enable)

This example shows how to enable the loop guard feature:

Console> (enable) set spantree guard loop 5/1
Rootguard is enabled on port 5/1, enabling loopguard will disable rootguard on
 this port.
Do you want to continue (y/n) [n]? y
Loopguard on port 5/1 is enabled.
Console> (enable)

Related Commands

show spantree guard

set spantree hello

Use the set spantree hello command set to set the bridge hello time for a VLAN or an instance.

set spantree hello interval [vlans]

set spantree hello interval mistp-instance instances

Syntax Description

interval

Number of seconds the system waits before sending a bridge hello message (a multicast message indicating that the system is active); valid values are from 1 to 10 seconds.

vlans

(Optional) Number of the VLAN; valid values are from 1 to 1005 and from 1025 to 4094.

mistp-instance instances

Keyword and variable to specify the instance number; valid values are from 1 to 16.


Defaults

The default is the bridge hello time is set to 2 seconds for all VLANs.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

If you do not specify a VLAN number or an instance number, 1 is assumed.

If you enable MISTP, you cannot set the VLAN hello time.

If you enable PVST+, you cannot set the instance hello time.

Examples

This example shows how to set the spantree hello time for VLAN 100 to 3 seconds:

Console> (enable) set spantree hello 3 100
Spantree 100 hello time set to 3 seconds.
Console> (enable)

This example shows how to set the spantree hello time for an instance to 3 seconds:

Console> (enable) set spantree hello 3 mistp-instance 1
Spantree 1 hello time set to 3 seconds.
Console> (enable)

Related Commands

show spantree

set spantree macreduction

Use the set spantree macreduction command to enable or disable the spanning tree MAC address reduction feature.

set spantree macreduction enable | disable

Syntax Description

enable

Keyword to enable MAC address reduction.

disable

Keyword to disable MAC address reduction.


Defaults

The default is MAC address reduction is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

The MAC address reduction feature is used to enable extended-range VLAN identification and allows the switch to support a large number of spanning tree instances with a very limited number of MAC addresses and still maintain the IEEE 802.1D bridge-ID requirement for each STP instance.

You cannot disable this feature if extended-range VLANs exist.

You cannot disable this feature on chassis with 64 MAC addresses.

Examples

This example shows how to disable the MAC address reduction feature:

Console> (enable) set spantree macreduction disable
MAC address reduction disabled
Console> (enable)

Related Commands

show spantree


set spantree maxage

Use the set spantree maxage command set to set the bridge maximum aging time for a VLAN or an instance.

set spantree maxage agingtime [vlans]

set spantree maxage agingtime mistp-instance instances

Syntax Description

agingtime

Maximum number of seconds that the system retains the information received from other bridges through Spanning Tree Protocol; valid values are from 6 to 40 seconds.

vlans

(Optional) Number of the VLAN; valid values are from 1 to 1005 and from 1025 to 4094.

mistp-instance instances

Keyword and variable to specify the instance number; valid values are from 1 to 16.


Defaults

The default configuration is 20 seconds for all VLANs.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

If you do not specify a VLAN number or an instance number, 1 is assumed.

If you enable MISTP, you cannot set the VLAN maximum aging time.

If you enable PVST+, you cannot set the instance maximum aging time.

Examples

This example shows how to set the maximum aging time for VLAN 1000 to 25 seconds:

Console> (enable) set spantree maxage 25 1000
Spantree 1000 max aging time set to 25 seconds.
Console> (enable)

This example shows how to set the maximum aging time for an instance to 25 seconds:

Console> (enable) set spantree maxage 25 mistp-instance 1
Instance 1 max aging time set to 25 seconds.
Console> (enable)

Related Commands

show spantree

set spantree mode

Use the set spantree mode command to configure the type of Spanning Tree Protocol mode to run.

set spantree mode {mistp | pvst+ | mistp-pvst+}

Syntax Description

mistp

Keyword to specify MISTP mode.

pvst+

Keyword to specify PVST+ mode.

mistp-pvst+

Keywords to allow the switch running MISTP to tunnel BPDUs with remote switches running PVST+.


Defaults

The default is PVST+.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

When you connect through Telnet into a switch and try to change the spanning tree mode from PVST+ to MISTP or MISTP-PVST+, and no VLANs are mapped to any instance on that switch, this warning message displays:

Console> (enable) set spantree mode mistp
Warning!! Changing the STP mode from a telnet session will disconnect the
session because there are no VLANs mapped to any MISTP instance.
Do you want to continue [n]?

When you connect through Telnet into a switch and try to change the spanning tree mode from MISTP or MISTP-PVST+ to PVST+, or when you connect through Telnet into a switch and try to change the spanning tree mode from PVST+ to MISTP or MISTP-PVST+ and additional VLAN-instance mappings are on that switch, this warning message displays:

Console> (enable) set spantree mode pvst+
Warning!! Changing the STP mode from a telnet session might disconnect the
session.
Do you want to continue [n]?

When you change from MISTP to PVST+ and over 8000 VLAN ports are currently configured on the switch, this warning message displays:

Console> (enable) set spantree mode pvst+
Warning!! This switch has 12345 VLAN-ports currently configured for STP.
Going out of MISTP mode could impact system performance.
Do you want to continue [n]?

If you change the spanning tree mode from PVST+ to MISTP or MISTP to PVST+, the STP mode previously running stops, all the information collected at runtime is used to build the port database for the new mode, and the new STP mode restarts the computation of the active topology from zero. All the parameters of the previous STP per VLAN or per instance are kept in NVRAM.

If you change the spanning tree mode from PVST+ to MISTP or MISTP to PVST+ and BackboneFast is enabled, this message displays:

Console> (enable) set spantree mode mistp
Cannot change the spantree mode to MISTP when backbonefast is enabled.

Examples

This example shows how to set the spanning tree mode to PVST+:

Console> (enable) set spantree mode pvst+
Warning!! Changing the STP mode from a telnet session might disconnect the session.
Do you want to continue [n]? y
Spantree mode set to PVST+.
Console> (enable)

This example shows what happens if you change the spanning tree mode from PVST+ to MISTP:

Console> (enable) set spantree mode mistp
Warning!! Changing the STP mode from a telnet session will disconnect the session because 
there are no VLANs mapped to any MISTP instance.
Do you want to continue [n]? y
Console> (enable)

Related Commands

set vlan
show spantree

set spantree portcost

Use the set spantree portcost command to set the path cost for a port.

set spantree portcost mod/port cost

Syntax Description

mod/port

Number of the module and the port on the module.

cost

Number of the path cost; see the "Usage Guidelines" section for additional information.


Defaults

The default path cost is based on port speed; see Table 2-23 and Table 2-24 for default settings.

Table 2-23 Default Port Cost—Short Mode

Port Speed
Default Port Cost

4 Mb

250

10 Mb

100

16 Mb

62

100 Mb

19

155 Mb

14

1 Gb

4

10 Gb

2


Table 2-24 Default Port Cost—Long Mode

Port Speed
Default Port Cost

100 Kb

200,000,000

1 Mb

20,000,000

10 Mb

2,000,000

10 Mb

200,000

1 Gb

20,000

10 Gb

2,000

100 Gb

200

1 Tb

20

10 Tb

2


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.

Examples

This example shows how to set the port cost for port 12 on module 2 to 19:

Console> (enable) set spantree portcost 2/12 19
Spantree port 2/12 path cost set to 19.
Console> (enable) 

Related Commands

set spantree defaultcostmode
show spantree

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/port {enable | disable}

Syntax Description

mod/port

Number of the module and the port on the module.

enable

Keyword to enable the spanning tree PortFast-start feature on the port.

disable

Keyword to disable the spanning tree PortFast-start feature on the port.


Defaults

The default is the PortFast-start feature is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

When a port configured with the spantree portfast enable command is connected, the port immediately enters the spanning tree forwarding state rather than 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 PortFast-start feature on port 2 on module 1:

Console> (enable) set spantree portfast 1/2 enable

Warning: 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

show spantree portfast

set spantree portfast bpdu-filter

Use the set spantree portfast bpdu-filter command to enable or disable BPDU packet filtering on the switch.

set spantree portfast bpdu-filter {enable | disable}

Syntax Description

enable

Keyword to enable BPDU packet filtering.

disable

Keyword to disable BPDU packet filtering.


Defaults

The default is BPDU packet filtering is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

BPDU packet filtering turns off BPDU transmission on PortFast-enabled ports and nontrunking ports.

Examples

This example shows how to enable the BPDU packet filtering:

Console> (enable) set spantree portfast bpdu-filter enable
Spantree portfast bpdu-filter enabled on this switch.
Console> (enable) 

This example shows how to disable the BPDU packet filtering:

Console> (enable) set spantree portfast bpdu-filter disable
Spantree portfast bpdu-filter disabled on this switch.
Console> (enable) 

Related Commands

show spantree portfast

set spantree portfast bpdu-guard

Use the set spantree portfast bpdu-guard command to enable or disable spanning tree PortFast BPDU guard on the switch.

set spantree portfast bpdu-guard {enable | disable}

Syntax Description

enable

Keyword to enable the spanning tree PortFast BPDU guard.

disable

Keyword to disable the spanning tree PortFast BPDU guard.


Defaults

The default is PortFast BPDU guard is disabled.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

You must enable PortFast mode before you can enable PortFast BPDU guard for BPDU guard to work correctly.

When you enable PortFast BPDU guard, a nontrunking PortFast-enabled port is moved into an errdisable state when a BPDU is received on that port. When you disable a PortFast BPDU guard, a PortFast-enabled nontrunking 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 enable
Spantree 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 disable
Spantree portfast bpdu-guard disabled on this switch.
Console> (enable) 

Related Commands

show spantree portfast

set spantree portinstancecost

Use the set spantree portinstancecost command to assign the path cost of the port for the specified instances.

set spantree portinstancecost mod/port [cost cost] [instances]

Syntax Description

mod/port

Number of the module and the port on the module.

cost cost

(Optional) Keyword and variable to indicate the path cost; see the "Usage Guidelines" section for additional information.

instances

(Optional) Instance number; valid values are from 1 to 16.


Defaults

The default path cost is based on port speed; see Table 2-25 for default settings.

Table 2-25 Default Port Cost—Short Mode

Port Speed
Default Port Cost

4 Mb

250

10 Mb

100

16 Mb

62

100 Mb

19

155 Mb

14

1 Gb

4

10 Gb

2


Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

The portinstancecost applies to trunk ports only.

The value specified is used as the path cost of the port for the specified instances. The rest of the instances have a path cost equal to the port path cost set through the set spantree instancecost command (if not set, the value is the default path cost of the port).

Examples

These examples show how to use the set spantree portinstancecost command and explicitly specify the path cost of a port:

Console> (enable) set spantree portinstancecost 2/10 cost 6 1-10
Port 2/10 instances 11-16 have path cost 2000000.
Port 2/10 instances 1-10 have path cost 6.
This parameter applies to trunking ports only.
Console> (enable)

These examples show how to use the set spantree portinstancecost command without explicitly specifying the path cost of a port:

Console> (enable) set spantree portinstancecost 1/2
Port 1/2 Instances 1-1005 have path cost 3100.
Console> (enable)

Console> (enable) set spantree portinstancecost 1/2 16
Port 1/2 Instances 16,22-1005 have path cost 3100.
Console> (enable) 

This example shows the display if you enter the command when PVST+ is enabled:

Console> (enable) set spantree portinstancecost 3/1
This command is only valid when STP is in MISTP or MISTP-PVST+ mode.
Console> (enable)

Related Commands

clear spantree portinstancecost
show spantree mistp-instance

set spantree portinstancepri

Use the set spantree portinstancepri command to set the port priority for instances in the trunk port.

set spantree portinstancepri mod/port priority [instances]

Syntax Description

mod/port

Number of the module and the port on the module.

priority

Number that represents the cost of a link in a spanning tree bridge. The priority level is from 0 to 63, with 0 indicating high priority and 63 indicating low priority.

instances

(Optional) Instance number; valid values are from 1 to 16.


Defaults

The default is the port priority is set to 0, with no instances specified.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

Use this command to add instances to a specified port priority level. Subsequent calls to this command do not replace instances that are already set at a specified port priority level.

This feature is not supported for the MSM.

The set spantree portinstancepri command applies to trunk ports only. If you enter this command, you see this message:

Port xx is not a trunk-capable port

Examples

This example shows how to set the port priority for module 1, port 2, on specific instances:

Console> (enable) set spantree portinstancepri 1/2 16 1-11
Port 1/2 instances 1-11 using portpri 16.
This parameter applies to trunking ports only.
Console> (enable)

Related Commands

clear spantree portinstancecost
show spantree mistp-instance

set spantree portpri

Use the set spantree portpri command to set the bridge priority for a spanning tree port.

set spantree portpri mod/port priority

Syntax Description

mod/port

Number of the module and the port on the module.

priority

Number that represents the cost of a link in a spanning tree bridge; valid values are from 0 to 63, with 0 indicating high priority and 63, low priority.


Defaults

The default is all ports with bridge priority are set to 32.

Command Types

Switch command.

Command Modes

Privileged.

Examples

This example shows how to set the priority of port 1 on module 4 to 63:

Console> (enable) set spantree portpri 4/1 63
Bridge port 4/1 priority set to 63.
Console> (enable)

Related Commands

show spantree

set 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/port [cost cost] [vlan_list]

Syntax Description

mod/port

Number of the module and the port on the module.

cost cost

(Optional) Keyword and variable to set the path cost; valid values are from 1 to 65535.

vlan_list

(Optional) Number of the VLAN; valid values are from 1 to 1005 and from 1025 to 4094.


Defaults

The default path cost is based on port speed; see Table 2-26 and Table 2-27 for default settings.

Table 2-26 Default Port Cost—Short Mode

Port Speed
Default Port Cost

4 Mb

250

10 Mb

100

16 Mb

62

100 Mb

19

155 Mb

14

1 Gb

4

10 Gb

2


Table 2-27 Default Port Cost—Long Mode

Port Speed
Default Port Cost

100 Kb

200,000,000

1 Mb

20,000,000

10 Mb

2,000,000

10 Mb

200,000

1 Gb

20,000

10 Gb

2,000

100 Gb

200

1 Tb

20

10 Tb

2


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.

This command is not supported in MISTP mode.

Examples

These examples show how to use the set spantree portvlancost command and explicitly specify the path cost of a port:

Console> (enable) set spantree portvlancost 2/10 cost 25 1-20
Cannot set portvlancost to a higher value than the port cost, 10, for port 2/10.
Console> (enable)

Console> (enable) set spantree portvlancost 2/10 cost 1-20
Port 2/10 VLANs 1-20 have a path cost of 9.
Console> (enable)

Console> (enable) set spantree portvlancost 2/10 cost 4 1-20
Port 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 21
Port 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 the path cost of a port:

Console> (enable) set spantree portvlancost 1/2
Port 1/2 VLANs 1-1005 have path cost 3100.
Console> (enable)

Console> (enable) set spantree portvlancost 1/2 21
Port 1/2 VLANs 1-20,22-1005 have path cost 3100.
Port 1/2 VLANs 21 have path cost 3099.
Console> (enable) 

Related Commands

clear spantree portvlancost
set channel vlancost
show spantree

set 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/port priority [vlans]

Syntax Description

mod/port

Number of the module and the port on the module.

priority

Number that represents the cost of a link in a spanning tree bridge. The priority level is from 0 to 63, with 0 indicating high priority and 63 indicating low priority.

vlans

(Optional) VLANs that use the specified priority level; valid values are from 1 to 1005.


Defaults

The default is the port VLAN priority is set to 0, with no VLANs specified.

Command Types

Switch command.

Command Modes

Privileged.

Usage Guidelines

This command is not supported by extended-range VLANs.

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 MSM.

The set spantree portvlanpri command applies only to trunk ports. If you enter this command, you see this message:

Port xx is not a trunk-capable port

Examples

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-40
Port 1/2 vlans 3,6-20,41-1000 using portpri 32
Port 1/2 vlans 1-2,4-5,21-40 using portpri 16
Console> (enable)

Related Commands

clear spantree portvlanpri
show spantree