Tech-invite3GPPspaceIETFspace
959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 8045

RADIUS Extensions for IP Port Configuration and Reporting

Pages: 43
Proposed Standard
Errata
Part 1 of 2 – Pages 1 to 26
None   None   Next

Top   ToC   RFC8045 - Page 1
Internet Engineering Task Force (IETF)                          D. Cheng
Request for Comments: 8045                                        Huawei
Category: Standards Track                                    J. Korhonen
ISSN: 2070-1721                                     Broadcom Corporation
                                                            M. Boucadair
                                                                  Orange
                                                            S. Sivakumar
                                                           Cisco Systems
                                                            January 2017


       RADIUS Extensions for IP Port Configuration and Reporting

Abstract

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 IP Flow Information Export (IPFIX) Information Element identifiers. Status of This Memo This is an Internet Standards Track document. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841. Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc8045.
Top   ToC   RFC8045 - Page 2
Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.
Top   ToC   RFC8045 - Page 3

Table of Contents

1. Introduction ....................................................4 2. Terminology .....................................................5 2.1. Requirements Language ......................................6 3. Extensions of RADIUS Attributes and TLVs ........................7 3.1. Extended Attributes for IP Ports ...........................7 3.1.1. IP-Port-Limit-Info Attribute ........................7 3.1.2. IP-Port-Range Attribute .............................9 3.1.3. IP-Port-Forwarding-Map Attribute ...................12 3.2. RADIUS TLVs for IP Ports ..................................15 3.2.1. IP-Port-Type TLV ...................................16 3.2.2. IP-Port-Limit TLV ..................................17 3.2.3. IP-Port-Ext-IPv4-Addr TLV ..........................18 3.2.4. IP-Port-Int-IPv4-Addr TLV ..........................19 3.2.5. IP-Port-Int-IPv6-Addr TLV ..........................20 3.2.6. IP-Port-Int-Port TLV ...............................21 3.2.7. IP-Port-Ext-Port TLV ...............................22 3.2.8. IP-Port-Alloc TLV ..................................23 3.2.9. IP-Port-Range-Start TLV ............................24 3.2.10. IP-Port-Range-End TLV .............................25 3.2.11. IP-Port-Local-Id TLV ..............................25 4. Applications, Use Cases, and Examples ..........................27 4.1. Managing CGN Port Behavior Using RADIUS ...................27 4.1.1. Configure IP Port Limit for a User .................27 4.1.2. Report IP Port Allocation/Deallocation .............29 4.1.3. Configure Port Forwarding Mapping ..................31 4.1.4. An Example .........................................33 4.2. Report Assigned Port Set for a Visiting UE ................35 5. Table of Attributes ............................................36 6. Security Considerations ........................................36 7. IANA Considerations ............................................37 7.1. New IPFIX Information Elements ............................37 7.2. New RADIUS Attributes .....................................38 7.3. New RADIUS TLVs ...........................................38 8. References .....................................................39 8.1. Normative References ......................................39 8.2. Informative References ....................................40 Acknowledgments ...................................................43 Authors' Addresses ................................................43
Top   ToC   RFC8045 - Page 4

1. Introduction

