How to Upgrade and Patch Huawei Router OS or System Software using Command Line

Here are the following steps of upgrading and patching the Operating System or System software using the command line interface (CLI) for Huawei Routers.

Pre-requisite:

Upload the software to FTP/SFTP server,e.g.
IP: 192.168.100.100
username: freenetwork
password: tutorials
Directory: ftproot/NXXX.cc

  1. Login to Huawei router and download the necessary software
    a. Go to system-view and do sftp

system-view
sftp <FTP server IP>
get <filename>

Sample Output:
<Huawei>system-view
[~Huawei]sftp 192.168.100.100

Trying 192.168.100.100 …
Press CTRL+K to abort
Connected to 192.168.100.100…
Please input the username: freenetwork
Enter password: tutorials

sftp-client>cd ftproot/
Current directory is:
/ftproot
sftp-client>dir
-rw-rw—- 1 none nogroup 1511188888 Aug 11 2022 NXXX.cc

sftp-client>get NXXX.cc
sftp-client>quit

b. Copy the file to the slave chassis (Optional)

copy <source> <destination>

Sample Output:

<Huawei> copy cfcard:/NXXX.cc slave#cfcard:/
100% complete
Info: Copied file cfcard:/NXXX.cc to slave#cfcard:/NXXX.cc…Done.

c. Verify the downloaded file

check system-software <filename>

Sample Output:

<Huawei>check system-software cfcard:/NXXX.cc
Caution!!! Confirm to check startup file! Continue? [Y/N]:y
Info: Prepare to check system software cfcard:/NXXX.cc, please wait ……………………………………………………………………..
Info: System software code signature check OK!

2. Specify the software to be loaded for the next startup

startup system-software <filename> all

Sample Output:
<Huawei>startup system-software NXXX.cc all
Info: Operating, please wait for a moment…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………done.
Info: Succeeded in setting the software for booting system in slot 9(Master MPU).
Info: Succeeded in setting the software for booting system in slot 10(Slave MPU).

[Optional]
*Specify the patch file to be loaded (Optional)

check patch <patch file>
startup patch <patch file> all

Sample Output:
<Huawei Router>check patch NE_SAMPLE.PAT
Warning: Package verification consumes system CPU resources. Continue? [Y/N]:y
Info: Prepare to check file cfcard:/NE_SAMPLE.PAT, please wait…….done.
Info: Digital signature verification of the system patch succeeded.

*Specifiy the startup paf file

startup paf <bin file>

3. Reboot the device to boot up the new system software

reboot

Verification:

display startup

Sample Output:

<Huawei>display startup
MainBoard:
Configured startup system software: cfcard:/VXXX-OC-NXXX.cc
Startup system software: cfcard:/VXXX-OC-NXXX.cc
Next startup system software: cfcard:/VXXX-OC-NXXX.cc
Startup saved-configuration file: NULL
Next startup saved-configuration file: NULL
Startup paf file: default
Next startup paf file: default
Startup patch package: cfcard:/patch.pat
Next startup patch package: cfcard:/patch.pat
SlaveBoard:
Configured startup system software: cfcard:/VXXX-OC-NXXX.cc
Startup system software: cfcard:/VXXX-OC-NXXX.cc
Next startup system software: cfcard:/VXXX-OC-NXXX.cc
Startup saved-configuration file: NULL
Next startup saved-configuration file: NULL
Startup paf file: default
Next startup paf file: default
Startup patch package: cfcard:/patch.pat
Next startup patch package: cfcard:/patch.pat

check system-software <filename>

<Huawei>check system-software cfcard:/NXXX.cc

Caution! Confirm to check startup file! Continue? [Y/N]:y
Info: Prepare to check system software cfcard:/NXXX.cc, please wait …………………………………….

Info: The SHA256 hash value of the system software is 25220f81f7b9ff9648f4c948e42685d18d3e6a83d9ff63b2452aec6cdbf9c249.
Info: System software signature check passed!

 

PATCHING:

patch load <PAT file> all run

<Huawei> patch load VXXX-OC-NXXX.cc.PAT all run
Info: Operating, please wait for a moment…………………………………………………………………………………………………..done.
Info: Succeeded in running the patch.

Verification:

display startup
display patch-information

<Huawei> display startup
MainBoard:
Configured startup system software: cfcard:/VXXX-OC-NXXX.cc
Startup system software: cfcard:/VXXX-OC-NXXX.cc
Next startup system software: cfcard:/VXXX-OC-NXXX.cc
Startup saved-configuration file: NULL
Next startup saved-configuration file: NULL
Startup paf file: default
Next startup paf file: default
Startup patch package:cfcard:/VXXX-OC-NXXX.cc.PAT
Next startup patch package:cfcard:/VXXX-OC-NXXX.cc.PAT
SlaveBoard:
Configured startup system software: cfcard:/VXXX-OC-NXXX.cc
Startup system software: cfcard:/VXXX-OC-NXXX.cc
Next startup system software: cfcard:/VXXX-OC-NXXX.cc
Startup saved-configuration file: NULL
Next startup saved-configuration file: NULL
Startup paf file: default
Next startup paf file: default
Startup patch package:cfcard:/VXXX-OC-NXXX.cc.PAT
Next startup patch package:cfcard:/VXXX-OC-NXXX.cc.PAT

<Huawei>display patch-information
Patch Package Name :cfcard:/VXXX-OC-NXXX.cc.PAT
Patch Package Version :VXXXX
Patch Package State :Running
Patch Package Run Time:2023-06-15 17:27:50

4 Comments

  1. Ricky said:

    Very helpful. Keep up the good work!

  2. This blog post on FreeNetworkTutorials is a real gem for anyone seeking a step-by-step guide on how to upgrade and patch their Huawei router’s OS or system software using the command line. The author’s expertise shines through as they carefully outline the entire process in a clear and concise manner.

  3. This tutorial on FreeNetworkTutorials is a comprehensive and well-structured guide for upgrading and patching Huawei router OS using the command line. The step-by-step instructions, along with helpful screenshots, make the process easy to follow. A must-read for anyone seeking to enhance their router’s performance and security. Great job!

  4. This tutorial on upgrading and patching Huawei router OS or system software using the command line is incredibly informative and useful. The step-by-step instructions and clear explanations make it easy to follow, even for those with limited technical knowledge. Thanks to Free Network Tutorials for providing such valuable guidance!

Leave a Reply

Your email address will not be published. Required fields are marked *