C Commands

capabilities-conflict

To configure what action is taken on an interface when a capabilities-conflict event occurs, use the capabilities-conflict command in Ethernet OAM action configuration mode or interface Ethernet OAM action configuration mode. To remove the configuration, use the no form of this command.

capabilities-conflict {disable | efd | error-disable-interface | log}

no capabilities-conflict {disable | efd | error-disable-interface | log}

Syntax Description

disable

Performs no action on the interface when a capabilities-conflict event occurs.

efd

Puts the line protocol into the down state for an interface when a capabilities-conflict event occurs. The state is removed when the first packet is received without a conflict.

error-disable-interface

Puts the interface into the error-disable state when a capabilities-conflict event occurs.

log

(Interface Ethernet OAM action configuration only) Creates a syslog entry when a capabilities-conflict event occurs. This action is available in Interface Ethernet OAM action configuration mode to override the profile setting and log the event for the interface when it occurs.

Command Default

The default action is to create a syslog entry.

Command Modes

Ethernet OAM action configuration (config-eoam-action)

Interface Ethernet OAM action configuration (config-if-eoam-action)

Supported User Roles

network-admin

vdc--‐admin

network--‐operator

vdc-operator

Command History

Release Modification
7.3(0)D1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

The following example shows how to configure that no action is performed on the interface when a critical-event notification is received:

switch# configure terminal
switch(config)# ethernet oam profile Profile_1
switch(config-eoam)# action
switch(config-eoam-action)# critical-event disable

The following example shows how to configure that the interface is put into the error-disable state when a critical-event notification is received:

switch# configure terminal
switch(config)# ethernet oam profile Profile_1
switch(config-eoam)# action
switch(config-eoam-action)# critical-event error-disable-interface

The following example shows how to configure that a syslog is created when a critical-event notification is received:

switch# configure terminal
switch(config)# interface ethernet 2/1
switch(config-if)# ethernet oam
switch(config-if-eoam)# action
switch(config-if-eoam-action)# critical-event log

carrier-delay

To set the carrier delay on an interface, use the carrier-delay command. To return to the default carrier delay value, use the no form of this command.

carrier-delay {sec | msec value}

no carrier-delay

Syntax Description

sec

Seconds of delay. The range is from 0 to 60.

msec

Specifies milliseconds of delay.

value

Milliseconds of delay. The range is from 0 to 1000.

Command Default

The default is 100 milliseconds.

Command Modes


Interface VLAN configuration mode


network-admin


vdc-admin

Command History

Release

Modification

4.0(3)

This command was introduced.

Usage Guidelines


Note

You must enable the VLAN interface feature, using the feature interface-vlan command, before you can use this command.

If a link goes down and comes back up before the carrier delay timer expires, the down state is effectively filtered, and the rest of the software on the device is not aware that a link-down event occurred. A large carrier delay timer results in fewer link-up/link-down events being detected. When you set the carrier delay time to 0, the device detects each link-up/link-down event that occurs.


Note

The carrier-delay command is supported only on the VLAN interface mode; no other interface modes support this command.

In most environments, a lower carrier delay time is better than a higher one. The value that you choose depends on the nature of the link outages and how long you expect these linkages to last in your network. If your data links are subject to short outages (especially if those outages last less time than it takes for your IP routing to converge), you should set a long carrier delay value to prevent these short outages from causing unnecessary churn in your routing tables. However, if you outages tend to be longer, then you may want to set a shorter carrier delay time so that the outages are detected sooner, and the IP route convergence begins and ends sooner.

This command does not require a license.

Examples

This example shows how to set the carrier delay timer to 20 minutes for VLAN 6:


switch(config)# 
interface vlan 
6
switch(config-if)# 
carrier-delay 20
switch(config-if)#

channel-group

To assign and configure a physical interface to a port-channel group, use the channel-group command. To remove the channel-group configuration from the interface, use the no form of this command.

channel-group number [force] [mode {active | on | passive}]

no channel-group [number]

Syntax Description

number

Number of the channel group. The maximum number of port channels that can be configured is 256 across all virtual device contexts (VDCs), and the range is from 1 to 4096.

force

(Optional) Forces the interface to join the channel group, although some parameters are not compatible. For information on the compatibility parameters and which ones can be forced, see the Usage Guidelines section.

