Setting up of local resolver - Networking
This is a discussion on Setting up of local resolver - Networking ; Hi!
I have a SLES9.3 server which is connected to small network without
any DNS server. However the server has to be able to reolve its short
name or FQDN. I configured my /etc/hosts as
192.168.0.19 bld04.my-fake-domain.com bld04
/etc/nsswitch.conf and ...
-
Setting up of local resolver
Hi!
I have a SLES9.3 server which is connected to small network without
any DNS server. However the server has to be able to reolve its short
name or FQDN. I configured my /etc/hosts as
192.168.0.19 bld04.my-fake-domain.com bld04
/etc/nsswitch.conf and /etc/host.conf contains
hosts: files
and
order hosts
correspondingly. So I expect my local resolver uses only local files
instead of connectimg to remote DNS server, that is following command
should be successfull:
$ host `hostname`
;; connection timed out; no servers could be reached
(hostname returns correct name). But it fails. I see in tcpdump log:
bld04:~ # tcpdump -vvv -n udp -i lo
tcpdump: listening on lo, link-type EN10MB (Ethernet),
capture size 96 bytes
02:53:54.968413 IP (tos 0x0, ttl 64, id 0, offset 0, flags
[DF], length: 75) 127.0.0.1.32768 >
127.0.0.1.53: [bad udp cksum 357e!] 34876+ A? bld04.rstl-
private.ru.ibm.com. (47)
02:53:59.969851 IP (tos 0x0, ttl 64, id 1, offset 0, flags
[DF], length: 75) 127.0.0.1.32768 >
127.0.0.1.53: [bad udp cksum 357e!] 34876+ A? bld04.rstl-
private.ru.ibm.com. (47)
Why it tries to connect to DNS server, moreover to local server? What
I forgot to configure?
-
Re: Setting up of local resolver
Alexander Krizhanovsky wrote:
> Hi!
>
> I have a SLES9.3 server which is connected to small network without
> any DNS server. However the server has to be able to reolve its short
> name or FQDN. I configured my /etc/hosts as
>
> 192.168.0.19 bld04.my-fake-domain.com bld04
>
> /etc/nsswitch.conf and /etc/host.conf contains
>
> hosts: files
>
> and
>
> order hosts
>
> correspondingly. So I expect my local resolver uses only local files
> instead of connectimg to remote DNS server, that is following command
> should be successfull:
>
> $ host `hostname`
> ;; connection timed out; no servers could be reached
Well, "host" does DNS lookups (see "man host"). The file
"/etc/resolv.conf" will tell it which DNS server to use, otherwise it
will use a local server by default.
Robert
>
> [snip'
-
Re: Setting up of local resolver
On 27 , 19:22, Robert Harris
wrote:
> Well, "host" does DNS lookups (see "man host"). The file
> "/etc/resolv.conf" will tell it which DNS server to use, otherwise it
> will use a local server by default.
Ok. I cleaned up whole /etc/resolv.conf, also I tried to remove it --
the same result....
-
Re: Setting up of local resolver
Alexander Krizhanovsky wrote:
> On 27 , 19:22, Robert Harris
> wrote:
>> Well, "host" does DNS lookups (see "man host"). The file
>> "/etc/resolv.conf" will tell it which DNS server to use, otherwise it
>> will use a local server by default.
>
> Ok. I cleaned up whole /etc/resolv.conf, also I tried to remove it --
> the same result....
>
You need to specify what your problem is.
-
Re: Setting up of local resolver
Thank you for the replies!
On 30 , 14:19, Robert Harris
wrote:
> You need to specify what your problem is.
Well. Try to explain better.
When I run host `hostname` I see in tcpdump DNS requests to local
machine (requests on loopback interface), but comman returns with
error meassage. I configured /etc/hosts, /etc/nsswitch.conf, /etc/
resolv.conf and /etc/host.conf (see first message), but my local
resolver (resolver on local files) still doesn't work.
I need to configure resolver for work with local files only because I
haven't real DNS server in my network.
-
Re: Setting up of local resolver
On Mon, 30 Jul 2007 05:29:12 -0700, Alexander Krizhanovsky
wrote:
> When I run host `hostname` I see in tcpdump DNS requests to local
> machine (requests on loopback interface), but comman returns with
> error meassage.
That would be because "host" _always_ uses DNS. It does not ever use
/etc/hosts and there is no way to make it do so. It is after all a tool
for testing DNS. If you must have it working then you need to set up a
local DNS or point /etc/resolv.conf to a working DNS.
If you just want to see if your setup is right, try another program like
"ping". It should use local files first.
--
-| Bob Hauck
-| "Reality has a well-known liberal bias." -- Stephen Colbert
-| http://www.haucks.org/
-
Re: Setting up of local resolver
On 30 , 17:44, Bob Hauck wrote:
> That would be because "host" _always_ uses DNS. It does not ever use
> /etc/hosts and there is no way to make it do so. It is after all a tool
> for testing DNS. If you must have it working then you need to set up a
> local DNS or point /etc/resolv.conf to a working DNS.
>
> If you just want to see if your setup is right, try another program like
> "ping". It should use local files first.
Thank you very much for the kindly answer!