-
Notifications
You must be signed in to change notification settings - Fork 66
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
Fragmentation is still unsupported #59
Comments
Maybe you guys should do some testing to see if the kernel handles the fragments for you... The scenario described in http://packetlife.net/blog/2008/aug/18/path-mtu-discovery/ seems simple enough to test both fragment handling and PMTUD; lowering the MTU on one host does the trick. |
I feel confused about fragmentations. Why can't the big packet be refragmented when transmitted to the IPV6 side? If we do so, what's the problem? |
In IPv6, the Path MTU discovery is mandatory, therefore, intermediate routers cannot perform IP fragmentation, they will just send an ICMPv6 error message. The only exception is when a router receives an IPv6 packet with a fragment header. The router can re-fragment this packet if needed. |
so you meant that we don't need to do the fragmentation in the 4to6 direction? |
The outgoing IPv6 packets are EXPECTED (right now, I guess) to be fragmented by the kernel functions, with a few adjustments If the translated IPv4 packet had the DF bit set and the resulting IPv6 packet does not fit in the route to host, an ICMPv4 message is sent back to the IPv4 host, with as information, the MTU the IPv6 link minus 20 (the difference between standard IPv4 and IPv6 headers size). If the translated IPv4 packet did not set the DF bit (meaning it did not perform PMTUD), the gateway will fragment the packet. If the DF bit is not set, even though the packet does not need to be fragmented, a Frag header will be added anyway. The existence of this fragment header will tell the routers on the road that they can perform IP fragmentation on this packet. |
thanks a lot! |
hi since you were talking about this in the other thread... would you care to elaborate how are you implementing this? There are two ways you can enable fragmentation: Reassemble and translate VS. Translating the fragments The latter is more efficient I think, because there's no packet buffering in the (common) in-order case. In IPv6‐to‐IPv4 direction fragments can be translated without matching session state if ID values are kept consistent (= per‐packet translation state but no buffering) |
Thing is, our current predominant belief is that the former ("Reassemble and translate") is actually not an option because fragmentation works too differently in IPv6. So yes, we're trying to pull off individual fragment translation. The basic idea, as you've figured out, is to queue fragments until the layer-4 header (fragment offset zero) arrives. When that happens, the NAT64 has enough information to forward all related fragments and store the relevant layer-4 information in a small structure. The small structure will be used to translate future incoming fragments belonging to the same packet. Once the last fragment has been dispatched or the timer runs out, the small structure will be deleted. I don't really understand your last paragraph, though. What do you mean by "ID values"? I think that we absolutely need to know each fragment's intended transport IDs before we translate because the resulting (translated) packet's source IP address is inferred from the combination of addresses and ports from the original packet (i. e. we use them to find a session, and we copy the session's IPv4 addresses to the outgoing packet). Fell free to bounce back if you want more info. |
By ID values I mean the Identification field's value in the Fragment extension header from the IPv6 hosts. With this multiple IPv6 hosts may use the same identification values, so maybe another option is to have the NAT64 generate locally IPv4 identification values for ALL IPv4 packets. |
The Working Group from the IETF seems to have concluded that there is little point in having the NAT64 generate identification values because of the corner case scenarios: "1. There doesn't seem to be a way to solve this well" Also, in an effort to remain as standard as possible, we have decided to use an adapted version of the RFC 815 algorithm to correlate fragments. I think this is helpful in handling the problems you're discussing, because its key to find a group of fragments is the set [identification, source address, destination address, transport protocol], not just the identification value. Again, sorry for taking so long to answer. |
The branch has been merged. Closing the issues involved. |
BTW: |
After compiling Jool with debug, I see a ton of the following messages during my problematic
For troubleshooting purposes, I tried adding a static route for the synthetic prefix with the gw of the Docker bridge interface. It caused me to loose connectivity with my GCE VM: |
Weren't you experimenting with NAT64 Jool? It seems to me that you modprobed SIIT Jool ( |
@ydahhrk I was using NAT64 Jool. I followed the provided document and it states the following:
I will rebuild my test environment and recompile using |
The code shown is an example. You should replace By the way: We should probably communicate through mail directly. Github broadcasts these comments, so we're spamming on people's inboxes. |
@ydahhrk should I use your personal email or [email protected]? |
User support is best suited for jool at nic.mx in my opinion. |
There's no fragmentation-handling code in the module; The NAT64 currently expects the kernel to reassemble fragments.
If fragments arrive from the IPv4 side, the kernel will reassemble them into a likely big packet, which will most likely not fit in the outgoing interface's MTU. And because IPv6 routers don't fragment, the packet will be unnecessarily dropped.
The text was updated successfully, but these errors were encountered: