Consider the following points when the when PCP PORT_SET option is enabled. Points listed below are in accordance with the RFC 7753:
The SR OS attempts to allocate the first external port from the suggested external port. If the port is not available, another port is selected.
Parity is honored.
The PORT_SET size value 0xffff in the request indicates that the client is willing to accept as many ports as the SR OS can offer.
If the requested PORT-SET request cannot be fully (or exactly) satisfied because of the unavailability of the requested consecutive port range, the SR OS tries to find and allocate the next largest port set.
If the SR OS, because of the lack of contiguous port ranges, allocates only a single port, the PORT_SET option is not present in the response.
If the SR OS receives a PCP MAP request, with or without a PORT_SET option that tries to map one or more internal ports or port sets belonging to already existing mappings, then the request is considered to be a refresh request. Each of the matching port or port set mappings is processed independently, as if a separate refresh request was received. Consequently, the SR OS sends a Mapping Update message for each of the mappings.
If multiple PORT_SET options are present in a single PCP MAP request, a MALFORMED_OPTION error is returned.
If the PORT_SET size is zero, a MALFORMED_OPTION error is returned.
If a Prefer Failure option is present, a MALFORMED_OPTION error is returned.
When a PCP request contains both the PORT_SET and Port Reservation Port (N/N+1) options, only the PORT_SET is honored.
PCP (with PORT_SET option or otherwise) should not be configured simultaneously with static port forwards in the same NAT pool. PCP allows for dynamic refreshment of port forwards while static port forwards do not have this capability. As a result, PCP port refresh of a port forward allocated statically may lead to unwanted behavior.
If the PORT_SET capability is added to or removed from an operationally up PCP server on an SR OS node, the server resets its Epoch time and sends a Version 2 ANNOUNCE message as described in the PCP specification.