Subject: Re: network does not survive apm -z
To: Thorsten Frueauf <s_frueau@ira.uka.de>
From: David Carrel <carrel@cisco.com>
List: port-i386
Date: 12/23/1996 09:36:22
> If I put the system into suspend (deep sleep) mode with `apm -z` and
> wake it up later (power on), I get the system back just like I left it -
> except that the network is no longer responding. I can't ping any host
> and no host can ping me - I have to reboot to get networking back.
> 
> Is this a bug or is it just not possible to reanimate networking? Or did
> I miss something in configuration?

I'm not sure if it's a bug or just the nature of the beast.  One problem is
that while your motherboard preserves ram across the suspend, the NIC cards
usually do not.  So it is difficult to continue using the card since it
loses it's state.  One solution might be to have a routine that
re-initializes the card after the power resume.

However, a simpler solution is what I do.  apmd calls out to the program
/etc/apm/suspend (see the apmd man page) before it actually suspends.  In
that script, I ifconfig the interface down, then use pcmcia_cntrl
unconfigure the pcmcia card.  (I'm not sure if you would need to
unconfigure the card if this isn't a pcmcia card.)  I also do other cleanup
like flushing the arp cache (some machines at work send proxy arps) and
clear the routing table.  This is all done BEFORE the suspend.  Then when I
resume, I am able to restart the network without re-booting.  This works
well for me since usually when I suspend, I resume on a different network
and need to re-ifconfig anyway.

Dave