We use cookies to improve our services and provide a better experience. By continuing to use this site, you agree with our Cookies Policy.

Tutorials
More than 400 step-by-step articles to guide you through online project development.
HomeTutorialsOperating SystemsLinuxAdministration

How to Assign Additional IP Addresses in Debian

OpenVZ VPS
Ubuntu VPS
Linux KVM Hosting
USA VPS
Germany Cloud Servers
Linux Cloud Server
Windows Cloud Server
KVM VPS
cPanel KVM
Brazil VPS
Follow These Steps to Assign Additional IP Addresses in Debian

In order to add an additional IP address to your Debian system you will have to edit /etc/network/interfaces file and add appropriate lines with network information.

First, open the network interfaces file.

nano /etc/network/interfaces

The original file will look something like this:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.10.10.10
netmask 255.255.255.0
broadcast 10.10.10.255
network 10.10.10.0
gateway 10.10.10.1

You should not change any present configuration, instead add additional lines, for example:

auto eth0:1
iface eth0:1 inet static
address 10.10.10.11
netmask 255.255.255.0

Take note that you must add :[number] to the text eth0( for example eth0:2). The number changes depending on how many additional IP’s you have. If you have 5 additional IP’s and you want to add them the numbers will be eth0:1, eth0:2, eth0:3, etc.

Restart your network interface using command:

/etc/init.d/networking restart

Linux Cloud Server
Windows Cloud Server
Brazil VPS
Ubuntu VPS
cPanel KVM
Linux KVM Hosting
USA VPS
OpenVZ VPS
Germany Cloud Servers
KVM VPS
Rate this Tutorial:
No Comments Leave a Comment
Leave a Comment