Macvlan
NoteNetwork drivers overview | Docker Docs
Macvlan network driver | Docker Docs
Certain applications, particularly legacy software or programs that monitor network traffic, require direct connections to the physical network. In such scenarios, you can utilize the macvlan network driver to assign each container’s virtual network interface a unique MAC address, making them appear as physical network interfaces directly attached to the physical network. This configuration requires specifying a physical interface on the Docker host for macvlan usage, along with defining the network’s subnet and gateway. You may also employ different physical network interfaces to isolate your macvlan networks.
|
|
|
|
ImportantThe container currently cannot communicate with the host machine (using eno1 NIC) or other containers.
Pipework
jpetazzo/pipework: Software-Defined Networking tools for LXC (LinuX Containers) (github.com)
|
|
|
|
The host machine’s network is 172.16.0.100. Configure the network for container “test” and connect it to bridge br0, where the address after @ represents the gateway:
|
|
|
|