All of lore.kernel.org
 help / color / mirror / Atom feed
* team driver MAC NAT
@ 2013-02-12 14:02 Jiri Pirko
  2013-02-12 15:12 ` Jamal Hadi Salim
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2013-02-12 14:02 UTC (permalink / raw)
  To: netdev
  Cc: davem, edumazet, bart.de.schuymer, stephen, pablo, kaber,
	netfilter-devel

Hi all.

I have following situation:

host X  .............  eth0 -> br0 <- team0 <- eth2  ..............  switch  .........  host Z
host Y  .............  eth1 ---^         ^---- eth3  .................^

Now to achieve RX traffic balancing on team0, I have to mangle src mac of
all outgoing packets. If the packet goes through eth2, src mac will be set to
eth2 mac, same happens on eth3. I have to magle ARP packets as well.

This would achieve something which might be called "MAC NAT".

To unmangle RXed packets back to the original MAC adresses (of host X and host Y)
I need to track "connections".

Now the question is: Should this be integrated in netfilter infrastructure?
I'm thinking something similar to existing conntrack. NF_HOOK will be placed
in team driver rx/tx functions (similar to what bridge does).

I think this would be nicer than to do it independently just in team driver code.
Also this MAC NAT (with tracking connections, unlike what bridge MAC NAT does)
can be probably handy for other purposes as well (not sure what)

Thanks for any suggestions.

Jiri

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: team driver MAC NAT
  2013-02-12 14:02 team driver MAC NAT Jiri Pirko
@ 2013-02-12 15:12 ` Jamal Hadi Salim
  0 siblings, 0 replies; 2+ messages in thread
From: Jamal Hadi Salim @ 2013-02-12 15:12 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: netdev, davem, edumazet, bart.de.schuymer, stephen, pablo, kaber,
	netfilter-devel

Jiri,

This would be a good fit for  a tc action. This way such a feature can be
used by other netdevs (including plain bridge, and not just team)
The main question is how does the tc action learn about the MAC
addresses that
it needs to convert.

cheers,
jamal

On 13-02-12 09:02 AM, Jiri Pirko wrote:
> Hi all.
> 
> I have following situation:
> 
> host X  .............  eth0 -> br0 <- team0 <- eth2  ..............  switch  .........  host Z
> host Y  .............  eth1 ---^         ^---- eth3  .................^
> 
> Now to achieve RX traffic balancing on team0, I have to mangle src mac of
> all outgoing packets. If the packet goes through eth2, src mac will be set to
> eth2 mac, same happens on eth3. I have to magle ARP packets as well.
> 
> This would achieve something which might be called "MAC NAT".
> 
> To unmangle RXed packets back to the original MAC adresses (of host X and host Y)
> I need to track "connections".
> 
> Now the question is: Should this be integrated in netfilter infrastructure?
> I'm thinking something similar to existing conntrack. NF_HOOK will be placed
> in team driver rx/tx functions (similar to what bridge does).
> 
> I think this would be nicer than to do it independently just in team driver code.
> Also this MAC NAT (with tracking connections, unlike what bridge MAC NAT does)
> can be probably handy for other purposes as well (not sure what)
> 
> Thanks for any suggestions.
> 
> Jiri
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-12 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-12 14:02 team driver MAC NAT Jiri Pirko
2013-02-12 15:12 ` Jamal Hadi Salim

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.