Unable to copy files to a TFTP server from the EX-series switch. This article provides a detailed description of how to transfer files from an EX Switch to a server using TFTP.
Attempting to TFTP transfer files from the EX Switch to a TFTP server (10.1.1.10) results in error.
juniper@reee> copy file case1.txt tftp://10.1.1.10
ssh: tftp: hostname nor servname provided, or not known
lost connection
error: put-file failed
error: could not send local copy of file
In this scenario we have a TFTP server that can connect to one of the VLAN RVI's (Routed Virtual Interface) on the EX Switch. The TFTP server is running on a PC in the same VLAN.
-
Prepare a TFTP server on a PC with TFTP server software installed. First, verify there is proper communication between the Switch and the TFTP server by initiating a ping.
PC (TFTP Server) 10.1.1.10/24
VLAN RVI 10.1.1.1/24
Example:
Ping TFTP server from EX Switch
juniper@reee> ping 10.1.1.10
PING 10.1.1.10 (10.1.1.10): 56 data bytes
64 bytes from 10.1.1.10: icmp_seq=0 ttl=128 time=0.852 ms
64 bytes from 10.1.1.10: icmp_seq=1 ttl=128 time=1.403 ms
64 bytes from 10.1.1.10: icmp_seq=2 ttl=128 time=0.505 ms
-
Check the settings on the TFTP server and make sure the service is running.
-
Upload (put) a file to the TFTP server from the EX. Go to the shell prompt and follow the steps given below juniper@reee> start shell
( i ) go to the shell prompt.
( ii ) tftp to the ip address of the server.
( iii ) the put command sends the file to the tftp server.
%tftp 10.1.1.10 (ip address of the tftp server)
tftp> put case1.txt( file name)
Sent 4722 bytes in 0.0 seconds
tftp> quit
-
The file will be received (put) on the TFTP server.
-
Files can also be downloaded from the TFTP server to the EX Switch using the "get" command
tftp> get configuration.txt
Received 4476 bytes in 0.0 seconds