Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Bernhard Bock <mailinglists@bock.nu>
Cc: netfilter@vger.kernel.org
Subject: Re: conntrackd failover works partially, was Re: conntrack performance test results in INVALID packets
Date: Mon, 21 Jul 2008 02:37:33 +0200	[thread overview]
Message-ID: <4883DA4D.4080906@netfilter.org> (raw)
In-Reply-To: <4880A6BA.6030007@bock.nu>

Bernhard Bock wrote:
> My next step is to run two firewalls in a cluster with conntrackd.
> 
> The basic setup works like a charm. I have increased the HashSize
> parameter in conntrackd as well. It replicates the states to the backup
> firewall just fine.
> 
> Unfortunately, failover works only in about 50% of all tests. There is
> no obvious pattern as to when this failures occur.
> 
> We trigger the failover softly by advertising a higher priority on the
> backup firewall, not by switching off the primary one. If it goes well,
> we do not loose a single connection. If it doesn't go well, we basically
> loose all connections and the apachebench dies. There are hundreds of
> INVALID packets in the syslog, and also some NEW (not SYN). In this
> case, we also see lost packets in "multicast sequence tracking" in the
> conntrackd stats.

As you're using the Alarm mode, the time required to resynchronize the
backup and the master is RefreshTime (which is 15 seconds in your config
files). Are you probably triggering the fail-over before that amount of
time?

BTW, you can use "conntrackd -i" and "conntrackd -e" to diagnose
problems, these commands dump the internal and external caches. The
internal cache contains the set of flows that this firewall replica is
filtering. The external cache contains the set of flows that the other
firewall replicas are filtering. Basically, you must to find the same
set of flows in the master's internal-cache and the backup's
external-cache if everything goes fine.

The lost packets reported by the sequence tracking can be reduced with a
clause introduced in 0.9.7 to increase the sender and the receiver
multicast socket buffers.

> One more detail worth mentioning is that we in any case see many
> "connections destroyed failed" in conntrackd statistics, but it does not
> have any visible impact.

This means that the kernel has told conntrackd to destroy a flow that it
is supposed to be in its internal cache. However, conntrackd did not
find such flow in there.

> We use conntrackd version 0.9.6 included with Fedora 9 in Alarm mode.
> Below I have attached the relevant config files snippets.
> 
> Can you (again) give any helpful pointers where I can search?

Until we reach conntrack-tools-1.0, which I expect to reach soon since
most of the pending work is already done, I suggest you to upgrade to
lastest (as for now, it is 0.9.7). This release includes important
improvements, fixes and features. The alarm mode is a bit spamming, I
also suggest you to give a try to the ft-fw and the notrack approaches.

-- 
"Los honestos son inadaptados sociales" -- Les Luthiers

  reply	other threads:[~2008-07-21  0:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18  9:39 conntrack performance test results in INVALID packets Bernhard Bock
2008-07-18 10:13 ` Jan Engelhardt
2008-07-18 10:52   ` Bernhard Bock
2008-07-18 12:14     ` Pablo Neira Ayuso
2008-07-18 14:20       ` conntrackd failover works partially, was " Bernhard Bock
2008-07-21  0:37         ` Pablo Neira Ayuso [this message]
2008-07-21 14:22           ` conntrackd failover works partially Bernhard Bock
2008-07-23  8:51             ` Bernhard Bock
2008-07-23 12:50             ` Pablo Neira Ayuso
2008-07-23 15:20               ` Bernhard Bock
2008-08-08  8:47         ` conntrackd failover works partially, was Re: conntrack performance test results in INVALID packets Pablo Neira Ayuso
2008-08-08 12:58           ` Bernhard Bock
2008-09-02  9:39           ` Bernhard Bock
2008-09-02  9:56             ` Pablo Neira Ayuso
2008-09-02 12:34               ` Bernhard Bock
2008-09-02 12:48                 ` Pablo Neira Ayuso
2008-09-02 15:18                   ` Bernhard Bock
2008-09-02 16:22                     ` Pablo Neira Ayuso
2008-09-02 16:55                       ` Bernhard Bock
2008-09-03  9:13                         ` Pablo Neira Ayuso
2008-09-03 11:26                           ` Bernhard Bock
2008-09-04 12:29                             ` Pablo Neira Ayuso
2008-09-04 13:27                               ` Bernhard Bock
2008-09-05 10:55                                 ` Pablo Neira Ayuso
2008-09-04 11:40                 ` Pablo Neira Ayuso

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=4883DA4D.4080906@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=mailinglists@bock.nu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox