0% found this document useful (0 votes)
115 views

10-MAC Address Table Configuration Commands

This document provides an overview of MAC address table configuration commands, including commands to configure static MAC addresses, aging time, shared learning, display the MAC address table, and clear dynamic addresses. Static MAC addresses can be added or removed with the mac address-table static command. The mac address-table aging-time command configures the aging time for dynamic addresses. The switchport shared-learning command configures VLANs to share MAC addresses on an interface. The show mac address-table command displays the MAC address table. The clear mac address-table command deletes dynamic addresses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views

10-MAC Address Table Configuration Commands

This document provides an overview of MAC address table configuration commands, including commands to configure static MAC addresses, aging time, shared learning, display the MAC address table, and clear dynamic addresses. Static MAC addresses can be added or removed with the mac address-table static command. The mac address-table aging-time command configures the aging time for dynamic addresses. The switchport shared-learning command configures VLANs to share MAC addresses on an interface. The show mac address-table command displays the MAC address table. The clear mac address-table command deletes dynamic addresses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MAC Address Table Characteristics

Configuration Commands

Table of Contents

Table of Contents
Chapter 1 MAC Address Table Characteristics Configuration Commands .......................................................................... 1
1.1 MAC Address Table Characteristic Configuration Commands .............................................................................. 1
1.1.1 mac address-table static ........................................................................................................................... 1
1.1.2 mac address-table aging-time................................................................................................................... 1
1.1.3 switchport shared-learning ........................................................................................................................ 2
1.1.4 show mac address-table ........................................................................................................................... 2
1.1.5 clear mac address-table............................................................................................................................ 3

-I-

MAC Address Table Characteristics Configuration Commands

Chapter 1 MAC Address Table Characteristics


Configuration Commands
1.1
1.1.1

MAC Address Table Characteristic Configuration Commands


mac address-table static

description
To add/delete a static MAC address, use the mac address-table static command.
[no] mac address-table static mac-addr vlan vlan-id interface interface-id

parameter
parameter

description

mac-addr

MAC address. Value format: H.H.H.

vlan-id

Vlan id of the MAC address, in the range from 1 to 4094.

interface-id

Interface id of the MAC address.

Default
none

command mode
global configuration

example
The following example binds the MAC address 0004.5600.67ab to the interface g0/2 of
VLAN 1:
Switch(config)# mac address-table static 0004.5600.67ab vlan 1 interface g0/2

1.1.2

mac address-table aging-time

description
To configure the maximum aging time for MAC address table, use the
mac-address-table aging-time command in global configuration mode.
mac address-table aging-time [0 | 10-1000000]

parameter
parameter

description

The aging time for MAC address table is disabled.

10-1000000

The aging time for MAC address table. Valid values are from 10

-1-

MAC Address Table Characteristics Configuration Commands


to 1000000 seconds.

Default
none

command mode
global configuration mode

example
The following example configures the aging time for MAC address table to 100
seconds:
Switch(config)# mac address-table aging-time 100

1.1.3

switchport shared-learning

description
To configure VLAN to share MAC address, use the switch shared-learing command.
switchport shared-learning

parameter
none

default
disabled

command mode
interface configuration mode

example
The following example cofigures all Vlans to share MAC address on interface f0/1:
Switch_config_f0/1#switchport shared-learning

1.1.4

show mac address-table

description
To display the content of the switch MAC address table, use the show mac
address-table command.
show mac address-table {dynamic [interface interface-id | vlan vlan-id] | static}

parameter
paramenter

description

-2-

MAC Address Table Characteristics Configuration Commands

dynamic

The MAC address table that acquires dynamically.

interface-id

Interface name

vlan-id

VLAN ID, in the range from 1 to 4094.

static

The static MAC address table.

default
none

instruction
Use this command to display MAC address table.

example
The following example displays all static MAC address tables:
Switch# show mac address-table static
Mac Address Table
-----------------------------------------Vlan Mac Address Type Ports
---- ----------- ---- ----All 0000.0000.0001 STATIC CPU
All 0000.0000.0002 STATIC CPU
All 0000.0000.0003 STATIC CPU
All 0000.0000.0009 STATIC CPU
All 0000.0000.0012 STATIC CPU
All 0180.c200.000b STATIC CPU
All 0180.c200.000c STATIC CPU
All 0180.c200.000d STATIC CPU
All 0180.c200.0010 STATIC CPU

1.1.5

clear mac address-table

description
To delete a dynamic MAC address, use the clear mac address-table
clear mac address-table dynamic [address mac-addr | interface interface-id | vlan
vlan-id]

parameter
parameter

description

dynamic

The dynamic MAC address

address mac-addr

The MAC address. Value range: H.H.H.

interface-id

Layer 2 interface name.

vlan-id

VLAN ID, in the range from 1 to 4094.

-3-

MAC Address Table Characteristics Configuration Commands

default
none

command mode
EXEC

example
The following example deletes all MAC addresses that acquire dynamically on interface
f0/2:
Switch# clear mac address-table dynamic interface f0/2

-4-

You might also like