<a id="network-configure"></a>

# How to configure a network

CLI

To configure an existing network, use either the [`lxc network set`](https://canonical.com/lxd/docs/default/reference/manpages/lxc/network/set/index.html.md#lxc-network-set-md) and [`lxc network unset`](https://canonical.com/lxd/docs/default/reference/manpages/lxc/network/unset/index.html.md#lxc-network-unset-md) commands (to configure single settings) or the `lxc network edit` command (to edit the full configuration).
To configure settings for specific cluster members, add the `--target` flag.

For example, the following command configures a DNS server for a physical network:

```bash
lxc network set UPLINK dns.nameservers=8.8.8.8
```

The available configuration options differ depending on the network type.
See [Network types](https://canonical.com/lxd/docs/default/howto/network_create/index.html.md#network-types) for links to the configuration options for each network type.

UI

To edit the configuration of a network, navigate to the overview page for the network, and observe its attributes and settings.

Within the Configuration tab, you can edit key settings of the network by clicking on the Edit pencil icon inline with the desired configuration setting.

![LXD Network overview page](images/networks/network_configuration.png)

There are separate commands to configure advanced networking features.
See the following documentation:

- [How to configure network ACLs](https://canonical.com/lxd/docs/default/howto/network_acls/index.html.md)
- [How to configure network forwards](https://canonical.com/lxd/docs/default/howto/network_forwards/index.html.md)
- [How to configure network load balancers](https://canonical.com/lxd/docs/default/howto/network_load_balancers/index.html.md)
- [How to configure network zones](https://canonical.com/lxd/docs/default/howto/network_zones/index.html.md)
- [How to create OVN peer routing relationships](https://canonical.com/lxd/docs/default/howto/network_ovn_peers/index.html.md) (OVN only)
