180 likes | 479 Views
p2p DNS addressing. Presented By- Anup Tapadia Alexander Loukissas Justin Wu. Problem. Why can’t we use DNS address as a primary identifier for a computer to connect from anywhere, anytime ? Eg – peter.myworld.com Connects to peter. NAT – Network address translators Firewalls.
E N D
p2p DNS addressing Presented By- Anup Tapadia Alexander Loukissas Justin Wu CSE 222a Final Project - UCSD Spring 2007
Problem • Why can’t we use DNS address as a primary identifier for a computer to connect from anywhere, anytime ? • Eg – peter.myworld.com Connects to peter • NAT – Network address translators • Firewalls CSE 222a Final Project - UCSD Spring 2007
Solution • We introduce a p2p DNS addressing scheme that deals with both problems • Addressing: Host names are decoupled from IP addresses • Connectivity: Hosts can receive and respond to HTTP requests, even when they are behind a NAT CSE 222a Final Project - UCSD Spring 2007
NATs • Most DSL/Cable routers have a NAT built into them • NATs block incoming connections, making the host inaccessible • Many applications use techniques that “punch UDP holes” through the NATs (e.g. Skype) CSE 222a Final Project - UCSD Spring 2007
The system at a glance PC with public IP (Super Server) Case 1: PC with public IP Case 2: PC behind NAT Step 2: HTTP requests and responses Step 1: DNS query for john.p2p.net Step 1: DNS query for peter.p2p.net Step 3: Relay traffic between mobile and PC behind NAT Step 2: HTTP requests and responses PC behind NAT Step 4: (Optional) TCP hole punching CSE 222a Final Project - UCSD Spring 2007
TCP NAT Traversal P2P DNS Client (Super Server) Nat A Nat B Client 2 Client 1 Pre-established connection HTTP Get from A:P1 Outbound initialize req SYN from B:P2 for Super Serv TCP connect HTTP redirect for B:P2 SYN from B:P2 for NAT A TCP connect Passive TCP Listen SYN from A:P3 to B:P2 SYN-ACK ACK Data CSE 222a Final Project - UCSD Spring 2007
p2pDNS Client • Small Java application that provides both addressing and connectivity to host • Utilizes feedback from STUN and DNS server • Automatically runs in either SuperServer of Client mode CSE 222a Final Project - UCSD Spring 2007
p2pDNS Server Tasks • Overloads standard DNS server • e.g. bind9 • Assigns SuperServers to hosts • Maintains information for all online hosts • DNS lookup queries are handled as usual • e.g. by named on port 53 • Overhead only on host login/logout CSE 222a Final Project - UCSD Spring 2007
p2pDNS Server Table CSE 222a Final Project - UCSD Spring 2007
Host logon process • Host contacts DNS server on known IP address and port • Host sends logon request to the DNS server • Based on information from the logon message, the DNS server authorizes the host and if needed, provides the IP address of a SuperServer • DNS server updates lookup table CSE 222a Final Project - UCSD Spring 2007
C C C C C C C C C C C C C C C C C C C C C Partial Decentralization SS SS SS SS P2P DNS SS SS SS CSE 222a Final Project - UCSD Spring 2007
Super-server election • Load • Bandwidth • Latency • # of clients logged on • Geographical distance (ip2location.com database) • Physical distance • ISP • Availability CSE 222a Final Project - UCSD Spring 2007
Geolocational election d2 0,0 180,180 -180,180 d1 0,0 0,0 -180,-180 180,-180 CSE 222a Final Project - UCSD Spring 2007 0,0
Experimental setup • p2pDNS server • Client behind NAT (alex.p2p.net) • Super Server / client (justin.p2p.net) • Multi threaded HTTP client CSE 222a Final Project - UCSD Spring 2007
Relay Overhead CSE 222a Final Project - UCSD Spring 2007
Achievements • p2pDNS registration and updates • Serves any HTTP server with any http client • Symmetric NAT traversal through super server relays • Common case TCP traversal through NAT hole punching • Study of geolocational server election CSE 222a Final Project - UCSD Spring 2007
Key Issues • SuperServer failover and fast recovery • Fast DNS cache updates • Effect of low TTL on DNS server load • TCP traversal through various NAT’s • Security CSE 222a Final Project - UCSD Spring 2007
Conclusion • It works ! • TCP NAT hole punching is hard to synchronize but achievable in common cases • Needs moderate central infrastructure • Future Work • Scalability needs to be tested • Failover and recovery • More De-centralization • Extend p2pDNS services past HTTP CSE 222a Final Project - UCSD Spring 2007