I've been experimenting with adding a second, public IP address to several Azure VMs. I assigned a second VIP and later an ILPIP to a VM. I can successfully access the VM through the second VIP, and also through
the ILPIP, but the VM itself only sees one IP address.
Is there any combination of VIP, RIP, ILPIP or multiple NIC setup that will allow me to decide at the application or OS level which IP address to send traffic from? As a simple example, I'd like to be able to tell curl which IP address to use for outgoing connections.
curl --interface 10.0.0.1 http://google.com
curl --interface 10.0.0.2 http://google.com
Ideally, I'm hoping for two IP addresses to be visible to the OS. I generally use the OpenLogic CentOS Linux image, so in my ideal solution I'd expect to see two IP addresses listed in the output of
ip a
But really, any way to specify IP address for outgoing connections would be useful.
Anyone have experience with this setup, or have any pointers?