show dot1q-tunnel through show udld

show dot1q-tunnel through show udld

show dot1q-tunnel

To display a list of 802.1Q tunnel-enabled ports, use the showdot1q-tunnel command in user EXEC mode.

show dot1q-tunnel [ interface interface interface-number ]

Syntax Description

interface interface

(Optional) Specifies the interface type; possible valid values are ethernet, fastethernet, gigabitethernet, tengigabitethernet, port-channel, and ge-wan.

interface-number

(Optional) Interface number; see the “Usage Guidelines” section for valid values.

Command Modes

User EXEC (>)

Command History

Release

Modification

12.2(14)SX

Support for this command was introduced on the Supervisor Engine 720.

12.2(17d)SXB

Support for this command on the Supervisor Engine 2 was extended to Release 12.2(17d)SXB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

Usage Guidelines

If you do not enter any keywords, the 802.1Q tunnel ports for all interfaces are displayed.

The ge-wan keyword is not supported in Cisco 7600 series routers that are configured with a Supervisor Engine 720.

The interface-numberargument designates the module and port number for the ethernet, fastethernet, gigabitethernet, tengigabitethernet, and ge-wan keywords. Valid values depend on the chassis and module that are used. For example, if you have a 48-port 10/100BASE-T Ethernet module that is installed in a 13-slot chassis, valid values for the slot number are from 1 to 13 and valid values for the port number are from 1 to 48.

The interface-numberargument designates the port-channel number for the port-channel keyword; valid values are fro m 1 to 282. The values from 257 to 282 are supported on the Content Switching Module (CSM) and the Firewall Services Module (FWSM) only.

Examples

This example indicates that the port is up and has one 802.1Q tunnel that is configured on it. The fields shown in the display are self-explanatory.

Router# show dot1q-tunnel interface port-channel 10 
Interface 
--------- 
Po10

Related Commands

Command

Description

switchport mode

Sets the interface type.

vlan dot1q tag native

Enables dot1q tagging for all VLANs in a trunk.

show errdisable flap-values

To display conditions that cause a flap error to be recognized as a result of a specific cause, use the showerrdisableflap-values command in user EXEC or privileged EXEC mode.

show errdisable flap-values

Syntax Description

This command has no arguments or keywords.

Command Modes

