Application Level Control of Ports in a Service

  • Slides: 28
Download presentation
Application Level Control of Ports in a Service Provider NAT environment Dave Thaler Dan

Application Level Control of Ports in a Service Provider NAT environment Dave Thaler Dan Wing Alain Durand 1

Port Control Protocol • Service Provider NATs have problems: – Lack of control of

Port Control Protocol • Service Provider NATs have problems: – Lack of control of port reservation /port forwarding – Some legacy applications will break • A+P was one approach to address those issues • PCP is another approach to give back control to the customers via their applications. – Enable applications to dynamically negotiate ports with the service provider NAT – Provide some level of backward compatibility with existing APIs (UPn. P/NAT-PMP)

Port-Forwarding APIs Dave Thaler dthaler@microsoft. com 3

Port-Forwarding APIs Dave Thaler dthaler@microsoft. com 3

Model • No change to IP model: – A full IP address is still

Model • No change to IP model: – A full IP address is still assigned to every interface, including on NATs • App/framework wants to learn the (full) IP address of another machine’s (the NAT’s) interface, and a port that machine will forward – Can’t be done using normal IP address APIs without changing the IP model – App/framework can then advertise in app-specific manner (SRV record, email, DHT, etc. ) • Hence this is opt-in for an app or framework 4

Two separate app scenarios • Manage static port mapping – Management style application wants

Two separate app scenarios • Manage static port mapping – Management style application wants to configure a given external port to be permanently forwarded to a given port on a given machine • Manage dynamic port mapping – Runtime application wants to get an external port allocated and forwarded to its port on its machine for some duration 5

NATUPn. P Library (Windows) NATUPNPLib. UPn. PNATClass upnpnat = new NATUPNPLib. UPn. PNATClass(); NATUPNPLib.

