Manual Konfiguration IP-Adressen/en

Aus EUserv Wiki

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Requirements)
(Example)
Zeile 75: Zeile 75:
===== Example =====
===== Example =====
-
To configure the IP address 123.123.123.123 with netmask 255.255.255.255 to interface eth0:1 proceed as follows:
+
To configure the IP address 123.123.123.123 on interface eth0:1 proceed as follows:
* Create the following configuration file:
* Create the following configuration file:
Zeile 88: Zeile 88:
DEVICE=eth0:1
DEVICE=eth0:1
BOOTPROTO=none
BOOTPROTO=none
 +
ONBOOT=yes
IPADDR=123.123.123.123  
IPADDR=123.123.123.123  
NETMASK=255.255.255.255  
NETMASK=255.255.255.255  

Version vom 14:49, 11. Sep. 2019

Configuration of additional IP addresses

Inhaltsverzeichnis

Configuration of additional IP addresses

General

This manual will show you how to configure additional IP addresses to your dedicated server. This depends on your selected operating system. According to your operating system you have to configure different configuration files. You will find support in the following Wiki guide:

Requirements

To begin the configuration, you have to note the following data:

  • IP address
  • Gateway
  • Subnetmask


You will find this data in the customer panel. You will find support in the following Wiki guide:
Customer panel_servers_IP_addresses

If you use IPv6 addresses, you will find support in the following Wiki guide:
Customer panel_servers_IPv6_addresses

Configuration of IP addresses under Linux

CentOS 6.x / CentOS 7.x

Requirements

Enter the following command to detect the name of the network interfaces:

ip addr

The following names are specified for the network interface:

  • eth0: first network card
  • eth1: second network card
  • lo0: loopback

Configuration IPv4

Under CentOS 6.x/7.x the configuration files for the network interfaces can be found under /etc/sysconfig/network-scripts/. Additional IP addresses can not be directly configured to the respective interface (e.g. eth0) in the configuration file (/etc/sysconfig/network-scripts/ifcfg-eth0). For each IP address a virtual interface will be arranged according to scheme eth0:0, eth0:1 etc. Please proceed as follows:

  • Create the following configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-eth0:1
  • Add the following lines:
DEVICE=eth0:1
BOOTPROTO=none
ONBOOT=yes
IPADDR=<IP-ADDRESS>
NETMASK=255.255.255.255

Replace <IP-ADDRESS> with the additional IP address you want to configure on network interface eth0 and <NETMASK> with the noted netmask.

  • Enter the following command to restart the network:
service network restart


Example

To configure the IP address 123.123.123.123 on interface eth0:1 proceed as follows:

  • Create the following configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-eth0:1
  • Add the following lines:
DEVICE=eth0:1
BOOTPROTO=none
ONBOOT=yes
IPADDR=123.123.123.123 
NETMASK=255.255.255.255 
  • Enter the following command to activate the additional IP address:
service network restart

Configuration IPv6

Under CentOS 6.x additional IPv6 addresses can be arranged via the variable IPV6ADDR_SECONDARIES in the primary configuration file of the interface (/etc/sysconfig/network-scripts/ifcfg-eth0). Multiple addresses will be separated with a blank character. Please proceed as follows:

  • Open the following configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
  • Add the following lines:
...
IPV6ADDR_SECONDARIES=<IPV6-ADDRESS>
...

Replace <IPV6-ADDRESS> with the additional IPv6 address you want to configure.

  • Enter the following command to restart the network:
service network restart


Example

To configure the IPv6 address 2001:0db8:2a02:c200:0123:4567:89ab:0002/128 to the interface eth0, please proceed as follows:

  • Öffnen Sie die folgende Konfigurations-Datei:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
  • Add the following lines:
...
IPV6ADDR_SECONDARIES=2001:0db8:2a02:c200:0123:4567:89ab:0002/128 
...
  • Enter the following command to restart the network:
service network restart

Fedora

Requirements

Enter the following command to detect the name of the network interfaces:

ip addr

The following names are specified for the network interface:

  • net0: first network card
  • net1: second network card
  • lo0: loopback

Configuration IPv4

In Fedora the configuration files for the network interfaces can be found in /etc/sysconfig/network-scripts/. Additional IP addresses for each interface will be arranged according to scheme IPADDR0, IPADDR1, IPADDR2 und PREFIX0, PREFIX1, PREFIX2 etc. Please proceed as follows:

  • Open the following configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-net0
  • Add the following lines:
...
IPADDR0=<IP-ADDRESS>
PREFIX0=32
...

Replace <IP-ADDRESS> with the additional IP address you want to configure on network interface net0

  • Führen Sie folgenden Befehl aus, damit das Netzwerk neugestartet wird:
  • Enter the following command to restart the network:
service network restart


Example

To configure the IP address 123.123.123.123 proceed as follows:

  • Open the following configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-net0
  • Add the following lines:
...
IPADDR0=123.123.123.123
PREFIX0=32
...
  • Enter the following command to restart the network:
service network restart

Configuration IPv6

Additional IPv6 addresses can be arranged via the variable IPV6ADDR_SECONDARIES in the primary configuration file of the interface (/etc/sysconfig/network-scripts/ifcfg-net0). Multiple addresses will be separated with a blank character. Please proceed as follows:

  • Open the following configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-net0
  • Add the following lines:
