<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-radext-ip-port-radius-ext-15"
     ipr="trust200902">
  <front>
    <title abbrev="RADIUS Extensions for IP Port ">RADIUS Extensions for IP
    Port Configuration and Reporting</title>

    <author fullname="Dean Cheng" initials="D." surname="Cheng">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>2330 Central Expressway</street>

          <city>Santa Clara</city>

          <region>California</region>

          <code>95050</code>

          <country>USA</country>
        </postal>

        <email>dean.cheng@huawei.com</email>
      </address>
    </author>

    <author fullname="Jouni Korhonen" initials="J." surname="Korhonen">
      <organization>Broadcom Corporation</organization>

      <address>
        <postal>
          <street>3151 Zanker Road</street>

          <city>San Jose</city>

          <code>95134</code>

          <country>USA</country>
        </postal>

        <email>jouni.nospam@gmail.com</email>
      </address>
    </author>

    <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
      <organization>Orange</organization>

      <address>
        <postal>
          <street></street>

          <city>Rennes</city>

          <country>France</country>
        </postal>

        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <author fullname="Senthil Sivakumar" initials="S." surname="Sivakumar">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street>7100-8 Kit Creek Road</street>

          <city>Research Triangle Park</city>

          <region>North Carolina</region>

          <country>USA</country>
        </postal>

        <email>ssenthil@cisco.com</email>
      </address>
    </author>

    <date year="" />

    <abstract>
      <t>This document defines three new RADIUS attributes. For devices that
      implement IP port ranges, these attributes are used to communicate with
      a RADIUS server in order to configure and report IP transport ports, as
      well as mapping behavior for specific hosts. This mechanism can be used
      in various deployment scenarios such as Carrier-Grade NAT, IPv4/IPv6
      translators, Provider WLAN Gateway, etc. This document defines a mapping
      between some RADIUS attributes and IPFIX Information Element
      Identifiers.</t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>In a broadband network, customer information is usually stored on a
      RADIUS server <xref target="RFC2865"></xref>. At the time when a user
      initiates an IP connection request, if this request is authorized, the
      RADIUS server will populate the user's configuration information to the
      Network Access Server (NAS), which is often referred to as a Broadband
      Network Gateway (BNG) in broadband access networks. The Carrier-Grade
      NAT (CGN) function may also be implemented on the BNG. Within this
      document, the CGN may perform NAT44 <xref target="RFC3022"></xref>,
      NAT64 <xref target="RFC6146"></xref>, or Dual-Stack Lite AFTR <xref
      target="RFC6333"> </xref> function. In such case, the CGN IP transport
      port (e.g., TCP/UDP port) mapping(s) behavior(s) can be part of the
      configuration information sent from the RADIUS server to the NAS/BNG.
      The NAS/BNG may also report to the RADIUS Server the IP port mapping
      behavior applied by the CGN to a user session to the RADIUS server, as
      part of the accounting information sent from the NAS/BNG to a RADIUS
      server.</t>

      <t>When IP packets traverse the CGN, it performs mapping on the IP
      transport (e.g., TCP/UDP) source port as required. An IP transport
      source port, along with source IP address, destination IP address,
      destination port and protocol identifier if applicable, uniquely
      identify a mapping. Since the number space of IP transport ports in
      CGN's external realm is shared among multiple users assigned with the
      same IPv4 address, the total number of a user's simultaneous IP mappings
      is likely to be subject to port quota (see Section 5 of <xref
      target="RFC6269"></xref>).</t>

      <t>The attributes defined in this document may also be used to report
      the assigned port range in some deployments such as Provider WLAN <xref
      target="I-D.gundavelli-v6ops-community-wifi-svcs"></xref>. For example,
      a visiting host can be managed by a CPE (Customer Premises Equipment )
      which will need to report the assigned port range to the service
      platform. This is required for identification purposes (see TR-146 <xref
      target="TR-146"></xref> for more details).</t>

      <t>This document proposes three new attributes as RADIUS protocol's
      extensions, and they are used for separate purposes as follows:</t>

      <t><list style="numbers">
          <t>IP-Port-Limit-Info: This attribute may be carried in a RADIUS
          Access-Accept, Access-Request, Accounting-Request or CoA-Request
          packet. The purpose of this attribute is to limit the total number
          of IP source transport ports allocated to a user, associated with
          one or more IPv4 or IPv6 addresses.</t>

          <t>IP-Port-Range: This attribute may be carried in a RADIUS
          Accounting-Request packet. The purpose of this attribute is for an
          address sharing device (e.g., a CGN) to report to the RADIUS server
          the range of IP source transport ports that have been allocated or
          deallocated for a user. The port range is bound to an external IPv4
          address.</t>

          <t>IP-Port-Forwarding-Map: This attribute may be carried in RADIUS
          Access-Accept, Access-Request, Accounting-Request or CoA-Request
          packet. The purpose of this attribute is to specify how an IP
          internal source transport port together with its internal IPv4 or
          IPv6 address are mapped to an external source transport port along
          with the external IPv4 address.</t>
        </list></t>

      <t>IPFIX Information Elements <xref target="RFC7012"></xref> can be used
      for IP flow identification and representation over RADIUS. This document
      provides a mapping between some RADIUS TLVs and IPFIX Information
      Element Identifiers. A new IPFIX Information Element is defined by this
      document (see <xref target="TLV2"></xref>).</t>

      <t>IP protocol numbers (refer to <xref target="ProtocolNumbers"></xref>)
      can be used for identification of IP transport protocols (e.g., TCP
      <xref target="RFC0793"></xref>, UDP <xref target="RFC0768"></xref>, DCCP
      <xref target="RFC4340"></xref>, and SCTP <xref target="RFC4960"></xref>)
      that are associated with some RADIUS attributes.</t>

      <t>This document focuses on IPv4 address sharing. IPv6 prefix sharing
      mechanisms (e.g., NPTv6) are out of scope.</t>
    </section>

    <section title="Terminology">
      <t>This document makes use of the following terms:<list style="symbols">
          <t>IP Port: refers to IP transport port (e.g., TCP port number, UDP
          port number).</t>

          <t>IP Port Type: refers to the IP transport protocol as indicated by
          the IP transport protocol number, refer to (refer to <xref
          target="ProtocolNumbers"></xref>)</t>

          <t>IP Port Limit: denotes the maximum number of IP ports for a
          specific (or all) IP transport protocol(s), that a device supporting
          port ranges can use when performing port number mappings for a
          specific user/host. Note, this limit is usually associated with one
          or more IPv4/IPv6 addresses.</t>

          <t>IP Port Range: specifies a set of contiguous IP ports, indicated
          by the lowest numerical number and the highest numerical number,
          inclusively.</t>

          <t>Internal IP Address: refers to the IP address that is used by a
          host as a source IP address in an outbound IP packet sent towards a
          device supporting port ranges in the internal realm. The internal IP
          address may be IPv4 or IPv6.</t>

          <t>External IP Address: refers to the IP address that is used as a
          source IP address in an outbound IP packet after traversing a device
          supporting port ranges in the external realm. This document assumes
          that the external IP address is an IPv4 address.</t>

          <t>Internal Port: is an IP transport port, which is allocated by a
          host or application behind an address sharing device for an outbound
          IP packet in the internal realm.</t>

          <t>External Port: is an IP transport port, which is allocated by an
          address sharing device upon receiving an outbound IP packet in the
          internal realm, and is used to replace the internal port that is
          allocated by a user or application.</t>

          <t>External realm: refers to the networking segment where external
          IP addresses are used as source addresses of outbound packets
          forwarded by an address sharing device.</t>

          <t>Internal realm: refers to the networking segment that is behind
          an address sharing device and where internal IP addresses are
          used.</t>

          <t>Mapping: denotes a relationship between an internal IP address,
          internal port and the protocol, and an external IP address, external
          port, and the protocol.</t>

          <t>Address sharing device: a device that is capable of sharing an
          IPv4 address among multiple users. A typical example of this device
          is a CGN, CPE, Provider WLAN Gateway, etc.</t>
        </list></t>
    </section>

    <section anchor="attrs" title="Extensions of RADIUS Attributes and TLVs">
      <t>These three new attributes are defined in the following
      sub-sections:</t>

      <t><list style="numbers">
          <t>IP-Port-Limit-Info Attribute</t>

          <t>IP-Port-Range Attribute</t>

          <t>IP-Port-Forwarding-Map Attribute</t>
        </list></t>

      <t>All these attributes are allocated from the RADIUS "Extended Type"
      code space per <xref target="RFC6929"></xref>.</t>

      <t>These attributes and their embedded TLVs (refer to <xref
      target="DEFTLVs"></xref>) are defined with globally unique names and
      follow the guideline in Section 2.7.1 of <xref
      target="RFC6929"></xref>.</t>

      <t>In all the figures describing the RADIUS attributes and TLV formats
      in the following sub-sections, the fields are transmitted from left to
      right.</t>

      <section anchor="DEFATT" title="Extended Attributes for IP Ports">
        <section anchor="sessionlimit" title="IP-Port-Limit-Info Attribute">
          <t>This attribute is of type "TLV" as defined in the RADIUS Protocol
          Extensions <xref target="RFC6929"></xref>. It contains some
          sub-attributes and the requirement is as follows: <list
              style="symbols">
              <t>The IP-Port-Limit-Info Attribute MAY contain the IP-Port-Type
              TLV (see <xref target="TLV0"></xref>).</t>

              <t>The IP-Port-Limit-Info Attribute MUST contain the
              IP-Port-Limit TLV (see <xref target="TLV2"></xref>).</t>

              <t>The IP-Port-Limit-Info Attribute MAY contain the
              IP-Port-Ext-IPv4-Addr TLV (see <xref target="TLV3"></xref>).</t>
            </list></t>

          <t>The IP-Port-Limit-Info Attribute specifies the maximum number of
          IP ports as indicated in IP-Port-Limit TLV, of a specific IP
          transport protocol as indicated in IP-Port-Type TLV, and associated
          with a given IPv4 address as indicated in IP-Port-Ext-IPv4-Addr TLV
          for an end user.</t>

          <t>Note that when IP-Port-Type TLV is not included as part of the
          IP-Port-Limit-Info Attribute, the port limit applies to all IP
          transport protocols.</t>

          <t>Note also that when IP-Port-Ext-IPv4-Addr TLV is not included as
          part of the IP-Port-Limit-Info Attribute, the port limit applies to
          all the IPv4 addresses managed by the address sharing device, e.g.,
          a CGN or NAT64 device.</t>

          <t>The IP-Port-Limit-Info Attribute MAY appear in an Access-Accept
          packet. It MAY also appear in an Access-Request packet as a
          preferred maximum number of IP ports indicated by the device
          supporting port ranges co-located with the NAS, e.g., a CGN or
          NAT64.</t>

          <t>The IP-Port-Limit-Info Attribute MAY appear in a CoA-Request
          packet.</t>

          <t>The IP-Port-Limit-Info Attribute MAY appear in an
          Accounting-Request packet.</t>

          <t>The IP-Port-Limit-Info Attribute MUST NOT appear in any other
          RADIUS packet.</t>

          <t>The format of the IP-Port-Limit-Info Attribute is shown in <xref
          target="limit"></xref>.</t>

          <figure anchor="limit">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    | Extended-Type |    Value ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>Type</t>

          <t><list counter="1" hangIndent="5">
              <t>241 (To be confirmed by IANA).</t>
            </list>Length <list counter="1" hangIndent="5">
              <t>This field indicates the total length in bytes of all fields
              of this attribute, including the Type, Length, Extended-Type,
              and the entire length of the embedded TLVs.</t>
            </list></t>

          <t>Extended-Type<list counter="1" hangIndent="5">
              <t>TBD1.</t>
            </list></t>

          <t>Value<list counter="1" hangIndent="5">
              <t>This field contains a set of TLVs as follows:</t>

              <t>IP-Port-Type TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains a value that indicates the IP port
                  type. Refer to <xref target="TLV0"></xref>.</t>
                </list></t>

              <t>IP-Port-Limit TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains the maximum number of IP ports of a
                  specific IP port type and associated with a given IPv4
                  address for an end user. This TLV MUST be included in the
                  IP-Port-Limit-Info Attribute. Refer to <xref
                  target="TLV2"></xref>. This limit applies to all mappings
                  that can be instantiated by an underlying address sharing
                  device without soliciting any external entity. In
                  particular, this limit does not include the ports that are
                  instructed by an AAA server.</t>
                </list></t>

              <t>IP-Port-Ext-IPv4-Addr TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains the IPv4 address that is associated
                  with the IP port limit contained in the IP-Port-Limit TLV.
                  This TLV is optionally included as part of the
                  IP-Port-Limit-Info Attribute. Refer to <xref
                  target="TLV3"></xref>.</t>
                </list></t>
            </list></t>

          <t>IP-Port-Limit-Info Attribute is associated with the following
          identifier: 241.Extended-Type(TBD1).</t>
        </section>

        <section anchor="sessionrange" title="IP-Port-Range Attribute">
          <t>This attribute is of type "TLV" as defined in the RADIUS Protocol
          Extensions <xref target="RFC6929"></xref>. It contains some
          sub-attributes and the requirement is as follows: <list
              style="symbols">
              <t>The IP-Port-Range Attribute MAY contain the IP-Port-Type TLV
              (see <xref target="TLV0"></xref>).</t>

              <t>The IP-Port-Range Attribute MUST contain the IP-Port-Alloc
              TLV (see <xref target="TLV7"></xref>).</t>

              <t>For port allocation, the IP-Port-Range Attribute MUST contain
              both the IP-Port-Range-Start TLV (see <xref
              target="TLV8"></xref>) and the IP-Port-Range-END TLV (see <xref
              target="TLV9"></xref>). For port deallocation, the IP-Port-Range
              Attribute MAY contain both of these two TLVs; if the two TLVs
              are not included, it implies that all ports that were previously
              allocated are now all deallocated.</t>

              <t>The IP-Port-Range Attribute MAY contain the
              IP-Port-Ext-IPv4-Addr TLV (see <xref target="TLV3"></xref>).</t>

              <t>The IP-Port-Range Attribute MAY contain the IP-Port-Local-Id
              TLV (see <xref target="TLV10"></xref>).</t>
            </list></t>

          <t>The IP-Port-Range Attribute contains a range of contiguous IP
          ports. These ports are either to be allocated or deallocated
          depending on the Value carried by the IP-Port-Alloc TLV.</t>

          <t>If the IP-Port-Type TLV is included as part of the IP-Port-Range
          Attribute, the port range is associated with the specific IP
          transport protocol as specified in the IP-Port-Type TLV, but
          otherwise is for all IP transport protocols.</t>

          <t>If the IP-Port-Ext-IPv4-Addr TLV is included as part of the
          IP-Port-Range Attribute, the port range as specified is associated
          with IPv4 address as indicated, but otherwise is for all IPv4
          addresses by the address sharing device (e.g., a CGN device) for the
          end user.</t>

          <t>This attribute can be used to convey a single IP transport port
          number; in such case the Value of the IP-Port-Range-Start TLV and
          the IP-Port-Range-End TLV, respectively, contain the same port
          number.</t>

          <t>The information contained in the IP-Port-Range Attribute is sent
          to RADIUS server.</t>

          <t>The IP-Port-Range Attribute MAY appear in an Accounting-Request
          packet.</t>

          <t>The IP-Port-Range Attribute MUST NOT appear in any other RADIUS
          packet.</t>

          <t>The format of the IP-Port-Range Attribute is shown in <xref
          target="range"></xref>.</t>

          <figure anchor="range">
            <preamble></preamble>

            <artwork><![CDATA[ 
0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    | Extended-Type |    Value ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>

            <postamble></postamble>
          </figure>

          <t>Type</t>

          <t><list counter="1" hangIndent="5">
              <t>241 (To be confirmed by IANA).</t>
            </list>Length <list counter="1" hangIndent="5">
              <t>This field indicates the total length in bytes of all fields
              of this attribute, including the Type, Length, Extended-Type,
              and the entire length of the embedded TLVs.</t>
            </list></t>

          <t>Extended-Type<list counter="1" hangIndent="5">
              <t>TBD2.</t>
            </list></t>

          <t>Value<list counter="1" hangIndent="5">
              <t>This field contains a set of TLVs as follows:</t>

              <t>IP-Port-Type TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains a value that indicates the IP port
                  type. Refer to <xref target="TLV0"></xref>.</t>
                </list></t>

              <t>IP-Port-Alloc TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains a flag to indicate that the range of
                  the specified IP ports for either allocation or
                  deallocation. This TLV MUST be included as part of the
                  IP-Port-Range Attribute. Refer to <xref
                  target="TLV7"></xref>.</t>
                </list></t>

              <t>IP-Port-Range-Start TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains the smallest port number of a range of
                  contiguous IP ports. To report the port allocation, this TLV
                  MUST be included together with IP-Port-Range-End TLV as part
                  of the IP-Port-Range Attribute. Refer to <xref
                  target="TLV8"></xref>.</t>
                </list></t>

              <t>IP-Port-Range-End TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains the largest port number of a range of
                  contiguous IP ports. To report the port allocation, this TLV
                  MUST be included together with IP-Port-Range-Start TLV as
                  part of the IP-Port-Range Attribute. Refer to <xref
                  target="TLV9"></xref>.</t>
                </list></t>

              <t>IP-Port-Ext-IPv4-Addr TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains the IPv4 address that is associated
                  with the IP port range, as collectively indicated in the
                  IP-Port-Range-Start TLV and the IP-Port-Range-End TLV. This
                  TLV is optionally included as part of the IP-Port-Range
                  Attribute. Refer to <xref target="TLV3"></xref>.</t>
                </list></t>

              <t>IP-Port-Local-Id TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains a local session identifier at the
                  customer premise, such as MAC address, interface ID, VLAN
                  ID, PPP sessions ID, VRF ID, IP address/prefix, etc. This
                  TLV is optionally included as part of the IP-Port-Range
                  Attribute. Refer to <xref target="TLV10"></xref>.</t>
                </list></t>
            </list></t>

          <t>The IP-Port-Range attribute is associated with the following
          identifier: 241.Extended-Type(TBD2).</t>
        </section>

        <section anchor="portmap" title="IP-Port-Forwarding-Map  Attribute">
          <t>This attribute is of type "TLV" as defined in the RADIUS Protocol
          Extensions <xref target="RFC6929"></xref>. It contains some
          sub-attributes and the requirement is as follows: <list
              style="symbols">
              <t>The IP-Port-Forwarding-Map Attribute MAY contain the
              IP-Port-Type TLV (see <xref target="TLV0"></xref>).</t>

              <t>The IP-Port-Forwarding-Map Attribute MUST contain both
              IP-Port-Int-Port TLV (see <xref target="TLV5"></xref>) and the
              IP-Port-Ext-Port TLV (see <xref target="TLV6"></xref>).</t>

              <t>If the internal realm is with IPv4 address family, the
              IP-Port-Forwarding-Map Attribute MUST contain the
              IP-Port-Int-IPv4-Addr TLV (see <xref target="TLV4"></xref>); if
              the internal realm is with IPv6 address family, the
              IP-Port-Forwarding-Map Attribute MUST contain the
              IP-Port-Int-IPv6-Addr TLV (see <xref
              target="TLV46"></xref>).</t>

              <t>The IP-Port-Forwarding-Map Attribute MAY contain the
              IP-Port-Ext-IPv4-Addr TLV (see <xref target="TLV3"></xref>).</t>

              <t>The IP-Port-Forwarding-Map Attribute MAY contain the
              IP-Port-Local-Id TLV (see <xref target="TLV10"></xref>).</t>
            </list></t>

          <t>The attribute contains a 2-byte IP internal port number and a
          2-byte IP external port number. The internal port number is
          associated with an internal IPv4 or IPv6 address that MUST always be
          included. The external port number is associated with a specific
          external IPv4 address if included, but otherwise with all external
          IPv4 addresses for the end user.</t>

          <t>If the IP-Port-Type TLV is included as part of the
          IP-Port-Forwarding-Map Attribute, the port mapping is associated
          with the specific IP transport protocol as specified in the
          IP-Port-Type TLV, but otherwise is for all IP transport
          protocols.</t>

          <t>The IP-Port-Forwarding-Map Attribute MAY appear in an
          Access-Accept packet. It MAY also appear in an Access-Request packet
          to indicate a preferred port mapping by the device co-located with
          NAS. However the server is not required to honor such a
          preference.</t>

          <t>The IP-Port-Forwarding-Map Attribute MAY appear in a CoA-Request
          packet.</t>

          <t>The IP-Port-Forwarding-Map Attribute MAY also appear in an
          Accounting-Request packet.</t>

          <t>The IP-Port-Forwarding-Map Attribute MUST NOT appear in any other
          RADIUS packet.</t>

          <t>The format of the IP-Port-Forwarding-Map Attribute is shown in
          <xref target="map"></xref>.</t>

          <figure anchor="map">
            <preamble></preamble>

            <artwork><![CDATA[         
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Type     |     Length    | Extended-Type |    Value ....
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>

            <postamble></postamble>
          </figure>

          <t>Type</t>

          <t><list counter="1" hangIndent="5">
              <t>241 (To be confirmed by IANA).</t>
            </list>Length <list counter="1" hangIndent="5">
              <t>This field indicates the total length in bytes of all fields
              of this attribute, including the Type, Length, Extended-Type,
              and the entire length of the embedded TLVs.</t>
            </list></t>

          <t>Extended-Type<list counter="1" hangIndent="5">
              <t>TBD3.</t>
            </list></t>

          <t>Value<list counter="1" hangIndent="5">
              <t>This field contains a set of TLVs as follows:</t>

              <t>IP-Port-Type TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains a value that indicates the IP port
                  type. Refer to <xref target="TLV0"></xref>.</t>
                </list></t>

              <t>IP-Port-Int-Port TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains an internal IP port number associated
                  with an internal IPv4 or IPv6 address. This TLV MUST be
                  included together with IP-Port-Ext-Port TLV as part of the
                  IP-Port-Forwarding-Map attribute. Refer to <xref
                  target="TLV5"></xref>.</t>
                </list></t>

              <t>IP-Port-Ext-Port TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains an external IP port number associated
                  with an external IPv4 address. This TLV MUST be included
                  together with IP-Port-Int-Port TLV as part of the
                  IP-Port-Forwarding-Map attribute. Refer to <xref
                  target="TLV6"></xref>.</t>
                </list></t>

              <t>IP-Port-Int-IPv4-Addr TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains an IPv4 address that is associated with
                  the internal IP port number contained in the
                  IP-Port-Int-Port TLV. For internal realm with IPv4 address
                  family, this TLV MUST be included as part of the
                  IP-Port-Forwarding-Map Attribute. Refer to <xref
                  target="TLV4"></xref>.</t>
                </list></t>

              <t>IP-Port-Int-IPv6-Addr TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains an IPv6 address that is associated with
                  the internal IP port number contained in the
                  IP-Port-Int-Port TLV. For internal realm with IPv6 address
                  family, this TLV MUST be included as part of the
                  IP-Port-Forwarding-Map Attribute. Refer to <xref
                  target="TLV46"></xref>.</t>
                </list></t>

              <t>IP-Port-Ext-IPv4-Addr TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains an IPv4 address that is associated with
                  the external IP port number contained in the
                  IP-Port-Ext-Port TLV. This TLV MAY be included as part of
                  the IP-Port-Forwarding-Map Attribute. Refer to <xref
                  target="TLV3"></xref>.</t>
                </list></t>

              <t>IP-Port-Local-Id TLV<list counter="1" hangIndent="5">
                  <t>This TLV contains a local session identifier at the
                  customer premise, such as MAC address, interface ID, VLAN
                  ID, PPP sessions ID, VRF ID, IP address/prefix, etc. This
                  TLV is optionally included as part of the
                  IP-Port-Forwarding-Map Attribute. Refer to <xref
                  target="TLV10"></xref>.</t>
                </list></t>
            </list></t>

          <t>The IP-Port-Forwarding-Map Attribute is associated with the
          following identifier: 241.Extended-Type(TBD3).</t>
        </section>
      </section>

      <section anchor="DEFTLVs" title="RADIUS TLVs for IP Ports">
        <t>The TLVs that are included in the three attributes (see <xref
        target="DEFATT"></xref>) are defined in the following sub-sections.
        These TLVs use the format defined in <xref target="RFC6929"></xref>.
        As the three attributes carry similar data, we have defined a common
        set of TLVs which are used for all three attributes. That is, the TLVs
        have the same name and number, when encapsulated in any one of the
        three parent attributes. See <xref target="sessionlimit"></xref>,
        <xref target="sessionrange"></xref>, and <xref
        target="portmap"></xref> for a list of which TLV is permitted within
        which parent attribute.</t>

        <t>The encoding of the Value field of these TLVs follows the
        recommendation of <xref target="RFC6158"></xref>. 
        In particular,
        IP-Port-Type, IP-Port-Limit, IP-Port-Int-Port,
        IP-Port-Ext-Port, IP-Port-Alloc, IP-Port-Range-Start, and
        IP-Port-Range-End TLVs are encoded in 32 bits as per the
        recommendation in Appendix A.2.1 of <xref
        target="RFC6158"></xref>.</t>

        <section anchor="TLV0" title="IP-Port-Type TLV">
          <t>The format of IP-Port-Type TLV is shown in <xref
          target="tlv0"></xref>. This attribute carries the IP transport
          protocol number defined by IANA (refer to <xref
          target="ProtocolNumbers"></xref>)</t>

          <figure anchor="tlv0">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   TLV-Type    |     Length    |        Protocol-Number          
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        Protocol-Number         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>1</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>Protocol-Number<list counter="1" hangIndent="5">
              <t>Integer. This field contains the data (unsigned8) of the
              protocol number defined in <xref
              target="ProtocolNumbers"></xref>, right justified, and the
              unused bits in this field MUST be set to zero. Protocols that do
              not use a port number (e.g., Resource Reservation Protocol
              (RSVP), IP Encapsulating Security Payload (ESP)) MUST NOT be
              included in the IP-Port-Type TLV.</t>
            </list></t>

          <t>IP-Port-Type TLV MAY be included in the following
          Attributes:<list style="symbols">
              <t>IP-Port-Limit-Info Attribute, identified as 241.TBD1.1 (see
              Section 3.1.1).</t>

              <t>IP-Port-Range Attribute, identified as 241.TBD2.1 (see
              Section 3.1.2).</t>

              <t>IP-Port-Forwarding-Map Attribute, identified as 241.TBD3.1
              (see Section 3.1.3).</t>
            </list></t>

          <t>When the IP-Port-Type TLV is included within a RADIUS Attribute,
          the associated attribute is applied to the IP transport protocol as
          indicated by the Protocol-Number only, such as TCP, UDP, SCTP, DCCP,
          etc.</t>
        </section>

        <section anchor="TLV2" title="IP-Port-Limit TLV">
          <t>The format of IP-Port-Limit TLV is shown in <xref
          target="tlv"></xref>. This attribute carries IPFIX Information
          Element "sourceTransportPortsLimit (TBAx1), which indicates the
          maximum number of IP transport ports as a limit for an end user to
          use that is associated with one or more IPv4 or IPv6 addresses.</t>

          <figure anchor="tlv">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   TLV-Type    |     Length    |    sourceTransportPortsLimit       
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     sourceTransportPortsLimit  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>2</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>sourceTransportPortsLimit<list counter="1" hangIndent="5">
              <t>Integer. This field contains the data (unsigned16) of
              sourceTransportPortsLimit (TBAx1) defined in IPFIX, right
              justified, and the unused bits in this field MUST be set to
              zero.</t>
            </list></t>

          <t>IP-Port-Limit TLV MUST be included as part of the
          IP-Port-Limit-Info Attribute (refer to Section 3.1.1), identified as
          241.TBD1.2.</t>
        </section>

        <section anchor="TLV3" title="IP-Port-Ext-IPv4-Addr TLV">
          <t>The format of IP-Port-Ext-IPv4-Addr TLV is shown in <xref
          target="tlv3"></xref>. This attribute carries IPFIX Information
          Element 225, "postNATSourceIPv4Address", which is the IPv4 source
          address after NAT operation (refer to <xref
          target="IPFIX"></xref>).</t>

          <figure anchor="tlv3">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   TLV-Type    |    Length     |    postNATSourceIPv4Address   
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     postNATSourceIPv4Address   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>3</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>postNATSourceIPv4Address<list counter="1" hangIndent="5">
              <t>Integer. This field contains the data (ipv4Address) of
              postNATSourceIPv4Address (225) defined in IPFIX.</t>
            </list></t>

          <t>IP-Port-Ext-IPv4-Addr TLV MAY be included in the following
          Attributes:<list style="symbols">
              <t>IP-Port-Limit-Info Attribute, identified as 241.TBD1.3 (see
              Section 3.1.1).</t>

              <t>IP-Port-Range Attribute, identified as 241.TBD2.3 (see
              Section 3.1.2).</t>

              <t>IP-Port-Forwarding-Mapping Attribute, identified as
              241.TBD3.3 (see Section 3.1.3).</t>
            </list></t>
        </section>

        <section anchor="TLV4" title="IP-Port-Int-IPv4-Addr TLV">
          <t>The format of IP-Port-Int-IPv4 TLV is shown in <xref
          target="tlv4"></xref>. This attribute carries IPFIX Information
          Element 8, "sourceIPv4Address", which is the IPv4 source address
          before NAT operation (refer to <xref target="IPFIX"></xref>).</t>

          <figure anchor="tlv4">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   TLV-Type    |     Length    |       sourceIPv4Address       
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      sourceIPv4Address         |
+-+--+-+-+-+-+-+-++-+-+-+-+-+-+-+
      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>4</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>sourceIPv4Address <list counter="1" hangIndent="5">
              <t>Integer. This field contains the data (ipv4Address) of
              sourceIPv4Address (8) defined in IPFIX.</t>
            </list></t>

          <t>If the internal realm is with IPv4 address family, the
          IP-Port-Int-IPv4-Addr TLV MUST be included as part of the
          IP-Port-Forwarding-Map Attribute (refer to <xref
          target="portmap"></xref>), identified as 241.TBD3.4.</t>
        </section>

        <section anchor="TLV46" title="IP-Port-Int-IPv6-Addr TLV">
          <t>The format of IP-Port-Int-IPv6-Addr TLV is shown in <xref
          target="tlv46"></xref>. This attribute carries IPFIX Information
          Element 27, "sourceIPv6Address", which is the IPv6 source address
          before NAT operation (refer to <xref target="IPFIX"></xref>).</t>

          <figure anchor="tlv46">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   TLV-Type    |     Length    |        sourceIPv6Address      
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                          sourceIPv6Address                     
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                          sourceIPv6Address                     
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                          sourceIPv6Address                     
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        sourceIPv6Address       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>5</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>18</t>
            </list></t>

          <t>sourceIPv6Address<list counter="1" hangIndent="5">
              <t>IPv6 address (128 bits). This field contains the data
              (ipv6Address) of sourceIPv6Address (27) defined in IPFIX.</t>
            </list></t>

          <t>If the internal realm is with IPv6 address family, the
          IP-Port-Int-IPv6-Addr TLV MUST be included as part of the
          IP-Port-Forwarding-Map Attribute (refer to <xref
          target="portmap"></xref>), identified as 241.TBD3.5.</t>
        </section>

        <section anchor="TLV5" title="IP-Port-Int-Port TLV">
          <t>The format of IP-Port-Int-Port TLV is shown in <xref
          target="tlv5"></xref>. This attribute carries IPFIX Information
          Element 7, "sourceTransportPort", which is the source transport
          number associated with an internal IPv4 or IPv6 address (refer to
          <xref target="IPFIX"></xref>).</t>

          <figure anchor="tlv5">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TLV-Type   |     Length    |      sourceTransportPort      
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        sourceTransportPort     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>sourceTransportPort<list counter="1" hangIndent="5">
              <t>Integer. This field contains the data (unsigned16) of
              sourceTrasnportPort (7) defined in IPFIX, right justified, and
              unused bits MUST be set to zero.</t>
            </list></t>

          <t>IP-Port-Int-Port TLV MUST be included as part of the
          IP-Port-Forwarding-Map Attribute (refer to <xref
          target="portmap"></xref>), identified as 241.TBD3.6.</t>
        </section>

        <section anchor="TLV6" title="IP-Port-Ext-Port TLV">
          <t>The format of IP-Port-Ext-Port TLV is shown in <xref
          target="tlv6"></xref>. This attribute carries IPFIX Information
          Element 227, "postNAPTSourceTransportPort", which is the transport
          number associated with an external IPv4 address(refer to <xref
          target="IPFIX"></xref>).</t>

          <figure anchor="tlv6">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TLV-Type   |     Length    |  postNAPTSourceTransportPort  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   postNAPTSourceTransportPort  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>7</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>postNAPTSourceTransportPort<list counter="1" hangIndent="5">
              <t>Integer. This field contains the data (unsigned16) of
              postNAPTSourceTrasnportPort (227) defined in IPFIX, right
              justified, and unused bits MUST be set to zero.</t>
            </list></t>

          <t>IP-Port-Ext-Port TLV MUST be included as part of the
          IP-Port-Forwarding-Map Attribute (refer to <xref
          target="portmap"></xref>), identified as 241.TBD3.7.</t>
        </section>

        <section anchor="TLV7" title="IP-Port-Alloc TLV">
          <t>The format of IP-Port-Alloc TLV is shown in <xref
          target="tlv7"></xref>. This attribute carries IPFIX Information
          Element 230, "natEvent", which is a flag to indicate an action of
          NAT operation (refer to <xref target="IPFIX"></xref>).</t>

          <t>When the value of natEvent is "1" (Create event), it means to
          allocate a range of transport ports; when the value is "2", it means
          to deallocate a range of transports ports. For the purpose of this
          TLV, no other value is used.</t>

          <figure anchor="tlv7">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TLV-Type   |     Length    |            natEvent              
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            natEvent            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>8</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>natEvent<list counter="1" hangIndent="5">
              <t>Integer. This field contains the data (unsigned8) of natEvent
              (230) defined in IPFIX, right justified, and unused bits MUST be
              set to zero. It indicates the allocation or deallocation of a
              range of IP ports as follows:</t>

              <t>1:<list counter="1" hangIndent="5">
                  <t>Allocation</t>
                </list></t>

              <t>2:<list counter="1" hangIndent="5">
                  <t>Deallocation</t>
                </list></t>
            </list></t>

          <t>Reserved:<list counter="1" hangIndent="5">
              <t>0.</t>
            </list></t>

          <t>IP-Port-Alloc TLV MUST be included as part of the IP-Port-Range
          Attribute (refer to <xref target="sessionrange"></xref>), identified
          as 241.TBD2.8.</t>
        </section>

        <section anchor="TLV8" title="IP-Port-Range-Start TLV">
          <t>The format of IP-Port-Range-Start TLV is shown in <xref
          target="tlv8"></xref>. This attribute carries IPFIX Information
          Element 361, "portRangeStart", which is the smallest port number of
          a range of contiguous transport ports (refer to <xref
          target="IPFIX"></xref>).</t>

          <figure anchor="tlv8">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TLV-Type   |     Length    |         portRangeStart        
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          portRangeStart        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>9</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>portRangeStart<list counter="1" hangIndent="5">
              <t>Integer. This field contains the data (unsigned16) of (361)
              defined in IPFIX, right justified, and unused bits MUST be set
              to zero.</t>
            </list></t>

          <t>IP-Port-Range-Start TLV is included as part of the IP-Port-Range
          Attribute (refer to <xref target="sessionrange"></xref>), identified
          as 241.TBD2.9.</t>
        </section>

        <section anchor="TLV9" title="IP-Port-Range-End TLV">
          <t>The format of IP-Port-Range-End TLV is shown in <xref
          target="tlv9"></xref>. This attribute carries IPFIX Information
          Element 362, "portRangeEnd", which is the largest port number of a
          range of contiguous transport ports (refer to <xref
          target="IPFIX"></xref>).</t>

          <figure anchor="tlv9">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TLV-Type   |     Length    |          portRangeEnd         
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           portRangeEnd         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>10</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>6</t>
            </list></t>

          <t>portRangeEnd<list counter="1" hangIndent="5">
              <t>Integer. This field contains the data (unsigned16) of (362)
              defined in IPFIX, right justified, and unused bits MUST be set
              to zero.</t>
            </list></t>

          <t>IP-Port-Range-End TLV is included as part of the IP-Port-Range
          Attribute (refer to <xref target="sessionrange"></xref>), identified
          as 241.TBD2.10.</t>
        </section>

        <section anchor="TLV10" title="IP-Port-Local-Id TLV">
          <t>The format of IP-Port-Local-Id TLV is shown in <xref
          target="tlv10"></xref>. This attribute carries a string called
          "localID", which is a local significant identifier as explained
          below.</t>

          <t>The primary issue addressed by this TLV is that there are CGN
          deployments that do not distinguish internal hosts by their internal
          IP address alone, but use further identifiers for unique subscriber
          identification. For example, this is the case if a CGN supports
          overlapping private or shared IP address spaces (refer to <xref
          target="RFC1918"></xref> and <xref target="RFC6598"></xref>) for
          internal hosts of different subscribers. In such cases, different
          internal hosts are identified and mapped at the CGN by their IP
          address and/or another identifier, for example, the identifier of a
          tunnel between the CGN and the subscriber. In these scenarios (and
          similar ones), the internal IP address is not sufficient to
          demultiplex connections from internal hosts. An additional
          identifier needs to be present in the IP-Port-Range Attribute and
          IP-Port-Forwarding-Mapping Attribute in order to uniquely identify
          an internal host. The IP-Port-Local-Id TLV is used to carry this
          identifier.</t>

          <figure anchor="tlv10">
            <preamble></preamble>

            <artwork><![CDATA[    
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TLV-Type   |     Length    |        localID .... 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      ]]></artwork>

            <postamble></postamble>
          </figure>

          <t>TLV-Type<list counter="1" hangIndent="5">
              <t>11</t>
            </list></t>

          <t>Length<list counter="1" hangIndent="5">
              <t>Variable number of bytes.</t>
            </list></t>

          <t>localID<list counter="1" hangIndent="5">
              <t>string. The data type of this field is string (refer to <xref
              target="I-D.ietf-radext-datatypes"></xref>). This field contains
              the data that is a local session identifier at the customer
              premise, such as MAC address, interface ID, VLAN ID, PPP
              sessions ID, VRF ID, IP address/prefix, etc.</t>
            </list></t>

          <t>IP-Port-Local-Id TLV MAY be included in the following
          Attributes:<list style="symbols">
              <t>IP-Port-Range Attribute, identified as 241.TBD2.11 (see
              Section 3.1.2).</t>

              <t>IP-Port-Forwarding-Mapping Attribute, identified as
              241.TBD3.11 (see Section 3.1.3).</t>
            </list></t>
        </section>
      </section>
    </section>

    <section title="Applications, Use Cases and Examples">
      <t>This section describes some applications and use cases to illustrate
      the use of the attributes proposed in this document.</t>

      <section title="Managing CGN Port Behavior using RADIUS">
        <t>In a broadband network, customer information is usually stored on a
        RADIUS server, and the BNG acts as a NAS. The communication between
        the NAS and the RADIUS server is triggered by a user when it signs in
        to the Internet service, where either PPP or DHCP/DHCPv6 is used. When
        a user signs in, the NAS sends a RADIUS Access-Request message to the
        RADIUS server. The RADIUS server validates the request, and if the
        validation succeeds, it in turn sends back a RADIUS Access-Accept
        message. The Access-Accept message carries configuration information
        specific to that user, back to the NAS, where some of the information
        would pass on to the requesting user via PPP or DHCP/DHCPv6.</t>

        <t>A CGN function in a broadband network is most likely be co-located
        on a BNG. In that case, parameters for CGN port mapping behavior for
        users can be configured on the RADIUS server. When a user signs in to
        the Internet service, the associated parameters can be conveyed to the
        NAS, and proper configuration is accomplished on the CGN device for
        that user.</t>

        <t>Also, CGN operation status such as CGN port allocation and
        deallocation for a specific user on the BNG can also be transmitted
        back to the RADIUS server for accounting purpose using the RADIUS
        protocol.</t>

        <t>RADIUS protocol has already been widely deployed in broadband
        networks to manage BNG, thus the functionality described in this
        specification introduces little overhead to the existing network
        operation.</t>

        <t>In the following sub-sections, we describe how to manage CGN
        behavior using RADIUS protocol, with required RADIUS extensions
        proposed in <xref target="attrs"></xref>.</t>

        <section title="Configure IP Port Limit for a User">
          <t>In the face of IPv4 address shortage, there are currently
          proposals to multiplex multiple users' connections over a number of
          shared IPv4 addresses, such as Carrier Grade NAT <xref
          target="RFC6888"></xref>, Dual-Stack Lite <xref
          target="RFC6333"></xref>, NAT64 <xref target="RFC6146"></xref>, etc.
          As a result, a single IPv4 public address may be shared by hundreds
          or even thousands of users. As indicated in <xref
          target="RFC6269"></xref>, it is therefore necessary to impose limits
          on the total number of ports available to an individual user to
          ensure that the shared resource, i.e., the IPv4 address, remains
          available in some capacity to all the users using it. The support of
          IP port limit is also documented in <xref target="RFC6888"></xref>
          as a requirement for CGN.</t>

          <t>The IP port limit imposed to an end user may be on the total
          number of IP source transport ports, or a specific IP transport
          protocol as defined in <xref target="sessionlimit"></xref>.</t>

          <t>The per-user based IP port limit is configured on a RADIUS
          server, along with other user information such as credentials.</t>

          <t>When a user signs in to the Internet service successfully, the IP
          port limit for the subscriber is passed by the RADIUS server to the
          BNG, acting as a NAS and co-located with the CGN, using the
          IP-Port-Limit-Info RADIUS attribute (defined in <xref
          target="sessionlimit"></xref>), along with other configuration
          parameters. While some parameters are passed to the user, the IP
          port limit is recorded on the CGN device for imposing the usage of
          IP transport ports for that user.</t>

          <t><xref target="fig1"></xref> illustrates how RADIUS protocol is
          used to configure the maximum number of TCP/UDP ports for a given
          user on a CGN device.</t>

          <t><figure anchor="fig1" height=""
              title="RADIUS Message Flow for Configuring CGN Port Limit">
              <artwork><![CDATA[   
User                     CGN/NAS                        AAA
 |                         BNG                         Server
 |                          |                             |
 |                          |                             |
 |----Service Request------>|                             |
 |                          |                             |
 |                          |-----Access-Request -------->|
 |                          |                             |
 |                          |<----Access-Accept-----------|
 |                          |     (IP-Port-Limit-Info)    |
 |                          |     (for TCP/UDP ports)     |
 |<---Service Granted ------|                             |
 |    (other parameters)    |                             |
 |                          |                             |
 |                  (CGN external port                    |
 |                   allocation and                       |
 |                   IPv4 address assignment)             |
 |                          |                             |
]]></artwork>
            </figure></t>

          <t>The IP port limit created on a CGN device for a specific user
          using RADIUS extension may be changed using RADIUS CoA message <xref
          target="RFC5176"></xref> that carries the same RADIUS attribute. The
          CoA message may be sent from the RADIUS server directly to the NAS,
          which once accepts and sends back a RADIUS CoA ACK message, the new
          IP port limit replaces the previous one.</t>

          <t><xref target="fig2"></xref> illustrates how RADIUS protocol is
          used to increase the TCP/UDP port limit from 1024 to 2048 on a CGN
          device for a specific user.</t>

          <t><figure anchor="fig2" height=""
              title="RADIUS Message Flow for changing a user's CGN port limit">
              <artwork><![CDATA[     
  
User                     CGN/NAS                           AAA
 |                         BNG                            Server
 |                          |                               |
 |              TCP/UDP Port Limit (1024)                   |
 |                          |                               |
 |                          |<---------CoA Request----------|
 |                          |       (IP-Port-Limit-Info)    |
 |                          |       (for TCP/UDP ports)     |
 |                          |                               |
 |              TCP/UDP Port Limit (2048)                   |
 |                          |                               |
 |                          |---------CoA Response--------->|
 |                          |                               |
]]></artwork>
            </figure></t>
        </section>

        <section title="Report IP Port Allocation/Deallocation">
          <t>Upon obtaining the IP port limit for a user, the CGN device needs
          to allocate an IP transport port for the user when receiving a new
          IP flow sent from that user.</t>

          <t>As one practice, a CGN may allocate a block of IP ports for a
          specific user, instead of one port at a time, and within each port
          block, the ports may be randomly distributed or in consecutive
          fashion. When a CGN device allocates a block of transport ports, the
          information can be easily conveyed to the RADIUS server by a new
          RADIUS attribute called the IP-Port-Range (defined in <xref
          target="sessionrange"></xref>). The CGN device may allocate one or
          more IP port ranges, where each range contains a set of numbers
          representing IP transport ports, and the total number of ports MUST
          be less or equal to the associated IP port limit imposed for that
          user. A CGN device may choose to allocate a small port range, and
          allocate more at a later time as needed; such practice is good
          because its randomization in nature.</t>

          <t>At the same time, the CGN device also needs to decide the shared
          IPv4 address for that user. The shared IPv4 address and the
          pre-allocated IP port range are both passed to the RADIUS
          server.</t>

          <t>When a user initiates an IP flow, the CGN device randomly selects
          a transport port number from the associated and pre-allocated IP
          port range for that user to replace the original source port number,
          along with the replacement of the source IP address by the shared
          IPv4 address.</t>

          <t>A CGN device may decide to "free" a previously assigned set of IP
          ports that have been allocated for a specific user but not currently
          in use, and with that, the CGN device must send the information of
          the deallocated IP port range along with the shared IPv4 address to
          the RADIUS server.</t>

          <t><xref target="fig3"></xref> illustrates how RADIUS protocol is
          used to report a set of ports allocated and deallocated,
          respectively, by a NAT64 device for a specific user to the RADIUS
          server. 2001:db8:100:200::/56 is the IPv6 prefix allocated to this
          user. In order to limit the usage of the NAT64 resources on a
          per-user basis for fairness of resource usage (see REQ-4 of <xref
          target="RFC6888"></xref>), port range allocations are bound to the
          /56 prefix, not to the source IPv6 address of the request. The NAT64
          devices is configured with the per-user port limit policy by some
          means (e.g., subscriber-mask <xref target="RFC7785"></xref>).</t>

          <t><figure anchor="fig3" height=""
              title="RADIUS Message Flow for reporting NAT64 allocation/deallocation of a port set">
              <artwork><![CDATA[
Host                      NAT64/NAS                     AAA
 |                         BNG                         Server
 |                          |                             |
 |                          |                             |
 |----Service Request------>|                             |
 |                          |                             |
 |                          |-----Access-Request -------->|
 |                          |                             |
 |                          |<----Access-Accept-----------|                            
 |<---Service Granted ------|                             |
 |    (other parameters)    |                             |
...                        ...                           ...
 |                          |                             |
 |                          |                             |
 |                (NAT64 decides to allocate              |
 |                 a TCP/UDP port range for the user)     |
 |                          |                             |
 |                          |-----Accounting-Request----->|
 |                          |    (IP-Port-Range           |
 |                          |     for allocation)         |
...                        ...                           ...
 |                          |                             |
 |                (NAT64 decides to deallocate            |
 |                 a TCP/UDP port range for the user)     |
 |                          |                             |      
 |                          |-----Accounting-Request----->|
 |                          |    (IP-Port-Range           |
 |                          |     for deallocation)       |
 |                          |                             |
]]></artwork>
            </figure></t>

          <t></t>
        </section>

        <section title="Configure Forwarding Port Mapping">
          <t>In most scenarios, the port mapping on a NAT device is
          dynamically created when the IP packets of an IP connection
          initiated by a user arrives. For some applications, the port mapping
          needs to be pre-defined allowing IP packets of applications from
          outside a CGN device to pass through and "port forwarded" to the
          correct user located behind the CGN device.</t>

          <t>Port Control Protocol <xref target="RFC6887"> </xref>, provides a
          mechanism to create a mapping from an external IP address and port
          to an internal IP address and port on a CGN device just to achieve
          the "port forwarding" purpose. PCP is a server-client protocol
          capable of creating or deleting a mapping along with a rich set of
          features on a CGN device in dynamic fashion. In some deployment, all
          users need is a few, typically just one pre-configured port mapping
          for applications such as web cam at home, and the lifetime of such a
          port mapping remains valid throughout the duration of the customer's
          Internet service connection time. In such an environment, it is
          possible to statically configure a port mapping on the RADIUS server
          for a user and let the RADIUS protocol to propagate the information
          to the associated CGN device.</t>

          <t>Note that this document targets deployments where a AAA server is
          responsible de instructing NAT mappings for a given subscriber and
          does not make any assumption about the host's capabilities with
          regards to port forwarding control. This deployment is complementary
          to PCP given that PCP targets a different deployment model where an
          application (on the host) controls its mappings in an upstream CPE,
          CGN, firewall, etc.</t>

          <t><xref target="fig4"></xref> illustrates how RADIUS protocol is
          used to configure a forwarding port mapping on a NAT44 device by
          using RADIUS protocol.</t>

          <t><figure anchor="fig4" height=""
              title="RADIUS Message Flow for configuring a forwarding port mapping">
              <artwork><![CDATA[Host                     CGN/NAS                           AAA
 |                         BNG                            Server
 |                          |                               |
 |----Service Request------>|                               |
 |                          |                               |
 |                          |---------Access-Request------->|
 |                          |                               |
 |                          |<--------Access-Accept---------|
 |                          |   (IP-Port-Forwarding-Map)    |
 |<---Service Granted ------|                               |
 |    (other parameters)    |                               |
 |                          |                               |
 |                 (Create a port mapping                   |
 |                  for the user, and                       |
 |                  associate it with the                   |
 |                  internal IP address                     |
 |                  and external IP address)                |
 |                          |                               |
 |                          |                               |
 |                          |------Accounting-Request------>|
 |                          |    (IP-Port-Forwarding-Map)   |
]]></artwork>
            </figure></t>

          <t>A port forwarding mapping that is created on a CGN device using
          RADIUS extension as described above may also be changed using RADIUS
          CoA message <xref target="RFC5176"></xref> that carries the same
          RADIUS association. The CoA message may be sent from the RADIUS
          server directly to the NAS, which once accepts and sends back a
          RADIUS CoA ACK message, the new port forwarding mapping then
          replaces the previous one.</t>

          <t><xref target="fig5"></xref> illustrates how RADIUS protocol is
          used to change an existing port mapping from (a:X) to (a:Y), where
          "a" is an internal port, and "X" and "Y" are external ports,
          respectively, for a specific user with a specific IP address</t>

          <t><figure anchor="fig5" height=""
              title="RADIUS Message Flow for changing a user's forwarding port mapping">
              <artwork><![CDATA[Host                     CGN/NAS                           AAA
 |                         BNG                            Server
 |                          |                               |
 |                    Internal IP Address                   |
 |                    Port Map (a:X)                        |
 |                          |                               |
 |                          |<---------CoA Request----------|
 |                          |    (IP-Port-Forwarding-Map)   |
 |                          |                               |
 |                    Internal IP Address                   |
 |                    Port Map (a:Y)                        |
 |                          |                               |
 |                          |---------CoA Response--------->|
 |                          |    (IP-Port-Forwarding-Map)   |
]]></artwork>
            </figure></t>
        </section>

        <section title="An Example">
          <t>An Internet Service Provider (ISP) assigns TCP/UDP 500 ports for
          the user Joe. This number is the limit that can be used for TCP/UDP
          ports on a CGN device for Joe, and is configured on a RADIUS server.
          Also, Joe asks for a pre-defined port forwarding mapping on the CGN
          device for his web cam applications (external port 5000 maps to
          internal port 1234).</t>

          <t>When Joe successfully connects to the Internet service, the
          RADIUS server conveys the TCP/UDP port limit (500) and the
          forwarding port mapping (external port 5000 to internal port 1234)
          to the CGN device, using IP-Port-Limit-Info Attribute and
          IP-Port-Forwarding-Map attribute, respectively, carried by an
          Access-Accept message to the BNG where NAS and CGN co-located.</t>

          <t>Upon receiving the first outbound IP packet sent from Joe's
          laptop, the CGN device decides to allocate a small port pool that
          contains 40 consecutive ports, from 3500 to 3540, inclusively, and
          also assign a shared IPv4 address 192.0.2.15, for Joe. The CGN
          device also randomly selects one port from the allocated range (say
          3519) and use that port to replace the original source port in
          outbound IP packets.</t>

          <t>For accounting purpose, the CGN device passes this port range
          (3500-3540) and the shared IPv4 address 192.0.2.15 together to the
          RADIUS server using IP-Port-Range attribute carried by an
          Accounting-Request message.</t>

          <t>When Joe works on more applications with more outbound IP
          mappings and the port pool (3500-3540) is close to exhaust, the CGN
          device allocates a second port pool (8500-8800) in a similar
          fashion, and also passes the new port range (8500-8800) and IPv4
          address 192.0.2.15 together to the RADIUS server using IP-Port-Range
          attribute carried by an Accounting-Request message. Note when the
          CGN allocates more ports, it needs to assure that the total number
          of ports allocated for Joe is within the limit.</t>

          <t>Joe decides to upgrade his service agreement with more TCP/UDP
          ports allowed (up to 1000 ports). The ISP updates the information in
          Joe's profile on the RADIUS server, which then sends a CoA-Request
          message that carries the IP-Port-Limit-Info Attribute with 1000
          ports to the CGN device; the CGN device in turn sends back a CoA-ACK
          message. With that, Joe enjoys more available TCP/UDP ports for his
          applications.</t>

          <t>When Joe is not using his service, most of the IP mappings are
          closed with their associated TCP/UDP ports released on the CGN
          device, which then sends the relevant information back to the RADIUS
          server using IP-Port-Range attribute carried by Accounting-Request
          message.</t>

          <t>Throughout Joe's connection with his ISP Internet service,
          applications can communicate with his web cam at home from external
          realm directly traversing the pre-configured mapping on the CGN
          device.</t>

          <t>When Joe disconnects from his Internet service, the CGN device
          will deallocate all TCP/UDP ports as well as the port-forwarding
          mapping, and send the relevant information to the RADIUS server.</t>
        </section>
      </section>

      <section title="Report Assigned Port Set for a Visiting UE">
        <t><xref target="wifi"></xref> illustrates an example of the flow
        exchange which occurs when a visiting User Equipment (UE) connects to
        a CPE offering WLAN service.</t>

        <t>For identification purposes (see <xref target="RFC6967"></xref>),
        once the CPE assigns a port set, it issues a RADIUS message to report
        the assigned port set.</t>

        <t><figure anchor="wifi" height=""
            title="RADIUS Message Flow for reporting CPE allocation/deallocation of a port set to a visiting UE">
            <artwork><![CDATA[ 
UE         CPE             CGN                          AAA
 |                         BNG                         Server
 |                          |                             |
 |                          |                             |
 |----Service Request------>|                             |
 |                          |                             |
 |                          |-----Access-Request -------->|
 |                          |                             |
 |                          |<----Access-Accept-----------|                            
 |<---Service Granted ------|                             |
 |    (other parameters)    |                             |
...          |             ...                           ...
 |<---IP@----|              |                             |
 |           |              |                             |
 |   (CPE assigns a TCP/UDP port                          |
 |   range for this visiting UE)                          |
 |           |                                            |
 |           |--Accounting-Request-...------------------->|
 |           |    (IP-Port-Range                          |
 |           |     for allocation)                        |
...          |             ...                           ...
 |           |              |                             |
 |           |              |                             |
 |   (CPE withdraws a TCP/UDP port                        |
 |   range for a visiting UE)                             |
 |           |                                            |      
 |           |--Accounting-Request-...------------------->|
 |           |    (IP-Port-Range                          |
 |           |     for deallocation)                      |
 |           |                                            |
]]></artwork>
          </figure></t>

        <t></t>
      </section>
    </section>

    <section anchor="Table" title="Table of Attributes">
      <t>This document proposes three new RADIUS attributes and their formats
      are as follows:</t>

      <t><list style="symbols">
          <t>IP-Port-Limit-Info: 241.TBD1.</t>

          <t>IP-Port-Range: 241.TBD2.</t>

          <t>IP-Port-Forwarding-Map: 241.TBD3.</t>
        </list></t>

      <t>Note to IANA: it is assumed that Extended-Type-1 "241" will be used
      for these attributes.</t>

      <t>The following table provides a guide as what type of RADIUS packets
      that may contain these attributes, and in what quantity.</t>

      <texttable style="none">
        <ttcol>Request</ttcol>

        <ttcol>Accept</ttcol>

        <ttcol>Reject</ttcol>

        <ttcol>Challenge</ttcol>

        <ttcol>Acct. Request</ttcol>

        <ttcol>#</ttcol>

        <ttcol>Attribute</ttcol>

        <c>0+</c>

        <c>0+</c>

        <c>0</c>

        <c>0</c>

        <c>0+</c>

        <c>TBA</c>

        <c>IP-Port-Limit-Info</c>

        <c>0</c>

        <c>0</c>

        <c>0</c>

        <c>0</c>

        <c>0+</c>

        <c>TBA</c>

        <c>IP-Port-Range</c>

        <c>0+</c>

        <c>0+</c>

        <c>0</c>

        <c>0</c>

        <c>0+</c>

        <c>TBA</c>

        <c>IP-Port-Forwarding-Map</c>
      </texttable>

      <t>The following table defines the meaning of the above table
      entries.</t>

      <t></t>

      <texttable style="none" suppress-title="true">
        <ttcol></ttcol>

        <ttcol></ttcol>

        <c>0</c>

        <c>This attribute MUST NOT be present in packet.</c>

        <c>0+</c>

        <c>Zero or more instances of this attribute MAY be present in
        packet.</c>

        <!--<c>0-1</c>

<c>Zero or one instance of this attribute MAY be present in packet.</c> -->
      </texttable>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not introduce any security issue other than the
      ones already identified in RADIUS <xref target="RFC2865"></xref> and
      <xref target="RFC5176"></xref> for CoA messages. Known RADIUS
      vulnerabilities apply to this specification. For example, if RADIUS
      packets are sent in the clear, an attacker in the communication path
      between the RADIUS client and server may glean information that it will
      use to prevent a legitimate user to access the service by appropriately
      setting the maximum number of IP ports conveyed in an IP-Port-Limit-Info
      Attribute, exhaust the port quota of a user by installing many mapping
      entries (IP-Port-Forwarding-Map Attribute), prevent incoming traffic to
      be delivered to its legitimate destination by manipulating the mapping
      entries installed by means of an IP-Port-Forwarding-Map Attribute,
      discover the IP address and port range assigned to a given user and
      which is reported in an IP-Port-Range Attribute, etc. The root cause of
      these attack vectors is the communication between the RADIUS client and
      server.</t>

      <t>The IP-Port-Local-Id TLV includes an identifier of which the type and
      length is deployment and implementation dependent. This identifier might
      carry privacy sensitive information. It is therefore RECOMMENDED to
      utilize identifiers that do not have such privacy concerns.</t>

      <t>If there is any error in a Radius Accounting-Request packet sent from
      a RADIUS client to the server, the RADIUS server MUST NOT send response
      to the client (refer to <xref target="RFC2866"></xref>). Examples of the
      errors include the erroneous port range in IP-Port-Range Attribute,
      inconsistent port mapping in IP-Port-Forwarding-Map Attribute, etc.</t>

      <t>This document targets deployments where a trusted relationship is in
      place between the RADIUS client and server with communication optionally
      secured by IPsec or Transport Layer Security (TLS) <xref
      target="RFC6614"></xref>.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requires new code point assignments for both IPFIX
      Information Elements and RADIUS attributes as explained in the following
      sub-sections.</t>

      <t>It is assumed that Extended-Type-1 "241" will be used for RADIUS
      attributes in <xref target="IPFIX-RADIUS"></xref>.</t>

      <section anchor="IPFIX-IANA"
               title="IANA Considerations on New IPFIX Information        Elements">
        <t>The following is a new IPFIX Information Element as requested by
        this document (refer to <xref target="TLV2"></xref>) :<list
            style="symbols">
            <t>sourceTransportPortsLimit: <list style="symbols">
                <t>Name: sourceTransportPortsLimit.</t>

                <t>Element ID: TBAx1.</t>

                <t>Description: This Information Element contains the maximum
                number of IP source transport ports that can be used by an end
                user when sending IP packets; each user is associated with one
                or more (source) IPv4 or IPv6 addresses. This IE is
                particularly useful in address sharing deployments that adhere
                to REQ-4 of <xref target="RFC6888"></xref>. Limiting the
                number of ports assigned to each user ensures fairness among
                users and mitigates the denial-of-service attack that a user
                could launch against other users through the address sharing
                device in order to grab more ports.</t>

                <t>Data type: unsigned16.</t>

                <t>Data type semantics: totalCounter.</t>

                <t>Data type unit: ports.</t>

                <t>Data value range: from 1 to 65535.</t>
              </list></t>
          </list></t>
      </section>

      <section anchor="IPFIX-RADIUS"
               title="IANA Considerations on New RADIUS Attributes">
        <t>The authors request that Attribute Types and Attribute Values
        defined in this document be registered by the Internet Assigned
        Numbers Authority (IANA) from the RADIUS namespaces as described in
        the "IANA Considerations" section of <xref target="RFC3575"></xref>,
        in accordance with BCP 26 <xref target="RFC5226"></xref>. For RADIUS
        packets, attributes and registries created by this document IANA is
        requested to place them at
        http://www.iana.org/assignments/radius-types.</t>

        <t>In particular, this document defines three new RADIUS attributes,
        entitled "IP-Port-Limit-Info" (see <xref
        target="sessionlimit"></xref>), "IP-Port-Range" (see <xref
        target="sessionrange"></xref>) and "IP-Port-Forwarding-Map" (see <xref
        target="portmap"></xref>), with assigned values of 241.TBD1, 241.TBD2
        and 241.TBD3 from the Short Extended Space of <xref
        target="RFC6929"></xref>: <figure>
            <artwork><![CDATA[   Type       Name                   Meaning
   ----       ----                   -------
   241.TBD1   IP-Port-Limit-Info     see Section 3.1.1
   241.TBD2   IP-Port-Range          see Section 3.1.2
   241.TBD3   IP-Port-Forwarding-Map see Section 3.1.3
]]></artwork>
          </figure></t>

        <t></t>
      </section>

      <section title="IANA Considerations on New RADIUS TLVs">
        <t>This specification requests allocation of the following TLVs:</t>

        <t><figure>
            <artwork><![CDATA[
   Name                   Value      Meaning
   ----                   -----      -------
   IP-Port-Type            1         see Section 3.2.1
   IP-Port-Limit           2         see Section 3.2.2
   IP-Port-Ext-IPv4-Addr   3         see Section 3.2.3
   IP-Port-Int-IPv4-Addr   4         see Section 3.2.4
   IP-Port-Int-IPv6-Addr   5         see Section 3.2.5
   IP-Port-Int-Port        6         see Section 3.2.6
   IP-Port-Ext-Port        7         see Section 3.2.7
   IP-Port-Alloc           8         see Section 3.2.8
   IP-Port-Range-Start     9         see Section 3.2.9
   IP-Port-Range-End      10         see Section 3.2.10
   IP-Port-Local-Id       11         see Section 3.2.11
]]></artwork>
          </figure></t>
      </section>
    </section>

    <section title="Acknowledgements">
      <t>Many thanks to Dan Wing, Roberta Maglione, Daniel Derksen, David
      Thaler, Alan Dekok, Lionel Morand, and Peter Deacon for their useful
      comments and suggestions.</t>

      <t>Special thanks to Lionel Morand for the Shepherd review and to
      Kathleen Moriarty for the AD review.</t>

      <t>Thanks to Carl Wallace, Tim Chown, and Ben Campbell for the detailed
      review.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.RFC.2865'?>

      <?rfc include='reference.RFC.6929'?>

      <?rfc include='reference.RFC.7012'?>

      <?rfc include='reference.RFC.3575'?>

      <?rfc include='reference.RFC.5226'?>

      <?rfc include='reference.I-D.ietf-radext-datatypes'?>

      <reference anchor="IPFIX"
                 target="http://www.iana.org/assignments/ipfix/ipfix.xhtml">
        <front>
          <title>IP Flow Information Export (IPFIX) Entities</title>

          <author fullname="" surname="">
            <organization>IANA</organization>
          </author>

          <date day="" month="" year="" />
        </front>
      </reference>

      <reference anchor="ProtocolNumbers"
                 target="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">
        <front>
          <title>Protocol Numbers</title>

          <author fullname="" surname="">
            <organization>IANA</organization>
          </author>

          <date day="" month="" year="" />
        </front>
      </reference>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.2866'?>

      <?rfc include='reference.RFC.0768'?>

      <?rfc include='reference.RFC.0793'?>

      <?rfc include='reference.RFC.3022'?>

      <?rfc include='reference.RFC.5176'?>

      <?rfc include='reference.RFC.6887'?>

      <?rfc include='reference.RFC.6158'?>

      <?rfc include='reference.I-D.gundavelli-v6ops-community-wifi-svcs'?>

      <?rfc include='reference.RFC.6967'?>

      <?rfc include='reference.RFC.6888'?>

      <?rfc include='reference.RFC.6614'?>

      <?rfc include='reference.RFC.4960'?>

      <?rfc include='reference.RFC.4340'?>

      <?rfc include='reference.RFC.1918'?>

      <?rfc include='reference.RFC.6598'?>

      <?rfc include='reference.RFC.6146'?>

      <?rfc include='reference.RFC.6269'?>

      <?rfc include='reference.RFC.7785'?>

      <?rfc include='reference.RFC.6333'?>

      <reference anchor="TR-146"
                 target="http://www.broadband-forum.org/technical/download/TR-146.pdf">
        <front>
          <title>TR-146: Subscriber Sessions</title>

          <author fullname="" surname="">
            <organization>Broadband Forum</organization>
          </author>

          <date day="" month="" year="" />
        </front>
      </reference>
    </references>
  </back>
</rfc>
