You create an alias of the network interface, and assign the IP to the alias.
If the interface you want to alias is for example
eth0 then the first alias will be
eth0:0. If you add a third IP, you add a second alias,
eth0:1, and so on.
The way you do this varies a bit between Linux distributions. You can use a tool like NetworkManager to manage them. On a server, I prefer not to. In RHEL, CentOS, and other RHEL or Fedora variants I would just create
/etc/sysconfig/network-scripts/ifup-eth0:0
Code:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=IP-address
NETMASK=IP-netmask
In Debian and Ubuntu and variants, I would add the following to
/etc/network/interfaces
Code:
auto eth0:0
iface eth0:0 inet static
address IP-address
netmask IP-netmask
Above,
IP-address and
IP-netmask could be for example
10.9.8.4 and
255.255.255.0, respectively.
To activate the new interfaces, I would run
sudo /etc/init.d/networking restart (which should work in all). Then I'd also need to restart each service (like Apache) that is supposed to use the new IP address.