network:
version: 2
renderer: networkd
ethernets:
ens4:
dhcp-identifier: mac
dhcp4: yes
dhcp4-overrides:
use-dns: no
use-ntp: no send-hostname: no use-hostname: no
use-routes: no
routes:
- to: 10.0.0.0/8
via: 10.50.0.1
optional: true
Thus I only need to get the IP address by DHCP, then add some static routes. This setup doesn't work. Apparently `routes` keyword only works when using static addresses.
Consider the following setup:
network: identifier: mac overrides:
send-hostname: no
use-hostname: no
version: 2
renderer: networkd
ethernets:
ens4:
dhcp-
dhcp4: yes
dhcp4-
use-dns: no
use-ntp: no
use-routes: no
routes:
- to: 10.0.0.0/8
via: 10.50.0.1
optional: true
Thus I only need to get the IP address by DHCP, then add some static routes. This setup doesn't work. Apparently `routes` keyword only works when using static addresses.