Re: IPV6 manual addresses not being applied to interface



On Mon, 2020-03-23 at 17:10 +0800, Jeremy Ardley wrote:
Thanks.

By experimentation I discovered activate earlier today. I assume it
puts the desired configuration into some cryptic actual configuration
files.

A connection profile is merely a bunch of settings for configuring
network (as printed by `nmcli connection show "$PROFILE"`.

The desired configuration are the connection profiles that you see in
`nmcli connection`. And they also tend to be persisted on file, like
you see in `nmcli -f all connection`.

Activating a profile means to take these settings and make them happen.
That's then the device's configuration (or the applied configuration).

Many settings of a device (at runtime) cannot be changed without
completely reconfiguring the device. E.g. you cannot change the
wifi.ssid of the currently active profile (because a different SSID
identifies a different Wi-Fi network altogether).

But NetworkManager doesn't prevent you from modifying a connection
profile, simply because it's currently active. That would be rather
anying, if you start nmtui to edit a profile, then you complete and it
says: cannot modify the profile, because it's currently active.

Also, it doesn't seem best to automatically enforce that the changes of
a profile always take effect immediately. E.g. that would mean if you
ssh into a machine and change the profile's wifi.ssid, you would get
disconnected.

So, ... well, changes only take effect on the device's runtime settings
after you explicitly say so: that's called "reapply". And of course, a
full re-activation cycle will also work.

When activating a profile, the current content of the profile is
internally cloned and used as configuration on the device (until the
device goes down or until Reapply). Basically, Reapply() is D-Bus API
for directly editing this cloned setting. That's how

  nmcli device modify "$IFNAME" +ipv4.addresses 192.168.7.5/24

works.


Does this transfer always require an activate? Or would a simple
reboot work?

IF you edit a profile, then that has no effect to runtime
configuration, until you activate (or re-active) the profile.

I am not sure why to reboot. Modify the profiles as you like, and
activate them as you wish. With the caveat that modifying a profile
does not take effect on the currently activated devices.

See active devices in `nmcli device`.


I searched a lot of online anecdotes and tutorials and activation
wasn't something that was obviously pointed out as required. Perhaps
this could be included in some FAQ or tutorial?

Possibly yes. Which documentation did you consult, where you would like
to get a better explaination?


best,
Thomas

Cheers,

Jeremy

On 23/3/20 4:45 pm, Thomas Haller wrote:
On Mon, 2020-03-23 at 08:22 +0800, Jeremy Ardley wrote:

Hi

I have configured the interface using the nmtui tool and
restarted
network manager.

It appears the upper case output below is what I have and the
lower
case is what I have asked for.

How do I get what I have configured to apply to the interface?

by (re)activating the profile or reapplying the changes.

Actiavting a profile in nmcli, is done via one of

  nmcli connection up "$PROFILE"
  nmcli connection up "$PROFILE" ifname "$IFNAME"
  nmcli device connect "$IFNAME"

Reapplying the changes is done via

  nmcli device reapply "$IFNAME"


Or course, with other NetworkManager client tools (nmtui) that is
different, but the underlying functionaliy is the same. In case of
nmtui, that doesn't allow you to do reapply. Instead, reactivate
the
profile.



systemctl restart NetworkManager

Restarting the daemon doesn't apply changes to the networking. It
is
usally wrong trying to do this. When you restart the daemon,
NetworkManager tries *NOT* to do any changes to the network.

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]