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. Then 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.
The address table per VEM can store up to 32000 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, clearing the table, and so forth.
Parameters |
Default |
---|---|
Aging time |
300 seconds |
Configuring the MAC Address Table
Use this procedure to configure a MAC address to statically point to a specific interface.
Note |
Be aware that the Cisco NX-OS commands may differ from those used in Cisco IOS. |
switch# configure terminal switch(config)# mac address static switch(config)# show mac address static VLAN MAC Address Type Age Port Module ---------+-----------------+-------+---------+------------------------------+--------- 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)#
Use this procedure to configure the amount of time that packet source MAC addresses, and the ports on which they are learned, remain in the MAC table containing the Layer 2 information.
Note |
The aging time is a global setting that cannot be configured per VLAN. Although it is a global setting, you can also configure MAC aging time in interface configuration mode or VLAN configuration mode. |
Note |
Be aware that the Cisco NX-OS commands may differ from those used in Cisco IOS. |
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#
You are logged in to the CLI in EXEC mode.
Note |
Be aware that the Cisco NX-OS commands may differ from those used in Cisco IOS. |
The following example clears the entire MAC address table of all dynamic entries:
switch# clear mac address-table dynamic switch#
The following example clears 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 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 burn-in MAC address for an interface. |
switch# show mac address-table VLAN MAC Address Type Age Port Module ---------+-----------------+-------+---------+------------------------------+--------- 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 342 0050.568d.5a3f dynamic 0 Eth3/3 3 343 0002.3d21.5502 static 0 N1KV Internal Port 3 343 0050.568d.2aa0 dynamic 9 Eth3/3 3 Total MAC Addresses: 13 switch#
switch# show mac address-table static | inc veth 460 0050.5678.ed16 static 0 Veth2 3 460 0050.567b.1864 static 0 Veth1 4 switch#
switch# show mac address static VLAN MAC Address Type Age Port Module ---------+-----------------+-------+---------+------------------------------+--------- 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 switch(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#
switch# 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#
switch# show mac address-table aging-time Vlan Aging Time ----- ---------- 101 300 100 300 1 300 switch#
switch# show mac address-table count static Total MAC Addresses: 12 switch#
The following 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 |