rfc-6970

Universal Plug and Play (UPnP) Internet Gateway Device - Port Control Protocol Interworking Function (IGD-PCP IWF)

M. Boucadair, R. Penno, D. Wing
date2013-07 streamIETF areaint wgpcp statusPROPOSED STANDARD pages23 canonicalhttps://www.rfc-editor.org/rfc/rfc6970 doi10.17487/RFC6970
This document specifies the behavior of the Universal Plug and Play (UPnP) Internet Gateway Device - Port Control Protocol Interworking Function (IGD-PCP IWF). A UPnP IGD-PCP IWF is required to be embedded in Customer Premises (CP) routers to allow for transparent NAT control in environments where a UPnP IGD is used on the LAN side and PCP is used on the external side of the CP router.

Extracted elements (28)

design-rationale §4.1

PortMappingEnabled is restricted to value "1" only because PCP's initial goal is to ease traversal of Carrier Grade NAT and does not support deactivating dynamic NAT mappings; supporting per-subscriber deactivation would overload the Carrier Grade NAT.

nat

design-rationale §1

The IGD-PCP IWF maintains a local mapping table storing all active mappings constructed by internal IGD Control Points. This design choice restricts the amount of PCP messages exchanged with the PCP server, avoiding unnecessary roundtrips for listing or querying mappings.

nat

design-rationale §5.9

The IWF simulates long and even infinite UPnP IGD mapping lifetimes using periodic PCP renewals because PCP and UPnP IGD have incompatible lifetime models (IGD:1 allows infinite; IGD:2 caps at 604800 seconds; PCP maximum is 4294967296 seconds).

nat

design-rationale §5.6.1

When a short-lifetime PCP error occurs (e.g., NETWORK_FAILURE, NO_RESOURCES), the IWF MAY resend the request after 30 seconds without informing the IGD Control Point, because some applications (e.g., uTorrent, Vuze, eMule) wait 90 seconds or more for a UPnP response, giving time for a retry to succeed transparently.

nat

interoperability-note §4.3

AddPortMapping() cannot be implemented without the PREFER_FAILURE PCP option, since that option is the mechanism by which the PCP server signals failure when a specific requested external port is unavailable. If the PCP server does not support PREFER_FAILURE, AddPortMapping() cannot function correctly.

nat

interoperability-note §4.1

In IGD:1, PortMappingLeaseDuration value 0 means infinite; in IGD:2, it is remapped to the IGD maximum of 604800 seconds. The IWF must handle both conventions when translating to PCP Requested Lifetime values.

nat

interoperability-note §4.1 SHOULD

PortMappingDescription is not supported in base PCP; however, if the local PCP client supports a PCP description option, that option SHOULD be used to relay the mapping description to the PCP server.

nat

interoperability-note §5.10

Upon receipt of an unsolicited PCP ANNOUNCE, the IGD-PCP IWF re-installs its mappings using MAP requests with PREFER_FAILURE. If the PCP server cannot create the requested mappings (CANNOT_PROVIDE_EXTERNAL), the IWF has no means of notifying internal IGD Control Points of changes to external IP address or port numbers.

nat

normative-requirement §5.9 MUST

For infinite PortMappingLeaseDuration requests, the IGD-PCP IWF MUST set Requested Lifetime to 4294967296. For finite durations, it MUST set the same value, MUST maintain a timer set to the initial requested duration, and MUST periodically renew the PCP mapping until that timer expires.

nat

normative-requirement §5.7 MUST NOT

GetGenericPortMappingEntry() and GetListOfPortMappings() MUST NOT be proxied to the PCP server, since a local mapping table is maintained by the IGD-PCP IWF and these are served locally.

nat

normative-requirement §5.1 MUST NOT

If no IPv4 address/IPv6 prefix is assigned to the IGD or the IGD cannot determine whether to contact an upstream PCP server, the IGD-PCP IWF MUST NOT be invoked.

nat

normative-requirement §5.9 MUST NOT

Responses received when renewing a PCP mapping MUST NOT be relayed to the IGD Control Point, as the IGD Control Point is unaware of the renewal mechanism.

nat

normative-requirement §5.3 MUST

The IGD-PCP IWF MUST store locally all mappings instantiated by internal IGD Control Points in the PCP server, and all mappings SHOULD be stored in permanent storage to survive reboots.

nat

normative-requirement §4.1 MUST

