22
Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes, [email protected] Pizza Talk 15/Oct/2008

ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

ICE, TURN and STUN for NAT Traversal

Stephen Strowes, [email protected]

Pizza Talk

15/Oct/2008

Page 2: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

Problem Space

NATs are commonplace, but they destroy the end-to-endianness of the Internet, making it difficult for two peers to

talk to each other

Many protocols (e.g., SIP, SDP within SIP for media) contain IP addresses in the body of the message

NATClient NAT Client

INVITESend media to 192.168.1.2:4321

Page 3: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

Problem Space

NAT behaviour is vendor-specific (model-specific?), but in general:

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.

Page 4: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

Problem Space

Hosts have private transport addresses, associated public transport addresses, and possibly also restrictive NATs to

traverse

Page 5: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

ICE

Interactive Connectivity Establishment • Intended to help two peers in difficult network conditions

find the best transport to communicate• Stand-alone, but designed with SIP/SDP in mind, allows

endpoints to describe a set of candidate addresses to test for communication

• Uses STUN and TURN as tools to gather candidates...

Page 6: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

STUN

Session Traversal Utilities for NAT

Dirt simple idea; defines one method

Client

NAT

STUN Server

Page 7: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

Session Traversal Utilities for NAT

Dirt simple idea:• What's my public IP?

STUN

Client

NAT

STUN Server

Page 8: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

Session Traversal Utilities for NAT

Dirt simple idea:• What's my public IP?• THIS is your public IP!

STUN

STUN Server

NAT

Client

Page 9: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

TURN

Traversal Using Relays around NAT

Allocate a relay on the public Internet TURN Server

NAT

Client

Page 10: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

Traversal Using Relays around NAT

Allocate a relay on the public Internet• Allocate an address?

TURN

TURN Server

NAT

Client

Page 11: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

Traversal Using Relays around NAT

Allocate a relay on the public Internet• Allocate an address?• THIS is your allocation!

TURN

TURN Server

NAT

Client

Page 12: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

Traversal Using Relays around NAT

Client can then create permissions to dictate who can send data to theallocated relay address for forwarding tothe client...

TURN

TURN Server

NAT

Client

Page 13: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

ICE

Interactive Connectivity Establishment • Intended to help two peers in difficult network conditions

find the best transport to communicate• Extension to the offer/answer model, allows endpoints to

describe a set of candidate addresses for communication• Uses STUN and TURN to gather candidates• Defines a process for pairing and checking these

candidates

Page 14: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

ICE

NAT

Alice Bob

TURN Server

• Consider...

SIP

NAT

Page 15: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

ICE

• Candidate gathering...

NAT

Alice Bob

TURN Server

NAT

SIP

Host: 192.x...Srflx: 212.x...Relay: 130.x...

Host: 10.x...Srflx: 102.x...Relay: 103.x...

Page 16: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

ICE

• Exchange candidate sets...

NAT

Alice Bob

TURN Server

NAT

SIP

Page 17: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

ICE

• Candidates are paired in order of decreasing priority and tested• Host candidates are good!• Relay candidates are bad!

Page 18: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

ICE

TURN Server

NAT

Alice Bob

TURN Server

NAT

• Connectivity checks...

Page 19: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

What don't we know?

• People are building software using these protocols, or similar ideas, but we have little quantifiable data on their real-life behaviour• Success rates for ICE• How well does it actually work? Quality of chosen candidates?• Throttling of connectivity checks?

• ... and then there's the possibility of collecting information on the type of NATs widely deployed in the Internet

Page 20: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

What are we building?

NATAlice

Bob

STUN/TURN Server

NAT

• Measurement platform

SIP

Apache

Symbian client

Page 21: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

We need you...

• There's a lot of work here which can be done... For starters:• Web front-end• Linux client

• We would like to take on• interested students for special

assignments to help us implement some of this work...

Page 22: ICE, TURN and STUN for NAT Traversal - Stephen Strowes · 10/15/2008  · Stephen Strowes | Nokia © 2008 Company Confidential ICE, TURN and STUN for NAT Traversal Stephen Strowes,

Stephen Strowes | Nokia © 2008 Company Confidential

Resources

• ICE: http://tools.ietf.org/html/draft-ietf-mmusic-ice• STUN: http://tools.ietf.org/html/draft-ietf-behave-rfc3489bis• TURN: http://tools.ietf.org/html/draft-ietf-behave-turn

[email protected]