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.
Note For information about creating interfaces, see the document,
Cisco Nexus 1000V Interface Configuration Guide, Release 4.0(4)SV1(1).
This chapter includes the following topics:
•Information About MAC Address Tables
•Configuring a Static MAC Address
•Clearing Dynamic Addresses from the MAC Address Table
•Verifying the Layer 2 Switching Configuration
•Layer 2 Switching Example Configuration
•Feature History for the MAC Address Table
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 can store up to 100 address entries. An aging timer triggers removal of addresses from the table when they remain inactive for 300 seconds. The aging timer can be configured on a global basis but not per VLAN. The aging timer is configurable on a global basis but not on a per VLAN basis.
You can configure the length of time an entry remains in the MAC address table, clearing the table, and so forth.
Keep in mind the following guidelines for configuring MAC addresses:
•The forwarding table for each VLAN in a VEM can store up to 1024 MAC addresses.
•Static MAC address entries cannot be configured on an interfaces where port security is enabled. Instead, use the following command in Interface Configuration mode:
n1000v(config-if)#
switchport port-security mac address xxxx.yyyy.zzzz [vlan vlan id].
For more information, see the Cisco Nexus 1000V Security Configuration Guide, Release 4.0(4)SV1(1).
•The NX-OS software explicitly prohibits configuring port security on ports that have a static MAC addresses configured on the following VLANs:
–the access VLAN of an access port
–the native VLAN of a trunk port
Use this procedure to configure a MAC address to statically point to a specific interface.
Before beginning this procedure, you must know or do the following:
•You are logged in to the CLI in EXEC mode.
•You cannot configure broadcast or multicast addresses as static MAC addresses.
•Static MAC addresses override dynamically-learned MAC addresses on an interface.
Note Be aware that the NX-OS commands may differ from those used in Cisco IOS.
1. config t
2. mac address-table static mac address vlan vlan-id {[drop | interface {type number | | port-channel number]}
3. exit
4. show mac address-table static
5. copy running-config startup-config
Example:
n1000v# config t
n1000v(config)# mac address static 12ab.47dd.ff89 vlan 3 interface ethernet 2/1
n1000v# show mac address static
Legend:
* - primary entry, G - Gateway MAC, (R) - Routed MAC
age - seconds since last seen
VLAN MAC Address Type age Secure NTFY Ports
---------+-----------------+--------+---------+------+------+----------------
G - 12ab.47dd.ff89 static - False False eth2/1
n1000v#
Use this procedure to configure the amount of time that a packet source MAC address and port on which it was learned remain in the MAC table containing the Layer 2 information.
Note You can also configure MAC aging time in interface configuration mode or VLAN configuration mode.
Before beginning this procedure, you must know or do the following:
•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.
1. config t
2. mac address-table aging-time seconds
3. exit
4. show mac address-table
5. copy running-config startup-config
Example:
n1000v# config t
n1000v(config)# mac address-table aging-time 600
n1000v(config)#
Use this procedure to clear all dynamic Layer 2 entries from the MAC address table.
Before beginning this procedure, you must know or do the following:
•You are logged in to the CLI in EXEC mode.
Note Be aware that the NX-OS commands may differ from those used in Cisco IOS.
1. clear mac address-table dynamic {address mac_addr} {interface {type number] | port-channel number | vlan vlan_id}
2. show mac address-table
Use the following commands to display and verify the Layer 2 MAC address configuration.
Note The Cisco Nexus 1000VMAC address table does not display multicast MAC addresses.
The following example shows how to add a static MAC address:
n1000v# configure terminal
n1000v(config)# mac address-table static 0000.0000.1234 vlan 10 interface ethernet 2/15
n1000v(config)# mac address-table aging-time 120
Table 2-1 lists the default setting for the MAC address aging time.
|
|
---|---|
Aging time |
300 seconds |
For additional information related to implementing Layer 2 switching, see the following sections:
|
|
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
— |
This section provides the MAC address tables release history.
|
|
|
---|---|---|
MAC Address Tables |
4.0(4)SV1(1) |
This feature was introduced. |