Create multiple MacVlan on single ethernet interface

Dear all,

I’m a newbie with portainer and I would like to create Multiple MacVlan on a single ethernet port.

In fact in my network setup, I have 2 differents Vlans (CORE and IOT) with the following settings:

CORE: 10.10.70.0/24
IOT: 10.10.55.0/24

On my server (OMV) with Docker/portainer, I have a single ethernet interface (enp7s0).

Is it possible to set 2 different MacVlans (MacVlan_CORE and MacVlan_IOT) in Portainer? And How?

In a second time, I would like to deploy a Docker container (Home Assistant) with a access to both Vlans (CORE and IOT) with this kind of stack:

version: "2"

services:
homeassistant:
container_name: “Home-Assistant”
image: homeassistant/home-assistant:stable
restart: always
volumes:
- /srv/dev-disk-by-label-Media/AppData/HomeAssistant:/config
environment:
- TZ=Europe/Paris
hostname: ‘Home-Assistant’
networks:
macvlan_HA_CORE:
mac_address: 02:42:ac:11:00:11
ipv4_address: 10.10.70.103
macvlan_HA_IOT:
mac_address: 02:42:ac:11:00:12
ipv4_address: 10.10.55.103

networks:
macvlan_HA_CORE:
external:
name: MacVlan_CORE
macvlan_HA_IOT:
external:
name: MacVlan_IOT

But I have a problem with the creation of both MacVlan in Portainer… with the following error

image

Thanks in advance for your support

BR

Hi
could u confirm how many network interfaces are there on the system

Hello @bala.natarajan

In fact I have 2 physical interfaces on my server (One is dedicated for maintenance task).

My main interface (enp7s0) is connected to my Unifi switch.

I would like create MacVlan on this one (enp7s0) to be able de access to my different Vlans (CORE and IOT).

BR

Hi
Its not possible from portainer ui. I think its docker network feature, requesting you to post on docker slack/moby github.

Hi @bala.natarajan

Thanks for your answer. I will try directly with docker.

Thanks for your help

Can you link the forum that discussing your issue?