User EXEC (>) Privileged EXEC (#)

Command History

Release

Modification

15.0(1)

This command was introduced in a release earlier than Cisco IOS Release 15.0(1) on the Cisco 3845 series routers.

Usage Guidelines

The Flaps column in the display shows how many changes to the state within the specified time interval will cause an error to be detected and a port to be disabled. For example, the display in the “Examples” section shows that an error will be assumed and the port shut down if three Dynamic Trunking Protocol (DTP)-state (port mode access/trunk) or Port Aggregation Protocol (PAgP) flap changes occur during a 30-second interval, or if 5 link-state (link up/down) changes occur during a 10-second interval.

Examples

The following is sample output from the showerrdisableflap-values command:

Router# show errdisable flap-values
 
ErrDisable Reason    Flaps    Time (sec)
-----------------    ------   ----------
pagp-flap              3       30 
dtp-flap               3       30 
link-flap              20      10 

The table below describes the significant fields shown in the display.

Table 1 show errdisable flap-values Field Descriptions

Field

Description

ErrDisable Reason

Reason for error disable.

Flaps

Total number of flaps.

Time (sec)

Time set for the recovery timer, in seconds.

pagp-flap

PAgP flap error disable.

dtp-flap

DTP flap error disable.

link-flap

Link flap error disable.

Related Commands

Command

Description

errdisable detect cause

Enables the error-disabled detection for a specific cause or all causes.

errdisable recovery

Configures the recovery mechanism variables.

show mac-address-table

To display the MAC address table, use the show mac-address-table command in privileged EXEC mode.

Cisco 2600, 3600, and 3700 Series Routers

show mac-address-table [ secure | self | count ] [ addressmacaddress ] [ interfacetype/number ] { fa | gislot/port } [ atmslot/port ] [ atmslot/port ] [ vlanvlan-id ]

Catalyst 4500 Series Switches

show mac-address-table { assigned | ip | ipx | other }

Catalyst 6000/6500 Series Switches and 7600 Series Routers

show mac-address-table [ address mac-addr [ all | interface type/number | module number | vlan vlan-id ] | aging-time [ vlan vlan-id ] | count [ module number | vlan vlan-id ] | interface type/number | limit [ vlan vlan-id | module number | interface type ] | module number | multicast [ count ] [ igmp-snooping | mld-snooping | user ] [ vlan vlan-id ] | notification { mac-move [ counter [ vlan ] ] | threshold | change } [ interface [ number ] ] | synchronize statistics | unicast-flood | vlan vlan-id [ all | module number ] ]

Syntax Description

secure

(Optional) Displays only the secure addresses.

self

(Optional) Displays only addresses added by the switch itself.

count

(Optional) Displays the number of entries that are currently in the MAC address table.

address mac-addr

(Optional) Displays information about the MAC address table for a specific MAC address. See the �Usage Guidelines� section for formatting information.

interface type / number

(Optional) Displays addresses for a specific interface. For the Catalyst 6500 and 6000 series switches, valid values are atm, fastethernet, gigabitethernet, and port-channel. For the Cisco 7600 series, valid values are atm,ethernet, fastethernet, ge-wan, gigabitethernet, tengigabitethernet, and pos.

fa

(Optional) Specifies the Fast Ethernet interface.

gi

(Optional) Specifies the Gigabit Ethernet interface.

slot / port

(Optional) Adds dynamic addresses to the module in slot 1 or 2. The slash mark is required.

atm slot /port

(Optional) Adds dynamic addresses to ATM module slot /port . Use 1 or 2 for the slot number. Use 0 as the port number. The slash mark is required.

vlan vlan -id

(Optional) Displays addresses for a specific VLAN. For the Cisco 2600, 3600, and 3700 series, valid values are from 1 to 1005; do not enter leading zeroes. Beginning with Cisco IOS Release 12.4(15)T, the valid VLAN ID range is from 1 to 4094.

For the Catalyst 6500 and 6000 series switches and 7600 series, valid values are from 1 to 4094.

assigned

Specifies the assigned protocol entries.

ip

Specifies the IP protocol entries.

ipx

Specifies the IPX protocol entries.

other

Specifies the other protocol entries.

all

(Optional) Displays every instance of the specified MAC address in the forwarding table.

type / number

(Optional) Module and interface number.

module number

(Optional) Displays information about the MAC address table for a specific Distributed Forwarding Card (DFC) module.

aging-time

(Optional) Displays the aging time for the VLANs.

limit

Displays MAC-usage information.

multicast

Displays information about the multicast MAC address table entries only.

igmp-snooping

Displays the addresses learned by Internet Group Management Protocol (IGMP) snooping.

mld-snooping

Displays the addresses learned by Multicast Listener Discover version 2 (MLDv2) snooping.

user

Displays the manually entered (static) addresses.

notification mac-move

Displays the MAC-move notification status.

notification mac-move counter

(Optional) Displays the number of times a MAC has moved and the number of these instances that have occurred in the system.

vlan

(Optional) Specifies a VLAN to display. For the Catalyst 6500 and 6000 series switches and 7600 series, valid values are from 1 to 4094.

notification threshold

Displays the Counter-Addressable Memory (CAM) table utilization notification status.

notification change

Displays the MAC notification parameters and history table.

synchronize statistics

Displays information about the statistics collected on the switch processor or DFC.

unicast-flood

Displays unicast-flood information.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

11.2(8)SA

This command was introduced.

11.2(8)SA3

This command was modified. The aging-time ,, count, self , and vlan vlan -id keywords and arguments were added.

11.2(8)SA5

This command was modified. The atmslot/port keyword-argument pair was added.

12.2(2)XT

This command was modified. This command was implemented on Cisco 2600, 3600, and 3700 series routers.

12.1(8a)EW

This command was modified. This command was implemented on Catalyst 4500 series switches.

12.2(8)T

This command was integrated into Cisco IOS Release 12.2(8)T on Cisco 2600, 3600, and 3700 series routers.

12.2(11)T

This command was integrated into Cisco IOS Release 12.2(11)T.

12.2(14)SX

This command was modified. This command was implemented on the Supervisor Engine 720.

12.2(17a)SX

This command was modified. For the Catalyst 6500 and 6000 series switches and 7600 series, this command was changed to support the following optional keywords and arguments:

  • count module number
  • limit [vlan vlan-id | port number | interface interface-type
  • notification threshold
  • unicast-flood

12.2(17d)SXB

This command was modified. Support for this command was added for the Supervisor Engine 2.

12.2(18)SXE

This command was modified. For the Catalyst 6500 and 6000 series switches and Cisco 7600 series, support was added for the mld-snooping keyword on the Supervisor Engine 720 only.

12.2(18)SXF

This command was modified. For the Catalyst 6500 and 6000 series switches and Cisco 7600 series, support was added for the synchronizestatistics keywords on the Supervisor Engine 720 only.

12.2(33)SRA

This command was modified. This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.4(15)T

This command was modified to extend the range of valid VLAN IDs to 1 to 4094 for specified platforms.

12.2(33)SXH

This command was modified. The change keyword was added.

12.2(33)SXI

This command was modified to add the counter keyword.

Usage Guidelines

Cisco 2600, 3600, and 3700 Series Routers

The show mac-address-table command displays the MAC address table for the switch. Specific views can be defined by using the optional keywords and arguments. If more than one optional keyword is used, then all the conditions must be true for that entry to be displayed.

Catalyst 4500 Series Switches

For the MAC address table entries that are used by the routed ports, the routed port name, rather than the internal VLAN number, is displayed in the �vlan� column.

Catalyst 6000 and 6500 Series Switches and Cisco 7600 Series Routers

If you do not specify a module number, the output of the show mac-address-table command displays information about the supervisor engine. To display information about the MAC address table of the DFCs, you must enter the module number or the all keyword.

The mac-addrvalue is a 48-bit MAC address. The valid format is H.H.H.

The interface number argument designates the module and port number. Valid values depend on the specified interface type and the chassis and module that are used. For example, if you specify a Gigabit Ethernet interface and have a 48-port 10/100BASE-T Ethernet module that is installed in a 13-slot chassis, valid values for the module number are from 1 to 13 and valid values for the port number are from 1 to 48.

The optional module number keyword-argument pair is supported only on DFC modules. The module numberkeyword-argument pair designate the module number.

Valid values for the mac-group-address argument are from 1 to 9.

The optional count keyword displays the number of multicast entries.

The optional multicast keyword displays the multicast MAC addresses (groups) in a VLAN or displays all statically installed or IGMP snooping-learned entries in the Layer 2 table.

The information that is displayed in the show mac-address-table unicast-flood command output is as follows:

  • Up to 50 flood entries, shared across all the VLANs that are not configured to use the filter mode, can be recorded.
  • The output field displays are defined as follows:
    • ALERT--Information is updated approximately every 3 seconds.
    • SHUTDOWN--Information is updated approximately every 3 seconds.

Note


The information displayed on the destination MAC addresses is deleted as soon as the floods stop after the port shuts down.


  • Information is updated each time that you install the filter. The information lasts until you remove the filter.

The dynamic entries that are displayed in the Learn field are always set to Yes.

The show mac-address-table limit command output displays the following information:

  • The current number of MAC addresses.
  • The maximum number of MAC entries that are allowed.
  • The percentage of usage.

The show mac-address-table synchronize statistics command output displays the following information:

  • Number of messages processed at each time interval.
  • Number of active entries sent for synchronization.
  • Number of entries updated, created, ignored, or failed.

Examples

The following is sample output from theshow mac-address-table command:

Switch# show mac-address-table

Dynamic Addresses Count:               9
Secure Addresses (User-defined) Count: 0
Static Addresses (User-defined) Count: 0
System Self Addresses Count:           41
Total MAC addresses:                   50
Non-static Address Table:
Destination Address  Address Type  VLAN  Destination Port
-------------------  ------------  ----  --------------------
0010.0de0.e289       Dynamic          1  FastEthernet0/1
0010.7b00.1540       Dynamic          2  FastEthernet0/5
0010.7b00.1545       Dynamic          2  FastEthernet0/5
0060.5cf4.0076       Dynamic          1  FastEthernet0/1
0060.5cf4.0077       Dynamic          1  FastEthernet0/1
0060.5cf4.1315       Dynamic          1  FastEthernet0/1
0060.70cb.f301       Dynamic          1  FastEthernet0/1
00e0.1e42.9978       Dynamic          1  FastEthernet0/1
00e0.1e9f.3900       Dynamic          1  FastEthernet0/1 

Examples

The following example shows how to display the MAC address table entries that have a specific protocol type (in this case, "assigned"):

Switch# show mac-address-table protocol assigned

vlan   mac address     type    protocol  qos             ports
-----+---------------+--------+---------+---+--------------------------------
 200  0050.3e8d.6400  static   assigned  --  Switch
 100  0050.3e8d.6400  static   assigned  --  Switch
   5  0050.3e8d.6400  static   assigned  --  Switch
4092  0000.0000.0000  dynamic  assigned  --  Switch
   1  0050.3e8d.6400  static   assigned  --  Switch
   4  0050.3e8d.6400  static   assigned  --  Switch
4092  0050.f0ac.3058  static   assigned  --  Switch
4092  0050.f0ac.3059  dynamic  assigned  --  Switch
   1  0010.7b3b.0978  dynamic  assigned  --  Fa5/9

The following example shows the "other" output for the previous example:

Switch# show mac-address-table protocol other

Unicast Entries
 vlan   mac address     type        protocols               port
-------+---------------+--------+---------------------+--------------------
   1    0000.0000.0201   dynamic other                  FastEthernet6/15
   1    0000.0000.0202   dynamic other                  FastEthernet6/15
   1    0000.0000.0203   dynamic other                  FastEthernet6/15
   1    0000.0000.0204   dynamic other                  FastEthernet6/15
   1    0030.94fc.0dff    static ip,ipx,assigned,other  Switch
   2    0000.0000.0101   dynamic other                  FastEthernet6/16
   2    0000.0000.0102   dynamic other                  FastEthernet6/16
   2    0000.0000.0103   dynamic other                  FastEthernet6/16
   2    0000.0000.0104   dynamic other                  FastEthernet6/16
Fa6/1   0030.94fc.0dff    static ip,ipx,assigned,other  Switch
Fa6/2   0030.94fc.0dff    static ip,ipx,assigned,other  Switch
Multicast Entries
 vlan    mac address     type    ports
-------+---------------+-------+-------------------------------------------
   1    ffff.ffff.ffff   system Switch,Fa6/15
   2    ffff.ffff.ffff   system Fa6/16
1002    ffff.ffff.ffff   system
1003    ffff.ffff.ffff   system
1004    ffff.ffff.ffff   system
1005    ffff.ffff.ffff   system
Fa6/1   ffff.ffff.ffff   system Switch,Fa6/1
Fa6/2   ffff.ffff.ffff   system Switch,Fa6/2
 

Examples

The following is sample output from theshow mac-address-tablecommand:

Switch# show mac-address-table

Dynamic Addresses Count:               9
Secure Addresses (User-defined) Count: 0
Static Addresses (User-defined) Count: 0
System Self Addresses Count:           41
Total MAC addresses:                   50
Non-static Address Table:
Destination Address  Address Type  VLAN  Destination Port
-------------------  ------------  ----  --------------------
0010.0de0.e289       Dynamic          1  FastEthernet0/1
0010.7b00.1540       Dynamic          2  FastEthernet0/5
0010.7b00.1545       Dynamic          2  FastEthernet0/5
0060.5cf4.0076       Dynamic          1  FastEthernet0/1
0060.5cf4.0077       Dynamic          1  FastEthernet0/1
0060.5cf4.1315       Dynamic          1  FastEthernet0/1
0060.70cb.f301       Dynamic          1  FastEthernet0/1
00e0.1e42.9978       Dynamic          1  FastEthernet0/1
00e0.1e9f.3900       Dynamic          1  FastEthernet0/1

Note


In a distributed Encoded Address Recognition Logic (EARL) switch, the asterisk (*) indicates a MAC address that is learned on a port that is associated with this EARL.


The following example shows how to display the information about the MAC address table for a specific MAC address with a Supervisor Engine 720:

Switch# show mac-address-table address 001.6441.60ca

Codes: * - primary entry
  vlan   mac address     type    learn qos            ports
------+----------------+--------+-----+---+--------------------------
Supervisor:
*  ---  0001.6441.60ca    static  No    --  Router

The following example shows how to display MAC address table information for a specific MAC address with a Supervisor Engine 720:

Router# show mac-address-table address 0100.5e00.0128

Legend: * - primary entry
        age - seconds since last seen
        n/a - not available
  vlan   mac address     type    learn     age              ports
------+----------------+--------+-----+----------+--------------------------
Supervisor:
*   44  0100.5e00.0128    static  Yes          -   Fa6/44,Router
*    1  0100.5e00.0128    static  Yes          -   Router
Module 9:
*   44  0100.5e00.0128    static  Yes          -   Fa6/44,Router
*    1  0100.5e00.0128    static  Yes          -   Router

The following example shows how to display the currently configured aging time for all VLANs:

Switch# show mac-address-table aging-time 

Vlan    Aging Time
----    ----------
*100     300
200     1000

The following example shows how to display the entry count for a specific slot:

Switch# show mac-address-table count module 1

MAC Entries on slot 1 :
Dynamic Address Count:                4
Static Address (User-defined) Count:  25
Total MAC Addresses In Use:           29
Total MAC Addresses Available:        131072

The following example shows how to display the information about the MAC address table for a specific interface with a Supervisor Engine 720:

Switch# show mac-address-table interface fastethernet 6/45

Legend: * - primary entry
        age - seconds since last seen
        n/a - not available
  vlan   mac address     type    learn     age              ports
------+----------------+--------+-----+----------+--------------------------
*   45  00e0.f74c.842d   dynamic  Yes          5   Fa6/45


Note


A leading asterisk (*) indicates entries from a MAC address that was learned from a packet coming from an outside device to a specific module.


The following example shows how to display the limit information for a specific slot:

Switch# show mac-address-table limit vlan 1 module 1
 
vlan    switch   module    action      maximum  Total entries  flooding -------+--------+---------+-----------+--------+--------------+------------ 
1          1        7       warning      500      0             enabled 
1          1        11      warning      500      0             enabled 
1          1        12      warning      500      0             enabled 

Router#show mac-address-table limit vlan 1 module 2
 
vlan    switch   module    action      maximum  Total entries  flooding -------+--------+---------+-----------+--------+--------------+------------ 
1          2         7      warning      500      0             enabled 
1          2         9      warning      500      0             enabled 

The following example shows how to display the MAC-move notification status:

Switch# show mac-address-table notification mac-move

MAC Move Notification: Enabled
 

The following example shows how to display the MAC move statistics:

Router# show mac-address-table notification mac-move counter

-----------------------------------------------------------------------------------
Vlan Mac Address From Mod/Port To Mod/Port Count
---- ----------------- ----------------------- ----------------------- ------------
1 00-01-02-03-04-01 2/3 3/1 10
20 00-01-05-03-02-01 5/3 5/1 20

The following example shows how to display the CAM-table utilization-notification status:

Router# show mac-address-table notification threshold 

Status limit Interval 
-------------+-----------+------------- 
enabled 1 120 

The following example shows how to display the MAC notification parameters and history table:

Switch# show mac-address-table notification change

MAC Notification Feature is Disabled on the switch
MAC Notification Flags For All Ethernet Interfaces :
----------------------------------------------------
Interface                    MAC Added Trap MAC Removed Trap
--------------------         -------------- ----------------

The following example shows how to display the MAC notification parameters and history table for a specific interface:

Switch# show mac-address-table notification change interface gigabitethernet5/2

MAC Notification Feature is Disabled on the switch
Interface                    MAC Added Trap MAC Removed Trap
--------------------         -------------- ----------------
GigabitEthernet5/2           Disabled       Disabled

The following example shows how to display unicast-flood information:

Switch# show mac-address-table unicast-flood 

> > Unicast Flood Protection status: enabled 
> > 
> > Configuration: 
> > vlan Kfps action timeout 
> > ------+----------+-----------------+---------- 
> > 2 2 alert none 
> > 
> > Mac filters: 
> > No. vlan source mac addr. installed 
> > on time left (mm:ss) 
> > 
> >-----+------+-----------------+------------------------------+------------------ 
> > 
> > Flood details: 
> > Vlan source mac addr. destination mac addr. 
> > 
> >------+----------------+------------------------------------------------- 
> > 2 0000.0000.cafe 0000.0000.bad0, 0000.0000.babe, 
> > 0000.0000.bac0 
> > 0000.0000.bac2, 0000.0000.bac4, 
> > 0000.0000.bac6 
> > 0000.0000.bac8 
> > 2 0000.0000.caff 0000.0000.bad1, 0000.0000.babf, 
> > 0000.0000.bac1 
> > 0000.0000.bac3, 0000.0000.bac5, 
> > 0000.0000.bac7 
> > 0000.0000.bac9
                                                         

The following example shows how to display the information about the MAC-address table for a specific VLAN:

Switch#show mac-address-table vlan 100

vlan   mac address     type    protocol  qos             ports
-----+---------------+--------+---------+---+--------------------------------
 100  0050.3e8d.6400  static   assigned  --  Router
 100  0050.7312.0cff  dynamic        ip  --  Fa5/9
 100  0080.1c93.8040  dynamic        ip  --  Fa5/9
 100  0050.3e8d.6400  static        ipx  --  Router
 100  0050.3e8d.6400  static      other  --  Router
 100  0100.0cdd.dddd  static      other  --  Fa5/9,Router,Switch
 100  00d0.5870.a4ff  dynamic        ip  --  Fa5/9
 100  00e0.4fac.b400  dynamic        ip  --  Fa5/9
 100  0100.5e00.0001  static         ip  --  Fa5/9,Switch
 100  0050.3e8d.6400  static         ip  --  Router

The following example shows how to display the information about the MAC address table for MLDv2 snooping:

Switch# show mac-address-table multicast mld-snooping

vlan mac address type learn qos ports 
-----+---------------+--------+-----+---+-------------------------------- 
--- 3333.0000.0001 static Yes - Switch,Stby-Switch 
--- 3333.0000.000d static Yes - Fa2/1,Fa4/1,Router,Switch 
--- 3333.0000.0016 static Yes - Switch,Stby-Switch

The table below describes the significant fields shown in the displays.

Table 2 show mac-address-table Field Descriptions

Field

Description

Dynamic Addresses Count

Total number of dynamic addresses in the MAC address table.

Secure Addresses (User-defined) Count

Total number of secure addresses in the MAC address table.

Static Addresses (User-defined) Count

Total number of static addresses in the MAC address table.

System Self Addresses Count

Total number of addresses in the MAC address table.

Total MAC addresses

Total MAC addresses in the MAC address table.

Destination Address

Destination addresses present in the MAC address table.

Address Type

Address type: static or dynamic.

VLAN

VLAN number.

Destination Port

Destination port information present in the MAC address table.

mac address

The MAC address of the entry.

protocol

Protocol present in the MAC address table.

qos

Quality of service associated with the MAC address table.

ports

Port type.

age

The time in seconds since last occurrence of the interface.

Aging Time

Aging time for entries.

module

Module number.

action

Type of action.

flooding

Status of the flooding.

Related Commands

Command

Description

clear mac-address-table

Deletes entries from the MAC address table.

mac-address-table aging-time

Configures the aging time for entries in the Layer 2 table.

mac-address-table limit

Enables MAC limiting.

mac-address-table notification mac-move

Enables MAC-move notification.

mac-address-table static

Adds static entries to the MAC address table or configures a static MAC address with IGMP snooping disabled for that address.

mac-address-table synchronize

Synchronizes the Layer 2 MAC address table entries across the PFC and all the DFCs.

show mac-address-table static

Displays only static MAC address table entries.

show mac-address-table aging-time

To display the MAC address aging time, use the showmac-address-tableaging-time command in privileged EXEC mode.

Cisco 2600 Series, Cisco 3600 Series, and Cisco 3700 Series Routers

show mac-address-table aging-time

Catalyst Switches

show mac-address-table aging-time [ vlan vlan-id ] [ [ begin | exclude | include ] expression ]

Syntax Description

vlan vlan-id

(Optional) Specifies a VLAN; valid values are from 1 to 1005.

begin

(Optional) Specifies that the output display begin with the line that matches the expression .

exclude

(Optional) Specifies that the output display exclude lines that match the expression .

include

(Optional) Specifies that the output display include lines that match the specified expression .

expression

Expression in the output to use as a reference point.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

12.0(7)XE

This command was introduced on Catalyst 6000 series switches.

12.2(2)XT

This command was implemented on Cisco 2600 series, Cisco 3600 series, and Cisco 3700 series routers.

12.2(8)T

This command was integrated into Cisco IOS Release 12.2(8)T on Cisco 2600 series, Cisco 3600 series, and Cisco 3700 series routers.

12.2(11)T

This command was integrated into Cisco IOS Release 12.2(11)T.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Examples

The following example shows how to display the current configured aging time for all VLANs. The fields shown in the display are self-explanatory.

Examples

Router# show mac-address-table aging-time 
Mac address aging time 300

Examples

Router# show mac-address-table aging-time
Vlan    Aging Time
----    ----------
100     300
200     1000
 

The following example shows how to display the current configured aging time for a specific VLAN. The fields shown in the display are self-explanatory.

Router# show mac-address-table aging-time vlan 100
Vlan    Aging Time
----    ----------
 100    300

Related Commands

Command

Description

show mac -address-tableaddress

Displays MAC address table information for a specific MAC address.

show mac -address-tablecount

Displays the number of entries currently in the MAC address table.

show mac -address-tabledetail

Displays detailed MAC address table information.

show mac -address-tabledynamic

Displays dynamic MAC address table entries only.

show mac -address-tableinterface

Displays the MAC address table information for a specific interface.

show mac -address-tablemulticast

Displays multicast MAC address table information.

show mac -address-tableprotocol

Displays MAC address table information based on protocol.

show mac -address-tablestatic

Displays static MAC address table entries only.

show mac -address-tablevlan

Displays the MAC address table information for a specific VLAN.

show mac-address-table dynamic

To display dynamic MAC address table entries only, use the showmac-address-tabledynamic command in privileged EXEC mode.

Cisco 2600 Series, Cisco 3600 Series, and Cisco 3700 Series Routers

show mac-address-table dynamic [ address mac-addr | interface interface type slot/number | vlan vlan ]

Catalyst Switches

show mac-address-table dynamic [ address mac-addr | detail | interface interface numberprotocol protocol | module number | vlan vlan ] [ begin | exclude | include | expression ]

Catalyst 6500 Series Switches

show mac-address-table dynamic [ address mac-addr | interface interface interface-number [ all | module number ] | module num | vlan vlan-id [ all | module number ] ]

Syntax Description

address mac -address

(Optional) Specifies a 48-bit MAC address; valid format is H.H.H.

detail

(Optional) Specifies a detailed display of MAC address table information.

interface type number

(Optional) Specifies an interface to match; valid type values are FastEthernet and GigabitEthernet, valid number values are from 1 to 9.

interface type

(Optional) Specifies an interface to match; valid type values are FastEthernet and GigabitEthernet.

slot

(Optional) Adds dynamic addresses to module in slot 1 or 2.

port

(Optional) Port interface number ranges based on type of Ethernet switch network module used:

  • 0 to 15 for NM-16ESW
  • 0 to 35 for NM-36ESW
  • 0 to 1 for GigabitEthernet

protocol protocol

(Optional) Specifies a protocol. See the “Usage Guidelines” section for keyword definitions.

module number

(Optional) Displays information about the MAC address table for a specific Distributed Forwarding Card (DFC) module.

vlan vlan

(Optional) Displays entries for a specific VLAN; valid values are from 1 to 1005.

begin

(Optional) Specifies that the output display begin with the line that matches the expression.

exclude

(Optional) Specifies that the output display exclude lines that match the expression.

include

(Optional) Specifies that the output display include lines that match the specified expression.

expression

Expression in the output to use as a reference point.

all

(Optional) Specifies that the output display all dynamic MAC-address table entries.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

12.0(7)XE

This command was introduced on Catalyst 6000 series switches.

12.2(2)XT

This command was implemented on Cisco 2600 series, Cisco 3600 series, and Cisco 3700 series routers.

12.2(8)T

This command was integrated into Cisco IOS Release 12.2(8)T on Cisco 2600 series, Cisco 3600 series, and Cisco 3700 series routers.

12.2(11)T

This command was integrated into Cisco IOS Release 12.2(11)T.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(14)SX

Support for this command was introduced on the Catalyst 6500 series switch.

12.2(33)SXH

This command was changed to support the all keyword on the Catalyst 6500 series switch.

Usage Guidelines

Cisco 2600 Series, Cisco 3600 Series, and Cisco 3700 Series Routers

The showmac-address-tabledynamic command output for an EtherChannel interface changes the port-number designation (for example, 5/7) to a port-group number.

Catalyst Switches

The keyword definitions for the protocol argument are:

  • ip --Specifies IP protocol
  • ipx --Specifies Internetwork Packet Exchange (IPX) protocols
  • assigned --Specifies assigned protocol entries
  • other --Specifies other protocol entries

The showmac-address-tabledynamic command output for an EtherChannel interface changes the port-number designation (for example, 5/7) to a port-group number.

Catalyst 6500 Series Switches

The mac-addressis a 48-bit MAC address and the valid format is H.H.H.

The optional modulenum keyword and argument are supported only on DFC modules. The modulenumkeyword and argument designate the module number.

Examples

The following examples show how to display all dynamic MAC address entries. The fields shown in the various displays are self-explanatory.

Examples

Router# show mac-address-table dynamic
 
Non-static Address Table:
Destination Address  Address Type  VLAN  Destination Port
-------------------  ------------  ----  --------------------
000a.000a.000a          Dynamic       1     FastEthernet4/0
002a.2021.4567          Dynamic       2     FastEthernet4/0

Examples

Router# show mac-address-table dynamic
vlan   mac address     type    protocol  qos             ports
-----+---------------+--------+---------+---+--------------------------------
 200  0010.0d40.37ff  dynamic        ip  --  5/8
   1  0060.704c.73ff  dynamic        ip  --  5/9
4095  0000.0000.0000  dynamic        ip  --  15/1
   1  0060.704c.73fb  dynamic     other  --  5/9
   1  0080.1c93.8040  dynamic        ip  --  5/9
4092  0050.f0ac.3058  dynamic        ip  --  15/1
   1  00e0.4fac.b3ff  dynamic     other  --  5/9

The following example shows how to display dynamic MAC address entries with a specific protocol type (in this case, assigned).

Router# show mac-address-table dynamic protocol assigned
vlan   mac address     type    protocol  qos             ports
-----+---------------+--------+---------+---+--------------------------------
4092  0000.0000.0000  dynamic  assigned  --  Router
4092  0050.f0ac.3059  dynamic  assigned  --  Router
   1  0010.7b3b.0978  dynamic  assigned  --  Fa5/9
Router#

The following example shows the detailed output for the previous example.

Router# show mac-address-table dynamic protocol assigned detail
MAC Table shown in details
======================================== 
 Type   Always Learn Trap Modified Notify Capture Protocol Flood
-------+------------+----+--------+------+-------+--------+-----+
     QoS bit      L3 Spare   Mac Address  Age Byte Pvlan Xtag SWbits Index
-----------------+--------+--------------+--------+-----+----+------+-----
DYNAMIC     NO        NO     YES     NO     NO    assigned   NO
   Bit Not On        0     0000.0000.0000  255      4092   0     0     0x3
 
DYNAMIC     NO        NO     YES     NO     NO    assigned   NO
   Bit Not On        0     0050.f0ac.3059  254      4092   0     0     0x3
 
DYNAMIC     NO        NO     YES     NO     NO    assigned   NO
   Bit Not On        0     0010.7b3b.0978  254      1      0     0     0x108
 
Router#

Examples

This example shows how to display all the dynamic MAC-address entries for a specific VLAN.

Router# show mac-address-table dynamic vlan 200 all
Legend: * - primary entry
        age - seconds since last seen
        n/a - not aevailable
vlan     mac address      type   learn    age               ports 
------+----------------+--------+-----+----------+-------------------------- 
 200  0010.0d40.37ff   dynamic    NO      23        Gi5/8
Router# 

This example shows how to display all the dynamic MAC-address entries.

Router# show mac-address-table dynamic
Legend: * - primary entry 
age - seconds since last seen 
n/a - not applicable
vlan     mac address      type   learn    age               ports 
------+----------------+--------+-----+----------+-------------------------- 
* 10   0010.0000.0000   dynamic  Yes   n/a        Gi4/1 
* 3    0010.0000.0000   dynamic  Yes   0          Gi4/2 
* 1    0002.fcbc.ac64   dynamic  Yes   265        Gi8/1 
* 1    0009.12e9.adc0   static   No    -          Router
Router# 

Related Commands

Command

Description

show mac -address-tableaddress

Displays MAC address table information for a specific MAC address.

show mac -address-tableaging-time

Displays the MAC address aging time.

show mac -address-tablecount

Displays the number of entries currently in the MAC address table.

show mac -address-tabledetail

Displays detailed MAC address table information.

show mac -address-tableinterface

Displays the MAC address table information for a specific interface.

show mac -address-tablemulticast

Displays multicast MAC address table information.

show mac -address-tableprotocol

Displays MAC address table information based on protocol.

show mac -address-tablestatic

Displays static MAC address table entries only.

show mac -address-tablevlan

Displays the MAC address table information for a specific VLAN.

show mac-address-table learning

To display the MAC-address learning state, use the showmac-address-tablelearning command in user EXEC mode.

show mac-address-table learning [ vlan ]

Syntax Description

vlan vlan-id

(Optional) Displays information about the MAC-address learning state for the specified switch port VLAN; valid values are from 1 to 4094.

interface interface slot / port

(Optional) Displays information about the MAC-address learning state for the specified routed interface type, the slot number, and the port number.

module num

(Optional) Displays information about the MAC-address learning state for the specified module number.

Command Default

This command has no default settings.

Command Modes

User EXEC (>)

Command History

Release

Modification

12.2(18)SXE

Support for this command was introduced on the Supervisor Engine 720.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

Usage Guidelines

The modulenum keyword and argument can be used to specify supervisor engines or Distributed Forwarding Cards (DFCs) only.

The interfaceinterfaceslot/port keyword and arguments can be used on routed interfaces only. The interfaceinterfaceslot/port keyword and arguments cannot be used to configure learning on switch-port interfaces.

If you specify the vlanvlan-id, the state of the MAC-address learning of the specified VLAN, including router interfaces, on all modules, is displayed.

If you specify the vlanvlan-id and the modulenum, the state of the MAC-address learning of a specified VLAN on a specified module is displayed.

If you specify the interfaceinterfaceslot/port keyword and arguments, the state of the MAC-address learning of the specified interface on all modules is displayed.

If you specify the interfaceinterfaceslot/port keyword and arguments, the state of the MAC-address learning of the specified interface on the specified module is displayed.

If you enter the showmac-address-tablelearningcommand with no arguments or keywords, the status of MAC learning on all the existing VLANs on all the supervisor engines or DFCs configured on a Cisco 7600 series router is displayed.

Examples

This example shows how to display the MAC-address learning status on all the existing VLANs on all the supervisor engines or DFCs configured on a Cisco 7600 series router:

Router# show mac-address-table learning
 
VLAN/Interface          Mod1   Mod4   Mod7   
--------------------    ---------------------
1                       yes    yes    yes    
100                     yes    yes    yes    
150                     yes    yes    yes    
200                     yes    yes    yes    
250                     yes    yes    yes    
1006                     no     no     no    
1007                     no     no     no    
1008                     no     no     no    
1009                     no     no     no    
1010                     no     no     no    
1011                     no     no     no    
1012                     no     no     no    
1013                     no     no     no    
1014                     no     no     no    
GigabitEthernet6/1       no     no     no    
GigabitEthernet6/2       no     no     no    
GigabitEthernet6/4       no     no     no    
FastEthernet3/4          no     no     no    
FastEthernet3/5          no     no     no    
GigabitEthernet4/1       no     no     no    
GigabitEthernet4/2       no     no     no    
GigabitEthernet7/1       no     no     no    
GigabitEthernet7/2       no     no     no
Router#

Table 1 describes the fields that are shown in the example.

Table 3 show mac-address-table learning Field Descriptions

Field

Description

VLAN/Interface1

VLAN ID or interface type, module, and port number.

Mod#

Module number of a supervisor engine or DFC.

yes

MAC-address learning is enabled.

no

MAC-address learning is disabled.

1 The interfaces displayed are routed interfaces that have internal VLANs assigned to them.

This example shows how to display the status of MAC-address learning on all the existing VLANs on a single supervisor engine or a DFC:

Router# show mac-address-table learning module 4

VLAN/Interface          Mod4 
--------------------    -----
1                       yes 
100                     yes 
150                     yes 
200                     yes 
250                     yes 
1006                     no 
1007                     no 
1008                     no 
1009                     no 
1010                     no 
1011                     no 
1012                     no 
1013                     no 
1014                     no 
GigabitEthernet6/1       no   
GigabitEthernet6/2       no   
GigabitEthernet6/4       no   
FastEthernet3/4          no   
FastEthernet3/5          no   
GigabitEthernet4/1       no   
GigabitEthernet4/2       no   
GigabitEthernet7/1       no   
GigabitEthernet7/2       no   
Router#

This example shows how to display the status of MAC-address learning for a specific VLAN on all the supervisor engines and DFCs:

Router# show mac-address-table learning vlan 100

VLAN    Mod1   Mod4   Mod7   
----    ---------------------
100      no     no     yes    
Router

This example shows how to display the status of MAC-address learning for a specific VLAN on a specific supervisor engine or DFC:

Router# show mac-address-table learning vlan 100 module 7

VLAN    Mod7   
----    -----
100     yes    
Router

This example shows how to display the status of MAC-address learning for a specific supervisor engine or DFC:

Router# show mac-address-table learning interface FastEthernet 3/4

Interface       Mod1   Mod4   Mod7   
---------       ---------------------
Fa3/4            no     yes    no    
Router

This example shows how to display the status of MAC-address learning for a specific interface on a specific supervisor engine or DFC:

Router# show mac-address-table learning
 interface FastEthernet 3/4 module 1

Interface       Mod1
---------       -----
Fa3/4            no 
Router

Related Commands

Command

Description

mac-address-table learning

Enables MAC-address learning.

show mac-address-table static

To display static MAC address table entries only, use the showmac-address-tablestatic command in privileged EXEC mode.

Cisco 2600 Series, Cisco 3600 Series, and Cisco 3700 Series Routers

show mac-address-table static [ address mac-address | interface type /slot number | vlan vlan-id ]

Catalyst Switches

show mac-address-table static [ address mac-address | detail | interface type number | protocol protocol | vlan vlan-id ] [ [ begin | exclude | include ] expression ]

Syntax Description

address mac -address

(Optional) Specifies a 48-bit MAC address to match; valid format is H.H.H.

detail

(Optional) Specifies a detailed display of MAC address table information.

interface type number

(Optional) Specifies an interface to match; valid type values are Ethernet, FastEthernet, and Gigabit Ethernet and valid number values are from 1 to 9.

interface type

(Optional) Specifies an interface to match; valid type values are FastEthernet and Gigabit Ethernet.

slot

(Optional) Adds dynamic addresses to module in slot 1 or 2.

port

(Optional) Port interface number ranges based on type of Ethernet switch network module used:

  • 0 to 15 for NM-16ESW
  • 0 to 35 for NM-36ESW
  • 0 to 1 for Gigabit Ethernet

protocol protocol

(Optional) Specifies a protocol. See the “Usage Guidelines” section for keyword definitions.

vlan vlan

(Optional) Displays entries for a specific VLAN; valid values are from 1 to 1005.

begin

(Optional) Specifies that the output display begin with the line that matches the expression.

exclude

(Optional) Specifies that the output display exclude lines that match the expression.

include

(Optional) Specifies that the output display include lines that match the expression.

expression

Expression in the output to use as a reference point.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

12.0(7)XE

This command was introduced on Catalyst 6000 series switches.

12.2(2)XT

This command was implemented on Cisco 2600 series, Cisco 3600 series, and Cisco 3700 series routers.

12.2(8)T

This command was integrated into Cisco IOS Release 12.2(8)T on Cisco 2600 series, Cisco 3600 series, and Cisco 3700 series routers.

12.2(11)T

This command was integrated into Cisco IOS Release 12.2(11)T.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

Catalyst Switches

The keyword definitions for the protocol argument are:

  • ip --Specifies IP protocol
  • ipx --Specifies Internetwork Packet Exchange (IPX) protocols
  • assigned --Specifies assigned protocol entries
  • other --Specifies other protocol entries

Examples

The following examples show how to display all static MAC address entries. The fields shown in the various displays are self-explanatory.

Examples

Router# show mac-address-table static 
Static Address Table:
Destination Address  Address Type  VLAN  Destination Port
-------------------  ------------  ----  --------------------
2323.3214.5432          Static        4     FastEthernet4/1
2323.3214.5431          Static        5     FastEthernet4/1
2323.3214.5432          Static        6     FastEthernet4/1
2323.3214.5434          Static        7     FastEthernet4/1
2323.3214.5435          Static        8     FastEthernet4/1

Examples

Router# show mac-address-table static
*Oct 22 12:15:35: %SYS-5-CONFIG_I: Configured from console by console 
vlan   mac address     type    protocol  qos             ports
-----+---------------+--------+---------+---+--------------------------------
 200  0050.3e8d.6400  static   assigned  --  Router
 100  0050.3e8d.6400  static   assigned  --  Router
4092  0050.f0ac.3058  static      other  --  Router
 917  0100.0cdd.dddd  static      other  --  Fa5/9,Router,Switch
   5  0050.3e8d.6400  static   assigned  --  Router
 303  0100.0cdd.dddd  static      other  --  Fa5/9,Router,Switch
 850  0100.0cdd.dddd  static      other  --  Fa5/9,Router,Switch
1002  0100.0cdd.dddd  static      other  --  Fa5/9,Router,Switch
 802  0100.0cdd.dddd  static      other  --  Fa5/9,Router,Switch
   2  0100.0cdd.dddd  static      other  --  Fa5/9,Router,Switch
 304  0100.5e00.0001  static         ip  --  Fa5/9,Switch
.
.
.

The following example shows how to display static MAC address entries with a specific protocol type (in this case, assigned).

Router# show mac-address-table static protocol assigned
vlan   mac address     type    protocol  qos             ports
-----+---------------+--------+---------+---+--------------------------------
 200  0050.3e8d.6400  static   assigned  --  Router
 100  0050.3e8d.6400  static   assigned  --  Router
   5  0050.3e8d.6400  static   assigned  --  Router

The following example shows the detailed output for the previous example.

Router# show mac-address-table static protocol assigned detail
       MAC Table shown in details
======================================== 
 Type   Always Learn Trap Modified Notify Capture Protocol Flood
-------+------------+----+--------+------+-------+--------+-----+
     QoS bit      L3 Spare   Mac Address  Age Byte Pvlan Xtag SWbits Index
-----------------+--------+--------------+--------+-----+----+------+-----
STATIC      NO        NO     NO      NO     NO    assigned   NO
   Bit Not On        0     0050.3e8d.6400  254      200    1     0     0x3
 
STATIC      NO        NO     NO      NO     NO    assigned   NO
   Bit Not On        0     0050.3e8d.6400  254      100    1     0     0x3
 
STATIC      NO        NO     NO      NO     NO    assigned   NO
   Bit Not On        0     0050.3e8d.6400  254      5      1     0     0x3
 
S   Bit Not On        0     0050.f0ac.3058  254      4092   1     0     0x3   
.
.
.

Examples

This example shows how to display all the static MAC address entries; this Cisco 7600 series router is configured with a Supervisor Engine 720.

Router# show mac-address-table static
Codes: * - primary entry
  vlan   mac address     type    learn qos            ports
------+----------------+--------+-----+---+--------------------------
*  ---  0001.6441.60ca    static  No    --  Router

Related Commands

Command

Description

show mac -address-tableaddress

Displays MAC address table information for a specific MAC address.

show mac -address-tableaging-time

Displays the MAC address aging time.

show mac -address-tablecount

Displays the number of entries currently in the MAC address table.

show mac -address-tabledetail

Displays detailed MAC address table information.

show mac -address-tabledynamic

Displays dynamic MAC address table entries only.

show mac -address-tableinterface

Displays the MAC address table information for a specific interface.

show mac -address-tablemulticast

Displays multicast MAC address table information.

show mac -address-tableprotocol

Displays MAC address table information based on protocol.

show mac -address-tablevlan

Displays the MAC address table information for a specific VLAN.

show spanning-tree

Cisco 2600, 3660, and 3845 Series Switches

To display spanning-tree information for the specified spanning-tree instances, use the showspanning-tree command in privileged EXEC mode.

Cisco 6500/6000 Catalyst Series Switches and Cisco 7600 Series Routers

show spanning-tree [bridge-group] [ active | backbonefast | blockedports | bridge | brief | inconsistentports | interface interface-type interface-number | root | summary [totals] | uplinkfast | vlan vlan-id ]

show spanning-tree [ bridge-group | active | backbonefast | bridge [id] | detail | inconsistentports | interface interface-type interface-number [ portfast [edge] ] | mst [ list | configuration [digest] ] | root | summary [totals] | uplinkfast | vlan vlan-id | port-channel number | pathcost method ]

Syntax Description

bridge-group

(Optional) Specifies the bridge group number. The range is 1 to 255.

active

(Optional) Displays spanning-tree information on active interfaces only.

backbonefast

(Optional) Displays spanning-tree BackboneFast status.

blockedports

(Optional) Displays blocked port information.

bridge

(Optional) D isplays status and configuration of this switch.

brief

(Optional) Specifies a brief summary of interface information.

configuration digest ]

(Optional) D isplays the multiple spanning-tree current region configuration.

inconsistentports

(Optional) Displays information about inconsistent ports.

interface interface-type interface-number

(Optional) Specifies the type and number of the interface. Enter each interface designator, using a space to separate it from the one before and the one after. Ranges are not supported. Valid interfaces include physical ports and virtual LANs (VLANs). See the “Usage Guidelines” for valid values.

list

(Optional) Specifies a multiple spanning-tree instance list.

mst

(Optional) Specifies multiple spanning-tree.

portfast edge ]

