IP aliasing is a special configuration of your dedicated server network, which enables you to associate several IP addresses to only one network interface card.
The aim is to create a virtual interface above eth0, which will be named eth0:0 and will attach the additional IP or Fail over to your network interface. Here are the explanations for the addition via SSH. You can also do it directly via your webmin, ‘others’ section, then files management
1. We copy the file of eth0 interface and we rename it eth0:0. This will enable you to edit the file in peace:
2. We can now edit the file eth0:0 to replace the IP. You can either use pico or vi:
First of all, replace the device name, then the existing IP by the failover/ additional one that you have received by email:
ONBOOT="yes"
BOOTPROTO="none"
IPADDR="IP.FAIL.OVER"
NETMASK="255.255.255.255"
BROADCAST="IP.FAIL.OVER"
3. Now you just have to assemble the new interface that we have just added:
At the time of reboot, the interface will automatically be assembled.
4. IP testIf operations 1 to 3 have been correctly carried out, the IP shown in eth0:0 file must be pingable from another machine and answer to the requests.
If you have several additional IPs; you can renew the operation by using eth0:1, eth0:2 and so on.
If after handling, your IP doesn’t answer to the pings, please contact our support.
2. We can now edit the eth0:0 file to replace the IP. You can either use nano or vi:
First of all, replace the device name, then the existing IP by the fail over/ additional one that you have received by email:
BOOTPROTO="static"
IPADDR="IP.FAIL.OVER"
NETMASK="255.255.255.255"
ONBOOT="yes"
BROADCAST="IP.FAIL.OVER"
At the time of reboot, the interface will automatically be assembled.
4. IP testIf operations 1 to 3 have been correctly carried out, the IP shown in eth0:0 file must be pingable from another machine and answer to the requests.
If you have several additional IPs; you can renew the operation by using eth0:1, eth0:2 and so on.
If after handling, your IP doesn’t answer to the pings, please contact our support.
The aim is to create a virtual interface above eth0, which will be named eth0:0 and will attach the additional IP or Failover to your network interface.
1. First of all, we copy the root file to be able to go backward at any time
2. We can now edit the file to add the ip
You can either use nano or vi. Under Gentoo, an alias is directly added in eth0. We don’t create any eth0:0 interface (as under Redhat for example)
Important: default IP of the server must remain config_eth= on the same line. In order to make sure that some specific handlings in OVH work correctly
After netmask 255.255.255.0, Press Enter and add your IP (XXXXXXXX have of course to be replaced by your Ips)
You must add:
config_eth0=( " xxx.xxx.xxx.xxx netmask 255.255.255.0" "ip.fail.over.here netmask 255.255.255.255 brd ip.fail.over.here" )Your /etc/conf.d/net file must contain the following:
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=( "xxx.xxx.xxx.xxx netmask 255.255.255.0"
"xxx.xxx.xxx.xxx netmask 255.255.255.255 brd ip.fail.ov.er" )
routes_eth0=( "default gw xxx.xxx.xxx.254" )
3. Start the network interface again
In order to ping your IP-failover, you just have to start the network interface again
4. IP test
If operations 1 to 3 have been correctly carried out, the IP shown in eth0:0 file must be pingable from another machine and answer to the requests.
You can therefore insert an additional IP line by line. However, it is important that the default IP remains on the same line as config_eth0
The aim is to create a virtual interface above eth0, which will be named eth0:0 and will attach the additional IP or Failover to your network interface.
1. First of all, we copy the root file to be able to go backward at any time
2. We can now edit the file to add the ip
You can either use nano or vi. Under Gentoo, an alias is directly added in eth0. We don’t create any eth0:0 interface (as under Redhat for example)
You must add:
iface eth0:0 inet static
address IP.FAIL.OV.ER
netmask 255.255.255.255
Your /etc/conf.d/net file must contain the following:
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask 255.255.255.0
broadcast xxx.xxx.xxx.255
network xxx.xxx.xxx.0
gateway xxx.xxx.xxx.254
auto eth0:0
iface eth0:0 inet static
address IP.FAIL.OV.ER
netmask 255.255.255.255
broadcast IP.FAIL.OV.ER
3. Start the network interface again
In order to ping your IP-failover, you just have to start the network interface again
4. IP test
If operations 1 to 3 have been correctly carried out, the IP shown in eth0:0 file must be pingable from another machine and answer to the requests.
You can therefore insert an additional IP line by line. However, it is important that the default IP remains on the same line as config_eth0
1. We edit the file /etc/ips :
2. We add the ip to the file:
3. We add the ip in /etc/ipaddrpool
4. We restart the service managing failover ips :
For HG servers which are delivered with 2 Ip addresses and 2 network cards, it's necessary to add the fail-over Ip in the routing rules:
{
/sbin/ip route add default via IP.INITIAL.2eme.CARTE dev eth1 table 223
/sbin/ip rule add from INITIAL.IP.OF.SERVER/32 table 223
/sbin/ip rule add from IP.FAILOVER.OF.SERVER/32 table 223
}
A example file on a HG server with Gentoo distribution gives:
scripts in /etc/init.d. To create a more complete configuration,
please review /etc/conf.d/net.example and save your configuration
in /etc/conf.d/net (this file :]!).
config_eth0=( "xxx.xxx.xxx.xxx netmask 255.255.255.0"
"xxx.xxx.xxx.xxx netmask 255.255.255.255 brd xxx.xxx.xxx.255"
)
routes_eth0=( "default gw xxx.xxx.xxx.254" )
config_eth1=( "xxx.xxx.xxx.xxx netmask 255.255.255.0"
"xxx.xxx.xxx.xxx netmask 255.255.255.255 brd xxx.xxx.xxx.255"
)
postup()
{
/sbin/ip route add default via xxx.xxx.xxx.xxx dev eth1 table 223
/sbin/ip rule add from xxx.xxx.xxx.xxx/32 table 223
/sbin/ip rule add from IP.FAIL.OVER.HERE/32 table 223
}
First of all, you must add a new device:
- 'Start', 'configuration panel', 'new device'
- Click on 'next', then tick "Yes, I have already connected the device" and 'validate'
- Select the last element of the list: "Add a new device" and 'validate'
Choose the second edition:
- "Install the device that I select manually in the list (experimented user)" then 'validate'
- Select "Network card" then in the next window, search the Microsoft producer and select "Microsoft loopback card"
Finish the installation of this device.
By installing the loopback card, a new interface appeared:
- "Connection to the local network 2" (except for HG servers which will have a third interface)
It's the time to add to it the Ip fail-over address:
- In 'start' menu, select configuration panel, network connections then Connection to the local network 2
- Click on 'properties'
- Select Internet Protocol
(TCP/IP) - Click on 'properties'
- Enter the Ip address corresponding to your Ip fail-over and 255.255.255.0 as netmask. Let the others fields empty
- Validate all the open windows
Finally, you must correct the netmask by 255.255.255.255 but it isn't allowed by the dialogue box of Ip configuration; It's necessary to modify the information in the registry database:
- In 'start' menu, click on 'Execute', then type regedit
- Type CTRL+F3 in order to open the search window, then indicate the Ip fail-over address and click on 'next'
- Once you found the IP, double-click on "
SubnetMask " parameter and change 255.255.255.0 by 255.255.255.255 and 'validate' - Continue the search by typing F3, do the modification again as previously
- Close the register editor
Finally, to validate the modifications, reboot the interface:
- 'Start', 'Configuration panel', 'network connections' and do a right click on "Connection to the local network 2" then click on desactivate
Wait for few seconds and activate the network connection again
By default on Windows 2008 servers are using DHCP in the network configuration. If you have already configured an IP failover or you have already placed your fixed IP configuration then go to step 2.
1. You must first change the DHCP configuration on the network for a fixed network configuration
Open a command console: type the command:
this will give you:

