Closed emil-cheung closed 1 year ago
@emil-cheung As discussed during the meeting, the discussion paper omits the scenario that Issue #34 was originally created for, which is where the device (i.e. UE) or, more specifically, an application running on the device directly requests the QoD service.
In this case, the device can easily find its private (local) IPv4 address if it does not know or have other parameters (external identifier, msisdn, etc.) but, as discussed in Issue #34, this is insufficient to identify the device uniquely. Hence the proposal is that the device obtain its public (observed) IPv4 address and then provide both parameters to the QoD service.
How does the device obtain its public IPv4 address? By using DNS, as follows:
dig @resolver1.opendns.com A myip.opendns.com +short -4
Try it - it really works. It works for any DNS client (e.g. nslookup) with suitable syntax changes, but you have to use the opendns resolver (or another resolver that supports this functionality). There are also HTTP APIs that can be used to obtain this information.
So a mobile app can obtain sufficient information to identify itself by IPv4 address to the QoD service without involving the application server, and the proposed API changes in Issue #34 were designed to address this scenario.
The discussion paper raises two separate topics:
Terminology
The paper proposes to replace the terms
public
andprivate
used in PR #123 withobserved
andlocal
. I make the following observations:observed
parameters will be thepublic
parameters, and thelocal
parameters will be theprivate
parameters. The terms are essentially synonymous. For IPv4 scenarios, I would expect CGNAT to be in operation for the vast majority of commercial use cases for this API.private
orpublic
(almost certainly private), but cannot be bothobserved
andlocal
parameters will therefore be identicalprivate
/public
orlocal
/observed
are used. It's not at all clear to me which terminology a developer will find more intuitive. I would suggest a poll to decide this.API Design and Constraints on API Caller Input Options
Good API design not only allows the API caller to specify the parameters required, but also places logical (i.e. machine enforceable) constraints on the values and combinations of parameters that can be specified.
Required Parameter Combinations The discussion in Issue #34 showed that the following parameter combinations are required if the API caller wishes to identify the UE using its IPv4 address:
public
IPv4 address as well as EITHER theprivate
IPv4 address OR thepublic
portobserved
IPv4 address and EITHER thelocal
IPv4 address OR theobserved
portThe proposal on Page 9 of the discussion document does not help to enforce these requirements
localIpAddr
, there is no requirement for them to also specify anobservedIpAddr
IPv4 subnetobservedIpAddr
IPv4 subnet, there is no requirement for them also to specify either alocalIpAddr
IPv4 subnet or auePorts
->observedPorts
valueMuch of the discussion in Issue #34 and the associated PR #123 was about trying to enforce these requirements on the API caller, who may not understand why they need to additionally provide
public_address
if they want to identify the UE byprivate_address
, but must understand that they have to do it.Additional observations
local
andobserved
fields for IPv6 addresses don't really make sense as they will always be the same valuelocalPorts
is useless for identifying the UE (because all UEs can use almost any source port value) butobservedPorts
is useless for flow descriptions. The two reasons for specifying ports (UE identification and flow descriptions) should be separated. Only a singleobserved
(i.e.public
) port should be specified.localPorts
is required for flow descriptions rather than just using wildcards. Maybe if the UE is acting as a router and sending multiple flows to the same application server IP:port combination, then different QoS levels will be required for the different flows, but how does the API caller learn the local port in that case? Anyway, use of UE ports in flow rules requires a separate discussion issue of its own.I will shortly make an alternative proposal in the original Issue #34 which deals with using the API design to constrain allowed API caller input parameter options.