On 11.1 64bit my wired eth0 has a Network Manager connection defined to use manual settings and is configured with a static IP. I do have DHCP enabled on my router, but I have policy routes and monitoring system defined for the static IP, so prefer to use that.
Suspend and resume work fine on the system in general, but each time I resume, the Network Manager ignores the defined connection settings for eth0 and instead automatically connects using DHCP (which also adds several seconds to the wait until I can use the network.)
I have to remember to click on the Network Manager icon each time I resume and choose the “LAN (Manual IP Config)” from it’s menu to get it to use the static IP.
Note, I’m talking about eth0 wired network, I do not have any wireless networking in this box, just the single eth0 interface.
How can I get Network Manager to stop autodetecting eth0 and connecting via DHCP upon resuming, and make it use the existing manual static LAN config automatically? After the past couple months of dealing with this it’s getting pretty annoying now.
Thanks for the reply, I took a look at that thread you linked. I’ve also since discovered it’s probably not related to suspend/resume, since I just set up another machine on similar hardware and it always ignores the manually configured eth0 and autoconnects via DHCP. I have to manually click on the icon and select the static connection every time on that system.
I didn’t have anything in the /etc/NetworkManager/system-connections directory on either machine. If I create a file there as described I don’t see any indication that it’s ever read by anything and behavior seems exactly the same.
ll /etc/NetworkManager/system-connections/
total 4
-rw-r--r-- 1 root root 107 Mar 2 20:47 System eth0
cat /etc/NetworkManager/system-connections/System\ eth0
[ipv4]
method=manual
address=192.168.1.104;255.255.255;192.168.1.1
dns=192.168.1.1
dns-search=mydomain.net
When the network starts it ignores manual settings and autoconnects via DHCP:
Mar 2 21:01:22 napili rcnetwork: Starting the NetworkManager
Mar 2 21:01:26 napili dhclient: Internet Systems Consortium DHCP Client V3.1.1
Mar 2 21:01:26 napili dhclient: Copyright 2004-2008 Internet Systems Consortium.
Mar 2 21:01:26 napili dhclient: All rights reserved.
Mar 2 21:01:26 napili dhclient: For info, please visit http://www.isc.org/sw/dhcp/
Mar 2 21:01:26 napili dhclient:
Mar 2 21:01:26 napili dhclient: Listening on LPF/eth0/00:16:e6:86:e4:94
Mar 2 21:01:26 napili dhclient: Sending on LPF/eth0/00:16:e6:86:e4:94
Mar 2 21:01:26 napili dhclient: Sending on Socket/fallback
Mar 2 21:01:30 napili dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Mar 2 21:01:30 napili dhclient: DHCPOFFER from 192.168.1.1
Mar 2 21:01:35 napili dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Mar 2 21:01:35 napili dhclient: DHCPACK from 192.168.1.1
Mar 2 21:01:35 napili dhclient: bound to 192.168.1.104 -- renewal in 1661 seconds.
Mar 2 21:01:35 napili avahi-daemon[2736]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.104.
Mar 2 21:01:35 napili avahi-daemon[2736]: New relevant interface eth0.IPv4 for mDNS.
Mar 2 21:01:35 napili avahi-daemon[2736]: Registering new address record for 192.168.1.104 on eth0.IPv4.
Googling turned up tons of hits with similar symptoms from Ubuntu users, but I didn’t see any solutions. I’d love to see a solution on OpenSuse 11.1 for this. Using the old style ifup/ifdown isn’t an option for systems that use suspend/resume, I need to use NetworkManager. It worked perfectly on 10.3 but this silly problem breaks it badly on 11.1. Any additional suggestions would be welcome!
Everything looks ok there to me. Do any of these values have anything at all to do with which connection NM automatically chooses? I was under the impression that something in ~/.kde/share/config/knetworkmanagerrc was responsible for that process since that’s where the manual settings appear to be stored. I thought the /etc/sysconfig files were only used with with the old ifup/ifdown method.
This might also be related to suspend not unloading/loading the kernel module for the eth device. I have a similar problem with my laptop’s hotkeys not coming back after suspend. This is the solution for it:
user@laptop:~> more /etc/pm/sleep.d/60asus_laptop
#!/bin/bash
case $1 in
hibernate|suspend)
/sbin/rmmod asus_laptop
;;
thaw|resume)
/sbin/modprobe asus_laptop
;;
*) echo “AsusLatop power management script called incorrectly.”
;;
esac
So the file is called 60asus_laptop, it unloads the driver on suspend, loads it when coming out of suspend.