Skip to content

Commit bfb53e1

Browse files
committed
Engine: fix mention of ipvlan-l2 in macvlan doc
Signed-off-by: Rob Murray <[email protected]>
1 parent a2909ab commit bfb53e1

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

content/manuals/engine/network/drivers/macvlan.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,23 @@ $ docker network create -d macvlan \
101101

102102
### Use an IPvlan instead of Macvlan
103103

104-
In the above example, you are still using a L3 bridge. You can use `ipvlan`
105-
instead, and get an L2 bridge. Specify `-o ipvlan_mode=l2`.
104+
An `ipvlan` network created with option `-o ipvlan_mode=l2` is similar
105+
to a macvlan network. The main difference is that the `ipvlan` driver
106+
doesn't assign a MAC address to each container, the layer-2 network stack
107+
is shared by devices in the ipvlan network. So, containers use the parent
108+
interface's MAC address.
109+
110+
The network will see fewer MAC addresses, and the host's MAC address will be
111+
associated with the IP address of each container.
112+
113+
The choice of network type depends on your environment and requirements.
114+
There are some notes about the trade-offs in the [Linux kernel
115+
documentation](https://docs.kernel.org/networking/ipvlan.html#what-to-choose-macvlan-vs-ipvlan).
106116

107117
```console
108118
$ docker network create -d ipvlan \
109119
--subnet=192.168.210.0/24 \
110-
--subnet=192.168.212.0/24 \
111120
--gateway=192.168.210.254 \
112-
--gateway=192.168.212.254 \
113121
-o ipvlan_mode=l2 -o parent=eth0 ipvlan210
114122
```
115123

0 commit comments

Comments
 (0)