[Dnsmasq-discuss] DNS - ICMP - Destination unreachable (Port unreachable) ?

Albert ARIBAUD albert.aribaud at free.fr
Wed May 13 09:11:51 BST 2015


Bonjour Nikita,

Le Wed, 13 May 2015 00:58:58 -0700, "Nikita N." <nikitan at operamail.com>
a écrit :

> Hi Albert,
> thank you for your hints, I'm going to setup as you suggest, and see
> what happens.
> 
> Anyway, you wrote something very interesting here:
> > a DNS answer is always through IPv4, either over UDP or TCP.
> TCP?? :)
> Do you mean, I can send a TCP frame from port 53 to Dnsmasq with a DNS
> query?
> And I will receive a TCP frame from Dnsmasq with the DNS query response?

Generally speaking -- and I am not a specialist on DNS, so I may make
mistakes on the particulars -- DNS is supposed to function as follows:

- requests are made over UDP port 53.

- requests made over UDP are answered over UDP.

- answers made over UDP might be truncated for Many Reasons(tm) --
  mostly because they should remain short enough to fit in a single
  layer 2 (e.g. Ethernet) frame.

- if a truncated UDP answer was received, TCP port 53 might be used.

- requests over a TCP port 53 connexion are answered over that TCP
  connection, of course.

See <http://tools.ietf.org/html/rfc1034> for the ugly details.

See also <http://tools.ietf.org/html/rfc1035> section 4.2 regarding UDP
vs TCP: you can do a DNS request over TCP, but note that TCP should
be the fallback method and UDP the preferred method, at least for
standard queries.

Amicalement,
-- 
Albert.



More information about the Dnsmasq-discuss mailing list