Subject: Re: Problems with NetBSD 1.5 on static routed LAN
To: netbsd-help list <netbsd-help@netbsd.org>
From: Will Roberts <oldbear@arctos.com>
List: netbsd-help
Date: 07/30/2001 15:40:29
On Sat, Jul 28, 2001 at 09:29:28PM -0400, I wrote:
> 
>> I have NetBSD set up [on a SPARC IPC] and able to ping machines 
>> both on the LAN and outside -- for a while.  After some period of time, 
>> say 30 minutes or so, I can no longer ping anything outside (even 
>> by numeric IP) and the problem is solved only when I stop and restart 
>> the NAT software on the gateway machine.

Manuel Bouyer <bouyer@antioche.lip6.fr> replied:
>
>Did you try a 'ping -n <IP>' ? Even if you give an IP addr, ping will
>try a DNS lookup to get the name.

This, surprisingly, appears to have been the problem.  My ISP provides 
three IP addresses which it routes to various nameservers on its 
network.  The primary nameserver is slow to respond (several seconds) 
and it was not that I was unable to ping across my NAT gateway, but 
that the delay in my sending the first ping was excessively long.

The interesting part of this is that the command "route show" would 
also pause at the beginning of the IPv6 routing table for a similar 
delay -- which suggests that "route show" also may be enquiring of 
the primary nameserver.

Once I swapped the order of the primary and secondary nameservers 
in resolv.conf, the problem went away.


"Paul (NCC/CS)" <pts@bom.gov.au> replied:

> I just wanted to say that I have had various strange DNS problems
> with my NetBSD 1.5 gateway box for my home LAN also.
> It all seemed to work in a basic sense but it would take ages to
> resolve domain names outside of my home domain. Then when it
> did resolve to get the IP address the connection would work in fits
> and starts. ie It would start then stall for 15 seconds then start
> again. This happened with ping or the web browser. I had checked
> over my entire networking setup several times. And it used to
> work when I had FreeBSD doing this job. Anyway I switched to
> using the host file and the ISP nameserver and turned the local
> DNS named off. ie the simple way. And everything burst to life,
> that is the pings and web came steady and strong with no stalling.
> Anyway I've had this and other strange DNS hassles with 1.5
> over the past months. I didn't know if I should suspect 1.5 or if
> it was just something in my DNS setup. If anyone else has similar
> problems perhaps post them so we know. If it's just Will and I,
> then it's probably our individual setups, else a bug?

It's still unclear to me why NetBSD exhibits this behavior while 
Redhad linux, Solaris, and MSwin95 do not.  I had guessed that it had 
something to do with the IPv6 implementation because of the way 
the command "route show" seemed to hang in the IPv6 part of the 
routing table.  Also, I can't explain why stopping and restarting 
the software on the NAT gateway machine would immediately fix the 
problem -- for a while.

My thanks to both Manuel and Paul for their replies which pointed me
in the right direction to solve my problem.

Regards,
Will
The Old Bear