Table of Contents

Linux

tftp - How to Configure tftp in Linux

Installing

# yum -y install tftp-server

Configuration

/etc/xinetd.d/tftp

# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -c -s /tftpboot        # adding -c for upload the new files.
        disable                 = no                     # change from yes to no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}
# /sbin/service xinetd restart
# chmod 777 /tftpboot

Check

Linux

Get

Get the file from tftp server.

tftp -v IPADDR -c get FILE.txt
tftp -v -m binary  IPADDR -c get FILE.bin

Put

Put the file to tftp server.

tftp -v IPADDR -c put FILE.txt
tftp -v  -m binary  IPADDR -c put FILE.bin

Windows

Get

Get the file from tftp server.

tftp IPADDR  get test.txt
tftp -i IPADDR  get test.bin

Put

Put the file to tftp server.

tftp IPADDR put FILE.txt
tftp -i IPADDR put FILE.bin

Dialogue

$ tftp IPADDR

tftp> connect IPADDR
tftp> status

tftp> binary
tftp> get FILE.bin

tftp> ascii
tftp> put FILE.txt

tftp> quit