How does Bittorrent work in peers behind Carrier-grade NATs

2

1

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 (192.168.1.100 : 5351) to my home router (192.168.1.1 : 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)

Lazzy

Posted 2016-09-06T19:41:54.643

Reputation: 23

1What 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 – 2016-09-06T20:11:39.890

1Exactly the same thing that happens with your home router: You’re participating in passive mode. – Daniel B – 2016-09-06T20:45:13.120

100.64.0.0/10 was actually assigned specifically for the purpose of CGN, so it's not routable anymore. – user1686 – 2016-09-06T20:50:25.213

Answers

1

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.

the8472

Posted 2016-09-06T19:41:54.643

Reputation: 385