Score:0

Removal of default routes with multiple subnets under Openstack Provider Network

cn flag
Elf

I have a self-service network with a single external connection via the 192.168.100.0/24 subnet.

It also has multiple subnets under this external connection via the 192.168.101.0/24 and 192.168.102.0/24 subnet.

The host network is actually a 192.168.0.0/16 network. As a result, the 101, 102 and 100 subnets are able to "talk" to each other, which is fine.

However within the Ubuntu VMs setup in Openstack, Openstack defaults to creating the following routes

Destination       Gateway       Genmask         Flags Metric Ref  Use Iface
default           192.168.100.1 0.0.0.0         UG    100    0    0   ens3
192.168.100.0     0.0.0.0       255.255.255.0   U     100    0    0   ens3
192.168.101.0     0.0.0.0       255.255.255.0   U     100    0    0   ens3

I would like for the .100 route to not be created, but yet still have the other routes. Is there anyway to do this besides using a cronjob to periodically delete the offending route, or creating static routes within netplan?

Thanks!

us flag
Have you tried the `--host-route` option when creating the subnet?
Elf avatar
cn flag
Elf
@eblock yes I have. It just adds a route to the list without overwriting/removing the original list.
us flag
For an existing subnet you should clear the existing routes first with `openstack subnet set --no-host-route <SUBNET_UUID>` first befor adding new ones.
Elf avatar
cn flag
Elf
@eblock yeap. This has been done before as well, to no effect. Somehow, the 0.0.0.0 routes are all set somewhere, but I can't seem to find the source of it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.