Skip to content

Instantly share code, notes, and snippets.

@svetlio
Last active January 3, 2021 01:42
Show Gist options
  • Save svetlio/e8aeeb27d59a247eb5dadad159da2ca6 to your computer and use it in GitHub Desktop.
Save svetlio/e8aeeb27d59a247eb5dadad159da2ca6 to your computer and use it in GitHub Desktop.
Netplan config bridge - ubuntu-server-18.04, and ex. default lxd profile
# located at /etc/netplan/
# $ sudo netplan apply
network:
version: 2
renderer: networkd
ethernets:
enp5s0f0:
dhcp4: false
bridges:
br0:
interfaces: [enp5s0f0]
dhcp4: false
addresses: [192.168.1.4/24]
gateway4: 192.168.1.1
nameservers:
addresses: [1.1.1.1,8.8.8.8]
parameters:
forward-delay: 0
# lxd default profile to serve dhcp ip for containers
#keypoint "parent: br0"
# $ lxc profile edit default
config: {}
description: Default LXD profile
devices:
eth0:
name: eth0
nictype: bridged
parent: br0
type: nic
root:
path: /
pool: default
type: disk
name: default
used_by:
- /1.0/containers/m1
- /1.0/containers/m2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment