1753776 Members
7169 Online
108799 Solutions
New Discussion юеВ

Re: Port Number

 
Charles_151
Advisor

Port Number

Hi

Can anybody clarify this?

Will there be any port number change between hp-ux(9.x,10.x) and solaris9?

Where I will get good information about Port number?
7 REPLIES 7
Florian Heigl (new acc)
Honored Contributor

Re: Port Number

The regular assigned ports shouldn't have changed as they are not assigned by the OS vendors but by the IANA (http://www.iana.org/assignments/port-numbers), but You would be best of comparing the /etc/services of all the operating systems.
yesterday I stood at the edge. Today I'm one step ahead.
Charles_151
Advisor

Re: Port Number

Florian

Thanks Flori.

So when I migrate application from HP to Solaris or vice versa should I only look what are the changes in /etc/services?

Will that be suffice?
Florian Heigl (new acc)
Honored Contributor

Re: Port Number

Only if the applications are registered in /etc/services - most vendors are too lazy to do that.

But I think this is a small issue.
You can simply use the following

netstat -na | grep LISTEN >/tmp/netstat.noapp
/etc/init.d/application start
netstat -na | grep LISTEN >/tmp/netstat.withapp

diff netstat.noapp netstat.withapp

If this is about firewall rules, take good care to include the IPv6 ports on the solaris box if IPv6 is in the kernel.

yesterday I stood at the edge. Today I'm one step ahead.
TwoProc
Honored Contributor

Re: Port Number

Good post Florian - thanks for the port list.
We are the people our parents warned us about --Jimmy Buffett
Steven E. Protter
Exalted Contributor

Re: Port Number

I don't think you are going to find a lot of differences in port usage moving through the various hp-ux versions. You will find stuff added as internet services and stuff were added.

Solaris is going to be different, but recognizable to a Unix admin.

Note that this is documented in the /etc/services file, but oracle and other venders don't bother to use or update this file.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Charles_151
Advisor

Re: Port Number

Thanks for the info.

I made this question because I am making some document where I require information like impact of application(any) on the target platform when I migrate from hp(9.x,10.x) to Solaris9.

So I think port number will not make any issue while migrating application unless it is registered in the /etc/services. Am I correct?

Any other addition input?
rick jones
Honored Contributor

Re: Port Number

I guess my additional input would be you should be migrating from HP-UX 9 and 10 to HP-UX 11i :) Apart from that...

The HP-UX 9 and 10 TCP/IP stacks were based on BSD networking code. HP-UX 10.20 had an HP value-add called Inbound Packet Scheduling (IPS) that increased MP scaling when the number of CPUs was > the number of NICs. In HP-UX 11 (circa 1998 or so) that became TOPS for Thread Optimized Packet Scheduling. I do not believe that Solaris 9 has such a thing.

As for port numbers, as already pointed-out, "well known" portnumbers will remain the same - telnet, ftp, etc will still be at the same port numbers. I suspect the anonymous or ephemeral port number space will be different. On HP-UX 9 and 10 that was from (IIRC) 1025 to 5000. On Solaris 9 I believe it may be > 32768. So long as your code is properly written to have an _unsigned_ short for port numbers you should be OK.

Another consideration since we are talking about things networking - if you are porting to Solaris x86 as opposed to Solaris SPARC (One presumes that all the main action for Solaris in the future iwll be in the x86 space) you need to keep in mind that Solaris x86 is _little-endian_ whereas HP-UX * are _big-endian_ and port numbers and IP addresses and such must be presented in network (aka big-endian) order to socket calls. That means your code needs to have apropriate hton* and ntoh* calls in it or it will start to fail in strange-looking ways when you start to run it on a little-endian system such as Solaris x86.
there is no rest for the wicked yet the virtuous have no pillows