[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How is the new networking world supposed to work?



Dan Williams wrote:
On Mon, 2008-04-21 at 02:26 +0200, Dennis Jacobfeuerborn wrote:
Dan Williams wrote:
- Device: eth0 ----------------------------------------------------------------
     Type:              Wired
     Driver:            forcedeth
     State:             connected
     HW Address:        00:00:00:00:00:00
I've seen this once and not been able to reproduce; there might be a
race between bringing up the card and getting a valid MAC address since
sometimes the MAC can't be read until firmware is loaded and booted, but
that's usually only an issue with wireless cards since wired devices
don't usually have firmware.
I actually managed to fix my problem by disabling the "network" service. I
guess the remaining question is why the interface ends up in a b0rked state
when it is first brought up by "network" and then taken over by NM. Should
"network" actually bring the interface up if the config file says
"NM_CONTROLLED=yes"?

No, it probably should not do anything if NM is running.

I think it would be useful to define the semantics when both services are
started. Should there be two sets of interfaces determined by NM_CONTROLLED
and each service only caring for its "own" so that they don't collide or
should this work like an override mechanism where one service takes over
interfaces from the service that ran before?

If NM_CONTROLLED=yes and NM is running, only NM should manage the
device.  If NM is not running or if NM_CONTROLLED=no, then it's probably
fine for the network service to touch the device.

I don't think it's a good idea to have services "probably" do certain things. What I was aiming at was that the behavior should be defined unambiguously and be documented in /usr/share/doc/initscripts-*/sysconfig.txt.

Apparently NM has problems taking over devices that have been initialized by "networks" so either that needs to be fixed or "networks" should not initialize a device in the first place when NM_CONTROLLED is "yes". That is the behavior I would favor as that allows me to explicitly define which service controls which devices and would probably simplify the services since they wouldn't have to bother with "taking over" devices from each other.

(I've added "prepend domain-name-servers 195.50.140.178, 195.50.140.114;"
to dhclient-eth0.conf so I get decent nameservers in resolv.conf)
You can also set DNS1 and DNS2 into your ifcfg files.  That's  a bit
easier...
Indeed, thanks for the tip.

Actually after rebooting the machine that doesn't work. NM seems to disregard the PEERDNS=no setting and sets up the first DNS from DHCP anyway. DNS1 gets added as second nameserver and DNS2 doesn't show up in resolv.conf at all.

Regards,
  Dennis


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]