1

I would like to use DHCP for IP address assignment but I would also like to override/specify the default gateway. Is this possible in netplan? Something like the following (which doesn't work BTW)...

network:
  version: 2
  renderer: networkd
  ethernets:
    ens192:
      dhcp4: true
      gateway4: 10.10.10.1
Mark S
  • 11
  • 2
  • I have the same problem. I'm ussing "dhcp4-overrides: use-routes: false". From https://github.com/CanonicalLtd/netplan/blob/master/doc/netplan.md " This allows users to avoid installing a default gateway for interfaces configured via DHCP". My config include too "gateway4: 11.0.0.254" but does't works. – icalvete Apr 23 '20 at 09:50
  • I also tried with "dhcp4-overrides: use-routes: false" and "routes: - to: 0.0.0.0/0 via: 11.0.0.254 metric: 100 " – icalvete Apr 23 '20 at 10:04

0 Answers0