09-21-2016 07:38 AM
Hi,
I was wondering if there was a way to change the ip-address of a NI linux RT system, using SSH or perhaps changing a config file via Ftp(or any other standard methode)?
I hope to avoid the need for MAX since i understand that one needs real time module and similar innstalled on the computer doing the ip configuration via MAX.
Regards
Mrmas
09-21-2016 08:32 AM - last edited on 10-31-2024 02:50 PM by Content Cleaner
Have you tried the web interface? https://www.ni.com/docs/en-US/bundle/max/page/maxrmeng/html/ni_webconfig.html?srsltid=AfmBOoovPLIe4v...
09-21-2016 10:13 AM
I don't have my LV RT system in front of me, but if it is like Ubuntu or CentOS, there should be a file /etc/network/interfaces which contains the information on the IP address. There may be some other files that are read in by this, but look for the eth0 entry and adjust accordingly. If it is like other flavor of Linux, you should be able to restart the networking module using
sudo /etc/init.d/networking restart
But, this is all predicated on whether this distro is similar to more popular distrubutions (which it may not be).
Cheers, cirrus
09-21-2016 10:40 AM
If I remember correctly (I also don't have a target with me to test) chaging the IP address in MAX or through the web interface does more than just change the IP address on the target. It also updates other configuration files that the labview run-time and other NI drivers rely on.
So, you can likely find a way to change the address for your interface (ifconfig, config file change) but it may disrupt an NI service/runtime/driver. I believe that's the main reason why its recommended to use MAX or the web interface to make this change.
09-21-2016 10:41 AM
cirrusio wrote:
I don't have my LV RT system in front of me, but if it is like Ubuntu or CentOS, there should be a file /etc/network/interfaces which contains the information on the IP address. There may be some other files that are read in by this, but look for the eth0 entry and adjust accordingly. If it is like other flavor of Linux, you should be able to restart the networking module using
sudo /etc/init.d/networking restart
But, this is all predicated on whether this distro is similar to more popular distrubutions (which it may not be).
Cheers, cirrus
Sadly, the filesystem leads you to believe that this is the appropriate approach (the interfaces file as well as if(up|down) trigger script folders exist) however this system is not used and has not been removed from the image (there is an internal issue tracker item to clarify this).
Mrmas,
Back to your original question: do you need the change to be persistent or temporary?
09-21-2016 11:14 AM
I needed the change to be persistent, and I am happy to say it seems like the webinterface works. I have not tried this on more than my own development computer yet though so it could be because of something i have installed, but as i understand the webinterface only needs silverlight installed to run? If so i think that solves my problem. Thank you very much.
I would however be interested to know of other methodes, and as you mention BradM the web solution i guess is persistent and i would also like to know a methode for a temporary change which i could need later.
Regards
09-21-2016 11:29 AM
Mrmas,
Using traditional linux-y commands for adjusting networking configurations will be temporary. Additionally, the web interface will interact with a lower-level tool for managing the NI-specific management of network configuration (as well as other system configuration facets).
NOTE: This is not a supported interface! It can and may change at some future release!
The nirtcfg tool can be used to view or modify the system configuration without the need to use the web interface.
07-18-2024 01:27 AM
Now that we for some reason no longer have a proper web interface to make such changes in a user friendly and safe(r) way without special software I found this thread, and a page that describes the use of nirtcfg, promisingly named:
Changing NI Linux RT OS Network Settings Using Command Prompt
The page describes how to set the gateway, subnet mask, turn on DHCP etc, but for some reason fails to describe how to set the actual (static) IP-address:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000xDY9CAM&l=en-NO
So here is an example of that command:
nirtcfg --set section=ETH0,token=ip_address,value=192.168.1.5
/etc/init.d/networking restart
07-25-2024 01:12 AM
would it be possible to create -with LabVIEW - an EXE similar to the RAD Utility that would send the command via SSH to the target?
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
07-25-2024 04:29 AM
You can use the system configuration API instead if you are going to make and install a custom application. Or install NI Max. Both can be a big hassle to get to a customer and get installed and understood though compared to just browsing to the given IP with a regular web browser. The old silverlight-based solution was OK as long as Silverlight was common or easy to get, but needed to be replaced now. Unfortunately it has just been replaced with a non-functional page looking like something made in the late 90s...