You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: engine/userguide/networking/get-started-macvlan.md
+6-10Lines changed: 6 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,6 @@
2
2
description: Use macvlan for container networking
3
3
keywords:
4
4
- Examples, Usage, network, docker, documentation, user guide, macvlan, cluster
5
-
menu:
6
-
main:
7
-
parent: smn_networking
8
-
weight: -3
9
5
title: Get started with macvlan network driver
10
6
---
11
7
@@ -26,7 +22,7 @@ Macvlan offers a number of unique features and plenty of room for further innova
26
22
- All of the examples can be performed on a single host running Docker. Any examples using a sub-interface like `eth0.10` can be replaced with `eth0` or any other valid parent interface on the Docker host. Sub-interfaces with a `.` are created on the fly. `-o parent` interfaces can also be left out of the `docker network create` all together and the driver will create a `dummy` interface that will enable local host connectivity to perform the examples.
27
23
28
24
- Kernel requirements:
29
-
25
+
30
26
- To check your current kernel version, use `uname -r` to display your kernel version
31
27
- Macvlan Linux kernel v3.9–3.19 and 4.0+
32
28
@@ -36,13 +32,13 @@ Macvlan Bridge mode has a unique MAC address per container used to track MAC to
36
32
37
33
- Macvlan driver networks are attached to a parent Docker host interface. Examples are a physical interface such as `eth0`, a sub-interface for 802.1q VLAN tagging like `eth0.10` (`.10` representing VLAN `10`) or even bonded host adaptors which bundle two Ethernet interfaces into a single logical interface.
38
34
39
-
- The specified gateway is external to the host provided by the network infrastructure.
35
+
- The specified gateway is external to the host provided by the network infrastructure.
40
36
41
37
- Each Macvlan Bridge mode Docker network is isolated from one another and there can be only one network attached to a parent interface at a time. There is a theoretical limit of 4,094 sub-interfaces per host adaptor that a Docker network could be attached to.
42
38
43
39
- Any container inside the same subnet can talk to any other container in the same network without a gateway in `macvlan bridge`.
44
40
45
-
- The same `docker network` commands apply to the vlan drivers.
41
+
- The same `docker network` commands apply to the vlan drivers.
46
42
47
43
- In Macvlan mode, containers on separate networks cannot reach one another without an external process routing between the two networks/subnets. This also applies to multiple subnets within the same `docker network
48
44
@@ -83,14 +79,14 @@ ping -c 4 172.16.86.10
83
79
```
84
80
85
81
Take a look at the containers ip and routing table:
86
-
82
+
87
83
```
88
84
89
85
ip a show eth0
90
86
eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UNKNOWN
In the second network, tagged and isolated by the Docker host, `eth0.60` is the parent interface tagged with vlan id `60` specified with `-o parent=eth0.60`. The `macvlan_mode=` defaults to `macvlan_mode=bridge`. It can also be explicitly set with the same result as shown in the next example.
177
173
178
174
```
179
-
# now add networks and hosts as you would normally by attaching to the master (sub)interface that is tagged.
175
+
# now add networks and hosts as you would normally by attaching to the master (sub)interface that is tagged.
0 commit comments