Posted on March 8, 2016 4:15 am
 |  Asked by Martial
Print Friendly, PDF & Email

How to configure Arista router as a tftp server?

I would like to use an Arista switch as my tftp server to upgrade other arista switch.

what is the equivalent of tftp-server command in arista world?




Posted by Vikram
Answered on March 8, 2016 4:21 am

Hi, could you please let us know what version of EOS you are running. This is so we could point out the right rpm that you need to download in order to enable TFTP server.

Please be advised that TFTP is not generally recommended in order to transfer files. Would it be possible for you to utilize scp? Could you please provide some details around your use case.

If its not possible to utilize scp then we can direct you to the rpm file that you would need to download in order to install TFTP server as a extension and provide instructions around how you can configure it in order to make it persistent across reboots once you advise us on the EOS version that is currently running in your environment. Thanks

Posted by Martial
Answered on March 8, 2016 6:37 am

I am running version EOS-4.15.4F.  I run into issue this morning with scp on arista.  I kept getting the ”lost connection” error when file transfer reaches 100% (415mb). I have enough space on my flash.  so that is not the issue and the connection seems ok.

But when I switched to sftp, everything went well. Except across region, it is too slow. 30 minutes for a 415mg file. That is the reason, I would like to setup temporary  a arista device as a tftp server for switches in region 2.

Thank you



Posted by Vikram
Answered on March 9, 2016 7:36 am

Hi Martial,

With regards to your scp failure that is definetly not the way it should work. I would encourage you to open a Tac case to get that solved. Just out of curiosity could you please advise if the username you are using for scp has direct access to privilege 15 mode. The way to check this would be to ssh to the switch and look at the prompt that you get back. Do you get a ”switch>” prompt or do you get a ”switch#” prompt. I am guessing that the reason why you are getting a lost connection may be because the username that you are using does not have privilege 15 access directly. If that is not true and your user does have privilege 15 access then please open a tac case to get the scp resolved as that is the recommended way.

Now with regards to TFTP please see the following instructions

Step 1a: Create a new control-plane ACL to permit tftp as the default ACL cannot be modified

conf t
ip access-list control-plane-acl-2
statistics per-entry
10 permit icmp any any
20 permit ip any any tracked
30 permit udp any any eq bfd ttl eq 255
40 permit udp any any eq bfd-echo ttl eq 254
50 permit ospf any any
60 permit tcp any any eq ssh telnet www snmp bgp https msdp
70 permit udp any any eq bootps bootpc snmp rip ntp
80 permit tcp any any eq mlag ttl eq 255
90 permit udp any any eq mlag ttl eq 255
100 permit vrrp any any
110 permit ahp any any
120 permit pim any any
130 permit igmp any any
140 permit tcp any any range 5900 5910
150 permit tcp any any range 50000 50100
160 permit udp any any range 51000 51100
170 permit udp any any eq tftp

 Step 1b: Apply the new ACL to the control-plane

conf t
ip access-group control-plane-acl-2 in

Step 2: Download the TFTP server RPM to your switch. Search google for the filename The file you would need is tftp-0.49-7.fc14.i686.rpm. For e.g.:

Step 3: Once the RPM file is in flash on the switch Install it as an extension

In order to install the extension the steps are
a) Copy the extension to the extension folder
b) Once the file has been copied to the extension folder use the “extension” command to install the extension
c) In order to make this persistent across reboots please copy the extension to boot-extensions
d) Verify that the extension has been installed using the “show extension” command and for ensuring that it will survive a reboot use the “show boot-extension” command which will show you which extensions will load on bootup.

Example Output

switch.04:34:42#copy flash:tftp-server-0.49-7.fc14.i686.rpm extension:
 Copy completed successfully.
 switch.04:36:27#extension tftp-server-0.49-7.fc14.i686.rpm
 switch.04:36:36#copy installed-extensions boot-extensions
 Copy completed successfully.
 switch.04:36:43#show extensions
 Name Version/Release Status extension
 ------------------------------------------ ------------------------- ------ ----
 tftp-server-0.49-7.fc14.i686.rpm 0.49/7.fc14 A, I 1