In a broadband network, customer information is usually stored on a RADIUS server [RFC2865]. 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 Network Address Translation from IPv4 Clients to IPv4 Servers (NAT44) [RFC3022], NAT from IPv6 Clients to IPv4 Servers (NAT64) [RFC6146], or Dual-Stack Lite Address Family Transition Router (AFTR) [RFC6333] function. In such case, the CGN IP transport port (e.g., TCP/UDP port) mapping behaviors can be part of the configuration information sent from the RADIUS server to the NAS/BNG. As part of the accounting information sent from the NAS/BNG to a RADIUS server, the NAS/BNG may also report the IP port mapping behavior applied by the CGN to a user session. 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 a 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 the 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 a port quota (see Section 5 of [RFC6269]). The attributes defined in this document may also be used to report the assigned port range in some deployments, such as Provider WLAN [WIFI-SERVICES]. For example, a visiting host can be managed by Customer Premises Equipment (CPE), which will need to report the assigned port range to the service platform. This is required for identification purposes (see TR-146 [TR-146] for more details). This document proposes three new attributes as RADIUS protocol extensions; they are used for separate purposes, as follows: 1. 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 and associated with one or more IPv4 or IPv6 addresses. 2. 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
Top   ToC   RFC8045 - Page 5
       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.

   3.  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.

   IPFIX Information Elements [RFC7012] 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 Section 3.2.2).

   IP protocol numbers (refer to [ProtocolNumbers]) can be used for
   identification of IP transport protocols (e.g., TCP [RFC793], UDP
   [RFC768], Datagram Congestion Control Protocol (DCCP) [RFC4340], and
   Stream Control Transmission Protocol (SCTP) [RFC4960]) that are
   associated with some RADIUS attributes.

   This document focuses on IPv4 address sharing.  Mechanisms for IPv6
   prefix sharing (e.g., IPv6-to-IPv6 Network Prefix Translation
   (NPTv6)) are out of scope.

2. Terminology

This document makes use of the following terms: o IP Port: This refers to an IP transport port (e.g., a TCP port number or UDP port number). o IP Port Type: This refers to the IP transport protocol as indicated by the IP transport protocol number. Refer to [ProtocolNumbers]. o IP Port Limit: This 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 that this limit is usually associated with one or more IPv4/IPv6 addresses. o IP Port Range: This specifies a set of contiguous IP ports indicated by the lowest numerical number and the highest numerical number, inclusively.
Top   ToC   RFC8045 - Page 6
   o  Internal IP Address: This 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.

   o  External IP Address: This 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.

   o  Internal Port: This is an IP transport port that is allocated by a
      host or application behind an address-sharing device for an
      outbound IP packet in the internal realm.

   o  External Port: This is an IP transport port that 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.

   o  External Realm: This refers to the networking segment where
      external IP addresses are used as source addresses of outbound
      packets forwarded by an address-sharing device.

   o  Internal Realm: This refers to the networking segment that is
      behind an address-sharing device and where internal IP addresses
      are used.

   o  Mapping: This denotes a relationship between an internal IP
      address, internal port, and protocol, as well as an external IP
      address, external port, and protocol.

   o  Address-Sharing Device: This is 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.

2.1. Requirements Language

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 RFC 2119 [RFC2119].
Top   ToC   RFC8045 - Page 7

3. Extensions of RADIUS Attributes and TLVs

These three new attributes are defined in the following subsections: 1. IP-Port-Limit-Info Attribute 2. IP-Port-Range Attribute 3. IP-Port-Forwarding-Map Attribute All these attributes are allocated from the RADIUS "Extended Type" code space per [RFC6929]. These attributes and their embedded TLVs (refer to Section 3.2) are defined with globally unique names and follow the guidelines in Section 2.7.1 of [RFC6929]. In all the figures describing the RADIUS attributes and TLV formats in the following subsections, the fields are transmitted from left to right.

3.1. Extended Attributes for IP Ports

3.1.1. IP-Port-Limit-Info Attribute

This attribute is of type "tlv" as defined in the RADIUS Protocol Extensions [RFC6929]. It contains some sub-attributes, and the requirements are as follows: o The IP-Port-Limit-Info Attribute MAY contain the IP-Port-Type TLV (see Section 3.2.1). o The IP-Port-Limit-Info Attribute MUST contain the IP-Port-Limit TLV (see Section 3.2.2). o The IP-Port-Limit-Info Attribute MAY contain the IP-Port-Ext-IPv4-Addr TLV (see Section 3.2.3). 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. 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.
Top   ToC   RFC8045 - Page 8
   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.

   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.

   The IP-Port-Limit-Info Attribute MAY appear in a CoA-Request packet.

   The IP-Port-Limit-Info Attribute MAY appear in an Accounting-Request
   packet.

   The IP-Port-Limit-Info Attribute MUST NOT appear in any other RADIUS
   packet.

   The format of the IP-Port-Limit-Info Attribute is shown in Figure 1.

    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 ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                                 Figure 1

   Type

      241

   Length

      This field indicates the total length in octets of all fields of
      this attribute, including the Type, Length, Extended-Type, and the
      entire length of the embedded TLVs.

   Extended-Type

      5
