Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-11 Thread Vincent Lefevre
On 2007-07-10 15:09:25 -0600, Bob Proulx wrote:
   but I think that maybe you simply need to remove all of the 'auto'
   and 'allow-hotplug' lines from the file. Then it won't be started
   automatically.
  
  But I want it to be started automatically on some networks. This is
  very important as I don't always have physical access to my machine.
 
 Personally I think *only* starting it on networks that will use it
 makes more sense than *always* starting it and killing it off if the
 configuration decides this is not a dhcp network.

This is exactly what my interfaces file does:

auto eth0 eth1

mapping eth*
  script /usr/local/sbin/map-scheme

iface eth-casc inet static
  address 83.149.208.176
  netmask 255.255.255.192
  broadcast 83.149.208.191
  gateway 83.149.208.129

iface eth-dhcp inet dhcp

iface eth-ensl inet dhcp

iface eth-loria inet dhcp

iface eth-nerim inet static
  address 192.168.0.3
  netmask 255.255.255.0
  gateway 192.168.0.1

iface eth-uka inet static
  address 172.20.22.84
  netmask 255.255.248.0
  broadcast 172.20.23.255

The suffix (casc, dhcp, etc.) is obtained from netenv. On the other
networks (i.e. other suffixes), there's no mapping iface, i.e. the
Ethernet card is not used. (Note: I use auto eth0 eth1 because the
device name depends on the kernel version, and the map-scheme script
looks at the MAC address to decide which one should be used.)

  But if a DHCP client is still running (from the previous
  environment), it reconfigures the network interface.  I've already
  had this problem, so I know I must kill the DHCP client.
 
 This sounds like new information.  I am used to always getting to a
 clean state and then moving through the state diagram to the desired
 state for that network.

