Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing multiple subnets with CRIO

thanks BradM! It is useful to know that it is even possible.

0 Kudos
Message 11 of 17
(1,418 Views)

There are some good resources out there as you go along working with your setup, but be aware of some of the differences between distributions, especially along the lines of specific tools used when dealing with the interfaces. The Arch Linux article has a good start describing what needs to happen using distribution-agnostic tools, but then moves on to describe setting thins up with systemd, the system initialization system that NI Linux RT doesn't use. (article here: https://wiki.archlinux.org/index.php/VLAN)

 

An additional thing that you'll need to be warry of is NI Linux RT's use of ifplugd for managing interfaces automatically. While playing around with VLANs, I'd recommend enabling serial console, logging on through that, and completely disabling the ifplugd-launching /etc/init.d/networking script, making sure that ifplugd is not running in the background, messing around with the interfaces that you're working with.

0 Kudos
Message 12 of 17
(1,414 Views)

@lisam88 wrote:

Is it possible for a cRIO to access multiple subnets and how can this be achieved?


Trivial. Just use interface aliases

 

ifconfig eth0:1 inet <ipaddr> netmask <mask> 

 

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 13 of 17
(1,299 Views)

@lisam88 wrote:

NI said it's not possible to tag VLANs on a cRIO port,

Maybe they just wanna sell more of their expensive eth cards. Actually, it's pretty simple - it's just a linux box. (maybe you'll have to recompile the kernel if they disabled vlan support)
Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 14 of 17
(1,299 Views)

Welcome metux,

 

We've already covered that the OP got some misinformation, that it is indeed possible with a bit of reading and work, this would be all that is required for the original question. The kernel shipped with the controllers (and software updates to the host that install new images/kernels to the controllers) have 802.1Q VLAN tagging enabled.

 

You say "it's pretty simple": it is simple for someone who has Linux experience working with networking and generally troubleshooting on a Linux system when something is not working correctly, but for someone who does not have this experience it's going to take some time, reading, experimenting, and learning. I encourage this but realize that not everyone wants to learn about working with embedded Linux systems, they have more important things occupying their time.

 

Finally, just to clarify, there aren't "expensive eth cards" NI sells for a Compact RIO: it's either the ports that are built-in (usually 2, including on the 9035 that the OP is using) or a USB-based network adapter.

0 Kudos
Message 15 of 17
(1,294 Views)

You say "it's pretty simple": it is simple for someone who has Linux experience working with networking and generally troubleshooting on a Linux system when something is not working correctly, but for someone who does not have this experience it's going to take some time, reading, experimenting, and learning. I encourage this but realize that not everyone wants to learn about working with embedded Linux systems, they have more important things occupying their time.

IMHO, the problem is that these boxes are basicly sold als (blackbox) PLC, that ought to be programmed via LabView - the fact that they're Linux boxes that just happen to be shipped with some homebrewn distro w/ some runtime for the LV stuff is more a side node.

 

You should turn that around and tell clearly that these are just microcomputers running Linux, that come with the PLC stuff preinstalled. That would make it clear for everybody that they're coping w/ a usual Linux system, and the PLC stuff is just yet another programming environment ontop (same layer as, lets say, a python or jee environment).  

We're here, again, at the point that marketing often is far away from reality and just tries to tell people what they (supposedly) wanna hear, instead of what really *is*.

We both know better, but the common customer out there does not - so we gotta tell 'em clearly - so they know what to expect and where to get proper documentation for what. (basicly it's communication and education problem, not a technical one) 

 

Apropos marketing vs. reality: NI officially claims to provide Linux supports. Actually, hat's just wrong - there's only support for certain *specific* (binary) Distros (in specific versions) and even just specific kernel *images*. The forum is full with troubles that root back to exactly that root problem. Binary kernel drivers (as well as binary libraries) are just unusable for any serious industrial application.

 

Finally, just to clarify, there aren't "expensive eth cards" NI sells for a Compact RIO: it's either the ports that are built-in (usually 2, including on the 9035 that the OP is using) or a USB-based network adapter.


Assuming these devices run with the shipped kernel out-of-the-box (which I wouldn't rely on).

Otherwise all hell breaks loose, eg. due proprietary kernel drivers.

(you don't expect people to backport drivers and bugfixes to your old vendor kernel, do you ? 🐵

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 16 of 17
(1,286 Views)

Oh my dear - that forum sw ate up some blockquote tags, so quotes and my own comments got mixed up ...

   

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 17 of 17
(1,276 Views)