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

Re: Please help with IP Aliasing

On Thu, Jul 02, 1998 at 11:53:32AM +1000, Craig Sanders wrote:
>firstly, replace all those ifconfig & route commands with something like
>while [ $i -le 254 ] ; do
>	ifconfig eth0:$i XXX.231.206.$i netmask
>	route add -host XXX.231.206.$i eth0:$i
>	$i=$(( $i + 1 ))
>for j in $( grep -v "^$\|^#" /etc/virtual-hosts | awk '{print $1}' ) ; do
>	ifconfig eth0:$i $j netmask
>	route add -host $j eth0:$i
>	$i=$(( $i + 1 ))
>alternatively, stick another ethernet card in the machine and start using
>eth1:0 - eth1:255 aliases.....the limit is per interface.

as noted in the last line, the first virtual device number should
start with zero, eth0:0, so if you use one of the cool scripts above
remember that! ( this is noted in the NET3 HOWTO ) furthermore, while
i'll admit i don't use 'make' to manage my virtual hosts on my web 
server ( yet :P ) it is relatively easy to set up a Makefile as
craig has suggested and that would most certainly be the "elegant" 
way to help you manage your 200+ virtual hosts.

good luck!


Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

Reply to: