Discussion:
[Dnsmasq-discuss] No DNS server assigned to dhcp clients if port != 53 in dnsmasq.conf
Gordon Hsiao
2018-06-30 13:39:56 UTC
Permalink
If in my dnsmasq.conf I used a different port other than 53 for dns,
dnsmasq never assigns DNS server to my dhcp clients, is this a feature or a
bug? for port 53 everything works as expected, of course.

Thanks,
Gordon
Geert Stappers
2018-06-30 15:47:12 UTC
Permalink
Post by Gordon Hsiao
If in my dnsmasq.conf I used a different port other than 53 for dns,
dnsmasq never assigns DNS server to my dhcp clients, is this a feature or a
bug? for port 53 everything works as expected, of course.
Please elaborate


Groeten
Geert Stappers
Who thinks that original poster has encountered a good feature
--
Leven en laten leven
B. Cook
2018-06-30 16:19:18 UTC
Permalink
I am not the original poster..

8< -- snip -- >8

I want to run my DNS on port 59.

I want dnsmasq to assign my clients my DNS server running on port 59.

Why doesn't it.

8< -- snip -- >8

That is how I am understanding the original request.
Post by Geert Stappers
Post by Gordon Hsiao
If in my dnsmasq.conf I used a different port other than 53 for dns,
dnsmasq never assigns DNS server to my dhcp clients, is this a feature
or a
Post by Gordon Hsiao
bug? for port 53 everything works as expected, of course.
Please elaborate
Groeten
Geert Stappers
Who thinks that original poster has encountered a good feature
--
Leven en laten leven
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
--
This message may contain confidential information and is intended only for
the individual(s) named. If you are not an intended recipient you are not
authorized to disseminate, distribute or copy this e-mail. Please notify
the sender immediately if you have received this e-mail by mistake and
delete this e-mail from your system.
Geert Stappers
2018-06-30 17:03:09 UTC
Permalink
Post by B. Cook
Post by Geert Stappers
Post by Gordon Hsiao
If in my dnsmasq.conf I used a different port other than 53 for dns,
dnsmasq never assigns DNS server to my dhcp clients, is this a feature
or a bug? for port 53 everything works as expected, of course.
Please elaborate
Groeten
Geert Stappers
Who thinks that original poster has encountered a good feature
I am not the original poster..
8< -- snip -- >8
I want to run my DNS on port 59.
I want dnsmasq to assign my clients my DNS server running on port 59.
Why doesn't it.
8< -- snip -- >8
That is how I am understanding the original request.
Oh, I did understanding something like

} I want to do non standard things.
} But I can get it working in the first 30 minutes I tried.
} Let me use the word 'bug' to get some attention.


I did give original poster some attention in a lazy way.
Post by B. Cook
Post by Geert Stappers
Please elaborate
I shoud have written

} } Please tell more about the use case.
} } You might be doing something that I might need in the future




Groeten
Geert Stappers

P.S.
Make it possible to read in the discussion order.
Yes, reply below the text.
--
Leven en laten leven
r***@gmail.com
2018-06-30 17:26:44 UTC
Permalink
Because the DHCP "name-server" attribute (option 6) carries only an IP
address and not a port, this isn't going to work. The DHCP clients simply
aren't written to configure DNS on any port other than 53.

Now, if your intent is for DHCP clients to use a different DNS server on
the same host, one that is listening on port 53, all you need to do is to
add the following line to your configuration (dnsmasq treats 0.0.0.0 as a
placeholder for "its own address")

dhcp-option=6,0.0.0.0
Post by Gordon Hsiao
If in my dnsmasq.conf I used a different port other than 53 for dns,
dnsmasq never assigns DNS server to my dhcp clients, is this a feature or a
bug? for port 53 everything works as expected, of course.
Thanks,
Gordon
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Eric Luehrsen
2018-07-01 02:20:09 UTC
Permalink
Post by r***@gmail.com
Post by Gordon Hsiao
If in my dnsmasq.conf I used a different port other than 53 for dns,
dnsmasq never assigns DNS server to my dhcp clients, is this a
feature or a bug? for port 53 everything works as expected, of course.
Thanks,
Gordon
Because the DHCP "name-server" attribute (option 6) carries only an IP
address and not a port, this isn't going to work. The DHCP clients
simply aren't written to configure DNS on any port other than 53.
Now, if your intent is for DHCP clients to use a different DNS server on
the same host, one that is listening on port 53, all you need to do is
to add the following line to your configuration (dnsmasq treats 0.0.0.0
as a placeholder for "its own address")
dhcp-option=6,0.0.0.0
Also answering some other responses "why or what is the use case?" A not
unlikely configuration is to have Bind or Unbound as a global and
recursive server, or forwarded DNS over TLS. It would be possible to
treat these as the "upstream" servers and have dnsmasq query them on
127.0.0.1#1053. But that is effectively double buffering (double ram,
handling time), and may be slow for a large number of queries.

Another way is to have Bind or Unbound answer on #53, and then create a
forward or stub (authoritative) zone that queries dnsmasq at
127.0.0.1#1053. Because normally local queries are less volume than
global queries, this may better balance the system. With AXFR in
authoritative mode, dnsmasq isn't generally bothered for each little
thing. To let DHCP clients know there will be an answer on #53

--dhcp-option=[tag],option:dns-server,0.0.0.0
--dhcp-option=[tag],option6:dns-server,[::]

and consider restriction to local admin or link on ip6 with wildcards

--dhcp-option=[tag],option6:dns-server,[fd00::]
--dhcp-option=[tag],option6:dns-server,[fe80::]

Loading...