Main menu

Installing a TFTP-server on Raspberry Pi

Welcome to this turorial on how to install a TFTP-server on a Raspberry Pi.

This can be used to distribute your IOS-images to your cisco-equipment.

First follow step 1-3 on my tutorial LAMP with Raspberry Pi.

Step 1 – Network configuration
Either you config a static address on your Pi by editing


with (for example):

auto eth0
iface eth0 inet static

Or setup your router to always assign the same IP-address to your Pi.

Step 2 – Install TFTP-server

Install necessary package

apt-get install atftpd

The TFTP server uses /srv/tftp as its home directory by default. You need to put your IOS imagefiles in this directory before your TFTP server is able to serve them to your cisco-equipment.

Step 3 – Transfer IOS-files to the Raspberry Pi

You can use, for example, Filezilla to transfer the IOS-images from the computer that has downloaded the images to the Raspberry Pi.

Step 4 – Download IOS-images to router

We will perform the basic IP configuration on the cisco-equipment first. The interface FastEthernet0/0 of the router is assigned the IP address and subnet mask

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address
Router(config-if)#no shutdown

You can use the copy tftp flash command to download an IOS image stored on the SD card of your Raspberry Pi. Make sure you have a steady connection between your cisco-equipment and your Raspberry Pi.

Router#copy tftp flash

Address or name of remote host []?
Source filename []? c181x-adventerprisek9-mz.151-4.M9.bin
Destination filename [c181x-adventerprisek9-mz.151-4.M9.bin]?
Accessing tftp://
Loading c181x-adventerprisek9-mz.151-4.M9.bin from (via FastEthernet0/0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 27641828 bytes]
27641828 bytes copied in 90.600 secs (305097 bytes/sec)

All done.