Networking Forums

Networking Forums > Computer Networking > Linux Networking > DNS client does not sent any DNS request

Reply
Thread Tools Display Modes

DNS client does not sent any DNS request

 
 
Chen Zhigao
Guest
Posts: n/a

 
      09-12-2005, 10:54 AM
Hi folks,

I am building an embedded Linux settop box and try to install
networking packages as few as possible. I have installed the netbase,
netkit-inetd, netkit-ping and portmap packages from MontaVista.

The settop box, with the static IP of 10.10.10.100, is connected to my
desktop PC through a cross cable, which servers as a router to forward
the packages from/to the set-top box to/from the our LAN. The IP of my
desktop PC are 10.10.10.1 and 192.168.0.151. The LAN gateway's IP is
192.168.0.1.

Since my desktop PC use the LAN gateway as DNS server, I use it as the
DNS server for the set-top box also. The contents of the configuration
files on the box are:

# /etc/resolv.conf
search localdomain
nameserver 192.168.0.1

# /etc/host.conf
order hosts,bind
multi on

However, the set-top box can not ping any host on the Internet by DNS
name, although it can them ping by IP address. The error says "ping:
unknown host xxx.xxx.xx". Actually I can not capture any DNS request
sent out of the set-top box.

But nslookup works fine. And I am sure the LAN gateway allows the box
to request to resolve DNS, because nslookup tells me it use the gateway
as DNS server. I am still not able to ping a host by DNS even though I
install nslookup.

Do I miss some packages? Appreciate it if you could sheld some light?

Zhigao

 
Reply With Quote
 
 
 
 
Clifford Kite
Guest
Posts: n/a

 
      09-12-2005, 04:57 PM
Chen Zhigao <(E-Mail Removed)> wrote:
> Hi folks,


> I am building an embedded Linux settop box and try to install
> networking packages as few as possible. I have installed the netbase,
> netkit-inetd, netkit-ping and portmap packages from MontaVista.


> The settop box, with the static IP of 10.10.10.100, is connected to my
> desktop PC through a cross cable, which servers as a router to forward
> the packages from/to the set-top box to/from the our LAN. The IP of my
> desktop PC are 10.10.10.1 and 192.168.0.151. The LAN gateway's IP is
> 192.168.0.1.


> Since my desktop PC use the LAN gateway as DNS server, I use it as the
> DNS server for the set-top box also. The contents of the configuration
> files on the box are:


> # /etc/resolv.conf
> search localdomain
> nameserver 192.168.0.1


> # /etc/host.conf
> order hosts,bind
> multi on


> However, the set-top box can not ping any host on the Internet by DNS
> name, although it can them ping by IP address. The error says "ping:
> unknown host xxx.xxx.xx". Actually I can not capture any DNS request
> sent out of the set-top box.


> But nslookup works fine. And I am sure the LAN gateway allows the box
> to request to resolve DNS, because nslookup tells me it use the gateway
> as DNS server. I am still not able to ping a host by DNS even though I
> install nslookup.


Try adding the host route

route add 192.168.0.1 gw 10.10.10.1

on the set-top and the host route

route add 10.10.10.100 gw 192.168.0.151

to the gateway.

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      09-13-2005, 02:08 AM
In the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, Chen Zhigao wrote:

>I am building an embedded Linux settop box and try to install
>networking packages as few as possible. I have installed the netbase,
>netkit-inetd, netkit-ping and portmap packages from MontaVista.


I'm not familiar with the MontaVista packages, so I'm not sure what
all that includes and doesn't include.

>Since my desktop PC use the LAN gateway as DNS server, I use it as the
>DNS server for the set-top box also. The contents of the configuration
>files on the box are:
>
># /etc/resolv.conf
>search localdomain


The search term probably isn't useful.

>nameserver 192.168.0.1
>
># /etc/host.conf
>order hosts,bind
>multi on


OK - what about the file /etc/nsswitch.conf ? It is normally used with the
modern C libraries, and should have (among others) a line that reads

hosts: files dns

as a minimum. As you include portmap, you may also need the NIS setup,

hosts: files nisplus nis dns

See the man page.

>Actually I can not capture any DNS request sent out of the set-top box.
>
>But nslookup works fine.


mslookup (and dig, and dnsquery and host) are tools to query a name server.
That's all they do. Your applications use the resolver libraries, and part
of this is being able to query the /etc/hosts file, and perhaps the NIS
servers. They use a configuration file (/etc/host.conf under the older
libc5, /etc/nsswitch.conf under glibc2) to discover which source to use
when resolving names.

[compton ~]$ whatis nsswitch.conf
nsswitch.conf [nsswitch] (5) - System Databases and Name Service Switch
configuration file
[compton ~]$

/etc/host.conf is included in most installations for compatibility, though
I've forgotten what applications/libraries may still use it.

Old guy
 
Reply With Quote
 
Chen Zhigao
Guest
Posts: n/a

 
      09-13-2005, 11:01 AM
The set-top box has been able to reach 192.168.0.1, so the first route
you gave is not necessary and the problem does not go away.

The gateway is out of my control, I won't be able to add the second one
on the gateway route table. Even if I can do so, I think the problem is
not the ability for the gateway to reach the box but the incapability
for the box to send out DNS request.

 
Reply With Quote
 
Chen Zhigao
Guest
Posts: n/a

 
      09-13-2005, 11:32 AM
>OK - what about the file /etc/nsswitch.conf ? It is normally used with the
modern C libraries, and should have (among others) a line that reads
>hosts: files dns

My /etc/nsswitch.conf contains this line actually. I do not use NIS.

>mslookup (and dig, and dnsquery and host) are tools to query a name server.
>That's all they do. Your applications use the resolver libraries, and part
>of this is being able to query the /etc/hosts file, and perhaps the NIS
>servers. They use a configuration file (/etc/host.conf under the older
>libc5, /etc/nsswitch.conf under glibc2) to discover which source to use
>when resolving names.


I found there are a libnss_dns.so and a libresolv.so under glibc. After
I installed them, DNS starts working! Thanks a lot for the pointer.

 
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
How to force client to request new IP from DHCP? Joe Befumo Windows Networking 2 01-22-2007 02:05 PM
why does the XP client request a dns zone transfer? Meteor Windows Networking 1 02-22-2006 12:37 PM
client-proxy request headers noc-ops Linux Networking 0 05-14-2005 04:47 AM
NAT client ping request timed out jay Windows Networking 3 10-29-2004 09:10 PM
Web client plugin to see the request headers sent to server * Tong * Linux Networking 0 02-03-2004 03:16 PM



1 2 3 4 5 6 7 8 9 10 11