(Optional) Displays spanning-tree PortFast edge interface operational status. Beginning with Cisco IOS Release 12.2(33)SXI, the edge keyword is required. In earlier releases, the edge keyword is not used.

root

(Optional) Displays root-switch status and configuration.

summary

(Optional) Specifies a summary of port states.

totals

(Optional) Displays the total lines of the spanning-tree state section.

uplinkfast

(Optional) Displays spanning-tree UplinkFast status.

vlan vlan-id

(Optional) Specifies the VLAN ID. The range is 1 to 1005. Beginning with Cisco IOS Release 12.4(15)T, the valid VLAN ID range is from 1 to 4094.

If the vlan-id value is omitted, the command applies to the spanning-tree instance for all VLANs.

id

(Optional) Identifies the spanning tree bridge.

detail

(Optional) Shows status and configuration details.

port-channel number

(Optional) Identifies the Ethernet channel associated with the interfaces.

pathcost method

(Optional) Displays the default path-cost calculation method that is used. See the “Usage Guidelines” section for the valid values.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

12.0(1)T

This command was introduced.

12.0(5.2)WC(1)

This command was integrated into Cisco IOS Release 12.0(5.2)WC(1).

12.1(6)EA2

This command was integrated into Cisco IOS Release 12.1(6)EA2. The following keywords and arguments were added: bridge-group , active, backbonefast, blockedports, bridge, inconsistentports, pathcostmethod , root, totals, and uplinkfast.

