Translate

Monday, July 16, 2012

Networking - Let's learn to build a TFTP server

Who works in the area of ​​network certainly know that there are a number of protocols that support various services. Some more elaborate and robust, others more simplistic ... but usually all play their role well.

The protocol / service to present to you today is the TFTP (Trivial File Transfer Protocol), a simple protocol for transferring files, similar to the popular FTP but much simpler. To simplify the presentation of TFTP, you will learn how to install a TFTP server on Linux. "Let's GO!"



tftp_00


As mentioned, TFTP is a protocol for transferring small files between machines, which was created in 1980. Currently, with the popularity of VoIP, the TFTP protocol has become an in demand since it allows a very simple way to provision VoIP phones (ie, send the configuration automatically to VoIP terminals). Moreover, this is also quite a protocol for upgrading firmware user equipment or machinery used in diskless.

This protocol uses port 69, is based on UDP and has no native support for authentication mechanisms and data encryption. Support various modes of data transfer such as netascii (corresponding to the ASCII mode FTP), octet (corresponds to the binary FTP).

To install and configure a TFTP server must follow the following steps:

Step 1 - Install a TFTP server
 
yum install tftp-server
 
Step 2 - Open the configuration file / etc / xinetd.d / tftp and set the following configuration:
 
# 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             = -s /tftpboot
        disable                 = yes
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

Step 3 - Once installed and configured, we will start the service using the command:

/sbin/service xinetd start

Step 4 - If you have not created the directory / tftpboot should run the following commands for creating and setting permissions
 
# mkdir /tftpboot
# chmod 777 /tftpboot

And you're done. Let us now make a simple test to see if everything is working. To do this we pplware create the file in / tftpboot. Once created, let's see if we can get that file using tftp client's own machine:
 
tftp 127.0.0.1
tftp> get pplware
tftp> quit

If you want to take the test from a remote machine, you need only specify the correct IP address of the server (instead of 127.0.0.1).


  Published By: Pplware

No comments:

Post a Comment