Subject: Re: network oddness
To: Brian H. Trammell <brian@altara.org>
From: Jonathan Marsden <Jonathan@XC.Org>
List: netbsd-help
Date: 08/21/1997 22:44:16
On 21 Aug 1997, Brian H. Trammell writes:

> starting network
> 
> followed by a delay of about a minute or a minute and a half. Then,
> 
> writing to routing socket: File exists
> add host talon: gateway localhost: File exists
> add net default 130.207.135.1
> 
> what file is it talking about here? can't find any reference to what
> file I need to work on to get rid of the minute...

The delay is probably a DNS configuration issue.  Is talon in
/etc/hosts correctly?  Is your /etc/resolv.conf looking in that file
before checking any nameservers?

The 'file exists' stuff seems to happen when adding routes, and is
harmless.  I wouldn't mind knowing the techie detailed explanation for
the warning myself, but I don't think it will help you find your
startup delay.

The delay is *before* that mesage pops out.  Most likely you are doing
something like:

    route add $hostname localhost

in /etc/netstart, and $hostname is talon.whatever.dom and that name is
either not in /etc/hosts or your resolver is not looking there first.

More generally, you can tell 'where to look' for boot time delays by
looking for the places in the boot scripts that emit the stuff like
'starting network'.  Something like

    grep "starting network" /etc/*

would find it for you, in /etc/rc just before it sources /etc/netstart.
Then you could go look at /etc/netstart and look for stuff happening
in there that might be delaying.  If necessary, insert a bunch of

  echo 'got to test point 1'

type stuff at various places in /etc/netstart so you can see just
where the delay lies. 

[Note: my experience is with NetBSD/i386, but I'd be surprised if its
networking startup scripts differ hugely from those in NetBSD/Sparc]

I'll be even more surprised if it is *not* the 'route add $hostname'
thing, and therefore a delay resolving the hostname (or trying and
failing to do so).  Check out DNS stuff for your own hostname; you'll
probably spot the cause.

Jonathan
--
Jonathan Marsden   | Internet: jonathan@xc.org  | Making electronic 
1849 N. Wabash Ave.| Phone: +1 (909) 794 1151   | communications work 
Redlands, CA 92374 | FAX:   +1 (909) 794 3016   | reliably for Christian 
USA                | http://www.xc.org/jonathan | missions worldwide