DrayTek UK Users' Community Forum
Help, Advice and Solutions from DrayTek Users
Local DNS resolving for DHCP clients
- neilsimms
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
25 Oct 2020 12:35 #97528
by neilsimms
Local DNS resolving for DHCP clients was created by neilsimms
Router: Vigor 2762ac
Firmware: 3.9.4_BT
I'm looking for help setting up this router so that local clients can find other machines on the same lan.
Example set up: 2 linux hosts p1 and p2. Both configured to get their IPs from DHCP. Both can connect to the internet and resolve hostnames for external servers (egwww.draytek.co.yk ). However neither can resolve the other's hostname. ie from p1:
ping p2
dig @192.168.1.254 p2 (The router is on 254, not the default 192.168.1.1)
nslookup p2
All fail to resolve p2 to an IP address.
Both p1 and p2 are visible in the router's DHCP table.
I have tried 'Bind IP to MAC' - that fixes the IP but does not help resolve them.
I have tried LAN >> General Setup >> DNS Server IP Address as blank or as the router's IP, the IPS's DNS, and 1.1.1.1, but no change.
I have also tried Applications >> LAN DNS / DNS Forwarding, adding in a domain of *.local, with the router as the DNS server. Sometimes my client will resolve p2.local, but after 5 mins it stops resolving.
The Ideally, I want my local machines to get all their IP settings from DHCP, be able to resolve other local hostnames, and use an external DNS (like Cloudflare) for anything external.
I've not found an answer in the Draytek FAQ and Knowledge Base documents.
Firmware: 3.9.4_BT
I'm looking for help setting up this router so that local clients can find other machines on the same lan.
Example set up: 2 linux hosts p1 and p2. Both configured to get their IPs from DHCP. Both can connect to the internet and resolve hostnames for external servers (eg
ping p2
dig @192.168.1.254 p2 (The router is on 254, not the default 192.168.1.1)
nslookup p2
All fail to resolve p2 to an IP address.
Both p1 and p2 are visible in the router's DHCP table.
I have tried 'Bind IP to MAC' - that fixes the IP but does not help resolve them.
I have tried LAN >> General Setup >> DNS Server IP Address as blank or as the router's IP, the IPS's DNS, and 1.1.1.1, but no change.
I have also tried Applications >> LAN DNS / DNS Forwarding, adding in a domain of *.local, with the router as the DNS server. Sometimes my client will resolve p2.local, but after 5 mins it stops resolving.
The Ideally, I want my local machines to get all their IP settings from DHCP, be able to resolve other local hostnames, and use an external DNS (like Cloudflare) for anything external.
I've not found an answer in the Draytek FAQ and Knowledge Base documents.
Please Log in or Create an account to join the conversation.
- hornbyp
- Offline
- Big Contributor
Less
More
- Posts: 1323
- Thank you received: 0
25 Oct 2020 18:58 #97529
by hornbyp
Replied by hornbyp on topic Re: Local DNS resolving for DHCP clients
From what I can make out, the Vigor's DHCP server does not automatically add entries to the Vigor's DNS Server (when it hands out an IP address).
I think the only way to add entries (as opposed to ones it caches), is to use "LAN DNS / DNS Forwarding"
The questions seems to be, what to use for the 'domainname' part of the entry?.
Maybe it should match whatever 'domainname -d' gives on the linux box. Or possibly, you can use*
wildcards (the Draytek documentation shows this in use).
I think the only way to add entries (as opposed to ones it caches), is to use "LAN DNS / DNS Forwarding"
The questions seems to be, what to use for the 'domainname' part of the entry?.
Maybe it should match whatever 'domainname -d' gives on the linux box. Or possibly, you can use
Please Log in or Create an account to join the conversation.
- neilsimms
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
26 Oct 2020 07:15 #97531
by neilsimms
Replied by neilsimms on topic Re: Local DNS resolving for DHCP clients
Hi hornbyp,
Thanks for the reply.
That's rather disappointing.
Taking you advice, I added several entries in "LAN DNS / DNS Forwarding".
I've not set a domain name in any of my local machines, so `domainname -d` gives an empty response.
The entries I created have '*.local' in the domain, a CNAME with te host, and the IP added.
I can now resolve both 'host' and 'host.local' to that IP.
Thanks for the reply.
From what I can make out, the Vigor's DHCP server does not automatically add entries to the Vigor's DNS Server (when it hands out an IP address).
That's rather disappointing.
Taking you advice, I added several entries in "LAN DNS / DNS Forwarding".
I've not set a domain name in any of my local machines, so `domainname -d` gives an empty response.
The entries I created have '*.local' in the domain, a CNAME with te host, and the IP added.
I can now resolve both 'host' and 'host.local' to that IP.
Please Log in or Create an account to join the conversation.
- hornbyp
- Offline
- Big Contributor
Less
More
- Posts: 1323
- Thank you received: 0
26 Oct 2020 13:42 #97535
by hornbyp
I suppose, with hind-sight, it doesn't actually have enough information to do that - it only has MAC, IP (and a comment string for Bind2Mac entries)
It seems to behave as transparent cache for "A" records only, with the only means of manually adding things being via the Vigor's GUI/Telnet interface.
(I tried adding "A" and "CNAME" records via the Windows 'dnscmd' command - but it was having none of it.)
Replied by hornbyp on topic Re: Local DNS resolving for DHCP clients
hornbyp wrote:
From what I can make out, the Vigor's DHCP server does notautomatically add entries to the Vigor's DNS Server (when it hands out an IP address).
I suppose, with hind-sight, it doesn't actually have enough information to do that - it only has MAC, IP (and a comment string for Bind2Mac entries)
It seems to behave as transparent cache for "A" records only, with the only means of manually
(I tried adding "A" and "CNAME" records via the Windows 'dnscmd' command - but it was having none of it.)
Please Log in or Create an account to join the conversation.
- neilsimms
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
27 Oct 2020 19:44 #97550
by neilsimms
I think it does have enough information to do this. Looking at the DHCP table, it is getting the hostname from the client. So it would not be impossible to for the router to add it to DNS. It just doesn't.
My previous (ISP supplied) router did work this way - if a machine called itself 'host' got an address from DHCP, then 'host.lan' would be resolved by the router to the IP it gave. That router had to go - it had no way of changing the DNS server:shock:
I have contacted Draytek support. They've sent a link tohttps://www.draytek.co.uk/support/guides/kb-lan-dns which covers the "LAN DNS / DNS Forwarding" that we've already discussed.
Replied by neilsimms on topic Re: Local DNS resolving for DHCP clients
... it doesn't actually have enough information to do that - it only has MAC, IP (and a comment string for Bind2Mac entries)
I think it does have enough information to do this. Looking at the DHCP table, it is getting the hostname from the client. So it would not be impossible to for the router to add it to DNS. It just doesn't.
My previous (ISP supplied) router did work this way - if a machine called itself 'host' got an address from DHCP, then 'host.lan' would be resolved by the router to the IP it gave. That router had to go - it had no way of changing the DNS server
I have contacted Draytek support. They've sent a link to
Please Log in or Create an account to join the conversation.
- the pit
- Offline
- Member
Less
More
- Posts: 409
- Thank you received: 0
31 Oct 2020 19:32 #97588
by the pit
Replied by the pit on topic Re: Local DNS resolving for DHCP clients
Never has this issue with linux boxes on a mixed lan with mac and windows, Had to tweak linux slightly to get it too work. Can't remember how now but U think it's more of an os issue than a draytek issue. Try posting on linuxquestions.org
Please Log in or Create an account to join the conversation.
Moderators: Chris, Sami
Copyright © 2024 DrayTek