[Networkmanager] nic sub-interface

Thomas Haller thaller at redhat.com
Mon May 8 14:04:38 UTC 2023


On Mon, 2023-05-08 at 14:36 +0100, Robin Becker wrote:
> I am trying to configure my intel nuc network with a bridge for use
> in qemu/libvirt/virtmanager.
> The virtual manager info I read seems to suggest that I will lose
> connectivity if I add my nic (eno1) into the bridge.

Why? After moving the port to the bridge, the "new" configuration is
supposed to work. Just add the IP addresses (or `ipv4.method=auto`) on
the bridge profile, instead of the eno1 profile from before.

> I 
> do observe that. The recommendation is to use a sub interface eg
> eno1.1, but I cannot find a way to create the right 
> setup with nmcli.

It's not clear to me what a "sub interface eno1.1" is. Where does this
recommendation come from?

> Currently I have a router that's configured to assign a specific ip
> address to the nic mac address.

You mean, your router's DHCP server expects a certain MAC address? Set
`ethernet.cloned-mac-address` on the bridge profile. Or set `ipv4.dhcp-
client-id` (as it makes sense for your DHCP server configuration).

>  I 
> tried using a static address for eno1 device, but my efforts have
> failed to have both the bridge and a useful connection.
> Is ther some way to set up a sub-interface with NM?

If the problem is wrong/missing IP configuration, then I think you
should configure the right IP settings on the bridge profile.

  # see all profiles
  nmcli connection

  # look at profile setting
  nmcli connection show "$PROFILE" 

  # modify profile, see `man nm-settings-nmcli
  nmcli connection modify "$PROFILE" ipv4.method auto ...

  # after modification, reactivate:
  nmcli connection up "$PROFILE"

  # check desired profiles/devices are activated
  nmcli connection
  nmcli device


More information about the Networkmanager mailing list