The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter contains the following sections:
Layer 2 ports correlate the MAC address on a packet with the Layer 2 port information for that packet using the MAC address table. A MAC address table is built using the MAC source addresses of the frames received. When a frame is received for a MAC destination address not listed in the address table, the frame is flooded to all LAN ports of the same VLAN with the exception of the port that received the frame. When the destination station replies, the relevant MAC source addresses and port IDs are added to the address table. Subsequent frames are forwarded to a single LAN port without flooding all LAN ports.
You can configure MAC addresses, which are called static MAC addresses, to statically point to specified interfaces on the device. These static MAC addresses override any dynamically learned MAC addresses on those interfaces. You cannot configure broadcast or multicast addresses as static MAC addresses. The static MAC entries are retained across reboots if you copy the static MAC addresses configuration to the startup configuration by using the copy running-config startup-config command.
The address table per VEM can store up to 32,000 MAC entries. An aging timer triggers removal of addresses from the table when they remain inactive for the default time of 300 seconds. The aging timer can be configured on a global basis but not per VLAN.
You can configure the length of time an entry remains in the MAC address table, clear the table, and so forth.
Parameters |
Default |
---|---|
Aging time |
1800 seconds |
Configuring the MAC Address Table
You can configure a MAC address to statically point to a specific interface.
Note | Be aware that the Cisco NX-OS commands may differ from those commands used in Cisco IOS. |
This example shows how to configure a static MAC address:
switch# configure terminal switch(config)# mac address static switch(config)# show mac address static 12ab.47dd.ff89 vlan 3 interface ethernet 3/3 VLAN MAC Address Type Age Port Mod ---------+-----------------+-------+---------+------------------------------+--------- 1 0002.3d11.5502 static 0 N1KV Internal Port 3 1 0002.3d21.5500 static 0 N1KV Internal Port 3 1 0002.3d21.5502 static 0 N1KV Internal Port 3 1 0002.3d31.5502 static 0 N1KV Internal Port 3 1 0002.3d41.5502 static 0 N1KV Internal Port 3 1 0002.3d61.5500 static 0 N1KV Internal Port 3 1 0002.3d61.5502 static 0 N1KV Internal Port 3 1 0002.3d81.5502 static 0 N1KV Internal Port 3 3 12ab.47dd.ff89 static 0 Eth3/3 3 342 0002.3d41.5502 static 0 N1KV Internal Port 3 343 0002.3d21.5502 static 0 N1KV Internal Port 3 Total MAC Addresses: 11 n1000v(config)# show mac address static interface Ethernet 3/3 VLAN MAC Address Type Age Port Module ---------+-----------------+-------+---------+------------------------------+--------- 3 12ab.47dd.ff89 static 0 Eth3/3 3 Total MAC Addresses: 1 switch(config)#
You can configure the amount of time that packet source MAC addresses, and the ports on which they are learned, remain in the MAC table.
Note | The aging time is a global setting that cannot be configured per VLAN. Although it is a global setting, you can also configure the MAC aging time in interface configuration mode or VLAN configuration mode. |
Note | Be aware that the Cisco NX-OS commands may differ from those commands used in Cisco IOS. |
Command or Action | Purpose |
---|
This example shows how to configure the aging time:
switch# configure terminal switch(config)# mac address-table aging-time 600 switch(config)# show mac address-table aging-time Vlan Aging Time ----- ---------- 101 300 100 300 1 300 switch#
Log in to the CLI in EXEC mode.
Note | Be aware that the Cisco NX-OS commands may differ from those commands used in Cisco IOS. |
Command or Action | Purpose |
---|
This example shows how to clear the entire MAC address table of all dynamic entries:
switch# clear mac address-table dynamic switch#
This example shows how to clear the MAC address table of only those dynamic MAC addresses learned on VLAN 5:
switch# clear mac address-table dynamic vlan 5 switch#
Use one of the following commands to verify the configuration:
Command | Purpose |
---|---|
show mac address-table |
Displays the MAC address table. |
show mac address-table module |
Use the show mac address-table module mod id command to debug a specific module. |
show mac address-table static |
Displays information about the MAC address table static entries. |
show mac address-table static | inc veth |
Displays the static MAC address of vEthernet interfaces in case a VEM physical port learns a dynamic MAC and the packet source is in another VEM on the same VSM. |
show mac address static interface [ type if_id ] |
Displays all static MAC addresses. |
show mac address-table aging-time |
Displays the aging time in the MAC address table. |
show mac address-table count |
Displays a count of MAC address entries. |
show interface interface_id mac |
Displays the MAC addresses and the burned-in MAC address for an interface. |
This example shows how to add a static MAC address and establish a global aging time:
switch# configure terminal switch(config)# mac address-table static 0000.0000.1234 vlan 10 interface ethernet 2/15 switch(config)# mac address-table aging-time 120 switch(config)#
Feature Name |
Feature Name |
Releases |
---|---|---|
MAC Address Tables |
4.0(4)SV1(1) |
This feature was introduced. |