12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 14Trivial File Transfer Protocol (TFTP)TFTP (RFC 1350) is a simple and lightweight file transfer protocol, somewhat similarto a slimmed down version of the FTP, without any complexity. TFTP does not needlogin, does not support changing directories, nor does it show the list of files anddirectories on the server. When using TFTP, you should know the exact file nameyou want to receive.Many network devices use TFTP to <strong>download</strong> their OS image, or even load/savetheir configuration on TFTP.Running TFTP service requires the inetd server to be run. You should first enableTFTP by removing comment from TFTP related line in /etc/inetd.conf. The lineshould simply look like this:tftp dgram udp wait root /usr/libexec/tftpdtftpd -l -s /tftpbootThe last parameter on the above line runs tftpd(8) with syslog logging enabled(hence -l parameter) and also sets the root directory to /tftpboot. You may changethis to your desired directory. Please note that /tftpboot does not exist on a cleanFreeBSD installation and hence should be created.After configuring the tftpd parameters, you should start/restart the inetd process(for more information on inetd, please refer to Chapter 13).You can test functionality of your TFTP server using a TFTP client acrossthe network.FreeBSD also comes with a TFTP client called tftp(1). To test the functionalityof your tftpd(8) server using tftp(1) client, you should set up appropriatedirectories and put some files in your /tftproot directory. Using tftp(1) on thesame client you should be able to get (<strong>download</strong>) the file from TFTP server. Pleasenote that you should remember the filename, since TFTP does not have the ability tosee the list of the files on the server.# tftp localhosttftp> verboseVerbose mode on.tftp> get make.confgetting from localhost:make.conf to make.conf [netascii]Received 853 bytes in 7.0 seconds [975 bits/sec]tftp> quit[ 239 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!