Comment 8 for bug 1923592

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello:

After investigating this issue, I found that the router external interface (gateway port) configures the external network "extra subnets" as onlink routes. The "extra subnets" are the additional subnets apart from the gateway port IP CIDR. In this case, the extra subnets are those RPN subnets that are not connected to the router port.

By default, when a router gateway port is enabled, the extra subnets CIDRs are set as onlink routes in the router namespace. E.g.:
$ ip netns exec qrouter-8b56474d-027c-4d96-805d-869ceb92cd96 ip r
...
10.222.144.0/22 dev qg-f5b03925-e4 proto 112 scope link
10.222.144.0/22 dev qg-f5b03925-e4 proto static scope link
10.222.152.0/22 dev qg-f5b03925-e4 proto 112 scope link
10.222.152.0/22 dev qg-f5b03925-e4 proto static scope link
10.222.156.0/22 dev qg-f5b03925-e4 proto 112 scope link
10.222.156.0/22 dev qg-f5b03925-e4 proto static scope link

The justification for those onlink routes is described in the patch that added them [1].

The case reported in this bug is a particular condition where the gateway router is connected to a RPN, specifically to a segment (one subnet) of this network. That means this gateway port has broadcast connectivity to only this subnet CIDR. As commented, to have connectivity to the other subnets, the admin should manually add those extra routes on the router. E.g.:
  $ openstack router set --route destination=192.168.50.0/24,gateway=192.168.20.10 router1

That will overwrite the link routes and create global ones with (1) the destination IP, (2) the GW IP and (3) the device. E.g.:
...
192.168.50.0/24 via 192.168.20.10 dev qg-1d690261-35 proto 112
192.168.50.0/24 via 192.168.20.10 dev qg-1d690261-35 proto static
192.168.60.0/24 via 192.168.20.10 dev qg-1d690261-35 proto 112
192.168.60.0/24 via 192.168.20.10 dev qg-1d690261-35 proto static

This bug should be closed.

Regards.

[1]https://review.opendev.org/c/openstack/neutron/+/90250