[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proper suspend mode (no more on/off switching)



On Tuesday 05 December 2000 22:19, Hanno Mueller wrote:
> Using DHCP, at my new location I often do telinit 1 and back just to make
> sure that all my applications know that the local ip address has changed.
>
> Is there any way to automate this, without telinit 1 ? (Maybe I just don't
> quite get this.)
>
> My ideal scenario would be waking up the laptop from suspend, inserting
> the network card and somehow making sure that all applications running on
> my laptop (e.g. apache, X, exim) get informed about the new network
> adapter and / or the new IP address, while they continue to run. Similar
> to this, I would want to remove the PCMCIA card just as easy.

Let me tell you what I do. Right now I'm in a situation where my pcmcia nic 
gets no use. Thus I have to use my pcmcia modem. Every time I dial up to an 
isp I get a new ip address. After I'm done with the ppp link, I close it and 
if  I'm tired, I'll eject the card -- my interface ppp0 has just went down. 
Next, I might allow my laptop to go to sleep. When I wake it up, I can insert 
the pc card and dial up my isp again -- with a totally different ip address. 
Every thing runs fine. Its the beauty of the OSI model that makes this work.

When you recieve your dhcp responses and your network interface is 
configured, your routing table and resolv.conf should be updated. Thus, when 
an application wants to send data to that cloud we call the internet -- poof, 
exit via the 'default route'.

So, unless you are setting up your applications to 'serve' from a specific ip 
address (which I'm assuming you're not) I don't see why you can't just do the 
same thing with your network interface as I do with my ppp interface.

Try it out. If your laptop bursts into flames, I'm sorry ;-)

Regards,

Joseph Schlecht <joschlec@debian.org>



Reply to: