[Click] User defined deterministic NAT Table

Eddie Kohler kohler at cs.ucla.edu
Sat Mar 6 19:03:13 EST 2010


Hi,

I've just looked briefly at the IPAddrPairRewriter, which is closest to your 
requirements.  One could add to it "add" and "remove" handlers.  It would 
work, but not the most natural fit.

The IPMapper interface would be pretty simple to use however.  Take a look at 
RoundRobinIPMapper (elements/ip/rripmapper.{cc,hh}) for a simple example. 
(SourceIPHashMapper is another.)  You pretty much just override one function, 
rewrite_flowid().  Then you define the desired IPMapper element in your 
config, and proivide the element name instead of a pattern to the 
IPAddrPairRewriter configuration.

ALternatively a brand new element wouldn't be too bad.  If you were interested 
in contributing your work, so much the better.

Eddie


Latency Buster wrote:
> I am trying to do some pretty basic NATing but with the only
> requirement that the NAT mapping table should be user driven. For NAT
> I would like to change the tuple (SA,DA) pair to (SA`, DA`) but the
> user should be able to drive the mapping from SA->SA` and DA->DA`.
> Ideally, this should look something like,  IPAddrMapper (SA - SA` DA -
> DA`, ..., ..,).
> 
> Is there any existing elements that would allow me to achieve such a
> functionality? I looked around IPAddrRewriter() and IPRwriter but they
> do not allow the fine control of the address mapping (as I
> understand). Else, I am planning to write one.
> 
> Thanks,
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list