• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generate VLAN interfaces in container
#1
Hey there,

is it possible to create several vlan interfaces in a conainer to set up a multicast-relay?

Regards Frank
  Reply
#2
Hi Frank,

our Docker Runtime supports the "macvlan" driver.
https://docs.docker.com/v17.09/engine/us...d-macvlan/

You can define this kind of interfaces with the preinstalled docker management tool Portainer.
https://www.portainer.io/2018/09/using-m...tainer-io/

Best Regards
Patrick
  Reply
#3
OK but i think this is not what i mean. We have serveral VLANs in our Network and i need a container that can connect to some of these VLANs. So the LAN port of the netPi has to be trunk and i have to configure the vlan settings on the netPi. Is this possible?
  Reply
#4
I have one question. Do you succeed to setup this scenario on a standard Raspberry Pi before? I mean without the usage of Docker, just plain Raspbian OS?

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

  Reply
#5
Yes, i configured serveral virtual network interfaces with parent device eth0. The virtual devices are eth0.10 eth0.20 and so on. They have access to the several vlans. The problem i think is that it is not possible to configure these vlan devices for the docker host and therfor in my opinion it is not possible to get access to a vlan from a container.

What i want to do is something like this:
[Image: multi_tenant_8021q_vlans.png]

Can i use a USB/LAN adapter and configure all network parameters in a container? So that i don't have to use the eth0 interface of the netPi.
  Reply
#6
Ok I see.

Let me repeat what I have understood:

a.) till today you realized everything on the Raspberry Pi under Raspbian - which works fine -. I suppose you are using the "apt-get install vlan" command to install vlan support on your standard Raspberry Pi, right?

b.) and you did not repeat the same test on your Raspberry Pi using a Docker container yet? I am asking cause your picture shows a Docker Host and several containers, so have you realized the very same setup already on your Raspberry Pi using this setup and Docker techniques successfully?

Sorry for asking these questions  .. you see we do not have any experience collected yet used vlan tagging.

I can confirm that using a USB to LAN adapter like based on Realtek chip RTL8153 works on netPI since the chip driver is included in the netPI host Linux. Once you plug it in you have a eth1, eth2 ... port instantly.

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

  Reply
#7
(September-24th-2019, 04:16 PM)Armin@netPI Wrote: Ok I see.

Let me repeat what I have understood:

a.) till today you realized everything on the Raspberry Pi under Raspbian - which works fine -. I suppose you are using the "apt-get install vlan" command to install vlan support on your standard Raspberry Pi, right?

b.) and you did not repeat the same test on your Raspberry Pi using a Docker container yet? I am asking cause your picture shows a Docker Host and several containers, so have you realized the very same setup already on your Raspberry Pi using this setup and Docker techniques successfully?

Sorry for asking these questions  .. you see we do not have any experience collected yet used vlan tagging.

I can confirm that using a USB to LAN adapter like based on Realtek chip RTL8153 works on netPI since the chip driver is included in the netPI host Linux. Once you plug it in you have a eth1, eth2 ... port instantly.

Thx
Armin

a.) Yes it is working fine with a standard RaspberryPi and Raspbian. Yes i used the vlan package to set up the system.

b.) I tried to use the vlan package in a docker container but this is not working. The configuration parameters are stored normaly in /etc/network/interfaces.d/ and this folder is missing in a container. These parameter have to be loaded on startup and i don't know how to do this without the network deamon in the container.

I tried a USB/LAN adapter and i can see the eth1 in the control panel. But it is the same as with the eth0, i can not configure it in the container...
  Reply
#8
Hi there, I checked VLAN with netPI and it works.

My notebook network card and my netPI are in the same office network. My netPI eth0 official ip address is 10.11.5.13 received through the office dhcp server and my my notebook network card I configured to 172.20.10.129 which is totally out of scope of the office network.

Fitting to this 172.20.10.129 address then I setup corresponding VLAN configuration

   

and then a netPI VLAN network as next

   

and finally I started a container with this network setup on my netPI.

   

Immediately after the container deployment I was able to ping the container at 172.20.10.128 from my notebook since the container got member of the configured VLAN network running on netPI across eth0 (which physically has 10.11.10.13 as IP address)

Thx
Armin


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

  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [SOLVED] activate LED1/2 with Node-RED + fieldbus nodes container Christian_Rau 6 88 October-21st-2019, 10:30 AM
Last Post: Armin@netPI
  Cannot start container Magnus 7 34 October-16th-2019, 01:00 PM
Last Post: Armin@netPI
  create container in Portainer v1.12.4 dcatteeu 2 23 September-9th-2019, 12:12 PM
Last Post: dcatteeu
  UMTS/LTE support via USB router/modem sticks in a container Armin@netPI 3 153 September-5th-2019, 02:07 PM
Last Post: Armin@netPI
  Exporting and importing container images Armin@netPI 0 23 August-23rd-2019, 10:39 AM
Last Post: Armin@netPI
  Ready-to-deploy: full featured Node-RED container Armin@netPI 5 77 July-25th-2019, 06:16 AM
Last Post: Armin@netPI
  New Container example "OPC UA server" Armin@netPI 0 17 April-12th-2019, 11:51 AM
Last Post: Armin@netPI
  Official Node-RED container Armin@netPI 0 19 April-5th-2019, 10:39 AM
Last Post: Armin@netPI
  Multi-stage builds for slim container images Armin@netPI 0 10 February-7th-2019, 04:14 PM
Last Post: Armin@netPI
Information [INFO] Setting the correct timezone in a container Armin@netPI 0 12 February-3rd-2019, 08:23 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)