A: available | NA: not available | I: installed | NI: not installed | F: forced

Please ensure that the extension shows a status of “A, I” under the Status column for the “show extension” command

Step 4: Now that you have tftp installed you need to modify the tftp config file /etc/xinetd.d/tftp.

Issue the command “bash sudo vi /etc/xinetd.d/tftp”

Modify the following parameters

disable = no
server_args = -s -c /var/lib/tftpboot

Note that the /var/lib/tftpboot is the default directory from where the files will be served. Also the “-c” flag has been added to server_args.

Now issue the following commands from Cli

switch.04:41:10# bash sudo chkconfig tftp on
switch.04:41:15# bash sudo chkconfig xinetd on
switch.04:41:19# bash sudo service xinetd start

With the above config you should be able to put the files you want to serve in the /var/lib/tftpboot directory and then any client can access the files. Please note that any files you copy into /var/lib/tftpboot or if you do change the directory from /var/lib/tftpboot you would also need to modify the permissions. Suggestion would be to move the files you need to serve to the /var/lib/tftpboot directory and modify the permission for that file. The way to do that is to issue the “bash sudo chmod 755 ” once you have copied the file to the tftpboot directory.


switch.04:41:23# bash sudo cp /mnt/flash/EOS-4.15.4F.swi /var/lib/tftpboot/EOS-4.15.4F.swi
switch.04:41:25# bash sudo chmod 755 /var/lib/tftpboot/EOS-4.15.4F.swi

Please be advised that the “/var/lib/tftpboot” directory gets erased when the switch reboots.

In addition note that except for /mnt/flash the entire filesystem is not persistent across reboots. This means that if you leave the above the way it is currently then you would lose the “/etc/xinetd.d/tftp” file which is the configuration file and you would have to reconfigure it after a reboot. If you want to be persistent across reboots then you would have to create a on-boot event-handler in Cli which will automatically copy the tftp config file to the /etc/xinetd.d/ folder on bootup and also execute a few commands. If you would like to do this then please do as follows

 ! Copy the modified TFTP configuration file to flash
 bash cp /etc/xinetd.d/tftp /mnt/flash/tftp
 ! Configure event-handler for persistent operation after reboot
 conf t
 event-handler tftp
 trigger on-boot
 action bash sudo cp /mnt/flash/persist/tftp /etc/xinetd.d/tftp; sudo chkconfig tftp on; sudo chkconfig xinetd on; sudo service xinetd start
 delay 30

You should be able to tftp to this switch from any other switch with the syntax “copy tftp:///EOS-4.15.4F.swi flash:”


switch123.04:41:25# copy tftp:// flash:
 % Total % Received % Xferd Average Speed Time Time Time Current
                                             Dload  Upload Total Spent Left   Speed
 12 414M 12 50.6M    0      0 1197k    0 0:05:54 0:00:43 0:05:11 1190k

Thank you vikram

(Martial at March 23, 2016 11:07 pm)
Posted by obioma okoroafor
Answered on August 30, 2021 1:02 am


Please how do I configure my PC as an ftp server for EOS backup and restore?

I configured an IP address for management port 1 and an IP route.

Ping between my PC and the Arista 7050S switch completes successfully.

However, whenever I run the backup command, I get the following error message.

localhost#copy flash:/EOS-4.8.3.swi ftp:/EOS-4.8.3.swi
open: EOS-4.8.3.swi: Temporary failure in name resolution
% Error copying flash:/EOS-4.8.3.swi to ftp:/EOS-4.8.3.swi (see above for details)

Please how do I successfully run the backup?

Thank you.


Posted by Sachin M Menon
Answered on September 1, 2021 5:36 am

Hi Obioma,

The command to copy EOS from Arista 7050S to FTP server would be as follows:

switch#copy flash:/EOS-4.8.3.swi ftp:/FTP_Username@FTP_IP/EOS-4.8.3.swi





Post your Answer

You must be logged in to post an answer.