{"id":522,"date":"2026-01-21T16:00:11","date_gmt":"2026-01-21T16:00:11","guid":{"rendered":"https:\/\/ecodebook.wordpress.com\/?p=522"},"modified":"2026-01-21T16:00:11","modified_gmt":"2026-01-21T16:00:11","slug":"ubuntu-how-to-configure-network-bridges-for-lxd-container-to-have-their-own-local-network-ip","status":"publish","type":"post","link":"https:\/\/blog.mycarts.shop\/?p=522","title":{"rendered":"Ubuntu &#8211; How to configure network bridges for LXD container to have their own local network IP"},"content":{"rendered":"\n<p>Open the netplan file on the host and update with below code :<\/p>\n\n\n\n<pre class=\"wp-block-code is-style-solarized-dark\"><code>user@serv1: sudo nano \/etc\/netplan\/01-network-manager-all.yaml<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-white-color has-alpha-channel-opacity has-white-background-color has-background is-style-dots\" \/>\n\n\n\n<pre class=\"wp-block-code is-style-solarized-dark\"><code>network:\n  version: 2\n  renderer: networkd\n  ethernets:\n    enp3s0:\n      dhcp4: no\n  bridges:\n    br0:\n      dhcp4: yes\n      interfaces:\n        - enp3s0\n      parameters:\n        stp: false<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-white-color has-alpha-channel-opacity has-white-background-color has-background is-style-dots\" \/>\n\n\n\n<p>Apply changes to netplan<\/p>\n\n\n\n<pre class=\"wp-block-code is-style-solarized-dark\"><code>sudo netplan generate<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Update the Profiles: &#8220;LXD UI &gt; Profiles &gt; default&#8221;  &#8220;yaml&#8221; file as below.<\/p>\n\n\n\n<pre class=\"wp-block-code is-style-solarized-dark\"><code>devices:\n  eth0:\n    name: eth0\n    nictype: bridged\n    parent: br0\n    type: nic<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Open the netplan file on the host and update with below code : Apply changes to netplan Update the Profiles: &#8220;LXD UI &gt; Profiles &gt; default&#8221; &#8220;yaml&#8221; file as below.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-522","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/posts\/522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=522"}],"version-history":[{"count":0,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/posts\/522\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}