# Lxd container networks

**URL:** <https://community.learnlinux.tv/t/lxd-container-networks/1305>\
**Category:** Ubuntu\
**Created:** [December 31, 2021, 7:42am UTC](https://community.learnlinux.tv/t/lxd-container-networks/1305 "2021-12-31T07:42:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dash](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/d/7c8e57/32.png) [@Dash](https://community.learnlinux.tv/u/Dash)\
**Post date:** [December 31, 2021, 7:42am UTC](https://community.learnlinux.tv/t/lxd-container-networks/1305/1 "2021-12-31T07:42:46Z")

</div>

Good morning everyone. This is dash here from South Africa. Thank you for allowing me to participate in your forum.

Just starting out with lxd containers. I know you have one tutorial available for this however, can you point me into some direction where networks are discussed.

---

<div class="post-metadata">

**Author:** ![ThatGuyB](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/thatguyb/32/784_2.png) [@ThatGuyB](https://community.learnlinux.tv/u/ThatGuyB)\
**Post date:** [December 31, 2021, 12:49pm UTC](https://community.learnlinux.tv/t/lxd-container-networks/1305/2 "2021-12-31T12:49:17Z")

</div>

Hello Dash, welcome to the forum!

I don’t think there’s a lot of documentation about this, however, LXD uses basically the same tool as some hypervisors for networking, which is `brctl` (I think it’s part of bridge-utils).

You can configure LXD containers in 2 ways: do a NAT on your device and have the containers speak on their own internal subnet, or bridge them to your current subnet and have them speak with the rest of your infrastructure, which is what I prefer, because otherwise, well, you have to port forward services to your LXD host and connect to that, if you want to access a service not from the LXD host.

By default, when you do a `lxd init`, if you don’t have bridge-utils installed, the configuration will default to NAT-ing. Before you lxd init, install bridge-utils. If you already installed LXD and have containers setup, not to worry, you can just re-run it, or you can manually delete the lxdbr0 (I think that’s what the bridge is called) and set a new one using brctl.

Although those are a bit old, the information in them is still relevant:

> **[Network management with LXD (2.3+) | Ubuntu](https://ubuntu.com/blog/network-management-with-lxd-2-3)**
>
> Introduction When LXD 2.0 shipped with Ubuntu 16.04, LXD networking was pretty simple. You could either use that “lxdbr0” bridge that “lxd init” would have you configure, provide your own or just use an existing physical interface for your...

> **[LXD networking: lxdbr0 explained | Ubuntu](https://ubuntu.com/blog/lxd-networking-lxdbr0-explained)**
>
> Recently, LXD stopped depending on lxc, and thus moved to using its own bridge, called lxdbr0. lxdbr0 behaves significantly differently than lxcbr0: it is ipv6 link local only by default (i.e. there is no ipv4 or ipv6 subnet configured by default),...

[https://linuxcontainers.org/lxd/docs/stable-4.0/networks](https://linuxcontainers.org/lxd/docs/stable-4.0/networks)

If you need any more help, feel free to ask. I’m not exactly a LXD guru, but I know more about LXD than I do about OCI containers (like Docker, K8s or Podman), which doesn’t mean much though.
