Skip to content

Commit 60c9df3

Browse files
Merge pull request #282 from mstanleyjones/add_macvlan_to_toc
Add get-started-macvlan.md to TOC
2 parents 5c511ac + 9c1de96 commit 60c9df3

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

_data/toc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ toc:
111111
title: Work with network commands
112112
- path: /engine/userguide/networking/get-started-overlay/
113113
title: Get started with multi-host networking
114+
- path: /engine/userguide/networking/get-started-macvlan/
115+
title: Get started with macvlan network driver
114116
- path: /engine/userguide/networking/overlay-security-model/
115117
title: Swarm mode overlay network security model
116118
- path: /engine/userguide/networking/configure-dns/

engine/userguide/networking/get-started-macvlan.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
description: Use macvlan for container networking
33
keywords:
44
- Examples, Usage, network, docker, documentation, user guide, macvlan, cluster
5-
menu:
6-
main:
7-
parent: smn_networking
8-
weight: -3
95
title: Get started with macvlan network driver
106
---
117

@@ -26,7 +22,7 @@ Macvlan offers a number of unique features and plenty of room for further innova
2622
- 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.
2723

2824
- Kernel requirements:
29-
25+
3026
- To check your current kernel version, use `uname -r` to display your kernel version
3127
- Macvlan Linux kernel v3.9–3.19 and 4.0+
3228

@@ -36,13 +32,13 @@ Macvlan Bridge mode has a unique MAC address per container used to track MAC to
3632

3733
- 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.
3834

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.
4036

4137
- 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.
4238

4339
- Any container inside the same subnet can talk to any other container in the same network without a gateway in `macvlan bridge`.
4440

45-
- The same `docker network` commands apply to the vlan drivers.
41+
- The same `docker network` commands apply to the vlan drivers.
4642

4743
- 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
4844

@@ -83,14 +79,14 @@ ping -c 4 172.16.86.10
8379
```
8480

8581
Take a look at the containers ip and routing table:
86-
82+
8783
```
8884
8985
ip a show eth0
9086
eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UNKNOWN
9187
link/ether 46:b2:6b:26:2f:69 brd ff:ff:ff:ff:ff:ff
9288
inet 172.16.86.2/24 scope global eth0
93-
89+
9490
ip route
9591
default via 172.16.86.1 dev eth0
9692
172.16.86.0/24 dev eth0 src 172.16.86.2
@@ -176,7 +172,7 @@ docker run --net=macvlan50 -it --name macvlan_test6 --rm alpine /bin/sh
176172
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.
177173

178174
```
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.
180176
docker network create -d macvlan \
181177
--subnet=192.168.60.0/24 \
182178
--gateway=192.168.60.1 \

0 commit comments

Comments
 (0)