LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] rc.ratz (was - [lvs-users] Other OS versions of real servers

To: Michael Sparks <zathras@xxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] rc.ratz (was - [lvs-users] Other OS versions of real servers tested for VS-DR)
Cc: Michael Sparks <michael.sparks@xxxxxxxxx>, Linux Virtual Servers Mailling List <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Joseph Mack <mack@xxxxxxxxxxx>
Date: Wed, 26 Jan 2000 17:38:10 -0500 (EST)
On Wed, 26 Jan 2000, Michael Sparks wrote:

> On Wed, 26 Jan 2000, Michael Sparks wrote:
> 
> > Really a couple of notes for Joe really for the HOWTO...
> > 
> > I've done some testing with other OS versions, and found that VS-DR works
> > on all versions after 5.3. (I don't have an earlier box to test on.)
>         ^_... of IRIX. (doh! It's been one of those weeks already)
> 

that's OK, the Irix is redundant. there's only one unix OS with version
5.3 that it could possibly be.

Here's the rc.ratz file that configures lo:0 on other unix OS's.
It will be in the next version of configure. It's just a shell 
script wrapped around the posting from ratz sometime late last year.
I never got to post it. Sorry you had to go dig it all up from the
archives when I had it on my disk.

(Since you've got yours running, this is for anyone else on the list
who hasn't yet).

Joe

#!/bin/sh
#File to add VIP on non-linux realservers operating in a VS-DR LVS
#Info from Roberto Nibali (ratz).
#
#Note from Ratz <ratz@xxxxxx>, Roberto Nibali, ratz
#On some Unixes you have to plumb the interface before assigning an IP. 
#The plumb instruction has not been included in this file.
#As soon as I get back the other machines I will update this file.
#
#Note: I think there are IMHO two different ways (UNIX-ifconfig-styles)
#to setup a LVS-client and three ways of setup.
#
#1.1: Linux (depending on Kernel Rel., NT, Solaris: ifconfig on a virtual
#loopback. 
#     Syntax: ifconfig [lo|lo0]:x (0 < x < ???) netmask 255.255.255.255
#up  
#1.2: IRIX, FreeBSD: ifconfig on a virtual loopback with alias.
#     Syntax: ifconfig lo0 alias <VIP> netmask 0xffffffff -arp up
#2.1: HP-UX: ifconfig on a virtual NIC.
#     Syntax: ifconfig <NIC>:x (0 < x < ???) netmask 0xffffffyy (yy as
#high as possible) -arp up
#
#
realserver_osversion_unknown()
        {
        echo "$0 error: unknown version ${UNAME_R} of OS $UNAME"
        echo ""
        echo "You may be able to configure the direct routing interface"
        echo "on this realserver using the known commands for "
        echo "$UNAME contained in this file."
        echo " "
        echo "if you are successfull, please send the output of the following 
commands"
        echo ""
        echo "uname "
        echo "uname -r"
        echo "the successful ifconfig command"
        echo ""
        echo "to $MAINTAINER or $LVS_USERS - thanks Joe"
        exit 1
        }

realserver_os_unknown()
        {
        echo "$0 error: unknown OS $UNAME"
        echo ""
        echo "cannot configure non arping lo device"
        echo " "
        echo "if you can figure out how to do this, please send the output of 
the following commands"
        echo ""
        echo "uname "
        echo "uname -r"
        echo "the successful ifconfig command"
        echo ""
        echo "to $MAINTAINER or $LVS_USERS - thanks Joe"
        exit 1
        }

install_vip()
        {
        echo "configuring $UNAME $UNAME_R "
        ifconfig $DEV $ALIAS $VIP netmask $NETMASK -arp up 
        echo "ifconfig output "
        ifconfig -a
        echo "installing route for VIP $VIP on device $DEV"
        $ROUTE add -host $VIP dev $DEV
        echo "listing routing info for VIP $VIP "
        $NETSTAT -rn | grep $VIP
        }

VIP="192.168.1.110"
MAINTAINER="jmack@xxxxxxxx"
LVS_USERS="lvs-users@xxxxxxxxxxxxxxxxxxxxxx"
UNAME=`uname`
UNAME_R=`uname -r`
ROUTE=/sbin/route
NETSTAT=/bin/netstat


#uname      : FreeBSD
#uname -r   : 3.2-RELEASE
#<command>  : ifconfig lo0 alias <VIP> netmask 0xffffffff -arp up 
#ifconfig -a: lo0: flags=80c9<UP,LOOPBACK,RUNNING,NOARP,MULTICAST>mtu 16837
#                  inet 127.0.0.1 netmask 0xff000000
#                  inet <VIP> netmask 0xffffffff
case $UNAME in 
        Linux )
                case $UNAME_R in
                        2.* )
                        DEV="lo:0"
                        NETMASK="0xffffffff"
                        ALIAS=""
                        install_vip
                        ;;
                        * )
                        realserver_osversion_unknown
                        ;;
                esac
                ;;

        FreeBSD )
                case $UNAME_R in
                        3.2-RELEASE )
                        DEV="lo0"
                        NETMASK="0xffffffff"
                        ALIAS="alias"
                        install_vip
                        ;;
                        * )
                        realserver_osversion_unknown
                        ;;
                esac
                ;;
