It is possible to attach multiple floating IP’s to a single instance. To configure multiple floating IP’s some configuration settings are required to adjust to your setup. This manual describes how to configure and setup your instance and network in detail with an additional video instruction.
Some basic knowledge and understanding about networks are required.
First login the Horizon interface the create a private subnet to use for attaching the floating IP’s.
- Login to the Horizon interface
- Select “Network” and then “Networking” from the left menu pane.
- Select “+CREATE NETWORK”
- Create a new name for the network
- Select subnet and fill in a new “Subnet Name”
- Fill in a new subnet range, in this example we use the ip range 192.168.1.0/24
- Nothing more is needed to configure, select “create”
-
Create a new router as default gateway for the new subnet.
- Select “Network” and then “Routers” from the left menu pane.
- Select “+CREATE ROUTER”
- Fill in a new router name
- Select “Create Router”
- Select “Set Gateway” for the created router
- At “External Network” select the network “Floating”
- Select “SET GATEWAY”
- Select the new created router from the overview
- Select “+ADD INTERFACE”
- At the subnet section select “ADD INTERFACE” from the new subnet created before
Create an instance and attach multiple interfaces.
- Select “Compute” and then “Instances” from the left menu pane.
- Create a new instance Ubuntu or CentOS and make sure the first interface attached is the newly created subnet
- Select “Attach Interface” from the pull-down menu from the created instance and select “Attach Interface”
- Select the created subnet
- Repeat this step 3 times and make sure all interfaces are attached to the same subnet
-
Attach a floating IP to a network interface
- Select “Network” and then “Floating IPs” from the left menu pane.
- Select “ALLOCATE IP TO PROJECT” and then “ALLOCATE IP”
- At the main screen select “ASSOCIATE” from the allocated floating IP.
- Select the correct interface from “Port to be associated” and select “ASSOCIATE”
- Repeat these steps until a floating IP is attached to all interfaces.
After creating a new instance in the Horizon interface, you need to setup IP routing on the instance itself to make sure all floating IPs are available from the outside network. Because every interface is configured at the same subnet and with the same default gateway, we need to create a routing entry for every interface. Below described how to configure for Ubuntu and CentOS.
Updating the routing table for Ubuntu and CentOS
First adjust the routing table to make sure a table entry is made for every interface.
Open the routing table with a editor.
vim /etc/iproute2/rt_tables
In this example we make table entries for 3 network interfaces, table1, table2 and table3. Setup a priority for every entry like in the example below.
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
# Floating IPs
100 table1
101 table2
102 table3
Enable IP Forwarding
Check if IP forwarding is enabled
sysctl net.ipv4.ip_forward
Output value need to be 1 , if 0 the IP forwarding configuration is needed
net.ipv4.ip_forward = 1 Enable IP forwarding, open the sysctl configuration with a editor
vim /etc/sysctl.conf
Add or adjust the line below to the sysctl configuration
net.ipv4.ip_forward = 1
Reload sysctl the activate the new settings
sysctl --system
Configure network configuration for Ubuntu
Open the network interface configuration file with a editor
vim /etc/network/interfaces
The example below shows how to setup all 3 network interfaces. Every network interface retrieves ip information with DHCP and static routing is setup manually. Adjust IP information to your own situation.
# The First network interface: Floating IP 1.2.3.4
auto eth0
iface eth0 inet dhcp
post-up ip route add 192.168.1.0/24 dev eth0 src 192.168.1.3 table table1
post-up ip route add default via 192.168.1.1 dev eth0 table table1
post-up ip rule add from 192.168.1.3/32 table table1
post-up ip rule add to 192.168.1.3/32 table table1
post-down ip route del 192.168.1.0/24 dev eth0 src 192.168.1.3 table table1
post-down ip route del default via 192.168.1.1 dev eth0 table table1
post-down ip rule del from 192.168.1.3/32 table table1
post-down ip rule del to 192.168.1.3/32 table table1
# The Second network interface: Floating IP 1.2.3.4
auto eth1
iface eth1 inet dhcp
post-up ip route add 192.168.1.0/24 dev eth1 src 192.168.1.4 table table2
post-up ip route add default via 192.168.1.1 dev eth1 table table2
post-up ip rule add from 192.168.1.4/32 table table2
post-up ip rule add to 192.168.1.4/32 table table2
post-down ip route del 192.168.1.0/24 dev eth1 src 192.168.1.4 table table2
post-down ip route del default via 192.168.1.1 dev eth1 table table2
post-down ip rule del from 192.168.1.4/32 table table2
post-down ip rule del to 192.168.1.4/32 table table2
# The Thirth network interface: Floating IP 1.2.3.4
auto eth2
iface eth2 inet dhcp
post-up ip route add 192.168.1.0/24 dev bridge2 src 192.168.1.5 table table3
post-up ip route add default via 192.168.1.1 dev bridge2 table table3
post-up ip rule add from 192.168.1.5/32 table table3
post-up ip rule add to 192.168.1.5/32 table table3
post-down ip route del 192.168.1.0/24 dev bridge2 src 192.168.1.5 table table3
post-down ip route del default via 192.168.1.1 dev bridge2 table table3
post-down ip rule del from 192.168.1.5/32 table table3
post-down ip rule del to 192.168.1.5/32 table table3
Restart your system to activate the network settings
Configure network configuration for CentOS
Check for every interface if the configuration file is created. When adding new interfaces, you need to create a new configuration.
First network interface
vim /etc/sysconfig/network-scripts/ifcfg-eth0
Configuration as below
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=dhcp
NM_CONTROLLED=no
Second network interface
vim /etc/sysconfig/network-scripts/ifcfg-eth1
Configuration as below
DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=dhcp
NM_CONTROLLED=no
Third network interface
vim /etc/sysconfig/network-scripts/ifcfg-eth2
Configuration as below
DEVICE=eth2
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=dhcp
NM_CONTROLLED=no
For every interface we need to create a separate routing and rule configuration file.
First network interface Routes configuration
vim /etc/sysconfig/network-scripts/route-eth0
Configuration as below
192.168.1.0/24 dev eth0 src 192.168.1.3 table table1
default via 192.168.1.1 dev eth0 table table1
Rules configuration
vim /etc/sysconfig/network-scripts/rule-eth0
Configuration as below
from 192.168.1.3/32 table table1
to 192.168.1.3/32 table table1
Second network interface Routes configuration
vim /etc/sysconfig/network-scripts/route-eth1
Configuration as below
192.168.1.0/24 dev eth1 src 192.168.1.4 table table2
default via 192.168.1.1 dev eth1 table table2
Rules configuration
vim /etc/sysconfig/network-scripts/rule-eth1
Configuration as below
from 192.168.1.4/32 table table2
to 192.168.1.4/32 table table2
Third network interface Routes configuration
vim /etc/sysconfig/network-scripts/route-eth2
Configuration as below
192.168.1.0/24 dev eth2 src 192.168.1.5 table table3
default via 192.168.1.1 dev eth2 table table3
Rules configuration
vim /etc/sysconfig/network-scripts/rule-eth2
Configuration as below
from 192.168.1.5/32 table table3
to 192.168.1.5/32 table table3
Restart your system to activate the network settings
Sometimes it’s desirable to use a floating ip. The advantage of using a floating ip is that you can still use it after removing an instance and re-link it to another instance. This is useful when using services, such as a webserver or e-mail server where you don’t want to lose your public IP.
In order to set up a floating ip successfully, please follow the steps below. At the bottom of this webpage you will also find a video with instructions.
prequires
It is not possible to link multiple floating ip addresses to 1 instance.
In the menu under the tab “Network” and subtab “Networking” you must ensure that you’ve created a private network. You can use the internal ip series 192.168.0.0/16, 172.16.0.0/12 or 10.0.0.0/8.
The set-up of an instance
You can skip this step if you’ve already created an instance with a network interface linked to a private network and serves as an example.
Click in the menu on “Compute” and then on “Instances”
Click in the main screen on “LAUNCH INSTANCE”
Enter a name for your Instance
Select a source from the image list
Select a desired Flavor
Select ‘private network’ at networks
Select a matching firewall at ‘Security Groups’
Click on “LAUNCH INSTANCE”
The installation of a floating ip
Click in the menu on “Network” and then on “Floating IPs”
Click on “ALLOCATE IP TO PROJECT” in the main screen and then on “ALLOCATE IP”
In the main screen you’ll now see a floating IP assigned. Click on the floating IP on “ASSOCIATE”
Select at “Port to be associated”, the port of the instance which need to be linked to the floating ip
Your floating ip is now linked to your instance. This is immediately active and usable
You are now able to test the floating ip by pinging it from a remote host. It is also possible to check your outgoing traffic by sending a ping externally.
We use MTU 9000.
Jumbo frames are supported in the Openstack platform.
Yes.
As long as you do not delete the Router it will keep the same IP address.
This is because OpenStack assigns Security Groups to ports.
When a network is detached or disconnected the corresponding port is removed, including all the security groups attached to that port.
The reverse DNS of your instance is actually the name of your OpenStack instance. Before using, we validate the name of your OpenStack instance with the following checks
- Is the name that you’ve given the OpenStack instance actually a domain name?
- If we lookup the (forward) DNS, do we get a IP address back that is connected to the instance?
- If you run a mail server on port 25, does this return the same hostname when we send a HELO / EHLO request?
- If all of those checks match, the reverse DNS address will be set to the name of your instance.
If you already have an existing instance in OpenStack, but the name does not yet match those requirements, you can easily change it via the OpenStack API or by using our Skyline interface. We will check once a day if the requirements are met.
If the checks fail, a reverse DNS will be generated. For example vm-
In case you don’t use an Floating IP address, the server will be communicating with the IP address of your Router as its source address.
You can verify this by issuing the following command:
dig +short myip.opendns.com @resolver1.opendns.com
or
curl ifcfg.me
The response will show you the IP address from which your server is communicating with.
Please make sure the private network IP address is attached and active on the eth0 interface.
Contact our Support Team with the UUID of the server if the problem persists.
Please include which client was used, the date/timestamp of the error and the error itself (if any).
Please make sure you have no active ports assigned.
Disconnnect all related ports from all servers first.
Also, you have to delete the router first before you can delete the network.
Please make sure you have disconnected all active ports assigned.
This is not possible.
Please remove the public fixed IP address, add a private network IP address and attach a Floating IP address to it instead.
It is not possible to reassign public fixed IP addresses to another server.
Please use Floating addresses instead.
IPv6 is not yet supported on OpenStack. We hope to offer this in the forseeable future.
We do not provide support for IP range reservations.
You could however reserve as many IP addresses as needed by adding them to you account.
They will remain assigend to your account untill you delete them.
Please keep in mind that any assigned resources, even if not actively in use will be charged.
No, this is not possible.
Yes. Please contact out Support Team to inquire more information about the use of hardware firewalls.
No.
You can only attach Floating IP’s to an interface in a private network.