File location
/etc/netplan/
Sample config
- Static IP
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
addresses:
- 10.10.10.2/24
- 2001:DB8::5/64
dhcp4: no
routes:
- to: default #Standardroute für IPv4 (oder 0.0.0.0/0)
via: 10.10.10.1
- to: ::/0 #Standardroute für IPv6
via: 2001:DB8::1
nameservers:
addresses: [10.10.10.1, 1.1.1.1, 2001:470:20::2]
- DHCP
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
dhcp4: yes
Config anwenden
netplan apply