#
#uname      : IRIX
#uname -r   : 6.5
#<command>  : ifconfig lo0 alias <VIP> netmask 0xffffffff -arp up
#ifconfig -a: lo0: flags=18c9<UP,LOOPBACK,RUNNING,NOARP,MULTICAST,CKSUM>
#                  inet 127.0.0.1 netmask 0xff000000
#                  inet <VIP> netmask 0xffffffff
        IRIX )
                case $UNAME_R in
                        6.5 )
                        DEV="lo0"
                        NETMASK="0xffffffff"
                        ALIAS="alias"
                        install_vip
                        ;;
                        * )
                        realserver_osversion_unknown
                        ;;
                esac
                ;;

#uname      : SunOS
#uname -r   : 5.7
#<command>  : ifconfig lo0:1 <VIP> netmask 255.255.255.255 up
#ifconfig -a: lo0:  flags=849<UP,LOOPBACK,RUNNING,MULTICAST>mtu 8232
#                   inet 127.0.0.1 netmask ff000000
#             lo0:1 flags=849<UP,LOOPBACK,RUNNING,MULTICAST>mtu 8232
#                   inet <VIP> netmask ffffffff
        SunOS )
                case $UNAME_R in
                        5.7 )
                        DEV="lo0"
                        NETMASK="0xffffffff"
                        ALIAS="alias"
                        install_vip
                        ;;
                        * )
                        realserver_osversion_unknown
                        ;;
                esac
                ;;

#
#uname      : HP-UX
#uname -r   : B.11.00
#<command>  : ifconfig lan1:1 10.10.10.10 netmask 0xffffff00 -arp up
#ifconfig -a: lan0:   flags=842<BROADCAST,RUNNING,MULTICAST>
#                     inet <some IP> netmask ffffff00
#             lan0:1: flags=8c2<BROADCAST,RUNNING,NOARP,MULTICAST>
#                     inet <VIP> netmask ffffff00
#
        HP-UX )
                case $UNAME_R in
                B.11.00 )
                        DEV="lan1:1"
                        NETMASK="0xffffff00"
                        ALIAS=""
                        install_vip
                        ;;
                        * )
                        realserver_osversion_unknown
                        ;;
                esac

        ;;
        * )
        realserver_os_unknown
        ;;
esac
> 
> 
> 
> ----------------------------------------------------------------------
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe, e-mail: lvs-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: lvs-users-help@xxxxxxxxxxxxxxxxxxxxxx
> 
> 

--
Joseph Mack mack@xxxxxxxxxxx


----------------------------------------------------------------------
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
To unsubscribe, e-mail: lvs-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: lvs-users-help@xxxxxxxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>