Opened 5 years ago

Last modified 5 years ago

#13022 new defect

can't reach lan hosts via DNS name without local domain suffix: resolver issue

Reported by: christian.hesse@… Owned by: developers
Priority: normal Milestone:
Component: base system Version: Attitude Adjustment 12.09 Beta
Keywords: resolver, resolv.conf, local domain suffix Cc:


Attitude Adjustment 12.09-rc1

On command line of OpenWRT, I always have to give "hostname.localdomain" to reach a client with static IP defined as custom domain or even the router itself. Only "hostname" does not work. Reaching DHCP clients only by hostname works ok.

For example, my router's hostname is "router"


and my local domain is "box"


Pinging router on the console, I get the following:

BusyBox v1.19.4 (2012-11-18 02:19:39 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

root@router:~# ping router
ping: bad address 'router'
root@router:~# ping
PING ( 56 data bytes
64 bytes from seq=0 ttl=64 time=0.484 ms

On any other client in the network - linux and windows - both variants work ok.

If I understand the system correctly, that should be configured by /etc/resolv.conf, which in my eyes looks correct:

root@router:~# cat /etc/resolv.conf
search box

Attachments (0)

Change History (2)

comment:1 follow-up: Changed 5 years ago by anonymous

in /etc/config/dhcp;
config dnsmasq

option domainneeded '0'

should fix it.

comment:2 in reply to: ↑ 1 Changed 5 years ago by christian.hesse@…

I don't think this the right place to tweak.

Since every other system (linux glibc and windows) in this network works ok, I don't think it's an issue of the dhcp/dns server. It's an issue in the network client part of openwrt.

In the same network, I have also a "dumb ap" openwrt devices which doesn't run dnsmasq at all, and here I have the same issue.

I tried some debugging, but this is a tough one. I think the issue is originated in uClibc.

At every other system I tried, the default behaviour is, that a dnslookup for "host" is never forwarded to the dns server on the router, but is always completed first to "host.localdomain" before it's queried even for the first time. But openwrt sends out just "host" and doesn't even bother to send "host.localdomain" on a maybe second try.

I found this:
and this:

Looking in the trunk source, the proposed patch didn't make it into the release. Reading and trying to understand that patch, I personally don't think it would supply the same behaviour which any other system shows. It would rather try "host" and then "host.localdomain" than going directly to "host.localdomain".

I still don't see the full picture, so help would be appreciated.

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.