From: Andreas Busse (andy@resi.waldorf-gmbh.de)
Date: 06/30/93


From: andy@resi.waldorf-gmbh.de (Andreas Busse)
Subject: Re: net-2 problems...
Date: 30 Jun 1993 12:28:36 GMT

In article <20eq57INN8eb@rave.larc.nasa.gov>, jcburt@gatsibm.larc.nasa.gov writes:
|> I ran into this problem myself, and it took me 2 days to figure out the problem.
|> If I did an ifconfig for "lo" (either before
|> or after doing an ifconfig for "eth0") *any* route I set using "route" would
|> *always* indicate "lo" as the interface (Iface field) regardless of if I explicitly
|> set the route to use a specific interface. i.e. if I had done
|> /etc/ifconfig lo localhost
|> /etc/ifconfig eth0 gats486 netmask 255.255.0.0
|> /etc/route add default eth0
|> and then queried the route tables with "route" I would get
|>
|> Kernel routing table
|> Destination net/address Gateway address Flags RefCnt Use Iface
|> default * U 0 154 lo
|>
|> *and* I would not get *any* connection to the network. This was the case
|> regardless of the order of the ifconfig statments. Most of the time it would
|> say "Network not reachable" even if I was trying to "ping" my own machine...
|>
|> commenting out the "/etc/ifconfig lo localhost" line cured the problem...
|> Seems "route" doesn't see the "interface" field properly...
|> Now, is this a feature, or is this a bug?
|>
> You *could* try changing the permissions on resolv.conf (I *think*) so that
|> non-root has read access. I had a similar problem...things worked fine for
|> root, but nothing for non-root. What happened was that if I (non-root) used
|> a machine name in a ping or whatever net command, nothing would happen and
|> *eventually* (go take a coffee break type of eventually) it would time out
|> saying it couldn't resolve the hostname. If I used the numeric address of the
|> machine instead of the machine name, everything worked fine...I noticed that
|> only root had read access to resolv.conf (which tells the system how to resolve
|> hostnames), so I changed the permission to give non-root read permission.
|> I don't know if this is the *correct fix, but it worked in my case...
|>
||> John
|> jcburt@gatsibm.larc.nasa.gov

I had the same problem. What I have done is:

ifconfig eth0 $IPADDR
add route default
ifconfig lo loopback
add route loopback

Where $IPADDR is your net-adress.

Andy