Top   ToC   RFC8045 - Page 9
   Value

      This field contains a set of TLVs as follows:

      IP-Port-Type TLV

         This TLV contains a value that indicates the IP port type.
         Refer to Section 3.2.1.

      IP-Port-Limit TLV

         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 Section 3.2.2.  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 Authentication, Authorization, and Accounting
         (AAA) server.

      IP-Port-Ext-IPv4-Addr TLV

         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 Section 3.2.3.

   IP-Port-Limit-Info Attribute is associated with the following
   identifier: 241.5.

3.1.2. IP-Port-Range Attribute

This attribute is of type "tlv" as defined in the RADIUS Protocol Extensions [RFC6929]. It contains some sub-attributes and the requirement is as follows: o The IP-Port-Range Attribute MAY contain the IP-Port-Type TLV (see Section 3.2.1). o The IP-Port-Range Attribute MUST contain the IP-Port-Alloc TLV (see Section 3.2.8).
Top   ToC   RFC8045 - Page 10
   o  For port allocation, the IP-Port-Range Attribute MUST contain both
      the IP-Port-Range-Start TLV (see Section 3.2.9) and the
      IP-Port-Range-End TLV (see Section 3.2.10).  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.

   o  The IP-Port-Range Attribute MAY contain the
      IP-Port-Ext-IPv4-Addr TLV (see Section 3.2.3).

   o  The IP-Port-Range Attribute MAY contain the IP-Port-Local-Id TLV
      (see Section 3.2.11).

   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.

   If the IP-Port-Type TLV is included as part of the IP-Port-Range
   Attribute, then the port range is associated with the specific IP
   transport protocol as specified in the IP-Port-Type TLV, but
   otherwise it is for all IP transport protocols.

   If the IP-Port-Ext-IPv4-Addr TLV is included as part of the
   IP-Port-Range Attribute, then the port range as specified is
   associated with the IPv4 address as indicated, but otherwise it is
   for all IPv4 addresses by the address-sharing device (e.g., a CGN
   device) for the end user.

   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.

   The information contained in the IP-Port-Range Attribute is sent to
   RADIUS server.

   The IP-Port-Range Attribute MAY appear in an Accounting-Request
   packet.

   The IP-Port-Range Attribute MUST NOT appear in any other RADIUS
   packet.
Top   ToC   RFC8045 - Page 11
   The format of the IP-Port-Range Attribute is shown in Figure 2.

    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 ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                                 Figure 2

   Type

      241

   Length

      This field indicates the total length in octets of all fields of
      this attribute, including the Type, Length, Extended-Type, and the
      entire length of the embedded TLVs.

   Extended-Type

      6

   Value

      This field contains a set of TLVs as follows:

      IP-Port-Type TLV

         This TLV contains a value that indicates the IP port type.
         Refer to Section 3.2.1.

      IP-Port-Alloc TLV

         This TLV contains a flag to indicate 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
         Section 3.2.8.

      IP-Port-Range-Start TLV

         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 Section 3.2.9.
Top   ToC   RFC8045 - Page 12
      IP-Port-Range-End TLV

         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 Section 3.2.10.

      IP-Port-Ext-IPv4-Addr TLV

         This TLV contains the IPv4 address that is associated with the
         IP port range, as is 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 Section 3.2.3.

      IP-Port-Local-Id TLV

         This TLV contains a local significant identifier at the
         customer premise, such as the Media Access Control (MAC)
         address, interface ID, VLAN ID, PPP sessions ID, VPN Routing
         and Forwarding (VRF) ID, IP address/prefix, etc.  This TLV is
         optionally included as part of the IP-Port-Range Attribute.
         Refer to Section 3.2.11.

   The IP-Port-Range Attribute is associated with the following
   identifier: 241.6.

3.1.3. IP-Port-Forwarding-Map Attribute

