Gandi Wiki


Questions

Network Interface Management

What is a "Network Interface"?

A network interface is like a network card that you plug into your computer. Currently, each server only has one, called the default interface. This interface has an IP address: the one that you are automatically assigned when you create your server.
You can, however, have up to 4 network interfaces to your server; in other words, 4 IP addresses.

Technical explanation

Gandi allows you to associate multiple IP addresses to your server, since the network interfaces are dynamically configured for each virtual server (VPS). When an IP address is associated to a machine, it is managed by a dedicated network interface. This interface, once dynamically connected to the VPS by udev, gets its configuration by DHCP. If the interface is the machine's default interface, (aka eth0), the DNS information, default path, and the name of the machine are also configured. In the case of a "secondary" interface (aka eth1 etc.) only the address of the interface will be configured.

If an interface is removed from a VPS, the information concerning this interface is simply "forgotten" by the system.

Note that the default path of the VPS will remain the same, and will respond to a distant client (for example, a web client) by outdoing packets via eth0. Also, the bandwidth quota allocated to the secondary interfaces (eth1, ..) is only really used when you access the secondary interface's local network, or if you have configured your server in a special way. You can therefore simply allocate the the maximum bandwidth to eth0 and 1% to the secondary interfaces.

Purchasing additional IP addresses

Additional IP addresses are allocated in the same was as additional disks: in the form of quota.
Additional IP addresses can be purchased for a monthly period (€1 excl. VAT) or annually (€10 excl. VAT).
To purchase additional IP addresses, go to your Resource Management page, and choose the payment period (monthly or yearly).
You will then be able to choose the number of IP addresses that you would like to add to your quota.

Once the payment process has been completed, you will then have a new interface available in your pool of network resources.

WARNING: The number of IP addresses used versus the total number of IP addresses = the number of default IP addresses + the number of additional IP addresses.

Prepare your server for an additional IP address

If your server was not recently created, and if it does not use Gandi AI, you will need to first perform a slight modification on your server by adding a program. This program will automatically configure the interface on the server when it is attached.

Note that this installation is not mandatory: if you are an expert and would like to configure the interface yourself, you can do that as well. We recommend, however, updating the gandi-hosting-vm package in order to benefit from this feature. If you are running a Debian-based distribution:

  • apt-get update to update the list of packages
  • apt-get install gandi-hosting-vm to install the most recent version of the gandi-hosting-vm package

Version 2652 is the minimum version necessary to run automatic interface configuration. All servers creates after 12/11/2009 are already compatible.

Next, you will have to configure your server in order it can accept arp request on all interfaces attached to your server. To do so, just edit the sysctl.conf file, and add the following directive :

sysctl -w net.ipv4.conf.all.arp_announce=2

You will also have to deactivate the rp_filter on your kernel:

sysctl -w net.ipv4.conf.default.rp_filter = 0

Once all this is done, you will be able to ping all interfaces mounted on your server.

Add an IP address to a server

You must first attach the interface to your VPS before you can attach an additional IP address to it.
You must therefore have at least one interface available. Simply click on the "Attach" link that it corresponds to. You will then have the possibility of selecting which server you want to attach the interface to, and consequently, the possibility of adding an IP address.

Manage secondary network interfaces

Once your Network interface has been attached to the server of your choice, go to your server's management page. Then, in in the upper part of the page, you will see more than one interface attached to it!

Click on the "Update" link to manage your interfaces. Then, from that page, you will be able to select the bandwidth allocation between each IP address (the allocation is equally divided by default), in addition to the default reverse_dns.

NOTE: Currently, all outgoing traffic from your VPS is sent via the default path - with the exception of special cases that have been specifically configured otherwise. Therefore, leave the maximum bandwidth for your default interface!

By clicking on the update icon, you will be able to access options that will let you change the percentage of bandwidth that you allocate to this network interface, or even, the possibility of changing the default reverse_dns.

Questions

RSS feed for questions matching this filter (Help)

Last modified: 18 Jun 2010 at 11:29 by Rudy G. (Gandi)