Round robin DNS with /etc/hosts?
Linuxmisc » Linux
be split up among several IP addresses. The hostname isn't im-
portant, so I could theoretically put it in /etc/hosts.
So for example:
I have a hostname "randomizer", which should evenly distribute
requests among the ips 192.168.0.1 thru 4. Can I do this with
/etc/hosts? I don't want to have to set up a DNS server for this.
Thanks,
Moshe
--
jehsom(@)resnet.gatech.edu - ICQ 1900670 - 350467 GT Sta - 6-0985
Geek code v3.12 (www.geekcode.com):
GCS/E d- s+:- a-- C++$ UL++>+++$ P+>++ L+++>$ E--- W+ N++ w-- !O
M-- V? PS+ PE Y+ !PGP t 5? X+ R- tv b- DI+ D+ G e>++ h !r>r y--
Couldn't you do something like was described in how to make your sig
file random (earlier thread) and make it work for /etc/hosts? E.g.
randsig cycles through choices of random files, make cyclehosts
increment the hosts file. (I know that there are better ways to do this
like choose based on load averages.)
Bill
--
-=- Bill Denney -=- gte2...@prism.gatech.edu -=-
Seeing is deceiving. It's eating that's believing.
-- James Thurber
I don't know the answer, but don't do this.
--
Peter C. Dillinger
pet...@cc.gatech.edu
How were you planning to make this rotating name available to the other
machines? /etc/hosts only works on the local machine. I'm not seeing how
manually diddling /etc/hosts on every client is easier than setting up an
DNS.
--
-| Bob Hauck
-| Wasatch Communications Group
-| http://www.wasatch.com/~bobh
It doesn't have to work on any other machine. It's just a way of
directing a program to use multiple IPs when it doesn't support it.
Moshe
--
jehsom(@)resnet.gatech.edu - ICQ 1900670 - 350467 GT Sta - 6-0985
Geek code v3.12 (www.geekcode.com):
GCS/E d- s+:- a-- C++$ UL++>+++$ P+>++ L+++>$ E--- W+ N++ w-- !O
M-- V? PS+ PE Y+ !PGP t 5? X+ R- tv b- DI+ D+ G e>++ h !r>r y--
Methinks you have no choice. /etc/hosts (IIRC) is read sequentially, and
gives the first record found that matches. Named returns a list (a,b,c,d)
for querry 1. then the list (b,c,d,a) for querry 2, and so on.
Jason
--
Faith is not a matter of questions. Jason Price
Faith is a matter of answers. jpr...@gatech.edu
More to the point, one answer: Theta Xi, Beta Alpha, 449
"Yes, Lord."