<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mo., 13. Feb. 2023 um 10:10 Uhr schrieb Thomas Haller <<a href="mailto:thaller@redhat.com">thaller@redhat.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, 2023-02-13 at 08:19 +0100, Till Maas wrote:<br>
> <br>
> <br>
> Am So., 12. Feb. 2023 um 21:20 Uhr schrieb Thomas Haller<br>
> <<a href="mailto:thaller@redhat.com" target="_blank">thaller@redhat.com</a>>:<br>
> > Hi,<br>
> > <br>
> > <br>
> > On Sun, 2023-02-12 at 11:00 +0100, John Doe wrote:<br>
> > > We're currently looking into requiring 802-1x for all wired<br>
> > > ethernet<br>
> > > connections.<br>
> > > We have a large number of Linux clients. Mostly slim laptops that<br>
> > > don't have an ethernet adapter. These connect to the wired<br>
> > > network<br>
> > > using docking stations or usb to ethernet adapters. All Linux<br>
> > > clients<br>
> > > are deployed using PXE boot to deploy the company image.<br>
> > > Problem is during the deploy process there's of course only the<br>
> > > adapter used for the deploy availbale on the client. I can get<br>
> > > the<br>
> > > 802-1x settings added for this adapter as part of the deploy.<br>
> > > But then I'm out of control. I can't control NetworkManager to<br>
> > > setup<br>
> > > 802-1x for the connection created by NetworkManager when the user<br>
> > > connects to a docking station. Yes, unfortunately it creates a<br>
> > > new<br>
> > > wired connection.<br>
> > <br>
> > you can disable that with "[main].no-auto-default=*" in<br>
> > NetworkManager.conf. Of course, the the user plugs in a new<br>
> > ethernet<br>
> > device and NetworkManager isn't doing anything automatically.<br>
> > Whether<br>
> > that is more desirable is unclear.<br>
> > <br>
> <br>
> <br>
> It seems to me that having NM ship a default profile<br>
> with "connection.multi-connect=multiple" that contains the settings<br>
> that the automatically created profile simplifies the configuration<br>
> and makes the behavior accessible via the API and reduces the need to<br>
> configure this with the NetworkManager-config-server subpackage.<br>
<br>
Predeploying a profile doesn't seem to make anything more accessible<br>
via the API.<br></blockquote><div><br></div><div>API supports changing profiles (and not the config file), so the predeployed profile can then be read and changed via the API.<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> What would be the downside of removing the auto-default behavior?<br>
<br>
If a suitable profile would be pre-deployed, then the auto-default<br>
behavior is already not taking effect.<br></blockquote><div><br></div><div>This is not a downside of removing the auto-default behavior. Not sure what you are getting at. Still having auto-default enabled means that removing the default profile cannot be used to disable the default behavior, since then the auto-default code would kick in.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
yes, could be done. But it's not clearly better. After all, multi-<br>
connect profiles are slightly more confusing. It's also more confusing<br>
to edit a profile pre-deployed in /usr/lib (because it gets copied to<br>
/etc). Unless the profile gets placed to /etc, which seems not great to<br>
ship from an RPM.<br></blockquote><div><br></div><div>How is this more confusing? This is a standard pattern used by systemd, so I guess you assume it is confusing because you are not used to it in NM?</div><div><br></div><div>Cheers</div><div>Till</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
Thomas<br>
<br>
> <br>
> Cheers<br>
> Till<br>
>  <br>
> > <br>
> > That profile only gets created, because there is no otherwise<br>
> > suitable<br>
> > profile. If you pre-deploy an ethernet profile that can activate on<br>
> > any<br>
> > interface, then this has no effect.<br>
> > <br>
> > > It doesn't use the existing one.<br>
> > > I've looked into setting up connection settings in<br>
> > > NetworkManager.conf. Unfortunately it only supports the 802-<br>
> > > 1x.auth-<br>
> > > timeout setting.<br>
> > > I've tried using a pre-up dispatcher script, unfortunately it<br>
> > > don't<br>
> > > pick up on adding settings to the connection profile.<br>
> > > I've tried using 2 pre-created connection profiles that only list<br>
> > > the<br>
> > > type as ethernet and don't point to a specific interface. This<br>
> > > works<br>
> > > for Ubuntu 20.04 and 22.04 but not 18.04, nmcli in Ubuntu 18.04<br>
> > > requires specifying ifname when creating a connection profile.<br>
> > <br>
> > That also works with older nmcli: <br>
> > <br>
> >   nmcli connection add ... ifname "*"<br>
> > <br>
> > > Is there some way to hook into NetworkManager whenever it picks<br>
> > > up a<br>
> > > new device and add the 802-1x settings for all new wired<br>
> > > connection<br>
> > > profiles?<br>
> > <br>
> > No, the "Wired connection 1" is (almost) not configurable,<br>
> > certainly<br>
> > not for a 802-1x settings. In any case, there is usually no need<br>
> > for a<br>
> > way to hook that, just create the profile you want instead.<br>
> > <br>
> > <br>
> > It sounds like, you just should create a profile that is not tied<br>
> > to a<br>
> > particular interface and has the 802.1x settings. If you want,<br>
> > maybe<br>
> > also set "connection.multi-connect=multiple", so that the profile<br>
> > can<br>
> > activate on more than one devices at a time.<br>
> > <br>
> > <br>
> > Thomas<br>
> > <br>
> <br>
> <br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Till Maas<br>He/His/Him<br>Manager, Software Engineering<div>Network Management Team - NetworkManager, Nmstate, Ansible RHEL Networking System Role<br><div><br></div><div>Red Hat GmbH, <a href="https://www.redhat.com/de/global/dach" target="_blank">https://www.redhat.com/de/global/dach</a>, Registered seat: Werner von Siemens Ring 12, 85630 Grasbrunn, Germany  </div><div>Commercial register: Amtsgericht Muenchen/Munich, HRB 153243,</div><div>Managing Directors: Ryan Barnhart, Charles Cachera, Michael O'Neill, Amy Ross</div></div></div></div></div>