[K12OSN] Tossing around an idea...need some input

David Trask dtrask at vcsvikings.org
Sat Aug 13 05:38:18 UTC 2005


Ok...first the layout....

I have 2 K12LTSP servers....both are single NIC servers since all machines
are on the same subnet....no private subnets for terminals...everyone on
the same network.   To simplify this I have a seperate machine that runs
DHCP.  DCHP is turned OFF on the K12LTSP boxes.  I use the "next server"
and "option root path" on the DHCP server to tell the terminals where to
go to get their image (kernel).  Now...up until now I've only had one big
K12LTSP server so all of this was easy...now I have another and would like
to try a combination of load-balancing and/or failover.

Now....I've read
http://republico.estv.ipv.pt/~nmct/ltsp/ha/ltsp-ha-howto-en-gpl.html  but
this document depends on DHCP to be running on the LSTP boxes....and
that's not what I'm doing.  Also bear in mind that since I run
Samba/LDAP....syncing the servers is not an issue as no users or home dirs
live on the LTSP boxes.....both servers authenticate to the Samba/LDAP
server which is where the home dirs and users live.  Given all that...what
I'm trying to come up with is a way to use DHCP and some creativity to
acheive failover and/or load balancing....

Some ideas I've had or have had mentioned to me....

My current dhcpd.conf looks like this:

default-lease-time            21600;
max-lease-time                21600;
ddns-update-style none;
allow booting;
allow bootp;
server-name "squidward.vcs.u52.k12.me.us";
next-server 10.0.15.253;
option subnet-mask            255.255.240.0;
option broadcast-address      10.0.0.255;
option routers                10.0.15.254;
#option domain-name-servers    10.0.15.254;
option domain-name-servers    10.0.0.1;
option domain-name            "vcs.u52.k12.me.us";
option root-path              "10.0.15.253:/opt/ltsp/i386";
option option-128 code 128 = string;
option option-129 code 129 = text;

shared-network WORKSTATIONS {
  subnet 10.0.0.0 netmask 255.255.240.0 {
     range dynamic-bootp 10.0.0.100 10.0.15.252;
     use-host-decl-names       on;
     option log-servers        10.0.15.254;

     # trick from Peter Rundle <peter.rundle at au.interpath.net>
     if substring (option vendor-class-identifier, 0, 9) = "PXEClient"
     {
        filename      "/lts/pxe/pxelinux.bin";
          # NOTE: kernels are specified in /tftpboot/lts/pxe/pxelinux.cfg/
     }
     else
     {
        filename    "/lts/vmlinuz.ltsp";
     }
  }
}
# example configurations for specifying specific kernels to specific
clients
group   {
    use-host-decl-names       on;
    option log-servers        10.0.15.254;

    host ws001 {
        hardware ethernet     00:E0:06:E8:00:84;
        fixed-address         10.0.0.1;
        filename              "/lts/vmlinuz.ltsp";
        option option-128 e4:45:74:68:00:00;
        option option-129 "NIC=3c509";

*snip*

Now....notice the "next server" line up above and the    

option root-path              "10.0.15.253:/opt/ltsp/i386";

These are in the global section....one question I had is....if I put these
in the workstation declarations down below pointing to Server #2
(10.0.14.253 ) would that override the globals?  Example:

    host ws001 {
        hardware ethernet     00:E0:06:E8:00:84;
        fixed-address         10.0.0.1;
        next-server 10.0.14.253;
        option root-path              "10.0.14.253:/opt/ltsp/i386";
        }



OR....another intriguing idea for failover is to have a script that pings
the servers (Server 1 and Server 2) to see if they are "alive"....it would
assume a dhcpd.conf pointing to Server 1.....but if Server 1 turns out to
be "dead"....do something like this....

Ping Server 1....if alive continue using dhcpd.conf.....if dead then...

service dhcpd stop
mv dhcpd.conf  dhcpd-serverone.conf
mv dhcpd-servertwo.conf  dhcpd.conf
service dhcpd start

this is crude I know, but just trying to illustrate the idea....the script
could "ping" every 2 mins or so.  I have no idea how to write the ping and
response piece...so I'd need some of you scripters for that.  The idea is
that one is the preferred dhcpd.conf, but if that fails....use the
other....and one could get very creative with that.  I could (if it can be
done) with dhcpd.conf (assuming Server 1 is alive) have my lab machines
declared in the workstations section as pointing to Server 1 and all
others to Server 2.....if Server 1 dies....the alternate dhcpd.conf file
could simply say...everyone uses Server 2. ...and so forth.

It could also reverse itself in that once Server 1 comes back up....it
could revert to the original dhcpd.conf file


OR....

might there be a way to put a statement in dhcpd.conf or essentially two
sets of "globals" in the dhcpd.conf that might do a similar thing....(an
"if" , "else" perhaps?)

Workstation contacts DHCP server...it says....check here for your
kernel....if not there....then go here (Server 2).....is that even
possible?

Ideas.....thoughts?  Suggestions?  Perhaps a script or two?

David N. Trask
Technology Teacher/Coordinator
Vassalboro Community School
dtrask at vcsvikings.org
(207)923-3100




More information about the K12OSN mailing list