Configuring Layer 2 Switching
Command or Action
Step 2
mac address-table static mac-address vlan vlan-id {[drop |
interface {type slot/port} | port-channel number]}
Example:
switch(config)# mac address-table static 1.1.1 vlan
2 interface ethernet 1/2
Step 3
exit
Example:
switch(config)# exit
switch#
Step 4
show mac address-table static
Example:
switch# show mac address-table static
Step 5
copy running-config startup-config
Example:
switch# copy running-config startup-config
This example shows how to put a static entry in the Layer 2 MAC address table:
switch# config t
switch(config)# mac address-table static 1.1.1 vlan 2 interface ethernet 1/2
switch(config)#
Configuring a Static MAC Address on a Layer 3 Interface
Beginning with Release 4.2(1), you can configure static MAC addresses on Layer 3 interfaces. You cannot
configure broadcast addresses as static MAC addresses. Beginning with Cisco NX-OS Release 5.2(1), multicast
MAC addresses can be configured as static MAC addresses. For further information, see the "Configuring
IGMP Snooping" of the Cisco Nexus 7000 Series NX-OS Multicast Routing Configuration Guide.
You cannot configure static MAC addresses on tunnel interfaces.
Note
See the Cisco Nexus 7000 Series NX-OS Interfaces Configuration Guide for information on configuring Layer
3 interfaces.
Before You Begin
Before you configure static MAC addresses, ensure that you are in the correct VDC (or enter the switchto
vdc command).
Cisco Nexus 7000 Series NX-OS Layer 2 Switching Configuration Guide, Release 5.x
Configuring a Static MAC Address on a Layer 3 Interface
Purpose
Specifies a static MAC address to add to the Layer
2 MAC address table.
Exits global configuration mode.
(Optional)
Displays the static MAC addresses.
(Optional)
Copies the running configuration to the startup
configuration.
15