Licensing and Upgrade Commands
This chapter describes the license and upgrade commands.
license get
Use this command to fetch the license for this device from a network path or a USB mount path. This command validates the license against the device identifier.
Note: Ensure the system date is correct to avoid installation failure.
For HTTP, FTP, or TFTP, ensure the IP address is reachable from the OcNOS device and the file location is correct.
To install a license from a USB stick, insert the USB stick, and access its contents at ///mnt/usb/. For example:
>license get file:///mnt/usb/IPI-CC37ABBE0340.bin
After running the
license get command, users can immediately use the switch without rebooting. To verify, run the
show license command after executing this command.
Command Syntax
license get (|(source-interface IFNAME)) WORD
Parameters
IFNAME | Specifies the interface used to download the license. If not specified, the system uses eth0 by default. If the management interface of the switch is in the “management” VRF, the command will use the “management” VRF to get the license from the specified path. Users do not need to know if the management port is in the default VRF or the “management” VRF. |
---|
WORD | Specifies the location from which to get the license. ftp://your-server-ip/path/to/file/IPI_deviceId.bin http://your-server-ip/path/to/file/IPI_deviceId.bin tftp://your-server-ip/path/to/file/IPI_deviceId.bin file:///mnt-point/usb/path/to/file/IPI_deviceId.bin |
Default
None
Command Mode
Exec mode
Applicability
Introduced before OcNOS version 1.3.
Examples
>license get http://myServer/IPI-CC37ABBE0340.bin
Specify the source-interface parameter to set the interface to use:
>license get source-interface xe2 http://myServer/IPI-CC37ABBE0340.bin
license refresh
Use this command to install a license present on the device. This command is needed only if the
license get command reports an error while installing the license but successfully downloaded the license.
If users run this command without specifying a file name, the device installs the most recently downloaded license file.
Note: Always ensure the device date is up to date to avoid license installation failures.
Once this command completes successfully, users can use the device without rebooting. Verify the license installation with the
show license command.
Command Syntax
license refresh (FILENAME|)
Parameters
FILENAME
Specifies the license file name which exists on the device.
Default
None
Command Mode
Exec mode
Applicability
Introduced in OcNOS version 1.3.7.
Examples
>license refresh
>license refresh IPI-CH3QX42.bin
license release
Use this command to release any type of license, whether node-locked or floating, on the device. The device license is revoked immediately.
Command Syntax
license release
Parameters
None
Default
None
Command Mode
Exec mode
Applicability
Introduced in OcNOS version 3.0.
Examples
>license release
show installers
Use this command to display a list of downloaded images on the device.
Command Syntax
show installers
Parameters
None
Default
None
Command Mode
Exec mode
Applicability
Introduced in OcNOS version 1.3.6.
Examples
OcNOS#show installers
/installers/OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installer
show license
Use this command to display the current license details and errors. Each device requires a separate license, as licenses are device-locked.
Command Syntax
show license
Parameters
None
Default
None
Command Mode
Exec mode
Applicability
Introduced before OcNOS version 1.3.
Examples
OcNOS>show license
License Type: Evaluation, Limited edition
License Validity: Not Applicable
Node Identifier: A82BB59DCAD9
Device Software : OCNOS-DC-IPBASE
License Error: Invalid license file
show sys-update details
Use this command to display upgrade details. The output indicates whether the current version is committed or rolled back.
Command Syntax
show sys-update details
Parameters
None
Default
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
Introduced before OcNOS version 1.3.
Examples
OcNOS#show sys-update details
Previous_version OcNOS-6.1.0-133-DC_MPLS-LD-installer
Current_version OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installer (committed)
Last_upgraded Sat 13 Jul 2019 03:41:30 AM UTC
Auto Rollback end time NA
sys-update delete
Use this command to delete a downloaded image.
Command Syntax
sys-update delete IMAGE_NAME
Parameters
IMAGE_NAME
Specifies the installer name to delete.
Default
None
Command mode
Privileged Exec mode
Applicability
Introduced in OcNOS version 1.3.6.
Examples
OcNOS#sys-update delete OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installer
sys-update get
Use this command to download an installer image.
Note:
• Ensure that the URL complies with RFC 3986.
• When downloading the installer through the TFTP protocol, users may encounter a situation where the download progress shows 100% from the start to the end of the download. This behavior occurs when the TFTP server doesn't support TFTP Option Negotiation. Additionally, there are instances where TFTP download takes longer, even timing out after 30 minutes, despite the client and server being on the same subnet. This delay is often due to latency issues, with some TFTP server implementations exhibiting performance lag. In such cases, switching to a different TFTP server is recommended. The TFTP download operation has been verified on a Debian Linux machine against the server present in the tftpd-hpa package.
• For SCP and SFTP downloads, ensure that the IP address/hostname is present in the known_hosts file. Otherwise, SCP and SFTP will fail with the error message curl: (60) SSL peer certificate or SSH remote key was not OK. If sys-update fails, the user is prompted to add the hostname/IP address in the known_hosts file to proceed with sys-update.
Command Syntax
sys-update get ((source-interface IFNAME) | (source-ip (A.B.C.D | X:X::X:X))|) URL (verbose|)
Parameters
source-interface IFNAME | (Optional) Specifies the source interface name used to download the new version. If not specified, eth0 is used. |
URL | Specifies the URL parameter to indicate where to get the installer. http://username:password@your-server-ip/path/to/file/<abc-installer>> or ftp://username:password@your-server-ip/path/to/file/<abc-installer>> or tftp://your-server-ip/path/to/file/<abc-installer>> or scp://username:password@your-server-ip/path/to/file/<abc-installer> or sftp://username:password@your-server-ip/path/to/file/<abc-installer>> or file:///mnt/usb/path/to/file/<abc-installer> |
source-ip A.B.C.D | (Optional) Specifies the IPv4 address of the interface used to download the new version. |
source-ip X:X::X:X | (Optional) Specifies the IPv6 address of the interface used to download the new version. |
verbose | (Optional) Include download logs in the output. |
Default
None
Command Mode
Privileged Exec mode
Applicability
Introduced in OcNOS version 1.3.6.
Examples
OcNOS#sys-update get source-interface xe3 http://myServer/OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installer
Example using SCP if the IP address or hostname is not present in the known_hosts file:
OcNOS#sys-update get scp://root@10.12.33.204/home/OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installer
VRF default cannot be deleted or not exists
Please wait ...
curl: (60) SSL peer certificate or SSH remote key was not OK
More details here: curl - SSL CA Certificates
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
The host name is not added in known_host
Do you want to add it to known_host
continue (y/n):y
Successfully added host to known_hosts file.
Please wait ...
OcNOS#show installers
/installers/OcNOS-DC-IPBASE-XGS-6.3.3-39-MR-installer
/installers/OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installer
sys-update install
Use this command to upgrade the current software to a newer version. Users can perform two types of installations:
• If a .deb file is provided, the board is loaded with new binaries.
• If an installer file is provided, the board is completely installed with a new kernel and binaries.
Note:
1. During an upgrade, if a license is not available the existing configuration is not applied. Also, the ZebOS.conf file is not created and the terminal monitor command is not allowed.
2. Ensure that the URL complies with RFC 3986.
3. When executing this command without the source-interface parameter, the system uses eth0 and the default management VRF. When executing this command with the source-interface parameter, it uses the specified interface.
4. When downloading the installer through the TFTP protocol, users may encounter a situation where the download progress shows 100% from the start to the end of the download. This behavior occurs when the TFTP server doesn't support TFTP Option Negotiation. Additionally, there are instances where TFTP download takes longer, even timing out after 30 minutes, despite the client and server being on the same subnet. This delay is often due to latency issues, with some TFTP server implementations exhibiting performance lag. In such cases, switching to a different TFTP server is recommended. The TFTP download operation has been verified on a Debian Linux machine against the server present in the tftpd-hpa package.
5. For SCP and SFTP downloads, ensure that the IP address/hostname is present in the known_hosts file. Otherwise, SCP and SFTP will fail with the error message curl: (60) SSL peer certificate or SSH remote key was not OK. If sys-update fails, the user is prompted to add the hostname/IP address in the known_hosts file to proceed with sys-update.
Command Syntax
sys-update install (|(source-interface IFNAME | (source-ip (A.B.C.D | X:X::X:X)))) URL (verbose|)
Parameters
source-interface IFNAME | (Optional) Specifies the source interface name used to install the new version. If not specified, eth0 is used. |
URL | Specifies the URL parameter to indicate where to get the installer. <http://username:password@your-server-ip/path/to/file/<abc-updater.deb> or abc-installer> or <ftp://username:password@your-server-ip/path/to/file/<abc-updater.deb> or abc-installer> or tftp://your-server-ip/path/to/file/<abc-updater.deb> or abc-installer> or scp://username:password@your-server-ip/path/to/file/<abc-updater.deb or abc-installer> or sftp://username:password@your-server-ip/path/to/file/<abc-updater.deb> or abc-installer> or file:///mnt/usb/path/to/file/<abc-updater.deb or abc-installer> |
source-ip A.B.C.D | (Optional) Specifies the IPv4 address of the interface used to download the new version. |
source-ip X:X::X:X | (Optional) Specifies the IPv6 address of the interface used to download the new version. |
verbose | (Optional) Include download logs in the output. |
Default
None
Caution
OcNOS services are using /usr/local/etc path to store the device configuration, and this path mounted into a separate partition to isolate system configurations. This partition is meant only for system configuration. It will affect the system stability if the user uses this partition for storing general files. In this problematic state, if the device reboots, OcNOS services will not start properly, that would even create problems to the device connectivity. There will be an impact on normal system configuration operations.
User must take care of this problem just before issuing the following commands:
• reload/sys-reload - Reboots the device.
• sys-shutdown - This is to shutdown the device, but when user powers the device OcNOS services won't start cleanly.
• reboot / shutdown - From Linux shell
• Also includes all copy commands from Linux shell before issuing the user triggered reload commands.
Command Mode
Privileged Exec mode
Applicability
Introduced before OcNOS version 1.3.
Examples
OcNOS#sys-update install source-interface eth2 http://10.12.52.150/myServer/OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installer
OcNOS#sys-update install http://10.12.52.150/myServer/OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installerr
sys-update list-version
Use this command to display files and folders. This command supports only FTP and the local file system.
Command Syntax
sys-update list-version ((source-interface IFNAME)|) URL
Parameters
source-interface IFNAME | (Optional) Specifies the source interface name used to list the version. If not specified, eth0 is used. |
URL | Specifies the URL parameter to indicate where to get the installer. ftp://(username@|)serverIP/path/to/file/ file:///mnt/usb/path/to/file/ |
Default
None
Command Mode
Privileged Exec mode
Applicability
Introduced before OcNOS version 1.3.
Examples
OcNOS#sys-update list-version ftp://10.12.52.150/
sys-update un-install
Use this command to un-install the device software remotely using the CLI and NetConf.management interfaces. This command decouples the device console dependency to un-install OcNOS.
This command puts the device in ONIE un-install mode and triggers device reboot. Upon reboot, ONIE detects the un-install mode and performs the un-installation. Once the un-installation completes, the device boots ONIE. To understand more about the un-installation technique, see the U-Boot and x86 Architecture sections at: https://opencomputeproject.github.io/onie/design-spec/index.html#.
Note: By default, ONIE has SSH and Telnet services running, so users also have the option to trigger the installation through the management connection. For more information about SSH and Telnet connectivity, see: https://opencomputeproject.github.io/onie/user-guide/index.html#debugging-an-installation.
Command Syntax
sys-update un-install
Parameters
None
Default
None
Command Mode
Privileged Exec mode
Applicability
TIntroduced in OcNOS version 1.3.8.
Examples
OcNOS#sys-update un-install
sys-update verify
Use this command to verify the checksum and compatibility of the downloaded image. This command does not install the image and just lists the compatibility with hardware, license and checksum.
Command Syntax
sys-update verify IMAGE_PATH
Parameters
IMAGE_PATH
Specifies the path of downloaded image. File should be present in /installers/.
Default
None
Command Mode
Privileged Exec mode
Applicability
Introduced in OcNOS version 6.2.0
Examples
OcNOS#sys-update verify /installers/OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installer
Verifying installer at /installers/OcNOS-DC-IPBASE-XGS-6.3.3-41-MR-installer
Checksum Validation: PASS: Checksum: d5b641802bac97df08ea87353d1e3f5daa73212b
Installer compatibility with HW: PASS
License compatibility: PASS
Overall Status: PASS