Network Linux configuration multiple IP

Here I will describe how I do configuration on Debian based Linux. Why it is necessary to have several IP addresses for one network card. There could be number of reasons.

1) Inability to have more than one Ethernet adapter on the server.

2) High price for Ethernet connectivity in data center. I never seen additional NIC provided for free.

3) Good for day/night balancing of server resources while IPs from EU could be reachable at one IP the US users could reach another IP on the same Ethernet adapter.

4) Good for SEO.

5) Good for PTR records.

6) Good for manage data streams over TCP stack (not Unix socket).

So here the method. While having the number of various wizards and tui network configuration utilities, I suggest manual changing of interfaces file.

In general it looks extremely easy. I’m using nano editor, so the path is /etc/network/interfaces

type: nano /etc/network/interfaces

installation of network

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

So in this example it is clearly visible how two IP addresses 72.115.28.108 and 72.115.28.77 assigned to single network adapter. Pay attention that second IP is made via alias.

Any changes in this file could be taken in the affect by executing this command /etc/init.d/networking restart

Leave a Comment.