[5G NAS] NR terminal side PDU establishment process and data packet filtering and mapping

The blogger has not authorized any person or organization to reprint any original articles of the blogger, thank you for your support for the original!
blogger link

I work for an internationally renowned terminal manufacturer and am responsible for the research and development of modem chips.
In the early days of 5G, he was responsible for the development of the terminal data service layer and the core network. Currently, he is leading the research on technical standards for 6G computing power networks.


The content of the blog mainly revolves around:
       5G/6G protocol explanation
       computing power network explanation (cloud computing, edge computing, end computing)
       advanced C language explanation
       Rust language explanation



NR terminal side PDU establishment process and packet filtering and mapping

insert image description here
insert image description here

1. The terminal sends a PDU SESSION ESTABLISHMENT REQUEST message

We know that the SM message of the terminal in 5G needs to be encapsulated into the MM message and sent, which is the so-called piggyback. So the terminal needs to build the SM message first, and then build the MM message for piggyback.

1.1 Key parameter preparation

       In order to establish a PDU session, the terminal needs to send a PDU SESSION ESTABLISHMENT REQUEST message, which requires the terminal:

  • Allocate a currently unused PDU session ID;
  • Allocate one that is not currently used PTIto identify the current PDU session establishment process;
  • DN-specific identity, used for verification and authentication when the terminal accesses the external network;
  • SSC mode, optional values ​​include "SSC mode 1", "SSC mode 2", "SSC mode 3";
    • If the PDU session type is "IPv4", "IPv6", "IPv4v6", then the optional SSC mode can be "SSC mode 1", "SSC mode 2", "SSC mode 3";
    • If the PDU session type is "Ethernet" or "Unstructured", then the optional SSC mode can be "SSC mode 1" or "SSC mode 2";
    • If it is to switch an established PDU from EPC to 5GC, the optional SSC mode can be "SSC mode 1";
  • PDU session type, optional values ​​include "IPv4", "IPv6", "IPv4v6", "Ethernet", "Unstructured";
  • RQoSparameter, indicating whether the terminal supports reverse QoS mapping;
  • 最大packet filters, tell the core network the maximum number of packet filters supported by this PDU session;
    • If the PDU session is newly established, and the PDU session type is "IPv4", "IPv6", "IPv4v6", "Ethernet", then a maximum of 16 packet filters are supported;
    • If it is an established PDU session in EPC and the type is "IPv4", "IPv6", "IPv4v6", "Non-IP", and it is converted to 5GC, it supports up to 16 packet filters;
  • 最大完整性保护数据速率
  • MH6-PDU, indicating to the core network whether to support the multi-homing IPv6 function;
  • always-on pdu, indicating to the core network whether the PDU is a "permanent online PDU";

1.2 Construct and send UL NAS TRANSPORT message

The parameters in the PDU SESSION ESTABLISHMENT REQUEST message        are described in 1.1 . Then the terminal will use the UL NAS TRANSPORT message to send, and the parameters in the UL NAS TRANSPORT are as follows:

  • PDU SESSION ESTABLISHMENT REQUEST message;
  • PDU session ID corresponding to creation, switching or conversion;
  • Set the request type, optionally including "initial request", "existing PDU session", "initial emergency request", "existing emergency PDU session";
  • Select S-NSSAI, if the request type of the PDU session is:
    • 初始请求, and the terminal decides USRPto establish a new PDU session according to (including one or more S-NSSAI) or local policies;
      • If it is a non-roaming scenario, the S-NSSAI parameter can be selected from the matching USRP, the default USRP or the S-NSSAI configured locally on the terminal, but it must belong to allowed S-NSSAI;
      • If it is a roaming scene:
        1. Then the S-NSSAI parameter can be selected from the matching USRP, the default USRP or the S-NSSAI configured locally on the terminal, but it must belong to mapped S-NSSAI;
        2. The S-NSSAI associated with the S-NSSAI selected in 1 and belonging to the allowed S-NSSAI;
    • 存在的PDU session, the S-NSSAI parameter is the S-NSSAI associated with this existing PDU session. If it is a roaming scene, it must also be a mapped S-NSSAI;
  • Set DNN, if the type of the initial request is "initial request" or "existing PDU session", use the specified DNN instead of the default DNN;
  • When the terminal receives a PDU SESSION MODIFICATION COMMAND message and the cause value is "#39 reactivation requested", it will include the currently established PDU session old PDU session ID;

