Main Page | Report this Page
 
   
Linux Forum Index  »  Linux Networking  »  SIOCADDRT: No such device when setting lo
Page 1 of 1    
Author Message
Joel Kreager
Posted: Sun Feb 13, 2005 6:59 pm
Guest
I have been trying to set up a local network to bridge through my dsl
connected computer. I am running redhat 9 but with a 2.6.10 kernel on
my main computer. Since I could not get any ping to return from my
second computer when pinging first, (I tried many things), I turned
off all the network setup /etc/sysconfig/network to off to do
everything by hand. (An emergency linux disk did return pings from
the second computer, but redhat 9 did not). When I run:

/sbin/ifconfig lo 127.0.0.1

I get:

[veryfine:~]# /sbin/ifconfig lo
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:29 (29.0 b) TX bytes:29 (29.0 b)

But when I run:

/sbin/route add 127.0.0.1

I get:

SIOCADDRT: No such device

I can run:

/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 gw 127.0.0.1

successfully, but I can't ping localhost.

Don't know if this is the reason I can't get a return from the redhat
host when I ping from my second computer, but I am suspicious.
Floyd L. Davidson
Posted: Sun Feb 13, 2005 9:45 pm
Guest
Joel Kreager <jkreager@blarg.net> wrote:
Quote:
I have been trying to set up a local network to bridge through my dsl
connected computer. I am running redhat 9 but with a 2.6.10 kernel on
my main computer. Since I could not get any ping to return from my
second computer when pinging first, (I tried many things), I turned
off all the network setup /etc/sysconfig/network to off to do
everything by hand. (An emergency linux disk did return pings from
the second computer, but redhat 9 did not). When I run:

/sbin/ifconfig lo 127.0.0.1

I get:

[veryfine:~]# /sbin/ifconfig lo
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:29 (29.0 b) TX bytes:29 (29.0 b)

But when I run:

/sbin/route add 127.0.0.1

I get:

SIOCADDRT: No such device

Since you didn't give a device name, it is using "" for the name.
Read the man pages for ifconfig and route. Then try these steps in turn:

/sbin/ifconfig lo 127.0.0.1

# These are just for information:
/sbin/ifconfig lo
/sbin/route

ping 127.0.0.1 # Works because ifconfig sets a subnet route.

Quote:
I can run:

/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 gw 127.0.0.1

If you have deleted the route that ifconfig provided, the command
to put it back is

/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 dev lo

You certainly don't need a gatway! But you do need to tell it which
interface the route applies to...

Quote:
successfully, but I can't ping localhost.

Don't know if this is the reason I can't get a return from the redhat
host when I ping from my second computer, but I am suspicious.

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@barrow.com
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Mon Sep 08, 2008 4:27 am