How to use different interface for floating ip address and public interface? [nova-network]

So for example I am using eth1(172.16.4.0/22) as public interface through which the physicial machine and VMS access the internet. I have another interface eth1.105 which is another physicial network and has access to IPs on (8.8.8.0/24), now I want my public interface to stay at eth1 and let the VMs access the internet through eth1, but would like to be able to access my VMs via a public IP through the the eth1.105 interface such as 8.8.8.5.

I tried creating a new floating ip with the device specified as eth1.105 and then associate this floating ip to an instnace, but it would still get added to the eth1 interface, it seems that when creating the floating ip and manually specifying the interface doesn't have any effect.

1 answer

It sounds like you're using nova-network, not neutron. To clarify - by public interface you mean the interface through which you expose horizon? As opposed to the external interface where you expose the instance public IP's?

There is often terminology which causes confusion, unfortunately.

public_interface in nova.conf has nothing to do with where you expose horizon (or your API's). This configuration option is where the public IP's for your external network are exposed (ie your instance public IP's). So, in your case nova.conf should contain the conf entry: public_interface = eth1.105

The interface through which you expose Horizon and the API's is handled through the configuration entries which have 'listen' as they key word, eg: osapi_compute_listen. For Horizon it would be setup through the web server's configuration.