to disable the default route today you have to remove the gateway from the subnet
but that then complicates adding routers as you need to specify the router port to use the "gateway" IP if you want things to just work.
providing a way to turn off sending the default route without disabling the gateway would be another approach.
the current workaround is to use a user-data script to configure the networking when creating the VM. that works but required the end user to remember to pass it every time and format it correctly.
the alternitive options are to use cloud-init metadata to set the metric per route in nova
https:/ /cloudinit. readthedocs. io/en/latest/ topics/ network- config- format- v2.html# examples
# static routes
routes:
- to: 192.0.2.0/24
via: 11.0.0.1
metric: 3
and or leave the microsfot dhcp option extions
https:/ /learn. microsoft. com/en- us/openspecs/ windows_ protocols/ ms-dhcpe/ 5e35b683- 7ef0-46e3- a0bb-bb93ff0d7d f2
as far as i am aware there is not a standard option for this in DHCP only the Microsoft vendor extension.
and yes https:/ /bugs.launchpad .net/neutron/ +bug/1717560 is related
to disable the default route today you have to remove the gateway from the subnet
but that then complicates adding routers as you need to specify the router port to use the "gateway" IP if you want things to just work.
providing a way to turn off sending the default route without disabling the gateway would be another approach.
the current workaround is to use a user-data script to configure the networking when creating the VM. that works but required the end user to remember to pass it every time and format it correctly.