Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to do DNS round robin with different weight

1,692 views
Skip to first unread message

skyb...@aol.com

unread,
Apr 17, 2007, 3:01:52 AM4/17/07
to
Hello members,

I'm running BIND-9.3.2. I add these items to do the DNS round-robin:

bbs 61.143.0.1
61.143.0.2


Then the internet accesses would go to both IPs averagely.

But if I need to drive more traffic to the first IP,I may need to set
different weight for both IPs.
How can I set this weight in Bind?

Thanks.

--Sky
________________________________________________________________________
AOL now offers free email to everyone. Find out more about what's free
from AOL at AOL.com.


Wael Shahin

unread,
Apr 17, 2007, 4:27:12 AM4/17/07
to
Does "rrset-order" seem to be any close?

Wael

skyb...@aol.com

unread,
Apr 17, 2007, 4:48:46 AM4/17/07
to
Hello,

But under my test BIND 9 can't do this by your way.
Yes under BIND 8 we can do the load balance like the way you
mentioned,but BIND 9 seems not support this.
Anyway thanks!

--Sky

-----Original Message-----
From: ghi...@cadence.com
To: bind-...@isc.org; skyb...@aol.com
Sent: Tue, 17 Apr 2007 3:59 PM
Subject: Re: How to do DNS round robin with different weight

> To: bind-...@isc.org


> Subject: How to do DNS round robin with different weight

> Date: Tue, 17 Apr 2007 03:01:52 -0400
> From: skyb...@aol.com


>
> Hello members,
>
> I'm running BIND-9.3.2. I add these items to do the DNS round-robin:
>
> bbs 61.143.0.1
> 61.143.0.2
>
>
> Then the internet accesses would go to both IPs averagely.
>
> But if I need to drive more traffic to the first IP,I may need to set
> different weight for both IPs.
> How can I set this weight in Bind?

Put the IP address in multiple times. Eg, you want traffic to go to
the first Ip 3 of 4 times. Have a four record RRset. Put the first Ip
in this RRset three times and the second IP in once. Eg:

host IN A 1.2.3.4
IN A 1.2.3.4
IN A 1.2.3.4
IN A 1.2.3.5

Or put a load balancer in front of the two IP addresses that divies the
traffic up in a 3:1 ratio. (But this is not in accordance with the
BIND
discussion charter.)

See the BIND-USERS archives for more info.

Regards,
GRegory Hicks

---------------------------------------------------------------------
Gregory Hicks | Principal Systems Engineer
Cadence Design Systems | Direct: 408.576.3609
555 River Oaks Pkwy M/S 9B1
San Jose, CA 95134

I am perfectly capable of learning from my mistakes. I will surely
learn a great deal today.

"A democracy is a sheep and two wolves deciding on what to have for
lunch. Freedom is a well armed sheep contesting the results of the
decision."

"The best we can hope for concerning the people at large is that they
be properly armed." --Alexander Hamilton

Gregory Hicks

unread,
Apr 17, 2007, 3:59:52 AM4/17/07
to

Wael Shahin

unread,
Apr 17, 2007, 8:49:59 AM4/17/07
to
Hello,

> Hello,
>
> But under my test BIND 9 can't do this by your way.
> Yes under BIND 8 we can do the load balance like the way you
> mentioned,but BIND 9 seems not support this.


RRSET-ORDER IS FULLY IMPLEMENTED IN BIND > 9.2.3
have you read the bind 9 arm?
http://www.isc.org/sw/bind/arm93/Bv9ARM.ch06.html #RRset Ordering #sort
listing
having multiple records with fixed rrset-order might be of intrest


> Anyway thanks!
>
> --Sky
>
> -----Original Message-----
> From: ghi...@cadence.com
> To: bind-...@isc.org; skyb...@aol.com
> Sent: Tue, 17 Apr 2007 3:59 PM

Mike Mitchell

unread,
Apr 17, 2007, 10:18:16 AM4/17/07
to
This should read
RRSET-ORDER IS FULLY IMPLEMENTED IN BIND >= 9.4.0
The "fixed" ordering was not implemented until 9.4.0. "Cyclic" and "random" were implemented earlier.
If you actually read the link Wael Shahin included, you'll find the statement

Note
The rrset-order statement is not yet fully implemented in BIND 9. BIND 9 currently does not support "fixed" ordering.

at the end of the section on RRset Ordering.

If you want rrset-order "fixed" you have to use BIND 9.4.0 or BIND 8.4.7. I recommend BIND 9.4.0.

Mike Mitchell
SAS Institute Inc.
Mike.M...@sas.com
(919) 531-6793

Wael Shahin

unread,
Apr 17, 2007, 10:52:07 AM4/17/07
to
Hello,
I apologies for not being careful in my last post

Kevin Darcy

unread,
Apr 17, 2007, 4:23:52 PM4/17/07
to
skyb...@aol.com wrote:
> Hello members,
>
> I'm running BIND-9.3.2. I add these items to do the DNS round-robin:
>
> bbs 61.143.0.1
> 61.143.0.2
>
>
> Then the internet accesses would go to both IPs averagely.
>
Averagely?

> But if I need to drive more traffic to the first IP,I may need to set
> different weight for both IPs.
> How can I set this weight in Bind?
>
>
No, you can't do this with A records in stock BIND, except maybe with
some old and/or buggy versions that didn't strip duplicate records properly.

If you want weighting you need to a) hack BIND, b) use a client that
supports SRV records (which has "weighting" functionality built in), or
c) have something other than BIND serving up the address records (e.g.
any number of commercial load-balancing products).

Note that even if you manage to "weight" your A records, unless you
control the "weighting" configuration of all resolvers that are going to
be used by all clients that access your app, your careful plans may be
undone by caching resolvers in between the clients and your nameservers,
which may re-sort the records randomly or based on some configuration of
their own. The only way to partially overcome this drawback is to set
your TTLs artificially low (thus defeating caching to some degree), but
this can be considered anti-social because you're making everyone else's
nameservers work harder than they need to.

- Kevin

0 new messages