[comp.sys.apollo] TCP Hostname Resolving - 10.2/BSD

SRFERGU%ERENJ@PUCC.PRINCETON.EDU (Scott Ferguson) (11/01/90)

I've got a 10.2 machine with bsd and aegis combo on it, and I'm having
a bizarre problem with resolving hostnames from /etc/hosts


There's a network host that's number is 126.0.0.1, and its name is 'gateway1'.
If I type:

     % rlogin gateway1
It tries and times out, no connection.

If I type:

    % rlogin 126.0.0.1
It immediately connects.

If I try to access a node that requires a few gateway hops, I always get the
'network unreachable', although routed is running, etc.

Anyone familiar with this?
Thanks,
Scott Ferguson
srfergu@erenj.bitnet

thompson@PAN.SSEC.HONEYWELL.COM (John Thompson) (11/02/90)

> I've got a 10.2 machine with bsd and aegis combo on it, and I'm having
> a bizarre problem with resolving hostnames from /etc/hosts
> 
> There's a network host that's number is 126.0.0.1, and its name is 'gateway1'.
> If I type:
> 
>      % rlogin gateway1
> It tries and times out, no connection.
> 
> If I type:
> 
>     % rlogin 126.0.0.1
> It immediately connects.
1) Check the /etc/hosts file for gateway1 (fpat or grep).  The first entry
   is the address that the name will resolve to.  You might have more than one.
2) The /etc/hosts.dir and /etc/hosts.pag files may be out-of-date / corrupt.
   If they exist, they're used for quick, hashed-entry access to addresses.
   I'm not sure whether they access the /etc/hosts or not.
3) If you're using name-server resolution (/etc/nmconfig -hostent_bind)
   the name-server may be what you can't access.  Check for a file /etc/resolv.conf
   file on your node, and/or /etc/named running.  From there, figure out what
   machine you're using for name-service (if you are using any).

> If I try to access a node that requires a few gateway hops, I always get the
> 'network unreachable', although routed is running, etc.
Check your routing tables with '/usr/ucb/netstat -r' or '/com/tcpstat -r'.  Just
because routed is running doesn't mean that routes are there.  Also check out
your tcp address (probably '/etc/ifconfig dr0' if you're on token ring) and
subnet masking (if any).  


Good Luck --

John Thompson (jt)
Honeywell, SSEC
Plymouth, MN  55441
thompson@pan.ssec.honeywell.com

As ever, my opinions do not necessarily agree with Honeywell's or reality's.
(Honeywell's do not necessarily agree with mine or reality's, either)

krowitz@RICHTER.MIT.EDU (David Krowitz) (11/02/90)

Check your /etc/hosts file ... gateways usually have two entries
in the file -- one for each network attached. Unfortunately, it
seems that the routines which return the IP number for a given
hostname stop as soon as they find *any* *single* entry which
matches the given name. If the first entry in /etc/hosts is for
the IP number of the network other than the one to which your
local machine is attached, that is the IP number which will be
returned for the machine ... and you will not know how to reach
that network (especially since routed will tell you that to reach
that network, you want to forward via the gateway, whose IP address
is on the network you want to reach ... I love circular definitions!).


 -- David Krowitz

krowitz@richter.mit.edu   (18.83.0.109)
krowitz%richter.mit.edu@eddie.mit.edu
krowitz%richter.mit.edu@mitvma.bitnet
(in order of decreasing preference)