netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: ClusterIP and MAC NAT
Date: Tue, 26 Oct 2010 12:17:22 -0500	[thread overview]
Message-ID: <4CC70D22.20109@riverviewtech.net> (raw)
In-Reply-To: <1288103438.2727.69.camel@nerino>

On 10/26/10 09:30, Michele Codutti wrote:
> In my opinion a possible solution is to use the existing bridge in 
> front of the pool of clustered IP hosts with some ebtable rules that 
> substitute the multicast MAC address with a forged unicast MAC 
> address for the outgoing packets and substitute the forged unicast 
> MAC address with the multicast one for the incoming packets.

This will work.

The only down side that I'm aware of is the possible single point of 
failure that the bridge creates.

Other than that (and possible performance issues if the bridge isn't 
scaled properly) things should work as you want.

> Suppose that the multicast MAC address is: 01:02:03:04:05:06 and the 
> ClusterIP address is: 10.0.0.100 Now I forge a unicast MAC address 
> for the ClusterIP: 00:02:03:04:05:06 So the rule for the incoming 
> packets is (taken from 
> http://ebtables.sourceforge.net/examples/basic.html#ex_nat):

Agreed.

I have an install that is dealing with a cranky switch that can't see 
the same MAC addresses on multiple VLANs where I am doing almost exactly 
this for 30(ish) VLAN interfaces.  It has been in production for five 
years and working great.  (Recently I upgraded the system, carrying the 
old ARPTables / EBTables / IPTables scripts / configs forward.)

> Now the problem is with the arp queries. In need to "NAT" also the 
> queries substituting the mac address also in the payload of the 
> packet not only in the header. Can i do that?

You will need to use ARPTables to help EBTables with the ARP problem.  I 
will go through my backups and see if I can't find an example set of 
rules for you to gander at.

Here's a +1 on what you are wanting to do can be done and does work. 
You just need to look at ARPTables to assist with the ARP specific problem.



Grant. . . .

  reply	other threads:[~2010-10-26 17:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26 14:30 ClusterIP and MAC NAT Michele Codutti
2010-10-26 17:17 ` Grant Taylor [this message]
2010-11-08 16:36   ` [SOLVED] " Michele Codutti
2010-11-12 22:28     ` Grant Taylor

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=4CC70D22.20109@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --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;
as well as URLs for NNTP newsgroup(s).