From: Pedro Ribeiro <pribeiro@net.ipl.pt>
To: netfilter@vger.kernel.org
Subject: Behaviour of "-j SNAT --persistent"
Date: Tue, 19 Jul 2011 18:35:51 +0100 [thread overview]
Message-ID: <4E25C077.10208@net.ipl.pt> (raw)
I'm trying to implement a near dynamic NAT IP assignment where a pool of
public addresses are used to map a bigger range of private addresses
(NETMAP target can't be used as it need both pre and post NAT blocks to
have the same size).
The internal networks are about 32 C-Class sized networks (/24) and the
public block is an /22 (1024 addresses).
Because this networks are in general very "calm" I would expect that
only about 500~700 hosts will be active at any time and the
internal/external mapping will be near 1:1 most of the time.
The "PAT" behaviour will only be needed when the public addresses pool
were exhausted and some start to be shared by multiple internal users.
The behaviour I'm observing in this moment is:
312 Internal IPs are using NAT
264 Public addresses from the pool are in use
Why is the netfilter code reusing the IPs from the pool when there are a
lot of addresses available?
The command line I'm using to configure this example is:
# Linux 2.6.36
iptables -t nat -A POSTROUTING -o eth1 \
-j SNAT --to-source 192.100.196.0-192.100.199.255 --persistent
# This IPs aren't the real ones, only an example!!!
TIA
--
Best regards,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Pedro Ribeiro
IPLNet - Rede de dados e comunicações
Instituto Politécnico de Lisboa (IPL)
Mail: mailto:pribeiro AT net.ipl.pt
VoIP: sip:pribeiro AT net.ipl.pt
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2011-07-19 17:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 17:35 Pedro Ribeiro [this message]
2011-07-19 20:34 ` Behaviour of "-j SNAT --persistent" Marek Kierdelewicz
2011-07-19 20:55 ` Jan Engelhardt
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=4E25C077.10208@net.ipl.pt \
--to=pribeiro@net.ipl.pt \
--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 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.