TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:20771] Creating virtual hosts



On Tue, 29 Aug 2000, Apu wrote:
> Does anyone know how to create virtual hosts using ifconfig ? Is it possible that I can extend my IP address with wild cards and make so that I can host many sites having a single static IP in my machine.
> I have mandrake and freebsd to play with.
> Any suggestions/help appreciated.

You can create aliases doing 'ifconfig ethx:y', where x is the main
interface number, and y starts at zero and increments for each interface.

With Advanced Routing in your kernel, you can assign an entire subnet to
your interface with:

ip addr add n.n.n.n/yy brd + dev eth0 label eth0:Aliases

..which takes all of the IP's in n.n.n.n/yy, assigns them to your
interface with the standard broadcast address, and calls the alias
'eth0:Aliases'.

-- 
Nate Carlson <natecars@real-time.com>   | Phone : (952)943-8700
http://www.real-time.com                | Fax   : (952)943-8500