The IGD-PCP IWF MUST support IGD:2 behavior for state persistence, meaning the IWF must not require state to be kept in stable storage but should handle state loss gracefully.

nat

normative-requirement §5.5 MUST NOT

The lifetime of mappings instantiated in the IGD SHOULD be the one assigned by the terminating PCP server; in any case, the lifetime MUST NOT be lower than the one assigned by the terminating PCP server.

nat

normative-requirement §4.1 MUST

The PortMappingEnabled state variable MUST only accept the value "1"; the IGD-PCP IWF MUST send back an error if any other value is signaled, because PCP does not support deactivating dynamic NAT mappings.

nat

normative-requirement §5.3 MUST

Upon receipt of a PCP MAP response, the IGD-PCP IWF MUST extract the enclosed mapping and MUST store it in the local mapping table, which serves as an image of the PCP server's mapping table for the subscriber.

nat

normative-requirement §5.6.2 MUST

Upon receipt of AddPortMapping() from an IGD Control Point, the IGD-PCP IWF MUST generate a PCP MAP request with all requested mapping information and MUST insert a PREFER_FAILURE option in the generated PCP request.

nat

normative-requirement §5.5 MUST

When NAT is embedded in the IGD, the IGD-PCP IWF MUST update PCP requests with the IP address and/or port number belonging to the external interface of the IGD (i.e., post-NAT1), replacing any internal host addresses provided by the IGD Control Point.

nat

normative-requirement §5.10 MUST

When the IGD-PCP IWF is co-located with the DHCP server, the IWF state MUST be updated using DHCP server state; if an IP address expires or is released, the IGD-PCP IWF MUST delete all mappings bound to that internal IP address.

nat

protocol-element §4.3

PCP error codes are mapped to UPnP IGD error codes: CANNOT_PROVIDE_EXTERNAL maps to 718 ConflictInMappingEntry (for AddPortMapping) or 714 NoSuchEntryInArray (for delete); NOT_AUTHORIZED maps to IGD:1 718 or IGD:2 606; NO_RESOURCES and USER_EX_QUOTA both map to IGD:2 728 NoPortMapsAvailable and cannot be distinguished from each other.

nat

protocol-element §3

The IGD-PCP IWF is an interworking function embedded in Customer Premises routers that translates between UPnP IGD WANIPConnection messages on the LAN side and PCP MAP requests/responses on the external side. It includes PCP client functionality and maintains a local port mapping table.

nat, pcp

protocol-element §3

Two deployment configurations are defined: (1) no NAT in the IGD (e.g., DS-Lite or NAT64 deployments), where message contents are passed through unchanged; and (2) NAT embedded in the IGD, creating a cascaded NAT scenario with NAT1 at the IGD and NAT2 at the Provider/Carrier Grade NAT.

nat, v6ops

protocol-element §4.2

UPnP IGD methods are mapped to PCP operations: AddAnyPortMapping() and AddPortMapping() map to PCP MAP requests; GetSpecificPortMappingEntry() maps to MAP with PREFER_FAILURE option; DeletePortMapping() maps to MAP with Requested Lifetime=0; GetExternalIPAddress() can be satisfied from any active mapping.

nat

protocol-element §4.1

UPnP IGD state variables are mapped to PCP parameters: ExternalIPAddress from PCP response, PortMappingLeaseDuration to Requested Lifetime, RemoteHost to FILTER option Remote Peer IP, ExternalPort to Suggested External Port, InternalPort to Internal Port, and InternalClient to THIRD_PARTY option Internal IP Address.

nat

security-consideration §6 SHOULD

IGD:2 access control requirements and authorization levels SHOULD be applied by default; operation on behalf of a third party SHOULD be allowed only if authentication and authorization are used. When only IGD:1 is available, third-party operation SHOULD NOT be allowed.

security, nat

security-consideration §6 MUST NOT

The THIRD_PARTY option MUST NOT be enabled unless the network on which PCP messages are sent is fully trusted (e.g., protected by ACLs on both the PCP client, server, and intermediate network), to prevent malicious users from creating mappings on behalf of third parties.

security, nat

security-consideration §6 SHOULD

To prevent port resource exhaustion from IGD Control Points issuing rapid mapping requests, means such as port quota (as discussed in Section 17.2 of RFC 6887) SHOULD be enabled on the PCP server.

security, nat