Re: DNS and router



On Mon, 18 Dec 2006, in the Usenet newsgroup comp.os.linux.networking, in
article <em5mj9$66f$1@xxxxxxxxxxxxxxxxxxxxxx>, AAW wrote:

OK, I can ping computers on the Internet from my laptop via my router. I
can resolve names from my server.

You do not have a routing problem. If you did, you would not be able
to ping computers on the Internet from the laptop.

However, I can?t resolve names on my laptop.

Then the nameserver setup ON THE LAPTOP is incorrect. Either, it is
trying to ask the "wrong" nameserver, or it does not know about
name servers. So, your next task is to look on the laptop in the
files /etc/resolv.conf and /etc/nsswitch.conf and /etc/host.conf
and compare these to the files on your router. /etc/resolv.conf should
have one to three 'nameserver' lines. Normally, I do NOT recommend using
either a 'search' or 'domain' line in this file. For the other two:

[compton ~]$ grep host /etc/host.conf /etc/nsswitch.conf
/etc/host.conf:order hosts,bind
/etc/nsswitch.conf:hosts: files nis dns
[compton ~]$

<< Sniff all of the traffic on the eth2 side. >>

Sorry, didn?t get as far as checking the eth2 side. However, If I do an
enquiry from my laptop I get no activity on eth1 on my server but I do
get activity if I ping from the server.

Check those three files.

<< You are using two RFC1918 network addresses (192.168.0.x and
192.168.1.x).
Does the modem connected to eth1 know of the existence of 192.168.1.x?
Does it know how to reach the laptop? (There has to be an entry in it's
routing table with your 'router' listed as the gateway to this network,
OR your router must be doing proxyarp).>>

Sorry, didn?t get as far as that either but if I can ping from the
laptop can I assume that the modem side is OK or will I still need to
check this anyway?

As you can ping _from_the_laptop_ to the Internet, this is not a problem.

Here is the results of the ping from the laptop -> sever -> internet as
seen of eth1 on the server:

15:17:51.391632 IP mirror.hiwaay.net.http > 192.168.0.2.44452: F
4246479124:4246479124(0) ack 2319821004 win 54 <nop,nop,timestamp
3541865095 156846>

This isn't a ping - the is a packet from a web server to a client.

15:17:51.393091 IP 192.168.0.2.filenet-cm >
resolver1-na-fo.skanova.com.domain: 42557+ PTR?
2.0.168.192.in-addr.arpa. (42)

A DNS query from 192.168.0.2 port 32773 (a client port) to a name server.
The question is "who is 2.0.168.192.in-addr.arpa" (192.168.0.2)?

15:17:51.416866 IP resolver1-na-fo.skanova.com.domain >
192.168.0.2.filenet-cm: 42557 NXDomain* 0/1/0 (105)

Reply from the name server. "2.0.168.192.in-addr.arpa" does not exist.

15:17:51.417442 IP 192.168.0.2.filenet-cm >
resolver1-na-fo.skanova.com.domain: 30817+ PTR?
217.99.180.216.in-addr.arpa. (45)

A DNS query from 192.168.0.2 port 32773 (a client port) to a name server.
The question is "who is "217.99.180.216.in-addr.arpa"?

15:17:51.431739 IP 192.168.0.2.44452 > mirror.hiwaay.net.http: . ack 1
win 32425 <nop,nop,timestamp 160428 3541865095>

Client back to some webserver - not part of this conversation

15:17:51.698821 IP resolver1-na-fo.skanova.com.domain >
192.168.0.2.filenet-cm: 30817 1/2/2 (144)

Reply from the name server. This doesn't show the detail, but the name
server answered the question ("1/2/2" = 1 answer, 2 authority, 2 other
records).

15:17:51.699510 IP 192.168.0.2.filenet-cm >
resolver1-na-fo.skanova.com.domain: 35461+ PTR?
42.199.67.195.in-addr.arpa. (44)
15:17:51.724056 IP resolver1-na-fo.skanova.com.domain >
192.168.0.2.filenet-cm: 35461 1/2/2 (161)

Another DNS query and reply.

15:17:52.539797 IP 192.168.0.2.49788 > mirror.hiwaay.net.http: FP
2180330594:2180330751(157) ack 4129630804 win 16022 <nop,nop,timestamp
160705 3541834962>

Client back to some webserver - not part of this conversation

15:17:53.693365 IP 192.168.0.2 > pat.uio.no: ICMP echo request, id
47125, seq 0, length 64

Ping _to_ pat.uio.no

15:17:53.693819 IP 192.168.0.2.filenet-cm >
resolver1-na-fo.skanova.com.domain: 14109+ PTR?
15.10.240.129.in-addr.arpa. (44)
15:17:53.719889 IP resolver1-na-fo.skanova.com.domain >
192.168.0.2.filenet-cm: 14109 1/3/3 (184)

Another DNS query and reply.

15:17:53.729332 IP pat.uio.no > 192.168.0.2: ICMP echo reply, id 47125,
seq 0, length 64

Ping reply _from_ pat.uio.no

[Two more pings and replies - working normally]

All of this shows normal operation. The only problem was the query to the
nameserver for '2.0.168.192.in-addr.arpa'. This is a RFC1918 address
(192.168.0.2) and a public name server won't know the answer. As this
seems to be your address, this should normally be solved by have this
data in the '/etc/hosts' files in the form

192.168.0.2 full.name.of.this.host shortname

with the 'shortname' not absolutely required but recommended. As an
alternative, your caching name server should be configured to be
authoritative for this address and your local domain. This is covered
in the 'DNS-HOWTO'.

Old guy
.



Relevant Pages