The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes the Cisco Nexus 1000V commands that begin with the letter C.
To change to a different directory from the one you are currently working in, use the cd command.
cd [filesystem:[//directory] | directory]
filesystem: |
(Optional) File system name. Valid file systems are bootflash and volatile. |
//directory |
(Optional) Directory name. The directory name is case-sensitive and can be up to 28 characters. |
bootflash
Any
network-admin
You can only change to the directories that are on the active supervisor module.
Use the present working directory (pwd) command to verify the name of the directory that you are currently working in.
This example shows how to change to a different directory on the current file system:
n1000v# cd my-scripts
This example shows how to change from the file system that you are currently working in to a different file system:
n1000v# cd volatile:
This example shows how to revert back to the default directory, bootflash:
n1000v# cd
|
|
---|---|
pwd |
Displays the name of the directory that you are currently working in. |
To specify the Cisco Discovery Protocol version to advertise, use the cdp advertise command. To remove the cdp advertise configuration, use the no form of this command.
cdp advertise {v1 | v2}
no cdp advertise [v1 | v2]
v1 |
Specifies Cisco Discovery Protocol Version 1. |
v2 |
Specifies Cisco Discovery Protocol Version 2. |
Cisco Discovery Protocol Version 2
Global configuration (config)
network-admin
This example shows how to set Cisco Discovery Protocol Version 1 as the version to advertise:
n1000v(
config)#
cdp advertise v1
This example shows how to remove Cisco Discovery Protocol Version 1 as the configuration to advertise:
n1000v(
config)#
no cdp advertise v1
|
|
---|---|
show cdp global |
Displays the Cisco Discovery Protocol configuration. |
To enable the Cisco Discovery Protocol globally on all interfaces and port channels, use the cdp enable command. To disable CDP globally, use the no form of this command.
cdp enable
no cdp enable
This command has no arguments or keywords.
Enabled on all interfaces and port channels
Global configuration (config)
network-admin
Cisco Discovery Protocol can only be configured on physical interfaces and port channels.
This example shows how to enable Cisco Discovery Protocol globally and then display the Cisco Discovery Protocol configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# cdp enable
n1000v(config)# show cdp global
Global CDP information:
CDP enabled globally
Refresh time is 60 seconds
Hold time is 180 seconds
CDPv2 advertisements is enabled
DeviceID TLV in System-Name(Default) Format
n1000v(config)#
This example shows how to disable Cisco Discovery Protocol globally and then display the Cisco Discovery Protocol configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
no cdp enable
n1000v(config)# show cdp global
Global CDP information:
CDP disabled globally
Refresh time is 60 seconds
Hold time is 180 seconds
CDPv2 advertisements is enabled
DeviceID TLV in System-Name(Default) Format
n1000v(config)#
|
|
---|---|
cdp enable (interface or port channel) |
Enables the Cisco Discovery Protocol on an interface or port channel. |
show cdp global |
Displays the Cisco Discovery Protocol configuration. |
To enable the Cisco Discovery Protocol on an interface or port channel, use the cdp enable command. To disable it, use the no form of this command.
cdp enable
no cdp enable
This command has no arguments or keywords.
None
Interface configuration (config-if)
network-admin
Cisco Discovery Protocol can only be configured on physical interfaces and port channels.
This example shows how to enable the Cisco Discovery Protocol on port channel 2:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# interface port-channel2
n1000v(config-if)# cdp enable
n1000v(config-if)#
This example shows how to disable the Cisco Discovery Protocol on mgmt0:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# interface mgmt0
n1000v(config-if)# no cdp enable
n1000v(config-if)# show cdp interface mgmt0
mgmt0 is up
CDP disabled on interface
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
n1000v(config-if)#
To specify the device ID format for the Cisco Discovery Protocol, use the cdp format device-id command. To remove it, use the no form of this command.
cdp format device-id {mac-address | serial-number | system-name}
no cdp format device-id {mac-address | serial-number | system-name}
System name/fully qualified domain name
Global configuration (config)
network-admin
Cisco Discovery Protocol must be enabled globally before you configure the device ID format.
You can configure the Cisco Discovery Protocol on physical interfaces and port channels only.
This example shows how to configure the Cisco Discovery Protocol device ID with the MAC address format and then display the configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
cdp format device-id mac-address
n1000v
(config)# show cdp global
Global CDP information:
CDP enabled globally
Sending CDP packets every 5 seconds
Sending a holdtime value of 10 seconds
Sending CDPv2 advertisements is disabled
Sending DeviceID TLV in Mac Address Format
This example shows how to remove the Cisco Discovery Protocol device ID MAC address format from the configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
no cdp format device-id mac-address
To do set the maximum amount of time that the Cisco Discovery Protocol holds onto neighbor information before discarding it, use the cdp holdtime command. To remove the Cisco Discovery Protocol holdtime configuration, use the no form of this command.
cdp holdtime seconds
no cdp holdtime seconds
seconds |
Time that the Cisco Discovery Protocol holds on to neighbor information. The range is from 10 to 255 seconds. |
180 seconds
Global configuration (config)
network-admin
Cisco Discovery Protocol must be enabled globally before you configure the device ID format.
You can configure the Cisco Discovery Protocol on physical interfaces and port channels only.
This example shows how to set the Cisco Discovery Protocol holdtime to 10 second:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
cdp holdtime 10
This example shows how to remove the Cisco Discovery Protocol holdtime configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
no cdp holdtime 10
|
|
---|---|
show cdp global |
Displays the Cisco Discovery Protocol global configuration parameters. |
show cdp neighbors |
Displays the upstream device from your device. |
To set the refresh time for the Cisco Discovery Protocol to send advertisements to neighbors, use the cdp timer command. To remove the Cisco Discovery Protocol timer configuration, use the no form of this command.
cdp timer seconds
no cdp timer seconds
seconds |
Time before the Cisco Discovery Protocol sends advertisements to neighbors. The range is from 5 to 254 seconds. |
60 seconds
Global configuration (config)
network-admin
This example shows how to configure the Cisco Discovery Protocol timer to 10 seconds:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
cdp timer 10
This example shows how to remove the Cisco Discovery Protocol timer configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
no cdp timer 10
|
|
---|---|
show cdp global |
Displays the Cisco Discovery Protocol global configuration parameters. |
show cdp neighbors |
Displays the upstream device from your device. |
To create and define a channel group for all interfaces that belong to a port profile, use the channel-group auto command. To remove the channel group, use the no form of this command.
channel-group auto [mode channel_mode] [sub-group sg-type{cdp | manual}] [mac-pinning]
no channel-group
None
Port profile configuration (config-port-prof)
network-admin
The channel-group auto command creates a unique port channel for all interfaces that belong to the same module. The channel group is automatically assigned when the port profile is assigned to the first interface. Each additional interface that belongs to the same module is added to the same port channel. In Microsoft Hyper-V environments, a different port channel is created for each module.
•The channel group mode must be set to on when configuring a virtual port channel host machine (vPC-HM).
•When configuring a port channel for a port profile that connects to two or more upstream switches, note the following:
–You need to know whether Cisco Discovery Protocol is configured in the upstream switches.
If configured, Cisco Discovery Protocol creates a subgroup for each upstream switch to manage its traffic separately.
If not configured, you must manually configure subgroups to manage the traffic flow on the separate switches.
–When configuring a port channel for vPC-HM, and the upstream switches do not support port channels, you can use MAC pinning, which automatically assigns each Ethernet member port to a unique subgroup.
–You can also configure vPC-HM on the interface. For more information, see the Cisco Nexus 1000V Interface Configuration Guide, Release 5.2(1)SM1(5.1).
This example shows how to configure a port profile for a port channel that connects to a single upstream switch and then display the configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# port-profile AccessProf
n1000v(config-port-prof)# channel-group auto mode on
n1000v(config-port-prof)# show port-profile name AccessProf
port-profile AccessProf
description: allaccess4
status: disabled
capability uplink: yes
port-group: AccessProf
config attributes:
switchport mode access
channel-group auto mode on
evaluated config attributes:
switchport mode access
channel-group auto mode on
assigned interfaces:
n1000v(config-port-prof)#
This example shows how to remove the channel group configuration from the port profile and then display the configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# port-profile AccessProf
n1000v(config-port-prof)# no channel-group
n1000v(config-port-prof)# show port-profile name AccessProf
port-profile AccessProf
description: allaccess4
status: disabled
capability uplink: yes
port-group: AccessProf
config attributes:
switchport mode access
evaluated config attributes:
switchport mode access
assigned interfaces:
n1000v(config-port-prof)#
This example shows how to configure a port profile for a port channel that connects to multiple upstream switches that have the Cisco Discovery Protocol enabled and then display the configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# port-profile uplinkProf
n1000v(config-port-prof)# channel-group auto mode on sub-group cdp
n1000v(config-port-prof)# show port-profile name uplinkProf
port-profile uplinkProf
description:
type: vethernet
status: disabled
pinning control-vlan: -
pinning packet-vlan: -
system vlans: none
port-group:
max ports: 32
inherit:
config attributes:
channel-group auto mode on sub-group cdp
evaluated config attributes:
channel-group auto mode on sub-group cdp
assigned interfaces:
|
|
---|---|
port-profile |
Creates a port profile and places you into global configuration mode for the named port profile. |
show port-profile name |
Displays the port profile configuration. |
To add an existing quality of service (QoS) class to a policy map, use the class command. To remove a QoS class from a policy map, use the no form of this command.
class [type qos] {class-map-name | class-default} [insert-before [type qos] before-class-map-name]
no class {class-map-name | class-default}
type qos
The default is to reference a new class map at the end of the policy map.
The class named class-default matches all traffic not classified in other classes.
Policy map configuration (config-pmap)
network-admin
Policy actions in the first class that matches the traffic type are performed.
The class named class-default matches all traffic not classified in other classes.
This example shows how to add a class map in sequence to the end of a policy map:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
policy-map my_policy1
n1000v(config-pmap)# class traffic_class2
n1000v(config-pmap-c-qos)#
This example shows how to insert a class map in sequence before an existing class map in a policy map:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
policy-map my_policy1
n1000v(config-pmap-qos)# class insert-before traffic_class2 traffic_class1
n1000v(config-pmap-c-qos)#
This example shows how to add the class-default class map to a policy map:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
policy-map my_policy1
n1000v(config-pmap-qos)# class class-default
n1000v(config-pmap-c-qos)#
This example shows how to remove a class map reference from a policy map:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
policy-map my_policy1
n1000v(config-pmap)# no class traffic_class1
n1000v(config-pmap)#
To create or modify a quality of service (QoS) class map that defines a class of traffic, use the class-map command. To remove a class map, use the no form of this command.
class-map [type qos] [match-any | match-all] class-map-name
no class-map [type qos] [match-any | match-all] class-map-name
type QoS
match-all
Global configuration (config)
network-admin
Hyphen, underscore, and alphabetic characters are allowed in the class map name.
Forty characters are the maximum allowed in the class map name.
Characters in the class map name are case-sensitive and can be up to 28 characters.
This example shows how to create a class map and enter the QoS class map configuration mode to configure the specified map:
n1000v#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
class-map my_class1
n1000v(config-cmap-qos)#
This example shows how to remove the QoS class map named my_class1:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
no class-map my_class1
n1000v(config)#
To clear the counters for IP and MAC access control lists (ACLs), use the clear access-list counters command.
clear access-list counters [access-list-name]
access-list-name |
(Optional) ACL name, whose counters the device clears. The name can be up to 64 alphanumeric, case-sensitive characters. |
None
Any
network-admin
If you specify an ACL, the name can be up to 64 alphanumeric, case-sensitive characters.
This example shows how to clear counters for all IP and MAC ACLs:
n1000v# clear access-list counters
n1000v#
This example shows how to clear counters for an IP ACL named acl-ip-01:
n1000v# clear access-list counters acl-ip-01
n1000v#
To clear Cisco Discovery Protocol information on an interface, use the clear cdp command.
clear cdp {counters | table} [interface {control if_num | ethernet slot/chassis_num | mgmt mgmt_num}]
None
Any
network-admin
network-operator
This example shows how to clear the Cisco Discovery Protocol counters on all interfaces:
n1000V#
clear cdp counters
This example shows how to clear the Cisco Discovery Protocol cache on all interfaces:
n1000V#
clear cdp table
|
|
---|---|
show cdp |
Displays interfaces that have the Cisco Discovery Protocol enabled. |
To clear the history of commands you have entered into the command-line interface (CLI), use the clear cli history command.
clear cli history
This command has no arguments or keywords.
None
Any
network-admin
Use the show cli history command to display the history of the commands that you entered at the CLI.
This example shows how to clear the command history:
n1000v# clear cli history
|
|
---|---|
show cli history |
Displays the command history. |
To clear the core files, use the clear cores command.
clear cores [archive]
archive |
(Optional) Clears the core file on the logflash file system. |
None
Any
network-admin
Use the show system cores command to display information about the core files.
This example shows how to clear the core file:
n1000v# clear cores
This example shows how to clear the core on the logflash file system:
n1000v# clear cores archive
|
|
---|---|
show cores |
Displays all of the device core dumps, for the current VDC. |
show system cores |
Displays the core filename. |
system cores |
Configures the core filename. |
To clear interface counters, use the clear counters command.
clear counters [interface {all | ethernet slot/port | mgmt | port-channel port-channel-number | vethernet interface-number}]
None
Any
network-admin
network-operator
This example shows how to clear the Ethernet interface counters:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(
config)#
clear counters ethernet 2/1
|
|
---|---|
show interface counters |
Displays the interface status, which includes the counters. |
To clear the contents of the debug logfile, use the clear debug-logfile command.
clear debug-logfile filename
filename |
Debug logfile name to clear. |
None
Any
network-admin
This example shows how to clear the debug logfile:
n1000v# clear debug-logfile syslogd_debugs
|
|
---|---|
debug logfile |
Configures a debug logging file. |
debug logging |
Enable debug logging. |
show debug logfile |
Displays the contents of the debug logfile. |
To clear the statistics for a Flexible NetFlow flow exporter, use the clear flow exporter command.
clear flow exporter {name exporter-name | exporter-name}
name exporter-name |
Specifies a flow exporter. Flow exporter name. The maximum size is 63, case-sensitive, alphanumeric characters. |
None
Any
network-admin
You must have already enabled traffic monitoring with Flexible NetFlow using an exporter before you can use the clear flow exporter command.
This example shows how to clear the statistics for the flow exporter named NFC-DC-PHOENIX:
n1000v# clear flow exporter name NFC-DC-PHOENIX
n1000v#
|
|
---|---|
clear flow exporter |
Clears the statistics for exporters. |
flow exporter |
Creates a flow exporter. |
show flow exporter |
Displays flow exporter status and statistics. |
To clear the counters for IP access control lists (ACLs), use the clear ip access-list counters command.
clear ip access-list counters [access-list-name]
access-list-name |
(Optional) IP ACL name, whose counters you want cleared. The name can be up to 64 alphanumeric, case-sensitive characters. |
None
Any
network-admin
If specifying an ACL by name, it can be up to 64 alphanumeric, case-sensitive characters.
This example shows how to clear counters for all IP ACLs:
n1000v# clear ip access-list counters
n1000v#
This example shows how to clear counters for an IP ACL named acl-ip-101:
n1000v# clear ip access-list counters acl-ip-101
n1000v#
To clear the Dynamic Address resolution Protocol (ARP) Inspection (DAI) statistics for a specified VLAN, use the clear ip arp inspection statistics vlan command.
clear ip arp inspection statistics vlan vlan-id
vlan-id |
VLAN identification number. The range is from 1 to 4094. |
None
Any
network-admin
This example shows how to clear the DAI statistics for VLAN 2:
n1000v# clear ip arp inspection statistics vlan 2
n1000v#
This example shows how to clear the DAI statistics for VLANs 5 through 12:
n1000v# clear ip arp inspection statistics vlan 5-12
n1000v#
This example shows how to clear the DAI statistics for VLAN 2 and VLANs 5 through 12:
n1000v# clear ip arp inspection statistics vlan 2,5-12
n1000v#
|
|
---|---|
ip arp inspection vlan |
Enables or disables DAI for a list of VLANs. |
show ip arp inspection statistics |
Displays the DAI statistics. |
To clear dynamically added entries from the Dynamic Host Configuration Protocol (DHCP) snooping binding database, use the clear ip dhcp snooping binding command.
clear ip dhcp snooping binding [vlan vlan-id mac mac-addr ip ip-addr interface interface-id]
None
Any
network-admin
network-operator
This example shows how to clear dynamically added entries from the DHCP snooping binding database:
n1000v# clear ip dhcp snooping binding
n1000v#
This example shows how to clear a DHCP snooping binding table entry for an interface:
n1000v#
clear ip dhcp snooping binding vlan 10 mac EEEE.EEEE.EEEE ip 10.10.10.1 interface
vethernet 1
n1000v#
To clear the Internet Group Management Protocol (IGMP) statistics for an interface, use the clear ip igmp interface statistics command.
clear ip igmp interface statistics [if-type if-number]
if-type if-number |
(Optional) Interface type. For more information, use the question mark (?) online help function. (Optional) Interface number. The range of numbers is dependent of the interface. |
None
Any
network-admin
network-operator
This example shows how to clear IGMP statistics for an interface:
n1000v#
clear ip igmp interface statistics ethernet 2/1
n1000v#
|
|
---|---|
show ip igmp snooping |
Displays IGMP snooping information. |
To clear the Internet Group Management Protocol (IGMP) snooping statistics for VLANs, use the clear ip igmp snooping statistics vlan command.
clear ip igmp snooping statistics vlan {vlan-id | all}
vlan-id |
VLAN number. The range is from 1 to 3967 and from 4048 to 4093. |
all |
Applies to all VLANs. |
None
Any
network-admin
network-operator
This example shows how to clear IGMP snooping statistics for VLAN 1:
n1000v#
clear ip igmp snooping statistics vlan 1
n1000v#
|
|
---|---|
show ip igmp snooping statistics vlan |
Displays IGMP snooping statistics by VLAN. |
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]
interface |
(Optional) Specifies an interface. |
port-channel channel-number |
The port channel interface. LACP port channel number. The range is from 1 to 4096. |
None
Any
network-admin
If you clear counters for a specific port channel, the allowable port channel numbers are from 1 to 4096.
If you do not specify a port channel number, the LACP counters for all LACP port groups are cleared.
If you clear counters for a static port-channel group, without the aggregation protocol enabled, the device ignores the command.
This example shows how to clear all the LACP counters:
n1000v#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)#
clear lacp counters
n1000v(config) #
This example shows how to clear all LACP counters for the LACP port-channel group 20:
n1000v#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)#
clear lacp counters interface port-channel 20
n1000v(config)#
|
|
---|---|
show lacp counters |
Displays information about LACP statistics. |
To uninstall a license file from a Virtual Supervisor Module (VSM), or to uninstall an evaluation license before installing a permanent license, use the clear license command.
clear license filename
filename |
License file to be uninstalled. |
None
Any
network-admin
If a license is in use, you cannot uninstall it. Before uninstalling the license file, all licenses must first be transferred from the Virtual Ethernet Modules (VEMs) to the VSM license pool.
This example shows how to remove the Enterprise.lic license file from a VSM:
n1000v# clear license Enterprise.lic
Clearing license Enterprise.lic:
SERVER this_host ANY
VENDOR cisco
Do you want to continue? (y/n) y
Clearing license ..done
n1000v#
To end a session on a specified virtual teletype (VTY), use the clear line command.
clear line word
word |
VTY name. |
None
Any
network-admin
network-operator
This example shows how to end a session on a specified VTY:
n1000v(
config)#
clear line
|
|
---|---|
show users |
Displays active user sessions. |
To clear messages from the logging file, use the clear logging logfile command:
clear logging logfile
This command has no arguments or keywords.
None
Any
Super user
This example shows how to clear messages from the logging file:
n1000v# clear logging logfile
n1000v#
|
|
---|---|
show logging logfile |
Displays the logs in the local log file. |
To clear the current logging session, use the clear logging session command:
clear logging session
This command has no arguments or keywords.
None
Any
Super user
This example shows how to clear the current logging session:
n1000v# clear logging session
n1000v#
|
|
---|---|
show logging session |
Displays the logging session status |
To clear the counters for MAC access control lists (ACLs), use the clear mac access-list counters command.
clear mac access-list counters [access-list-name]
access-list-name |
(Optional) MAC ACL name, whose counters you want to clear. The name can be up to 64 alphanumeric, case-sensitive characters. |
None
Any
network-admin
If you want counters cleared for a specific MAC ACL, the name can be up to 64 alphanumeric, case-sensitive characters.
This example shows how to clear counters for all MAC ACLs:
n1000v# clear mac access-list counters
n1000v#
This example shows how to clear counters for a MAC ACL named acl-mac-0060:
n1000v# clear mac access-list counters acl-mac-0060
n1000v#
To clear the Layer 2 dynamic address entries from the MAC address table, use the clear mac address-table dynamic command.
clear mac address-table dynamic [bridge-domain bridge_dom_ name | vlan vlan-id [bridge-domain bridge_dom_ name ]]
None
Any
network-admin
Use the clear mac address-table dynamic command with no arguments or keywords to remove all dynamic entries from the table.
To clear static MAC addresses from the table, use the no mac address-table static command.
If you enter the clear mac address-table dynamic command with no arguments or keywords, all dynamic addresses are removed. If you specify an address but do not specify an interface, the address is deleted from all interfaces. If you specify an interface but do not specify an address, the device removes all addresses on the specified interfaces.
This example shows how to clear all dynamic Layer 2 entries from the MAC address table:
n1000v#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)#
clear mac address-table dynamic
n1000v(config) #
This example shows how to clear all dynamic Layer2 entries for VLAN 342:
n1000v#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# clear mac address-table dynamic vlan 342
n1000v(config)#
|
|
---|---|
show mac address-table |
Displays the information about the MAC address table. |
To clear the Network Time Protocol (NTP) statistics, use the clear ntp statistics command.
clear ntp statistics {all-peers | io | local | memory}
all-peers |
Clears statistics for all NTP peers. |
io |
Clears IO statistics. |
local |
Clears local statistics. |
memory |
Clears memory statistics. |
None
Any
network-admin
network-operator
This example shows how to clear statistics for all NTP peers:
n1000v(
config)#
clear ntp statistics all-peers
|
|
---|---|
show ntp peers |
Displays information about NTP peers. |
To clear dynamically learned, secure MAC address(es), use the clear port-security command.
clear port-security {dynamic} {interface vethernet veth-number | address address} [vlan vlan-id]
dynamic
Any
network-admin
This example shows how to remove dynamically learned, secure MAC addresses from the veth1 interface:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# clear port-security dynamic interface veth 1
This example shows how to remove the dynamically learned, secure MAC address 0019.D2D0.00AE:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# clear port-security dynamic address 0019.D2D0.00AE
To clear the counters for quality of service (QoS) statistics, use the clear qos statistics command.
clear qos statistics {interface [ethernet slot/chassis | vethernet veth-number | port-channel number]} [input type qos | output type qos]}
None
Any
network-admin
network-operator
If you do not specify an interface, the counters are cleared for all interfaces.
This example shows how to clear QoS statistics for all interfaces:
n1000v#
clear qos statistics
n1000v#
This example shows how to clear all input QoS statistics for veth2:
n1000v#
clear qos statistics veth2 input type qos
n1000v#
|
|
---|---|
qos statistics |
Enables or disables QoS statistics. |
show policy-map |
Displays the policy map configuration for all policy maps or for a specified policy map. |
To clear the Secure Shell (SSH) host sessions, use the clear ssh hosts command.
clear ssh hosts
This command has no arguments or keywords.
None
Any
network-admin
This example shows how to clear all of the SSH host sessions:
n1000v# clear ssh hosts
|
|
---|---|
show ssh |
Shows the SSH sessions. |
ssh server enable |
Enables the SSH server. |
To clear the device reset-reason history, use the clear system reset-reason command.
clear system reset-reason
This command has no arguments or keywords.
None
Any
network-admin
This example shows how to clear the reset-reason history:
n1000v# clear system reset-reason
|
|
---|---|
show system reset-reason |
Displays the device reset-reason history. |
To clear a user session, use the clear user command.
clear user user-id
user-id |
User identifier. The name is alphanumeric, not case-sensitive, and has a maximum of 32 characters. |
None
Any
network-admin
Use the show users command to display the current user sessions on the device.
This example shows how to clear all Secure Shell (SSH) host sessions:
n1000v# clear user user1
|
|
---|---|
show users |
Displays the user session information. |
To define a command-line interface (CLI) variable for a terminal session, use the cli var name command. To remove the CLI variable, use the no form of this command.
cli var name variable-name variable-text
cli no var name variable-name
None
Any
network-admin
You can reference a CLI variable using the following syntax:
$(variable-name)
Instances where you can use variables in include the following:
•Command scripts
•Filenames
You cannot reference a variable in the definition of another variable.
You can use the predefined variable, TIMESTAMP, to insert the time of day. You cannot change or remove the TIMESTAMP CLI variable.
You must remove a CLI variable before you can change its definition.
This example shows how to define a CLI variable:
n1000v# cli var name testinterface interface 2/3
This example shows how to reference the TIMESTAMP variable:
n1000v# copy running-config > bootflash:run-config-$(TIMESTAMP).cnfg
This example shows how to remove a CLI variable:
n1000v# cli no var name testinterface interface 2/3
|
|
---|---|
show cli variables |
Displays the CLI variables. |
To manually set the clock, use the clock set command.
clock set time day month year
None
Any
network-admin
Use this command when you cannot synchronize your device with an outside clock source, such as NTP.
This example shows how to manually set the clock:
n1000v# clock set 9:00:00 1 June 2008
|
|
---|---|
show clock |
Displays the clock time. |
To configure the summer-time (daylight saving time) offset, use the clock summer-time command. To revert to the default, use the no form of this command.
clock summer-time zone-name start-week start-day start-month start-time end-week end-day end-month end-time offset-minutes
no clock summer-time
None
Global configuration (config)
network-admin
This example shows how to configure the offset for summer-time or daylight saving time:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# clock summer-time PDT 1 Sunday March 02:00 1 Sunday November 02:00 60
This example shows how to remove the summer-time offset:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# no clock summer-time
|
|
---|---|
show clock |
Displays the clock summer-time offset configuration. |
To configure the time zone offset from Coordinated Universal Time (UTC), use the clock timezone command. To revert to the default, use the no form of this command.
clock timezone zone-name offset-hours offset-minutes
no clock timezone
None
Any
network-admin
This example shows how to configure the time zone offset from UTC:
n1000v# clock timezone EST 5 0
This example shows how to remove the time zone offset:
n1000v# no clock timezone
|
|
---|---|
show clock |
Displays the clock time. |
To configure the number of bytes or packets in a flow as a nonkey field and collect the number of bytes or packets seen for a Flexible NetFlow flow record, use the collect counter command. To disable the counters, use the no form of this command.
collect counter {bytes [long] | packets [long]}
no collect counter {bytes [long] | packets [long]}
This command is not enabled by default.
Flow record configuration (config-flow-record)
network-admin
This example shows how to collect the total number of bytes from the flows as a nonkey field:
n1000v(config)# flow record FLOW-RECORD-1
n1000v(config-flow-record)# collect counter bytes
This example shows how to collect the total number of bytes from the flows as a nonkey field using a 64 bit counter:
n1000v(config)# flow record FLOW-RECORD-1
n1000v(config-flow-record)# collect counter bytes long
This example shows how to collect the total number of packets from the flows as a nonkey field:
n1000v(config)# flow record FLOW-RECORD-1
n1000v(config-flow-record)# collect counter packets
This example shows how to collect the total number of packets from the flows as a nonkey field using a 64-bit counter:
n1000v(config)# flow record FLOW-RECORD-1
n1000v(config-flow-record)# collect counter packets long
To collect the TIMESTAMP SYS-UPTIME for a NetFlow flow record, use the collect timestamp sys-uptime command. To disable the collection, use the no form of this command.
collect timestamp sys-uptime {first | last}
no collect timestamp sys-uptime {first | last}
This command is not enabled by default.
Flow record configuration (config-flow-record)
network-admin
This example enables collecting the sys-uptime for the time that the first packet was seen from the flows:
n1000v(config)# flow record FLOW-RECORD-1
n1000v(config-flow-record)# collect timestamp sys-uptime first
This example enables collecting the sys-uptime for the time that the most recent packet was seen from the flows:
n1000v(config)# flow record FLOW-RECORD-1
n1000v(config-flow-record)# collect timestamp sys-uptime last
|
|
---|---|
flow record |
Creates a flow record. |
show flow record |
Displays flow record status and statistics. |
To collect Transmission Control Protocol (TCP) flags for a NetFlow flow record, use the collect transport tcp flags command. To disable the collection, use the no form of this command.
collect transport tcp flags
no collect transport tcp flags
This command has no arguments or keywords
This command is not enabled by default.
Flow record configuration (config-flow-record)
network-admin
This example shows how to collect the TCP flags:
n1000v(config)# flow record FLOW-RECORD-1
n1000v(config-flow-record)# collect transport tcp flags
|
|
---|---|
flow record |
Creates a flow record. |
show flow record |
Displays flow record status and statistics. |
To enter global configuration mode, use the configure terminal command.
configure terminal
This command has no arguments or keywords.
None
Any
network-admin
The configuration changes you make in the global configuration mode are saved in the running configuration file. To save these changes persistently across reboots and restarts, you must copy them to the startup configuration file using the copy running-config startup-config command.
This example shows how to enter global configuration mode:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)#
To copy a file from a source to a destination, use the copy command.
copy source-url destination-url
The default name for the destination file is the source filename.
Any
network-admin
The entire copying process may take several minutes, depending on the network conditions and the size of the file and differs from protocol to protocol and from network to network.
The colon character (:) is required after the file system URL prefix keywords (such as bootflash).
In the URL syntax for ftp:, scp:, sftp:, and tftp:, the server is either an IP address or a hostname.
The format of the source and destination URLs varies according to the file or directory location. You may enter either a command-line interface (CLI) variable for a directory or a filename that follows the Cisco NX-OS file system syntax (filesystem:[/directory][/filename]).
The following tables list URL prefix keywords by the file system type. If you do not specify a URL prefix keyword, the device looks for the file in the current directory.
Table 1 lists URL prefix keywords for bootflash and remote writable storage file systems.
Table 2 lists the URL prefix keywords for nonwritable file systems.
This example shows how to copy a file within the same directory:
n1000v# copy file1 file2
This example shows how to copy a file to another directory:
n1000v# copy file1 my_files:file2
This example shows how to copy a file to another supervisor module:
n1000v# copy file1 bootflash://sup-remote/file1.bak
This example shows how to copy a file from a remote server:
n1000v# copy scp://10.10.1.1/image-file.bin bootflash:image-file.bin
To copy the running configuration to the startup configuration, use the copy running-config startup-config command.
copy running-config startup-config
This command has no arguments or keywords.
None
Any
network-admin
Use this command to save configuration changes in the running configuration to the startup configuration in persistent memory. When a device reload or switchover occurs, the saved configuration is applied.
This example shows how to save the running configuration to the startup configuration:
n1000v# copy running-config startup-config
[########################################] 100%