Table Of Contents
M Commands
match datalink
match (NetFlow)
match ip
match ipv4
match ipv6
match transport
mode
monitor counter
monitor session
M Commands
This chapter describes the Cisco NX-OS system management commands that begin with the letter M.
match datalink
To configure the match data link (or Layer 2) attributes option in a flow record, use the match datalink command. To remove the data link configuration, use the no form of this command.
match datalink {mac source-address | mac destination-address | ethertype | vlan}
no match datalink {mac source-address | mac destination-address | ethertype | vlan}
Syntax Description
mac
|
Specifies the MAC address.
|
source-address
|
Specifies the source MAC address.
|
destination-address
|
Specifies the destination MAC address.
|
ethertype
|
Specifies the EtherType.
|
vlan
|
Specifies the VLAN ID.
|
Defaults
None
Command Modes
NetFlow record configuration (config-flow-record)
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modification
|
4.1
|
This command was introduced.
|
Usage Guidelines
This command does not require a license.
Examples
This example shows how to configure the match data link attributes option in a flow record:
switch(config)# flow record NetFlow1
switch(config-flow-record)# match datalink mac source-address
switch(config-flow-record)#
This example shows how to remove the data link match option from a flow record:
switch(config)# flow record NetFlow1
switch(config-flow-record)# no match datalink mac source-address
switch(config-flow-record)#
Related Commands
Command
|
Description
|
match ip
|
Configures the match IP option for defining a NetFlow record map.
|
match ipv4
|
Configures the match IPv4 option for defining a NetFlow record map.
|
match (NetFlow)
To specify match criteria for Flexible NetFlow flow records, use the match flow record configuration mode subcommand. To remove match criteria for Flexible NetFlow flow records, use the no form of this command.
match { ip {protocol | tos} | ipv4 {destination address | source address} | transport
{destination-port | source-port}}
no match { ip {protocol | tos} | ipv4 {destination address | source address} | transport
{destination-port | source-port}}
Syntax Description
ip protocol
|
Specifies that the match criterion is based on protocol.
|
ip tos
|
Specifies that the match criterion is based on type of service (ToS).
|
ipv4 destination address
|
Specifies that the match criterion is based on the destination IPv4 address.
|
ipv4 source address
|
Specifies that the match criterion is based on the source IPv4 address.
|
transport destination-port
|
Specifies that the match criterion for transport layer fields is based on the destination port.
|
transport source-port
|
Specifies that the match criterion for transport layer fields is based on the destination port.
|
Defaults
No matching criteria are specified by default.
Command Modes
Flow record configuration
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modification
|
4.0(1)
|
This command was introduced.
|
Usage Guidelines
A Flexible NetFlow flow record must be enabled before you can use the match command.
Cisco NX-OS enables the following match fields by default when you create a flow record:
•
match interface input
•
match interface output
•
match flow direction
This command does not require a license.
Examples
This example shows how to specify the direction of the flow to be matched:
Specifies that the match criterion is based on protocol.
switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# match ip protocol
Specifies that the match criterion is based on type of service (ToS).
switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# match ip tos
Specifies that the match criterion is based on the destination IPv4 address.
switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# match ipv4 destination address
Specifies that the match criterion is based on the source IPv4 address.
switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# match ipv4 source address
Specifies that the match criterion for transport layer fields is based on the destination port.
switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# match ipv4 transport destination-port
Specifies that the match criterion for transport layer fields is based on the source port.
switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# match ipv4 transport source-port
Related Commands
Command
|
Description
|
flow record
|
Creates a flow record.
|
match ip
To configure the match IP option for defining a NetFlow record map, use the match ip command. To remove this option, use the no form of this command.
match ip {protocol | tos}
no match ip {protocol | tos}
Syntax Description
protocol
|
Specifies the protocol.
|
tos
|
Specifies the type of service (ToS).
|
Defaults
None
Command Modes
NetFlow record configuration (config-flow-record)
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modification
|
4.0(1)
|
This command was introduced.
|
Usage Guidelines
This command does not require a license.
Examples
This example shows how to configure the match IP option for defining a NetFlow record map:
switch(config)# flow record Custom-NetFlow-Record-1
switch(config-flow-record)# match ip protocol
switch(config-flow-record)# match ip tos
switch(config-flow-record)#
This example shows how to remove the match option:
switch(config)# flow record Custom-NetFlow-Record-1
switch(config-flow-record)# no match ip protocol
switch(config-flow-record)# no match ip tos
switch(config-flow-record)#
Related Commands
Command
|
Description
|
show flow record
|
Displays information about NetFlow records.
|
match ipv4
To configure the match IPv4 option for defining a NetFlow record map, use the match ipv4 command. To remove this option, use the no form of this command.
match ipv4 {source | destination} address
no match ipv4 {source | destination} address
Syntax Description
source
|
Specifies the source address.
|
destination
|
Specifies the destination address.
|
address
|
Specifies the address.
|
Defaults
None
Command Modes
NetFlow record configuration (config-flow-record)
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modification
|
4.0(1)
|
This command was introduced.
|
Usage Guidelines
This command does not require a license.
Examples
This example shows how to configure the match IPv4 option for defining a NetFlow record map:
switch(config)# flow record Custom-NetFlow-Record-1
switch(config-flow-record)# match ipv4 source address
switch(config-flow-record)# match ipv4 destination address
switch(config-flow-record)#
This example shows how to remove the match IPv4 configuration:
switch(config)# flow record Custom-NetFlow-Record-1
switch(config-flow-record)# no match ipv4 source address
switch(config-flow-record)# no match ipv4 destination address
switch(config-flow-record)#
Related Commands
Command
|
Description
|
show flow record
|
Displays information about NetFlow records.
|
match ipv6
To configure the match ipv6 attributes for a NetFlow record, use the match ipv6 command. To remove this option, use the no form of this command.
match ipv {{source | destination} address } | {flow-label | options }}
no match ipv6 {{source | destination} address } | {flow-label | options }}
Syntax Description
source
|
Specifies the source address.
|
destination
|
Specifies the destination address.
|
address
|
Specifies the address.
|
flow-lable
|
Specifies the flow-label
|
options
|
Specifies the options.
|
Defaults
None
Command Modes
NetFlow record configuration (config-flow-record)
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modification
|
4.2(1)
|
This command was introduced.
|
Usage Guidelines
This command does not require a license.
Examples
This example shows how to configure the match ipv6 attributes:
switch(config-flow-record)# match ipv6 flow-label
switch(config-flow-record)#
This example shows how to remove the match ipv6 attributes:
switch(config-flow-record)# no match ipv6 flow-label
switch(config-flow-record)#
Related Commands
Command
|
Description
|
match ipv4
|
Configures the match IPv4 option for defining a NetFlow record map.
|
match transport
To configure the match transport option for defining a NetFlow record map, use the match transport command. To remove the match transport option, use the no form of this command.
match transport {destination-port | source-port}
no match transport {destination-port | source-port}
Syntax Description
destination-port
|
Specifies the transport destination port.
|
source-port
|
Specifies the transport source port.
|
Defaults
None
Command Modes
NetFlow record configuration (config-flow-record)
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modification
|
4.0(1)
|
This command was introduced.
|
Usage Guidelines
This command does not require a license.
Examples
This example shows how to configure the match transport option for defining a NetFlow record map:
switch(config)# flow record Custom-NetFlow-Record-1
switch(config-flow-record)# match transport source-port
This example shows how to remove the configuration:
switch(config)# flow record Custom-NetFlow-Record-
switch(config-flow-record)# no match transport source-port
switch(config-flow-record)
Related Commands
Command
|
Description
|
show flow record
|
Displays information about NetFlow records.
|
mode
To specify the mode in a NetFlow sampler, use the mode command. To remove the mode, use the no form of this command.
mode samples
no mode [samples]
Syntax Description
samples
|
Number of samples per sampling. The range is from 1 to 64.
|
Defaults
None
Command Modes
NetFlow sampler configuration (config-flow-sampler)
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modification
|
4.0(1)
|
This command was introduced.
|
Usage Guidelines
This command does not require a license.
Examples
This example shows how to specify the mode in aNetFlow sampler:
switch(config)# sampler Custom-NetFlow-Sampler-1
switch(config-flow-sampler)# mode 1 out-of 1000
switch(config-flow-sampler)#
This example shows how to remove the mode configuration:
switch(config)# sampler Custom-NetFlow-Sampler-1
switch(config-flow-sampler)# no mode
Related Commands
Command
|
Description
|
show sampler
|
Displays information about NetFlow samplers.
|
monitor counter
To configure a Simple Network Management Protocol (SNMP) monitor counter, use the monitor counter command. To remove a monitor counter configuration, use the no form of this command.
monitor counter {invalid-crc | invalid-words | link-loss | protocol-error | rx-performance |
signal-loss | state-change | sync-loss | tx-performance}
no monitor counter {invalid-crc | invalid-words | link-loss | protocol-error | rx-performance |
signal-loss | state-change | sync-loss | tx-performance}
Syntax Description
invalid-crc
|
Configures the invalid-crc counter.
|
invalid-words
|
Configures the invalid-words counter.
|
link-loss
|
Configures the link-loss counter.
|
protocol-error
|
Configures the Protocol-error counter.
|
rx-performance
|
Configure the ingress (rx) performance counter.
|
signal-loss
|
Configures the signal-loss counter.
|
state-change
|
Configures the state-change counter.
|
sync-loss
|
Configures the sync-loss counter.
|
tx-performance
|
Configures the egress (tx) performance counter.
|
Defaults
None
Command Modes
port-monitor configuration (config-port-monitor)
Supported User Roles
network-admin
vdc-admin
Command History
Release
|
Modification
|
4.1(2)
|
This command was introduced.
|
Usage Guidelines
This command does not require a license.
Examples
This example shows how to configure an SNMP counter:
switch(config) port-monitor name PM1
switch(config-port-monitor)# monitor counter signal-loss
switch(config-port-monitor)#
This example shows how to remove a counter configuration:
switch(config)# no monitor counter signal-loss
switch(config-port-monitor)#
Related Commands
Command
|
Description
|
counter
|
Configures an individual counter.
|
monitor session
To enter the Monitor Configuration mode for configuring an Ethernet switched port analyzer (SPAN) session for analyzing traffic between ports, use the monitor session command.
To disable a SPAN session(s), use the no form of this command.
monitor session {session_number | all}
no monitor session {session_number | all}
Syntax Description
session_number
|
Specify the session number to use for monitoring a switched port. Span sessions are numbered from 1 to 18.
|
all
|
Specify all sessions for monitoring a switched port.
|
Defaults
None
Command Modes
Global Configuration (config)
Supported User Roles
Super user
VDC administrator
VDC user
Command History
Release
|
Modification
|
4.0(1)
|
This command was introduced.
|
Usage Guidelines
This command does not require a license.
Examples
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
Related Commands
Command
|
Description
|
show monitor session {all | session-number | range session-range} [brief]
|
Displays the specified SPAN session configuration.
|
description
|
Adds a comment or a description of up to 32 characters in length to a SPAN session.
|
destination
|
Adds a SPAN destination fwhere source packets are copied.
|