-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NAT implementation #476
Comments
The question is not clear to me. Do you have trouble configuring large NAT tables? What prevents creating large NAT tables? Perhaps take a look if the element support write handlers which will allow to update the table through the control socket while the router is running and if that is not possible use a bash/perl/python script to generate a click config with 10k rules and reload the router. Perhaps I am missing the issue, but there should normally not be an issue with creating large configs. One notable exception is that if the config is larger than 65K, then by default reloading the config via hotswapping (click -R) will not work, but I doubt you need it for this test. Regarding the intended throughput test. One thing to consider with tests like this is that the traffic L3/L4 headers needs to be fairly random. If the traffic is static/predictable for example using the same source and destination ports and addresses, then the traffic would match one rule irrespective if there are 10 patterns or 10k patterns and will give the illusion there is little or no performance hit. To accurately test the traffic needs to match rules up and down the table/tree. |
The issue is that I don't know how to configure the large table.. :D This means that change the source ipX with 27.32.11.3 and srcport with 1000, dst ip will stay the same, and srcport will change to 1001. 0 and 1 are the output ports. So with this configuration every packet (even if src is 192.168.2.2 or 192.168.4.5 ) will enter the IPRewritter and will hit this pattern The question is and sorry if it is a silly question, how can i configure for example
Thank you for your time |
Maybe the solution is not to create more static nat rules, but to create more random source ports in the traffic generator. Each new source port will create a dynamic entry in the iprewriter table until you reached 10k rules.
|
Good idea @ahenning , I will see if i can do this with, FastUDPSource or InfiniteSource. Thank you for your time. |
Maybe SetRandIPAddress does what you need? https://github.com/kohler/click/wiki/SetRandIPAddress
I have not tried Random IP address annotations with FastUDPSource, but I am fairly sure at 220k pkts/s FastUDPSource is not needed and if it is really needed, perhaps copy the Random IP code from SetRandIPAddress into a FastUDPSource to create a new element called something like FastRandUDPSource. |
Finally I used the INTERVAL feauture of the FastUDPSource element, and I manage to feed the NAT table with 65k of flow mappings. May I ask you something, if you know, what do you think is the best way to measure the throughput on the sink? Does IPRewritter do some kind of caching and it does not have to Lookup all the time in the table (I observe that if I send the same IP from the source, the throughput on the sink is higher) I really appreciate your help |
Hello, I'm currently implement a simple NAT click configuration which is like this:
I generate traffic in the source:
From what I've understand my NAT configuration seems ok (print the udp_table)
My question is how can I create a big NAT table with many entries (e.g 10k) ?
To be more precise, I would like to observe if there is a degradation(e.g throughput) due to many lookups in the NAT table.
Can I do this(feel the NAT table with many entries) within click?
Thank you in advance for your help
The text was updated successfully, but these errors were encountered: