0

I want to be able to access computer 192.168.0.3 from the simple name "pos". Not "pos.com" or anything. With my setup below I can ping dev.pos, just not pos. I have to ping mydomain.pos to get a reply.

In Basic > Identification in Tomato I have set the domain name to mydomain. (with the period)

local-ttl=1
bogus-priv
domain=mydomain
expand-hosts
local=/pos/

address=/pos/192.168.0.3

What could be the problem?

UPDATE: When I ping from the tomato router's "ping tool", I get a correct response when pinging "pos". Just not from any of the computers connected to it.

UPDATE 0.5: Running nslookup and typing pos. (with period) works; just not without.

UPDATE 2: Another issue I've noticed is that my local dns cache won't update when accessing these dns entries. So to test:

cmd
ipconfig /flushdns
ping google.ca
ipconfig /displaydns
' Notice that there are entries
ipconfig /flushdns
ping dev.pos
ipconfig /displaydns
' Notice that there aren't any entries for dev.pos

Looking further into it I came across this link. However changing my config to match doesn't help any.

Going into my ethernet adapter's settings and changing "Append these DNS suffixes (in order) to "." fixed it. This feels dirty though. I now have to change this setting on all connected computers and any computer that doesn't have it changed has to use "pos."

JakeTheSnake
  • 363
  • 1
  • 8
  • 19

4 Answers4

1

dnsmasq does not automatically push the domain search list to the hosts getting IP addresses using DHCP. There is DHCP parameter for this that needs to be set. You should also to push the address of your router as the DNS server. Check the dnsmasq documentation for some of the data that can be sent by DHCP.

  • DHCP option 6 is the list of name servers
  • DHCP option 119 is the list of domain names for the search list

EDIT: If you want to be able to refer to a server by only its name you should define a domain in dnsmasq. (Don't use local as this will conflict with zeroconf.) Some router use lan, and localnet is a traditional name. Set this domain as the first domain in the search list.

BillThor
  • 27,737
  • 3
  • 37
  • 69
  • The clients are all already getting the router's IP address as the DNS server. The problem is that I must use "pos." to be able to ping instead of just "pos". "dev.pos" works though. – JakeTheSnake Jan 08 '12 at 03:55
  • Looks like http://www.thekelleys.org.uk/dnsmasq/docs/FAQ "ndots" is my issue - but I've set the domain and all relevant settings. I even get the correct "dns suffix" in ipconfig on my clients...it just doesn't work. – JakeTheSnake Jan 08 '12 at 04:11
1

I can't exactly say why, but using address=/pos.mydomain/192.168.0.3 instead of address=/pos/192.168.0.3 works.

JakeTheSnake
  • 363
  • 1
  • 8
  • 19
1

For those still grappling with this problem: I had the same question and I solved this problem in Tomato (after a lot of trial and error) by adding the following to DHCP/DNS -> Dnsmasq Custom Configuration (where "computer" is the workstation; "dom" is the domain and "11.22.33.44" is the IP of the workstation):

local-ttl=1
expand-hosts
domain=dom
address=/computer.dom/11.22.33.44

The router's domain (in the Identification section) should be probably set as the same (in this case: dom) but not sure.

Now "ping computer" gets the correct reply from Dnsmasq.

0

My machines each have a hostname that they report, or you can set the hostname along with the static DHCP entry in Basic -> Static DHCP/ARP/IPT.

Then I have the domain set in the Basic -> Identification section.

The router resolves dns by hostname for machines on the network, even without the FQDN.

No extra manual config or scripts required.

Gavin S
  • 101
  • 1