...
IPV6ADDR_SECONDARIES=<IPV6-ADDRESS>
...

Replace <IPV6-ADDRESS> with the additional IPv6 address you want to configure.

  • Enter the following command to restart the network:
service network restart


Example

To configure the IPv6 address 2001:0db8:2a02:c200:0123:4567:89ab:0002/128 to the interface net0, please proceed as follows:

  • Öffnen Sie die folgende Konfigurations-Datei:
vi /etc/sysconfig/network-scripts/ifcfg-net0
  • Add the following lines:
...
IPV6ADDR_SECONDARIES=2001:0db8:2a02:c200:0123:4567:89ab:0002/128 
...
  • Enter the following command to restart the network:
service network restart

Debian 8.x / Ubuntu 15.x

Requirements

Enter the following command to detect the name of the network interfaces:

ifconfig

The following names are specified for the network interface:

  • eth0: first network card
  • eth1: second network card
  • lo0: loopback

Configuration IPv4

Under Debian and Ubuntu the network will be configured via one configuration file. To configure additional IP addresses, please proceed as follows:

  • Open the configuration file "/etc/network/interfaces":
vi /etc/network/interfaces
  • Add the following lines:
auto eth0:1
iface eth0:1 inet static
address <IP-ADDRESS>
netmask <NETZMASK>

Replace <IP-ADDRESS> with the additional IP address you want to configure on network interface eth0 and <NETMASK> with the noted netmask.

  • Enter the following command to restart the network:
service networking stop;service networking start


Example

To configure the IP address 123.123.123.123 with netmask 255.255.255.255 to interface eth0:1 proceed as follows:

  • Open the configuration file "/etc/network/interfaces":
vi /etc/network/interfaces
  • Add the following lines:
auto eth0:1
iface eth0:1 inet static
address 123.123.123.123
netmask 255.255.255.255
  • Enter the following command to restart the network:
service networking stop;service networking start


Configuration IPv6

Under Debian and Ubuntu the network will be configured via one configuration file. To configure additional IPv6 addresses, please proceed as follows:

  • Open the configuration file "/etc/network/interfaces":
vi /etc/network/interfaces
  • Add the following lines:
auto eth0:1
iface eth0 inet6 static
address <IP-ADDRESS>
netmask <NETZMASK>

Replace <IP-ADDRESS> with the additional IP address you want to configure on network interface eth0 and <NETMASK> with the noted netmask.

  • Enter the following command to restart the network:
service networking stop;service networking start


Example

To configure the IPv6 address 2001:0db8:2a02:c200:0123:4567:89ab:0001 to interface eth0:1 proceed as follows:

  • Open the configuration file "/etc/network/interfaces":
vi /etc/network/interfaces
  • Add the following lines:
auto eth0
iface eth0 inet6 static
address 2001:0db8:2a02:c200:0123:4567:89ab:0001
netmask 112
  • Enter the following command to restart the network:
service networking stop;service networking start


Configuration of IP addresses under BSD

Requirements

Enter the following command to detect the name of the network interfaces:

ifconfig

The following names are specified for the network interface:

  • eth0: first network card
  • eth1: second network card
  • lo0: loopback

Configuration

Under BSD the network will be configured via one configuration file. To configure additional IP addresses, please proceed as follows:

  • Open the configuration file "/etc/rc.conf":
vi /etc/rc.conf
  • Add the following lines:
ifconfig_dc0_alias0="inet <IP-ADDRESS> netmask <NETMASK>"

Replace <IP-ADDRESS> with the additional IP address, you want to configure on network interface dc0 and <NETMASK> with the noted netmask.

  • Enter the following command to restart the network:
service netif restart


Example

To configure the IP address 123.123.123.123 with netmask 255.255.255.255 to interface dc0 proceed as follows:

  • Open the configuration file "/etc/rc.conf":
vi /etc/rc.conf
  • Add the following lines:
ifconfig_dc0_alias0="inet 123.123.123.123 netmask 255.255.255.255"
  • Enter the following command to restart the network:
service netif restart


Configuration of IP addresses under Windows Server 2008/2012

Configuration of IPv4

To configure an additional IPv4 address, please proceed as follows:

  • Open the Network und Sharing Center and click on Local Area Connection.



Datei:ws2008_01_1.png



  • Click on Properties.



Datei:ws2008_02.png



  • Mark Internet Protocol Version 4 (TCP/IPv4) and click on Properties.



Datei:ws2008_03.png



  • Click on Advanced... and finally on Add... under IP addresses.



Datei:ws2008_05_1.png



  • Enter the additional IP address and subnet mask and click on Add.



Datei:ws2008_06_1.png



You have configured the new IP address.

Datei:ws2008_07_1.png



Configuration of IPv6

To configure an additional IPv6 address, please roceed as follows:

  • Mark Internet Protocol Version 6 (TCP/IPv6) and click on Properties.



Datei:ws2008_08_1.png



  • Click on Advanced... and finally on Add... under IP addresses.



Datei:ws2008_09.png



  • Enter the additional IPv6 address and subnet mask and click on Add.



Datei:ws2008_12.png



You have configured the new IPv6 address.

Datei:ws2008_13.png