• 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
  TOSILOCK for CONTAINER COswald 3 2,183 July-13th-2021, 11:32 AM
Last Post: Armin@netPI
  Access to RTC from my own container application tad 1 3,520 March-19th-2021, 02:58 PM
Last Post: Armin@netPI
  [SOLVED] Starting services/commands/scripts at startup of a container Jonas.Sellmann@outlook.de 9 6,014 March-9th-2021, 08:47 AM
Last Post: WalterSchaefer
  OpenVPN container Armin@netPI 0 1,614 January-3rd-2021, 12:13 PM
Last Post: Armin@netPI
  operating Console of a container on netPI connected to Wi-Fi tethering tad 3 2,611 December-3rd-2020, 12:32 PM
Last Post: tad
  NIOT-E-NPIX-4DI4DO with netpi-netx container WalterSchaefer 3 6,475 November-25th-2020, 01:06 PM
Last Post: zen89
  NPIX-4DI4DO and NetPi-Nodered container issues alhammi 4 7,583 November-16th-2020, 01:35 PM
Last Post: alhammi
  Get host MAC via REST API inside container bschandra 4 3,640 November-16th-2020, 09:26 AM
Last Post: bschandra
  Exporting and importing container images Armin@netPI 3 3,066 May-20th-2020, 11:24 AM
Last Post: COswald
Exclamation Creating a container Linnerz 6 4,429 March-6th-2020, 02:47 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)