Re: NetworkManager removes *STATIC* IP address from interface when link down



Thomas, I'm still struggling with this one.

I read the man page and have created a new file in /etc/NetworkManager/conf.d

I also note that the "main" option that you suggested is deprecated in favour of per-device options, but I have been unable to get either version to work.

The man page gives no examples of usage, so I tried a few things. Listed below is what I tried.


Any suggestions?



[main]

main.ignore-carrier

(this would stop NetworkManager from running)

[main]

main.ignore-carrier=1

(no change, link down would cause IP address deconfigure)

[main]

main.ignore-carrier=enp6s0

(no change, link down would cause IP address deconfigure)

[enp6s0]

ignore-carrier

(this would stop NetworkManager from running)

[enp6s0]

ignore-carrier=1

(no change, link down would cause IP address deconfigure)

[enp6s0]

ignore-carrier=true

(no change, link down would cause IP address deconfigure)

[enp6s0]

match-device=interface-name:enp6s0

ignore-carrier=1

(no change, link down would cause IP address deconfigure)





On 6/07/2020 7:15 pm, Thomas Haller wrote:
On Mon, 2020-07-06 at 12:29 +1000, Graham wrote:
Hi,

     I am having trouble with NetworkManager where all my connections
to a particular IP address stop working when the physical link goes
down.

Firstly... Yes, I am aware that unplugging the link will stop data
flowing, however the connections that stop working are not using that
link, just the IP address. Such as the following...

  - Connections within that machine. Instead of using "localhost" they
are using the IP address assigned to eth1, which just loops back
anyway. This breaks when NetworkManager deconfigures the eth1 IP
address.

  - Connections to a dual homed host, coming in via eth2 but using
eth1's IP address. There should be no reason why unplugging eth1's
network cable should affect these connections, except that
NetworkManager decides to deconfigure all IP addresses on eth1 when
the link goes down.


Both of the above scenarios continue to work without issue when using
network-scripts. Network-scripts just dumbly configured the static IP
address on bootup and never touches it again, but this is what I
would expect for a static IP address.

How do I stop NetworkManager from deconfiguring the IP address when a
physical link goes down? And how do I configure NetworkManager to
configure an IP address on bootup if the link is down?

Is there some hidden config option to ignore the link state?

Hi,


configure "main.ignore-carrier" in NetworkManager.conf.

See `man NetworkManager.conf`



best,
Thomas


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