H3C MSR1000[2600][3600] Routers Configuration Examples All-in-One-R9141-6W100

HomeSupportConfigure & DeployConfiguration ExamplesH3C MSR1000[2600][3600] Routers Configuration Examples All-in-One-R9141-6W100
Table of Contents
Related Documents
71-FTP Server Software Upgrade Configuration Examples

 

H3C Routers

FTP Server Software Upgrade

Configuration Examples

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2024 New H3C Technologies Co., Ltd. All rights reserved.

No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd.

Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.

The information in this document is subject to change without notice.



Introduction

The following information provides an example for upgrading the software version of a centralized router through FTP.

Prerequisites

The following information applies to Comware 9-based routers. Procedures and information in the examples might be slightly different depending on the software or hardware version of the routers.

The configuration examples were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.

The following information is provided based on the assumption that you have basic knowledge of FTP.

Example: Using the device as an FTP server to upgrade software

Network configuration

As shown in Figure 1, the host is connected to GigabitEthernet 0/0/1 of the router. The router acts as the FTP server and the host acts as the FTP client. Configure the network to meet the following requirements:

·     Use FTP to upload software upgrade file test.ipe from the FTP client to the FTP server to upgrade the router.

·     Use username abc and password 123456 to log in to the FTP server.

Figure 1 Network diagram

 

Analysis

To upgrade both active and standby MPUs of the router, copy the software image file to the root directory on the standby MPU after downloading the file to the active MPU through FTP.

For the router to use the new software version after reboot, specify the software image file to be used at the next boot as the main startup image file.

Software versions used

This configuration example was created and verified on R9141P16 of the MSR2630E-X1 device.

Restrictions and guidelines

When you configure the device as an FTP server to upgrade software, follow these restrictions and guidelines:

·     If storage space on the device is not enough for the upgrade, use the delete /unreserved file-url command to delete unnecessary files before performing software upgrade.

·     Make sure the username, password, and file name settings for FTP transfer on the host and the router are the same.

·     For successful FTP transfer between the router and the host, set the file transfer mode to binary.

Procedures

Configuring the router as the FTP server

# Assign an IP address to GigabitEthernet 0/0/1 on the router.

<Router> system-view

[Router] interface gigabitethernet 0/0/1

[Router-GigabitEthernet0/0/1] ip address 192.168.100.66 255.255.255.0

[Router-GigabitEthernet0/0/1] quit

# Add a local user account. Set the username to abc and the password to 123456.

[Router] local-user abc

[Router-luser-abc] password simple 123456

# Assign the network-admin user role to the user account.

[Router-luser-abc] authorization-attribute user-role network-admin

# Remove the default network-operator user role.

[Router-luser-abc] undo authorization-attribute user-role network-operator

# Assign the FTP service to the user account.

[Router-luser-abc] service-type ftp

[Router-luser-abc] quit

# Enable the FTP server.

[Router] ftp server enable

[Router] quit

Configuring the host

# Assign IP address 192.168.100.14/24 to the host (FTP client). Make sure the FTP client can reach the FTP server. (Details not shown.)

# Use username abc and password 123456 to log in to the FTP server. This example uses Windows Command Prompt.

C:\Documents and Settings\Administrator> ftp 192.168.100.66

Connected to 192.168.100.66.

220 FTP service ready.

User (192.168.100.66:(none)): abc

331 Password required for abc.

Password:

230 User logged in.

# Access the directory that contains the upgrade file.

ftp> lcd E:\

Local directory now E:\

# Set the file transfer mode to binary.

ftp> binary

200 TYPE is now 8-bit binary

# Upload upgrade file test.ipe to the FTP server.

ftp> put test.ipe

200 PORT command successful

150 Connecting to port 2903

226 File successfully transferred

ftp: 70445056 sent in 1.05Seconds 67282.77Kbytes/sec.

# Verify that the image file is saved on the FTP server.

ftp> ls test.ipe

200 PORT command successful

150 Connecting to port 3391

test.ipe

226 1 matches total

ftp: 24 bytes received in 0.00Seconds 24000.00Kbytes/sec.

# Close the FTP connection.

ftp> bye

Configuring the startup image files on the router

# Copy the software image file on the active MPU to the root directory on the standby MPU

<Router> copy flash:/test.ipe slot1#flash:/test.ipe

Copy flash:/test.ipe to slot1#flash:/test.ipe[Y/N]:y

Copying file flash:/test.ipe to slot1#flash:/test.ipe.

........................................................................ Done.

# Specify upgrade file test.ipe as the main startup image file for the active MPU of the router.

