Hello Osmocom community,
I have a question about TCP port number assignment for programs using libosmovty. Every Osmo-official server program gets official port number assignments listed in the wiki, in PDF manuals etc - so far, so good. But what about non-Osmo-official 3rd-party programs that wish to use common Osmocom libraries, including the vty facility? Suppose that an operator of an Osmocom-based cellular network needs to develop some additional programs to satisfy some operational need, and some of these additional programs are long-lived server processes for which an Osmocom-style vty interface would be very useful. But implementing such a telnet vty i/f requires a TCP port number...
Has anyone thought about designating an official range of TCP port numbers which would be recommended for vty/ctrl/etc ports of processes that use Osmocom libraries and extend Osmocom CNI in various ways, but aren't official Osmocom projects?
M~
Has anyone thought about designating an official range of TCP port numbers which would be recommended for vty/ctrl/etc ports of processes that use Osmocom libraries and extend Osmocom CNI in various ways, but aren't official Osmocom projects?
No such idea exists, but it remains valid that you can choose any port number.
For example, in Osmocom we hand out port numbers "around" 4242, the definitive list being: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers
If you'd like to run alongside Osmocom (without cfg), then you probably want to stay clear of 4000 to 4500. So you can just pick 5000 or whatever.
Even if you have a collision of default port numbers, you can always reconfigure the VTY port or IP address to listen on. For example, in our test setups, we often have multiple osmo-mgw running, and bind one to 127.0.0.1 and the other to 127.0.0.2. So even if you overload a used port number, the user will have ways to fix it.
line vty bind 127.0.0.7 ctrl bind 127.0.0.7
If we have agreement on it, we can also designate a port number or range on above wiki page as "used by project XYZ" and then hopefully future Osmocom programs will see that and choose a different port.
It does not make sense to officially designate a given port range as non-Osmocom, because each program or program-family should make their own port choices. They should not *all* use the same port range.
~N
Hi Neels,
If you'd like to run alongside Osmocom (without cfg), then you probably want to stay clear of 4000 to 4500.
OK, this part is a given...
So you can just pick 5000 or whatever.
The table in the wiki page already lists 5000 as A/IP for osmo-bsc_nat. I am now thinking about 5100 to 5199 range.
If we have agreement on it, we can also designate a port number or range on above wiki page as "used by project XYZ" and then hopefully future Osmocom programs will see that and choose a different port.
Would it be acceptable to add a note to the Port_Numbers wiki page along the lines of:
"Port numbers 5100 through 5199 are reserved for deployment-specific programs that may be developed locally by administrators of individual Osmocom-based cellular networks, as may be needed for unique custom requirements of individual deployments."
?
It does not make sense to officially designate a given port range as non-Osmocom, because each program or program-family should make their own port choices. They should not *all* use the same port range.
Please note the "deployment-specific" language I propose above. If I develop custom add-ons to Osmocom CNI that are highly specific to USA telecom environment and to the problem of interconnecting an Osmocom network with this national telephone+SMS environment, and someone else develops their own custom add-ons that are specific to local needs in a very different world region with different needs, those two different program-families will never run together. Hence my idea of reserving a range of port numbers for "deployment-specific" applications, whatever they may be in a given deployment.
M~
I'm not blocking really, just fail to understand the need to "reserve" a port range in Osmocom. We're not going to fork iana.org. It is far too easy to just pick some random port range that is unlikely to ever collide with Osmocom.
I think I don't really grasp the "deployment-specific" part yet.
On Mon, Dec 25, 2023 at 12:43:50AM -0800, Mychaela Falconia wrote:
The table in the wiki page already lists 5000 as A/IP for osmo-bsc_nat. I am now thinking about 5100 to 5199 range.
or 6000 or 10001. There will always be some program or some service out there that picked a port in the same range. Ultimately it's up to each individual site to avoid conflicts. Same with picking RTP port ranges for osmo-mgw.
When we designate a port range for use by sites, that may *encourage* developers from various third party projects to create port collisions between their projects, because we sort of ask them to stay within that range.
Please note the "deployment-specific" language I propose above. If I
deployment-specific == site-specific? When your applications are site specific, then you can adjust the ports to your site?
~N