M Commands

mac address-table aging-time

To configure the aging time for entries in the Layer 2 table, use the mac address-table aging-time command. To return to the default settings, use the no form of this command.

mac address-table aging-time seconds [ vlan vlan_id ]

no mac address-table aging-time [ vlan vlan_id ]

Syntax Description

seconds

Aging time for MAC table entries for Layer 2. The range is from 120 to 918000 seconds. The default is 1800 seconds. Entering 0 disables the aging time.

vlan vlan_id

(Optional) Specifies the VLAN to apply the changed aging time.

Command Default

1800 seconds

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

Enter 0 seconds to disable the aging process.

The age value may be rounded off to the nearest multiple of 5 seconds. If the system rounds the value to a different value from that specified by the user (from the rounding process), the system returns an informational message.

When you use this command in the global configuration mode, the age values of all VLANs for which a configuration has not been specified are modified and those VLANs with specifically modified aging times are not modified. When you use the no form of this command without the VLAN parameter, only those VLANs that have not been specifically configured for the aging time reset to the default value. Those VLANs with specifically modified aging times are not modified.

When you use this command and specify a VLAN, the aging time for only that specified VLAN is modified. When you use the no form of this command and specify a VLAN, the aging time for the VLAN is returned to the current global configuration for the aging time, which might or might not be the default value of 300 seconds depending if the global configuration of the device for the aging time has been changed.

The aging time is counted from the last time that the switch detected the MAC address.

This command does not require a license.

Examples

This example shows how to change the length of time an entry remains in the MAC address table to 500 seconds for the entire device:

switch(config)# mac address-table aging-time 500
switch(config)# 

Related Commands

Command

Description

show mac address-table

Displays information about the MAC address table.

clear mac address-table aging-time

Displays information about the MAC address aging time.

mac-address

To configure a static MAC address for a Layer 3 interface, use the mac address command. To return to the default settings, use the no form of this command.

mac-address mac-address

no mac-address mac-address

Syntax Description

mac-address

MAC address for the Layer 3 interface. Use the format XXXX.XXXX.XXXX.

Command Default

VDC MAC address

Command Modes

Interface configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

4.2(1)

This command was introduced.

Usage Guidelines

You can specify a MAC address for all Layer 3 interfaces:

  • Layer 3 interfaces
  • Layer 3 port channels
  • Layer 3 subinterfaces
  • VLAN network interface

You cannot configure static MAC addresses on tunnel interfaces.

You cannot use this command on Layer 2 interfaces or individual members of a port channel.

See the Cisco Nexus 7000 Series NX-OS Interfaces Command Reference for information on configuring Layer 3 interfaces.

You cannot configure a static group MAC address to these interfaces.

This command does not require a license.

Examples

This example shows how to configure a static MAC address on a Layer 3 interface:

switch(config)#interface ethernet 7/3
switch(config-1f)#mac-address 02c4.1e42.a3b2

Related Commands

Command

Description

show interface

Displays information about the interface.

show running-config

Displays information about the current configuration.

mac-address bpdu source version 2

To enable version 2 bpdu source mac address, use the mac-address bpdu source version 2 command. To return to the default settings, use the no form of this command.

mac-address bpdu source version 2

no mac-address bpdu source version 2

Syntax Description

This command has no arguments or keywords.

Command Default

VDC MAC address

Command Modes

vPC domain configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

6.1(3)

This command was introduced.

Usage Guidelines

This command will trigger STP to use new Cisco MAC address (00:26:0b:xx:xx:xx) as the sources address of BPDU generated on vPC ports. It is important both vPC peer devices have identical configuration of this parameter. You may also, if supported by the end-devices, disable Ether

channel guard on the edge devices prior to issuing this command to minimize traffic disruption due STP inconsistencies. It is recommended to re-enable the Ether channel guard after updating the related configuration on both peers.

This command does not require a license.

Examples

This example shows how to enable version 2 bpdu source mac address:

switch# config t
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# vpc domain 1
switch(config-vpc-domain)# mac-address bpdu source version 2
Warning: This command will trigger STP to use new Cisco MAC address (00:26:0b:
xx:xx:xx) as the sources address of BPDU generated on vPC ports. It is important
both vPC peer devices have identical configuration of this parameter. You may
also disable Ether channel guard on the edge devices prior to issuing this comm-
and to minimize traffic disruption due STP inconsistencies. It is recommended to
re-enable the Ether channel guard after updating the related configuration on
both peers.
Continue? (yes/no) [no] y
switch(config-vpc-domain)#

