H3C Low-End Ethernet Switches Configuration Guide(V1.01)

HomeSupportSwitchesH3C S3600 Switch SeriesConfigure & DeployConfiguration ExamplesH3C Low-End Ethernet Switches Configuration Guide(V1.01)
Table of Contents
Related Documents
34-FTP and TFTP Configuration Guide
Title Size Download
34-FTP and TFTP Configuration Guide 90.55 KB

Configuring a Switch as FTP Server

The Ethernet switch can act as an FTP server to provide file transfer services. You can run FTP client software on a PC to log into the FTP server to access the files on the server. Note that you need to configure the IP address of the FTP server correctly for the server to provide FTP services.

Network Diagram

Figure 1-1 Network diagram for configuring a switch as FTP server

 

Networking and Configuration Requirements

A switch operates as an FTP server and a remote PC as an FTP client. The application switch.bin of the switch is stored on the PC. Upload the application to the remote switch through FTP and use the boot boot-loader command to specify switch.bin as the application for next startup. Reboot the switch to upgrade the switch application and download the configuration file config.cfg from the switch, thus to back up the configuration file.

l          Create a user account on the FTP server with the username switch and password hello.

l          The IP addresses 1.1.1.1/8 for a VLAN interface on the switch and 2.2.2.2/8 for the PC have been configured. Ensure that a route exists between the switch and the PC.

Applicable Product Matrix

Product series

Software version

Hardware version

S5600 series

Release 1510, Release1602

All versions

S5100-SI/EI series

Release 2200, Release2201

All versions

S3600-SI/EI series

Release 1510, Release1602

All versions

S3100-EI series

Release 2104, Release 2107

All versions

S3100-C-SI series

S3100-T-SI series

Release 0011, Release 2102, Release 2107

All versions

S3100-52P

Release 1500, Release 1602

S3100-52P

 

Configuration Procedure

l          Configure Switch A (the FTP server)

# Log in to the switch and assign IP address 1.1.1.1/8 to VLAN-interface 1.

<Sysname> system-view

[Sysname] interface Vlan-interface 1

[Sysname-Vlan-interface1] ip address 1.1.1.1 8

[Sysname-Vlan-interface1] quit

# Enable the FTP server function, and configure the username and password for the FTP client to access FTP services.

[Sysname] ftp server enable

[Sysname] local-user switch

[Sysname-luser-switch] password simple hello

[Sysname-luser-switch] service-type ftp

l          Configure the PC (FTP client)

Run an FTP client application on the PC to connect to the FTP server. The following takes the command line window tool provided by Windows as an example:

# Enter the command line window and browse to the directory where the file switch.bin is located. In this example it is in the root directory of C:\.

C:\>

# Access the Ethernet switch through FTP. Input the username switch and password hello to log in and enter FTP view.

C:\> ftp 1.1.1.1

Connected to 1.1.1.1.

220 FTP service ready.

User (1.1.1.1:(none)): switch

331 Password required for switch.

Password:

230 User logged in.

ftp>

# Upload file switch.bin.

ftp> put switch.bin

# Download file config.cfg.

ftp> get config.cfg

l          Upgrade the application of the switch.

# Use the boot boot-loader command to specify the uploaded application to be the startup file for next startup and restart the switch to complete the switch application upgrade.

<Sysname> boot boot-loader switch.bin

<Sysname> reboot

Complete Configuration

Configure the switch A

#

local-user switch

 password simple hello

 service-type ftp

#

vlan 1

#

interface Vlan-interface1

 ip address 1.1.1.1 255.0.0.0

#

 FTP server enable

Precautions

l          If the free Flash memory of the switch is not enough for the application file to be uploaded, remove those unused applications from the Flash memory first.

l          It is not recommended to directly remove applications in use. If removing some applications in use is a must to get enough space, you can use the BootROM menu to remove them. For details, refer to “System Maintenance and Debugging Operation”.

Configuring a Switch as FTP Client

The Ethernet switch can act as an FTP client. You can use an emulation program or Telnet to log in to the switch and then use the ftp command to log in the FTP server and access the files on the server.

Network Diagram

Figure 1-2 Network diagram for configuring a switch as FTP client

 

Networking and Configuration Requirements

A switch operates as an FTP client and a remote PC as an FTP server. The switch application named switch.bin is stored on the PC. Download it to the switch through FTP and use the boot boot-loader command to specify switch.bin as the application for next startup. Reboot the switch to upgrade the switch application, and then upload the switch configuration file named config.cfg to directory switch of the PC to back up the configuration file.

l          Create a user account on the FTP server with the username switch and password hello, and grant the user switch read and write permissions for the directory switch on the PC.

l          Configure the IP address 1.1.1.1/8 for a VLAN interface on the switch, and 2.2.2.2/8 for the PC. Ensure a route exists between the switch and the PC.

Applicable Product Matrix

Product series

Software version

Hardware version

S5600 series

Release 1510, Release1602

All versions

S5100-SI/EI series

Release 2200, Release2201

All versions

S3600-SI/EI series

Release 1510, Release1602

All versions

S3100-EI series

Release 2104, Release 2107

All versions

S3100-C-SI series

S3100-T-SI series

Release 0011, Release 2102, Release 2107

All versions

S3100-52P

Release 1500, Release 1602

S3100-52P

 

Configuration Procedure

l          Configure the PC (FTP server)

Perform FTP service-related configurations on the PC, that is, create a user account on the FTP server with the username switch and password hello. For detailed configuration, refer to the configuration instruction of the FTP server software.

l          Configure the switch (FTP client)

# Log in to the switch and assign IP address 1.1.1.1/8 to VLAN-interface 1.

<Sysname>

<Sysname> system-view

[Sysname] interface Vlan-interface 1

[Sysname-Vlan-interface1] ip address 1.1.1.1 8

[Sysname-Vlan-interface1] return

# Connect to the FTP server using the ftp command in user view. You need to provide the username and password to log in to the FTP server.

<Sysname> ftp 2.2.2.2

Trying ...

Press CTRL+K to abort

Connected.

220 FTP service ready.

User(none):switch

331 Password required for switch.

Password:

230 User logged in.

[ftp]

# Switch data transfer mode to binary.

[ftp] binary

You are recommended to set the transfer mode to binary before performing data transfer operation, so as to ensure that the device can receive data normally.

 

# Browse to the authorized directory on the FTP server, upload configuration file config.cfg to the FTP server, and download the file named switch.bin. Then, terminate the FTP connection and return to user view.

Before downloading a file, use the dir command to check that the remaining space of the Flash memory is enough for the file to be downloaded. 

 

[ftp] cd switch

[ftp] put config.cfg

[ftp] get switch.bin

[ftp] quit

<Sysname>

# Use the boot boot-loader command to specify the downloaded file as the application for next startup and then restart the switch. Thus the switch application is upgraded.

<Sysname> boot boot-loader switch.bin

<Sysname> reboot

Complete Configuration

#

vlan 1

#

interface Vlan-interface1

 ip address 1.1.1.1 255.0.0.0

Precautions

l          If the free Flash memory of the switch is not enough for downloading the application file from the FTP server, remove those unused applications from the Flash memory before downloading the file.

l           It is not recommended to directly remove applications in use. If removing some applications in use is a must to get enough space, you can use the BootROM menu to remove them. For details, refer to “System Maintenance and Debugging Operation”.

Configuring a Switch as TFTP Client

Compared with FTP, Trivial File Transfer Protocol (TFTP) features simple interactive interface with no authentication control and is therefore applicable to the networks where client-server interactions are relatively simple.

Network Diagram

Figure 1-3 Network diagram for configuring a switch as TFTP client

 

Networking and Configuration Requirements

A switch operates as a TFTP client and a PC as the TFTP server. The application named switch.bin is stored on the PC. Download it (switch.bin) to the switch through TFTP, and use the boot boot-loader command to specify switch.bin as the application for next startup. Reboot the switch to upload the configuration file named config.cfg to the work directory on the PC to back up the configuration file.

l          The TFTP working directory is configured on the TFTP server.

l          Configure the IP addresses of a VLAN interface on the switch and the PC as 1.1.1.1/8 and 2.2.2.2/8 respectively. The port through which the switch connects with the PC belongs to the VLAN.

Applicable Product Matrix

Product series

Software version

Hardware version

S5600 series

Release 1510, Release1602

All versions

S5100-SI/EI series

Release 2200, Release2201

All versions

S3600-SI/EI series

Release 1510, Release1602

All versions

S3100-EI series

Release 2104, Release 2107

All versions

S3100-C-SI series

S3100-T-SI series

Release 0011, Release 2102, Release 2107

All versions

S3100-52P

Release 1500, Release 1602

S3100-52P

 

Configuration Procedure

l          Configure the TFTP server (PC)

Configure the TFTP working folder on the TFTP server. For detailed configurations, refer to the usage instructions about the TFTP server software.

l          Configure the TFTP client (the switch)

# Log in to the switch and assign IP address 1.1.1.1/8 to VLAN-interface 1.

<Sysname>

<Sysname> system-view

[Sysname] interface Vlan-interface 1

[Sysname-Vlan-interface1] ip address 1.1.1.1 8

[Sysname-Vlan-interface1] return

# Download the switch application named switch.bin from the TFTP server to the switch, and upload the switch configuration file named config.cfg to the TFTP server.

<Sysname> tftp 2.2.2.2 get switch.bin switch.bin

<Sysname> tftp 2.2.2.2 put config.cfg config.cfg

# Use the boot boot-loader command to specify the downloaded file to be the startup file for next startup of the switch and restart the switch to complete the switch application upgrade.

<Sysname> boot boot-loader switch.bin

<Sysname> reboot

Complete Configuration

l          Configure the switch

#

vlan 1

#

interface Vlan-interface1

ip address 1.1.1.1 255.0.0.0

Precautions

l          If the free Flash memory of the switch is not enough for downloading the application file from the TFTP server, remove those unused applications from the Flash memory before downloading the file.

l          It is not recommended to directly remove applications in use. If removing some applications in use is a must to get enough space, you can use the BootROM menu to remove them. For details, refer to “System Maintenance and Debugging Operation”.

 

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