How Do I add multiple IP addresses manually?

tom on January 20th, 2007

If you have a box without a control panel and you have several IP addresses assigned to your server, here are some steps to add them into your network configuration.

# ifconfig

will output all the configured addresses. For example:

eth0: inet addr:10.10.10.10 Bcast:10.10.10.255 Mask:255.255.255.0

and more information.

To add on extra IP addresses type:

# ifconfig eth0:1 11.11.11.12 netmask 255.255.255.0

for additional IP addresses, make sure you increment the 1 in eth0:1, for example, a third IP address (third one including your BASE IP) would be added:

# ifconfig eth0:2 11.11.11.13 netmask 255.255.255.0

Hope it helps anyone struggling!


Comments are closed.