Bug 447423 - NetworkManager assigns DHCP address to primary interface, even if configured "static"
NetworkManager assigns DHCP address to primary interface, even if configured ...
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-19 17:11 EDT by David Tonhofer
Modified: 2008-05-20 05:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-19 18:44:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Tonhofer 2008-05-19 17:11:31 EDT
Description of problem:

First off, let me say that I do not yet quite understand how NetworkManager does
its magic, so maybe I have understood something wrongly.

Still:

I have an interface eth0, on which I want to have two IP addresses:

 192.168.1.1 on eth0    and
 192.168.1.3 on eth0:2

I have configured these two interfaces through some manual work in
/etc/sysconfig/networking/devices and "Network Device Control" so that the
following two files exist in /etc/sysconfig/networking/devices:

"ifcfg-eth0"

------------
DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.1.255
HWADDR=00:02:B3:33:35:D2
IPADDR=192.168.1.1
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
GATEWAY=192.168.1.254
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=no
NM_CONTROLLED=no
------------

and "ifcfg-eth0:2"

------------
DEVICE=eth0:2
BOOTPROTO=none
BROADCAST=192.168.1.255
IPADDR=192.168.1.3
NETMASK=255.255.255.0
NETWORK=192.168.1.0
GATEWAY=192.168.1.254
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=no
NM_CONTROLLED=no
ONPARENT=yes
------------

Copies of the above can now be found in /etc/sysconfig/network-scripts/ too,
like in the good old times.

When NetworkManager runs, eth0 is NOT given 192.168.1.1. Instead, it seems it is
given an address from the DHCP server running on this machine, in this case
192.168.1.253 (/var/lib/dhcpd/dhcpd.leases says as much). eth0:2 is given the
correct static address. An "ifdown eth0; ifup eth0" does not give eth0 a static
address either.

So I stop NetworkManager, and run "ifdown eth0; ifup eth0" again. eth0 shows up
with its expected static address 192.168.1.1.

If I now start NetworkManager again, the Networking Icon in the taskbar says "no
connection" but this is not true; correction is as it should and IP assignements
are as they should be. 

Version-Release number of selected component (if applicable):

NetworkManager-0.7.0-0.6.7.svn3370.fc8

How reproducible:

Always
Comment 1 Dan Williams 2008-05-19 18:44:03 EDT
Further NM updates fix the NM_CONTROLLED=no issue to make NM actually ignore
your devices.

But for the moment, you'll probably want to disable NM anyway, until NM gets
support for reading multiple IP addresses from ifcfg files.  NM supports
multiple static IP addresses internally, but does not yet read more than one
static IP address from ifcfg-* files.  This support is being worked on.
Comment 2 David Tonhofer 2008-05-20 05:09:04 EDT
Ok, thanks.

Note You need to log in before you can comment on or make changes to this bug.