Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, this one is old, but in case anyone need this. You can assign as many floating ip as you have interfaces Assuming you already have a setup with private networks and corresponding external networks.

Add second network port to instance Ifup interface (private network) Let's say you added eth1 with network 192.168.1.0/24 and ip 192.168.1.3 and gateway as 192.168.1.1 Attach second floating ip Add 2nd routing table and routing rules.

echo "1 rt2" >> /etc/iproute2/rt_tables

ip route add 192.168.1.0/24 dev eth1 src 192.168.1.3 table rt2 ip route add default via 192.168.1.1 dev eth1 table rt2

ip rule add from 192.168.1.3/32 table rt2 ip rule add to 192.168.1.3/32 table rt2

And there you go, you have multiple floating ip's. It's useful for any setups with already existing networking infrastructure, as floating ip's adds flexibility to it.

Well, this one is old, but in case anyone need this. You can assign as many floating ip as you have interfaces Assuming you already have a setup with private networks and corresponding external networks.

Add second network port to instance Ifup interface (private network) Let's say you added eth1 with network 192.168.1.0/24 and ip 192.168.1.3 and gateway as 192.168.1.1 Attach second floating ip Add 2nd routing table and routing rules.

echo "1 rt2" >> /etc/iproute2/rt_tables

ip route add 192.168.1.0/24 dev eth1 src 192.168.1.3 table rt2 rt2

ip route add default via 192.168.1.1 dev eth1 table rt2

ip rule add from 192.168.1.3/32 table rt2 rt2

ip rule add to 192.168.1.3/32 table rt2

And there you go, you have multiple floating ip's. It's useful for any setups with already existing networking infrastructure, as floating ip's adds flexibility to it.

Well, this one is old, but in case anyone need this. You can assign as many floating ip as you have interfaces Assuming you already have a setup with private networks and corresponding external networks.

Add second network port to instance instance

Ifup interface (private network) network)

Let's say you added eth1 with network 192.168.1.0/24 and ip 192.168.1.3 and gateway as 192.168.1.1 192.168.1.1

Attach second floating ip ip

Add 2nd routing table and routing rules.


echo "1 rt2" >> /etc/iproute2/rt_tables

ip route add 192.168.1.0/24 dev eth1 src 192.168.1.3 table rt2

ip route add default via 192.168.1.1 dev eth1 table rt2

ip rule add from 192.168.1.3/32 table rt2

ip rule add to 192.168.1.3/32 table rt2

And there you go, you have multiple floating ip's. It's useful for any setups with already existing networking infrastructure, as floating ip's adds flexibility to it.

Well, this one is old, but in case anyone need this. You can assign as many floating ip as you have interfaces Assuming you already have a setup with private networks and corresponding external networks.

Add second network port to instance

Ifup interface (private network)

Let's say you added eth1 with network 192.168.1.0/24 and ip 192.168.1.3 and gateway as 192.168.1.1

Attach second floating ip

Add 2nd routing table and routing rules.


echo "1 rt2" >> /etc/iproute2/rt_tables

ip route add 192.168.1.0/24 dev eth1 src 192.168.1.3 table rt2

ip route add default via 192.168.1.1 dev eth1 table rt2

ip rule add from 192.168.1.3/32 table rt2

ip rule add to 192.168.1.3/32 table rt2

And there you go, you have multiple floating ip's. It's useful for any setups with already existing networking infrastructure, as floating ip's adds flexibility to it.

Well, this one is old, but in case anyone need this. You can assign as many floating ip as you have interfaces Assuming you already have a setup with private networks and corresponding external networks.

  1. Add second network port to instance

  2. Ifup interface (private network)

  3. Let's say you added eth1 with with
  4. network 192.168.1.0/24 and ip 192.168.1.3 and gateway as 192.168.1.1

  5. Attach second floating ip

  6. Add 2nd routing table and routing rules.

echo "1 rt2" >> /etc/iproute2/rt_tables

ip route add 192.168.1.0/24 dev eth1 src 192.168.1.3 table rt2

ip route add default via 192.168.1.1 dev eth1 table rt2

ip rule add from 192.168.1.3/32 table rt2

ip rule add to 192.168.1.3/32 table rt2

And there you go, you have multiple floating ip's. It's useful for any setups with already existing networking infrastructure, as floating ip's adds flexibility to it.