mode

Specifies the port-channel mode of the interface.

active

Specifies that when you enable the Link Aggregation Control Protocol (LACP), this command enables LACP on the specified interface. The interface is in an active negotiating state, in which the port initiates negotiations with other ports by sending LACP packets.

on

Specifies the default channel mode and all port channels that are not running LACP remain in this mode. If you attempt to change the channel mode to active or passive before enabling LACP, the device returns an error message.After you enable LACP globally by using the feature lacp command, you enable LACP on each channel by configuring the channel mode as either active or passive. An interface in this mode does not initiate or respond to LACP packets. When an LACP attempts to negotiate with an interface in the on state, it does not receive any LACP packets and becomes an individual link with that interface; it does not join the channel group.

The default mode is on .

passive

Specifies that when you enable LACP, this command enables LACP only if an LACP device is detected.The interface is in a passive negotiation state, in which the port responds to LACP packets that it receives but does not initiate LACP negotiation.

Command Default

None

Command Modes

Interface configuration mode

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

Use this command to create a channel group that includes the interface that you are working on and to add or remove specific interfaces from the channel group. Use this command to move a port from one channel group to another. You enter the channel group that you want the port to move to; the device automatically removes the specified port from its present channel group and adds that port to the specified channel group.

After you enable LACP globally by using the feature lacp command, you enable LACP on each channel by configuring the channel mode as either active or passive . A port channel in the on channel mode is a pure port channel and can aggregate a maximum of eight ports. It does not run LACP.

You cannot change the mode for an existing port channel or any of its interfaces if that port channel is not running LACP; the channel mode remains as on . The system returns an error message if you try.

All ports in one port channel must be in the same virtual device context (VDC). With LACP enabled, this requirement applies to the possible eight active ports and the possible eight standby ports. The port channels can originate in one VDC (with all ports in that channel in the same VDC) and partner with a port channel in another VDC (again, all ports in that channel must be in that VDC).

Use the no form of this command to remove the physical interface from the port channel. When you delete the last physical interface from a port channel, the port channel remains. To delete the port channel completely, use the no form of this interface port-channel command.

The compatibility check includes the following operational attributes:

  • Network layer

  • (Link) speed capability

  • Speed configuration

  • Duplex capability

  • Duplex configuration

  • Port mode

  • Access VLAN

  • Trunk native VLAN

  • Tagged or untagged

  • Allowed VLAN list

  • MTU size

  • SPAN—Cannot be a SPAN source or destination port

  • Layer 3 Ports—Cannot have subinterfaces

  • Storm control

  • Flow control capability

  • Flow control configuration

Use the show port-channel compatibility-parameters command to see the full list of compatibility checks that the Cisco NX-OS uses.

You can only add interfaces configured with the channel mode set to on to static port channels, that is without a configured aggregation protocol and you can only add interfaces configured with the channel mode as active or passive to port channels that are running LACP.

You can configure these attributes on an individual member port. If you configure a member port with an incompatible attribute, Cisco NX-OS suspends that port in the port channel.

Alternatively, you can force ports with incompatible parameters to join the port channel as long the following parameters are the same:

  • (Link) speed capability

  • Speed configuration

  • Duplex capability

  • Duplex configuration

  • Flow control capability

  • Flow control configuration

When the interface joins a port channel, some of its individual parameters are removed and replaced with the values on the port channel as follows:

  • Bandwidth

  • Delay

  • Extended Authentication Protocol over UDP

  • VRF

  • IP address (v4 and v6)

  • MAC address

  • Spanning Tree Protocol

  • NAC

  • Service policy

  • Quality of Service (QoS)

  • ACLs

Many of the following interface parameters remain unaffected when the interface joins or leaves a port channel:

  • Beacon

  • Description

  • CDP

  • LACP port priority

  • Debounce

  • UDLD

  • MDIX

  • Rate mode

  • Shutdown

  • SNMP trap

If subinterfaces are configured for the port-channel interface and a member port is removed from the port channel, the configuration of the port-channel subinterface is not propagated to the member ports.

Any configuration changes that you make in any of the compatibility parameters to the port-channel interface are propagated to all interfaces within the same channel group as the port channel (for example, configuration changes are also propagated to the physical interfaces that are not part of the port channel but are part of the channel group).

