Cisco IOS LAN Switching Command Reference, Release 12.3 T
LAN Switching Commands: clear mac-address-table through encapsulation sde

Table Of Contents

Cisco IOS LAN Switching and Multilayer Switching Commands

clear mac-address-table

clear vlan

clear vlan mapping

clear vlan statistics

encapsulation isl

encapsulation sde


Cisco IOS LAN Switching and Multilayer Switching Commands


This chapter presents the Cisco IOS LAN Switching and Multilayer Switching commands.

clear mac-address-table

To remove a specified address (or set of addresses) from the MAC address table, use the clear mac-address-table command in privileged EXEC mode.

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

clear mac-address-table [dynamic | secure | static] [address mac-address] [interface type slot/port]

Catalyst Switches

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

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) Target MAC address.

interface

Clears all addresses for an interface.

type

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

slot

(Optional) The module interface number. Valid entries equal the number of ports on the chassis.

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 GigabitEthernet

Catalyst Switches

Port interface number ranging from 1 to 28:

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


Defaults

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

All MAC addresses on the router being configured are cleared.

Catalyst Switches

The dynamic addresses are cleared.

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.


Usage Guidelines

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

If the clear mac-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.

Catalyst Switches

If the clear mac-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

Examples

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 ether 0/1

Catalyst Switches

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

Router# clear mac-address-table

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 ether 0/1

Related Commands

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

Command
Description

mac-address-table (aging-time)

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

mac-address-table (secure)

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

mac-address-table (static)

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

show (mac-address-table)

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

show (mac-address-table secure)

Displays the addressing security configuration.


Catalyst Switches

Command
Description

mac-address-table (aging-time)

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

mac-address-table (permanent)

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

mac-address-table (restricted static)

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

show (mac-address-table)

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

show (mac-address-table security)

Displays the addressing security configuration.


clear vlan

To delete an existing virtual LAN (VLAN) from a management domain, use the clear vlan command in privileged EXEC mode.

clear vlan vlan

Syntax Description

vlan

Number of the VLAN. Valid values are 2 to 1000.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.0

This command was introduced.


Usage Guidelines

Follow these guidelines for deleting VLANs:

When you delete an Ethernet VLAN in Virtual Terminal Protocol (VTP) server mode, the VLAN is removed from all switches in the same VTP domain.

When you delete a VLAN in VTP transparent mode, the VLAN is deleted only on the current switch.

To delete a Token Ring Bridge Relay Function (TRBRF) VLAN, you must either first reassign its child Token Ring Concentrator Relay Functions (TRCRFs) to another parent TRBRF or delete the child TRCRFs.


Caution When you clear a VLAN, all ports assigned to that VLAN become inactive. However, the VLAN port assignments are retained until you move the ports to another VLAN. If the cleared VLAN is reactivated, all ports still configured on that VLAN are also reactivated. A warning is displayed if you clear a VLAN that exists in the mapping table.

Examples

The following example shows how to clear an existing VLAN (VLAN 4) from a management domain:

Router# clear vlan 4 
This command will deactivate all ports on vlan 4 
in the entire management domain 
Do you want to continue(y/n) [n]? y 
VLAN 4 deleted

Related Commands

Command
Description

set vlan

Groups ports into a VLAN.

show vlans

Displays VLAN subinterfaces.


clear vlan mapping

To delete existing 802.1Q virtual LAN (VLAN) to Inter-Switch Link (ISL) VLAN-mapped pairs, use the clear vlan mapping command in privileged EXEC mode.

clear vlan mapping dot1q {1q-vlan | all}

Syntax Description

dot1q

Specifies the 802.1Q VLAN.

1q-vlan

Number of the 802.1Q VLAN for which to remove the mapping.

all

Clears the mapping table of all entries.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.0

This command was introduced.


Examples

The following example shows how to clear an existing mapped 802.1Q VLAN (VLAN 1044) from the
mapping table:

Router# clear vlan mapping dot1q 1044
Vlan Mapping 1044 Deleted.

The following example shows how to clear all mapped 802.1Q VLANs from the mapping table:

Router# clear vlan mapping dot1q all
All Vlan Mapping Deleted.

Related Commands

Command
Description

set vlan mapping

Maps 802.1Q VLANs to ISL VLANs.

show vlan mapping

Displays VLAN mapping table information.


clear vlan statistics

To remove virtual LAN statistics from any statically or system-configured entries, use the clear vlan statistics command in privileged EXEC mode.

clear vlan statistics

Syntax Description

This command has no arguments or keywords.

Defaults

No default behavior or values

Command Modes

Privileged EXEC

Command History

Release
Modification

11.2

This command was introduced.

12.2(33)SRA

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


Examples

The following example clears VLAN statistics:

Router# clear vlan statistics

Related Commands

Command
Description

show vlan counters

Displays the software-cached counter values.


encapsulation isl

To enable the Inter-Switch Link (ISL), use the encapsulation isl command in subinterface configuration mode.

encapsulation isl vlan-identifier

Syntax Description

vlan-identifier

Virtual LAN (VLAN) identifier. The allowed range is from 1 to 1000.


Defaults

ISL is disabled.

Command Modes

Subinterface configuration

Command History

Release
Modification

11.1

This command was introduced.


Usage Guidelines

ISL is a Cisco protocol for interconnecting multiple switches and routers, and for defining VLAN topologies.

ISL encapsulation is configurable on Fast Ethernet interfaces.

ISL encapsulation adds a 26-byte header to the beginning of the Ethernet frame. The header contains a 10-bit VLAN identifier that conveys VLAN membership identities between switches.

Examples

The following example shows how to enable ISL on Fast Ethernet subinterface 2/1.20:

Router(config)# interface FastEthernet 2/1.20 

Router(config-subif)# encapsulation isl 400

Related Commands

Command
Description

bridge-group

Assigns each network interface to a bridge group.

show interfaces

Displays statistics for all interfaces configured on the router or access server.

show vlans

Displays VLAN subinterfaces.


encapsulation sde

To enable IEEE 802.10 encapsulation of traffic on a specified subinterface in virtual LANs (VLANs), use the encapsulation sde command in subinterface configuration mode.

encapsulation sde sa-id

Syntax Description

sa-id

Security association identifier. This value is used as the VLAN identifier. The valid range is from 0 to 0xFFFFFFFE.


Defaults

IEEE 802.10 encapsulation is disabled.

Command Modes

Subinterface configuration

Command History

Release
Modification

10.3

This command was introduced.


Usage Guidelines

IEEE 802.10 is a standard protocol for interconnecting multiple switches and routers and for defining VLAN topologies.

Secure Data Exchange (SDE) encapsulation is configurable only on the following interface types:

IEEE 802.10 routing: FDDI

IEEE 802.10 transparent bridging:

Ethernet

FDDI

HDLC serial

Transparent mode

Token Ring

Examples

The following example shows how to enable SDE on FDDI subinterface 2/0.1 and assigns a VLAN identifier of 9999:

Router(config)# interface fddi 2/0.1
Router(config-subif)# encapsulation sde 9999

Related Commands

Command
Description

bridge-group

Assigns each network interface to a bridge group.

show interfaces

Displays statistics for all interfaces configured on the router or access server.

show vlans

Displays VLAN subinterfaces.