• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RTE3 Use real time ethernet as "normal" ethernet interface
#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


Messages In This Thread
RE: RTE3 Use real time ethernet as "normal" ethernet interface - by Armin@netPI - April-9th-2019, 07:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  activate Ethernet cifx0 Christian_Rau 3 2,624 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,842 January-31st-2020, 07:07 AM
Last Post: Armin@netPI
  Profinet Startup Time Schranz 3 3,518 November-18th-2019, 03:22 PM
Last Post: Armin@netPI
  normal ethernet port using for Profinet MGharat 4 4,763 August-7th-2019, 10:39 AM
Last Post: hannes
  Launching multi-containers at a time - Docker stacks Armin@netPI 0 1,908 June-4th-2019, 04:11 PM
Last Post: Armin@netPI
  niot-e-npi3-51-en (RS485 <-> Industrial Ethernet) merklethomas 6 4,912 April-26th-2019, 01:38 PM
Last Post: Armin@netPI
  Modbus TCP Connection via RTE Ethernet Ports Flo_Lo 18 11,712 April-15th-2019, 09:50 PM
Last Post: Armin@netPI
  USB/Ethernet adapter slos 4 3,845 April-8th-2019, 09:11 AM
Last Post: slos
  [SOLVED] Use netX interface as profinet controller jromero248 2 3,206 January-10th-2019, 12:30 PM
Last Post: jromero248
  IP Realtime Ethernet michu252 7 4,949 August-21st-2018, 10:41 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)