When I google "whats my IP" it says, something like "112.134.x.y". But when I go to the router configurations and under WAN IP it says "100.68.a.b"(As far as I know it's a routable IP). So, I must be behind a Carrier Grade NAT (CGN).

But torrent clients i.e uTorrent and BitTorrent can do Uploading or Downloading without any problem. How they do that?.

My home router's UPnP ability is turned off and when I try to figure out whats happening behind curtains using Wire Shark, I can see NAT-PMP requests for port mapping from uTorrent ( : 5351) to my home router ( : 5351) and for external IP discovery. But I cant see any responses back to port 5351 !. (What does that mean?)

FYI I'm a student who "trying" to make a P2P networking system like BitTorrent to work behind NATs. So any documentation on this topic would be great.....(I know about methods i.e Hole Punching, NAT-PMP, PCP, UPnP)

  • 1
    What makes you think it works any different? You still have a public ip address, with UPnP, you dont have to port forward. You have not had to forward a port to use P2P programs, since UPnP was supported, by most networking hardware. – Ramhound Sep 6 '16 at 20:11
  • 1
    Exactly the same thing that happens with your home router: You’re participating in passive mode. – Daniel B Sep 6 '16 at 20:45
  • was actually assigned specifically for the purpose of CGN, so it's not routable anymore. – grawity Sep 6 '16 at 20:50

There is a difference between "working at all" and "works well". In P2P networks each side of a pair of nodes should be able to initiate a connection and also to accept one initiated by the other side.

By default NATs make it more difficult or impossible to accept incoming connections.

So without doing anything special a torrent client will still work behind a NAT by establishing connections to those who can accept incoming connections. But that reduces the pool of available peers since it rules out similarly NATed or firewalled clients. In the worst case this can break the ability to participate in a torrent but on average it merely degrades performance.

To improve on that situation clients will try various NAT traversal techniques, NAT-PMP being just one of them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.