This attribute is of type "tlv" as defined in the RADIUS Protocol Extensions [RFC6929]. It contains some sub-attributes and the requirement is as follows: o The IP-Port-Forwarding-Map Attribute MAY contain the IP-Port-Type TLV (see Section 3.2.1). o The IP-Port-Forwarding-Map Attribute MUST contain both IP-Port-Int-Port TLV (see Section 3.2.6) and the IP-Port-Ext-Port TLV (see Section 3.2.7). o If the internal realm is with an IPv4 address family, the IP-Port-Forwarding-Map Attribute MUST contain the IP-Port-Int-IPv4-Addr TLV (see Section 3.2.4); if the internal realm is with an IPv6 address family, the IP-Port-Forwarding-Map Attribute MUST contain the IP-Port-Int-IPv6-Addr TLV (see Section 3.2.5).
Top   ToC   RFC8045 - Page 13
   o  The IP-Port-Forwarding-Map Attribute MAY contain the
      IP-Port-Ext-IPv4-Addr TLV (see Section 3.2.3).

   o  The IP-Port-Forwarding-Map Attribute MAY contain the
      IP-Port-Local-Id TLV (see Section 3.2.11).

   The attribute contains a two-octet IP internal port number and a
   two-octet 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 it is associated
   with all external IPv4 addresses for the end user.

   If the IP-Port-Type TLV is included as part of the
   IP-Port-Forwarding-Map Attribute, then the port mapping is associated
   with the specific IP transport protocol as specified in the
   IP-Port-Type TLV, but otherwise it is for all IP transport protocols.

   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.

   The IP-Port-Forwarding-Map Attribute MAY appear in a CoA-Request
   packet.

   The IP-Port-Forwarding-Map Attribute MAY also appear in an
   Accounting-Request packet.

   The IP-Port-Forwarding-Map Attribute MUST NOT appear in any other
   RADIUS packet.
Top   ToC   RFC8045 - Page 14
   The format of the IP-Port-Forwarding-Map Attribute is shown in
   Figure 3.

    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 ....
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                                 Figure 3

   Type

      241

   Length

      This field indicates the total length in octets of all fields of
      this attribute, including the Type, Length, Extended-Type, and the
      entire length of the embedded TLVs.

   Extended-Type

      7

   Value

      This field contains a set of TLVs as follows:

      IP-Port-Type TLV

         This TLV contains a value that indicates the IP port type.
         Refer to Section 3.2.1.

      IP-Port-Int-Port TLV

         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 Section 3.2.6.

      IP-Port-Ext-Port TLV

         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 Section 3.2.7.
Top   ToC   RFC8045 - Page 15
      IP-Port-Int-IPv4-Addr TLV

         This TLV contains an IPv4 address that is associated with the
         internal IP port number contained in the IP-Port-Int-Port TLV.
         For the internal realm with an IPv4 address family, this TLV
         MUST be included as part of the IP-Port-Forwarding-Map
         Attribute.  Refer to Section 3.2.4.

      IP-Port-Int-IPv6-Addr TLV

         This TLV contains an IPv6 address that is associated with the
         internal IP port number contained in the IP-Port-Int-Port TLV.
         For the internal realm with an IPv6 address family, this TLV
         MUST be included as part of the IP-Port-Forwarding-Map
         Attribute.  Refer to Section 3.2.5.

      IP-Port-Ext-IPv4-Addr TLV

         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 Section 3.2.3.

      IP-Port-Local-Id TLV

         This TLV contains a local significant 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 Section 3.2.11.

   The IP-Port-Forwarding-Map Attribute is associated with the following
   identifier: 241.7.

3.2. RADIUS TLVs for IP Ports

The TLVs that are included in the three attributes (see Section 3.1) are defined in the following subsections. These TLVs use the format defined in [RFC6929]. As the three attributes carry similar data, we have defined a common set of TLVs that 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 Sections 3.1.1, 3.1.2, and 3.1.3 for a list of which TLV is permitted within which parent attribute.
Top   ToC   RFC8045 - Page 16
   The encoding of the Value field of these TLVs follows the
   recommendation of [RFC6158].  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 [RFC6158].

3.2.1. IP-Port-Type TLV

