Re: Default connections and connection<->interface association



On Fri, 2012-01-20 at 10:22 +0200, Евгений Шацкий wrote:
> I'm new to NetworkManager.
> Compiled and started networkmanager-0.8.4.0, got 2 connections
> automatically: "System (eth0)" and "System (eth1)".
> Somehow they got settings from /etc/conf.d/net (Gentoo config which
> isn't even supposed to be used, because it's for OpenRC net init
> script and I'm using systemd instead); moreover, it looks like they g

When you say "using systemd", you mean you have units that are
configured with Exec= commands to manually run 'ifconfig' and such when
the unit is started and stopped?  If that's the case, there is as yet no
NM plugin for that, though somebody could write one.  But that's not
really a configuration format, that's a script, and there's a reason why
configuration is usually kept separate from the mechanism, since when
the mechanism changes you don't have to change the config data.  Oh
well...

NM does have a plugin (ifnet) for the Gentoo-specific configs, like it
has plugins for most distros.  So it's not surprising that NM is picking
up that configuration since it's already there.  But NM doesn't know
anything about the configuration in the system units, so it can't use
it.

> ot associated with wrong interfaces - "System (eth1)" assigns real
> eth0 a static address which is specified for eth1 in /etc/conf.d/net,
> and "System (eth0)" is inactive (no cable plugged in real eth1). After
> I created new connection and started it, "System (eth1)" went down and
> dhcpcd started on eth0.
> What does this connection!=interface concept mean? How does a 

NetworkManager allows a connection to be used with one or more
interfaces.  This means that if you swap devices, the same connection
can be used if you choose, you don't have to reconfigure the world just
to reconnect to your wifi network or your 802.1x ethernet network.

You can "lock" a connection to a specific interface by telling NM the
MAC address of that network interface, in which case NM will only ever
use that interface with that connection.  That's probably what's going
on here.  Note that the "Auto" connections are already locked by NM to
that interface.

> connection get associated with an interface? Couldn't see anything
> relevant neither in both default nor manually created connections
> settings... Console "nmcli con status" shows this, but only for
> established connections.
> How default connections are created?

NM creates them for any interface that it has not found configuration
for, and for which auto connections have not been blacklisted via the
config file (see man NetworkManager.conf and the no-auto-default key).

> How did systemd read settings from /etc/conf.d/net? Can's see
> anything 

For that I have no idea.  Perhaps Gentoo has some custom scripts set up
to do this?

Dan

> Gentoo-specific in ebuild except --with-distro=gentoo configure
> option. Running NM with "--log-level=DEBUG
> --log-domains=HW,RFKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE,OLPC" didn't show any clarifying details.
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list




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