Monday, March 26, 2012

Use an iPad or iPhone as a Mobile TFTP Server

As network engineers, through the course of our work we often find ourselves out in the field working at either a remote location or on an un-familiar network diagnosing and troubleshooting issues, performing maintenance, or deploying new equipment. Quite often, this also involves upgrading code on network equipment, backing up configurations, or when called in to save the day (called a MacGyver - thanks Tom for that flashback) sometimes we even have to restore configurations or download a bug-free version of code to fix an issue.

If we are MacGyver, then our Swiss-Army knife is the trusty old TFTP protocol. Sure, it can be slow. Yes, it can have trouble traversing firewalls due to dynamically negotiated transfer ports. But it is about as widespread in networking equipment as file transfer protocols can get. SCP or SFTP would be better, but frankly have not been widely implemented.

We also love using our mobile devices just as much as non-geeks! Tom also did a nice write-up on a terminal console cable solution for iPads that is now widely popular among engineers. Today, I would like to highlight another useful application for network management from an iPad.

Now with Dropbox integration and large file size transfers (>32 MB)!
 Key features:
* Full TFTP Server
* Supports file size transfers >32MB
* Dropbox integration - upload and download files from Dropbox
* One-touch Dropbox file upload
* Block size > 512 bytes
* WiFi IP address refresh
* Full logging
* Standard "swipe" to delete files

From the description, a few features really stand out. First, it supports file sizes larger than 32 MB. This is an absolute requirement for working on modern networks. Any wireless engineer who has managed code images on a controller-based WLAN system can attest that equipment images are growing larger by the month due to the rapid expansion of feature sets and supported thin-AP platforms (which typically have AP code embedded in the controller image). Second, and this is the hook for me, full Dropbox support! Yep, cloud syncing of image files, configuration backups, licenses, SSL/TLS certificates, etc. for easy retrieval and upload to networking equipment. If there was one complaint that I have about tablets in general, it’s the lack of a file system. Well, Dropbox and other cloud services go a long way to make that a non-issue. But it requires every application to integrate with the service independently. Luckily for us, TFTP Server does. Third, it supports running in the background. This frees up the user to switch between apps and multi-task. This allows complete network management using only your mobile device; you can console into the equipment and host a TFTP server all at the same time without requiring two separate devices.

Okay, enough description about the app. Let’s start using it.

Once you’ve downloaded it from the app store and launch it, you will see the main screen:

It consists of a slider button to turn the TFTP server on or off, and handily displays your current wireless IP address (Wi-Fi only, no hosting over 3G/4G).
Then, there are 3 tabs that control the operation of the app:
1.       Log – displays the server log to monitor server status and TFTP file transfer progress.
2.       My Files – displays a list of the files available on the mobile device, which have been synched from the Dropbox account.
3.       Dropbox – controls Dropbox integration and selection of files to sync with the mobile device.

The first step in configuring the application is to ensure you also have the Dropbox app downloaded and signed into your account. Designate a folder as the TFTP root directory for hosting files.

Second, open the TFTP Server app and go to the Dropbox tab. Click the Settings button to configure the TFTP root directory and link it to your Dropbox account. From here you can also Upload all Files that have been uploaded to the mobile device TFTP server and store them back on Dropbox.

Click Done and go back to the Dropbox tab. A new Show Files button is now displayed. Clicking on it will now pull up the TFTP root directory on Dropbox and allow you to select files to sync with the local system. Select any files that you need to host from the mobile TFTP server, then click Done. The files will be pulled down to the iPad / iPhone.

Once the files have been pulled down, you will see them in the My Files tab.

Okay, now it’s time for an actual file transfer. From the main screen, ensure that you are connected to a Wi-Fi network and have a valid IP address. Then turn on the TFTP server.

In a separate app (or device), console or SSH into the network device and initiate the TFTP file transfer. Here, I used SecureCRT for simplicity of writing this post.

The file transfer starts, and is visible in the Log tab on the TFTP Server app.

The transfer from the mobile device is noticeably slower than hosting it using laptop or an actual server. But the trade-off which sacrifices a bit of speed for complete mobility is likely worth it for most situations, especially when out in the field and a TFTP server is not available, or is located across a high-latency WAN circuit.

You can see the file transfer completes successfully in the terminal:

Overall, the TFTP Server app works well, is bug-free from what I have seen, and allows me to use only my mobile device in many instances, making my shoulder bag a little bit lighter. My shoulder thanks you!

Revolution or Evolution? – Andrew’s Take
As a network engineer, being thrown into “enemy” territory and unfamiliar networks can sometimes leave us scrambling to perform the simplest of tasks. At the same time engineers, like everyone else, are looking for ways to “do more with less”. In our varied travels, this means many of us are looking for ways to be more productive while carrying less equipment around. Being highly mobile improves our productivity and takes some of the strain out of travel.

Using an iPad or iPhone for complete network management is getting closer to reality with applications like TFTP Server now available. It’s not all that glamorous, but hey, when is an engineer’s work really ever glamorous. The little things in our day-to-day work can make all the difference in getting the job done while keeping our stress levels to a minimum.

Having this app handy is one of those little things that makes our job easier. Hurrah to that!


Disclaimer – I was provided a free copy of the TFTP Server app by the developer, but all reviews and conclusions are wholly my own and were not paid for consideration.

1 comment:

  1. I just downloaded this app which works great when coupled with get-console's serial app. You mention that it works in the background, however, I have to switch back to the TFTP app, from the console app, in order for the transfer to occur. Am I doing something wrong?