12.2(14)SX

Support for this command was introduced on the Supervisor Engine 720.

12.2(15)ZJ

The syntax added in Cisco IOS Release 12.1(6)EA2 was implemented on the Cisco 2600 series, Cisco 3600 series, and Cisco 3700 series routers.

12.2(17d)SXB

Support for this command on the Supervisor Engine 2 was extended to Cisco IOS Release 12.2(17d)SXB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.3(4)T

The platform support and syntax added in Cisco IOS Release 12.2(15)ZJ was integrated into Cisco IOS Release 12.3(4)T.

12.4(15)T

This command was modified to extend the range of valid VLAN IDs to 1-4094 for specified platforms.

12.2(33)SXI

This command was modified to require the edge keyword after portfast. The command output was modified to show the status of Bridge Assurance and PVST Simulation.

Usage Guidelines

The keywords and arguments that are available with the showspanning-tree command vary depending on the platform you are using and the network modules that are installed and operational.

Cisco 2600, 3660, and 3845 Series Switches

The valid values for interfaceinterface-type are:

  • fastethernet --Specifies a Fast Ethernet IEEE 802.3 interface.
  • port-channel --Specifies an Ethernet channel of interfaces.

Cisco 6500/6000 Catalyst Switches and 7600 Series Routers

The port-channelnumbervalues from 257 to 282 are supported on the Content Switching Module (CSM) and the Firewal Services Module (FWSM) only.