When the UL NAS TRANSPORT is sent, the T3580 timer will be started.

If there is no matching URSP rule in the terminal, and there is no S-NSSAI in the terminal's local configuration information and default URSP, the terminal will not provide S-NSSAI in the PDU session establishment message.


2. The network accepts the PDU SESSION ESTABLISHMENT REQUEST of the terminal

       When the SMF receives the PDU SESSION ESTABLISHMENT REQUEST message, it will check whether it can establish a connection with the DN requested by the terminal, which may include some authentication procedures. When SMF confirms that a connection can be established with DN, it will reply PDU SESSION ESTABLISHMENT ACCEPT to the terminal .

2.1 Key parameters in PDU SESSION ESTABLISHMENT ACCEPT

  • authorized QoS flow descriptions IE, this field is not mandatory, if one of the following conditions is met, it needs to be constructed:

    • The authorized QoS rules IE contains at least one GBR QoS flow;
    • The assigned QFI is inconsistent with the QFI in the 5QI of its QoS flow;
    • This QoS flow can be mapped to EPS bearer;
  • If this PDU session supports the interaction with EPS, it will also build Mapped EPS bearer contexts IEand record mapped EPS bearer contextthe mapping relationship between each QoS flow and;

  • SSC mode IE,if:

    • If the SSC mode is not included in the PDU SESSION ESTABLISHMENT REQUEST , a default SSC mode will be selected according to the subscription information of the DN and the configuration information of the corresponding SMF;
    • The SSC mode is included in the PDU SESSION ESTABLISHMENT REQUEST , and one of the reported SSC modes will be selected according to the PDU session type, user subscription information, and SMF configuration information;

    Translation: If the PDU session is an emergency PDU session, the SMF needs to set the Selected SSC mode IE in the PDU session ESTABLISHMENT ACCEPT message to "SSC mode 1". If the PDU session is a non-emergency PDU session of "Ethernet" or "Unstructured" PDU session type, the SMF shall set the "Selected SSC mode IE" to "SSC mode 1" or "SSC mode 2". If the PDU session is a non-emergency PDU session of "IPv4", "IPv6" or "IPv4v6" PDU session type, SMF sets the selected SSC mode IE to "SSC mode 1", "SSC mode 2" or "SSC mode 3" .

  • S-NSSAI IE, select the S-NSSAI or mapped S-NSSAI reported in the PDU SESSION ESTABLISHMENT REQUEST (in roaming scenarios);

  • PDU session type IE, if the PDU SESSION ESTABLISHMENT REQUEST message contains a setting of:

    • For the PDU session type IE of "IPv4v6", SMF will select "IPv4", "IPv6" or "IPv4v6" as the PDU session type IE selected for this PDU session. If the subscription information, SMF configuration or both are restricted to IPv4-only or IPv6-only requested DNN, the SMF shall include the 5GSM cause value #50 "PDU session type IPv4 only" in the 5GSM causeIE of the PDU SESSION ESTABLISHMENT ACCEPT message respectively allowed" or #51 "PDU session type IPv6 only allowed";
    • If the selected PDU session type is "IPv4", SMF will include the PDU address IE in the PDU SESSION ESTABLISHMENT ACCEPT message, and set the PDU address IE to the IPv4 address assigned to the UE in the PDU session;
    • If the selected PDU session type is "IPv6", the SMF will include the PDU address IE in the PDU SESSION ESTABLISHMENT ACCEPT message, and set the PDU address IE to the interface identifier of the IPv6 link-local address assigned to the UE in the PDU session (low 64bit);
    • If the selected PDU session type is "IPv4v6", SMF will include the PDU address IE in the PDU SESSION ESTABLISHMENT ACCEPT message, and set the PDU address IE as the interface identifier of the IPv4 address and the IPv6 link-local address, which is assigned to the PDU session UE;
  • For non-emergency PDU sessions, one will also be included DNN IE;

  • Session-AMBR;

  • If the terminal reports support for RQoS, the SMF considers that all QoS flows in this PDU can support RQoS, and may configure one RQ timer IE. If the SMF sets the RQ timer to "deactivated" or 0, it means that the RQoS function is not started;

  • Always-on PDU session requested IE

