Basic Commands
This chapter describes basic commands.
banner motd
Use this command to set the message of the day (motd) at login.
After giving this command, you must write to memory using the
terminal monitor command. If you do not write to memory, the new message of the day is not available after the device reboots.
Use the
no parameter to not display a banner message at login. To configure multi-line banner message, see
banner motd file URL command.
Command Syntax
banner motd LINE
banner motd default
banner motd file URL
no banner motd
Parameters
LINE
Custom message of the day.
default
Default message of the day.
file
A file input to set a custom message of the day.
URL
The file path and name containing the banner message.
Default
By default, the following banner is displayed after logging in:
OcNOS version 1.3.4.268-DC-MPLS-ZEBM 09/27/2018 13:44:22
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#banner motd default
#configure terminal
(config)#no banner motd
cli timestamp
Use this command to enable timestamp print after every show command line interfaces.
Use the no form of this command disable the timestamp print.
Command Syntax
cli timestamp
Parameters
None
Default
Disabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 6.5.2.
Example
OcNOS#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#cli timestamp
OcNOS(config)#commit
OcNOS(config)#exit
OcNOS#
OcNOS#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
OcNOS(config)#no cli timestamp
OcNOS(config)#commit
OcNOS(config)#exit
Validation Example:
Virgo-6#show ip ospf neighbor
! [execution timestamp : 2024 May 14 08:57:44]
Virgo-6#
Virgo-6#show mpls forwarding-table
! [execution timestamp : 2024 May 14 08:57:49]
Codes: > - installed FTN, * - selected FTN, p - stale FTN, ! - using backup
B - BGP FTN, K - CLI FTN, (t) - tunnel, P - SR Policy FTN, (b) - bypass,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
(m) - FTN mapped over multipath transport, (e) - FTN is ECMP
FTN-ECMP LDP: Disabled
Code FEC FTN-ID Nhlfe-ID Tunnel-ID Pri Out-Label Out-Intf ELC Nexthop UpTime
clock set
Use this command to set the system time manually.
Command Syntax
clock set HH:MM:SS <1-31> MONTH <2000-2099>
Parameters
HH:MM:SS
Time of day: hour, minutes, seconds
<1-31>
Day of month
MONTH
Month of the year (january-december)
<2000-2099>
Year
Default
N/A
Command Mode
Exec and privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#clock set 18:30:00 13 january 2021
18:30:00 UTC Wed Jan 13 2021
clock timezone
Use this command to set the system time zone.
Use no form of this command to set the default system time zone (UTC).
Command Syntax
clock timezone (WORD)
no clock timezone
Parameters
WORD
Timezone name. Use 'show timezone' to get the list of city names.
Default
By default, system time zone is UTC
Command Mode
Configuration mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
(config)#clock timezone Los_Angeles
configure terminal
Use this command to enter configure mode.
When multiple CLI sessions are enabled with the
cmlsh multiple-config-session command,
configure terminal will not acquire a running datastore lock.
Command Syntax
configure terminal
Parameters
None
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The following example shows entering configure mode (note the change in the command prompt).
#configure terminal
(config)#
configure terminal force
Use the configure terminal force command to kick out the configure command mode to privileged EXEC mode, iff there is any session already in configure command mode.
Note: Configure terminal force with option 0 or without any option indicates immediate kick out the session which is locked to configure command mode. similarly, configure terminal force with option of any value indicates session locked to configure command mode will be exited to privileged Exec mode after the specified number of seconds completed.
When multiple CLI sessions are enabled with the
cmlsh multiple-config-session command,
configure terminal force has no effect because configuration mode is allowed for multiple users simultaneously.
Command Syntax
configure terminal force <0-600|>
Parameters
<0-600>
Timeout value in seconds for the session in config mode to exit to Privileged
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal force 0
#
copy empty-config startup-config
Use this command to clear the contents of the startup configuration.
Command Syntax
copy empty-config startup-config
Parameters
None
Default
None
Command Mode
Privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#copy empty-config startup-config
#
copy running-config startup-config
Use this command to a write the configuration to the file used at startup. This is the same as the
terminal monitor command.
Command Syntax
copy running-config startup-config
Parameters
None
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#copy running-config startup-config
Building configuration...
[OK]
#
copy backup-config FILE running-config replace-mode
Use this command to backup the configuration to the file currently running configuration to the server.
Command Syntax
copy backup-config FILE running-config replace-mode
Parameters
copy
Copy configuration contents from file (replace existing config).
file
Copy local config file to running-config.
FILE
File path and name.
running-config
Copy to system running-config.
replace-mode
Include parsing errors for incorrect CLIs.
Default
No default value is specified
Command Mode
Replace mode
Applicability
This command was introduced before OcNOS version 6.4.1.
Example
#copy backup-config FILE running-config replace-mode
Building configuration...
[OK]
#
crypto pki generate rsa common-name ipv4
Use this command to generate a private key and Certificate Signing Request (CSR) which are required for OcNOS to establish a Transport Layer Security (TLS) connection with a NetConf client.
Command Syntax
crypto pki generate rsa common-name ipv4 IPv4ADDR
Parameters
IPv4ADDR
IPv4 address for the Common Name field of the CSR
Default
N/A
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 5.0.
Examples
#crypto pki generate rsa common-name ipv4 7.7.7.7
#show crypto csr
-----BEGIN CERTIFICATE REQUEST-----
MIICVzCCAT8CAQAwEjEQMA4GA1UEAwwHNy43LjcuNzCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAMkzIZaxNYPd8PW0hexecUFKq9pJn5IJzJkOQDtoVFOT
zeLPRxBaOt1NVd+lEF+wy3AgnGMw004g4AP7qaE+S5X1vKGAjagtfh/gfDAPDUtM
CpYLMCACM7n76OmyP9eUpkMbOSPkZDIBZfjUMxDTFwkzCBH+BF6SkSxtA24NUA9z
5heCIb1ArXYjdlIeB+9FfiVdOZ5yxQsLY8604ONL7Upl766SArGQo6oZ1dJ+bc91
sQVCEpF40SdCNn+Uw3R0cPfQF81BJD4H0EHf1VnHtYJwQ1yax6qc5ghT9R/rABDa
BFB3R09QpjV4Ihd/MyrdQmEIoXHeNNvSGDj9+eiEpksCAwEAAaAAMA0GCSqGSIb3
DQEBCwUAA4IBAQAwXkQmNf3yiL+pmpwvE+gU8KVp3i4cvD13Vjh7IQMkCT47WPaM
DUiYgwk+dPVAI+iWZq4qTvUNn6xahOyN5rnkTz9eipsQ1YHPpZB7hj5fimWwzJws
m4Tun0GZieEBCROqUpbuW+6QDvtR3XSzHhdGGSIteZv9cYyKhNuO07okwr67c2Ea
1lB7Pcu1tOb4wj3xjqaO/ENDG+nmdUPaIKZrAwf2fEOarOaHgKwcl1AHHbusbJWL
qH0fA1OyVgfvg/WuCPP6Peg/Cpla7bDWqeGYt9vFTtekKoOMQLzJwl6oINbtBCcw
DZJpeaQpUhFm+ZOjwibZ5NGPBRSTuYncp5xJ
-----END CERTIFICATE REQUEST-----
#
debug nsm
Use this command to enable NSM debugging.
Use the no form of this command or the undebug command to disable NSM debugging.
Command Syntax
debug nsm (all|)
no debug nsm (all|)
undebug nsm (all|)
debug nsm bfd
no debug nsm bfd
undebug nsm bfd
debug nsm events
no debug nsm events
undebug nsm events
debug nsm hal (all|) debug
debug nsm hal events
no debug nsm hal (all|)
no debug nsm hal events
undebug nsm hal events
debug nsm packet (recv|send|) (detail|)
no debug nsm packet (recv|send|) (detail|)
undebug nsm packet (recv|send|) (detail|)
Parameters
all
Enable all debugging.
bfd
Debug BFD events.
events
Debug NSM events.
hal
Debug HAL.
events
Debug HAL events.
packet
Debug packet events.
recv
Debug received packets.
send
Debug sent packets.
detail
Show detailed packet information.
Default
By default, debugging is disabled.
Command Mode
Exec mode, privileged exec mode, and configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#debug nsm all
#
#debug nsm bfd
#
#debug nsm events
#
#debug nsm hal all
#
#debug nsm packet
#
#debug nsm packet recv detail
debug vm-events
Use this command to enable debug logs for Guest VM events
Use the no form of this command to disable debug logs for Guest VM events
Command Syntax
debug vm-events
no debug vm-events
Parameters
None
Default
No default value specified.
Command Mode
Configure mode
Exec mode
Applicability
This command was introduced before OcNOS version 6.1.0
Examples
#configure terminal
(config)#debug vm-events
disable
Use this command from to exit privileged exec mode and return to exec mode. This is the only command that allows you to go back to exec mode. The
exit or
quit commands in privileged exec mode end the session without returning to exec mode.
Command Syntax
disable
Parameters
None
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#disable
>
do
Use this command to run several exec mode or privileged exec mode commands from configure mode. The commands that can be run from configure mode using do are: show, clear, debug, ping, traceroute, write, and no debug.
Command Syntax
do LINE
Parameters
LINE
Command and its parameters.
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
#(config)#do show interface
Interface lo
Hardware is Loopback index 1 metric 1 mtu 16436 duplex-half arp ageing timeout 25
<UP,LOOPBACK,RUNNING>
VRF Binding: Not bound
Label switching is disabled
No Virtual Circuit configured
Administrative Group(s): None
DSTE Bandwidth Constraint Mode is MAM
inet 4.4.4.40/32 secondary
inet 127.0.0.1/8
inet6 ::1/128
Interface Gifindex: 3
Number of Data Links: 0
GMPLS Switching Capability Type:
Packet-Switch Capable-1 (PSC-1)
GMPLS Encoding Type: Packet
Minimum LSP Bandwidth 0
input packets 10026, bytes 730660, dropped 0, multicast packets 0
input errors 0, length 0, overrun 0, CRC 0, frame 0, fifo 0, missed 0
output packets 10026, bytes 730660, dropped 0
output errors 0, aborted 0, carrier 0, fifo 0, heartbeat 0, window 0
collisions 0
#
enable
Use this command to enter privileged exec command mode.
Command Syntax
enable
Parameters
None
Default
No default value is specified
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The following example shows entering the Privileged Exec mode (note the change in the command prompt).
>enable
#
enable password
Use this command to change or create a password to use when entering enable mode.
Note: Only network administrators can execute this command. For more, see the
username command.
There are two methods to enable a password:
• Plain Password: a clear text string that appears in the configuration file.
• Encrypted Password: An encrypted password does not display in the configuration file; instead, it displays as an encrypted string. First, use this command to create a password. Then, use the
service password-encryption command to encrypt the password.
Use the no parameter to disable the password.
Command Syntax
enable password LINE
no enable password
no enable password LINE
Parameters
LINE
Password string, up to 8 alpha-numeric characters, including spaces. The string cannot begin with a number.
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#enable password mypasswd
end
Use this command to return to privileged exec command mode from any other advanced command mode.
Command Syntax
end
Parameters
None
Default
No default value is specified
Command Mode
All command modes
Applicability
This command was introduced before OcNOS version 1.3.
Example
The following example shows returning to privileged exec mode directly from interface mode.
#configure terminal
(config)#interface eth0
(config-if)#end
#
exec-timeout
Use this command to set the interval the command interpreter waits for user input detected. That is, this sets the time a telnet session waits for an idle VTY session before it times out. A value of zero minutes and zero seconds (0 and 0) causes the session to wait indefinitely.
Use the no parameter to disable the wait interval.
Command Syntax
exec-timeout <0-35791> (<0-2147483>|)
no exec-timeout
Parameters
<0-35791>
Timeout value in minutes.
<0-2147483>
Timeout value in seconds.
Default
No default value is specified
Command Mode
Line mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
In the following example, the telnet session will timeout after 2 minutes, 30 seconds if there is no response from the user.
Router#configure terminal
Router(config)#line vty 23 66
Router(config-line)#exec-timeout 2 30
exit
Use this command to exit the current mode and return to the previous mode. When used in exec mode or privileged exec mode, this command terminates the session.
Command Syntax
exit
Parameters
None
Default
No default value is specified
Command Mode
All command modes
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The following example shows exiting interface mode and returning to configure mode.
#configure terminal
(config)#interface eth0
(config-if)#exit
(config)#
help
Use this command to display help for the OcNOS command line interface.
Command Syntax
help
Parameters
None
Default
No default value is specified
Command Mode
All command modes
Applicability
This command was introduced before OcNOS version 1.3.
Example
#help
CLI provides advanced help feature. When you need help,
anytime at the command line please press '?'.
If nothing matches, the help list will be empty and you must backup
until entering a '?' shows the available options.
Two styles of help are provided:
1. Full help is available when you are ready to enter a
command argument (e.g. 'show ?') and describes each possible
argument.
2. Partial help is provided when an abbreviated argument is entered
and you want to know what arguments match the input
(e.g. 'show ve?'.)
history
Use this command to set the maximum number of commands stored in the command history.
Use the no parameter to remove the configuration.
Command Syntax
history max <0-2147483647>
no history max
Parameters
<0-2147483647>
Number of commands.
Default
No default value is specified
Command Mode
Line mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#line vty 12 77
(config-line)#history max 123
(config-line)#no history max
hostname
Use this command to set the network name for the device. OcNOS uses this name in system prompts and default configuration filenames.
Setting a host name using this command also sets the host name in the kernel.
Note: After giving the
hostname command, you must write to memory using the
terminal monitor command. If you do not write to memory, the change made by this command (the new host name) is not set after the device reboots.
Use the no parameter to disable this function.
Command Syntax
hostname WORD
no hostname (WORD|)
Parameter
WORD
Network name for a system. Per RFC 952 and RFC 1123, a host name string can contain only the special characters period (“.”) and hyphen (“-”). These special characters cannot be at the start or end of a host name.
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#hostname ABC
(config)#
(config)#no hostname
(config)#exit
line console
Use the this command to move or change to the line console mode.
Command Syntax
line console <0-0>
Parameters
<0-0>
First line number.
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example enters line mode (note the change in the prompt).
#configure terminal
(config)#line console 0
(config-line)#
line vty (all line mode)
Use this command to move or change to all line VTY mode.
Note: line vty is just a mode changing command, and it can't exist without sub attributes being configured. i.e exec-timeout.
Command Syntax
line vty
Parameters
None
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS version 3.0.
Example
The following example shows entering all line mode (note the change in the prompt).
#configure terminal
(config)#line vty
(config-all-line)#exit
(config)#
line vty (line mode)
Use this command to move or change to VTY mode. This command is used to connect to a protocol daemon. This configuration is necessary for any session. This configuration should be in the daemon's config file before starting the daemon.
Use the no parameter to disable this command.
Note: line vty is just a mode changing command, and it can't exist without sub attributes being configured. i.e exec-timeout.
Command Syntax
line vty <0-871> <0-871>
no line vty <0-871> (<0-871>|)
Parameters
<0-871>
Specify the first line number.
<0-871>
Specify the last line number.
Note: Configurations (exec-timeout) performed under this mode, affects only the current VTY session.
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The following example shows entering line mode (note the change in the prompt).
#configure terminal
(config)#line vty 9
(config-line)#exit
(config)no line vty 9
logging cli
Use this command to enable logging commands entered by all users.
Use the no parameter to disable logging commands entered by all users.
Command Syntax
logging cli
no logging cli
Parameter
None
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#logging cli
(config)#no logging cli
logout
Use this command to exit the OcNOS shell.
Command Syntax
logout
Parameters
None
Default
No default value is specified
Command Mode
Exec mode and privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
>logout
OcNOS login:
>enable
en#logout
>
max-session
Use this command to set maximum VTY session limit.
Use no form of this command to unset session-limit.
User can configure session-limit for Telnet and SSH sessions separately but this max-session parameter value takes the precedence to restrict the maximum number of sessions. If user configured this max-session to be 4, then the device would allow only maximum of 4 SSH and Telnet sessions collectively irrespective of the individual SSH and Telnet max-session configuration. Active sessions won’t be disturbed even if the configured max-session limit is lesser than the current active sessions.
Command syntax
max-session <1-40>
Parameters
<1-40>
Number of sessions
Default
By default, 40 sessions are allowed.
Command Mode
Line mode
Applicability
This command is introduced in OcNOS version 5.0
Example
In the following example max-session is configured as 4, thus the device would allow only 4 management sessions of SSH and Telnet collectively.
#configure terminal
(config)#line vty
(config-all-line)#max-session 5
(config-all-line)#commit
(config-all-line)#exit
(config)#exit
ping
Use this command to send echo messages to another host.
Note: When data packets copied to cpu due to destination lookup fail, both data packets and icmp echo request packets processed in cpu through same cpu queue and it may happen that ping fails due to congestion. In such cases, to check connectivity, please use interactive ping command and update tos value 192. Refer
ping (interactive) for the interactive ping command.
Command Syntax
ping WORD (broadcast | count <1-2147483647> | datasize <36-18024> |interface IFNAME| source-ip A.B.C.D | interval <0-3600> | timeout <0-3600>|) (vrf (NAME|management)|)
ping ip WORD (broadcast | count <1-2147483647> | datasize <36-18024> | interface IFNAME| source-ip A.B.C.D | interval <0-3600> | timeout <0-3600>|) (vrf (NAME|management)|)
ping ipv6 WORD (broadcast | count <1-2147483647> | datasize <36-18024> |interface IFNAME| source-ip X:X::X:X | interval <0-3600> | timeout <0-3600>|) (vrf (NAME|management)|)
Parameters
WORD
Destination address (in A.B.C.D format for IPv4 or X:X::X:X for IPv6) or host name.
ip
IPv4 echo.
WORD
Destination address in A.B.C.D format or host name.
ipv6
IPv6 echo.
WORD
Destination address in X:X::X:X format or host name.
interface
Interface name through which the ICMP packets to be sent.
IFNAME
Interface's name
source-ip
Source IP to be used in ICMP packet.
A.B.C.D
Source IPv4 address in the ping.
X:X::X:X
Source IPv6 address in the ping.
vrf
Virtual Routing and Forwarding instance.
NAME
VRF instance name.
management
Management VRF.
broadcast
Allow broadcast
count
Ping repeat count
<1-2147483647>
Repeat count value
datasize
Datagram size
<36-18024>
Data size in bytes (Default value is 100)
interval
Interval between sending each packet
<0-3600>
Interval value (Default value is 1)
timeout
Response timeout
<0-3600>
Timeout in seconds (Default value is 2)
Default
No default value is specified
Command Mode
Privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
>enable
#ping 20.20.20.1 vrf management
Press CTRL+C to exit
PING 20.20.20.1 (20.20.20.1) 56(84) bytes of data.
64 bytes from 20.20.20.1: icmp_seq=1 ttl=64 time=0.032 ms
64 bytes from 20.20.20.1: icmp_seq=2 ttl=64 time=0.035 ms
64 bytes from 20.20.20.1: icmp_seq=3 ttl=64 time=0.033 ms
64 bytes from 20.20.20.1: icmp_seq=4 ttl=64 time=0.034 ms
64 bytes from 20.20.20.1: icmp_seq=5 ttl=64 time=0.034 ms
64 bytes from 20.20.20.1: icmp_seq=6 ttl=64 time=0.036 ms
64 bytes from 20.20.20.1: icmp_seq=7 ttl=64 time=0.036 ms
64 bytes from 20.20.20.1: icmp_seq=8 ttl=64 time=0.036 ms
--- 20.20.20.1 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 6999ms
rtt min/avg/max/mdev = 0.032/0.034/0.036/0.006 ms
#ping ipv6 3001:db8:0:1::129 vrf management
Press CTRL+C to exit
PING 3001:db8:0:1::129(3001:db8:0:1::129) 56 data bytes
64 bytes from 3001:db8:0:1::129: icmp_seq=1 ttl=64 time=0.038 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=2 ttl=64 time=0.047 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=3 ttl=64 time=0.047 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=4 ttl=64 time=0.049 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=5 ttl=64 time=0.044 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=6 ttl=64 time=0.048 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=7 ttl=64 time=0.046 ms
64 bytes from 3001:db8:0:1::129: icmp_seq=8 ttl=64 time=0.048 ms
--- 3001:db8:0:1::129 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 6999ms
#ping 11.11.11.1 source-ip 11.11.11.2 count 5 timeout 1
Press CTRL+C to exit
PING 11.11.11.1 (11.11.11.1) from 11.11.11.2 : 100(128) bytes of data.
108 bytes from 11.11.11.1: icmp_seq=1 ttl=64 time=0.437 ms
108 bytes from 11.11.11.1: icmp_seq=2 ttl=64 time=0.359 ms
108 bytes from 11.11.11.1: icmp_seq=3 ttl=64 time=0.314 ms
108 bytes from 11.11.11.1: icmp_seq=4 ttl=64 time=0.340 ms
108 bytes from 11.11.11.1: icmp_seq=5 ttl=64 time=0.299 ms
--- 11.11.11.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 97ms
rtt min/avg/max/mdev = 0.299/0.349/0.437/0.053 ms
#ping 9.2.27.17 source-ip 1.1.17.12 count 10 timeout 5 interval 10 broadcast vrf management
Press CTRL+C to exit
PING 9.2.27.17 (9.2.27.17) from 1.1.17.12 : 100(128) bytes of data.
108 bytes from 9.2.27.17: icmp_seq=1 ttl=64 time=0.211 ms
108 bytes from 9.2.27.17: icmp_seq=2 ttl=64 time=0.171 ms
108 bytes from 9.2.27.17: icmp_seq=3 ttl=64 time=0.182 ms
108 bytes from 9.2.27.17: icmp_seq=4 ttl=64 time=0.183 ms
108 bytes from 9.2.27.17: icmp_seq=5 ttl=64 time=0.182 ms
108 bytes from 9.2.27.17: icmp_seq=6 ttl=64 time=0.175 ms
108 bytes from 9.2.27.17: icmp_seq=7 ttl=64 time=0.186 ms
108 bytes from 9.2.27.17: icmp_seq=8 ttl=64 time=0.173 ms
108 bytes from 9.2.27.17: icmp_seq=9 ttl=64 time=0.163 ms
108 bytes from 9.2.27.17: icmp_seq=10 ttl=64 time=0.197 ms
--- 9.2.27.17 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 331ms
rtt min/avg/max/mdev = 0.163/0.182/0.211/0.016 ms
#
ping (interactive)
Use this command to send echo messages to another host interactively. You are prompted with options supported by the command.
Command Syntax
ping
Parameters
None
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
>enable
#ping
Protocol [ip]:
Target IP address: 20.20.20.1
Name of the VRF : management
Repeat count [5]: 6
Time Interval in Sec [1]: 2.2
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Ping Broadcast? Then -b [n]:
PING 20.20.20.1 (20.20.20.1) 100(128) bytes of data.
108 bytes from 20.20.20.1: icmp_seq=1 ttl=64 time=0.038 ms
108 bytes from 20.20.20.1: icmp_seq=2 ttl=64 time=0.038 ms
108 bytes from 20.20.20.1: icmp_seq=3 ttl=64 time=0.038 ms
108 bytes from 20.20.20.1: icmp_seq=4 ttl=64 time=0.036 ms
108 bytes from 20.20.20.1: icmp_seq=5 ttl=64 time=0.037 ms
108 bytes from 20.20.20.1: icmp_seq=6 ttl=64 time=0.034 ms
--- 20.20.20.1 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 11000ms
rtt min/avg/max/mdev = 0.034/0.036/0.038/0.007 ms
#ping
Protocol [ip]: ipv6
Target IP address: 3001:db8:0:1::129
Name of the VRF : management
Repeat count [5]:
Time Interval in Sec [1]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
PING 3001:db8:0:1::129(3001:db8:0:1::129) 100 data bytes
108 bytes from 3001:db8:0:1::129: icmp_seq=1 ttl=64 time=0.050 ms
108 bytes from 3001:db8:0:1::129: icmp_seq=2 ttl=64 time=0.047 ms
108 bytes from 3001:db8:0:1::129: icmp_seq=3 ttl=64 time=0.042 ms
108 bytes from 3001:db8:0:1::129: icmp_seq=4 ttl=64 time=0.048 ms
108 bytes from 3001:db8:0:1::129: icmp_seq=5 ttl=64 time=0.051 ms
--- 3001:db8:0:1::129 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.042/0.047/0.051/0.008 ms
The input prompts are described in
Table 1-4:
Table 1-4: ping output fields
Protocol [ip] | IPv4 or IPv6. The default is IPv4 if not specified. |
Target IP address | IPv4 or IPv6 address or host name. |
Name of the VRF | Name of the Virtual Routing and Forwarding instance. |
Repeat count [5] | Number of ping packets to send. The default is 5 if not specified. |
Time Interval in Sec [1] | Time interval between two ping packets. The default is 1 second if not specified. |
Datagram size [100] | Ping packet size. The default is 100 bytes if not specified. |
Timeout in seconds [2] | Time to wait for ping reply. The default is 2 seconds if not specified. |
Extended commands [n] | Options for extended ping. The default is “no”. |
Source address or interface | Source address or interface. |
Type of service [0] | Types of service. The default is 0 if not specified. |
Set DF bit in IP header? [no] | Do not fragment bit. The default value is “no” if not specified. |
Data pattern [0xABCD] | Specify a pattern. |
Ping Broadcast? Then -b [n] | Broadcast ping. The default is “no”. For a broadcast address, the value should be “y”. |
port breakout
Use this command for the port breakout configuration.
Note: Application and related breakout types will differ for transceivers based on the make or vendor. Check the related applications and breakout type using the command "#show qsfp-dd <port no> advertisement applications" and configure application, corresponding breakout type as network needed.
Note: serdes command is applicable only for 1X100g and 1X200g breakout modes. If we configure serdes 25g then each lane will be configured with 25g.
Note: The 100g (ce) ports support 4X10g, 4X25g, and 2X50g breakout modes only.
Command Syntax
port IFNAME breakout (4X10g|4X25g|2X50g)
port IFNAME breakout (1X100g|1X200g|2X100g|2X200g|2X50g|3X100g|4X100g|4X10g|4X25g|4X50g|8X10g|8X25g|8X50g)
port IFNAME breakout (2X100g|1X100g) (serdes (25g)|)
no port IFNAME breakout
Parameters
IFNAME
Interface Name.
1X100g
split to 1X100g(default serdes is 50G).
1X200g
split to 1X200g.
2X100g
split to 2X100g(default serdes is 50G).
2X200g
split to 2X200g.
2X50g
split to 2X50g.
3X100g
split to 3X100g.
4X100g
split to 4X100g.
4X10g
split to 4X10g.
4X25g
split to 4X25g.
4X50g
split to 4X50g.
8X10g
split to 8X10g.
8X25g
split to 8X25g.
8X50g
split to 8X50g.
Serdes 25g
configure serdes 25g.
Default
No default value is specified
Command Mode
Configuration mode
Applicability
This command was introduced before OcNOS version 6.4.
Example
#Configuring port breakout:
OcNOS(config)#port cd2 breakout 1X100g
OcNOS(config)#port cd3 breakout 1X200g
OcNOS(config)#port cd4 breakout 2X100g
OcNOS(config)#port cd5 breakout 2X200g
OcNOS(config)#port cd6 breakout 2X50g
OcNOS(config)#port cd7 breakout 3X100g
OcNOS(config)#port cd8 breakout 4X100g
OcNOS(config)#port cd9 breakout 4X10g
OcNOS(config)#port cd10 breakout 4X25g
OcNOS(config)#port cd11 breakout 4X50g
OcNOS(config)#port cd12 breakout 8X10g
OcNOS(config)#port cd13 breakout 8X25g
OcNOS(config)#port cd14 breakout 8X50g
Configuring port-breakout with serdes option:
OcNOS(config)#port cd15 breakout 1X100g serdes 25g
OcNOS(config)#port cd16 breakout 2X100g serdes 25g
Unconfiguring the port-breakout:
OcNOS(config)#no port cd5 breakout
quit
Use this command to exit the current mode and return to the previous mode. When this command is executed in one of the exec modes, it closes the shell and logs you out.
Command Syntax
quit
Parameters
None
Default
No default value is specified
Command Mode
All modes
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#interface eth1
(config-if)#quit
(config)#
>enable
#quit
[root@TSUP-123 sbin]#
reload
Use this command to shut down the device and perform a cold restart. You call this command when:
• You detect a configuration issue such as show running-config displaying a configuration but when you try to remove that configuration, you get a message that it is not configured.
• You have replaced the start-up configuration file (in this case you specify the flush-db parameter).
Command Syntax
reload (flush-db|)
Parameters
flush-db
Delete the database file and recreate it from the start-up configuration file.
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example shows replacing a start-up configuration file and then synchronizing it to the configuration database:
#copy file /home/TEST.conf startup-config
Copy Success
#
#reload flush-db
The system has unsaved changes.
Would you like to save them now? (y/n): n
Configuration Not Saved!
Are you sure you would like to reset the system? (y/n): y
For both of these prompts, you must specify whether to save or discard the changes. Abnormal termination of the session without these inputs can impact the system behavior.
For the unsaved changes prompt:
Would you like to save them now?
You should always say “no” to this prompt because otherwise the command takes the current running configuration and applies it to the current start-up configuration.
service advanced-vty
Use this command to set multiple options to list when the tab key is pressed while entering a command. This feature applies to commands with more than one option.
Use the no parameter to not list options when the tab key is pressed while entering a command.
Command Syntax
service advanced-vty
no service advanced-vty
Parameters
None
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#service advanced-vty
(config)#no service advanced-vty
service password-encryption
Use this command to encrypt passwords created with the
enable password command. Encryption helps prevent observers from reading passwords.
Use the no parameter to disable this feature.
Command Syntax
service password-encryption
no service password-encryption
Parameters
None
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#enable password mypasswd
(config)#service password-encryption
service terminal-length
Use this command to set the number of lines that display at one time on the screen for the current terminal session.
Use the no parameter to disable this feature.
Command Syntax
service terminal-length <0-512>
no service terminal-length (<0-512>|)
Parameters
<0-512>
Number of lines to display. A value of 0 prevents pauses between screens of output.
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#service terminal-length 60
show clock
Use this command to display the current system time.
Command Syntax
show clock
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#show clock
12:54:02 IST Fri Apr 29 2016
show cli
Use this command to display the command tree of the current mode.
Command Syntax
show cli
Parameters
None
Default
None
Command Mode
All command modes
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show cli
Exec mode:
+-clear
+-arp-cache [clear arp-cache]
+-ethernet
+-cfm
+-errors
+-domain
+-DOMAIN_NAME [clear ethernet cfm errors (domain DOMAIN_NAME|level LEVEL_ID) (bridge <1-32>|)]
+-bridge
+-<1-32> [clear ethernet cfm errors (domain DOMAIN_NAME|level LEVEL_ID) (bridge <1-32>|)]
+-level
+-LEVEL_ID [clear ethernet cfm errors (domain DOMAIN_NAME|level LEVEL_ID) (bridge <1-32>|)]
+-bridge
+-<1-32> [clear ethernet cfm errors (domain DOMAIN_NAME|level LEVEL_ID) (bridge <1-32>|)]
+-maintenance-points
+-remote
+-domain
+-DOMAIN_NAME [clear ethernet cfm maintenance-points remote(domain D
--More--
show cli history
Use this command to list the commands entered in the current session. The history buffer is cleared automatically upon reboot.
Command Syntax
show cli history
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#show cli history
1 en
2 show ru
3 con t
4 show spanning-tree
5 exit
show cli list
Use this command to display the commands relevant to the current mode.
Command Syntax
show cli list
Parameters
None
Default
None
Command Mode
All command modes except IPv4 access-list and IPv6 access-list mode.
Applicability
This command was introduced before OcNOS version 6.4.
Example
> show cli list
cat LINE
cd (WORD|)
clear aaa local user lockout username USERNAME
clear access-list NAME counters
clear access-list counters
clear arp access-list NAME counters
clear arp access-list counters
clear arp-cache
clear bgp *
clear bgp * in
clear bgp * in prefix-filter
clear bgp * l2vpn vpls
clear bgp * out
clear bgp * soft
clear bgp * soft in
clear bgp * soft out
clear bgp <1-4294967295>
clear bgp <1-4294967295>
show cli list all
Use this command to display all the cli's present in OcNOS device.
Command Syntax
show cli list all
Parameters
None
Default
None
Command Mode
Exec mode.
Applicability
This command was introduced before OcNOS version 6.4.
Example
> show cli list all
cat LINE
cd (WORD|)
clear aaa local user lockout username USERNAME
clear access-list NAME counters
clear access-list counters
clear arp access-list NAME counters
clear arp access-list counters
clear arp-cache
clear bgp *
clear bgp * in
clear bgp * in prefix-filter
clear bgp * l2vpn vpls
clear bgp * out
clear bgp * soft
clear bgp * soft in
clear bgp * soft out
clear bgp <1-4294967295>
clear bgp <1-4294967295> in
clear bgp <1-4294967295> in prefix-filter
clear bgp <1-4294967295> l2vpn vpls
clear bgp <1-4294967295> out
clear bgp <1-4294967295> soft
clear bgp <1-4294967295> soft in
clear bgp <1-4294967295> soft out
clear bgp (A.B.C.D|X:X::X:X|WORD)
clear bgp (A.B.C.D|X:X::X:X) in
clear bgp (A.B.C.D|X:X::X:X) in prefix-filter
clear bgp (A.B.C.D|X:X::X:X) l2vpn vpls
clear bgp (A.B.C.D|X:X::X:X) out
clear bgp (A.B.C.D|X:X::X:X) soft
clear bgp (A.B.C.D|X:X::X:X) soft in
clear bgp X:X::X:X soft out
clear bgp all *
show cli modes
Use this command to display cli modes present in OcNOS.
Command Syntax
show cli modes
Parameters
None
Default
None
Command Mode
Execution mode.
Applicability
This command was introduced before OcNOS version 6.4.
Example
> Mode(4) Exec []
Mode(5) Configure [(config)]
Mode(6) Line configuration [(config-line)]
Mode(12) Key-chain configuration [(config-keychain)]
Mode(13) Key-chain key configuration [(config-keychain-key)]
Mode(14) Virtual-router instance configuration [(config-vr)]
Mode(15) IP VPN Routing/Forwarding instance configuration [(config-vrf)]
Mode(16) Interface configuration [(config-if)]
Mode(24) VPLS configuration [(config-vpls)]
Mode(26) Router configuration [(config-router)]
Mode(27) Router Address Family configuration [(config-router-af)]
Mode(28) Router Address Family configuration [(config-router-af)]
Mode(29) Router Address Family configuration [(config-router-af)]
Mode(30) Router Address Family configuration [(config-router-af)]
Mode(31) Router Address Family configuration [(config-router-af)]
Mode(32) Router configuration [(config-router)]
Mode(33) Router Address Family configuration [(config-router-af)]
Mode(34) Router configuration [(config-router)]
Mode(35) Router configuration [(config-router)]
Mode(36) Router configuration [(config-router)]
Mode(37) Router configuration [(config-router)]
Mode(38) Router Address Family configuration [(config-router-af)]
Mode(46) Router configuration [(config-router)]
Mode(48) Router configuration [(config-router)]
Mode(51) Router configuration [(config-router)]
Mode(52) MPLS Path configuration [(config-path)]
Mode(53) MPLS Trunk configuration [(config-trunk)]
Mode(56) IP Prefix-List configuration [(config-ip-prefix-list)]
Mode(61) IPv6 Prefix-List configuration [(config-ipv6-prefix-list)]
Mode(63) Route Map configuration [(config-route-map)]
Mode(71) MSTI configuration [(config-mst)]
Mode(96) Crypto Map configuration [(config-crypto)]
Mode(99) RSVP Bypass Tunnel configuration [(config-bypass)]
--More--
show crypto csr
Use this command to display the Certificate Signing Request (CSR) created with the
crypto pki generate rsa common-name ipv4 command.
Command Syntax
show crypto csr
Parameters
None
Default
None
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 5.0.
Example
#crypto pki generate rsa common-name ipv4 7.7.7.7
#show crypto csr
-----BEGIN CERTIFICATE REQUEST-----
MIICVzCCAT8CAQAwEjEQMA4GA1UEAwwHNy43LjcuNzCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAMkzIZaxNYPd8PW0hexecUFKq9pJn5IJzJkOQDtoVFOT
zeLPRxBaOt1NVd+lEF+wy3AgnGMw004g4AP7qaE+S5X1vKGAjagtfh/gfDAPDUtM
CpYLMCACM7n76OmyP9eUpkMbOSPkZDIBZfjUMxDTFwkzCBH+BF6SkSxtA24NUA9z
5heCIb1ArXYjdlIeB+9FfiVdOZ5yxQsLY8604ONL7Upl766SArGQo6oZ1dJ+bc91
sQVCEpF40SdCNn+Uw3R0cPfQF81BJD4H0EHf1VnHtYJwQ1yax6qc5ghT9R/rABDa
BFB3R09QpjV4Ihd/MyrdQmEIoXHeNNvSGDj9+eiEpksCAwEAAaAAMA0GCSqGSIb3
DQEBCwUAA4IBAQAwXkQmNf3yiL+pmpwvE+gU8KVp3i4cvD13Vjh7IQMkCT47WPaM
DUiYgwk+dPVAI+iWZq4qTvUNn6xahOyN5rnkTz9eipsQ1YHPpZB7hj5fimWwzJws
m4Tun0GZieEBCROqUpbuW+6QDvtR3XSzHhdGGSIteZv9cYyKhNuO07okwr67c2Ea
1lB7Pcu1tOb4wj3xjqaO/ENDG+nmdUPaIKZrAwf2fEOarOaHgKwcl1AHHbusbJWL
qH0fA1OyVgfvg/WuCPP6Peg/Cpla7bDWqeGYt9vFTtekKoOMQLzJwl6oINbtBCcw
DZJpeaQpUhFm+ZOjwibZ5NGPBRSTuYncp5xJ
-----END CERTIFICATE REQUEST-----
show debugging nsm
Use this command to display debugging information.
Command Syntax
show debugging nsm
Parameters
None
Default
None
Command Mode
Exec mode and privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#show debugging nsm
NSM debugging status:
NSM event debugging is on
NSM packet debugging is on
NSM kernel debugging is on
show debugging vm-events
Use this command to display the vm-events debugging information
Command Syntax
show debugging events
Parameters
None
Default
No default value specified.
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 6.1.0
Examples
#show debugging vm-events#
show logging cli
Use this command to display command history for all users.
Command Syntax
show logging cli ((logfile LOGFILENAME)|) (match-pattern WORD |)
show logging cli last <1-9999>
show logging logfile list
Parameters
LOGFILENAME
Name of a saved command history log file. The default path is /var/log/messages, but you can specify a full path to override the default.
WORD
Display only lines with this search pattern.
<1-9999>
Number of lines to display from the end of the command history.
logfile list
Display a list of command history files.
Default
LOGFILENAME Name of a saved command history log file. The default path is /var/log/messages, but you can specify a full path to override the default.
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#sh logging cli
2017 Mar 01 16:30:59 : OcNOS : User root@/dev/pts/1 : CLI : 'exit'
2017 Mar 01 16:31:06 : OcNOS : User root@/dev/pts/1 : CLI : 'sh logging logfile list'
#sh logging cli logfile ipi
2017 Mar 01 16:30:59 : OcNOS : User root@/dev/pts/1 : CLI : 'exit'
2017 Mar 01 16:31:06 : OcNOS : User root@/dev/pts/1 : CLI : 'sh logging logfile list'
#sh logging cli match-pattern root
2017 Mar 01 16:30:59 : OcNOS : User root@/dev/pts/1 : CLI : 'exit'
2017 Mar 01 16:31:06 : OcNOS : User root@/dev/pts/1 : CLI : 'sh logging logfile list'
#sh logging cli logfile ipi match-pattern root
2017 Mar 01 16:30:59 : OcNOS : User root@/dev/pts/1 : CLI : 'exit'
2017 Mar 01 16:31:06 : OcNOS : User root@/dev/pts/1 : CLI : 'sh logging logfile list'
#show logging cli last 2
2017 Mar 1 16:34:26.302 : OcNOS : User root@/dev/pts/1 : CLI : 'sh logging info'
2017 Mar 1 16:34:37.317 : OcNOS : User root@/dev/pts/1 : CLI : 'sh logging cli last 2'
#show logging logfile list
file1
file2
show nsm client
Use this command to display NSM client information including the services requested by the protocols, statistics and the connection time
Command Syntax
show nsm client
Parameters
None
Default
None
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show nsm client
NSM client ID: 1
NSM client ID: 19
IMI, socket 23
Service: Interface Service, Router ID Service, VRF Service
Messsage received 1, sent 58
Connection time: Thu Jul 22 11:03:12 2010
Last message read: Service Request
Last message write: Link Up
NSM client ID: 25
ONMD, socket 24
Service: Interface Service, Bridge service, VLAN service
Messsage received 2, sent 74
Connection time: Thu Jul 22 11:03:15 2010
Last message read: OAM LLDP msg
Last message write: Link Up
#
show process
Use this command to display the OcNOS daemon processes that are running.
Command Syntax
show process
Parameters
None
Command Mode
Exec modes
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show process
PID NAME TIME FD
1 nsm 00:56:29 7
2 ripd 00:56:29 11
3 ripngd 00:56:29 12
4 ospfd 00:56:29 9
5 ospf6d 00:56:29 10
6 bgpd 00:56:29 14
9 isisd 00:56:29 8
#
Table 1-5 explains the output fields.
Table 1-5: show process fields
Entry | Description |
---|
PID Name | Process identifier name. |
TIME | (S)—Number of system and user CPU seconds that the process has used. (None, D, and E)—Total amount of time that the command has been running. |
FD | The Flexible Data-Rates (FD) of the interface. |
show running-config
Use this command to show the running system status and configuration.
Command Syntax
show running-config
show running-config full
Parameters
full
Display the full configuration information.
Command Mode
Privileged exec mode and configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show running-config
no service password-encryption
!
no service dhcp
ip domain-lookup
!
mpls propagate-ttl
!
vrrp vmac enable
spanning-tree mode provider-rstp
no data-center-bridging enable
!
interface lo
ip address 127.0.0.1/8
ipv6 address ::1/128
no shutdown
!
interface eth0
ip address 10.1.2.173/24
no shutdown
!
interface eth1
shutdown
!
line con 0
login
!
end
(config)#
show running-config switch
Use this command to display the running system switch configuration.
Command Syntax
show running-config switch bridge
show running-config switch dot1x
show running-config switch gmrp
show running-config switch gvrp
show running-config switch lacp
show running-config switch lmi
show running-config switch mstp
show running-config switch radius-server
show running-config switch rpsvt+
show running-config switch rstp
show running-config switch ptp
show running-config switch stp
show running-config switch synce
show running-config switch vlan
Parameters
bridge
Display Bridge group information.
dot1x
Display 802.1x port-based authentication information.
gmrp
Display GARP Multicast Registration Protocol (GMRP) information.
gvrp
Display GARP VLAN Registration Protocol (GVRP) information.
lacp
Display Link Aggregation Control Protocol (LACP) information.
lmi
Display Ethernet Local Management Interface Protocol (LMI) information.
mstp
Display Multiple Spanning Tree Protocol (MSTP) information.
radius-server
Display RADIUS server information.
rpvst+
Display Rapid Per-VLAN Spanning Tree (rpvst+) information.
rstp
Display Rapid Spanning Tree Protocol (RSTP) information.
ptp
Display Precision time Protocol (PTP)
stp
Display Spanning Tree Protocol (STP) information.
synce
Display synce information.
vlan
Display values associated with a single VLAN.
Default
None
Command Mode
Privileged exec mode, configure mode, router-map mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
(config)#show running-config switch stp
!
bridge 6 ageing-time 45
bridge 6 priority 4096
bridge 6 max-age 7
show startup-config
Use this command to display the startup configuration.
Command Syntax
show startup-config
Parameters
None
Default
None
Command Mode
Privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show startup-config
! 2001/04/21 11:38:52
!
hostname ripd
password zebra
log stdout
!
debug rip events
debug rip packet
!
interface lo
!
interface eth0
ip rip send version 1 2
ip rip receive version 1 2
!
interface eth1
ip rip send version 1 2
ip rip receive version 1 2
!
router rip
redistribute connected
network 10.10.10.0/24
network 10.10.11.0/24
!
line vty
exec-timeout 0 0
show tcp
Use this command to display the Transmission Control Protocol (TCP) connection details.
Command Syntax
show tcp
Parameters
None
Command Mode
Exec mode and privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show tcp
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 1 10.12.44.1:57740 127.0.0.1:705 CLOSE_WAIT
tcp 52 0 10.12.44.21:22 10.12.7.89:705 ESTABLISHED
tcp 85 0 10.12.44.21:57742 10.12.44.21:57738 ESTABLISHED
Table 1-6: Show tcp output
Entry | Description |
---|
Proto | Protocol – TCP |
Recv-Q | Number of TCP packets in the Receive Queue. |
Send-Q | Number of TCP packets in the Send-Q. |
Local Address and port number | Local IP address and the port number. |
Foreign Address and port number | Foreign (received) IP address and the port number. |
State | Current state of TCP connections: ESTABLISHED SYN_SENT SYN_RECV FIN_WAIT1 FIN_WAIT2 TIME_WAIT CLOSE CLOSE_WAIT LAST_ACK LISTEN CLOSING UNKNOWN |
show timezone
Use this command to display the list of timezone names.
Command Syntax
show timezone (all|africa|america|antarctica|arctic|asia|atlantic|australia|brazil|canada|chile|europe|indian|mexico|pacific|us)
Parameters
africa
Africa timezone list
all
All timezone list
l2-profile-three
L2 profile Three (default); the size of the l2 table (Mac address table) and l3 table (Host table) is almost equal
l3-profile
L3 profile
america
America timezone list
antarctica
Antarctica timezone list
asia
Asia timezone list
atlantic
Atlantic timezone list
australia
Australia timezone list
brazil
Brazil timezone list
canada
Canada timezone list
chile
Chile timezone list
europe
Europe timezone list
indian
Indian timezone list
mexico
Mexico timezone list
pacific
Pacific timezone list
us
US timezone list
Default
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show timezone asia
Asia:
Kuwait
Samarkand
Novosibirsk
Hebron
Singapore
Dushanbe
Rangoon
Riyadh
Thimphu
Shanghai
Phnom_Penh
Taipei
Qyzylorda
Ho_Chi_Minh
Urumqi
Chita
Khandyga
Nicosia
Jerusalem
Ashkhabad
Gaza
Tel_Aviv
Baghdad
Anadyr
Tehran
Ashgabat
Saigon
Damascus
Sakhalin
Yekaterinburg
Baku
Bangkok
Kashgar
Macao
Seoul
Jakarta
Aden
Katmandu
Amman
Ujung_Pandang
Kuching
Hong_Kong
Ulan_Bator
Dhaka
Macau
Omsk
Vientiane
Pyongyang
Ust-Nera
Manila
Srednekolymsk
Tbilisi
Kamchatka
Magadan
Istanbul
Chongqing
Jayapura
Yerevan
Makassar
Colombo
Karachi
Hovd
Novokuznetsk
Krasnoyarsk
Irkutsk
Kabul
Kolkata
Dacca
Brunei
Calcutta
Kathmandu
Bishkek
Qatar
Tashkent
Aqtau
Oral
Kuala_Lumpur
Pontianak
Harbin
Aqtobe
Bahrain
Muscat
Vladivostok
Dubai
Tokyo
Chungking
Almaty
Choibalsan
Thimbu
Beirut
Dili
Yakutsk
Ulaanbaatar
show users
Use this command to display information about current users.
Command Syntax
show users
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show users
Current user : (*). Lock acquired by user : (#).
CLI user : [C]. Netconf users : [N].
Location : Applicable to CLI users.
Session : Applicable to NETCONF users.
Line User Idle Location/Session PID TYPE Role
(*) 130 vty 0 [C]root 00:00:36 pts/0 20872 Local network-admin
(#) NA [N]root NA 1 NA NA network-admin
NA [N]root NA 2 NA NA network-admin
131 vty 1 [C]joyce 00:00:26 pts/1 17593 Remote network-admin
Table 1-7 explains the output fields.
Table 1-7: show users fields
Entry | Description |
---|
Current users | |
CLI user | |
Location | |
Session | |
Lock acquired by user | |
Netconf users | |
Line | |
User | User name. |
Idle | How long the user has been idle. |
Location/Session | |
PID | Process identifier name. |
Type | |
Role | |
show version
Use this command to display OcNOS version information.
Command Syntax
show version
Parameters
None
Default
None
Command Mode
Exec mode and privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show version
Software version: EC_AS5812-54X-OcNOS-1.3.4.268-DC_MPLS_ZEBM-S0-P0 09/27/2018 13:44:22
Copyright (C) 2018 Coriant. All rights reserved
Software Product: OcNOS, Version: 1.3.4.268
Hardware Model: Edgecore 5812-54X-O-AC-F
Software Feature Code: DC-MPLS-ZEBM
System Configuration Code: S0
Package Configuration Code: P0
Software Baseline Version: 1.3.4.208
Installation Information:
Image Filename: EC_AS5812_54X-OcNOS-1.3.4.268-DC_MPLS_ZEBM-S0-P0-installer
Install method: http
ONIE SysInfo: x86_64-accton_as5812_54x-r0
#
Table 1-8: Show version output
Entry | Description |
---|
Software version | The software version including hardware device name and date. |
Software Product | Product name and version. |
Hardware Model | Hardware platform. |
Software Feature Code | SKU that specifies the capabilities of this version of the software. |
System Configuration Code | System configuration number. |
Package Configuration Code | ONIE package installer versions. |
Software Baseline Version | Version from which this release branch is created. |
Installation Information | Information about the installation. |
Image Filename | The file name of the installed image. |
Install method | The type of server (or USB stick) from which the software was installed. |
ONIE SysInfo | ONIE version. |
sys-reload
Use this command to cold restart the device.
Note: This command is an alias for the
reload command.
Command Syntax
sys-reload
Parameters
None
Default
None
Command Mode
Exec mode
Applicability
This command was introduced in OcNOS version 1.3.7.
Example
>sys-reload
The system has unsaved changes.
Would you like to save them now? (y/n): y
Building Configuration...
[OK]
Are you sure you would like to reset the system? (y/n): n
sys-shutdown
Use this command to shut down the device gracefully. After giving this command, you can remove the device power cable.
Note: Some of the switch hardwares doesn't support system shutdown. On such devices this command will make the switch to go for a reboot.
Command Syntax
sys-shutdown
Parameters
None
Default
None
Command Mode
Exec mode
Applicability
This command was introduced in OcNOS version 1.3.7.
Example
>sys-shutdown
The system has unsaved changes.
Would you like to save them now? (y/n): y
Building Configuration...
[OK]
Are you sure you would like to shutdown the system? (y/n): y
For both of these prompts, you must specify whether to save or discard the changes.
For the unsaved changes prompt:
Would you like to save them now?
terminal width
Use this command to set the number of characters to be displayed in one line on the screen. Use the no option to unset the number of characters on the screen.
Note: If user wants to have a fixed terminal length and width, then terminal length should not be set to 0. i.e. CLI “terminal length 0“ should not be used, and only non-zero length to be used.
Command Syntax
terminal width <24-511>
terminal no width <24-511>
Parameters
<24-511>
Number of lines on screen
Default
Default width value 80 is optionally overridden by kernel.
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
host#terminal width 120
terminal length
Use this command to set the number of lines displayed on the screen.
Use the no option to unset the number of lines on a screen.
Note: If user wants to have a fixed terminal length and width, then terminal length should not be set to 0. i.e. CLI “terminal length 0“ should not be used, and only non-zero length to be used.
Command Syntax
terminal length <0-511>
terminal no length <0-511>
Parameters
<0-511>
Number of lines on screen. Specify 0 for no pausing.
Default
Default length value 24 is optionally overridden by kernel.
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
>enable
#terminal length 0
The following example sets the terminal length to 30 lines.
#terminal length 30
terminal monitor
Use this command to display debugging output on a terminal.
Use one of the optional parameters to display debugging output for the OcNOS user. When the command is used without a parameter, it can be used by a OcNOS user to display the debug output on the terminal for the user local OcNOS. When used with a parameter, it may be used only by a OcNOS user.
The no form of the command terminates the debug output on the terminal. The OcNOS user can use this command. In addition, the OcNOS user can cancel a debug output from a specific VR or all VRs.
Command Syntax
terminal monitor
terminal monitor (all|WORD|)
terminal no monitor
terminal no monitor (WORD|)
Parameters
WORD
Used in the PVR context, and contains the VR name to be included in the debugging session.
all
Used the PVR context to include all VR in a PVR debugging session.
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
>Enable
#terminal monitor
#terminal no monitor
traceroute
Use this command to trace an IPv4/v6 route to its destination.
Command Syntax
traceroute WORD
traceroute WORD (vrf (NAME|management)|)
traceroute ip WORD
traceroute ip WORD (vrf (NAME|management)|)
traceroute ipv6 WORD
traceroute ipv6 WORD (vrf (NAME|management)|)
Parameters
WORD
Destination address (in A.B.C.D format for IPv4 or X:X::X:X for IPv6) or host name.
vrf
Virtual Routing and Forwarding instance.
NAME
Virtual Routing and Forwarding name.
management
Virtual Routing and Forwarding name.
ip
IPv4 echo.
WORD
Destination address in A.B.C.D format or host name.
ipv6
IPv6 echo.
WORD
Destination address in X:X::X:X format or host name.
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#traceroute ip 10.10.100.126 vrf management
traceroute to 10.10.100.126 (10.10.100.126), 30 hops max, 38 byte packets
1 10.1.2.1 (10.1.2.1) 0.386 ms 0.315 ms 0.293 ms
2 10.10.100.126 (10.10.100.126) 1.944 ms 1.497 ms 1.296 ms
#
watch static-mac-movement
Use this command to watch if any MAC movement is detected over static MAC entries for a time period. A notification will display if static MAC movement happens before the timer expires.
The counters can be validated with
show interface counters queue-stats for the L2 movement queue (
Tx pkts and
Dropped pkts columns).
Without enabling
watch static-mac-movement, the statistics are reflected in the
Rx EGR Port Unavail of
show interface counters queue-drop-stats.
For VXLAN, watch static-mac-movement applies to all the MAC entries learned from the remote peer (remote dynamic or static remote), as these learned MACs are installed as static MAC entries in the hardware.
Command Syntax
watch static-mac-movement (<1-300>|)
Parameters
<1-300>
Timer value in seconds.
Default
By default, the timer is 10 seconds
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#watch static-mac-movement
write
Use this command to a write the running configuration to the file used at startup or to a specified file. This is the same as the
copy running-config startup-config command.
Command Syntax
write
write file FILE
write memory
write WORD
Parameters
FILE
Write to a given path and file. If you do not give a file path, the file is added to /root.
memory
Write to non-volatile memory.
WORD
Write to running configuration file path.
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
This example shows writing the running configuration to the startup configuration file:
#write
Building configuration...
[OK]
This example shows writing the running configuration to a specified file:
#write file /home/test.txt
Building configuration...
[OK]
write terminal
Use this command to display the current configuration.
Command Syntax
write terminal
Parameters
None
Default
No default value is specified
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#write terminal
Current configuration:
!
hostname ripd
password zebra
log stdout
!
debug rip events
debug rip packet
!
interface lo
!
interface eth0
ip rip send version 1 2
ip rip receive version 1 2
!
interface eth1
ip rip send version 1 2
ip rip receive version 1 2
!
!
router rip
network 10.10.10.0/24
network 10.10.11.0/24
redistribute connected
!
line vty
exec-timeout 0 0