Usurp: Distributed NAT Traversal for Overlay Networks

Slides:



Advertisements
Similar presentations
A New Method for Symmetric NAT Traversal in UDP and TCP
Advertisements

Internet Area IPv6 Multi-Addressing, Locators and Paths.
Traversing symmetric NAT with predictable port allocation function SIN 2014 Dušan Klinec, Vashek Matyáš Faculty of Informatics, Masaryk University.
CSC458 Programming Assignment II: NAT Nov 7, 2014.
CPSC Network Layer4-1 IP addresses: how to get one? Q: How does a host get IP address? r hard-coded by system admin in a file m Windows: control-panel->network->configuration-
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
P2P and NAT How to traverse NAT Davide Carboni ©
1 © 2004 Cisco Systems, Inc. All rights reserved. Making NATs work for Online Gaming and VoIP Dr. Cullen Jennings
STUN Date: Speaker: Hui-Hsiung Chung 1.
Copyright 2005 – 2009 © by Elliot Eichen. All rights reserved. NAT (NAPT/PAT), STUN, and ICE `Structure of ice II, viewed along the hexagonal c-axis. Hydrogen.
Leone From global measurements to local management UC3M: inHome NAT detection RFC recommender ICMP UDP TCP Miguel Ángel Díaz, Francisco Valera.
SIP, NAT, Firewall SIP NAT Firewall How to Traversal NAT/Firewall for SIP.
Chapter 2 Internet Protocol DoD Model Four layers: – Process/Application layer – Host-to-Host layer – Internet layer – Network Access layer.
Chapter 9 Classification And Forwarding. Outline.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #12 LSNAT - Load Sharing NAT (RFC 2391)
Packet Filtering. 2 Objectives Describe packets and packet filtering Explain the approaches to packet filtering Recommend specific filtering rules.
Network Layer Lecture # 2 MAHS. 4: Network Layer 4b-2 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables!
CS 5565 Network Architecture and Protocols
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
CS 3214 Computer Systems Godmar Back Lecture 24 Supplementary Material.
1 NAT Network Address Translation Motivation for NAT To solve the insufficient problem of IP addresses IPv6 –All software and hardware need to be updated.
STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs) speaker : Wenping Zhang date :
CIS 3360: Internet: Network Layer Introduction Cliff Zou Spring 2012.
1 Chapter 4: Network Layer r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Hierarchical routing.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Packet Filtering Chapter 4. Learning Objectives Understand packets and packet filtering Understand approaches to packet filtering Set specific filtering.
Private Network Addresses IP addresses in a private network can be assigned arbitrarily. – Not registered and not guaranteed to be globally unique Generally,
Network Layer4-1 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 4: Planning and Configuring Routing and Switching.
CS 5565 Network Architecture and Protocols Godmar Back Lecture 14.
A Sybil-Proof Distributed Hash Table Chris Lesniewski-LaasM. Frans Kaashoek MIT 28 April 2010 NSDI
HIP-Based NAT Traversal in P2P-Environments
CS 3700 Networks and Distributed Systems
Firewalls, Network Address Translators(NATs), and H.323
Could SP-NAT Save the Internet?
Scaling the Network: Subnetting and Other Protocols
05 - P2P applications and Sockets
NAT (Network Address Translation)
CSC458 Programming Assignment II: NAT
Gijeong Kim ,Junho Kim ,Sungwon Lee Kyunghee University
Supplementary Material
The Transport Layer Implementation Services Functions Protocols
Original slides prepared by Theo Benson
Chapter 4: Network Layer
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Supplementary Material
Internet Indirection Infrastructure (i3)
A quick intro to networking
改良UDP洞穿技術設計物聯網通訊: 以遠端門鈴監控系統為例 Improving UDP Hole Punching Technique For IoT Communications: A Remote Door-bell Monitoring System 報告時間28~32分佳 楊凱勝 指導教授:柯開維.
Application layer 1 Principles of network applications 2 Web and HTTP
Network Address Translation
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Client-Server Interaction
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Packet Switching To improve the efficiency of transferring information over a shared communication line, messages are divided into fixed-sized, numbered.
The Internet and HTTP and DNS Examples
I. Basic Network Concepts
Firewalls Routers, Switches, Hubs VPNs
NAT Traversal for VoIP Dr. Quincy Wu National Chi Nan University
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 4: Planning and Configuring Routing and Switching.
دیواره ی آتش.
TCP/IP Protocol Suite: Review
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
Firewalls.
Scaling the Network: Subnetting and Other Protocols
Request for Comments(RFC) 3489
Network Address Translation (NAT)
Computer Networks Protocols
DHCP: Dynamic Host Configuration Protocol
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Presentation transcript:

Usurp: Distributed NAT Traversal for Overlay Networks Salman Niazi, Jim Dowling salman,jdowling@sics.se Swedish Institute of Computer Science

Usurp A NAT-aware message routing service, implemented as an overlay network. Nodes primarily use structured overlay network (SON) IDs as network endpoints. Build NAT-traversing P2P applications! Peer-to-Peer (P2P) apps are layered over Usurp middleware so that they both traverse NATs and can make NAT-aware connection decisions.

Client-Server NAT Infrastructure NAT Type Indentification Message Relaying Hole-Punching for UDP Rendezvous Servers STUN Servers TURN Servers Stateless 2 Public IPs Stateful High B/W Stateful Low Latency P2P Network Stun servers are stateless. Challenges: Stun servers require 2 public IP addresses. Turn and Rendezvous servers are stateful. Needs lots of them as the system scales. Requires additional addressing/routing support to enable communication with private nodes!

Distributed NAT Infrastructure Public Nodes have an Open IP address or support the UPnP IGD profile. SON of Public Nodes Addressing/Routing, STUN, TURN, Rendezvous services P2P Network Private Nodes are behind NATs/firewalls and become clients of public nodes.

background on nats

NAT Devices NAT devices differ in many application-observable aspects. NAT port mappings, Traffic filtering, NAT binding timeouts, ICMP handling, Queuing, Hair pinning, Buffer sizes 192.168.1.1 78.229.32.1 Internet NAT Gateways allow the use of many private IP addresses behind a single public IP address Solve the IP shortage problem Using NATs doesn’t affect clients in client-server Internet services HTTP, SMTP, IMAP, SSH, FTP, DNS, etc NAT Gateways present a connectivity problem for Peer-to-Peer (P2P) apps Only 20-40% of nodes are public nodes in existing systems. Active Queue Management (vs Drop tail behaviour) NAT behaviour is vendor-specific, but several common behaviours: NATs create transient mappings between private (ip:port) and public (ip:port) bindings. NATs exhibit differing packet filtering rules when mapping from public to private address space. NAT has at least 2 Network Interfaces: private network interface, public network interface. You can also have multi-layer NATs, Corporate NATs (many public network interfaces). There is no standard for NAT behaviour, although there are now recommended behaviours: IETF Network Address Translation (NAT) Behavioral Requirements for Unicast UDP NAT Behavioral Requirements for ICMP 192.168.1.121 192.168.1.54 IETF NAT Behavioral Requirements standards not adopted yet by manufacturers.

USURP

Usurp Component Architecture Both Public & Private Nodes Public Nodes Only Also have a Bootstrap Client here!

NAT type identification using DISTRIBUTED STUN

NAT Type Classification We use the BEHAVE RFC [1]. Defines NAT behaviour as a set of policies: Port Allocation Port Mapping Port Filtering NAT Binding Timeout X Symmetric Port-Restricted Partial-Cone Full-Cone

NAT Port Allocation Policy NAT with Public IP = 124.29.31.1 Source IP:port NAT Port Destination IP:port Port Allocation Policy 192.168.1.12:4983 4983 134.229.81.12:8888 Preservation 192.168.1.12:4983 56000 121.85.141.13:6543 Contiguity 192.168.1.12:4983 54832 184.121.54.83:1234 Random Preservation Contiguity Random When a packet is sent out from a certain private endpoint of a node behind a gateway to some public endpoint, a rule in the NAT table is created. Symmetric NATs sometimes have a random port allocation policy. :54832 :56000 :4983 192.168.1.12:4983 134.22.81.12:8888 184.121.54.83:1234 121.85.141.13:6543 56000 +∆

Port Mapping Policy Endpoint Independent Mapping (Preservation) Source IP:port NAT Port Destination IP:port 192.168.1.12:4983 4983 134.22.81.12:8888 134.22.81.12:6543 184.121.54.8:1234 Endpoint Independent Mapping (Preservation) Source IP:port NAT Port Destination IP:port 192.168.1.12:4983 56000 134.22.81.12:8888 134.22.81.12:6543 Host Dependent Mapping (Contiguity) 192.168.1.12:4983 56001 184.121.54.8:1234 192.168.1.12:4983 Source IP:port NAT Port Destination IP:port 134.22.81.12:8888 13545 134.22.81.12:6543 45352 184.121.54.8:1234 6957 Port Dependent Mapping (Random)

NAT Port Filtering Policy Source IP:port NAT Port Destination IP:port EI HD PD Incoming Packet 192.168.1.12:4983 4983 134.229.81.12:8888 Y Y Y 134.229.81.12:8888 Y Y N 134.229.81.12:7856 Y N N 85.185.241.13:6543 134.22.81.12:8888 Symmetric NATs often have a port-dependent filtering policy. Port-Restricted NATs often have a port-dependent filtering policy. Partial-Cone NATs have a host-dependent filtering policy. Full-Cone NATs have an endpoint-independent filtering policy. Symmetric = {<EI Filt, Random} Full-Cone = {EI, Random} Partial-Cone Port-Restricted Cone 134.22.81.12:7856 192.168.1.12:4983 85.185.241.13:6543 EI =Endpoint Independent; HD=Host Dependent; PD=Port Dependent

Distributed STUN Identifies the NAT Type: Mapping, Port Allocation and Filtering Polices & Binding Timeout Can re-run this protocol during application lifetime if one has a NAT that changes its type: e.g., corporate NATs

ADDRESSING, ROUTING and connection establishment

SON for Addressing and Routing Successor-list replication can be used so that private nodes have several parents If you are using successor-list replication, and periodic stabilization identifies a dead node, you may be a parent of the failed node, and inform it that its parent has died. A child then has to find a new parent – successor list replication is used for this. Parent failure identified using private->public node heartbeats & p-stabilization.

Node Descriptors SON key is used to connect to nodes NAT type contains: Mapping, Allocation, Filtering Policies IP Endpoints Single endpoint for public nodes Multiple Parent Endpoints for private nodes Timestamp for descriptor creation IP header = 20 Bytes UDP header = 8 bytes Usurp header (public node) = 35 bytes Usurp header (private node, 3 parents) = 47 bytes

Connection Establishment Parallelize connection attempts to private nodes by connecting to all its parents concurrently. Parallelized connection attempts is like parallel lookups on Kademlia.

NAT Hole Punching Strategies Connection reversal From public node to a private node Simple Hole-Punching Endpoint-Independent mapping or filtering Port-prediction using Contiguity Port-prediction using Preservation

NAT-Aware Connections It is the combination of NAT types of 2 nodes that is important when connecting two nodes behind NATs [2]. B’s Parent 1. Bind port X and Connect(B, Policy) 2. Response: B’s NAT IP 2. Connect(A’s NAT IP/port) 3. Send msg to random port at B’s NAT IP addr 4. Connect sent to port X on A’s NAT Rule-of-Thumb: If a connection is initiated by a less restrictive NAT to a more restrictive NAT, the more restrictive NAT performs the hole punching A B HD Mapping, Preservation, PD Filter PD Mapping, Random, PD Filter

EXPERIMENTS

Experimental Evaluation Evaluate performance of a Peer Sampling Service (Cyclon) in the presence of NATs. Compare behaviour and performance of: Baseline Cyclon (no NATs) Cyclon (with NATs) Cyclon over Usurp. Message-level simulator using Kompics. NAT emulator that emulates mapping, port allocation and filtering policies.

Cyclon Layered on Usurp

Experimental Setup Ratio public to private nodes is set to 1:4 Percentages of NAT types are taken from [2]. Rule binding expiration time Randomly chosen from {30, 60, 90, 120, 150, 180 sec} Simulate multiple nodes behind a NAT. Network size 1024 nodes. Constant node arrival rate of 500ms. Latencies modelled using the King Data Set [3] Results average of 30 runs

Experiment Setup Chord parameters Cyclon parameters successor stabilization of 2 seconds finger stabilization 3 seconds Cyclon parameters Cycle period 10 seconds View size 15 Shuffle Length 5

Clustering Coefficient

Average Path Length

Average In-Degree

Usurp Overhead vs Time

Overhead vs % Private Nodes

Massive Failure

Churn: Percent failures/cycle How churn affects the SON Join failures == failures of nodes to join the SON

Conclusions and Future Work Presented a fully distributed message routing infrastructure for IP networks with NATs P2P applications can be layered on Usurp. Validated Usurp using a PSS Acceptable overhead on public nodes for small networks Working on integration of a SON that supports sub-second lookups

References [1] BEHAVE RFC, Audet, F., Jennings, C.: Network address translation (nat) behavioral requirements for unicast udp (2007) IETF [2] Roverso et al., Natcracker: Nat combinations matter, ICCC, 2009. [3] Gummadi, K.P. et al, King: Estimating latency between arbitrary internet end hosts. In SIGCOMM Internet Measurement Workshop (2002)