You do not have to create a port-channel interface before you assign a physical interface to a channel group. A port-channel interface is created automatically when the channel group gets its first physical interface, if it is not already created.

You can create either a Layer 2 or a Layer 3 port channel by entering the interface port-channel command or when the channel group gets its first physical interface assignment. The port channels are not created at run time or dynamically.


Note

The number of ports allowed in a port channel (for the ON mode) is different between M1 Series modules and F1 Series modules on VDCs only. The number is 8 for M1 Series modules or M1-F1 Series VDCs and 16 for F1 Series modules.

This command does not require a license.

Examples

This example shows how to add an interface to LACP channel group 5 in active mode:

switch(config-if)# channel-group 5 mode active
switch(config-if)#

clear counters interface

To clear the Ethernet and management interface counters, use the clear counters interface command.

clear counters interface {all [snmp] | ethernet slot/port | loopback number | mgmt number | port-channel channel-number | tunnel tunnel-number | vlan vlan-number}

Syntax Description

all

Clears all interface counters.

snmp

(Optional) clears SNMP interface counters.

ethernet slot /port

Clears the Ethernet interface counter for the slot number and port number specified.

loopback number

Clears the loopback interface counter for the virtual interface number specified. The range is from 0 to 1023.

mgmt number

Clears the management interface counter for the number specified. The number is 0.

port-channel channel-number

Clears the port-channel interface for the number specified. The range is from 1 to 4096.

tunnel tunnel-number

Clears the port-channel interface for the number specified. The range is from 0 to 65535.

vlan vlan-number

Clears the port-channel interface for the number specified. The range is from 1 to 4096.

Command Default

None

Command Modes

Global configuration mode

Interface Configuration mode

Command History

Release

Modification

6.2(2)

Added the snmp keyword to the syntax description.

4.0

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

This example shows how to clear an SNMP counter interface:

switch# clear counters interface all snmp

This example shows how to clear and reset the counters on Ethernet port 5/5:

switch# clear counters interface ethernet 5/5

clear l2protocol tunnel counters

To clear the Layer 2 protocol tunnel statistics counters, use the clear l2protocol tunnel counters command.

clear l2protocol tunnel counters [interface if-range]

Syntax Description

interface

(Optional) Specifies the interface statistics to clear.

if-range

Range of interfaces.

Command Default

None

Command Modes

Any command mode

Command History

Release

Modification

5.0(2)

This command was introduced.

Usage Guidelines

If no interfaces are specified, the Layer 2 protocol tunnel statistics are cleared for all interfaces.

This command does not require a license.

Examples

This example shows how to clear the Layer 2 protocol tunnel statistics counters:

switch# clear
 l2protocol tunnel 
counters

clear lacp counters

To clear the statistics for all interfaces for Link Aggregation Control Protocol (LACP) groups, use the clear lacp counters command.

clear lacp counters [interface port-channel channel-number]

Syntax Description

interface port-channel

(Optional) Specifies the interface port channel.

channel-number

(Optional) LACP port-channel number. The range is from 1 to 4096.

Command Default

None

Command Modes

Any command mode

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

If you enter this command for a static port-channel group without enabling the aggregation protocol, the device ignores the command.

If you do not specify a channel number, the LACP counters for all LACP port groups are cleared.

This command does not require a license.

Examples

This example shows how to clear all LACP counters:

switch(config)# clear lacp counters
switch(config)#

This example shows how to clear all LACP counters for the LACP port-channel group 20:

switch(config)# clear lacp counters interface port-channel 20
switch(config)# 

clear vpc statistics

To clear virtual port-channel (vPC) statistics, use the clear vpc statistics command.

clear vpc statistics {all | peer-keepalive | peer-link | vpc number}

Syntax Description

all

Clears all vPC statistics on the local vPC peer device.

peer-keepalive

Clears the vPC peer-keepalive statistics on the local vPC peer device.

peer-link

Clears statistics on the local vPC peer device.

vpc number

Clears vPC statistics on the specified vPC. The range is from 1 to 4096.

Command Default

None

Command Modes

Any command mode

Command History

Release

Modification

4.1(3)

This command was introduced.

Usage Guidelines

Use the clear vpc statistics command to clear the vPC statistics. If the feature is not enabled, this command is unavailable.

