@@ -18,7 +18,8 @@ Create a network
1818| ` --ip-range ` | ` stringSlice ` | | Allocate container ip from a sub-range |
1919| ` --ipam-driver ` | ` string ` | ` default ` | IP Address Management Driver |
2020| ` --ipam-opt ` | ` map ` | ` map[] ` | Set IPAM driver specific options |
21- | ` --ipv6 ` | ` bool ` | | Enable or disable IPv6 networking |
21+ | ` --ipv4 ` | ` bool ` | ` true ` | Enable or disable IPv4 address assignment |
22+ | ` --ipv6 ` | ` bool ` | | Enable or disable IPv6 address assignment |
2223| ` --label ` | ` list ` | | Set metadata on a network |
2324| ` -o ` , ` --opt ` | ` map ` | ` map[] ` | Set driver specific options |
2425| ` --scope ` | ` string ` | | Control the network's scope |
@@ -148,30 +149,31 @@ fails and Docker Engine returns an error.
148149
149150### Bridge driver options
150151
151- When creating a custom network, the default network driver (i.e. ` bridge ` ) has
152- additional options that can be passed. The following are those options and the
153- equivalent Docker daemon flags used for docker0 bridge:
152+ When creating a custom ` bridge ` network, the following additional options can
153+ be passed. Some of these have equivalent flags that can be used on the dockerd
154+ command line or in ` daemon.json ` to configure the default bridge, ` docker0 ` :
154155
155- | Option | Equivalent | Description |
156- | --------------------------------------------------| -------------| -------------------------------------------------------|
157- | ` com.docker.network.bridge.name ` | - | Bridge name to be used when creating the Linux bridge |
158- | ` com.docker.network.bridge.enable_ip_masquerade ` | ` --ip-masq ` | Enable IP masquerading |
159- | ` com.docker.network.bridge.enable_icc ` | ` --icc ` | Enable or Disable Inter Container Connectivity |
160- | ` com.docker.network.bridge.host_binding_ipv4 ` | ` --ip ` | Default IP when binding container ports |
161- | ` com.docker.network.driver.mtu ` | ` --mtu ` | Set the containers network MTU |
162- | ` com.docker.network.container_iface_prefix ` | - | Set a custom prefix for container interfaces |
156+ | Network create option | Daemon option for ` docker0 ` | Description |
157+ | --------------------------------------------------| ----------------------------- | -------------------------------------------------------|
158+ | ` com.docker.network.bridge.name ` | - | Bridge name to be used when creating the Linux bridge |
159+ | ` com.docker.network.bridge.enable_ip_masquerade ` | ` --ip-masq ` | Enable IP masquerading |
160+ | ` com.docker.network.bridge.enable_icc ` | ` --icc ` | Enable or Disable Inter Container Connectivity |
161+ | ` com.docker.network.bridge.host_binding_ipv4 ` | ` --ip ` | Default IP when binding container ports |
162+ | ` com.docker.network.driver.mtu ` | ` --mtu ` | Set the containers network MTU |
163+ | ` com.docker.network.container_iface_prefix ` | - | Set a custom prefix for container interfaces |
163164
164165The following arguments can be passed to ` docker network create ` for any
165166network driver, again with their approximate equivalents to Docker daemon
166- flags used for the docker0 bridge:
167-
168- | Argument | Equivalent | Description |
169- | --------------| ----------------| --------------------------------------------|
170- | ` --gateway ` | - | IPv4 or IPv6 Gateway for the master subnet |
171- | ` --ip-range ` | ` --fixed-cidr ` | Allocate IPs from a range |
172- | ` --internal ` | - | Restrict external access to the network |
173- | ` --ipv6 ` | ` --ipv6 ` | Enable or disable IPv6 networking |
174- | ` --subnet ` | ` --bip ` | Subnet for network |
167+ flags used for the ` docker0 ` bridge:
168+
169+ | Network create option | Daemon option for ` docker0 ` | Description |
170+ | -----------------------| -----------------------------------| --------------------------------------------|
171+ | ` --gateway ` | - | IPv4 or IPv6 Gateway for the master subnet |
172+ | ` --ip-range ` | ` --fixed-cidr ` , ` --fixed-cidr-v6 ` | Allocate IP addresses from a range |
173+ | ` --internal ` | - | Restrict external access to the network |
174+ | ` --ipv4 ` | - | Enable or disable IPv4 address assignment |
175+ | ` --ipv6 ` | ` --ipv6 ` | Enable or disable IPv6 address assignment |
176+ | ` --subnet ` | ` --bip ` , ` --bip6 ` | Subnet for network |
175177
176178For example, let's use ` -o ` or ` --opt ` options to specify an IP address binding
177179when publishing ports:
0 commit comments