Network Instance IE encoding

I am trying to connect the travelping UPF to the free5gc core but I have a rule creation/modification failure from the PDR that is returned by the UPF. When I contacted them they explained that it is an encoding problem (full answer below ). My question is can I change the type of the NWI from DNN to APN? Thank you in advance for your help.

full answer:

Network Instance IE encoding is wrong. The value is encoded as DNN name, but UPG expects a APN name there.

TS 29.244 is very confusing on the details of how Network Instance needs to be encoded. It states that APN is not encoded as FQDN string, that implies the same encoding as in the GTP APN IE is used. The specification is silent about how a DNN is encoded into that IE. That has lead some implementations to encode DNN’s as plain binary (FQDN with dots in there, no length indicators).

UPG only understands APN encoding at the moment.

I’m running into the same problem while testing compatibility between free5GC SMF and Open5GCore UPF.
The Open5GCore UPF rejects PFCP Session Establishment Request from free5GC SMF with this error message:

139861541496384/114 13:35:50  ERROR:pfcp:pfcp_decode_network_instance_dup():232> network_instance is in wrong format!
139861541496384/114 13:35:50  ERROR:pfcp:pfcp_decode_network_instance_dup():232> network_instance is in wrong format!

I compared the PFCP Session Establishment Request generated by free5GC SMF and the same message generated by Open5GCore SMF:

// from free5GC SMF (rejected by Open5GCore UPF)
00 16 00 08 69 6e 74 65 72 6e 65 74
Network Instance : internet
    IE Type: Network Instance (22)
    IE Length: 8
    Network Instance: internet

// from Open5GCore SMF (accepted by Open5GCore UPF)
00 16 00 09 08 69 6e 74 65 72 6e 65 74
Network Instance : internet
    IE Type: Network Instance (22)
    IE Length: 9
    Network Instance: internet

For the same DNN internet, the encoding from Open5GCore SMF has an extra octet 08 before the string.

I checked the specifications.
TS 129 244 clause 8.2.4 states:

It may be encoded as a Domain Name or an Access Point Name (APN) as per clause 9.1 of 3GPP TS 23.003.

TS 123 003 clause 9.1 states:

The encoding of the APN shall follow the Name Syntax defined in RFC 2181, RFC 1035, and RFC 1123. The APN consists of one or more labels. Each label is coded as a one octet field followed by that number of octets coded as 8 bit ASCII characters.

Hence, I believe Open5GCore SMF is encoding this field correctly, while free5GC SMF has an incorrect encoding.

Hi @yoursunny,

It would be greatly appreciated if you can create a new topic about this problem so the free5GC team can look into it further.
We appreciate your interests and contribution to free5GC very much.

Admin

Hi @diallama @yoursunny

Is the following helpful for you?

free5GC SMF with this setting works with VPP-UPF as follows.

FYI.

1 Like

I tested this solution and it resolves the encoding error.

---
smfcfg.yaml
---
configuration:
  nwInstFqdnEncoding: true