Common System Operations : Restoring the Configuration File Highlighted

Created: Apr 18, 2016 15:10:36Latest reply: Apr 29, 2016 16:27:18 6846 2 0 0

When misconfigurations cause exceptions on a device, transfer the backup configuration file to the device and specify the downloaded configuration file for the next startup. Assume that the IP address of the PC that saves the configuration file is 10.110.24.254/24 and the device's IP address is 10.136.23.5/24.

  1. Transfer the backup configuration file to the device using FTP.

    • When the device serves as an FTP server and the PC serves as an FTP client:

      # Configure the FTP function for the device and information about an FTP user.

      <HUAWEI> system-view
      [HUAWEI] ftp server enable
      [HUAWEI] aaa
      [HUAWEI-aaa] local-user admin1234 password irreversible-cipher Helloworld@6789
      [HUAWEI-aaa] local-user admin1234 privilege level 15
      [HUAWEI-aaa] local-user admin1234 service-type ftp
      [HUAWEI-aaa] local-user admin1234 ftp-directory cfcard:/
      [HUAWEI-aaa] quit
      [HUAWEI] quit

      # Connect the PC to the device using FTP. Enter the user name admin1234 and password Helloworld@6789 and set the file transfer mode to binary.

      The following example assumes that the PC runs the Windows XP operating system.

      C:\Documents and Settings\Administrator> ftp 10.136.23.5
      Connected to 10.136.23.5.
      220 FTP service ready.
      User (10.136.23.5:(none)): admin1234
      331 Password required for admin1234.
      Password:
      230 User logged in.
      ftp> binary
      200 Type set to I.
      ftp>

      # Upload the backup configuration file to the device.

      ftp> put vrpcfg.zip
      200 Port command okay.
      150 Opening BINARY mode data connection for vrpcfg.zip.
      226 Transfer complete.
      ftp: 1257 bytes sent in 0.03 Seconds 40.55Kbytes/sec.
    • When the PC serves as an FTP server and the device serves as an FTP client:

      # Start the FTP server program.

      Start the FTP server program on the PC. Specify the FTP working directory where the configuration file is saved, and the IP address, port number, user name, and password of the FTP server.

      # Log in to the FTP server.

      <HUAWEI> ftp 10.110.24.254
      Trying 10.110.24.254 ...
      Press CTRL+K to abort
      Connected to 10.110.24.254.
      220 WFTPD 2.0 service (by Texas Imperial Software) ready for new user   /WFTPD is the local FTP server program.
      User(10.135.86.164:(none)):admin123   //Enter the user name.
      331 Give me your password, please
      Enter password:   //Enter the password.
      230 Logged in successfully
      
      [ftp]

      # Download the backup configuration file to the device.

      [ftp] get config.cfg
      Warning: The file config.cfg already exists. Overwrite it? [Y/N]:Y
      //Overwrite the current configuration file on the device. To reserve the current configuration file, enter N to stop the file upload. Change the name of the configuration file on the FTP server to different from that on the device. Download the configuration file from the FTP server.
      200 Port command successful.
      150 Opening data connection for config.cfg.
      226 File sent ok
      FTP: 1257 byte(s) received in 0.03 second(s) 40.55byte(s)/sec.
      [ftp] bye
      NOTE:
      • After the configuration file is transferred to the device, check whether the size of the configuration file on the PC is the same as that on the device. If not, an exception may occur during file transfer. Transfer the file again.

      • To transfer the configuration file in a simpler way, configure the PC as the TFTP server and the device as the TFTP client. The configuration procedure is similar to the procedure when the PC serves as an FTP server and the device serves as an FTP client. The only difference is that the user name and password are not required for configuring the TFTP server. You only need to run the tftp 10.110.24.254 get config.cfg command on the device.

      • TFTP has no authentication or authorization mechanism, whereas FTP has authentication and authorization mechanisms. TFTP and FTP both transfer data in plaintext mode, which bring security risks and therefore apply to good-performance networks. If you have a high requirement for network security, SFTP V2, SCP, or FTPS is recommended.
  2. Specify the backup configuration file for the next startup.

    <HUAWEI> startup saved-configuration config.cfg 
    <HUAWEI> display startup
    MainBoard:
      Configured startup system software:        cfcard:/device_software.cc
      Startup system software:                   cfcard:/device_software.cc
      Next startup system software:              cfcard:/device_software.cc
      Startup saved-configuration file:          cfcard:/config_old.cfg   //Current configuration file name.
      Next startup saved-configuration file:     cfcard:/config.cfg   //Name of the configuration file for the next startup.
      Startup paf file:                          default
      Next startup paf file:                     default
      Startup license file:                      default
      Next startup license file:                 default
      Startup patch package:                     NULL
      Next startup patch package:                NULL
       
    <HUAWEI> reboot   //Restart the device.
    Info: The system is now comparing the configuration, please wait.
    Warning: The configuration has been modified, and it will be saved to the next startup saved-configuration file cfcard:/config.cfg. Continue? [Y/N]:N   //Enter N to prevent the device configuration from being saved in the backup configuration file.
    Now saving the current configuration to the slot 13.
    Save the configuration successfully.
    Info: If want to reboot with saving diagnostic information, input 'N' and then execute 'reboot save diagnostic-information'.
    System will reboot! Continue?[Y/N]:Y   //Enter Y to restart the device.

 

 

 

  • x
  • convention:

user_1763575     Created Apr 18, 2016 15:12:27 Helpful(0) Helpful(0)

Thanks!
  • x
  • convention:

Nana00     Created Apr 29, 2016 16:27:18 Helpful(0) Helpful(0)

Thank you
  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top