Bug 128843 - roaming with wired NIC does not work
Summary: roaming with wired NIC does not work
Status: RESOLVED WONTFIX
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Mobile Devices (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Forgotten User ZhJd0F0L3x
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-17 20:50 UTC by Lars Müller
Modified: 2006-09-14 10:08 UTC (History)
1 user (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
New powersave action (180 bytes, text/plain)
2005-10-28 11:27 UTC, Christian Zoz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Müller 2005-10-17 20:50:30 UTC
Before using ifplugd it was possible to restart the network on resume and to get
a new IP address from the company internal or my home DHCP server.

If I plug the wire, then start the laptop to resume - which is the usual order
how you start a laptop with the RJ45 NIC plug on the back - ifplugd does not
mention the changes of the wire.

As the interface is controlled by iflpugd a network restart even does not change
anything.

In this situation it's only possible to send dhcpcd a SIGALARM to force the
process to renew the lease.  But this only works for me if I did a dhcpcd -n
three times.

dhcpcd -k results in a SIGHUP, but dhcpcd terminates nevertheless.
Comment 1 Lars Müller 2005-10-17 20:52:32 UTC
More usage details:  I suspend the system, close the lid, unplug the network cable, move to the other network, plug the network cable, open the lid, resume the system.

And the IO address range between home and work is different, 
Comment 2 Forgotten User ZhJd0F0L3x 2005-10-24 07:47:08 UTC
ok. For this usage scenario you need to add "network" to the "services to restart" list in /etc/sysconfig/powersave/sleep. The reason is, that ifplugd never sees the cable unplug event, and if it does, only for a second but not for the 5 or 10 seconds needed to trigger ifdown/up.

If we had a /etc/init.d/network trigger that would do a "recheck dhcp, but only if dhcp is configured and non-destructive (means: do not get a new ip if not absolutely necessary)", we could add this as a default action on resume, but i am not sure if we have such a beast. Christian?

But of course, NetworkManager will solve this problem (and world hunger, too).
Comment 3 Christian Zoz 2005-10-24 10:44:40 UTC
Lars, you say that "a network restart even does not change anything".
But i expect that rcnetwork restart does restart the network and therefore get the right lease from current dhcp server. If that does not happen, this is a bug.

Seife, if we had a reliable means to renew the lease, i had added this already. But as Lars already said, you have to send dhcpcd three times a signal until it renews the lease completely. It seems to rotate in 3 states every time one sends this signal (dhcpcd -n). And only if in state 3 it does what we want.

Therefore we had to change dhcpcd first. Or use dhclient, _if_ this is possible there.

(And this is not roaming) 
Comment 4 Peter Poeml 2005-10-24 11:57:10 UTC
Sending SIGALRM manually works fine here. Maybe just the -n option is
broken?
Comment 5 Lars Müller 2005-10-24 13:00:19 UTC
SUSPEND2DISK_RESTART_SERVICES was /etc/sysconfig/powersave/sleep set to "hotplug network".  I've now reduced it to "network".  I'll inform you as soon as I switch the network the next time.
Comment 6 Lars Müller 2005-10-25 16:54:37 UTC
Regarding comment #4:  It's the same while sending dhcpcd SIGALRM.  I had to send the siganl three times.

Regarding comment #5:  No difference if I set SUSPEND2DISK_RESTART_SERVICES only to network.

Anything missing?
Comment 7 Christian Zoz 2005-10-27 08:25:16 UTC
Lars, if you call rcnetwork restart manually after resume, does that set up interfaces properly?
Comment 8 Christian Zoz 2005-10-27 09:44:59 UTC
To comment 4:

Peter, i have my notebook connected to SUSE net using dhcpcd. Now i set up a local dhcpd on another notebook with a different subnet. Then i just switch the cable from hub to dhcpd-notebook. No automatic detection (is ok). Then
1) dhcpcd -n
   --> sending DHCP_REQUEST for <old address> to <old server>
2) dhcpcd -n
   --> broadcasting DHCP_REQUEST for <old address>
3) dhcpcd -n
   --> broadcasting DHCP_DISCOVER
   Now i get the lease from my local dhcpd

What we need is a means to trigger 'broadcasting DHCP_DISCOVER' immediately.
Comment 9 Lars Müller 2005-10-28 10:56:18 UTC
To comment #7:  Yes.  Restarting the network - rcnetwork restart - brings the interface up properly.
Comment 10 Christian Zoz 2005-10-28 11:27:23 UTC
Created attachment 55859 [details]
New powersave action

Store this to /usr/lib/powersave/scripts/network_restart.

Then add 'network_restart' to /etc/sysconfig/powersave/events:EVENT_GLOBAL_RESUME_* and remove 'network' from services to restart.
Comment 11 Peter Poeml 2005-11-02 14:19:49 UTC
To comment #8:

> What we need is a means to trigger 'broadcasting DHCP_DISCOVER' immediately.

This is possible by removing the .cache file of that interface, and
restarting dhcpcd for it.
Comment 13 Forgotten User ZhJd0F0L3x 2006-02-13 18:13:14 UTC
Lars, any news here?