gateway4 устарел, используй routes:
# This is the network config written by 'subiquity'
network:
ethernets:
ens18:
dhcp4: no
addresses: [192.168.100.2/24]
routes:
- on-link: true
to: 0.0.0.0/0
via: 192.168.100.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
version: 2