Relevant mostly to OS X admins
In order to update the firmware on my stack of Dell 5548P switches, I needed to set up a TFTP server, and serve up some files 80’s style. A quick Google search told me that OpenTFTP Server appeared to be a fine choice, so I grabbed it, and put it on a Windows 2K8R2 server. It took me a little exploring to realize that everything I really needed to learn about configuring and launching it was living in the OpenTFTPServerMT.ini file. Digging through that .ini I answered my initial question of “what directory are you serving from?” and found all the other configuration options adequately documented within. I ran the OpenTFTPMTInstallService.exe file, saw I had a new service running, and tried to connect via TFTP on my ML laptop.
Oh yes… the server level firewall. TFTP runs on port 69, UDP protocol. Open that up, and hurray, we can talk.
Next, let’s move a file. There’s no directory listing in TFTP, you have to know your filenames, and the Dell firmware and boot code are relatively long, so I create a 2 line test.text file, and ask my ML laptop to GET it:
tftp> get test.txt sent RRQ <file=test.txt, mode=netascii> received DATA <block=1, 54 bytes> Received 54 bytes in 0.1 seconds
Perfect! The Hello World test passes, now onto the real stuff.
tftp> get powerconnect_55xx-4108.ros sent RRQ <file=powerconnect_55xx-4108.ros, mode=netascii> received DATA <block=1, 512 bytes> sent ACK <block=1> received DATA <block=2, 96 bytes> Received 608 bytes in 0.1 seconds
No… the file isn’t 608 bytes. I test a quick test.zip file: also ends much before it should. I experimented with a few options (blksize, getting more feedback via verbose and tsize) before it occurred to me: in TFTP, one must treat ascii and binary files differently, and set the appropriate mode:
Oh, yes. That changes everything. Since the real use case here is for moving the files to the switch stack, I’m going to guess that binary is its default condition. There’s no mention of needing to select that in the documentation.
I have to wonder if low level switch management will ever leave serial ports, 9600,8,N,1 and TFTP behind…