The interface-number argument designates the module and port number. Valid values for interface-number depend on the specified interface type and the chassis and module that are used. For example, if you specify a Gigabit Ethernet interface and have a 48-port 10/100BASE-T Ethernet module that is installed in a 13-slot chassis, valid values for the module number are from 2 to 13 and valid values for the port number are from 1 to 48.

When checking spanning tree-active states and you have a large number of VLANs, you can enter the showspanning-treesummarytotal command. You can display the total number of VLANs without having to scroll through the list of VLANs.

The valid values for interfaceinterface-type are:

  • fastethernet --Specifies a Fast Ethernet IEEE 802.3 interface.
  • port-channel --Specifies an Ethernet channel of interfaces.
  • atm --Specifies an Asynchronous Transfer Mode (ATM) interface.
  • gigabitethernet --Specifies a Gigabit Ethernet IEEE 802.3z interface.
  • multilink --Specifies a multilink-group interface.
  • serial --Specifies a serial interface.
  • vlan --Specifies a catalyst VLAN interface.

The valid values for keyword pathcoastmethod are:

  • append --Appends the redirected output to a URL (supporting the append operation).
  • begin --Begins with the matching line.
  • exclude --Excludes matching lines.
  • include --Includes matching lines.
  • redirect --Redirects output to a URL.
  • tee --Copies output to a URL.

