Skip to content

Instantly share code, notes, and snippets.

@gtrabanco
Created October 9, 2020 12:03
Show Gist options
  • Save gtrabanco/99b85c2e22b5b36d3d188fc4589f8096 to your computer and use it in GitHub Desktop.
Save gtrabanco/99b85c2e22b5b36d3d188fc4589f8096 to your computer and use it in GitHub Desktop.
Network file in Cloud Key Gen2 to configure a second interface for a VLAN. File must be in: /etc/systemd/network/eth0.30.network
[Match]
Name=eth0.30
[Network]
DHCP=no
Gateway=192.168.X.1
DNS=192.168.X.1
Domains=localnetwork.local
[Address]
Address=192.168.X.Y/26
@gtrabanco
Copy link
Author

gtrabanco commented Oct 9, 2020

This file also needs a .netdev file, see: https://gist.github.com/gtrabanco/1658a441527fe6156a421ec1c5939a00

In the physical network eth0.network should add VLAN=filebeforedot in [Network]:

[Match]
Name=eth0

[Network]
DHCP=yes
VLAN=eth0.30
VLAN=eth0.500
DNS=192.168.X.Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment