clear mac-address-table through flowcontrol

clear mac-address-table through flowcontrol

clear mac-address-table

To remove a specified address (or set of addresses) from the MAC address table, use the clearmac-address-tablecommand inprivileged EXEC mode.

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

clear mac-address-table [ dynamic | restricted static | permanent ] [ address mac-address ] [ interface type module port ]

clear mac-address-table notification mac-move counter [vlan]

clear mac-address-table dynamic [ address mac-address | interface interface-type interface-number | vlan vlan-id ]

Syntax Description

dynamic

(Optional) Clears only dynamic addresses.

secure

(Optional) Clears only secure addresses.

static

(Optional) Clears only static addresses.

restricted static

(Optional) Clears only restricted static addresses.

permanent

(Optional) Clears only permanent addresses.

address

(Optional) Clears only a specified address.

mac -address

(Optional) Specifies the MAC address.

interface

(Optional) Clears all addresses for an interface.

type

(Optional) Interface type: ethernet, fastethernet, fddi, atm, or port channel.

slot

(Optional) The module interface number.

interface-type interface-number

(Optional) Module and port number. The see the “Usage Guidelines” section for valid values.

notification mac-move counter

Clears the MAC-move notification counters.

vlan

(Optional) Specifies the VLAN to clear the MAC-move notification counters.

protocol assigned

(Optional) Specifies the assigned protocol accounts for such protocols such as DECnet, Banyan VINES, and AppleTalk.

protocol ip | ipx

(Optional) Specifies the protocol type of the entries to clear.

protocol other

(Optional) Specifies the protocol types (other than IP or IPX) of the entries to clear.

vlan vlan-id

(Optional) Specifies the VLAN ID; valid values are from 1 to 4094.

module

(Optional) The module interface number:

  • 0 for fixed
  • 1 or A for module A
  • 2 or B for module B

port

(Optional)

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

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

Catalyst Switches

Port interface number ranging from 1 to 28:

  • 1 to 25 for Ethernet (fixed)
  • 26, 27 for Fast Ethernet (fixed)
  • Port channel

Command Default

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

All MAC addresses on the router being configured are cleared.

Using Catalyst Switches

The dynamic addresses are cleared.

Clearing a Dynamic Address

This command has no defaults in this mode.

Command Modes