When you run the showspanning-tree command for a VLAN or an interface the switch router will display the different port states for the VLAN or interface. The valid spanning-tree port states are listening, learning, forwarding, blocking, disabled, and loopback. See the table below for definitions of the port states:

Table 4 show spanning-tree vlan Command Port States

Field

Definition

BLK

Blocked is when the port is still sending and listening to BPDU packets but is not forwarding traffic.

DIS

Disabled is when the port is not sending or listening to BPDU packets and is not forwarding traffic.

FWD

Forwarding is when the port is sending and listening to BPDU packets and forwarding traffic.

LBK

Loopback is when the port recieves its own BPDU packet back.

LIS

Listening is when the port spanning tree initially starts to listen for BPDU packets for the root bridge.

LRN

Learning is when the port sets the proposal bit on the BPDU packets it sends out

Examples

Examples

The following example shows that bridge group 1 is running the VLAN Bridge Spanning Tree Protocol:

Router# show spanning-tree 1
Bridge group 1 is executing the VLAN Bridge compatible Spanning Tree Protocol
Bridge Identifier has priority 32768, address 0000.0c37.b055
Configured hello time 2, max age 30, forward delay 20
We are the root of the spanning tree
Port Number size is 10 bits
Topology change flag not set, detected flag not set
Times: hold 1, topology change 35, notification 2
      hello 2, max age 30, forward delay 20
Timers: hello 0, topology change 0, notification 0
  bridge aging time 300
 
Port 8 (Ethernet1) of Bridge group 1 is forwarding
   Port path cost 100, Port priority 128
   Designated root has priority 32768, address 0000.0c37.b055
   Designated bridge has priority 32768, address 0000.0c37.b055
   Designated port is 8, path cost 0
   Timers: message age 0, forward delay 0, hold 0
   BPDU: sent 184, received 0

