• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Container IP address - Network Options
#1
Hello all, looking for a little advice, all I want is a RaspberryPi (with Codesys) container that I can set (and change afterwards) its IP address. What network option do I need when creating the container (Bridge, host, Container).
  Reply
#2
Hello Kim, you are right that there are network options like "bridge" and "host" you can generally select when you start a container.

But those options do not have an immediate effect on the ip network address that is used by a container on a Docker host like netPI. They have only an effect if A.) a container shares the ip network stack of the Docker Host in case you select "host" (and hence get's the same ip network address as the host) or if B.) each container is started with a separate ip network stack and get an internal local ip address within the host system. But looking from "outside" to netPI - in detail I mean to the upper single RJ45 ethernet port - the ip address that is effective is the one you set up in netPI's main Web GUI under the menu item "network\LAN". This ip network address can be either DHCP based or static, but you cannot change it in a container dynamically. Once set it is fixed.

But Kim as you have maybe recognized netPI also has two additinal RJ45 network ports, which are made for industrial ethernet networks ... but these two can be configured also to support normal TCP/IP communication. And the best of it is, that for these two network ports you can set up ip addresses dynamically in the container. How you do that is explained in the Docker example container we made public here. Since all Hilscher Docker containers are available in source code also, you can have a look here how the container does it and how to set up the industrial network controller to become a standard ethernet network controller.

So Kim your work will be now to combine the Codesys example container and the Ethernet-network example container into one container and load it to your netPI. Then still the single ethernet port is unconfigureable in a container ... but the two additional network ports get configureable dynamically as explained in the readme text of the network example container.


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

  Reply
#3
Armin, Thanks for the advice. I will give it a go.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  EtherCAT Master: any options? maiorfi 45 397 May-30th-2019, 07:55 PM
Last Post: Armin@netPI
  [SOLVED] Slow network connection Andi 5 29 May-22nd-2019, 05:16 PM
Last Post: Armin@netPI
  [SOLVED] Portainer does not start container Steres 3 201 October-16th-2018, 06:54 PM
Last Post: Armin@netPI
  [SOLVED] USB Serial device mapping into Container hannes 12 583 August-27th-2018, 04:50 PM
Last Post: Armin@netPI
  Write to usb Drive from container SebastianSoller 12 277 April-25th-2018, 08:16 PM
Last Post: SebastianSoller
  3 Network Ports possible on NIOT-E-NPI3-51-EN-RE? yulian 7 196 April-3rd-2018, 02:57 PM
Last Post: Armin@netPI
  using of a USB memory stick inside a container for share Michael_d 2 112 March-3rd-2018, 06:19 PM
Last Post: Michael_d
  NTP setup (Network time protocol) zulliger@software-natives.ch 1 97 February-7th-2018, 09:05 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)