Get your IPv4 address, subnet mask and default gateway from this screen.
In our example the IP is : 94.23.229.151
then:
- Go to Start >> Control Panel >> Network and Internet >> Network and Sharing Center >> Change adapter settings (on the left menu)
- Right-click on Local Area Connection
- Select Properties
- Select Internet Protocol Version 4 (TCP/IPv4) and then click Properties
-Check "Use the following IP address" and replace the main server IP, subnet mask, default gateway obtained through the ipconfig command above (in preferred DNS server, put 213.186.33.99)

WARNING: do not make a mistake on this information, or the server will no longer be available and you'll have to correct the network configuration using modeWin Rescue
2. Configure your IP failover
Then click on Advanced (in the TCP/IPv4 properties dialog)

in the IP address section, click add:

fill it in with your IP failover and netmask 255.255.255.255

click add.
Your IP Failover is now usable.
1. Determine the name of your primary network interface You can use the ifconfig command for this operation:
Gives the following output:
nfe0: flags=8843
options=10b
ether 00:24:8c:d7:ba:11
inet 94.23.196.18 netmask 0xffffff00 broadcast 94.23.196.255
inet 87.98.129.74 netmask 0xffffffff broadcast 87.98.129.74
media: Ethernet autoselect (100baseTX
status: active
lo0: flags=8049
options=3
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000 v comsdvt#
The name of the interface is therefore: nfe0 2. We copy the file /etc/rc.conf so that we can go roll-back at any time: You can use the cp command:
3. We edit the file /etc/rc.conf You can use nano or vi editor for this operation
Add the following line at end of the file: ifconfig_INTERFACE_alias0="inet IPFAILOVER netmask 255.255.255.255 broadcast IPFAILOVER"
Replace respectively INTERFACE with IPFAILOVER and the name of the interface discovered in step no 1, and then IPFAILOVER with your own ip failover.
Example:
4. Restart the network interface
Information! Type this command in two separate steps in case of loss of access to your server |
5. Test the IP
If the operations 1-4 were done correctly, the specified IP in the file must be pingable from the outside and respond to queries. If after the modifications your IP does not respond to pings, please contact support.
1. Determine the name of your primary network interface You can use the ifconfig command for this operation:
==========================================
IP-Subnet-Mask numbers
IP mask numbers are used to divide internet addresses into blocks called subnets. The mask number represents the number of 1s in the binary of the address that is 'masked" against the address so that it ignores the last bits which are for the group of IP addresses in the masked address.
The first address of a subnet block (all 0s) is called the network address or network ID. The last address (all 1s) is the broadcast address of the network. Typically the network address +1 or the broadcast address -1 is the gateway to the internet. The 'slash' notation (ie /24) is known as CIDR format, while the more conventional 255.255.255.0 notation is considered a subnet mask.
Net bits | Subnet mask | total-addresses |
---|---|---|
/20 | 255.255.240.0 | 4096 |
/21 | 255.255.248.0 | 2048 |
/22 | 255.255.252.0 | 1024 |
/23 | 255.255.254.0 | 512 |
/24 | 255.255.255.0 | 256 |
/25 | 255.255.255.128 | 128 |
/26 | 255.255.255.192 | 64 |
/27 | 255.255.255.224 | 32 |
/28 | 255.255.255.240 | 16 |
/29 | 255.255.255.248 | 8 |
/30 | 255.255.255.252 | 4 |