Parsing and setting the tftp service

Source: Internet
Author: User

In Linux, how does one set the tftp service? Next we will explain this part in detail. Then, we will introduce the setup problem based on the problems involved in the setup. Let's take a look at the specific content.

1. Set up the tftp service in Linux

Problems with setting the tftp service:

There is a tftp green software on Windows, so there must be similar software on Linux, So I entered the tftp Command in Linux. Hey, I actually entered the tftp console, so simple ??? After entering the help command, I found that there were no ls commands like common vsFTP, and I didn't know how to set the root directory for the image file. N problems occurred, this tftp is really special.

Solution:

Searching for documents related to tftp configuration in Linux on the internet is too difficult, and foreign websites are hard to find. At work, I asked a master via MSN, he immediately helped me in a foreign domain name cool Site: http://www.die.net/doc/linux/man/man8/tftpd.8.html found the tftp man, really grateful, a look at the parameters quite a lot, has fallen, it is a big joy. enter a command similar to the following in the command line: # tftp-s, etc., Error! Why? Man describes the parameters of the tftp Command! I searched for N on the Internet for a long time and found that a foreign Forum talked about tftp's image upgrade for the Cisco router. Hey, isn't this the same as how ARM downloaded the image file from the host? Oh, the original tftp is included in the xinetd service, and its configuration file is/etc/xinetd. d/tftp: you only need to modify this configuration file. As for the parameters mentioned in man, you can set them in this configuration file. The configuration file is as follows:

 
 
  1. class=codetop>CODE: class=codemain>service tftp {  
  2. disable = no 
  3. socket_type = dgram 
  4. protocol = udp 
  5. wait = yes 
  6. user = root 
  7. server = /usr/sbin/in.tftpd  
  8. server_args = -s /usr/local/src/arm  
  9. per_source = 11 
  10. cps = 100 2  
  11. flags = IPv4 

Then restart the xinetd service:

Class = codetop> CODE: class = codemain> # service xinetd restart

Copy the image file "Linux_rom.bin" to the/usr/local/src/arm folder to complete the configuration of tftp. this is a new problem. How can I find it in/etc/xinetd. d/can't find the tftp file? Is it not installed? But I entered # rpm-q tftp said that I have installed the tftp-0.32-4.i386.rpm, and later on the Internet saw the article said that the tftp service is not installed by default, but just did not see installed? Forget it, don't look for the chaos, go to Redhat Network search rpm, it is clear that the original tftp is divided into the client and the server side, alas, I installed the client, the server side tftp-server-0.32-4.i386.rpm to download and install.

To sum up the following:

Set tftp service 1. Install tftp-server-0.32-4.i386.rpm

Class = codetop> CODE: class = codemain> rpm-ivh tftp-server-0.32-4.i386.rpm

Set tftp service 2. Configure/etc/xinetd. d/tftp

Class = codetop> CODE: class = codemain> vi/etc/xinetd. d/tftp

Set tftp service 3. service xinetd restart

Set the tftp service 4. Put the image file in the tftp root directory

Set the tftp service 5. enable the development board switch when the network is connected, and load the image file on the computer

2. Configure dual NICs in Linux

The connection between the Development Board and the Linux Desktop is not a problem at all. You can ping each other by connecting them to a HUB. However, we are poor. Four people use a cheap Broadband Router, I have only four ports. My board does not have the right to occupy other users' computer ports. Fortunately, my computer has two NICs and has been connected to ARM in Windows, no problem. It should be a dish in Linux.

In "network settings control", set the IP addresses of the two NICs: eth0 192.168.10.55 (used for surfing the Internet) and eth1 192.168.0.10 (used for connecting to the ARM board). As a result, the ping to the Development Board fails, which is strange. if the network is disconnected, you cannot set the tftp service.

Next, I tried the Enable and Disable NICs N times and the result was a mess. eth1 was gone, and eth0 had two IP addresses: eth0: 0 and eth0: 1, angry. forget it, delete all and add again. as a result, eth0 and eth1 became eth2 and eth3. Alas, it was really miserable. later I thought that the configurations for other NICs were stored in/etc/sysconfig/network-scripts/ifcfg-eth0 and etc/sysconfig/network-scripts/ifcfg-eth1, and I changed them correctly, then run

 
 
  1. class=codetop>CODE: class=codemain>#ifconfig eth0 down  
  2. #ifconfig eth0 up  
  3. #ifconfig eth1 down  
  4. #ifconfig eth1 up 

Cannot be activated. The two NICs are like dead. It's Okay To Find A vro-level connection tomorrow and connect them to the vro. But if you have resources, why not use them?

By chance, you can view the ifup and ifdown commands carefully in network-scripts:

 
 
  1. class=codetop>CODE: class=codemain>#ifdown eth0  
  2. #ifup eth0  
  3. #ifdown eth1  
  4. #ifup eth1 

Confirm again:

Class = codetop> CODE: class = codemain> # ifconfig

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.