*BSD News Article 93444


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!howland.erols.net!vixen.cso.uiuc.edu!ux9.cso.uiuc.edu!not-for-mail
From: igor@students.uiuc.edu (igor vladimirovich roshchin)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Need first hand help w/Apache 1.1 and Mulitiple IPs !!
Date: 13 Apr 1997 22:19:10 GMT
Organization: University of Illinois at Urbana
Lines: 69
Message-ID: <5irm4u$3sc@vixen.cso.uiuc.edu>
References: <01bc444b$98b0f0a0$664c1bcc@tony.gcr1.com> <5ih77m$s15@masters0.InterNex.Net> <5ihkuf$oi6@pulp.ucs.ualberta.ca>
NNTP-Posting-Host: ux9.cso.uiuc.edu
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39016


Marc Slemko (marcs@znep.com) wrote:
: In <5ih77m$s15@masters0.InterNex.Net> sparc@linkeasy.net writes:
: 
: 
: >#!/bin/sh
: 
: ># <VirtualHost www.execusoft.com> added 04-05-97
: >ifconfig ed0 alias 206.111.40.20 up
: >route add 206.111.40.20 127.0.0.1
: 
: ># <VirtualHost www.bensite.com> added 04-08-97
: >ifconfig ed0 alias 206.111.40.21 up
: >route add 206.111.40.21 127.0.0.1
: 
: ># <VirtualHost www.citiusa.com> added 04-05-97
: >ifconfig ed0 alias 206.111.40.22 up
: >route add 206.111.40.22 127.0.0.1


Why do you need to have the second line with "route add ..." ?

I have just one line for each host at the bottom of
/etc/netstart :

/sbin/ifconfig ep0 alias xxx.xxx.xxx.xxx netmask 0xffffffff >/dev/null 2>&1
where xxx.xxx.xxx.xxx - stays for the virtual host's IP.

So, what's wrong about this ?
Can anybody explain the difference ?


As far as I see Marc suggesting exactly the same (i.e. without "route add..")


One more question:
When I tried to make the nameserver's IP to be one of the aliases,
it was working ok, but this particular IP was not "visible"
from the host itself, i.e. there was no routing to that IP
from the computer itself.

netstat -r :


ns.mydomain.com      link#2             UHLW        1     1464
ns.mydomain.com/32   link#2             UC          0        0


Any suggestion ?

THanks!

IgoR

: 
: If you are going to do it manually for each one you can just
: specify it in sysconfig in recent versions of FreeBSD.
: 
: If you aren't, it can be much easier to do something like:
: 
: 	echo -n 'configuring alias interfaces... '
: 	for ip in 3 5 7 10 13 25 50
: 	do ifconfig lo0 inet xxx.xxx.xxx.$h netmask 255.255.255.255 alias
: 		echo -n "$ip "
: 	done
: 	echo
: 
: (I use lo0 instead of my ethernet interface)
: 
: Once you get a few hundred this makes life far easier.