Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

One interesting limitation I encountered is that other containers cannot resolve to the Additional Public IP. Not sure why and looking into fixing this.

I also believe you must have,

  • 1 macvlan mapped to 1 container interface 
  • each interface must have different static IP addresses

I need to test the restriction of 1 macvlan to 1 container interface more closely. I tried replicating my steps in a new container and though it got the IP address, I could not connect.

macvlan mac address

The first thing to do is to create a mac address for the macvlan interface we will create on the host.

According to this article the Second bit of the most significant Byte indicates if the MAC address is Locally locally or Universally universally administered. (I think locally is better on for the public facing so you do not collide with other mac addresses). When generating MAC addresses for macvlan, this bit should be set to '1', indicating it is Locally locally administered. As such, translated to a mac address any of these numbers are locally managed and you will not need to worry about colliding with the larger Internet,

...

Warning

You can not use the same MAC interface on multiple containers on the same host. Otherwise, you will not be able to start you container and receive the error message about your interface already being in use.

Command Line macvlan

(move this section out as a subpage)

You can use the command line inside your container to quickly create a macvlan and test, but it will disappear after reboot,

Code Block
languagebash
ip link add mvlan0 link eth0 address 8a:38:2a:cc:d7:aa type macvlan mode bridge
ifconfig mvlan0 up

I believe you must have 1 macvlan mapped to 1 container interface and they all must have different static IP addresses. Need to test. I tried replicating my steps in a new container and though it got the IP address, I could not connect.

... add steps here to confirm ..

Create a Permanent macvlan on the Host

...

Notice that the MAC address is locally generated. This The mavclan interface is actually not directly used and the MAC address will not actually register with anything. I am uncertain if it matters, so I have put in a static rather than generated MAC address out of preference (I don't like the idea of it changing on every boot). Not using a MAC address at all here might work too. If you the reader has time, let me know.

...