No default route on bridged containers [resolved]

My netplan config yaml on the host

  version: 2
  renderer: networkd
      dhcp4: false
        - enp1s0
      dhcp4: true
        - to: default
          search: [ap.local]
          addresses: [,]

Creating a new container will work and allows the DHCP offer/lease from the network the host is attached to into the container but there is no default route added inside the container.

The results of ip route show from inside the container dev eth0 proto kernel scope link src metric 100 dev eth0 proto dhcp scope link src metric 100 

Instead of manually running the command to add the route for the default gateway to each container when they’re being created, is there something I can set to allow the DHCP lease to create the route automatically?

Probably a stupid question but my Google-Fu is failing me at the moment.

Thanks in advance to anyone who helps


This was an issue of classless static routes being sent out by the DHCP server which didn’t include the default gateway. Once I added the default route to the classless static routes being handed out by DHCP, the original container worked along with the new ones being created.