macvlan with portainer no eth0 interface existing eno1 is not adopted

I’m desperate for macvlan right now. My Ubuntu shows me no eth0 interface under ifconfig -a but the eno1 which is my network interface.
But if I want to use it in MACVLAN, I get the error message:
invalid subinterface vlan name eno1, example formatting is eth0.10

Where is my thinking wrong?
Thanks in advance.

p.s. use Ubuntu in the current LTS version

Please share all steps relevant for someone else to repeat your setup.

Are you really using Docker Desktop? Because that wouldn’t work with macvlan.

Oh, good point. I haven’t noticed the topic is posted in Docker Desktop for Linux.

Yes using Docker Desktop and Portainer. In Portainer can be Set Macvlan. I tried to Upload some screenshots but seems new User can not upload.

Portainer doesn’t know where it is running. There is no point of using MacVLAN in Docker Desktop since the virtual machine in which containers are running (yes, always, even on Linux) has its own private network. You can’t use your real LAN.

So you mean i have to use docker without desktop right?
Are there any other way to get for every container its own ip adress?

Every container has its own IP address just not on your LAN and you almost never need it since you can use a reverse proxy/load balancer.

If you ask whether you can make containers use a LAN ip with Docker desktop, there is no way. As I wrote above, you can run a proxy server and route traffic through the proxy based on DNS.

How about IPVLAN?
Would this works?
Can you send me a howto for the solution you recommended?

Doesn’t matter. That still needs the physical network, not an isolated network inside a virtual machine.

hm but thats not the solution. That is in my understanding a solution for http. But for example IObroker need many other ports depending on which protocol and which sensor i want to collect. Thats why i want independend IP adresses.

Traefik can balance layer 7 traffic for http(s) endpoints and layer 4 traffic for udp/tcp ports. While layer 7 traffic allows rules based on hostname and path, layer 4 does not.

So if you need mqtt on a different port, then Traefik can still use layer4 balancing from the host port to a container.

It boils down to two options:

  • stick with Docker Desktop and use Traefik
  • replace Docker Desktop with docker-ce, and use macvlan with docker-ce

Without adding more options I just wanted to mention that the main purpose of Docker Desktop is making development easier, but it won’t make everything easier so if you are not using it for development, I still recommend using Docker CE.