All of lore.kernel.org
 help / color / mirror / Atom feed
From: Per Jessen <per@computer.org>
To: netfilter@vger.kernel.org
Subject: basic load distribution using -m statistic --mode nth
Date: Thu, 27 Mar 2008 19:58:36 +0100	[thread overview]
Message-ID: <47EBEE5C.9030503@computer.org> (raw)

I'm trying to set up basic load distribution using the following:

iptables -t nat -A OUTPUT  -d $addr -p udp --dport 53 -m
statistic --mode nth --every 2 --packet 0 -j DNAT --to $fe1
iptables -t nat -A OUTPUT  -d $addr -p udp --dport 53 -m
statistic --mode nth --every 2 --packet 1 -j DNAT --to $fe2

(I know I can achieve pretty much the same using "options rotate"
in resolv.conf, but humour me).

I'm testing the setup with a simple "dig <host>", and it seems
to be working, except that I get a hang ("no servers could be
reached") on every 4th query.  It is a consistently reproducable
behaviour.

I'm using iptables 4.0 and kernel 2.6.24.3.  Can anyone spot
anything I've missed?


thanks
Per Jessen, Zürich

             reply	other threads:[~2008-03-27 18:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27 18:58 Per Jessen [this message]
2008-03-27 22:28 ` basic load distribution using -m statistic --mode nth Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2008-03-28  7:23 Per Jessen
2008-03-28  8:31 ` Per Jessen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47EBEE5C.9030503@computer.org \
    --to=per@computer.org \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.