From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Forcing networking configuration into effect using ip link down (only)

Solved!
Go to solution

I was wondering if anyone from NI could comment on the conclusion of this rather lengthy thread:

https://decibel.ni.com/content/message/103354#103354

In short the conclusion of it that if you want changes to the network configuration of an interface (made using System Config API) to come into effect properly (addressing mode changes, ARP updates etc) you have to run ip link set down. You do not need to bring it up using ip link set up afterwards, as the interface will go back up by itself. Is this expected behaviour? Is it triggered by the fact that the interface is still physically connected (up)?

0 Kudos
Message 1 of 8
(5,479 Views)

When using the System Config API, the interface is brought down when calling Save. When making changes by other means, one must run at least ip link set down. The interface is brought up automatically by ifplugd. This behavior can be changed by adding -a to ARGS in /etc/ifplugd/ifplugd.conf. If -a is passed to ifplugd, it will not enable interfaces automatically.

0 Kudos
Message 2 of 8
(4,455 Views)

Ok. The only deviation here then is that the System Config API save does not seem to bring down the interface the way you describe it (at least if they have been called on the target (self-reconfiguration)), because you can make programmatic changes that will not be reflected until you force the interface down using ip link (see the thread I linked to) or you physically unplug and plug the cable.

0 Kudos
Message 3 of 8
(4,455 Views)

When running the System Config API VIs on the target it's LabVIEW that tries to bring down the interface. However, LabVIEW lacks the cap_net_admin capability by default. When running System Config VIs on the host, they take a different route, throught the System Web Server, which has this capability.

Message 4 of 8
(4,455 Views)

Ok, so there is an issue there then with the System Config API when it is being used for self-reconfiguration. That's good to know at least. As mentioned I've gotten around it by defining lvuser as a sudoer, and making it run the ip link command for now. Perhaps the issue could be handled better by the API in a future version, I hope so.

0 Kudos
Message 5 of 8
(4,455 Views)

This issue with the System Config API seems to have been resolved in LabVIEW 2015. Can someone from NI confirm that there has indeed been a change? I thought I should check it now that I have moved the code to 2015, and from the the tests I've done so far the behaviour is now different from what it was, but it would be nice to have it verified.

0 Kudos
Message 6 of 8
(4,455 Views)
Solution
Accepted by Mads

Mads,

I can confirm that this issue was fixed in 2015sp1.

Message 7 of 8
(4,455 Views)

Great news, thanks for the confirmation

0 Kudos
Message 8 of 8
(4,455 Views)