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 E.
To echo an argument back to the terminal screen, use the echo command.
echo [backslash-interpret] [text]
Displays a blank line.
Any
network-admin
You can use this command in a command script to display information while the script is running.
Table 1 lists the formatting keywords that you can insert in the text when you include the -e or backslash-interpret keyword.
This example shows how to display a blank line at the command prompt:
n1000v# echo
This example shows how to display a line of text at the command prompt:
n1000v# echo Script run at $(TIMESTAMP).
Script run at 2008-08-12-23.29.24.
This example shows how to use a formatting option in the text string:
n1000v# echo backslash-interpret This is line #1. \nThis is line #2.
This is line #1.
This is line #2.
|
|
---|---|
run-script |
Runs command scripts. |
To exit a configuration mode and return to privileged EXEC mode, use the end command.
end
This command has no arguments or keywords.
None
Any
network-admin
network-operator
This command differs from the exit command in that the exit command returns you to the configuration mode you were previously in. The end command always takes you completely out of configuration mode and places you in privileged EXEC mode.
This example shows how to end the session in global configuration mode and return to privileged EXEC mode:
n1000v(config)# end
n1000v#
This example shows how to end the session in interface configuration mode and return to privileged EXEC mode:
n1000v(config-if)# end
n1000v#
|
|
---|---|
exit |
Exits the current command mode and returns you to the previous command mode. |
To detect the reason an interface is error-disabled, use the errdisable detect cause command. To stop error detection, use the no form of this command.
errdisable detect cause {all | link-flap | loopback | arp-inspection | dhcp-rate-limit | qos-exception}
no errdisable detect cause {all | link-flap | loopback | arp-inspection | dhcp-rate-limit | qos-exception}
Disabled
Global configuration (config)
network-admin
The error-disabled state is an operational state that is similar to the link-down state. You must enter the shutdown command and then the no shutdown command to recover an interface manually from the error-disabled state.
This example shows how to detect the cause of the error-disabled state for all applications:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# errdisable detect cause all
n1000v(config)#
To enable the automatic recovery from the error-disabled (errdisable) state for an application, use the errdisable recovery cause command. To return to the default setting, use the no form of this command.
errdisable recovery cause {all | arp-inspection | bpduguard | dhcp-rate-limit | link-flap | failed-port-state | psecure-violation | security-violation | storm-control | udld | vpc-peerlink}
no errdisable recovery cause {all | arp-inspection | bpduguard | dhcp-rate-limit | link-flap | psecure-violation | security-violation | storm-control | udld | vpc-peerlink}
Disabled
Global configuration (config)
network-admin
Use the errdisable recovery cause command to enable automatic recovery on the interface from the error-disabled state for an application. This command tries to bring the interface out of the error-disabled state and retry operation once all the causes have timed out. The interface automatically tries to come up again after 300 seconds. To change this interval, use the errdisable recovery interval command.
This example shows how to automatically recover from the error-disabled state for link flapping after you have enabled the recovery timer:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# errdisable recovery cause link-flap
n1000v(config)#
|
|
---|---|
errdisable recovery interval |
Enables the recovery timer. |
show interface status err-disabled |
Displays the interface error disabled state. |
To enable the recovery timer, use the errdisable recovery interval command.
errdisable recovery interval interval
interval |
Error detection for access list installation failures. The range is from 30 to 65535. |
300 seconds
Global configuration (config)
network-admin
Use the errdisable recovery interval command to configure the recovery timer.
This example shows how to configure the recovery timer:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# errdisable recovery interval 32
n1000v(config)#
|
|
---|---|
errdisable recovery cause |
Enables the error-disabled recovery for an application. |
show interface status err-disabled |
Displays the interface error-disabled state. |
To add an Encapsulated Remote Switch Port Analyzer (ERSPAN) ID to the session configuration and save it in the running configuration, use the erspan-id command.
erspan-id flow_id
flow_id |
Flow ID to be assigned to the ERSPAN session. The range is from 1 to 1023. |
None
ERSPAN source configuration (config-erspan-src)
network-admin
The session ERSPAN ID is added to the ERSPAN header of the encapsulated frame and can be used at the termination box to differentiate between various ERSPAN streams of traffic.
This example shows how to add ERSPAN ID 51 to the session configuration and save it in the running configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# monitor session type erspan-source
n1000v(config-erspan-src)# erspan_id 51
n1000v(config-erspan-src)#
To decode and display packet information from a file, use the ethanalyzer local read command.
ethanalyzer local read filename
filename |
Filename. The filename is alphanumeric, case-sensitive and can be up to 28 characters. |
None.
Global configuration (config)
network-admin
This example shows how to capture and display packets from a file:
n1000v# ethanalyzer local read bootflash:packet.log
2010-06-08 16:06:20.791442 00:50:56:b5:00:3b -> ff:ff:ff:ff:ff:ff LLC U, func=UI; SNAP, OUI 0x00000C (Cisco), PID 0x0132
2010-06-08 16:06:20.793056 00:02:3d:40:71:41 -> 00:50:56:b5:00:3b LLC U, func=UI; SNAP, OUI 0x00000C (Cisco), PID 0x0132
2010-06-08 16:06:20.793130 00:02:3d:40:71:03 -> 00:50:56:b5:00:3b LLC U, func=UI; SNAP, OUI 0x00000C (Cisco), PID 0x0132
2010-06-08 16:06:20.793243 00:50:56:b5:00:3b -> 00:02:3d:40:71:41 LLC U, func=UI; SNAP, OUI 0x00000C (Cisco), PID 0x0132
2010-06-08 16:06:20.793292 00:50:56:b5:00:3b -> 00:02:3d:40:71:03 LLC U, func=UI; SNAP, OUI 0x00000C (Cisco), PID 0x0132
2010-06-08 16:06:20.811147 00:50:56:b5:00:3b -> ff:ff:ff:ff:ff:ff LLC U, func=UI; SNAP, OUI 0x00000C (Cisco), PID 0x0132
2010-06-08 16:06:21.279679 00:15:c6:49:2f:32 -> 01:00:0c:cc:cc:cd STP Conf. Root = 32818/00:0b:45:b6:e2:00 Cost = 6
Port = 0x8093
2010-06-08 16:06:21.781290 00:50:56:b5:00:3b -> ff:ff:ff:ff:ff:ff LLC U, func=UI; SNAP, OUI 0x00000C (Cisco), PID 0x0132
2010-06-08 16:06:21.782961 00:02:3d:40:71:41 -> 00:50:56:b5:00:3b LLC U, func=UI; SNAP, OUI 0x00000C (Cisco), PID 0x0132
2010-06-08 16:06:21.782965 00:02:3d:40:71:03 -> 00:50:56:b5:00:3b LLC U, func=UI; SNAP, OUI 0x00000C (Cisco), PID 0x0132
|
|
---|---|
ethanalyzer local sniff-interface |
Captures packet on a given interface. |
To capture packets on a given interface, use the ethanalyzer local sniff-interface command.
ethanalyzer local sniff-interface {control | inband | management} [capture-filter | detailed-dissection | display-filter | dump-pkt| limit-captured-frames | limit-frame-size | write filename]
None.
Global configuration (config)
network-admin
This example shows how to capture and decode packets:
n1000v# ethanalyzer local sniff-interface control write bootflash:packet.log
Capturing on eth0
10
n1000v#
|
|
---|---|
ethanalyzer local read |
Captures and displays packet information from a file. |
To configure the length of time, in minutes, that an inactive Telnet or Secure Shell (SSH) session remains open before it is automatically shut down, use the exec-timeout command. To remove an exec timeout setting, use the no form of this command.
exec-timeout time
no exec-timeout [time]
time |
Timeout in minutes. The range is from 0 to 525600. |
No timeout is configured.
Console configuration (config-console)
network-admin
When you set time to 0, exec timeout is disabled.
If a session remains inactive longer than this specified time period, then it is automatically closed.
This example shows how to configure an inactive session timeout for the console port:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# line console
n1000v(config-com1)# exec-timeout 20
This example shows how to configure an inactive session timeout for the virtual terminal:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# line vty
n1000v(config-line)# exec-timeout 20
This example shows how to remove an EXEC timeout on the console port:
n1000v#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)#
line console
n1000v(
config-console)#
no exec-timeout
n1000v(
config-console)#
|
|
---|---|
show terminal |
Displays the terminal configuration, including the timeout value. |
show users |
Displays the currently active user sessions. |
To exit a configuration mode or exit the command-line interface (CLI), use the exit command.
exit
This command has no arguments or keywords.
None
Any
network-admin
network-operator
This example shows how to exit global configuration mode. The CLI returns you to EXEC mode:
n1000v(config)# exit
n1000v#
This example shows how to exit interface configuration mode. The CLI returns you to the global configuration mode:
n1000v(config-if)# exit
n1000v(config)#
This example shows how to exit the CLI:
n1000v# exit
|
|
---|---|
end |
Returns to EXEC command mode. |
To add an existing flow exporter to a specific flow monitor and save it in the running configuration, use the exporter command. To remove the flow exporter for a specific flow monitor, use the no form of this command.
exporter name
no exporter name
name |
Flow exporter that is to be added for the flow monitor. The maximum is 63, case-sensitive, alphanumeric characters. |
None
CLI flow monitor configuration (config-flow-monitor)
network-admin
This example shows how to add the flow exporter called Exportv9 and save it in the running configuration:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# flow monitor MonitorTest
n1000v(config-flow-monitor)# exporter Exportv9
n1000v(config-flow-monitor)#
This example shows how to remove the flow exporter called Exportv9:
n1000v# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
n1000v(config)# flow monitor MonitorTest
n1000v(config-flow-monitor)# no exporter Exportv9
n1000v(config-flow-monitor)#