Networking Forums

Networking Forums > Computer Networking > Linux Networking > Setting up of local resolver

Reply
Thread Tools Display Modes

Setting up of local resolver

 
 
Alexander Krizhanovsky
Guest
Posts: n/a

 
      07-27-2007, 02:58 PM
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?

 
Reply With Quote
 
 
 
 
Robert Harris
Guest
Posts: n/a

 
      07-27-2007, 03:22 PM
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'

 
Reply With Quote
 
Alexander Krizhanovsky
Guest
Posts: n/a

 
      07-30-2007, 08:48 AM
On 27 , 19:22, Robert Harris <robert.f.har...@blueyonder.co.uk>
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....

 
Reply With Quote
 
Robert Harris
Guest
Posts: n/a

 
      07-30-2007, 10:19 AM
Alexander Krizhanovsky wrote:
> On 27 , 19:22, Robert Harris <robert.f.har...@blueyonder.co.uk>
> 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.
 
Reply With Quote
 
Alexander Krizhanovsky
Guest
Posts: n/a

 
      07-30-2007, 12:29 PM
Thank you for the replies!

On 30 , 14:19, Robert Harris <robert.f.har...@blueyonder.co.uk>
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.

 
Reply With Quote
 
Bob Hauck
Guest
Posts: n/a

 
      07-30-2007, 01:44 PM
On Mon, 30 Jul 2007 05:29:12 -0700, Alexander Krizhanovsky
<(E-Mail Removed)> 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/
 
Reply With Quote
 
Alexander Krizhanovsky
Guest
Posts: n/a

 
      07-30-2007, 04:05 PM
On 30 , 17:44, Bob Hauck <postmas...@localhost.localdomain> 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!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting up a local network lesley_b_linux@yahoo.co.yuk Linux Networking 1 11-01-2004 02:47 PM
dns resolver tool Tony Linux Networking 6 10-09-2004 08:11 PM
DNS Resolver Ross Windows Networking 1 01-23-2004 11:26 PM
Ibook and iMac - setting up local network Perinouk Home Networking 0 11-16-2003 04:24 PM
dns resolver danny tew Windows Networking 0 10-24-2003 05:45 PM



1 2 3 4 5 6 7 8 9 10 11