[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiple IPs for one interface



On Tue, 6 Feb 1996, Marcelo Magallon wrote:

Hi Marcelo

> Hi, I have a question regarding multiple IPs and Debian... does Debian 
> support IP aliasing (ifconfig eth0 alias some-IP)? Or is there any other 
> method for doing this? I know there's something called VIF available for 
> Solaris, I think, but it's a kernel patch.

Yes it is possible.

The "old" method with 1.2.x kernels is to use dummy interfaces

As with kernel 1.2.13 (tested and approved)

        /sbin/insmod -o dummy0 dummy.o (Modul dummy-Interface!)
        /sbin/ifconfig dummy0 xxx.xxx.xxx.xxx
        /sbin/route add -host xxx.xxx.xxx.xxx dev lo
        /sbin/arp -s xxx.xxx.xxx.xxx YY:YY:YY:YY:YY:YY pub

	where xxx.xxx.xxx.xxx is the ip adress of the interface and 
	YY:YY:YY:YY:YY:YY is the ethernet cards arp address


When using Linux kernels 1.3.xx you can use it with the alias mechanism 
8-)

Make sure the alias- and ip_alias_Support is built into the kernel or 
loaded as a module.

Then just do 

 /sbin/ifconfig eth0:0 xxx.xxx.xxx.xxx
 /sbin/route add -host xxx.xxx.xxx.xxx dev eth0:0

That's all

Greetings from cold Karlsruhe (germany)

> For those of you wondering about this, I need to setup a virtual http
> server on a machine which already runs a http server (Apache), and I
> *need* it to be a different host, but I don't have any hosts available
> (physically available), so I need a virtual host. 

Exactly that is the reason I use the above method for (in conjunction 
with Apache http server)

Beep U,

Steffen

-- 
Steffen R. Mueller                            email: steffen@xlink.net
NTG Netzwerk und Telematic GmbH  \   /        fax:   +49 721 9652 210
Geschaeftsbereich Xlink           \/          phone: +49 721 9652 211
Vincenz-Priessnitz-Str. 3         /\ L I N K  http://www.xlink.net/~steffen/
D-76131 Karlsruhe, Germany       /__________




Reply to: