Cisco Nexus 1000V Layer 2 Switching Configuration Guide, Release 4.2(1) SV1(4)
Configuring the MAC Address Table
Downloads: This chapterpdf (PDF - 156.0KB) The complete bookPDF (PDF - 2.12MB) | Feedback

Configuring the MAC Address Table

Table Of Contents

Configuring the MAC Address Table

Information About the MAC Address Table

Guidelines and Limitations

Default Settings

Configuring the MAC Address Table

Configuring a Static MAC Address

Configuring the Aging Time

Clearing Dynamic Addresses from the MAC Address Table

Verifying the Configuration

Example Configuration for the MAC Address Table

Additional References

Related Documents

Standards

Feature History for the MAC Address Table


Configuring the MAC Address Table



Note For information about creating interfaces, see the document,
Cisco Nexus 1000V Interface Configuration Guide, Release 4.2(1)SV1(4).


This chapter includes the following topics:

Information About the MAC Address Table

Guidelines and Limitations

Default Settings

Configuring the MAC Address Table

Verifying the Configuration

Example Configuration for the MAC Address Table

Additional References

Feature History for the MAC Address Table

Information About 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 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 secs. 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.

Guidelines and Limitations

Keep in mind the following guidelines for configuring MAC addresses:

The forwarding table for each VLAN in a VEM can store up to 4094 MAC addresses.

The Cisco 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

Default Settings

Table 2-1 lists the default setting for the MAC address aging time.

Table 2-1 Default MAC Address Aging Time 

Parameters
Default

Aging time

300 seconds


Configuring the MAC Address Table

This section includes the following procedures for configuring the MAC address table:

Configuring a Static MAC Address

Configuring the Aging Time

Clearing Dynamic Addresses from the MAC Address Table

Configuring a Static MAC Address

Use this procedure to configure a MAC address to statically point to a specific interface.

BEFORE YOU BEGIN

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 Cisco NX-OS commands may differ from those used in Cisco IOS.


SUMMARY STEPS

1. config t

