For more information on drivers and available options, see [Network drivers](/manuals/engine/network/drivers/_index.md).
### `driver_opts`
`driver_opts` specifies a list of options as key-value pairs to pass to the driver. These options are
driver-dependent.
```yml
networks:
frontend:
driver: bridge
driver_opts:
com.docker.network.bridge.host_binding_ipv4: "127.0.0.1"
```
Consult the [network drivers documentation](/manuals/engine/network/_index.md) for more information.
### `attachable`
If `attachable` is set to `true`, then standalone containers should be able to attach to this network, in addition to services.
If a standalone container attaches to the network, it can communicate with services and other standalone containers
that are also attached to the network.
```yml
networks:
mynet1:
driver: overlay
attachable: true
```
### `enable_ipv4`
{{< summary-bar feature_name="Compose enable ipv4" >}}
`enable_ipv4` can be used to disable IPv4 address assignment.
```yml
networks:
ip6net:
enable_ipv4: false
enable_ipv6: true
```
### `enable_ipv6`
`enable_ipv6` enables IPv6 address assignment.
```yml
networks:
ip6net:
enable_ipv6: true
```
### `external`
If set to `true`:
- `external` specifies that this network’s lifecycle is maintained outside of that of the application.
Compose doesn't attempt to create these networks, and returns an error if one doesn't exist.
- All other attributes apart from name are irrelevant. If Compose detects any other attribute, it rejects the Compose file as invalid.
In the following example, `proxy` is the gateway to the outside world. Instead of attempting to create a network, Compose
queries the platform for an existing network simply called `outside` and connects the
`proxy` service's containers to it.
```yml
services:
proxy:
image: example/proxy
networks:
- outside
- default
app:
image: example/app
networks:
- default
networks:
outside:
external: true
```
### `ipam`
`ipam` specifies a custom IPAM configuration. This is an object with several properties, each of which is optional:
- `driver`: Custom IPAM driver, instead of the default.
- `config`: A list with zero or more configuration elements, each containing a: