Configuring MAC Addresses
Configuring Static MAC Addresses
You can configure static MAC addresses for the switch. These addresses can be configured in interface
configuration mode or in VLAN configuration mode.
Procedure
Purpose
Command or Action
Enters global configuration mode.
switch#
configure terminal
Step 1
Specifies a static address to add to the MAC address
table.
switch(config) #
mac address-table
static mac_address vlan vlan-id
{
drop
Step 2
|
interface
{
type slot
/
port
} |
port-channel number
} [
auto-learn
]
If you enable the
auto-learn
option, the switch will
update the entry if the same MAC address is seen on a
different port.
If this is a 10G breakout port, the
slot
/
port
syntax is
QSFP-module
/
port
.
Note
(Optional)
Deletes the static entry from the MAC address table.
switch(config)#
no mac address-table
static mac_address vlan vlan-id
Step 3
Use the
mac address-table static
command to assign
a static MAC address to a virtual interface.
This example shows how to put a static entry in the MAC address table:
switch#
configure terminal
switch(config) #
mac address-table static 12ab.47dd.ff89 vlan 3 interface ethernet 1/4
switch(config) #
Configuring the Aging Time for the MAC Table
You can configure the amount of time that an entry (the packet source MAC address and port that packet
ingresses) remains in the MAC table. MAC aging time can be configured in either interface configuration
mode or in VLAN configuration mode.
Procedure
Purpose
Command or Action
Enters global configuration mode.
switch#
configure terminal
Step 1
Specifies the time before an entry ages out and is discarded
from the MAC address table.
switch(config)#
mac
address-table aging-time
seconds
[
vlan vlan_id
]
Step 2
Cisco Nexus 6000 Series NX-OS Layer 2 Switching Configuration Guide, Release 7.x
112
Configuring MAC Address Tables
Configuring MAC Addresses