Skip to content

Instantly share code, notes, and snippets.

@bloatfan
Created November 17, 2018 07:21
Show Gist options
  • Save bloatfan/6469c0fe5556e36d24f8a18d12c2b0bb to your computer and use it in GitHub Desktop.
Save bloatfan/6469c0fe5556e36d24f8a18d12c2b0bb to your computer and use it in GitHub Desktop.
# network.yaml
network:
version: 2
renderer: networkd
ethernets:
enp9s0:
addresses:
- 192.168.1.13/24
gateway4: 192.168.1.1
nameservers:
addresses: [192.168.1.1, 8.8.8.8]
bridges:
lxcbr0:
addresses:
- 192.168.1.14/24
gateway4: 192.168.1.1
interfaces: [enp9s0]
# /etc/lxc/default.conf
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
lxc.net.0.ipv4.address = 192.168.1.128/25
lxc.net.0.ipv4.gateway = 192.168.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment