-
Notifications
You must be signed in to change notification settings - Fork 33
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
tc nat can do the same job #9
Comments
Thank you for the report! Back when L3DSR was being implemented, we investigated the idea of using What test cases and use cases have you tried your approach with so far and with what kernels? Have you tried it in combination with other |
I tried in ubuntu 1804+ kernel 4.15. There are 3 combinations:
Do you know why iptables nat does not work in this case? I can see that the destination address was changed from iptables log, but the application still responds real server ip address. |
I feel like a software archeologist going back and digging into this old information! The very first efforts to scope out the functionality required for implementing L3DSR was done by a different group that I wasn't part of. Before contacting me in May 2008, they had already concluded that the NAT approach was not the route to go because of concerns over it being too CPU and/or memory intensive for our Yahoo! production workloads, and it being a possible DoS (denial of service) vector. That's why they brought me in to do the iptables module work, because of my kernel experience. As for why your item 3 doesn't work, I remember toying with the idea a decade ago, but NAT was a monstrosity with a lot of temperamental quirks trying to push it to do something the designers didn't intend. I didn't have that good a grasp at all it does to the networking stack to make it work, but I have vague recollections of it being "too smart" and helpful holding on to and monitoring too much networking state information for repurposing it. Did you try testing your item 3 with just TCP traffic, or did you try with UDP or ICMP? If NAT works with the latter, then you know it's due to it not seeing the reverse TCP traffic that went straight to the client thinking it got lost. With doing item 2, have you done any latency or throughput performance testing or load testing comparing 1 with 2 yet? |
I have tested item 3 with ICMP. iptables NAT does not work either.
I have not tested performance yet. |
Can you please let know how second step works ..Response will be appreciated |
The DADDR iptables plugin,
iptables -t mangle -A INPUT -m dscp --dscp 1 -j DADDR --set-daddr=192.168.0.2
, can be replaced by tc, so no plugin is need to use l3dsr:where the
u32 0x00040000 0x00ff0000 at 0
match Tos 0x4, which is dscp 1.192.168.0.3 is read server ip, and 192.168.0.2 is vip.
The text was updated successfully, but these errors were encountered: