From: Andrew Beverley <andy@andybev.com>
To: "Usuário do Sistema" <maiconlp@ig.com.br>
Cc: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: fail in the connmark load-balancing
Date: Sat, 25 Feb 2012 10:53:56 +0000 [thread overview]
Message-ID: <1330167236.30413.175.camel@andrew-desktop> (raw)
In-Reply-To: <CAMTjHrxzWaCx6Vp9r-x1JXBkMcdFz7gLEKYrwq5CQgveDhmshg@mail.gmail.com>
> >> If it's not working, there must be another problem. Please show the
> >> output of "ip rule show", "ip ro" and "ip ro show table <table>" for
> >> each of your tables where <table> is the name of the tables.
>
> [root@mtjve sbin]# ip ro
> 192.168.215.0/24 dev eth1 proto kernel scope link src 192.168.215.1
> 192.168.217.0/24 dev eth2 proto kernel scope link src 192.168.217.254
> 192.168.216.0/24 dev eth0 proto kernel scope link src 192.168.216.254
> default via 192.168.216.1 dev eth0
>
>
> [root@mtjve sbin]# ip rule show
> 0: from all lookup 255
> 32763: from all fwmark 0x2 lookup gvttelecom
> 32764: from all fwmark 0x1 lookup oitelecom
> 32765: from 192.168.217.254 lookup oitelecom
> 32766: from all lookup main
> 32767: from all lookup default
>
> [root@mtjve sbin]# ip ro show table oitelecom
> 192.168.217.0 via 192.168.217.1 dev eth2
> 192.168.217.254 via 192.168.217.1 dev eth2
> default via 192.168.217.1 dev eth2
>
> [root@mtjve sbin]# ip ro show table gvttelecom
> 192.168.216.0 via 192.168.216.1 dev eth0
> default via 192.168.216.1 dev eth0
>
>
> I think here is the issue! there are two PREROUTING rule that they
> should do the load-balance but I wonder when the socond rule (
> CONNMARK2 ) coming use it ?? I think never because data flows always
> going to into at the first rule ( CONNMARK1 ). so...the second rule
> never is using! today I have done a test download from three diferente
> sites and the load-balance it wasn't work.
>
>
> eth1: is my lan interface
>
> iptables -t mangle -A PREROUTING -i eth1 -s 0/0 -d 0/0 -m state
> --state NEW -m statistic --mode nth --every 2 --packet 0 -j CONNMARK1
> iptables -t mangle -A PREROUTING -i eth1 -s 0/0 -d 0/0 -m state
> --state NEW -m statistic --mode nth --every 2 --packet 1 -j CONNMARK2
I can't see any restoration of the marks. You are marking the connection
when it is NEW, but "ip rule fwmark" will match on the packet's mark, so
you need to copy the connection mark to the packet mark with "-j
CONNMARK --restore-mark".
Andy
next prev parent reply other threads:[~2012-02-25 10:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-11 20:19 fail in the connmark load-balancing Usuário do Sistema
2012-02-12 22:10 ` Andrew Beverley
2012-02-13 11:19 ` Usuário do Sistema
2012-02-13 22:03 ` Usuário do Sistema
2012-02-25 10:53 ` Andrew Beverley [this message]
2012-02-27 16:40 ` Usuário do Sistema
2012-02-27 17:07 ` Usuário do Sistema
2012-02-27 18:15 ` Usuário do Sistema
2012-02-28 11:16 ` Gáspár Lajos
2012-03-02 21:24 ` Usuário do Sistema
2012-03-05 13:34 ` Gáspár Lajos
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=1330167236.30413.175.camel@andrew-desktop \
--to=andy@andybev.com \
--cc=maiconlp@ig.com.br \
--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