This example shows how to disable version 2 bpdu source mac address:

switch# config t
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# vpc domain 1
switch(config-vpc-domain)# no mac-address bpdu source version 2
switch(config-vpc-domain)#

Related Commands

Command

Description

show interface

Displays information about the interface.

show running-config

Displays information about the current configuration.

media ethernet


Note


The Cisco NX-OS software supports only Ethernet VLANs. Although the media ethernet command appears on the device, it does not apply to any configuration.

To set the media type for a VLAN to Ethernet, use the media ethernet command. Use the no form of this command to return to the default value.

media ethernet

no media

Syntax Description

This command has no arguments or keywords.

Command Default

Ethernet is the only media type supported.

Command Modes

VLAN configuration submode

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

The media ethernet command is not supported in Release 4.0.

This command does not require a license.

Examples

This example shows how to set the media type to Ethernet for VLAN 2:

switch(config)#vlan 2
switch(config-vlan)#media ethernet
switch(config-mst)#

Related Commands

Command

Description

show vlan

Displays VLAN information.

mac address-table aging-time

To configure the aging time for entries in the Layer 2 table, use the mac address-table aging-time command. To return to the default settings, use the no form of this command.

mac address-table aging-time seconds [ vlan vlan_id ]

no mac address-table aging-time [ vlan vlan_id ]

Syntax Description

seconds

Aging time for MAC table entries for Layer 2. The range is from 120 to 918000 seconds. The default is 1800 seconds. Entering 0 disables the aging time.

vlan vlan_id

(Optional) Specifies the VLAN to apply the changed aging time.

Command Default

1800 seconds

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

Enter 0 seconds to disable the aging process.

The age value may be rounded off to the nearest multiple of 5 seconds. If the system rounds the value to a different value from that specified by the user (from the rounding process), the system returns an informational message.

When you use this command in the global configuration mode, the age values of all VLANs for which a configuration has not been specified are modified and those VLANs with specifically modified aging times are not modified. When you use the no form of this command without the VLAN parameter, only those VLANs that have not been specifically configured for the aging time reset to the default value. Those VLANs with specifically modified aging times are not modified.

When you use this command and specify a VLAN, the aging time for only that specified VLAN is modified. When you use the no form of this command and specify a VLAN, the aging time for the VLAN is returned to the current global configuration for the aging time, which might or might not be the default value of 300 seconds depending if the global configuration of the device for the aging time has been changed.

The aging time is counted from the last time that the switch detected the MAC address.

This command does not require a license.

Examples

This example shows how to change the length of time an entry remains in the MAC address table to 500 seconds for the entire device:

switch(config)# mac address-table aging-time 500
switch(config)# 

Related Commands

Command

Description

show mac address-table

Displays information about the MAC address table.

clear mac address-table aging-time

Displays information about the MAC address aging time.

mac address-table static

To configure a static entry for the Layer 2 MAC address table, use the mac address-table static command. To delete the static entry, use the no form of this command.

mac address-table static address mac_addr vlan vlan_id

no mac address-table static address mac_addr vlan vlan_id

Syntax Description

mac-address

MAC address to add to the table. Use the format XXXX.XXXX.XXXX.

vlan vlan-id

Specifies the VLAN to apply static MAC address to; valid values are from 1 to 4094.

drop

(Optional) Drops all traffic that is received from and going to the configured MAC address in the specified VLAN.

interface type slot/port

(Optional) Specifies the interface. Use either t he type of interface, the slot number, or the port number.

port-channel number

(Optional) Specifies the interface. Use the port-channel number.

Command Default

None

Command Modes

Global configuration

Supported User Roles

network-admin

vdc-admin

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

You cannot apply the mac address-table static mac-address vlan vlan-id drop command to a multicast MAC address.

The output interface specified cannot be a VLAN interface or a switched virtual interface (SVI).

Use the no form to remove entries that are profiled by the combination of specified entry information.

This command does not require a license.

Examples

This example shows how to add a static entry to the MAC address table:

switch(config)#mac address-table static 0050.3e8d.6400 vlan 3 interface ethernet 2/1
switch(config)# 

Related Commands

Command

Description

show mac address-table

Displays information about the MAC address table.