[plug] Interface not being brought up on bootup

Michael Hunt michael.j.hunt at usa.net
Mon Nov 10 15:00:49 WST 2003


On Mon, 2003-11-10 at 14:05, Cameron Patrick wrote: 
> On Mon, Nov 10, 2003 at 12:50:53PM +0800, Michael Hunt wrote:
> 
> | > | Again everything is exactly the same except ifconfig returns an error
> | > | after the 'ifconfig lo 127.0.0.1 up' line with the 'ifconfig: only one
> | > | address allowed for interface 'lo'' error.
> | > 
> | > Hmm.  So eth0 is being configured okay then?
> | 
> | No it comes back with a 'failed to connect to localhost:bootpc: Network
> | is unreachable
> 
> Sounds like it /would/ work if loopback was working then :-)  This is a
> good start...
> 
> The output of from 'strace ifconfig lo 127.0.0.1 up' and/or 'strace
> ifconfig lo down' could be helpful in seeing what ifconfig is trying to
> do, by the way.  For comparison:
> 
> 	http://cp.yi.org/cameron/ifconfig_lo_down.txt
> 	http://cp.yi.org/cameron/ifconfig_lo_up.txt
> 
> And try what Bernard suggested with "ip".  (apt-get install iproute if
> it isn't installed.)

Ok. I'm having some success as I'm now writing this from the workstation
that is having the problems. After downloading a copy of iproute to
another machine and installing it on this workstation I created the
following network.sh script that seems to get networking working. Here
is what it contains :- 

<snipped from network.sh>

ip addr ls
ip link set lo down #Precautionary. Make sure it is down
ip link set lo up
ip addr add dev lo local 127.0.0.1/8
ip link set eth0 down #Precautionary. Make sure it is down
ip link set eth0 up
ip addr add dev eth0 local 192.168.11.101/24
ip route add default via 192.168.11.254
ip addr ls

</snip>

This is what I found I needed to do to get it working. Since this is my
first foray using ip rather than the ifconfig utils I'm not sure if all
the syntax is exactly right, however it has networking back up and
working (thanks Bernard).

This is what is returned by the script :-

Before (First 'ip addr ls')
1: lo: <LOOPBACK> mtu 16436 qdisc noop 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 100
    link/ether 00:60:97:20:3a:43 brd ff:ff:ff:ff:ff:ff

After (Second 'ip addr ls')
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:60:97:20:3a:43 brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.101/24 scope global eth0

I ran ifconfig to see what it reported after the above (before came back
with nothing) and this is what I got.

'ifconfig' after running network.sh
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436
          txqueuelen:0

eth0      Link encap:Ethernet  HWaddr 00:60:97:20:3A:43
          inet addr:192.168.11.101  Bcast:0.0.0.0  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500
          txqueuelen:100

I'll reboot and do an strace in a minute. 

> | This is the one thing I hate about IT work is that sometimes the
> | shortest path to fixing the problem is the one that is least helpful
> | diagnosing what the problem was. Rebuilding for me is just a quick (well
> | not so quick) and dirty way to getting the thing working again.
> 
> Yeah, fair enough.  I still reckon that you're close to finding the
> problem.  Rebuilding could take the better part of a day, your system
> wouldn't be quite the same as it was, and you'd still not know what your
> original problem was caused by.
> 
> | Really appreciating everyone's help.
> 
> Yer welcome (-:
> 
> Cameron.


_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list