From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@lists.netfilter.org
Subject: Re: NAT to one net, bridge to another
Date: Thu, 14 Sep 2006 13:41:31 +0200 [thread overview]
Message-ID: <45093FEB.3050305@plouf.fr.eu.org> (raw)
In-Reply-To: <200609081250.32329.mike@v6.gaima.co.uk>
Hello,
Mike Williams a écrit :
>
> At the moment I'm looking at NATting stuff to 3 different zones (private
> networks), and hopefully bridging to a 4th zone.
> It'll have 10 nics, all paired off into round-robin bonds, so 5 usuable
> interfaces. 1 colo facing, 3 private, 1 "public".
What interfaces do you plan to bridge ?
> Can you DNAT packets to IPs X, and Y, Z assigned to a bridge, while bridging
> those IPs not assigned to it?
First, bridging and DNAT don't take place at the same network layer.
Bridging takes place at layer 2 and DNAT at layer 3 or 4. You bridge
ethernet frames (possibly transporting IP packets but it doesn't matter)
according to their MAC addresses, and this process is transparent for
the TCP/IP stack. You DNAT IP datagrams (possibly transported in
ethernet frames) according to their IP addresses and TCP or UDP ports. A
bridge can be considered as a virtual ethernet switch whose ports are
the bridged interfaces. On the host, it creates a bridge interface
"hiding" the bridged interfaces, just as a bond interface hide the
enslaved interfaces. So the kernel routing and Netfilter/iptables will
only see packets from the bridge interface, not those from the bridged
interfaces.
I assume you plan to bridge the "colo" and "public" interfaces.
colo public
| |
| |
bridge interface
|
|
TCP/IP stack (routing, iptables, NAT, filtering)
| | |
| | |
private interfaces
The bridge catches incoming ethernet frames before the IP stack can see
them. So an ethernet frame forwarded from colo to public does not hit
the IP stack, unless it is an ethernet broadcast.
To try to answer your question, you can DNAT IP datagrams transported by
ethernet frames which are not bridged to another interface.
next prev parent reply other threads:[~2006-09-14 11:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-08 11:50 NAT to one net, bridge to another Mike Williams
2006-09-14 6:51 ` Jan Engelhardt
2006-09-14 11:41 ` Pascal Hambourg [this message]
2006-09-14 12:07 ` Mike Williams
2006-09-14 12:53 ` Pascal Hambourg
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=45093FEB.3050305@plouf.fr.eu.org \
--to=pascal.mail@plouf.fr.eu.org \
--cc=netfilter@lists.netfilter.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.