Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I started a tftp server with "atftpd -v --port 69 --bind-address 10.10.10.2 --daemon /srv/tftp/" command, but for some reason I do not see TFTP server listening on port 69 in ss/netstat output. However, if I connect to a TFTP server with TFTP client, I'm able to transfer files and automatically another instance of TFTP server starts(PID 5191):
in.tftpd is a symbolic link to /usr/sbin/atftpd. How are clients able to connect to TFTP server if the TFTP server is not listening on UDP port 69? Are there other servers which work in a same manner?
udp is "stateless" so would does not have a "LISTEN" state.
To see your udp ports run "ss -a -u".
For network troubleshooting I prefer to use lsof which is available on many platforms including Linux:
lsof -i |grep -i udp
You can get a lot more detail about networking from it and also about many other open files (lsof = list open files).
I see. So none of the servers using UDP protocol like TFTP, DHCP, NTP and others can not be seen with "ss -l -u" because they are stateless? In addition, looks like if atftpd is started without "--daemon" then it uses inetd process for listening incoming UDP requests and then inetd will launch the atftpd process. In my example the "5191 in.tftpd --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftp" shown in my previous post. Is this a common practice to use inetd for listening (multiple) servers? From troubleshooting point of view it's bit more clear if inetd is not used as one can have a clear overview which processes with corresponding arguments are running.
inetd/xinetd was introduced long ago because some services do NOT need to be running all the time. They only need to be run on request. For such services inetd/xinetd simply "LISTEN" for anything requesting that port then they launch the program that actually relies on that port.
Some services are in use all the time or so frequently or take long enough to launch that it makes sense to run them as standalone utilities rather than via inetd/xinetd. (e.g. sshd usually runs as a standalone daemon.)
You can enable standalone daemons for most things as a choice (of course you'd disable them in inetd/xinetd if already enabled there). However, if you were only making 1 tftp connection to this server every day that lasted for an hour it means you're wasting resources for the other 23 hours of the day. All by themselves individual services may not take up that much but since inetd/xinetd can be and is used to configure many different services the cumulative resource saving of not running them all 24 hours a day is well worth using inetd/xinetd.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.