The format of IP-Port-Type TLV is shown in Figure 4. This attribute carries the IP transport protocol number defined by IANA (refer to [ProtocolNumbers]). 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 4 TLV-Type 1 Length Six octets Protocol-Number Integer. This field contains the data (unsigned8) of the protocol number defined in [ProtocolNumbers], right justified, and the unused bits in this field MUST be set to zero. Protocols that do not use a port number (e.g., the Resource Reservation Protocol (RSVP) or IP Encapsulating Security Payload (ESP)) MUST NOT be included in the IP-Port-Type TLV. IP-Port-Type TLV MAY be included in the following attributes: o IP-Port-Limit-Info Attribute, identified as 241.5.1 (see Section 3.1.1) o IP-Port-Range Attribute, identified as 241.6.1 (see Section 3.1.2) o IP-Port-Forwarding-Map Attribute, identified as 241.7.1 (see Section 3.1.3)
Top   ToC   RFC8045 - Page 17
   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.

3.2.2. IP-Port-Limit TLV

The format of IP-Port-Limit TLV is shown in Figure 5. This attribute carries IPFIX Information Element 458, "sourceTransportPortsLimit", 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. 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 5 TLV-Type 2 Length Six octets sourceTransportPortsLimit Integer. This field contains the data (unsigned16) of sourceTransportPortsLimit (458) defined in IPFIX, right justified, and the unused bits in this field MUST be set to zero. 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.5.2.
Top   ToC   RFC8045 - Page 18

3.2.3. IP-Port-Ext-IPv4-Addr TLV

The format of IP-Port-Ext-IPv4-Addr TLV is shown in Figure 6. This attribute carries IPFIX Information Element 225, "postNATSourceIPv4Address", which is the IPv4 source address after NAT operation (refer to [IPFIX]). 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 6 TLV-Type 3 Length Six octets postNATSourceIPv4Address Integer. This field contains the data (ipv4Address) of postNATSourceIPv4Address (225) defined in IPFIX. IP-Port-Ext-IPv4-Addr TLV MAY be included in the following attributes: o IP-Port-Limit-Info Attribute, identified as 241.5.3 (see Section 3.1.1) o IP-Port-Range Attribute, identified as 241.6.3 (see Section 3.1.2) o IP-Port-Forwarding-Mapping Attribute, identified as 241.7.3 (see Section 3.1.3)
Top   ToC   RFC8045 - Page 19

3.2.4. IP-Port-Int-IPv4-Addr TLV

The format of IP-Port-Int-IPv4 TLV is shown in Figure 7. This attribute carries IPFIX Information Element 8, "sourceIPv4Address", which is the IPv4 source address before NAT operation (refer to [IPFIX]). 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 7 TLV-Type 4 Length Six octets sourceIPv4Address Integer. This field contains the data (ipv4Address) of sourceIPv4Address (8) defined in IPFIX. If the internal realm is with an IPv4 address family, the IP-Port-Int-IPv4-Addr TLV MUST be included as part of the IP-Port-Forwarding-Map Attribute (refer to Section 3.1.3), identified as 241.7.4.
Top   ToC   RFC8045 - Page 20

3.2.5. IP-Port-Int-IPv6-Addr TLV

The format of IP-Port-Int-IPv6-Addr TLV is shown in Figure 8. This attribute carries IPFIX Information Element 27, "sourceIPv6Address", which is the IPv6 source address before NAT operation (refer to [IPFIX]). 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 8 TLV-Type 5 Length Eighteen octets sourceIPv6Address IPv6 address (128 bits). This field contains the data (ipv6Address) of sourceIPv6Address (27) defined in IPFIX. If the internal realm is with an IPv6 address family, the IP-Port-Int-IPv6-Addr TLV MUST be included as part of the IP-Port-Forwarding-Map Attribute (refer to Section 3.1.3), identified as 241.7.5.
Top   ToC   RFC8045 - Page 21

3.2.6. IP-Port-Int-Port TLV

