M Commands

This chapter describes the Cisco NX-OS Ethernet and virtual Ethernet commands that begin with M.

mac address-table aging-time

To configure the aging time for entries in the MAC address 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 address table entries. The range is from 0 to 1000000 seconds. The default is 300 seconds. Entering 0 disables MAC address aging.

vlan vlan-id

(Optional) Specifies the VLAN to which the changed aging time should be applied.

 
Command Default

300 seconds

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

4.2(1)N1(1)

The command syntax is changed to mac address-table aging-time.

 
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 EXEC 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 the 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 may or may not be the default value of 300 seconds depending if the global configuration of the switch for the aging time has been changed.

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

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 switch:

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

 
Related Commands

Command
Description

show mac address-table

Displays information about the MAC address table.

show mac address-table aging-time

Displays information about the MAC address aging time.

mac address-table notification

To configure a log message notification of MAC address table events, use the mac address-table notification command. To disable log message notifications, use the no form of this command.

mac address-table notification { mac-move | threshold [ limit percentage interval seconds ]}

no mac address-table notification { mac-move | threshold }

 
Syntax Description

mac-move

Sends a notification message if the MAC address is moved.

threshold

Sends a notification message if the MAC address table threshold is exceeded.

limit percentage

(Optional) Specifies the percentage limit (1 to 100) beyond which threshold notifications are enabled.

interval seconds

(Optional) Specifies the minimum time in seconds (10 to 10000) between two notifications.

 
Command Default

None

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

4.2(1)N1(1)

The command syntax is changed to mac address-table notification.

Examples

This example shows how to configure a log message notification when the threshold exceeds 45 percent, restricting the update interval to once every 1024 seconds:

switch(config)# mac address-table notification threshold limit 45 interval 1024
 

 
Related Commands

Command
Description

show mac address-table

Displays information about the MAC address table.

mac address-table static