The clear vpc statistics peer-link and clear vpc statistics vpc number commands are redirected to the appropriate port channel and the clear statistics port-channel channel-number command.

This command does not require a license.

Examples

This example shows how to clear the statistics for vPC 10:

switch(config)# clear vpc statistics vpc 10
switch(config) # 

config-sync

To enable virtual port channels (vPC) configuration synchronization, use the config-sync command. To disable vPC configuration synchronization, use the no form of this command.

config-sync

no config-sync

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled.

Command Modes

VPC domain configuration mode

Command History

Release

Modification

7.1(1)D1(0)

This command was introduced.

Usage Guidelines

You must configure this command on both the primary and secondary switches in the same vPC domain. It does not matter which switch you configure first.

The config-sync command enables the synchronization of the configuration between the two switches. The following types of commands are enabled for configuration synchronization:

  • Type-1 configurations:

    • Global configurations

    • vPC member port-channel configurations

  • Type-2 configurations:

    • Global configurations

  • vPC configurations.

This command does not require a license.

Examples

This example shows how to enable configuration synchronization for switch 1 and switch 2:

n7k-1#  configure terminal
n7k-1 (config)# vpc domain 300
n7k-1(config-vpc-domain)# config-sync
n7k-2#  configure terminal
n7k-2 (config)# vpc domain 300
n7k-2(config-vpc-domain)# config-sync

connection timeout

To configure the timeout value for an Ethernet OAM session, use the connection timeout command in Ethernet OAM configuration mode. To remove the configuration, use the no form of this command.

connection timeout seconds

no connection timeout [seconds]

Syntax Description

seconds

Connection timeout period in number of lost periodic information OAMPDUs. The range is 2 to 30. The default value is 5.

Command Default

None

Command Modes

Ethernet OAM action configuration (config-eoam-action)

Interface Ethernet OAM action configuration (config-if-eoam-action)

Supported User Roles

network-admin

vdc--‐admin

network‐--operator

vdc-operator

Command History

Release Modification
7.3(0)D1(1)

This command was introduced.

Usage Guidelines

If no packets are received from the OAM peer in the specified connection timeout period which is measured in number of lost periodic Information OAMPDUs, then the OAM session is brought down, and the negotiation phase starts again.

This command does not require a license.

Examples

This example shows how to configure the connection timeout value of an Ethernet OAM session:

switch# configure terminal
switch(config)# ethernet oam profile Profile_1
switch(config-eoam)# connection timeout 20

critical-event

To configure what action is taken on an interface when a critical-event notification is received from the remote Ethernet OAM peer, use the critical-event command in Ethernet OAM action configuration action mode or interface Ethernet OAM action configuration mode. To remove the configuration, use the no form of this command.

critical-event {disable | error-disable-interface | log}

no critical-event [disable | error-disable-interface | log]

Syntax Description

disable

Performs no action on the interface when a critical-event notification is received.

error-disable-interface

Puts the interface into the error-disable state when a critical-event notification is received.

log

(Interface Ethernet OAM action configuration only) Creates a syslog entry when a critical-event notification is received. This action is available in Interface Ethernet OAM action configuration mode to override the profile setting and log the event for the interface when it occurs.

Command Default

The default action is to create a syslog entry.

Command Modes

Ethernet OAM action configuration (config-eoam-action)

Interface Ethernet OAM action configuration (config-if-eoam-action)

Supported User Roles

network-admin

vdc-­‐-admin

network-­‐-operator

vdc-operator

Command History

Release Modification

7.3(0)D1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

The following example shows how to configure that no action is performed on the interface when a critical-event notification is received:

switch# configure terminal
switch(config)# ethernet oam profile Profile_1
switch(config-eoam)# action
switch(config-eoam-action)# critical-event disable

The following example shows how to configure that the interface is put into the error-disable state when a critical-event notification is received:

switch# configure terminal
switch(config)# ethernet oam profile Profile_1
switch(config-eoam)# action
switch(config-eoam-action)# critical-event error-disable-interface

The following example shows how to configure that a syslog is created when a critical-event notification is received:

switch# configure terminal
switch(config)# interface ethernet 2/1
switch(config-if)# ethernet oam 
switch(config-if-eoam)# action 
switch(config-if-eoam-action)# critical-event log