The following is sample output from the showspanning-treesummarycommand:

Router# show spanning-tree summary
UplinkFast is disabled
Name                 Blocking Listening Learning Forwarding STP Active
-------------------- -------- --------- -------- ---------- ----------
VLAN1                23       0         0        1          24
-------------------- -------- --------- -------- ---------- ----------
              1 VLAN 23       0         0        1          24

The table below describes the significant fields shown in the display.

Table 5 show spanning-tree summary Field Descriptions

Field

Description

UplinkFast

Indicates whether the spanning-tree UplinkFast feature is enabled or disabled.

Name

Name of VLAN.

Blocking

Number of ports in the VLAN in a blocking state.

Listening

Number of ports in a listening state.

Learning

Number of ports in a learning state.

Forwarding

Number of ports in a forwarding state.

STP Active

Number of ports using the Spanning-Tree Protocol.

The following is sample output from the showspanning-treebriefcommand:

Router# show spanning-tree brief
VLAN1
  Spanning tree enabled protocol IEEE
  ROOT ID    Priority 32768
             Address 0030.7172.66c4
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec 
VLAN1
  Spanning tree enabled protocol IEEE
  ROOT ID    Priority 32768
             Address 0030.7172.66c4
Port                           Designated
Name    Port ID Prio Cost Sts  Cost  Bridge ID      Port ID
------- ------- ---- ---- ---  ----  -------------- -------
Fa0/11  128.17  128  100  BLK  38    0404.0400.0001 128.17
Fa0/12  128.18  128  100  BLK  38    0404.0400.0001 128.18
Fa0/13  128.19  128  100  BLK  38    0404.0400.0001 128.19
Fa0/14  128.20  128  100  BLK  38    0404.0400.0001 128.20
Fa0/15  128.21  128  100  BLK  38    0404.0400.0001 128.21
Fa0/16  128.22  128  100  BLK  38    0404.0400.0001 128.22
Fa0/17  128.23  128  100  BLK  38    0404.0400.0001 128.23
Fa0/18  128.24  128  100  BLK  38    0404.0400.0001 128.24
Fa0/19  128.25  128  100  BLK  38    0404.0400.0001 128.25
Fa0/20  128.26  128  100  BLK  38    0404.0400.0001 128.26
Fa0/21  128.27  128  100  BLK  38    0404.0400.0001 128.27
Port                           Designated
Name    Port ID Prio Cost Sts  Cost  Bridge ID      Port ID
------- ------- ---- ---- ---  ----  -------------- -------
Fa0/22  128.28  128  100  BLK  38    0404.0400.0001 128.28
Fa0/23  128.29  128  100  BLK  38    0404.0400.0001 128.29
Fa0/24  128.30  128  100  BLK  38    0404.0400.0001 128.30 Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec 

The table below describes the significant fields shown in the display.

Table 6 show spanning-tree brief Field Descriptions

Field

Description

VLAN1

VLAN for which spanning-tree information is shown.

Spanning tree enabled protocol

Type of spanning tree (IEEE, IBM, CISCO).

ROOT ID

Indicates the root bridge.

Priority

Priority indicator.

Address

MAC address of the port.

Hello Time

Amount of time, in seconds, that the bridge sends bridge protocol data units (BPDUs).

Max Age

Amount of time, in seconds, that a BPDU packet should be considered valid.

Forward Delay

Amount of time, in seconds, that the port spends in listening or learning mode.

Port Name

Interface type and number of the port.

Port ID

Identifier of the named port.

Prio

Priority associated with the port.

Cost

Cost associated with the port.

Sts

Status of the port.

Designated Cost

Designated cost for the path.

Designated Bridge ID

Bridge identifier of the bridge assumed to be the designated bridge for the LAN associated with the port.

The following is sample output from the showspanning-treevlan1command:

Router# show spanning-tree vlan 1
Spanning tree 1 is executing the IEEE compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, address 00e0.1eb2.ddc0
  Configured hello time 2, max age 20, forward delay 15
  Current root has priority 32768, address 0010.0b3f.ac80
  Root port is 5, cost of root path is 10
  Topology change flag not set, detected flag not set, changes 1
  Times:  hold 1, topology change 35, notification 2
          hello 2, max age 20, forward delay 15
  Timers: hello 0, topology change 0, notification 0
Interface Fa0/1  in Spanning tree 1 is down
   Port path cost 100, Port priority 128
   Designated root has priority 32768, address 0010.0b3f.ac80
Designated bridge has priority 32768, address 00e0.1eb2.ddc0
   Designated port is 1, path cost 10
   Timers: message age 0, forward delay 0, hold 0
   BPDU: sent 0, received 0 
   

The table below describes the significant fields shown in the display.

Table 7 show spanning-tree vlan Field Descriptions

Field

Description

Spanning tree

Type of spanning tree (IEEE, IBM, CISCO).

Bridge Identifier

Part of the bridge identifier and taken as the most significant part for bridge ID comparisons.

address

Bridge MAC address.

Root port

Identifier of the root port.

Topology change

Flags and timers associated with topology changes.

The following is sample output from the showspanning-treeinterfacefastethernet0/3command:

Router# show spanning-tree interface fastethernet0/3
Interface Fa0/3 (port 3) in Spanning tree 1 is down
   Port path cost 100, Port priority 128
   Designated root has priority 6000, address 0090.2bba.7a40
   Designated bridge has priority 32768, address 00e0.1e9f.4abf
   Designated port is 3, path cost 410
   Timers: message age 0, forward delay 0, hold 0
   BPDU: sent 0, received 0

Examples

This example shows how to display a summary of interface information:

Router# 
show spanning-tree
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    4097
             Address     0004.9b78.0800
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    4097   (priority 4096 sys-id-ext 1)
             Address     0004.9b78.0800
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 15 
Interface        Port ID                     Designated                Port ID
Name             Prio.Nbr      Cost Sts      Cost Bridge ID            Prio.Nbr
---------------- -------- --------- --- --------- -------------------- --------
Gi2/1            128.65           4 LIS         0  4097 0004.9b78.0800 128.65  
Gi2/2            128.66           4 LIS         0  4097 0004.9b78.0800 128.66  
Fa4/3            128.195         19 LIS         0  4097 0004.9b78.0800 128.195 
Fa4/4            128.196         19 BLK         0  4097 0004.9b78.0800 128.195 
Router#

The table below describes the fields that are shown in the example.

Table 8 show spanning-tree Command Output Fields

Field

Definition

Port ID Prio.Nbr

Port ID and priority number.

Cost

Port cost.

Sts

Status information.

This example shows how to display information about the spanning tree on active interfaces only:

Router# 
show spanning-tree active
UplinkFast is disabled
BackboneFast is disabled
 VLAN1 is executing the ieee compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, address 0050.3e8d.6401
  Configured hello time 2, max age 20, forward delay 15
  Current root has priority 16384, address 0060.704c.7000
  Root port is 265 (FastEthernet5/9), cost of root path is 38
  Topology change flag not set, detected flag not set
  Number of topology changes 0 last change occurred 18:13:54 ago
  Times:  hold 1, topology change 24, notification 2
          hello 2, max age 14, forward delay 10
  Timers: hello 0, topology change 0, notification 0
Router#

This example shows how to display the status of spanning-tree BackboneFast:

Router# show spanning-tree backbonefast
BackboneFast is enabled
 
BackboneFast statistics
-----------------------
Number of transition via backboneFast (all VLANs) : 0
Number of inferior BPDUs received (all VLANs)     : 0
Number of RLQ request PDUs received (all VLANs)   : 0
Number of RLQ response PDUs received (all VLANs)  : 0
Number of RLQ request PDUs sent (all VLANs)       : 0
Number of RLQ response PDUs sent (all VLANs)      : 0
Router# 

This example shows how to display information about the spanning tree for this bridge only:

Router# show spanning-tree bridge
VLAN1
  Bridge ID  Priority    32768
             Address     0050.3e8d.6401
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
.
Router#

This example shows how to display detailed information about the interface:

Router# 
show spanning-tree detail
VLAN1 is executing the ieee compatible Spanning Tree protocol 
Bridge Identifier has priority 4096, address 00d0.00b8.1401 
Configured hello time 2, max age 20, forward delay 15 
We are the root of the spanning tree 
Topology change flag not set, detected flag not set 
Number of topology changes 9 last change occurred 02:41:34 ago 
from FastEthernet4/21 
Times: hold 1, topology change 35, notification 2 
hello 2, max age 20, forward delay 15 
Timers: hello 1, topology change 0, notification 0, aging 300 

