Manual Konfiguration IP-Adressen/en
Aus EUserv Wiki
Seki1 (Diskussion | Beiträge) (→Debian 10 / Ubuntu 15.x) |
Seki1 (Diskussion | Beiträge) (→Configuration of IP addresses in BSD) |
||
Zeile 436: | Zeile 436: | ||
<pre> | <pre> | ||
- | ifconfig_dc0_alias0="inet <IP-ADDRESS> netmask | + | ifconfig_dc0_alias0="inet <IP-ADDRESS> netmask 255.255.255.255" |
</pre> | </pre> | ||
- | Replace <IP-ADDRESS> with the additional IP address, you want to configure on network interface dc0 | + | Replace <IP-ADDRESS> with the additional IP address, you want to configure on network interface dc0. |
* Enter the following command to restart the network: | * Enter the following command to restart the network: | ||
Zeile 449: | Zeile 449: | ||
==== Example ==== | ==== Example ==== | ||
- | To configure the IP address 123.123.123.123 | + | To configure the IP address 123.123.123.123 on interface dc0 proceed as follows: |
* Open the configuration file "/etc/rc.conf": | * Open the configuration file "/etc/rc.conf": |
Aktuelle Version vom 17:00, 11. Sep. 2019
Languages: |
Deutsch • English |
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 in 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
In CentOS 6.x/7.x the configuration files for the network interfaces can be found in /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.
- 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
In CentOS 6.x/7.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). Please proceed as follows:
- Open the following configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
- Add the following lines:
... IPV6ADDR_SECONDARIES="<IPV6-ADDRESS>/128" ...
Replace <IPV6-ADDRESS> with the additional IPv6 address you want to configure.
- Multiple addresses are separated with a space:
... IPV6ADDR_SECONDARIES="<IPV6-ADDRESS-1>/128 <IPV6-ADDRESS-2>/128 ..." ...
- 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 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 30
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
- 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). Please proceed as follows:
- Open the following configuration file:
vi /etc/sysconfig/network-scripts/ifcfg-net0
- Add the following lines:
... IPV6ADDR_SECONDARIES="<IPV6-ADDRESS>/128" ...
Replace <IPV6-ADDRESS> with the additional IPv6 address you want to configure.
- Multiple addresses are separated with a space:
... IPV6ADDR_SECONDARIES="<IPV6-ADDRESS-1>/128 <IPV6-ADDRESS-2>/128 ..." ...
- 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 to the interface net0, please proceed as follows:
- Open the following configuration file:
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 10 / Ubuntu 19.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
In 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 255.255.255.255
Replace <IP-ADDRESS> with the additional IP address you want to configure on network interface eth0.
- Enter the following command to restart the network:
service networking stop;service networking start
Example
To configure the IP address 123.123.123.123 on 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
In 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:1 inet6 static address <IP-ADDRESS> netmask 128
Replace <IP-ADDRESS> with the additional IP address you want to configure on network interface eth0.
- 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:1 iface eth0:1 inet6 static address 2001:0db8:2a02:c200:0123:4567:89ab:0001 netmask 128
- Enter the following command to restart the network:
service networking stop;service networking start
Configuration of IP addresses in 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
In 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 255.255.255.255"
Replace <IP-ADDRESS> with the additional IP address, you want to configure on network interface dc0.
- Enter the following command to restart the network:
service netif restart
Example
To configure the IP address 123.123.123.123 on 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 in 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.
- Click on Properties.
- Mark Internet Protocol Version 4 (TCP/IPv4) and click on Properties.
- Click on Advanced... and finally on Add... below IP addresses.
- Enter the additional IP address and subnet mask and click on Add.
You have configured the new IP address.
Configuration of IPv6
To configure an additional IPv6 address, please roceed as follows:
- Mark Internet Protocol Version 6 (TCP/IPv6) and click on Properties.
- Click on Advanced... and finally on Add... below IP addresses.
- Enter the additional IPv6 address and subnet mask and click on Add.
You have configured the new IPv6 address.