lxc-network

Manage networks for LXD containers.

TLDR

List all available networks

$ lxc network list
copy

Show the configuration of a specific network

$ lxc network show [network_name]
copy

Add a running instance to a specific network

$ lxc network attach [network_name] [container_name]
copy

Create a new managed network

$ lxc network create [network_name]
copy

Set a bridge interface of a specific network

$ lxc network set [network_name] bridge.external_interfaces [eth0]
copy

Disable NAT for a specific network

$ lxc network set [network_name] ipv[4].nat false
copy

Copied to clipboard
digitalocean