Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/reference/commandline/network_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@ command line or in `daemon.json` to configure the default bridge, `docker0`:
| `com.docker.network.driver.mtu` | `--mtu` | Set the containers network MTU |
| `com.docker.network.container_iface_prefix` | - | Set a custom prefix for container interfaces |

To configure IP masquerading for a custom `bridge` network, use the
`com.docker.network.bridge.enable_ip_masquerade` option. For example, to create
a custom bridge network with IP masquerading disabled:

```console
$ docker network create \
--driver bridge \
--opt com.docker.network.bridge.enable_ip_masquerade=false \
no-masq-network
```

Comment on lines +165 to +175

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right place/format for this. We already explain the option in the table above. I think what's missing if anything is to explain how these options are set. The introduction to the section currently reads:

When creating a custom bridge network, the following additional options can be passed.

But we don't say how, i.e.

When creating a custom bridge network, you can configure driver options using the --opt flag. The following table lists all configurable driver options for bridge networks: ...

And then below the table we could have a small example showing the exact syntax:

For example, to create a custom bridge network with IP masquerading disabled:

$ docker network create \
    --driver bridge \
    --opt com.docker.network.bridge.enable_ip_masquerade=false \
    no-masq-network

The following arguments can be passed to `docker network create` for any
network driver, again with their approximate equivalents to Docker daemon
flags used for the `docker0` bridge:
Expand Down
Loading