I'm building an edge router using Ubuntu Server 18.04.03 LTS and need to configure the routing table to define the default route as being the upstream / WAN interface, which gets its IP address and (presumably) the gateway / nexthop address dynamically from the ISP's DHCP server.
A Netplan configuration would seem be the obvious means to do this, and preferable because the configuration would be persistent, but because (according to the Netplan Reference page), the route block's "via" directive (which specifies the gateway IP) is required, Netplan simply isn't up to the task: One obviously can't specify a dynamically assigned IP address even if specifying an outbound interface is straightforward. Netplan also provides no obvious means to assure that the route received via DHCP is the default route. It's as if the Netplan developers simply ignored the entire concept of a default route, which is quite well documented.
This seems to leave ip route, which while volatile and requiring scripting and scheduling to persist nevertheless offers the opportunity to specify a default route by interface alone, so lamentably absent from Netplan.
So, the question is how best to accomplish this. Can one hack around Netplan's inadequacies, and is the ip route approach viable (albeit via scripting and an associated systemd .service) and perhaps even more robust?
Many thanks for any thoughts.