Port 213 (FastEthernet4/21) of VLAN1 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.213. 
Designated root has priority 4096, address 00d0.00b8.1401 
Designated bridge has priority 4096, address 00d0.00b8.1401 
Designated port id is 128.213, designated path cost 0 
Timers: message age 0, forward delay 0, hold 0 
Number of transitions to forwarding state: 1 
BPDU: sent 4845, received 1 
Router# 

This example shows how to display information about the spanning tree for a specific interface:

Router# show spanning-tree interface fastethernet 5/9
Interface Fa0/10 (port 23) in Spanning tree 1 is ROOT-INCONSISTENT
Port path cost 100, Port priority 128
Designated root has priority 8192, address 0090.0c71.a400
Designated bridge has priority 32768, address 00e0.1e9f.8940

This example shows how to display information about the spanning tree for a specific bridge group:

Router# 
show spanning-tree 1
UplinkFast is disabled
 BackboneFast is disabled
 
  Bridge group 1 is executing the ieee compatible Spanning Tree protocol
   Bridge Identifier has priority 32768, address 00d0.d39c.004d
   Configured hello time 2, max age 20, forward delay 15
   Current root has priority 32768, address 00d0.d39b.fddd
   Root port is 7 (FastEthernet2/2), cost of root path is 19
   Topology change flag set, detected flag not set
   Number of topology changes 3 last change occurred 00:00:01 ago
           from FastEthernet2/2
   Times:  hold 1, topology change 35, notification 2
           hello 2, max age 20, forward delay 15 
   Timers: hello 0, topology change 0, notification 0  bridge aging time 15
 
Port 2 (Ethernet0/1/0) of Bridge group 1 is down
                                        
    Port path cost 100, Port priority 128
    Designated root has priority 32768, address 0050.0bab.1808
    Designated bridge has priority 32768, address 0050.0bab.1808
    Designated port is 2, path cost 0
    Timers: message age 0, forward delay 0, hold 0
    BPDU: sent 0, received 0                                
Router#      

This example shows how to display a summary of port states:

Router# 
show spanning-tree summary
 
Root bridge for: Bridge group 1, VLAN0001, VLAN0004-VLAN1005 
 VLAN1013-VLAN1499, VLAN2001-VLAN4094 
EtherChannel misconfiguration guard is enabled 
Extended system ID is enabled 
Portfast is enabled by default 
PortFast BPDU Guard is disabled by default 
Portfast BPDU Filter is disabled by default 
Loopguard is disabled by default 
UplinkFast is disabled 
BackboneFast is disabled 
Platform PVST Simulation is enabled
Pathcost method used is long
Name                   Blocking Listening Learning Forwarding STP Active 
---------------------- -------- --------- -------- ---------- ---------- 
1 bridge               0        0         0        1          1 
3584 vlans 3584 0 0 7168 10752

Blocking Listening Learning Forwarding STP Active 
---------------------- -------- --------- -------- ---------- ---------- 
Total                  3584     0         0        7169       10753 
Router#      

This example shows how to display the total lines of the spanning-tree state section:

Router#  
show spanning-tree summary total 
Root bridge for:Bridge group 10, VLAN1, VLAN6, VLAN1000.
Extended system ID is enabled.
PortFast BPDU Guard is disabled
EtherChannel misconfiguration guard is enabled
UplinkFast is disabled
BackboneFast is disabled
Default pathcost method used is long
Name                 Blocking Listening Learning Forwarding STP Active
-------------------- -------- --------- -------- ---------- ----------
           105 VLANs 3433     0         0        105        3538      
 
BackboneFast statistics
-----------------------
Number of transition via backboneFast (all VLANs) :0
Number of inferior BPDUs received (all VLANs)     :0
Number of RLQ request PDUs received (all VLANs)   :0
Number of RLQ response PDUs received (all VLANs)  :0
Number of RLQ request PDUs sent (all VLANs)       :0
Number of RLQ response PDUs sent (all VLANs)      :0
Router# 

This example shows how to display information about the spanning tree for a specific VLAN:

Router# 
show spanning-tree vlan 200
VLAN0200 
 Spanning tree enabled protocol ieee 
 Root ID Priority 32768 
    Address 00d0.00b8.14c8 
    This bridge is the root 
    Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Bridge ID Priority 32768 
    Address 00d0.00b8.14c8 
    Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec 
    Aging Time 300
Interface Role Sts Cost Prio.Nbr Status 
---------------- ---- --- --------- -------- -------------------------------- 
Fa4/4 Desg FWD 200000 128.196 P2p 
Fa4/5 Back BLK 200000 128.197 P2p
Router#

The table below describes the fields that are shown in the example.

Table 9 show spanning-tree vlan Command Output Fields

Field

Definition

Role

Current 802.1w role; valid values are Boun (boundary), Desg (designated), Root, Altn (alternate), and Back (backup).

Sts

Spanning-tree states; valid values are BKN* (broken)2, BLK (blocking), DWN (down), LTN (listening), LBK (loopback), LRN (learning), and FWD (forwarding).

Cost

Port cost.

Prio.Nbr

Port ID that consists of the port priority and the port number.

Status

Status information; valid values are as follows:

  • P2p/Shr--The interface is considered as a point-to-point (resp. shared) interface by the spanning tree.
  • Edge--PortFast has been configured (either globally using the defaultcommand or directly on the interface) and no BPDU has been received.
  • *ROOT_Inc, *LOOP_Inc, *PVID_Inc and *TYPE_Inc--The port is in a broken state (BKN*) for an inconsistency. The port would be (respectively) Root inconsistent, Loopguard inconsistent, PVID inconsistent, or Type inconsistent.
  • Bound(type)--When in MST mode, identifies the boundary ports and specifies the type of the neighbor (STP, RSTP, or PVST).
  • Peer(STP)--When in PVRST rapid-pvst mode, identifies the port connected to a previous version of the 802.1D bridge.
2 For information on the *, see the definition for the Status field.

This example shows how to determine if any ports are in the root-inconsistent state:

Router#  
show spanning-tree inconsistentports 
 
Name                 Interface            Inconsistency
-------------------- -------------------- ------------------
 VLAN1               FastEthernet3/1      Root Inconsistent
Number of inconsistent ports (segments) in the system :1
Router# 

Related Commands

Command

Description

spanning-tree backbonefast

Enables BackboneFast on all Ethernet VLANs.

spanning-tree cost

Sets the path cost of the interface for STP calculations.

spanning-tree guard

Enables or disables the guard mode.

spanning-tree pathcost method

Sets the default path-cost calculation method.

spanning-tree portfast (interface configuration mode)

Enables PortFast mode.

spanning-tree portfast bpdufilter default

Enables BPDU filtering by default on all PortFast ports.

spanning-tree portfast bpduguard default

Enables BPDU guard by default on all PortFast ports.

spanning-tree port-priority

Sets an interface priority when two bridges vie for position as the root bridge.

spanning-tree uplinkfast

Enables UplinkFast.

spanning-tree vlan

Enables the STP on a VLAN.

show udld

To display the administrative and operational Unidirectional Link Detection Protocol (UDLD) status, use the show udld command in user EXEC mode.

show udld [ interface-id | neighbors ]

Syntax Description

interface-id

(Optional) Interface name and number.

neighbors

(Optional) Displays neighbor information only.

Command Modes

User EXEC (>)

Command History

Release

Modification

12.2(14)SX

Support for this command was introduced on the Supervisor Engine 720.

12.2(17d)SXB

Support for this command on the Supervisor Engine 2 was extended to Release 12.2(17d)SXB.

12.2(18)SXD

This command was changed to include the neighbors keyword.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

Usage Guidelines

If you do not enter an interface-id value, the administrative and operational UDLD status for all interfaces are displayed.

Examples

This example shows how to display the UDLD state for a single interface. The fields shown in the display are self-explanatory.

Router# 
show udld gigabitethernet2/2
Interface Gi2/2
---
Port enable administrative configuration setting: Follows device default
Port enable operational state: Enabled
Current bidirectional state: Bidirectional
Current operational state: Advertisement
Message interval: 60
Time out interval: 5
No multiple neighbors detected
    Entry 1
    ---
    Expiration time: 146
    Device ID: 1
    Current neighbor state: Bidirectional
    Device name: 0050e2826000  
    Port ID: 2/1  
    Neighbor echo 1 device: SAD03160954
    Neighbor echo 1 port: Gi1/1
    Message interval: 5
    CDP Device name: 066527791  
Router# 

This example shows how to display neighbor information only. The fields shown in the display are self-explanatory.

Router# 
show udld neighbors
Port     Device Name                    Device ID    Port-ID OperState
-------- ------------------------------ ------------ ------- --------------
Gi3/1    SAL0734K5R2                    1            Gi4/1   Bidirectional
Gi4/1    SAL0734K5R2                    1            Gi3/1   Bidirectional
Router# 

Related Commands

Command

Description

udld

Enables aggressive or normal mode in UDLD and sets the configurable message time.

udld port

Enables UDLD on the interface or enables UDLD in aggressive mode on the interface.