Re: Why use DNS for these servers ?



wkevin wrote:
I know that for DNS, NTP and DHCP, we use UDP servers. This is
common practice (and I believe it is so on other operating systems,
besides Linux).
My question is: what is the reason behind it? why not use TCP servers
for DNS or for NTP or for DHCP?

TCP *is* used for DNS, when the response needs more than 1 packet. Otherwise there's 1 UDP packet request, 1 UDP packet response. TCP would be a waste of client resources, server resources, bandwidth, and time just to send 1 data packet in each direction.

Except that NTP and DHCP don't fall back to TCP, the same argument applies to them. Additionally, if the client doesn't have an address yet, TCP without a source address is impossible for DHCP.
.



Relevant Pages

  • Re: [PANIC]: rw_lock panic in in_pcballoc() in r185864
    ... I have several boxes, real and virtual, using DHCP and very recent kernels and no sign of this panic. ... I foolishly deleted the kernel matching the vmcore, I'll try to do that tomorrow ... interesting to know whether any UDP use triggers the panic, ... or some other activity that triggers a UDP packet to be sent. ...
    (freebsd-current)
  • Re: [PANIC]: rw_lock panic in in_pcballoc() in r185864
    ... I have several boxes, real and virtual, using DHCP and very recent ... I foolishly deleted the kernel matching the vmcore, ... triggers a UDP packet to be sent. ...
    (freebsd-current)
  • Re: When Linux PC boots, Does it sends RARP packet to get its IP address by embedding its Hardware a
    ... IP and what-not from the configuration files somewhere in /etc/* (where ... The BOOTP or DHCP ... server responds with a UDP packet with the correct IP addresses and using ... 1931 Dynamic RARP Extensions for Automatic Network Address ...
    (comp.os.linux.networking)
  • Re: Sessions Resource Exhaustion
    ... full session setup), then the device in question is just crap :-) ... i could not exhaust state tables with TCP. ... but the moment an IPS receives an UDP packet ...
    (Focus-IDS)
  • Re: Ethernet base protocols on embedded
    ... base communication on my embedded device. ... encapsulate each entire RS485 message in a UDP packet to the host (or ... those through a TCP session. ... or send each message as a UDP packet. ...
    (comp.arch.embedded)