Note that if the terminal does not configure the maximum supported packet filters, the network defaults to 16. If the "maximum integrity protection data rate" is configured, it is not allowed to be modified during the entire life cycle of the PDU session.

When the terminal receives the PDU SESSION ESTABLISHMENT ACCEPT message, the terminal will stop the T3580 timer and release the PTI. At this time, the terminal considers that the PDU session has been established successfully. The terminal will store "authorized QoS rules", as well as "Session-AMBR" and "authorized QoS flow descriptions" received in the PDU SESSION ESTABLISHMENT ACCEPT message.

The terminal will also check the semantic and syntax errors of the configured "authorized QoS rules" and "authorized QoS flow descriptions". For details, please refer toTS24501-6.4.1.3

If the PDU session type requested by the terminal is "IPv4v6", but:

  • The PDU session type configured in the network is "IPv4" and does not contain the 5GSM error message #50 "PDU session type IPv4 only allowed";
  • The PDU session type configured in the network is "IPv6" and does not contain the 5GSM error message #51 "PDU session type IPv6 only allowed";

In this case, the UE can then use the PDU SESSION ESTABLISHMENT REQUEST message to request another PDU session of another IP version to the same DNN and the same S-NSSAI.

If the PDU session type requested by the terminal is "IPv4v6", but:

  • The PDU session type configured in the network is "IPv4" and contains 5GSM error message #50 "PDU session type IPv4 only allowed";
  • The PDU session type configured in the network is "IPv6" and contains 5GSM error message #51 "PDU session type IPv6 only allowed";

In this case, the UE will not use the PDU SESSION ESTABLISHMENT REQUEST message to request another PDU session of other IP versions to the same DNN and the same S-NSSAI, unless:
  • The terminal is registered to a new PLMN and is not in the equivalent PLMN list;
  • The PDU type used to access this DNN and S-NSSAI has changed;
  • terminal shutdown;
  • USIM card removal;

3. The maximum number of PDU sessions that the terminal can establish

The maximum number of PDU sessions that        a terminal can establish in a PLMN is limited by the following minimum values:

  • The maximum PDU session ID allowed by the protocol (specified in 3GPP TS 24.007-11.2.3.1b);
  • The maximum number of PDU sessions corresponding to the PLMN;
  • The UE implements a specific maximum number of PDU sessions;

4. Forwarding of APP data

       After the PDU session is successfully established, the APP of the terminal can send data, so how is the data mapped from the APP to the corresponding QoS Flow? Of course, through the corresponding QoS rules, detect DL/UL data packets, and find out which QoS Folw the data should be mapped to, that is, which QFI, according to the matched QoS rules.
       The protocol does not stipulate where to perform the filtering process of APP data packets. I think it can be implemented on the AP side. For example, query the QoS rules configured by the network for the terminal through AT Command, then perform filtering, and finally send the matching QFI and data packets to SDAP, if no QoS rules are matched, the terminal should discard the data packet according to the agreement.

       Regarding the content of QoS rules and packet filtering, I will write another blog post separately, so stay tuned.

+CGTFTRDP:Used to show the network assigned QoS rules for a 5GS QoS flow


The network rejects the terminal’s PDU session establishment request process, which we will not introduce in this blog post. If you are interested, please refer to TS24501-6.4.1.4.



insert image description here

Guess you like

Origin blog.csdn.net/qq_31985307/article/details/130034538