The HyperNews Linux KHG Discussion Pages

## Multiple IP over one ethernet.

  Forum: The Linux Kernel Hackers' Guide
  Re: Multiple IP over same Interface (Pirasenna V.T.)
  Keywords: Multiple IP over same Interface
  Date: Sat, 09 Aug 1997 15:08:03 GMT
  From: Ian Bonnycastle <IanBonnycastle>

This is very easy. First, you must have the IP Alias module compiled in or at least compiled as a module. This will allow your interfaces to be multiply bound. Then, when you have that loaded (after a boot), you can issue a simple command to get it all working: Say you use this command to start up your interface:
        ifconfig eth0 128.130.22.3 netmask 255.255.255.0
You can easily add a new IP address like so:
        ifconfig eth0:0 128.130.22.4 netmask 255.255.255.0
This will allow 128.130.22.4 to be bound to the same ethernet card, but under a different "sub-interface" I.E. :0.. you can use as many as you want.. I.E. eth0:0, eth0:1, eth0:2.. etc. Currently, I have about 3 addresses bound to my ethernet card, and then have them firewalled differently.