-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

06.10.2010 18:43, Lukas Macura wrote:
> If I understand it good, /etc/hosts has precedence in normal situation.
> This could be probably solved by nsswitch.conf, but it seems that it is
> not used in light dns resolver which is in OpenWrt.
> 

dnsmasq (which is used as lightweight caching dns resolver in OpenWRT)
translates non-fqdn /etc/hosts entries into DNS entries in so-called "local 
domain".

You may wish to test it: add something like this to the /etc/hosts:
8.8.8.8 ggldns

Then restart dnsmasq and try the following:

r...@dir320lx2home:/etc# ping ggldns.lan
PING ggldns.lan (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=54 time=73.723 ms
64 bytes from 8.8.8.8: seq=1 ttl=54 time=76.950 ms
^C
- --- ggldns.lan ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 73.723/75.336/76.950 ms

r...@dir320lx2home:/etc# ping ggldns.
PING ggldns. (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=54 time=73.045 ms
64 bytes from 8.8.8.8: seq=1 ttl=54 time=75.848 ms
^C
- --- ggldns. ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 73.045/74.446/75.848 ms

More info may be found in the dnsmasq documentation and by exploring OpenWRT
dnsmasq startup script.

P.S. In feature it might be wiser to ask questions non-related with the OpenWRT
development at the appropriate places like OpenWRT users mailing list, OpenWRT
forums, e.t.c.

- -- 
Best regards,
Alexey Loukianov                          mailto:[email protected]
System Engineer,                            Mob.:+7(926)218-1320
*nix Specialist

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMrasQAAoJEPB9BOdTkBULIzUH/1Br/88R5XcxvlXT4vohZa8b
BgeGSPpiGriNWCOs9VTLir5LFBBguKjVmVQWdjqv8GaHb4S5jNPcxBxvbIS/T+M7
1c/5BjYNp+uxTMrp/V4GH+2obGXhzzrwsjlRU1ifquqpiPViSab3hP8zYYAVIDfw
xeaMjMNNJQbQhFdxPpQhH6w1iRzulpwcRv49bRGEvhDtkX8Y+Wgci3dgha0AkBzM
ZXhcXOkz8EjbRNrcxLupFTTQSNiEdK5WFtZ+rYOYxG49EgjfS644+IM0RoobTtOf
ns5U8j69Rnun0Z5lcUq2W4iyk9CZQlPPGgAFRUGobE3X6pAsE13OW8p8d7TMP6k=
=9fSa
-----END PGP SIGNATURE-----
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to