The format of IP-Port-Int-Port TLV is shown in Figure 9. This attribute carries IPFIX Information Element 7, "sourceTransportPort", which is the source transport number associated with an internal IPv4 or IPv6 address (refer to [IPFIX]). 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 9 TLV-Type 6 Length Six octets sourceTransportPort Integer. This field contains the data (unsigned16) of sourceTransportPort (7) defined in IPFIX, right justified, and unused bits MUST be set to zero. IP-Port-Int-Port TLV MUST be included as part of the IP-Port-Forwarding-Map Attribute (refer to Section 3.1.3), identified as 241.7.6.
Top   ToC   RFC8045 - Page 22

3.2.7. IP-Port-Ext-Port TLV

The format of IP-Port-Ext-Port TLV is shown in Figure 10. This attribute carries IPFIX Information Element 227, "postNAPTSourceTransportPort", which is the transport number associated with an external IPv4 address (refer to [IPFIX]). 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 10 TLV-Type 7 Length Six octets postNAPTSourceTransportPort Integer. This field contains the data (unsigned16) of postNAPTSourceTransportPort (227) defined in IPFIX, right justified, and unused bits MUST be set to zero. IP-Port-Ext-Port TLV MUST be included as part of the IP-Port-Forwarding-Map Attribute (refer to Section 3.1.3), identified as 241.7.7.
Top   ToC   RFC8045 - Page 23

3.2.8. IP-Port-Alloc TLV

The format of IP-Port-Alloc TLV is shown in Figure 11. This attribute carries IPFIX Information Element 230, "natEvent", which is a flag to indicate an action of NAT operation (refer to [IPFIX]). 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. 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 11 TLV-Type 8 Length Six octets natEvent 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: 0: Reserved 1: Allocation 2: Deallocation IP-Port-Alloc TLV MUST be included as part of the IP-Port-Range Attribute (refer to Section 3.1.2), identified as 241.6.8.
Top   ToC   RFC8045 - Page 24

3.2.9. IP-Port-Range-Start TLV

The format of IP-Port-Range-Start TLV is shown in Figure 12. This attribute carries IPFIX Information Element 361, "portRangeStart", which is the smallest port number of a range of contiguous transport ports (refer to [IPFIX]). 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 12 TLV-Type 9 Length Six octets portRangeStart Integer. This field contains the data (unsigned16) of portRangeStart (361) defined in IPFIX, right justified, and unused bits MUST be set to zero. IP-Port-Range-Start TLV is included as part of the IP-Port-Range Attribute (refer to Section 3.1.2), identified as 241.6.9.
Top   ToC   RFC8045 - Page 25

3.2.10. IP-Port-Range-End TLV

The format of IP-Port-Range-End TLV is shown in Figure 13. This attribute carries IPFIX Information Element 362, "portRangeEnd", which is the largest port number of a range of contiguous transport ports (refer to [IPFIX]). 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 13 TLV-Type 10 Length Six octets portRangeEnd Integer. This field contains the data (unsigned16) of portRangeEnd (362) defined in IPFIX, right justified, and unused bits MUST be set to zero. IP-Port-Range-End TLV is included as part of the IP-Port-Range Attribute (refer to Section 3.1.2), identified as 241.6.10.

3.2.11. IP-Port-Local-Id TLV

The format of IP-Port-Local-Id TLV is shown in Figure 14. This attribute carries a string called "localID", which is a local significant identifier as explained below. 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 (as described in [RFC1918] and [RFC6598]) 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,
Top   ToC   RFC8045 - Page 26
   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.

    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 ....
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                                 Figure 14

   TLV-Type

      11

   Length

      Variable number of octets

   localID

      String.  The data type of this field is string (refer to
      [RFC8044]).  This field contains the data that is a local
      significant identifier at the customer premise, such as MAC
      address, interface ID, VLAN ID, PPP sessions ID, VRF ID, IP
      address/prefix, or another local significant identifier.

   IP-Port-Local-Id TLV MAY be included in the following Attributes if
   it is necessary to identify the subscriber:

   o  IP-Port-Range Attribute, identified as 241.6.11 (see
      Section 3.1.2)

   o  IP-Port-Forwarding-Mapping Attribute, identified as 241.7.11 (see
      Section 3.1.3)


(next page on part 2)

Next Section