09-09-2015 09:13 AM
Hi guys
I try to assign multiple IP addresses to one of my Linux based cRIO-9067 Ethernet ports.
I where able to do this temporally by using PuTTY and the following command (ip addr add [ip]/[mask-digits] dev [nic] => Example "ip addr add 10.112.1.65/24 dev eth0") But after rebooting the system everything is lost as has to be configured again.
I found several Links which for doing this permanent. They describe to edit "/etc/sysconfig/network-scripts" or "/etc/network/interfaces". Network-scripts I haven't found on the cRIO target. The interfaces file can be found and edited. I tried already different command but without any results.
How to assign multiple IP addresses to one network interface
http://xmodulo.com/how-to-assign-multiple-ip-addresses-to-one-network-interface-on-centos.html
Add a secondary IP to Linux
https://www.garron.me/en/linux/add-secondary-ip-linux.html
How can I (from CLI) assign multiple IP addresses to one interface?
http://askubuntu.com/questions/547289/how-can-i-from-cli-assign-multiple-ip-addresses-to-one-interfa...
It would be great to get there some help.
Many Thanks.
Andreas
Solved! Go to Solution.
09-09-2015 02:27 PM
A.Scheuber wrote:
I found several Links which for doing this permanent. They describe to edit "/etc/sysconfig/network-scripts" or "/etc/network/interfaces". Network-scripts I haven't found on the cRIO target. The interfaces file can be found and edited. I tried already different command but without any results.
Your controller uses ifplugd, not the traditional networking infrastructure as used by Debian or Red Hat based distributions.
Has someone already done something in this style?
IIRC, no. And I could imagine there are good reasons why. Outside of IPv4LL, very few networks route multiple IP subnets over the same layer 2 network. In particular, VLANs offer much better partitioning.
Is there another file I have to edit?
You will want to edit /etc/ifplugd/ifplugd.action which is a symlink to /etc/natinst/networking/ifplugd.script, such that
Just to make this clear: any errors in your changes will break ALL networking on the controller. On the bright side, the changes don't affect safemode, so if something bad happens, and you're not connected over serial console, you can always force reboot into safe mode (holding the reset button down), ssh back in, and fix the script.
09-11-2015 03:19 AM
Hi Richard
Many Thanks for your replay.
You where right by editing the ifplugd.action file. (And thanks for the tip with safemode).
If there are other who needs something similar I created very step by step Tutorial and
a LabVIEW sample project to test it later. They are attached to this post.
Thanks
Andreas
05-27-2016 08:33 AM
Thanks Andreas and Richard, this worked perfectly!
01-03-2017 11:22 PM
I followed the instructions on two cRIO-9035. it worked on one but not the other. as noted, this broke the network connectivity on the 2nd cRIO. I tried to modify the file /etc/ifplugd/ifplugd.action by booting into safe mode, but its content did not show my changes. it seems that safemode moved the orginal file to another place and replaced the file with its own, then upon booting back into normal mode, the original file was moved back.
where could the original files be in safe mode?
thanks!
01-04-2017 09:26 AM
The filesystem partition used in run mode (the normal execution mode) is mounted at /mnt/userfs while the target is booted into safe mode.
For this particular case there is also the complication that the 'ifplugd.action' file is a symbolic link to another file:
# ls -l /etc/ifplugd/ifplugd.action
lrwxrwxrwx 1 admin administ 38 Jun 9 2016 /etc/ifplugd/ifplugd.action -> /etc/natinst/networking/ifplugd.script
Putting these two pieces of information together the file you want to edit while in safe mode is at:
/mnt/userfs/etc/natinst/networking/ifplugd.script
01-04-2017 08:38 PM
Thank you very much for the information, Crisan!
01-16-2017 08:22 AM
Hi rtollert,
How do VLANs work with a cRIO? Is it possible to have multiple VLANs assigned to one cRIO port?