Privileged EXEC (#)

Command History

Release

Modification

12.2(2)XT

This command was introduced 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(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 Cisco IOS Release 12.2(17d)SXB.

12.2(33)SRA

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

12.2(33)SXI

This command was changed to add the notificationmac-movecounter [vlan] keywords and argument.

Usage Guidelines

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

If the clearmac-address-table command is invoked with no options, all MAC addresses are removed. If you specify an address but do not specify an interface, the address is deleted from all interfaces. If you specify an interface but do not specify an address, all addresses on the specified interface are removed.

Using Catalyst Switches

If the clearmac-address-table command is invoked with no options, all dynamic addresses are removed. If you specify an address but do not specify an interface, the address is deleted from all interfaces. If you specify an interface but do not specify an address, all addresses on the specified interface are removed.

If a targeted address is not present in the MAC forwarding table, the following error message appears:

MAC address not found

Clearing a Dynamic Address

The valid values for the interface argument include thege-wan, atm, and pos keywords that are supported on Cisco 7600 series routers that are configured with a Supervisor Engine 2.

The protocol {assigned | ip | ipx| other} keywords are supported on Cisco 7600 series routers that are configured with a Supervisor Engine 2 only.

Enter the clearmac-address-tabledynamic command to remove all dynamic entries from the table.

The following values are valid for interface-type:

  • fastethernet
  • gigabitethernet
  • port-channel

Setting the Module and Port

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 1 to 13 and valid values for the port number are from 1 to 48.

Examples

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

The following example shows how to clear all dynamic addresses in the MAC forwarding table:

Router# clear mac-address-table dynamic

The following example shows how to clear the static address 0040.C80A.2F07 on Ethernet port 1:

Router# clear mac-address-table static address 0040.C80A.2F07 interface ethernet 0/1

Using Catalyst Switches

The following example shows how to clear all dynamic addresses in the MAC forwarding table:

Router# clear mac-address-table dynamic

The following example shows how to clear the MAC-move notification counters on a specific VLAN:

Router# clear mac-address-table notification mac-move counter 202

The following example shows the permanent address 0040.C80A.2F07 being cleared on Ethernet port 1:

Router# clear mac-address-table permanent address 0040.C80A.2F07 interface ethernet 0/1

Clearing a Dynamic Address on a 7600 using a Supervisor Engine 2

This example shows how to clear all dynamic Layer 2 entries for a specific interface (abc) and protocol type (IPX):

Router# clear mac-address-table dynamic interface abc protocol ipx

Related Commands

Command

Description

mac -address-tableaging-time

Configures the length of time the switch keeps dynamic MAC addresses in memory before discarding.

mac -address-tablepermanent

Associates a permanent unicast or multicast MAC address with a particular switched port interface.

mac -address-tablerestrictedstatic

Associates a restricted static address with a particular switched port interface.

mac -address-tablesecure

Associates a secure static address with a particular switched port interface.

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.

show mac -address-table

Displays addresses in the MAC address table for a switched port or module.

show mac -address-tablesecure

Displays the addressing security configuration.

show mac -address-tablesecurity

Displays the addressing security configuration.

clear pagp

To clear the port-channel information, use the clearpagp command in privileged EXEC mode.

clear pagp { group-number | counters }

Syntax Description

group-number

Channel group number; valid values are a maximum of 64 values from 1 to 256.

counters

Clears traffic filters.

Command Default

This command has no default settings.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

12.2(14)SX

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.

Examples

This example shows how to clear the port-channel information for a specific group:

Router# clear pagp 324

This example shows how to clear the port-channel traffic filters:

Router# clear pagp counters

Related Commands

Command

Description

show pagp

Displays port-channel information.

clear vtp counters

To clear VLAN Trunk Protocol (VTP) counters, use the clearvtpcounters command in privileged EXEC mode.

clear vtp counters

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC (#)

Command History

Release

Modification

15.0(1)M

This command was introduced in a release earlier than Cisco IOS Release 15.0(1)M.

12.2(33)SRE

This command was integrated into a release earlier than Cisco IOS Release 12.2(33)SRE.

12.2(33)SXI

This command was integrated into a release earlier than Cisco IOS Release 12.2(33)SXI.

Examples

The following example shows how to clear VTP counters:

Router# clear vtp counters

Related Commands

Command

Description

show vtp

Displays general information about the VTP management domain, status, and counters.

vtp

Configures the global VTP state.

flowcontrol

To configure a port to send or receive pause frames, use the flowcontrol command in interface configuration mode. To return to the default settings, use the no form of this command.

flowcontrol { send | receive } { desired | off | on }

no flowcontrol { send | receive } { desired | off | on }

Syntax Description

send

Specifies that a port sends pause frames.

receive

Specifies that a port processes pause frames.

desired

Obtains predictable results regardless of whether a remote port is set to on, off, or desired.

off

Prevents a local port from receiving and processing pause frames from remote ports or from sending pause frames to remote ports.

on

Enables a local port to receive and process pause frames from remote ports or send pause frames to remote ports.

Command Default

Flow control is disabled.

Flow-control defaults depend upon port speed. The defaults are as follows:

  • Gigabit Ethernet ports default to off for receive and desired for send.
  • Fast Ethernet ports default to off for receive and on for send.
  • On the 24-port 100BASE-FX and 48-port 10/100 BASE-TX RJ-45 modules, the default is off for receive and off for send.
  • You cannot configure how WS-X6502-10GE 10-Gigabit Ethernet ports respond to pause frames. WS-X6502-10GE 10-Gigabit Ethernet ports are permanently configured to respond to pause frames.

Command Modes

Interface configuration (config-if)

Command History

Release

Modification

12.2(14)SX

This command was introduced on the Supervisor Engine 720.

12.2(17d)SXB

This command was implemented on the Supervisor Engine 2.

12.2(33)SRA

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

12.2(33)SCB

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

Usage Guidelines

The send and desired keywords are supported on Gigabit Ethernet ports only.

Pause frames are special packets that signal a source to stop sending frames for a specific period of time because the buffers are full.

Gigabit Ethernet ports on the Catalyst 6500 series switches and on the Cisco 7600 series routers use flow control to inhibit the transmission of packets to the port for a period of time; other Ethernet ports use flow control to respond to flow-control requests.

If a Gigabit Ethernet port receive buffer becomes full, the port transmits a “pause” packet that tells remote ports to delay sending more packets for a specified period of time. All Ethernet ports (1000 Mbps, 100 Mbps, and 10 Mbps) can receive and act upon “pause” packets from other devices.

You can configure non-Gigabit Ethernet ports to ignore received pause frames (disable) or to react to them (enable).

When used with the receivekeyword, the on and desired keywords have the same result.

All the Gigabit Ethernet ports on the Catalyst 6500 series switches and the Cisco 7600 series routers can receive and process pause frames from remote devices.

To obtain predictable results, follow these guidelines:

  • Use sendon only when remote ports are set to receiveon or receivedesired.
  • Use sendoff only when remote ports are set to receiveoff or receivedesired.
  • Use receiveon only when remote ports are set to sendon or senddesired.
  • Use sendoff only when remote ports are set to receiveoff or receivedesired.

Examples

These examples show how to configure the local port to not support any level of flow control by the remote port:

Router# configure terminal
 
Router(config)# interface GigabitEthernet1/9 10.4.9.157 255.255.255.0
 
Router(config-if)# flowcontrol receive off
Router(config-if)# flowcontrol send off

Related Commands

Command

Description

show interfaces flowcontrol

Displays flow-control information.