I have been trying for the last day or so to get my single NIC to respond to multiple IP addresses. After trying and trying, and fu><0r1|\|g my box up so bad once that I ended up wiping it and reinstalling, I finally got it working.... with some help from http://groups.google.com/

Here is how I did it......

was just setting up apache webserver on my Red Hat Linux 7.2 machine. I wanted to have multiple IP addresses set up on my single NIC, so that I could have multiple domain names, each mapped to an IP address, and didn't want to have to add another NIC.

After trying to figure out how to set this up in the KDE network configuration tool( it looked like the options were there, but some were grayed out, and it wouldn't let me set up multiple IP's without checking the boxes that were grayed out), and had no luck at all.

Then I asked several people if they had any idea, and no one could really help.

While browsing newsgroup posts over at groups.google.com I found a few posts which were helpful. The first thing I tried turned out to be a dismal failure(to the point where I ended up reinstalling the OS).

Finally, I hit on a solution which worked.

On my box (Red Hat 7.2) there is the directory /etc/sysconfig/network-scripts, I am assuming that other distributions have a similar directory, but, I really don't know.

in /etc/sysconfig/networn-scripts there is a file called ifcfg-eth0
which contains the following lines(or something similar, with the obvious changes of IP address, etc.).
DEVICE=eth0
BOOTPROTO=static
BROADCAST=10.0.0.255
IPADDR=10.0.0.10
NETMASK=255.255.255.0
NETWORK=10.0.0.0
ONBOOT=yes

If you copy ifcfg-eth0 to ifcfg-eth0:1 and then edit ifcfg-eth0:1so it looks like this

DEVICE=eth0:1 <<<<<--------------- (MAKE SURE YOU CHANGE THIS SETTING, believe me)
BOOTPROTO=static
BROADCAST=10.0.0.255
IPADDR=10.0.0.11
NETMASK=255.255.255.0
NETWORK=10.0.0.0
ONBOOT=yes

Then reboot, your system will now respond to the IP addresses

10.0.0.10
and
10.0.0.11

All on a single network card.

You can add more than two if you want.

There are probably better ways to do this, and there may be a few problems with the way I did this, I would be glad to hear them.
Good Luck,
IchNiSan