Entries in a MAC Address Table
You can add a MAC address entry in global configuration mode or interface configuration
mode.
Perform following commands in global configuration mode.
Table 29-2 Add a MAC address entry
Enter interface configuration
mode
interface {interface_type
interface_num |
interface_name }
mac-address-table { static |
permanent | dynamic } mac
interface interface-num vlan
vlan-id
This command for adding
static/permanent/dynamic
mac address entry.
mac-address-table blackhole
mac vlan vlan-id
This command is only for
adding blackhole mac
address entry.
Caution:
When you add a MAC address entry, the port specified by the interface argument must
belong to the VLAN specified by the vlan argument in the command. Otherwise, the entry will
not be added.
Setting the Aging Time of MAC Address Entries
Setting aging time properly helps implement effective MAC address aging. The aging time
that is too long or too short results in a large amount of broadcast packets wandering across
the network and decreases the performance of the switch.
If the aging time is too long, excessive invalid MAC address entries maintained by the
switch may fill up the MAC address table. This prevents the MAC address table from varying
with network changes in time.
If the aging time is too short, the switch may remove valid MAC address entries. This
decreases the forwarding performance of the switch.
Table 29-3 Set aging time of MAC address entries
Set the aging time of MAC
address entries
mac-address-table age-time
[ agetime | disable ]
The default aging time is 300
seconds.
This command is used in global configuration mode and applies to all ports. Aging applies
to only dynamic MAC addresses that are learnt or configured to age.
Normally, you are recommended to use the default aging time, namely, 300 seconds. The
no-aging keyword specifies that MAC address entries do not age out.
Setting the Maximum Number of MAC Addresses a Port Can Learn