2. mac address-table static mac address vlan vlan-id {[drop | interface {type if_id | port-channel id]}

mac address-table static mac-address vlan vlan-id {interface {interface-name}+ | drop} [auto-learn]

no mac address-table static mac-address vlan vlan-id

3. show mac address static interface [type if_id]

4. copy running-config startup-config

DETAILED STEPS

 
Command
Purpose

Step 1 

config t

Example:

n1000v# config t

n1000v(config)#

Enters global configuration mode.

Step 2 

mac address-table static mac_address vlan vlan-id {[drop | interface {type if_id} | port-channel number]}

Example:

n1000v(config)# mac address-table static 12ab.47dd.ff89 vlan 3 interface ethernet 3/3

n1000v(config)#

Adds a static MAC address in the Layer 2 MAC address table and saves it in the running configuration.

Interface can be specified as either of the following:

ethernet slot/port

veth number

Step 3 

show mac address static interface [type if_id]

Example:

n1000v(config)# show mac address static

Example:

n1000v(config)# show mac address static interface Ethernet 3/3

(Optional) Displays static MAC addresses.

Step 4 

copy running-config startup-config

Example:

n1000v(config)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Example:
n1000v# config t 
n1000v(config)# mac address static 
n1000v(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 
n1000v(config)# 

Configuring the Aging Time

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 Although it is a global setting, you can also configure MAC aging time in interface configuration mode or VLAN configuration mode.


BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged in to the CLI in EXEC mode.

The aging time is a global setting that cannot be configured per VLAN.


Note Be aware that the Cisco NX-OS commands may differ from those used in Cisco IOS.


SUMMARY STEPS

1. config t

2. mac address-table aging-time seconds

3. show mac address-table

4. copy running-config startup-config

DETAILED STEPS

 
Command
Purpose

Step 1 

config t

Example:

n1000v# config t

n1000v(config)#

Enters global configuration mode.

Step 2 

mac address-table aging-time seconds

Example:

n1000v(config)# mac address-table aging-time 600

Specifies and saves in the running configuration the amount of time that will elapse before an entry in the Layer 2 MAC address table is discarded.

Allowable entries:

120 to 918000 seconds (default is 300)

If you specify zero (0), MAC aging is disabled.

Step 3 

show mac address-table aging-time

Example:

n1000v(config)# show mac address-table aging-time

Vlan Aging Time

----- ----------

101 300

100 300

1 300

n1000v#

(Optional) Displays the aging time in the MAC address table.

Step 4 

copy running-config startup-config

Example:

n1000v(config)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Example:
n1000v# config t 
n1000v(config)# mac address-table aging-time 600
n1000v(config)#

Clearing Dynamic Addresses from the MAC Address Table

Use this procedure to clear dynamic Layer 2 entries from the MAC address table.

BEFORE YOU BEGIN

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.


SUMMARY STEPS

1. clear mac address-table dynamic [vlan vlan_id]

2. show mac address-table

DETAILED STEPS

 
Command
Purpose

Step 1 

clear mac address-table dynamic
[vlan vlan_id]

Clears the dynamic address entries from the Layer 2 MAC address table.

 

Example:

n1000v# clear mac address-table dynamic

n1000v#

This example clears the entire MAC address table of all dynamic entries.

 

Example:

n1000v# clear mac address-table dynamic vlan 5

n1000v#

This example clears the MAC address table of only those dynamic MAC addresses learned on VLAN 5.

Step 2 

show mac address-table

Example:

n1000v# show mac address-table

(Optional) Displays the MAC address table.

Verifying the Configuration

Use the following commands to verify the Layer 2 MAC address configuration.

Command
Purpose

show mac address-table

Displays the MAC address table.

See Example 2-1

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.

See Example 2-2

show mac address static interface [type if_id]

Displays all static MAC addresses.

See:

Example 2-3

Example 2-4

show mac address-table aging-time

Displays the aging time in the MAC address table.

See Example 2-5

show mac address-table count

Displays a count of MAC address entries.

See Example 2-6

show interface interface_id  mac

Displays the MAC addresses and the burn-in MAC address for an interface.


Example 2-1 show mac address-table

n1000v# 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
n1000v#

Example 2-2 show mac address-table static | inc veth

n1000v# show mac address-table static | inc veth
460       0050.5678.ed16    static  0         Veth2                          3        
460       0050.567b.1864    static  0         Veth1                          4        
n1000v#

Example 2-3 show mac address static

n1000v(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 

Example 2-4 show mac address static interface

n1000v# 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 
n1000v# 

Example 2-5 show mac address-table aging-time

n1000v# show mac address-table aging-time

Vlan Aging Time

----- ----------

101 300

100 300

1 300

n1000v#

Example 2-6 show mac address-table count

n1000v)# show mac address-table count static

Total MAC Addresses: 12

n1000v#

Example Configuration for the MAC Address Table

The following example shows how to add a static MAC address and establish a global aging time:

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

Additional References

For additional information related to implementing Layer 2 switching, see the following sections:

Related Documents

Standards

Related Documents

Related Topic
Document Title

VLAN configuration

"Configuring VLANs" section

L2 switching configuration limits

"Layer 2 Switching Configuration Limits" section

Interfaces

Cisco Nexus 1000V Interface Configuration Guide, Release 4.2(1)SV1(4)

Port-Profiles

Cisco Nexus 1000V Port Profile Configuration Guide, Release 4.2(1)SV1(4)

System management

Cisco Nexus 1000V System Management Configuration Guide, Release 4.2(1)SV1(4)

Release Notes

Cisco Nexus 1000V Release Notes, Release 4.2(1)SV1(4)

Complete command syntax, command modes, command history, defaults, usage guidelines, and examples

Cisco Nexus 1000V Command Reference, Release 4.2(1)SV1(4)


Standards

Standards
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


Feature History for the MAC Address Table

This section provides the MAC address table release history.

Feature Name
Releases
Feature Information

MAC Address Tables

4.0(4)SV1(1)

This feature was introduced.