To configure a static entry for the 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 mac-address vlan vlan-id { drop | interface { ethernet slot / port | port-channel number [ . subinterface-number ]} [ auto-learn ]

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

 
Syntax Description

mac-address

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

vlan vlan-id

Specifies the VLAN to apply the static MAC address. The VLAN ID range is from 1 to 4094.

drop

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

interface

Specifies the interface. T he type can be either Ethernet or EtherChannel.

ethernet slot/port

Specifies the Ethernet interface and the slot number and port number. The slot number is from 1 to 255, and the port number is from 1 to 128.

port-channel number

Specifies the EtherChannel interface and EtherChannel number. The range is from 1 to 4096.

. subinterface-number

(Optional) EtherChannel number followed by a dot (.) indicator and the subinterface number.

auto-learn

(Optional) Allows the switch to automatically update this MAC address.

 
Command Default

None

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

4.2(1)N1(1)

The command syntax is changed to mac address-table static.

 
Usage Guidelines

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

When you install a static MAC address, it is associated with a port. If the same MAC address is seen on a different port, the entry is updated with the new port if you enter the auto-learn keyword.

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 1/4
 

 
Related Commands

Command
Description

show mac address-table

Displays information about the MAC address table.

 

management

To configure a switch virtual interface (SVI) that should be used for in-band management, use the management command. To remove the in-band management access to a VLAN interface IP address, use the no form of this command.

management

no management

 
Syntax Description

This command has no arguments or keywords.

 
Command Default

None

 
Command Modes

Interface configuration mode
Switch profile configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

You can use this command on a VLAN interface.

Examples

This example shows how to configure a VLAN interface to allow in-band management access:

switch# configure terminal
switch(config)# interface vlan 5
switch(config-if)# management
switch(config-if)#
 

This example shows how to remove the in-band management access to a VLAN interface:

switch# configure terminal
switch(config)# interface vlan 5
switch(config-if)# no management
switch(config-if)#
 

 
Related Commands

Command
Description

show running-config interface

Displays the running configuration information for an interface.

 

monitor erspan origin ip-address

To configure the Encapsulated Remote Switched Port Analyzer (ERSPAN) origin IP address, use the monitor espan origin ip-address command. To remove the ERSPAN origin IP address configuration, use the no form of this command.

monitor erspan origin ip-address ip-address [ global ]

no monitor erspan origin ip-address ip-address [ global ]

 
Syntax Description

ip-address

IP address.

global

(Optional) Specifies the default virtual device context (VDC) configuration across all VDCs.

 
Command Default

None

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

When you change the origin IP address in the default VDC, it impacts all the sessions.

This command does not require a license.

Examples

This example shows how to configure the ERSPAN origin IP address:

switch# configure terminal
switch(config)# monitor erspan origin ip-address 10.1.1.1 global
switch(config)#
 

This example shows how to remove the ERSPAN IP address:

switch# configure terminal
switch(config)# no monitor erspan origin ip-address 10.1.1.1 global
switch(config)#

 
Related Commands

Command
Description

monitor session

Configures a SPAN or an ERSPAN session.

monitor session

To create a new Ethernet Switched Port Analyzer (SPAN) or an Encapsulated Remote Switched Port Analyzer (ERSPAN) session configuration for analyzing traffic between ports or add to an existing session configuration, use the monitor session command. To clear SPAN or ERSPAN sessions, use the no form of this command.

monitor session { session-number [ shut | type { local | erspan-source } | all shut }

no monitor session { session-number | all } [ shut ]

 
Syntax Description

session-number

SPAN session to create or configure. The range is from 1 to 18.

all

Specifies to apply configuration information to all SPAN sessions.

shut

(Optional) Specifies that the selected session will be shut down for monitoring.

type

(Optional) Specifies the type of session to configure.

local

Specifies the session type to be local.

erspan-source

Creates an ERSPAN source session.

 
Command Default

None

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

4.2(1)N1(1)

The monitor session { session-number | all } suspend command has been dropped.

The monitor session { session-number | all } shut and monitor session { session-number | all } type commands have been added.

5.0(2)N2(1)

Limit on the number of egress (TX) sources in a monitor session has been lifted.

5.1(3)N1(1)

Support for ERSPAN was added.

 
Usage Guidelines

To ensure that you are working with a completely new session, you can clear the desired session number or all SPAN sessions.


Note The Cisco Nexus 5000 Series switch supports two active SPAN sessions. The Cisco Nexus 5548 Switch supports four active SPAN sessions. When you configure more than two SPAN sessions, the first two sessions are active. During startup, the order of active sessions is reversed; the last two sessions are active. For example, if you configured ten sessions 1 to 10 where 1 and 2 are active, after a reboot, sessions 9 and 10 will be active. To enable deterministic behavior, explicitly suspend the sessions 3 to 10 with the monitor session session-number shut command.



Note Beginning with Cisco NX-OS Release 5.0(2)N2(1), the limit on the number of egress (TX) sources in a monitor session has been lifted. Port-channel interfaces can be configured as egress sources.


After you create an ERSPAN session, you can describe the session and add interfaces and VLANs as sources and destinations.

Examples

This example shows how to create a SPAN session:

switch# configure terminal
switch(config)# monitor session 2
switch(config)#
 

This example shows how to enter the monitor configuration mode for configuring SPAN session number 9 for analyzing traffic between ports:

switch(config)# monitor session 9 type local
switch(config-monitor)# description A Local SPAN session
switch(config-monitor)# source interface ethernet 1/1
switch(config-monitor)# destination interface ethernet 1/2
switch(config-monitor)# no shutdown
 

This example shows how to configure any SPAN destination interfaces as Layer 2 SPAN monitor ports before activating the SPAN session:

switch(config)# interface ethernet 1/2
switch(config-if)# switchport
switch(config-if)# switchport monitor
switch(config-if)# no shutdown
 

This example shows how to configure a typical SPAN destination trunk interface:

switch(config)# interface Ethernet1/2
switch(config-if)# switchport
switch(config-if)# switchport mode trunk
switch(config-if)# switchport monitor
switch(config-if)# switchport trunk allowed vlan 10-12
switch(config-if)# no shutdown
 

This example shows how to create an ERSPAN session:

switch# configure terminal
switch(config)# monitor session 1 type erspan-source
switch(config-erspan-src)#
 

 
Related Commands

Command
Description

description (SPAN, ERSPAN)

Adds a description to identify the SPAN session.

destination (ERSPAN)

Configures the destination IP port for an ERSPAN packet.

erspan-id (ERSPAN)

Sets the flow ID for an ERSPAN session.

ip dscp (ERSPAN)

Sets the DSCP value for an ERSPAN packet.

ip prec (ERSPAN)

Sets the IP precedence value for an ERSPAN packet.

ip ttl (ERSPAN)

Sets the time-to-live (TTL) value for an ERSPAN packet.

mtu (ERSPAN)

Sets the maximum transmission value (MTU) for ERSPAN packets.

show monitor session

Displays SPAN session configuration information.

source (SPAN, ERSPAN)

Adds a SPAN source port.

 

mst (STP)

To configure the Multiple Spanning Tree (MST) designated bridge and root bridge priority, use the mst command. To revert to the default settings, use the no form of this command.

mst instance-id [{ designated | root } priority priority-value ]

no mst instance-id [{ designated | root } priority priority-value ]

 
Syntax Description

instance-id

MST instance. The range is from 0 to 4094.

designated

(Optional) Sets the designated bridge priority for the spanning tree.

root

(Optional) Sets the root bridge priority for the spanning tree.

priority priority-value

(Optional) Specifies the STP-bridge priority; the valid values are 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440. All other values are rejected.

 
Command Default

None

 
Command Modes

Spanning-tree pseudo configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

You can enter the instance-id argument as a single instance or a range of instances, for example, 0-3,5,7-9.

This command does not require a license.

Examples

This example shows how to configure a spanning-tree domain:

switch# configure terminal
switch(config)# spanning-tree pseudo-information
switch(config-pseudo)# mst 2 designated priority 8192
switch(config-pseudo)# mst 2 root priority 4096
switch(config-pseudo)#
 

 
Related Commands

Command
Description

show running-config spanning-tree

Displays the running configuration information of the Spanning Tree Protocol (STP).

show spanning-tree

Displays the configuration information of the STP.

spanning-tree pseudo-information

Configures spanning tree pseudo information parameters.

 

mvr group

To configure a Multicast VLAN Registration (MVR) group for an interface, use the mvr group command. To remove the MVR group from an interface, use the no form of this command.

mvr group { group_IP_address | IP_prefix / length } [ count count_value ] [ vlan vlan_ID [... vlan vlan_ID ]]

no mvr group { group_IP_address | IP_prefix / length } [ count count_value ] [ vlan vlan_ID [... vlan vlan_ID ]]

 
Syntax Description

group_IP_address

Group IP address in the format A. B. C. D.

IP_prefix / length

IP prefix and network mask length in the format x. x. x. x / m.

count count_value

Specifies the count value. The range is from 1 to 64.

vlan vlan_ID

Specifies the global default MVR VLAN. The range is from 1 to 4094.

 
Command Default

None

 
Command Modes

Interface configuration mode
Virtual Ethernet interface configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

You can use this command on the following interfaces:

  • Ethernet interface
  • Virtual Ethernet interface

Before you use a virtual Ethernet interface, you must enable the Cisco Virtual Machine Fabric Extender (VM-FEX) on the switch by using the feature vmfex command.

This command does not require a license.

Examples

This example shows how to configure an MVR VLAN group for an interface:

switch# configure terminal
switch(config)# interface ethernet 1/5
switch(config-if)# mvr group 192.0.2.1/12 vlan 1
switch(config-if)#
 

 
Related Commands

Command
Description

feature vmfex

Enables VM-FEX on the switch.

interface vethernet

Configures a virtual Ethernet interface on the switch.

show mvr

Displays information about MVRs.

show running-config

Displays the running system configuration information.

 

mvr type

To configure a Multicast VLAN Registration (MVR) port type for an interface, use the mvr type command. To remove the MVR port type for an interface, use the no form of this command.

mvr type { source | receiver }

no mvr type { source | receiver }

 
Syntax Description

source

Specifies the MVR source port.

receiver

Specifies the MVR receiver port.

 
Command Default

None

 
Command Modes

Interface configuration mode
Virtual Ethernet interface configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

You can use this command on the following interfaces:

  • Ethernet interface
  • Virtual Ethernet interface

Before you use a virtual Ethernet interface, you must enable the Cisco Virtual Machine Fabric Extender (VM-FEX) on the switch by using the feature vmfex command.

This command does not require a license.

Examples

This example shows how to configure an MVR source port for an interface:

switch# configure terminal
switch(config)# interface ethernet 1/5
switch(config-if)# mvr type source
switch(config-if)#
 

 
Related Commands

Command
Description

feature vmfex

Enables VM-FEX on the switch.

interface vethernet

Configures a virtual Ethernet interface on the switch.

show mvr

Displays information about MVRs.

show running-config

Displays the running system configuration information.

 

mvr vlan

To configure a Multicast VLAN Registration (MVR) VLAN for an interface, use the mvr vlan command. To remove the MVR VLAN from an interface, use the no form of this command.

mvr vlan vlan_ID

no mvr vlan vlan_ID

 
Syntax Description

vlan_ID

MVR VLAN ID. The range is from 1 to 4094.

 
Command Default

None

 
Command Modes

Interface configuration mode
Virtual Ethernet interface configuration mode

 
Command History

Release
Modification

5.1(3)N1(1)

This command was introduced.

 
Usage Guidelines

You can use this command on the following interfaces:

  • Ethernet interface
  • Virtual Ethernet interface

Before you use a virtual Ethernet interface, you must enable the Cisco Virtual Machine Fabric Extender (VM-FEX) on the switch by using the feature vmfex command.

This command does not require a license.

Examples

This example shows how to configure an MVR VLAN for an interface:

switch# configure terminal
switch(config)# interface ethernet 1/5
switch(config-if)# mvr vlan 1
switch(config-if)#
 

 
Related Commands

Command
Description

feature vmfex

Enables VM-FEX on the switch.

interface vethernet

Configures a virtual Ethernet interface on the switch.

show mvr

Displays information about MVRs.

show running-config

Displays the running system configuration information.