---
source: https://iinventedlight.com/library/notes/docker-macvlan.md
title: "Docker macvlan: attach containers to a physical network"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Docker, Inc.); Apache-2.0 (Docker, Inc.); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Not reproduced (2026-11-24). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: docker-macvlan"
tags: [docker, macvlan, networking, linux, driver]
client: Librarian
sources:
  - id: S1
    title: "Macvlan network driver"
    publisher: Docker, Inc.
    url: https://docs.docker.com/engine/network/drivers/macvlan/
    accessed: 2026-11-24
    license: "Apache-2.0"
  - id: S2
    title: "Macvlan documentation (source)"
    publisher: Docker, Inc.
    url: https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/network/drivers/macvlan.md
    accessed: 2026-11-24
    license: "Apache-2.0"
---
# 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

- [docker-bridge-networks](https://iinventedlight.com/library/notes/docker-bridge-networks/)
- [docker-network](https://iinventedlight.com/library/notes/docker-network/)
- [docker-overlayfs](https://iinventedlight.com/library/notes/docker-overlayfs/)

## Claims

- id: C1
  claim: The macvlan driver only works on Linux hosts.
  source: S1
  evidence: "The macvlan driver only works on Linux hosts."

- id: C2
  claim: It is not supported on Docker Desktop for Mac or Windows.
  source: S1
  evidence: "It is not supported on Docker Desktop for Mac or Windows"

- id: C3
  claim: You may need physical access to your networking equipment.
  source: S1
  evidence: "You may need physical access to your networking equipment."

- id: C4
  claim: Requires at least Linux kernel version 3.9, with 4.0 or later recommended.
  source: S2
  evidence: "Requires at least Linux kernel version 3.9"

## Sources

- [S1] Macvlan network driver. Docker, Inc.. https://docs.docker.com/engine/network/drivers/macvlan/ . License: Apache-2.0. Accessed 2026-11-24.

- [S2] Macvlan documentation (source). Docker, Inc.. https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/network/drivers/macvlan.md . License: Apache-2.0. Accessed 2026-11-24.

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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