<Router> boot-loader file flash:/test.ipe slot 0 main

Verifying the IPE file and the images......Done.

H3C xxx images in IPE:

  test-cmw910-boot-r9141p16.bin

  test-cmw910-system-r9141p16.bin

This command will set the main startup software images. Continue? [Y/N]:Y

Add images to slot 0.

Decompressing file test-cmw910-boot-r9141p16.bin to flash:/test-cmw910-boot-r9141p16.bin...............Done.

Decompressing file test-cmw910-system-r9141p16.bin to flash:/test-cmw910-system-r9141p16.bin..............................................Done.

The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 0.

# Specify upgrade file test-old.ipe as the backup startup image file for the active MPU of the router.

<Router> boot-loader file slot1#flash:/test-old.ipe slot 0 backup

This command will set the backup startup software images. Continue? [Y/N]:y

The images that have passed all examinations will be used as the backup startup

software images at the next reboot on slot 0.

# Specify upgrade file test.ipe as the main startup image file for the standby MPU of the router.

<Router> boot-loader file slot1#flash:/test.ipe slot 1 main

Verifying the IPE file and the images........Done.

H3C xxx images in IPE:

  test-cmw910-boot-r9141p16.bin

  test-cmw910-system-r9141p16.bin

This command will set the main startup software images. Continue? [Y/N]:y

Add images to slot 1.

Decompressing file test-cmw910-boot-r9141p16.bin to slot1#flash:/test-cmw910-boot-r9141p16.bin................Done.

Decompressing file test-cmw910-system-r9141p16.bin to slot1#flash:/test-cmw910-system-r9141p16.bin.................................................Done.

The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 1.

# Specify upgrade file test-old.ipe as the backup startup image file for the standby MPU of the router.

<Router> boot-loader file slot1#flash:/test-old.ipe slot 1 backup

This command will set the backup startup software images. Continue? [Y/N]:y

The images that have passed all examinations will be used as the backup startup

software images at the next reboot on slot 1.

# Reboot the device.

<Router> reboot

Verifying the configuration

# Use the display version command to display system version information.

<Router> display version

H3C Comware Software, Version 9.1.063, Release 9141P16

Copyright (c) 2004-2023 Hangzhou H3C Tech. Co., Ltd. All rights reserved.

H3C xxx uptime is 0 weeks, 0 days, 0 hours, 3 minutes

Last reboot reason : User reboot

Boot image: flash:/test-cmw910-boot-r9141p16.bin

Boot image Version 9.1.063, Release 9141P16

  Compiled Jan 15 2023 19:27:12

System image: flash:/test-cmw910-system-r9141p16.bin

System image Version 9.1.063, Release 9141P16

  Compiled Jan 15 2023 19:27:12

 

...

# Display the current software images and startup software images on the active MPU of the router.

<Router> display boot-loader slot 0

Software images on slot 0:

Current software images:

  flash:/test-cmw910-boot-r9141p16.bin

  flash:/test-cmw910-system-r9141p16.bin

Main startup software images:

  flash:/test-cmw910-boot-r9141p16.bin

  flash:/test-cmw910-system-r9141p16.bin

Backup startup software images:

  flash:/test-cmw910-boot-r9141p14.bin

  flash:/test-cmw910-system-r9141p14.bin

# Display the current software images and startup software images on the standby MPU of the router.

<Router> display boot-loader slot 1

Software images on slot 1:

Current software images:

  flash:/test-cmw910-boot-r9141p16.bin

  flash:/test-cmw910-system-r9141p16.bin

Main startup software images:

  flash:/test-cmw910-boot-r9141p16.bin

  flash:/test-cmw910-system-r9141p16.bin

Backup startup software images:

  flash:/test-cmw910-boot-r9141p14.bin

  flash:/test-cmw910-system-r9141p14.bin

Configuration files

#

interface GigabitEthernet0/0/1

 port link-mode route

 ip address 192.168.100.66 255.255.255.0

#

local-user abc class manage

 password hash $h$6$YMVbbwFL/vviWcQu$+CuTbYCehNZtZo5RCXiadpYbXYWa2omt5TUtEh3UPCg

3fZjxYCp5WzbuE2GoowVi2YA/BK+mnSZJZqi5jRDuCg==

 service-type ftp

 authorization-attribute user-role network-admin

#

 ftp server enable

#

Related documentation

·     Fundamentals Configuration Guide in H3C MSR1000[2600][3600] Routers Configuration Guides(V9)

·     Fundamentals Command Reference in H3C MSR1000[2600][3600] Routers Command References(V9)

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网