Knetworkmanager uses auto eth0 instead of fixed IP for the wired ethernet card

Hi. I have a single wired ethernet card which the system calls "eth0"and I use Knetworkmanager to control the settings. I have two issues.

The first issue is that when I boot into openSUSE, the icon for Knetworkmanager does not appear in the System Tray on the Panel. It works invisibly in the background. I have to invoke it from the kickoff Application Launcher to make it appear. How do I set it to be always visible.

The second issue is that I have created configuration in Knetworkmanager for a fixed IP on the eth0 ethernet card. When the system boots, knetworkmanager sets up an connection that it calls “auto eth0” and gives the eth0 card an IP by DHCP. This is not the IP address that I want. I have to click the Knetworkmanager icon and then click the entry “auto eth0” to turn the eth0 card off and then click the entry for fixed IP to turn the card back on with the correct (fixed) IP address. How do I force knetworkmanager to avoid DHCP assigning of IP to eth0 and instead to choose the fixed IP settings that I set up?

Thanks
swerdna

Hi swerdna

See if this helps:

SDB:Knetworkmanager static ip auto eth0 - openSUSE

Thanks deano_ferrari. The article lays out two methods. One method uses a special network configuration editor /usr/bin/nm-connection-editor. I don’t have it in my KDE system, maybe it’s a Gnome application. The second method involves editing text config files and it doesn’t work for me because the system wipes out the change I make when the network restarts. I’m going to try it again with permissions on the file changed from rw------- to r-------- and see if that stops the system from reverting the changes. I’ll report back

Nope, that doesn’t work, the system changed the permissions back to rw for root and recreated the file /etc/NetworkManager/system-connections/‘Auto eth0’ so that “auto eth0” dominates

Hmmm…goes for coffee and a ponder…

On 2011-10-09 21:36, swerdna wrote:
> Hi. I have a single wired ethernet card which the system calls "eth0"and
> I use Knetworkmanager to control the settings. I have two issues.

If you are using a fixed wired IP, perhaps you could use the ifup method
instead.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2011-10-09 22:56, swerdna wrote:

> Hmmm…goes for coffee and a ponder…

Maybe you have to edit it while not logged in the GUI.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I managed to solve this problem this way:

  • remove /etc/NetworkManager/system-connections/Auto\ eth0 and place your own config file in this directory with the same ownership and rights
  • Do not confuse the config files produced/used by the NetworkManager-deamon and KNetworkManager! Format and contents are different.

My own config file is named “iauto_eth0” (identical to the id) and looks like this:

[connection]
id=iauto_eth0
uuid=cf21eb40-8486-4737-b8cb-db8b4d30b4de
type=802-3-ethernet
timestamp=1296235181

[ipv4]
method=manual
dns=192.168.0.253;
addresses1=192.168.0.4;24;192.168.0.253;

[802-3-ethernet]
port=mii
duplex=full

192.168.0.4: my static IP address
192.168.0.253: my router/standard-gateway/DNS-proxy

regards,
Hendrik

And that works a treat for me too. Thanks so much.

I managed to solve this problem this way:

  • remove /etc/NetworkManager/system-connections/Auto\ eth0 and place your own config file in this directory with the same ownership and rights

I was under the impression that /etc/NetworkManager/system-connections/Auto\ eth0 will just get recreated by NM during the next session. This thread is enlightening:

How to set Auto eth0 IP address - Page 7

A bug report here:

https://bugs.kde.org/show_bug.cgi?id=257303

Also, this ArchLinux Wiki page describes the issue with a possible workaround. (Not yet tried by me).

That’s a good result, but does it survive a reboot, or network restart?

When I tested this on 11.4 it survived any restart. I can’t repeat this tests, because on this machine runs already openSUSE 12.1 beta1 :slight_smile: