I have a script in my start up that goes through a list of IPs for which
I'm aliasing, and uses "ifconfig alias" for eth0:0 thru eth0:15 (I happen
to have 16 virtual IPs running on the box. <G>).
It looks like this:
-------------------------------------------------
#!/bin/bash
names="ip.address.1.here ip.address.2.here ip.address.3.here"
count=0
if [ "$1" = "stop" ]; then
for addr in $names
do
/sbin/route del $addr
/sbin/ifconfig eth0:$count- $addr
let count=$count+1
done
elif [ "$1" = "start" -o "$1" = "" ]; then
for addr in $names
do
/sbin/ifconfig eth0:$count $addr netmask xxx.xxx.xxx.xxx broadcast
yyy.yyy.yyy.yyy
/sbin/route add -host $addr dev eth0:$count
let count=$count+1
done
else
echo 'Usage: '$0' [start|stop]'
fi
-------------------------------------------------
Note that for whatever reason, the stop optoin doesn't actually appear to
do anything. <shrug>
On Mon, 19 Feb 2001, Mark Lo wrote:
> Hi,
>
> How to tell bind to listen to a single ip address if I have two IP
> address alias in a single ethernet card.
>
> For example,
>
> eth0 ="192.168.42.1"
> eth0:0="192.168.42.2"
>
> How Can I tell bind to only listen to eth0 but eth0:0 ??
>
>
> Thank you for your help,
>
> Mark
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list