In the process of learning network protocols, we will inevitably feel a little unfamiliar with the configuration content. Here we will conduct a TFTP service configuration experiment to help you master the TFTP service configuration process.
TFTP service configuration experiment content
TFTPTrivial File Transfer Protocol (simple File Transfer Protocol) is a Protocol used in the TCP/IP Protocol family to transmit simple files between the client and the server, provides File Transfer services that are not complex and costly. TFTP is carried on UDP and provides unreliable data stream transmission services. It does not provide access authorization and authentication mechanisms, and uses the timeout retransmission method to ensure data arrival.
Tutorial on TFTP service configuration
Through experiments, trainees can master the TFTP service configuration methods.
TFTP service configuration lab platform
A pc with a Linux operating system is connected over Ethernet.
Procedure
Step 1. Configure the server
Run the following command to install the TFTP server.
Linux @ farsight :~ $ Sudo apt-get install tftp-hpa tftpd-hpa xinetd
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
Recommended software packages:
Inet-superserver
The following new software packages will be installed:
Tftp-hpa tftpd-hpa xinetd
A total of 0 software packages have been upgraded, 3 new software packages have been installed, 0 software packages have to be uninstalled, and 9 software have not been upgraded.
Download the 198kB software package.
After decompression, the extra space of 631kB is consumed.
Get: 1 http://archive.ubuntu.com intrepid/main tftp-hpa 0.48-2.2ubuntu1 [24.5kB]
Get: 2 http://archive.ubuntu.com intrepid/main tftpd-hpa 0.48-2.2ubuntu1 [35.2kB]
Get: 3 http://archive.ubuntu.com intrepid/main xinetd. 3.14-7ubuntu1 [139kB]
Download 198kB, which takes 14 s (13.8kB/s)
Configuring the software package...
The software package tftp-hpa was deselected.
(Reading the database... the system currently has a total of 108543 files and directories installed .)
Extracting tftp-hpa (from.../tftp-hpa_0.48-2.2ubuntu1_i386.deb )...
The software package tftpd-hpa was deselected.
Extracting tftpd-hpa (from.../tftpd-hpa_0.48-2.2ubuntu1_i386.deb )...
Select the software package xinetd that has been canceled.
Extracting xinetd (from.../xinetd_1% 3a2. 3.14-7ubuntu1_i386.deb )...
Processing the trigger for man-db...
Setting tftp-hpa (0.48-2.2ubuntu1 )...
Setting tftpd-hpa (0.48-2.2ubuntu1 )...
Setting xinetd (. 3.14-7ubuntu1 )...
- * Stopping internet superserver xinetd [ OK ]
-
- * Starting internet superserver xinetd [ OK ]
You can also download these software packages:
- tftp-hpa_0.48-2.2ubuntu1_i386.deb
-
- tftpd-hpa_0.48-2.2ubuntu1_i386.deb
-
- xinetd_1_3a2.3.14-7ubuntu1_i386.deb
Then
Sudo dpkg-I *. deb install these packages
Step 2 of the TFTP service configuration experiment. Add a configuration file
- linux@farsight:~$sudo vim /etc/xinetd.d/tftp
Add the following content:
- service tftp
- {
- disable = no
- socket_type = dgram
- protocol = udp
- wait = yes
- user = root
- server = /usr/sbin/in.tftpd
- server_args = -s /tftpboot
- per_source = 11
- cps = 100 2
- flags = IPv4
- }
Step 3. start/stop the TFTP service
- linux@farsight:~$ sudo /etc/init.d/xinetd stop
- * Stopping internet superserver xinetd [ OK ]
-
- linux@farsight:~$ sudo /etc/init.d/xinetd status
- * xinetd is not running
-
- linux@farsight:~$ sudo /etc/init.d/xinetd start
- * Starting internet superserver xinetd [ OK ]
-
- linux@farsight:~$ sudo /etc/init.d/xinetd status
- * xinetd is running.
-
- linux@farsight:~$ sudo /etc/init.d/xinetd restart
-
- * Stopping internet superserver xinetd [ OK ]
-
- * Starting internet superserver xinetd [ OK ]