-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update UeId definition in qod-api.yaml #123
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is my understanding correct? If the device has a public address, then copy the value as a private address as well. With private addresses only it is not always possible to identify the device. For this scenario the name
private_ipv4_addr
would be misleading. IMOdevice_ipv4_addr
orlocal_ipv4_addr
would cover better both situations.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jlurien
No, that is not how I intended this to work.
It works as follows:
Identify device by private IP address
IF the device has been directly allocated a private IP address
AND the API caller wishes to identify the UE by that private address
THEN the API caller uses the
private_ipv4_addr
field ofueId
to pass both private and public (CGNATed) IP addressesIf the private IP address has NOT been NATed to a public address (this will not be the normal case), then the private address is copied to the
public_address
field to indicate this. This is the exception documented in the description forPrivateIpv4Addr
.So the text is correct
Identify device by public IP address
IF the device has been directly allocated a private IP address which has been CGNATed to a public address OR the device has been directly allocated a public IP address (this would be unusual)
AND the API caller wishes to identify the device by its public address
THEN the API caller uses the
public_ipv4_addr
field ofueId
to indicate both thepublic_address
andport
allocated to the device (theport
being required to uniquely identify the device in the case of CGNATing)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Eric for the detailed clarification. This type of explanations would be useful also to be added to the API doc.
Then, for:
In which scenarios can this happen? Private networks where both device and application server are in the same network? And every device is allocated a distinct private address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this scenario would be for private or test networks where the private address allocated to the device is unique (within that network).
So the private address is sufficient to identify the device in this case, but I think making
public_address
required is better because this information will indeed be required for the normal case. Unfortunately, OAS does not support making fields conditionally mandatory - they are either required or optional.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we consider the term routable as ip address that is routable in the internet, then the existing text itself seems to be fine. This means private addr (non-routable) and public addr (routable). With that, my understanding is as below:
PublicIPv4Addr
objectPrivateIpv4Addr
object withpublic_address
andprivate_address
assigned with respective ip addrs.PrivateIpv4Addr
object withpublic_address
andprivate_address
being the same private addrPrivateIpv4Addr
object withpublic_address
andprivate_address
being the same public ip addr. This is one anomaly to the 'routable' term and as this is an unusual case, I tend to ignore it. (However, @eric-murray reply above 'Identify device by public IP address' indicates the use ofPublicIpv4Addr
object for this case -> not sure what should be the value ofpublic_port
would be in this case? This needs clarification)From an AppServer implementation perspective, it uses the
PublicIpv4Addr
if populated. If not, it uses thePrivateIpv4Addr
object to identify the device. Seems OK to me (pending the clarification requested above).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sfnuser
My thought was that, if a public address is allocated directly to the device, then it will not have a private address at all, and so expecting the API caller to use the
private_ipv4_addr
field to identify the device is somewhat counterintuitive.On your specific point about also specifying the
public_port
, for this scenario it is indeed not strictly required. Not because the device does not have a public source port, but because it has been allocated ALL public source ports. So any port could be specified. This is different to requiring theprivate_address
, as such a device definitely does not have a private address (at least, not one that the mobile network would know about).Given that
public_port
most definitely is required for the CGNAT case, I decided to make that parameter mandatory. Allowing the API caller not to specify it will cause more problems than it solves. Ultimately, there are three parameters that may be required for IPv4 address - public address, private address and public port. The question is what combination of options do we allow the API caller in specifying these parameters.My expectation is that allocating public IPv4 addresses directly to the device is an entirely hypothetical scenario. If anyone is aware of commercial networks that still do this, I'd be interested in details of those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eric-murray
I agree. We have captured the use case and thought out options here anyways. If this do not suffice, a new issue shall be created at that point and discussed. We do not want to overcomplicate now.