Well, killing the DHCP client is a way to have a clean state before
reconfiguring the network.

  Also, even if DHCP is always used, letting the network to be reconfigured
  automatically when switching network may lead to lost mail for instance,
  due to race condition. The correct steps are:
  
  1. Bring the network interface down.
  2. Update various configuration files (e.g. the new smarthost for the
 mail).
  3. Bring the network interface up.
  
  in this order. If step 2 is done after step 3, problems can occur.
 
 I believe that is fairly standard in Etch.  See the /etc/network/*.d/*
 files for postfix for example.

Unfortunately, exim4[*] doesn't have anything in these directories.
Now, I don't think they will solve the problem I've described: if
the DHCP client detects a different server and reconfigures the
interface, it will not run the scripts from the /etc/network/*.d/*
directories (because it works at another level), will it?

[*] which I use because this is (was) the default on Debian.

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-10 Thread Vincent Lefevre
On 2007-07-03 17:33:46 -0600, Bob Proulx wrote:
 Vincent Lefevre wrote:
  But then, I don't see why I should use 'allow-hotplug eth0' instead of
  'auto eth0'.
 
 It is not required to use allow-hotplug but that is the new way of
 doing things.  The new debian-installer will set things up with
 allow-hotplug.  Then machines such as laptops with a pcmcia slot or
 usb device can have network devices go online and offline in a nice
 hotplug fashion.  Same for any other hotpluggable device.

There seems to be a difference. When I used 'allow-hotplug eth0', pump
was no longer running. I've done the same test with 'auto eth0' (i.e.
boot with the network cable unplugged, then plugged it in again), and
'pump -i eth0' was still running... but after 5 minutes, the interface
was still down. 'pump -i eth0 --status' was saying 'Operation failed.'
(at boot time, this was normal since the cable was unplugged, but this
doesn't explain why it was still saying that more than 5 minutes after
plugging in the cable). Running 'pump -i eth0' brought the interface
up.

So,

1. 'allow-hotplug ath0' doesn't seem to work (either it doesn't start
   pump or it kills it), but I doubt that pump is the cause since it
   is still running if I use 'auto eth0'.

2. There's a bug in pump, as it doesn't seem to try again if DHCP is
   available.

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-10 Thread Bob Proulx
Vincent Lefevre wrote:
 Bob Proulx wrote:
  That bug may still be open but I have never seen it in any
  configuration.  I think that bug may no longer be there but no one has
  verified it to root cause and so it has not been closed.  There is no
  discussion after the first report.  Is anyone else seeing that bug?  I
  would guess not.
 
 I saw it 3 years later. See the merged bug 208605
 
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208605
 
 where there is a discussion.

Good information.  Thanks for posting that pointer.

 It may be enough if you always use DHCP. But there are still networks
 without DHCP.

Of course.

  The Etch default is to use network-manager to bring network devices
  online.  See /usr/share/doc/network-manager/README.Debian for full
  details.
 
 I don't want something graphical.

Being a non-graphical person myself I can't argue with that.

 Description: Configure your system for different network environments

There are actually a large number of network configuration packages
and they have pluses and minuses to each of them.  I don't think there
is one size fits all for any of them.  Some will intrinsically work
better in some situations than others will.

  but I think that maybe you simply need to remove all of the 'auto'
  and 'allow-hotplug' lines from the file. Then it won't be started
  automatically.
 
 But I want it to be started automatically on some networks. This is
 very important as I don't always have physical access to my machine.

Personally I think *only* starting it on networks that will use it
makes more sense than *always* starting it and killing it off if the
configuration decides this is not a dhcp network.  However it is just
a program and if killing it off works better for you then go for it.

 The netenv utility allows that.

Sounds good.

  Then you won't have to kill the dhcp clients.
 
 This is unfortunately wrong. As I've said, there are networks without
 DHCP (or one which I don't want to use), on which I need to use
 iface ... inet static.

As stated I disagree that it is wrong.  If you need it then run it.
If you don't need it then don't run it.  In your case if you want to
start it then decide it needs to be stopped then okay too.  Browsing
through the alternative packages that are available will show that
many people have different ideas on the best way to get the job done.

 But if a DHCP client is still running (from the previous
 environment), it reconfigures the network interface.  I've already
 had this problem, so I know I must kill the DHCP client.

This sounds like new information.  I am used to always getting to a
clean state and then moving through the state diagram to the desired
state for that network.  Dragging forward a previous state would be
different.  But I don't think it is worth hashing out the details
here.  You understand what is going on for your situation.  I think
you have it working for you.  Life sounds good!  :-)

 Also, even if DHCP is always used, letting the network to be reconfigured
 automatically when switching network may lead to lost mail for instance,
 due to race condition. The correct steps are:
 
 1. Bring the network interface down.
 2. Update various configuration files (e.g. the new smarthost for the
mail).
 3. Bring the network interface up.
 
 in this order. If step 2 is done after step 3, problems can occur.

I believe that is fairly standard in Etch.  See the /etc/network/*.d/*
files for postfix for example.

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-09 Thread Vincent Lefevre
On 2007-07-03 17:44:03 -0600, Bob Proulx wrote:
 Vincent Lefevre wrote:
  The problem with dhclient is that it disconfigures the loopback
  interface under some conditions. A bug is still open after 7 years!
  
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=65718
 
 That bug may still be open but I have never seen it in any
 configuration.  I think that bug may no longer be there but no one has
 verified it to root cause and so it has not been closed.  There is no
 discussion after the first report.  Is anyone else seeing that bug?  I
 would guess not.

I saw it 3 years later. See the merged bug 208605

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208605

where there is a discussion.

  Also I need to control whether a DHCP client is running or not,
 
 Hmm...  Usually saying 'iface eth0 inet dhcp' is enough.  When
 ifupdown runs it will automatically start the installed dhcp client.
 For me when I did not want that I simply did not configure that device
 as an 'auto' device and then I could control it completely.

It may be enough if you always use DHCP. But there are still networks
without DHCP.

 The Etch default is to use network-manager to bring network devices
 online.  See /usr/share/doc/network-manager/README.Debian for full
 details.

I don't want something graphical.

  because on another machine (a laptop) I use netenv and DHCP is not
  used on some networks (BTW, I've already have a killall pump in
  my netenv scripts on this laptop, and I could probably do the same
  thing with dhclient).
 
 I have not used netenv and I don't know about it

Description: Configure your system for different network environments
 Netenv lets  you choose your  network environment (and  other things)
 upon boot, which is useful  for notebook computers. The difference to
 similar  packages   is  that  it  doesn't  try   to  autodetect  your
 environment,  but expects  your input.  You can,  however,  specify a
 default or  pass it  a parameter  from the boot  prompt to  allow for
 unattended boot. You  can also use it to  switch between environments
 without rebooting.

Note that there is a timeout, so that the machine will keep the same
network environment if it reboots while I'm not in front of it.

 but I think that maybe you simply need to remove all of the 'auto'
 and 'allow-hotplug' lines from the file. Then it won't be started
 automatically.

But I want it to be started automatically on some networks. This is
very important as I don't always have physical access to my machine.
The netenv utility allows that.

 Then you won't have to kill the dhcp clients.

This is unfortunately wrong. As I've said, there are networks without
DHCP (or one which I don't want to use), on which I need to use
iface ... inet static. But if a DHCP client is still running (from
the previous environment), it reconfigures the network interface.
I've already had this problem, so I know I must kill the DHCP client.

Also, even if DHCP is always used, letting the network to be reconfigured
automatically when switching network may lead to lost mail for instance,
due to race condition. The correct steps are:

1. Bring the network interface down.
2. Update various configuration files (e.g. the new smarthost for the
   mail).
3. Bring the network interface up.

in this order. If step 2 is done after step 3, problems can occur.

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-03 Thread Vincent Lefevre
On 2007-07-01 15:57:23 -0400, Celejar wrote:
 I use dhclient (I know you said in a different message in this thread
 that you don't like it), which by default does a bunch of
 DHCPDISCOVERS, and if they all fail, it then goes to sleep (for 5
 minutes by default), and then begins the process again when it wakes
 up.  This behavior seems to be exactly what you need; unfortunately, I
 don't know anything about pump.

The problem with dhclient is that it disconfigures the loopback
interface under some conditions. A bug is still open after 7 years!

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=65718

Users reported other problems, but perhaps they have been fixed now
(I switched from dhclient to pump 3 years ago).

Also I need to control whether a DHCP client is running or not,
because on another machine (a laptop) I use netenv and DHCP is not
used on some networks (BTW, I've already have a killall pump in
my netenv scripts on this laptop, and I could probably do the same
thing with dhclient).

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-03 Thread Vincent Lefevre
On 2007-07-02 23:16:22 -0600, Bob Proulx wrote:
 Vincent Lefevre wrote:
  This doesn't work. Probably a kernel problem then. I've reported
  the bug.
 
 I doubt this would be related to the kernel in any way.  Since this
 works for other people I can only assume that something specific to
 your system is messed up.  You will need to debug it.  Sorry but that
 is the best advice I can give.

OK, I confirm that this is a problem with pump (its man page sucks and
I didn't know how it should have behaved) on this particular machine.

But then, I don't see why I should use 'allow-hotplug eth0' instead of
'auto eth0'.

 Normally a dhcp client will retry.  This is true of both dhcp3 and
 pump.

On my laptop, when I type pump -i eth0 (the device exists but is
down and not connected), I get the error message Operation failed.
(as expected), but pump -i eth0 is still shown by ps. So, this
confirms what you are saying.

But on the other machine (on which I have the problem I mentioned at
the beginning of this thread), when I type pump -i eth1 (again, the
device exists but is down and not connected), I also get the error
message Operation failed. as expected, but pump -i eth1 is no
longer running. I think this can explain my problem if it can be
confirmed on eth0 too (I'll have to try that).

Note: I do not have a /etc/pump.conf file on any machine.

 There should messages in the /var/log/syslog file with some
 information about what is happening.

I just have:

Jul  3 14:11:22 vin pumpd[2478]: PUMP: sending discover

And on June 28/29, /var/log/syslog doesn't show anything about pumpd
at the time the Ethernet cable was disconnected.

 Hmm...  I have had problems with pump in the past and recommend dhcp3.
 Basically dhcp3 is the ISC code and pump is the Red Hat code.  In my
 experience people coming from Red Hat to Debian usually prefer pump
 because it is what they know.

In particular, this was a discussion in debian-user-french in June 2004,
so with Debian users.

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-03 Thread Bob Proulx
Vincent Lefevre wrote:
 But then, I don't see why I should use 'allow-hotplug eth0' instead of
 'auto eth0'.

It is not required to use allow-hotplug but that is the new way of
doing things.  The new debian-installer will set things up with
allow-hotplug.  Then machines such as laptops with a pcmcia slot or
usb device can have network devices go online and offline in a nice
hotplug fashion.  Same for any other hotpluggable device.

But this is not required.  You could use 'auto' and then things will
happen at boot time (only) the same as it used to do before.  For a
machine without any hotplugable devices then it shouldn't matter which
way things are configured and both should just work.  Both
configurations just work for me.

Note that '/etc/init.d/networking restart' only affects 'auto' devices
and not 'allow-hotplug' devices.  This makes sense since this is the
old way of starting things up at boot time but it can catch people off
guard when they have not been exposed to this before.  I am sure there
is a way to trigger the udev scripts to run the hotplug device scripts
too but I don't know how at this moment.

 But on the other machine (on which I have the problem I mentioned at
 the beginning of this thread), when I type pump -i eth1 (again, the
 device exists but is down and not connected), I also get the error
 message Operation failed. as expected, but pump -i eth1 is no
 longer running. I think this can explain my problem if it can be
 confirmed on eth0 too (I'll have to try that).

I am not sure why operation failed is expected.  I expect that to
succeed.

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-03 Thread Bob Proulx
Vincent Lefevre wrote:
 The problem with dhclient is that it disconfigures the loopback
 interface under some conditions. A bug is still open after 7 years!
 
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=65718

That bug may still be open but I have never seen it in any
configuration.  I think that bug may no longer be there but no one has
verified it to root cause and so it has not been closed.  There is no
discussion after the first report.  Is anyone else seeing that bug?  I
would guess not.

 Also I need to control whether a DHCP client is running or not,

Hmm...  Usually saying 'iface eth0 inet dhcp' is enough.  When
ifupdown runs it will automatically start the installed dhcp client.
For me when I did not want that I simply did not configure that device
as an 'auto' device and then I could control it completely.

The Etch default is to use network-manager to bring network devices
online.  See /usr/share/doc/network-manager/README.Debian for full
details.

 because on another machine (a laptop) I use netenv and DHCP is not
 used on some networks (BTW, I've already have a killall pump in
 my netenv scripts on this laptop, and I could probably do the same
 thing with dhclient).

I have not used netenv and I don't know about it but I think that
maybe you simply need to remove all of the 'auto' and 'allow-hotplug'
lines from the file.  Then it won't be started automatically.  Then
you won't have to kill the dhcp clients.  Then you can use netenv to
start up the device the same as you have been doing.  I would guess
anyway.  That seems cleaner.

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-02 Thread Celejar
On Thu, 28 Jun 2007 22:47:09 +0200
Vincent Lefevre [EMAIL PROTECTED] wrote:

 On a machine in a local network, I have in my /etc/network/interfaces
 file:
 
 auto eth0
 iface eth0 inet dhcp
 
 But after a power outage, my machine sometimes restarts while the
 network isn't available yet. In this case, I can no longer ssh to
 it. And I can't reboot it remotely.
 
 How can I make pump (the DHCP client I'm using) to try again
 periodically? I think I can write a script that tests if pump
 is running (with the ps command) and can run this script by
 cron. But is there a better way?

I use dhclient (I know you said in a different message in this thread
that you don't like it), which by default does a bunch of
DHCPDISCOVERS, and if they all fail, it then goes to sleep (for 5
minutes by default), and then begins the process again when it wakes
up.  This behavior seems to be exactly what you need; unfortunately, I
don't know anything about pump.

 Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/

Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-07-02 Thread Bob Proulx
Vincent Lefevre wrote:
 This doesn't work. Probably a kernel problem then. I've reported
 the bug.

I doubt this would be related to the kernel in any way.  Since this
works for other people I can only assume that something specific to
your system is messed up.  You will need to debug it.  Sorry but that
is the best advice I can give.

   How can I make pump (the DHCP client I'm using) to try again
   periodically?
  
  I think it should already be trying again periodically.
 
 It doesn't, even with 'allow-hotplug eth0'.

Normally a dhcp client will retry.  This is true of both dhcp3 and
pump.  There should messages in the /var/log/syslog file with some
information about what is happening.

  Perhaps the timeout is very long. You might try dhcp3-client
  instead. I have had good luck with it.
 
 I had problems with it in the past and users recommended pump
 instead.

Hmm...  I have had problems with pump in the past and recommend dhcp3.
Basically dhcp3 is the ISC code and pump is the Red Hat code.  In my
experience people coming from Red Hat to Debian usually prefer pump
because it is what they know.

   Note: When I'm in front of the machine, I still want to be able to
   use it when the network is not available (to do some local work,
   while waiting for the network to come back).
  
  Sure.  Laptops operate that way a lot!
 
 I have a laptop and I've always had to start pump manually or invoke
 netenv, depending on the context. Do they use 'allow-hotplug eth0'
 without anything else?

You say that you have always had to do that but I have never had to do
that.  The dhclient should start automatically.  This is further
information that something about your system is in an abnormal
configuration.

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-06-29 Thread Vincent Lefevre
On 2007-06-28 15:17:45 -0600, Bob Proulx wrote:
 Change the 'auto eth0' line to 'allow-hotplug eth0' instead.  That
 triggers the dhcp to happen when the device becomes available.  That
 will probably workaround whatever problem you are experiencing.  The
 allow-hotplug is now the default in Etch.

This doesn't work. Probably a kernel problem then. I've reported
the bug.

  How can I make pump (the DHCP client I'm using) to try again
  periodically?
 
 I think it should already be trying again periodically.

It doesn't, even with 'allow-hotplug eth0'.

 Perhaps the timeout is very long. You might try dhcp3-client
 instead. I have had good luck with it.

I had problems with it in the past and users recommended pump
instead.

  Note: When I'm in front of the machine, I still want to be able to
  use it when the network is not available (to do some local work,
  while waiting for the network to come back).
 
 Sure.  Laptops operate that way a lot!

I have a laptop and I've always had to start pump manually or invoke
netenv, depending on the context. Do they use 'allow-hotplug eth0'
without anything else?

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-06-29 Thread Vincent Lefevre
On 2007-06-29 12:50:14 +0200, Vincent Lefevre wrote:
 On 2007-06-28 15:17:45 -0600, Bob Proulx wrote:
  Change the 'auto eth0' line to 'allow-hotplug eth0' instead.  That
  triggers the dhcp to happen when the device becomes available.  That
  will probably workaround whatever problem you are experiencing.  The
  allow-hotplug is now the default in Etch.
 
 This doesn't work. Probably a kernel problem then. I've reported
 the bug.

The bug was closed, so I assume that 'allow-hotplug eth0' is a buggy
answer.

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



restarting pump (DHCP) automatically when network unavailable at boot time

2007-06-28 Thread Vincent Lefevre
On a machine in a local network, I have in my /etc/network/interfaces
file:

auto eth0
iface eth0 inet dhcp

But after a power outage, my machine sometimes restarts while the
network isn't available yet. In this case, I can no longer ssh to
it. And I can't reboot it remotely.

How can I make pump (the DHCP client I'm using) to try again
periodically? I think I can write a script that tests if pump
is running (with the ps command) and can run this script by
cron. But is there a better way?

Note: When I'm in front of the machine, I still want to be able to
use it when the network is not available (to do some local work,
while waiting for the network to come back).

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: restarting pump (DHCP) automatically when network unavailable at boot time

2007-06-28 Thread Bob Proulx
Vincent Lefevre wrote:
 On a machine in a local network, I have in my /etc/network/interfaces
 file:
 
 auto eth0
 iface eth0 inet dhcp
 
 But after a power outage, my machine sometimes restarts while the
 network isn't available yet.

That does not seem right to me.  I think that with the above it should
all work okay.

 In this case, I can no longer ssh to it. And I can't reboot it
 remotely.

Change the 'auto eth0' line to 'allow-hotplug eth0' instead.  That
triggers the dhcp to happen when the device becomes available.  That
will probably workaround whatever problem you are experiencing.  The
allow-hotplug is now the default in Etch.

 How can I make pump (the DHCP client I'm using) to try again
 periodically?

I think it should already be trying again periodically.  Perhaps the
timeout is very long.  You might try dhcp3-client instead.  I have had
good luck with it.

I am suspicious that something else is also involved here that is
causing confusion as to what is really happening.

 Note: When I'm in front of the machine, I still want to be able to
 use it when the network is not available (to do some local work,
 while waiting for the network to come back).

Sure.  Laptops operate that way a lot!

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]