Available Part Numbers:
J4110A HP ProCurve Switch 8000M,J4121A HP ProCurve Switch 4000M
How can I use the HP ProCurve switch's TFTP server feature to get and put files from and to the switch?
Using the HP ProCurve switch's TFTP server feature to get and put files from and to the switch:
- Enable the switch as a TFTP server before you execute any of the put or get commands:
setmib hpswitchiptftpmode.0 -i 2
- You cannot put any files onto an HP switch.
- When you use the correct mode, you can get three files from the switch:
filename os, mode 'binary'
filename config, mode 'ascii'
filename crashdata, mode 'ascii'
- You can get a single-word command's output from a switch, but you cannot reliably get a multi-word command's output. This information was tested with these specific commands:
command log - worked
command log -a - failed
Notice the output from these TFTP commands:
tftp> put C_07_25.SWI os putting C_07_25.SWI to 220.127.116.11:os [octet] Error code 2: Access violation
tftp> get os mytftpgetos.8000 getting from 18.104.22.168:os to mytftpgetos.8000 [octet] Received 932546 bytes in 9.5 seconds [785302 bits/sec]
Note: This command worked! The Unix system now has the correct file size for the operating system.
Again, you cannot put anything onto the switch. There are three filenames on the switch, and you should be able to get all of them: config, os, and crashdata. The key is to change to ASCII mode before getting config and crashdata, or you will get the can't unlink error message.
You must enable the switch as a TFTP server before you execute any of the put or get commands.
For example, here are three successful get commands, where the TFTP session is initiated from a Unix system, and the switch acts as a TFTP server:
tftp> ascii mode set to netascii
tftp> get crashdata mytftpgetcdata.8000 getting from 22.214.171.124:crashdata to mytftpgetcdata.8000 [netascii] Received 26 bytes in 0.0 seconds [++ bits/sec]
tftp> get config mytftpgetconfig.8000 getting from 126.96.36.199:config to mytftpgetconfig.8000 [netascii] Received 2925 bytes in 0.2 seconds [117000 bits/sec]
tftp> get log mytftpgetlog.8000 getting from 188.8.131.52:log to mytftpgetlog.8000 [netascii] Received 2803 bytes in 0.1 seconds [224240 bits/sec]
Note: Remember that this information applies to all HP ProCurve Switch models. If necessary, you could substitute mytftpgetcdata.8000 with mytftpgetcdata.2424, mytftpgetcdata.2400, and so on.