Network Manager ignores eth0 settings on resume

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. :wink:

I have solved this problem by editing this file :
/etc/NetworkManager/system-connections/System eth0

Read this topic where i explain how i fixed it :
Knetworkmanager doesn’t connect with fixed ip auto conexion - openSUSE Forums

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!

Can you post output of

cat /etc/sysconfig/network/ifcfg-eth0

I would have thought a statically configured network interface might look like this

BOOTPROTO=‘static’
IPADDR=‘192.168.1.5’
BROADCAST=‘192.168.1.255’
NETMASK=‘255.255.255.0’
NETWORK=‘192.168.1.0’
GATEWAY=‘192.168.1.1’

cat /etc/sysconfig/network/ifcfg-eth0
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.1.104/24'
MTU=''
NAME='MCP61 Ethernet'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'

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.

cat ~/.kde/share/config/knetworkmanagerrc
[ConnectionSetting_MOOnUANKT4DrA5Ls_802-3-ethernet]
Type=802-3-ethernet
Value_auto-negotiate=<bool>true</bool>

Value_mtu=<uint32>0</uint32>

Value_speed=<uint32>0</uint32>


[ConnectionSetting_MOOnUANKT4DrA5Ls_connection]
Type=connection
Value_autoconnect=<bool>false</bool>

Value_id=<string>ZIFFY</string>

Value_timestamp=<uint32>1236068724</uint32>

Value_type=<string>802-3-ethernet</string>

Value_uuid=<string>MOOnUANKT4DrA5Ls</string>


[ConnectionSetting_MOOnUANKT4DrA5Ls_ipv4]
Type=ipv4
Value_addresses=<list>
 <list>
  <uint32>1744939200</uint32>
  <uint32>24</uint32>
  <uint32>16885952</uint32>
 </list>
</list>

Value_dns=<list>
 <uint32>16885952</uint32>
</list>

Value_dns-search=<list>
 <string>mydomain.net</string>
</list>

Value_ignore-auto-dns=<bool>false</bool>

Value_ignore-auto-routes=<bool>false</bool>

Value_method=<string>manual</string>


[Connection_MOOnUANKT4DrA5Ls]
Id=MOOnUANKT4DrA5Ls
Secrets=
Settings=ConnectionSetting_MOOnUANKT4DrA5Ls_connection,ConnectionSetting_MOOnUANKT4DrA5Ls_802-3-ethernet,ConnectionSetting_MOOnUANKT4DrA5Ls_ipv4
Type=802-3-ethernet

[General]
Autostart=yes

Thanks for any help!

I’m investigating this at https://bugzilla.novell.com/show_bug.cgi?id=526582

wstephenson >> i voted for your bug report.

What worked for me after many failed attempts was:

Change to ifup in yast;
Uninstall knetworkmanager;
Install wicd.

It remembers all connections I ever configured - wired dhcp, wired fixed IP, encrypted and unencrypted wireless. Never gave me a problem.

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.

Hope this helps

In my case it was not related to suspend/resume.