NATUPn. P Library (Windows) NATUPNPLib. UPn. PNATClass upnpnat = new NATUPNPLib. UPn. PNATClass(); NATUPNPLib. IStatic. Port. Mapping. Collection mappings = upnpnat. Static. Port. Mapping. Collection; err = mappings. Add(8080, // External port "TCP", // Protocol 80, // Internal port "192. 168. 1. 100", // Internal IP true, // Enabled "Local Web Server"); // Description • External port=0 means wildcard, but many NATs don’t support 6

NATUPn. P API Observations • Either requested port is allocated or call fails •

NATUPn. P API Observations • Either requested port is allocated or call fails • Internal IP parameter allows for management applications • Only supports static port mapping (no lifetime) – UPn. P protocol allows lifetimes, but NATs may not support them • Interface can be determined based on internal IP parameter 7

DNSService. NAT (Apple) DNSService. Ref sd. Ref; err = DNSService. NATPort. Mapping. Create(&sd. Ref,

DNSService. NAT (Apple) DNSService. Ref sd. Ref; err = DNSService. NATPort. Mapping. Create(&sd. Ref, 0, 0, // if. Index or 0 k. DNSService. Protocol_TCP, // Protocol htons(80), // Internal port htons(8080), // External port 3600, // Lifetime call. Back, NULL); • External port=0 means wildcard 8

DNSService. NAT Observations • Lifetime parameter allows for runtime applications • External port is

DNSService. NAT Observations • Lifetime parameter allows for runtime applications • External port is just a preference, it may succeed and return something else • Lack of internal IP parameter means not designed for arbitrary management app 9

Port Control Protocol draft-wing-softwire-port-control-protocol-01 IETF 77, March 2010 Dan Wing, dwing@cisco. com Reinaldo Penno,

Port Control Protocol draft-wing-softwire-port-control-protocol-01 IETF 77, March 2010 Dan Wing, dwing@cisco. com Reinaldo Penno, rpenno@juniper. net Mohamed Boucadair, mohamed. boucadair@orange-ftgroup. com draft-wing-softwire-port-control-protocol 10

Port Control Protocol • Need to offer port forwarding capability when Service Provider NAT

Port Control Protocol • Need to offer port forwarding capability when Service Provider NAT are deployed – Ability to offer similar service features as per current CPE model • Need to delegate port numbers to requesting applications/hosts to avoid enforcing ALGs at the Provider NAT – Overall performance of the Provider NAT not altered draft-wing-softwire-port-control-protocol 11

PCP Requirements • Support Large Scale NATs – Spanning many subscribers • Allow subscriber

PCP Requirements • Support Large Scale NATs – Spanning many subscribers • Allow subscriber apps to open ports • IPv 6 • Simple, lightweight – Application, proxying in CPE, and server • Discover and control LSN – Without interfering with intermediate infrastructure draft-wing-softwire-port-control-protocol 12

Why Not My Favorite Protocol? (MIDCOM, UPn. P IGD, NAT-PMP, DHCP …) • None

Why Not My Favorite Protocol? (MIDCOM, UPn. P IGD, NAT-PMP, DHCP …) • None meet all requirements draft-wing-softwire-port-control-protocol 13

PCP Applicability • IPv 4 address sharing – No NAT 44 (fixed port range)

PCP Applicability • IPv 4 address sharing – No NAT 44 (fixed port range) – Stateful NAT 44 (e. g. , DS-Lite, LSN) – Stateless NAT 64/NAT 46 – Stateful NAT 64/NAT 46 • IPv 6 Simple CPE Security draft-wing-softwire-port-control-protocol 14

PCP Basics • Lightweight – Designed for deployment at large scale – Does not

PCP Basics • Lightweight – Designed for deployment at large scale – Does not require heavy treatment at the Server side • Quick convergent Request/answer model – No permanent sessions are required to be maintained between the Client and the Server • A subscriber can only open pinholes for his own devices – PCP isn’t needed in every internal server – E. g. , Customer Premise router can open pinhole for webcam or Ti. Vo draft-wing-softwire-port-control-protocol 15

PCP and IPv 6 • NAT 64 – Open ports for incoming IPv 4

PCP and IPv 6 • NAT 64 – Open ports for incoming IPv 4 traffic • E. g. , IPv 6 HTTP server in the home accessed from IPv 4 Internet • draft-ietf-v 6 ops-cpe-simple-security-09 – Open pinholes in IPv 6 CPE draft-wing-softwire-port-control-protocol 16

Client Models draft-wing-softwire-port-control-protocol 17

Client Models draft-wing-softwire-port-control-protocol 17

PCP Client Model: UPn. P IGD Proxy UPn. P IGD Customer Premise Router UPn.

PCP Client Model: UPn. P IGD Proxy UPn. P IGD Customer Premise Router UPn. P IGD proxy PCP Server PCP Client • Proxies UPn. P IGD to PCP • Provides compatibility for UPn. P IGD • Applications which want specific port will likely get an error – Can’t help that draft-wing-softwire-port-control-protocol 18

PCP Client Model: NAT-PMP Proxy NAT-PMP Customer Premise Router NAT-PMP proxy PCP Server PCP

PCP Client Model: NAT-PMP Proxy NAT-PMP Customer Premise Router NAT-PMP proxy PCP Server PCP Client • Proxies NAT-PMP to PCP • Provides compatibility for UPn. P IGD • No loss of semantics draft-wing-softwire-port-control-protocol 19

PCP Client Model: HTTP Customer Premise Router HTTP managed PCP Server PCP Client •

PCP Client Model: HTTP Customer Premise Router HTTP managed PCP Server PCP Client • Subscriber manages their own port forwarding – Similar to http: //192. 168. 1. 1, login as “admin” – Instructions at http: //www. portforward. com • Not for “Grandma” draft-wing-softwire-port-control-protocol 20

PCP Client Model: PCP on host PCP Server PCP Client Customer Premise Router •

PCP Client Model: PCP on host PCP Server PCP Client Customer Premise Router • Application (or OS) implements PCP client • Customer premise router does nothing – Does not proxy PCP • draft-ietf-v 6 ops-cpe-simple-security draft-wing-softwire-port-control-protocol 21

Server Models draft-wing-softwire-port-control-protocol 22

Server Models draft-wing-softwire-port-control-protocol 22

PCP Server Model: Embedded PCP Client Service Provider NAT PCP Server Internet • PCP

PCP Server Model: Embedded PCP Client Service Provider NAT PCP Server Internet • PCP Server embedded in Service Provider’s NAT • Similar to UPn. P IGD, NAT-PMP draft-wing-softwire-port-control-protocol 23

PCP Server Model: Separate PCP Server H. 248, MIDCOM, proprietary, etc. PCP Client Service

PCP Server Model: Separate PCP Server H. 248, MIDCOM, proprietary, etc. PCP Client Service Provider NAT Internet • PCP Server is outside of the NAT • Allows existing NAT control protocol draft-wing-softwire-port-control-protocol 24

Questions draft-wing-softwire-port-control-protocol-01 draft-wing-softwire-port-control-protocol 25

Questions draft-wing-softwire-port-control-protocol-01 draft-wing-softwire-port-control-protocol 25

PCP Server Models Service Provider NAT PCP Server PCP Client Internet PCP Server H.

PCP Server Models Service Provider NAT PCP Server PCP Client Internet PCP Server H. 248, MIDCOM, proprietary, etc. PCP Client IPv 6 Service Provider NAT draft-wing-softwire-port-control-protocol Internet 26

PCP Client Models UPn. P IGD NAT-PMP HTTP Customer Premise Router UPn. P IGD

PCP Client Models UPn. P IGD NAT-PMP HTTP Customer Premise Router UPn. P IGD proxy PCP Server PCP Client Customer Premise Router NAT-PMP proxy PCP Server PCP Client Customer Premise Router HTTP managed PCP Server PCP Client Customer Premise Router draft-wing-softwire-port-control-protocol 27

Mapping APIs/protocols to PCP • Apps shouldn’t have to know which case they’re in

Mapping APIs/protocols to PCP • Apps shouldn’t have to know which case they’re in • DNSService. NAT API / NAT-PMP protocol maps directly • NATUPn. P (v 1) API / UPn. P-IGD protocol more complicated – It can be done successfully, but it’s kludgy 28