Browse code

Add docs for ip-forward

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>

Qiang Huang authored on 2015/06/03 17:37:40
Showing 2 changed files
... ...
@@ -84,7 +84,9 @@ unix://[/path/to/socket] to use.
84 84
   Default IP address to use when binding container ports. Default is `0.0.0.0`.
85 85
 
86 86
 **--ip-forward**=*true*|*false*
87
-  Docker will enable IP forwarding. Default is true. If `--fixed-cidr-v6` is set. IPv6 forwarding will be activated, too. This may reject Router Advertisements and interfere with the host's existing IPv6 configuration. For more information please consult the documentation about "Advanced Networking - IPv6".
87
+  Enables IP forwarding on the Docker host. The default is `true`. This flag interacts with the IP forwarding setting on your host system's kernel. If your system has IP forwarding disabled, this setting enables it. If your system has IP forwarding enabled, setting this flag to `--ip-forward=false` has no effect.
88
+
89
+  This setting will also enable IPv6 forwarding if you have both `--ip-forward=true` and `--fixed-cidr-v6` set. Note that this may reject Router Advertisements and interfere with the host's existing IPv6 configuration. For more information, please consult the documentation about "Advanced Networking - IPv6".
88 90
 
89 91
 **--ip-masq**=*true*|*false*
90 92
   Enable IP masquerading for bridge's IP range. Default is true.
... ...
@@ -269,7 +269,9 @@ Whether a container can talk to the world is governed by two factors.
269 269
     containers if this parameter is `1`.  Usually you will simply leave
270 270
     the Docker server at its default setting `--ip-forward=true` and
271 271
     Docker will go set `ip_forward` to `1` for you when the server
272
-    starts up. To check the setting or turn it on manually:
272
+    starts up. If you set `--ip-forward=false` and your system's kernel
273
+    has it enabled, the `--ip-forward=false` option has no effect.
274
+    To check the setting on your kernel or to turn it on manually:
273 275
 
274 276
         $ sysctl net.ipv4.conf.all.forwarding
275 277
         net.ipv4.conf.all.forwarding = 0