-
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
doesn't support multiport device? #67
Comments
You can actually configure multiple pool4 addresses, each belonging to the Roberto Aceves. On Tue, Aug 20, 2013 at 10:19 PM, techmotive [email protected]:
|
Hmmm... I'm not following the train of thought :/ "the pool4 address actually belong to one of the outgoing interfaces's address" "the dst ipv4 address after 6to4 translation also related to the same interface" "the address of the interface which the packet goes to, determines the src address of the packet." "but this nat64 implementation set the src before knowning the outgoing interface" Does this solve your problem? |
Thanks for your nice answer. HoweverI think the pool4 addresses should belong to the ipv4 address of the interfaces of the NAT64 device, right? Otherwise, say we use B as pool4 address, when the packet return form ipv4 side, the peer device will sent ARP request saying that “who has address B?", since the NAT64 device don't have address B of any of it's interface, the peer will not get the ARP reply and don't known where sent the packet should goes to. Unless you configure a route in peer device that address B should route to the NAT64 device, the returned ipv4 packet can not go back to the NAT64 device. So assigning the address of interfaces to pool4 can avoid this problem. Am I right? |
I have never met the writers of the RFC, and the RFC never states it (I think), but I'm fairly positive that the whole point of having a pool is so you don't have to use your interface's addresses (Otherwise the NAT64 would be supposed to just figure them out and don't bother asking them to you). Using your interface's addresses is possible, but is awkward in the sense that it means the NAT64 would steal (and attempt to translate) all of its own machine's incoming traffic (because it is headed for the pool). For example, if you tried to surf the web (e.g. IPv4 Google) in the Jool machine (i. e. not from the IPv6 network), your requests would land in foreign territory all right, but you'd never get to see Google's responses, since Jool would be "stealing" them before they get its own node's browser (Because Jool is Network/Transport layers, and the browser is Application layer, which means Jool handles the packet first). Because the translation would be 4 -> 6, this would mean the packets would get dropped because the module would have no state for them. As you have mentioned, static routing is one (and perhaps the ideal) way to avoid those ARP requests. But if you don't have access to whatever machine is supposed to forward stuff to the NAT64 node, we have found that a virtual interface can answer the ARP requests for you. Assuming your interface is named "eth0": ifconfig eth0:1 <your-pool-address-here> up This way, Jool's pool will match the fake interface's addresses and you will be able to retain the real one's connectivity. I'm not sure if this is inelegant or not, but I don't know of any disadvantages at the moment. I should really add this to the documentation... Having said that, I have the impression that I have not answered your question. You said: "when in multi-interface device this can cause problem". I do not know what you mean; can you please exemplify a problem with this behaviour? |
Assuming there's a router implementing the NAT64 on eth0, eth1,eth2, and your pool4 has addr1,addr2,addr3, what's your configuration? 1: or any other way? I'm not very familiar with this and not sure about which one is right... |
I don't know why github can't display“ <>" 1: |
"if chose number one, will there be any conflicts ?" "if chose number two, if one address runs out of, the other address can not be used." Indeed, in this case you're setting up additional addresses to make room for Jool's pool. These addresses are not going to be used as backup addresses for your node if it runs out of ports. $ ifconfig eth0 1.1.1.1 netmask 255.255.255.0 up We think we're making a number of assumptions for what your problem is, so if you're still having trouble, I request that you provide more details on what is it you need to do (eg. network topology). |
I HAVE read the https://github.com/NICMx/NAT64/wiki/Multi-interface-and-NAT64-pools, the network topology is the same with mine. another question: I'm not quite sure whether "packets destined to B use 1.1.1.2" will cause problems. Could you explain this in more detail? Thanks :) |
I'm elaborating here: https://github.com/NICMx/NAT64/wiki/Issue-%2367-%28I-think%29 |
"Using your interface's addresses is possible, but is awkward in the sense that it means the NAT64 would steal (and attempt to translate) all of its own machine's incoming traffic (because it is headed for the pool). For example, if you tried to surf the web (e.g. IPv4 Google) in the Jool machine (i. e. not from the IPv6 network), your requests would land in foreign territory all right, but you'd never get to see Google's responses, since Jool would be "stealing" them before they get its own node's browser (Because Jool is Network/Transport layers, and the browser is Application layer, which means Jool handles the packet first). " -------I fell the same way. But I see IPV4 NAT also use it's wan's IP as NAT's address pool, why doesn't it cause problems? Can we learn form this?(another question) |
I have read https://github.com/NICMx/NAT64/wiki/Issue-%2367-%28I-think%29. |
Sorry for taking so long to answer. |
"-------I fell the same way. But I see IPV4 NAT also use it's wan's IP as NAT's address pool, why doesn't it cause problems?" Thank you very much for asking this. We found the reason; it's because IPv4 NAT also masks its own packets. As the referenced issue above mentions, we now consider the current behavior a bug and will fix it as soon as we have available resources. Still working on the other question... |
Update 2015-11-12: I'm working on this again. Going to upload new results later. |
It has been a really long time so the OP likely doesn't care anymore, but the project has evolved a lot and there has been accidental progress since the last time this was active. I still don't really understand why setting the src before knowing the outgoing interface blocks multiport support (afterthought: ok, I guess it's because it might not choose the optimal address), but pool4 has an alternate operation mode now: If it is empty, Jool falls back to compute a best-suited source address on the fly, which requires "premature routing", which defines the outgoing interface. In other words, the source depends on the interface. Interface first, source address second. It's not perfect because this operation mode can only use "upper ports" (61001-65535) for IPv4 masks, and maybe only one address per interface, but I guess it's a start? Would love some feedback on how to proceed from here.
For one thing, this is because it is possible to separate the NAT's ports from the applications' ports. Now that Jool 3.4's pool4 supports port ranges, it is finally possible to use the same IP address for local traffic and translating traffic. (Yaaaaaaaaaaaay!) Actually, the core reason is that NAT can quickly tell the difference between a packet to be forwarded and a packet to be delivered locally. Mostly because the NAT64 spec shoves a 6-second timer in the way, Jool cannot inherit this property properly without dropping RFC compliance. This is also the reason why NAT can use ephemeral ports by default, but NAT64 cannot. (Arrrrgggggggggh)
Hmmmmm... ok. But what if none of the addresses from the interface match a pool4 entry? Should it still use an interface address (upper ports) or should it use a pool4 address? |
Closing. This thread has long been abandoned and it doesn't seem like there is a problem anymore. |
it seems that the module doesn't support multiport device. because the pool4 address actually belong to one of the outgoing interfaces's address, and the dst ipv4 address after 6to4 translation also related to the same interface. in other words, the address of the interface which the packet goes to, determines the src address of the packet. but this nat64 implementation set the src before knowning the outgoing interface. when in multi-interface device this can cause problem.
The text was updated successfully, but these errors were encountered: