The correct way to disable/enable interface

For integration of NetworkManager in existing Mandriva environment we
are looking for the best way to interoperate with standard tools. In
ideal case the fact that NM manages interfaces should be transparent,
and ifup/ifdown should do the same both for interfaces managed
natively as well as for interface managed by NM (with reasonable

Mandriva ifup/ifdown is mostly based on RH/fedora version. Interface
definition format (and hence NetworkManager system plugin) has
diverged significantly. The main difference is in wireless

RH expects that connection is tied to interface; connection UUID is
stored in ifcfg-XXX, so ifup looks up connection and requests NM to
start it.

In Mandriva wireless configuration is not associated with specific
interface. Instead, "ifup wlanX" just starts wireless interface
physically so that it can start scanning for AP. The actual AP
selection is done later by wpa_supplicant or by user explicitly
selecting AP; when connection with AP is established, per-AP IP
configuration is applied (by ifplugd). This mostly corresponds to what
NM does :)

Now RH scripts work for wired case, but not for wireless, because
wireless does not have any connection associated with it. So what we
are looking for is which functions can be used to disable interface
(basically putting it in state after legacy ifdown) or enable
(effectively doing the same as legacy ifup). For wireless ifdown
mostly corresponds to Disconnet, but how can interface be enabled for
auto-selection without explicitly starting connection? For wired pair
of "nmcli dev disconnect"/"nmcli con activate" may be used. I am not
sure how persistent DSCONNECTED state for device is - i.e. I would not
like interface to suddenly come up after cable is replugged.

I understand that no interfaces are currently provided for this, my
question is - what internal functions (or combination) could be use to
implement these interfaces.

Thank you!


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