← All notes

Docker macvlan: attach containers to a physical network

Answer: The macvlan driver only works on Linux hosts.

When to use it

Some legacy applications expect to be directly connected to the physical network.

Applications which monitor network traffic can have that same expectation.

You need to designate a physical interface on your Docker host, as well as the subnet and gateway.

You can even isolate your Macvlan networks using different physical network interfaces.

Platform limits

Requires at least Linux kernel version 3.9, and version 4.0 or later is recommended.

Docker Desktop for Mac or Windows, and Docker Engine on Windows, do not support this driver.

Most cloud providers block macvlan networking.

You may need physical access to your networking equipment.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Macvlan network driver; Docker, Inc., Macvlan documentation (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Macvlan network driver; Docker, Inc., Macvlan documentation (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.

Cite this

Permanent ID: iil:note:eemz4tbc

iinventedlight. 2026. "Docker macvlan: attach containers to a physical network." iinventedlight Library, iil:note:eemz4tbc, version of 2026-11-24. https://iinventedlight.com/library/notes/docker-macvlan/. License: CC-BY-4.0.

@misc{iil_note_eemz4tbc,
  author = {{iinventedlight}},
  title = {{Docker macvlan: attach containers to a physical network}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-24},
  url = {https://iinventedlight.com/library/notes/docker-macvlan/},
  note = {Permanent ID iil:note:eemz4tbc. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-macvlan.md.