• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RTE3 Use real time ethernet as "normal" ethernet interface
#11
I have one thing in addition as a remark for you concerning databases on embedded devices like netPI.

You know that netPI includes an SD-card which is a NAND flash with limited write cycles by its very nature.

I posted a thread a while ago dedicated to this topic: https://forum.hilscher.com/Thread-Memory-card-endurance
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#12
Yes, I have read about this, but thanks for the reminder.
We don't have that much data, so it should last long enough.

Thanks,
Andi
  Reply
#13
By the way I like your idea about the DHCP option. I am currenly evaluating the option to support it.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#14
DHCP mode is now supported by the container and can be configured through environment variables.

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#15
Hey Armin,

thanks for the added feature.

When I'm not using DHCP-Mode but configure the adress manually, I've got a problem with the subnet_mask. It always shows "255.0.0.0" instead of the configured "255.255.255.0". I have this behaviour using the old and the new "dhcp-version" of the image. If I don't configure the IP-Adress but use the standard one, the subnet_mask is "255.255.255.0" though.

BR,
Andi
  Reply
#16
What do you mean exactly with "address manually"?

Do you mean the new implemented function to set those values across environment variables during container's start now?

And what do you mean with the standard one? In case you don't specify anything the container falls back to 192.168.253.1. Is it this address you mean as standard one?

The settings of what is configured is stored in the file /etc/network/interfaces.d/cifx0 dynamically during container's start. So in your case to make sure the file has the correct values use the embedded console of portainer.io web GUI to jump into the container and print out what's in the file.

The file is generated during the container's first start
Code:
# create the corresponding Ethernet configuration file
if [ ! -f /etc/network/interfaces.d/cifx0 ]
  then

  touch /etc/network/interfaces.d/cifx0
  echo "auto cifx0" >> /etc/network/interfaces.d/cifx0

  if [ -z "$IP_ADDRESS" ]
  then
     echo "iface cifx0 inet static" >> /etc/network/interfaces.d/cifx0
     echo "address 192.168.253.1" >>/etc/network/interfaces.d/cifx0
     echo "network 255.255.255.0" >>/etc/network/interfaces.d/cifx0
  else

     if [ "$IP_ADDRESS" == "dhcp" ]
     then
       echo "allow-hotplug cifx0" >> /etc/network/interfaces.d/cifx0
       echo "iface cifx0 inet dhcp" >>/etc/network/interfaces.d/cifx0
     else
       echo "iface cifx0 inet static" >> /etc/network/interfaces.d/cifx0
       echo "address" $IP_ADDRESS >>/etc/network/interfaces.d/cifx0
       echo "network" $SUBNET_MASK >>/etc/network/interfaces.d/cifx0
       echo "gateway" $GATEWAY >>/etc/network/interfaces.d/cifx0
     fi
  fi
fi



Thx
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#17
Hey Armin,

I will try to make it clearer:

Quote:And what do you mean with the standard one? In case you don't specify anything the container falls back to 192.168.253.1. Is it this address you mean as standard one?

With the "standard-configuration" I meant the ip-adress and subnetmask that are used when non are specified by the user.

Quote:Do you mean the new implemented function to set those values across environment variables during container's start now?

I have the same behaviour using the "old"-Image version and setting the network configuration in the file "/etc/network/interfaces.d/cifx0", as if using the "new" Version and declaring the network-parameters using the environment variables.

Quote:The settings of what is configured is stored in the file /etc/network/interfaces.d/cifx0 dynamically during container's start. So in your case to make sure the file has the correct values use the embedded console of portainer.io web GUI to jump into the container and print out what's in the file.

My "/etc/network/interfaces.d/cifx0"-File of the "new"-Image-Version with network-params specified through environment variables looks like this:
Code:
auto cifx0
iface cifx0 inet static
address 10.7.1.115
network 255.255.255.0
gateway 10.7.1.1

But the network configuration is as followed:

Code:
5: cifx0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
   link/ether 00:02:a2:49:bc:f0 brd ff:ff:ff:ff:ff:ff
   inet 10.7.1.115/8 brd 10.255.255.255 scope global cifx0
      valid_lft forever preferred_lft forever

And the "Network"->"Lan"-Section of the Control Panel shows a subnet-mask of "255.0.0.0" for the "cifx0"-adapter.


Thanks!

BR,
Andi
  Reply
#18
Dear Andi,

based on your last sentence "And the "Network"->"Lan"-Section of the Control Panel shows a subnet-mask of "255.0.0.0" for the "cifx0"-adapter." I see that your are NOT using a Hilscher netPI device as it is maintained in this forum. The device we are discussing here in the forum are of type NIOT-E-NPI3-51-EN-RE and NIOT-E-NPI3-EN.

The device your are using is of type NIOT-E-TPI51-EN-RE. This has a totally different software preloaded as netPI which comes with Docker only. Your device also hosts software like "Node-RED" etc. And this is indeed the problem. On your device the LAN container we are talking about is only working if you disable Node-RED cause Node-RED is using and accessing the same Industrial Network processor as the container and this will NEVER EVER work.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#19
Hey Armin,

the device I am using is of type "NIOT-E-NPI3-51-EN-RE", as it is written on the box, the device and in the Info-Center in the Control Panel. The only service I can see in the "service list"-section is Docker.

The "cifx0"-adapter gets displayed on the "Network"-"Lan"-Section as soon as I have started the "netpi-netx-ethernet-lan"-Container, but it is not maintainable there, I just see the configured settings.

BR,
Andi
  Reply
#20
Wow that effect is totally new to me. I know the settings dialog of "cifx0" for device NIOT-E-TPI... and I am really wondering why it appears there on netPI cause the cifX0 is available on the container only and normally nowhere else. So this is why I am not wondering that the settings dialog you see has no influence on the settings made in the container.

Just let me ask you this. Do you use the network mode "host" when you start your container?

I made tests with the new container and set the ip settings via the environment variables. I set IP_ADDRESS to 192.168.0.1 and SUB_NETMASK to 255.255.255.0 and when I jump into the container with a shell and call "ip addr show" it says 192.168.0.1/24 as it should. I don't see the subnet mask misconfigured.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  activate Ethernet cifx0 Christian_Rau 3 2,489 March-26th-2021, 05:28 AM
Last Post: Armin@netPI
  Web browser reports "insecure connection" when accessing netPI for the first time Armin@netPI 2 2,713 January-31st-2020, 07:07 AM
Last Post: Armin@netPI
  Profinet Startup Time Schranz 3 3,353 November-18th-2019, 03:22 PM
Last Post: Armin@netPI
  normal ethernet port using for Profinet MGharat 4 4,583 August-7th-2019, 10:39 AM
Last Post: hannes
  Launching multi-containers at a time - Docker stacks Armin@netPI 0 1,841 June-4th-2019, 04:11 PM
Last Post: Armin@netPI
  niot-e-npi3-51-en (RS485 <-> Industrial Ethernet) merklethomas 6 4,641 April-26th-2019, 01:38 PM
Last Post: Armin@netPI
  Modbus TCP Connection via RTE Ethernet Ports Flo_Lo 18 10,863 April-15th-2019, 09:50 PM
Last Post: Armin@netPI
  USB/Ethernet adapter slos 4 3,585 April-8th-2019, 09:11 AM
Last Post: slos
  [SOLVED] Use netX interface as profinet controller jromero248 2 3,085 January-10th-2019, 12:30 PM
Last Post: jromero248
  IP Realtime Ethernet michu252 7 4,681 August-21st-2018, 10:41 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 2 Guest(s)