I was trying to set a static IP for a router in neutron without using DHCP. The topology was as follows:

[internal net] —– [rtr2] —– [external lan]—–[rtr1]—–[internet]

Where my internal net is a bootstrap network to boot VMs, and the external lan is bridged to my regular physical network with a router present. I wanted rtr2 to be the router between, and route the subnet for the internal net statically from rtr1 to rtr2. However, that means that rtr2 needs to have a static IP address. Horizon does not allow you to do that.

The solution was to use the CLI:

neutron router-gateway-set --fixed-ip subnet_id=internal_subnet,ip_address=195.16.84.88 rtr2  physical-network

This assigned the static IP of 195.16.84.88 to the external facing interface of rtr2.

 

Leave a Reply