(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) System Configuration : (Category) Networking :
"Network unreachable" when using ping/telnet/tcp on localhost
I had a problem where I was able to telnet/ping/whatever any other
computer, and any other computer could telnet/ping/whatever me,
but I couldn't telnet/ping/whatever myself; it would say,
"Network unreachable".

---
When the version of the MkLinux server changed from 1.2.13 to
2.0.x, there was a slight change in the handling of the loopback
device.  Some of the more modern "setnet" scripts handle this
correctly.  However, often when you upgrade from the older 1.2.13
server (for instance, the server that came with DR2), there are
problems with the setup for the loopback device.

The problem is with the files:
	/etc/sysconfig/network-scripts/ifcfg-lo0
	/etc/sysconfig/network-scripts/ifup-lo

Here is what these files should have in them:
----- BEGIN /etc/sysconfig/network-scripts/ifcfg-lo0 -----
#!/bin/sh

#>>>Device type: loopback

#>>>Variable declarations:
IPADDR=127.0.0.1
NETWORK=127.0.0.0
DEVICE=lo
ONBOOT=yes
#>>>End variable declarations
----- END /etc/sysconfig/network-scripts/ifcfg-lo0 -----
----- BEGIN /etc/sysconfig/network-scripts/ifup-lo -----
#!/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin

. $1

if [ "foo$2" = "fooboot" -a ${ONBOOT} = "no" ]
then
    exit
fi

ifconfig ${DEVICE} ${IPADDR}
route add -net ${NETWORK}
----- END /etc/sysconfig/network-scripts/ifup-lo -----

Make these changes to the files, pay particular attention to the
lines that have "NETWORK" in them, as they are the new/changed ones
from the "old way".

Reboot, and your loopback device should be operational.

Gilbert Coville -- coville@apple.com
coville@apple.com
I keep getting "Network unreachable" even though I have edited the ifcfg-eth0 file with the correct network information for my network.  Am I missing something?
kei@yahoo.com
[Append to This Answer]
Next: (Answer) My network is working, but why does "route" give me weird numbers?
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=4
[Search] [Appearance]
This is a Faq-O-Matic 2.717d.
Hosted by anduin.org and SourceForge Logo