Questions about NAT punchtrough & p2p
Hello, i have some questions about NAT punchtrough & p2p.
1. (this is really about p2p) Does it work like this? Two peer's connect to a central server, which tell's both peer's about the other one's address. They both start sending "punchtrough" packets to the other one until one of the has been reached by the other one, hoping that the NAT machine will start remembering to forward the packets to the correct lan address.
2. What if the p2p server is hosted on a computer that has both a private lan behind it, and is also connected to the internet. Is it possible that its socket listens on two nic's at once? (is this possible?). In that case, what if one client is from the private lan, and one is from the internet, then the one on the internet would be sent a private lan address to it from the server (the address the server see's), it wont be able to connect to it.
3. Is NAT-punchtrough guaranteed to work if done properly? I have a hard time thinking it is with all the firewall rules and private lans that exist on the internet. Is a p2p solution even viable? I mean would you often find yourself in a seat where a client can connect to the server, but the punchtrough fails between some of the clients, so they will have to be disconnected.
4. (edit) On a sidenote! =] TCP-punchtrough.. is it possible? =] does NAT-gateways analyze the internal content of tcp-packets and make their forwarding decision based upon if the handshake is done properly, or would it be enough to have booth peer's call connect() in intervals to make the punch-trough, instead of like with udp, sending dummy packets? =]
Thanks for any input. =]
[Edited by - peter_b on February 7, 2008 1:21:07 AM]
Quote:Original post by peter_b
3. Is NAT-punchtrough guaranteed to work if done properly?
I always read the forum FAQ before asking questions, you should too. :) Not because I don't want to answer your question, but because it's faster for you and you'll get a more detailed answer.
The FAQ links to this excellent article by Hplus.
In a nutshell: No, not all routers implement it correctly and you'll find various degrees of brokeness on some routers.
Quote:1. (this is really about p2p) Does it work like this? Two peer's connect to a central server, which tell's both peer's about the other one's address. They both start sending "punchtrough" packets to the other one until one of the has been reached by the other one, hoping that the NAT machine will start remembering to forward the packets to the correct lan address.
I believe it works with 2 set of ports. A port thats meant to be and another a port thats observed by the central server. If they are the same, there are usually no problems. Yes Both send punch through packets at each other on both of those ports hoping it'll connect. Once a packet gets through to either of those peers, they are more or less connected.
ref: http://www.bford.info/pub/net/p2pnat/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement