58-4
s
Network diagram
Figure 58-1
Network diagram for TFTP configuration
Configuration procedure
1) Configure the TFTP server (PC)
Start the TFTP server and configure the working directory on the PC.
2) Configure the TFTP client (switch).
# Log in to the switch. (You can log in to a switch through the Console port or by telnetting the switch.
See the
Login
module for detailed information.)
<Sysname>
If available space on the Flash memory of the switch is not enough to hold the file to be uploaded, you
need to delete files not in use from the Flash memory to make room for the file, and then upload the file
again. The files in use cannot be deleted. If you have to delete the files in use to make room for the file
to be uploaded, you can only delete/download them through the Boot ROM menu.
# Enter system view
<Sysname> system-view
[Sysname]
# Configure the IP address of a VLAN interface on the switch to be 1.1.1.1, and ensure that the port
through which the switch connects with the PC belongs to this VLAN. (This example assumes that the
port belongs to VLAN 1.)
[Sysname] interface Vlan-interface 1
[Sysname-Vlan-interface1] ip address 1.1.1.1 255.255.255.0
[Sysname-Vlan-interface1] quit
# Download the switch application named
switch.bin
from the TFTP server to the switch.
<Sysname> tftp 2.2.2.2 get switch.bin switch.bin
# Upload the switch configuration file named
config.cfg
to the TFTP server.
<Sysname> tftp 2.2.2.2 put config.cfg config.cfg
# After downloading the file, use the
boot boot-loader
command to specify the downloaded file
(switch.bin) to be the startup file used when the switch starts the next time, and restart the switch. Thus
the switch application is upgraded.
<Sysname> boot boot-loader switch.bin
<Sysname> reboot