The Inner Packet Marking IE type is encoded as shown in this image. It indicates the DSCP value for the downlink Inner Packet Marking.
Now, encode the ToS or Traffic Class in the form of two octets as an OctetString. The first octet contains the DSCP value in the IPv4 ToS or the IPv6 Traffic Class field and the second octet contains the ToS or Traffic Class mask field, which is set to 0xFC.
Note: The original Ethernet Consist Network (ECN) bits in the IP header of User Plane packets do not change after the transport-level marking or Inner Packet Marking is applied. If Transport Level Marking IE, Inner Packet Marking IE, or both the IEs are associated with uplink FAR, then the next rule applies for uplink packet marking: If Transport Level Marking or Inner Packet Marking IE is present, its DSCP value is used. If both Transport Level Marking and Inner Packet Marking IE are present, then the value from Transport Level Marking IE is used for uplink packet marking.
Now let's look at the SMF configuration. You can see that in the dnn profile for dnnprof-alpha that the qos-profile is set to 5qi-to-dscp-mapping-table.
profile dnn dnnprof-alpha
dns primary ipv4 10.177.0.34
dns primary ipv6 fd00:976a::9
dns secondary ipv4 10.177.0.210
dns secondary ipv6 fd00:976a::10
network-element-profiles chf nfprf-chf1
network-element-profiles amf nfprf-amf1
network-element-profiles pcf nfprf-pcf1
network-element-profiles udm nfprf-udm1
dnn alpha network-function-list [ chf pcf upf ]
dnn rmgr mvno-pool-ipv6
timeout up-idle 3600 cp-idle 7320
charging-profile chgprof-1
wps-profile dynamic-wps
ssc-mode 1 allowed [ 2 ]
session type IPV4V6 allowed [ IPV4 IPV6 ]
upf apn alpha
qos-profile 5qi-to-dscp-mapping-table
always-on false
userplane-inactivity-timer 3600
only-nr-capable-ue true
exit
The 5qi-to-dscp-mapping-table can be seen in the profile qos configuration.
profile qos 5qi-to-dscp-mapping-table
dscp-map qi5 6 uplink user-datagram dscp-marking 0x0c
dscp-map qi5 6 downlink encsp-header dscp-marking 0x0c
dscp-map qi5 7 uplink user-datagram dscp-marking 0x0e
dscp-map qi5 7 downlink encsp-header dscp-marking 0x0e
dscp-map qi5 8 uplink user-datagram dscp-marking 0x0e
dscp-map qi5 8 downlink encsp-header dscp-marking 0x0e
dscp-map qi5 9 uplink user-datagram dscp-marking 0x0a
dscp-map qi5 9 downlink encsp-header dscp-marking 0x0a
exit
The Cisco UPF provides different enforcement mechanisms based on policy received from the SMF. The UPF is the boundary between the Access and IP domains and is the ideal location to implement policy-based enforcement. The pcc-rules provided by the PCF and the pre-defined rules on the SMF are uploaded over the N4 interface and installed on the UPF on a per-Data Networking Name (DNN) basis. This allows for dynamic policy changes that enable differentiated charging and QoS enforcement.