Re: NetworkManager sometimes ignores DHCP setting then later the interface disappears



On Sat, 2020-08-08 at 15:33 +1000, Graham wrote:
        nmcli con add ifname br1q con-name br1q type bridge stp no
        nmcli con mod br1q ipv4.method "disabled"

The first line creates a new profile. Realize that there is a
fundamental difference between a connection profile (`nmcli
connection`) and actual interfaces (`nmcli device`).

Since the profile that you create is set to autoconnect, it will start
autoconnecting right away after `nmcli con add`.


Afterwards, you modify the profile to disable ipv4.method. Changing a
profile does not take immediate effects for already activated
interfaces. You either need to reactivate the profile (`nmcli
connection up br1q`) or reapply the changes (`nmcli device reapply
br1q`).


Of course, you could just create the profile in its entirety and in one
go, with `nmcli con add ifname br1q con-name br1q type bridge stp no
ipv4.method disabled`.

Also, you usally would create a profile only once, and then activate it
many times. So, even if you do the `nmcli con add && nmcli con mod`
steps, it's fine. Just make sure that you actually activate the profile
with with the settings you want.


A short while after the reboot *all* of the interfaces disappear
(stops 
showing up in cat /proc/net/dev)

well, your bridge interface still has IPv6 enabled. NM will try to get
an IPv6 address via autoconf, which eventually times out, tearing down
the interface. You could prevent that by setting `ipv6.may-fail` or
ipv6.ra-timeout` accordingly. Or simply disable ipv6.method as well...

When the bridge goes down, then als the VLAN must go down (it has no
more parent) and the slave device (it has no more master).


best,
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



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