Discussion:
Sybase Client Port Allocations
(too old to reply)
HP News Feed
2007-05-17 09:42:48 UTC
Permalink
A customer has asked me how Sybase allocates ports for client connections to
Sybase SQL Server 11.0 on OpenVMS. I know that the server listens on a
specific port for connection requests, in this case port 5010. I can see
using 'netstat -a' on the client PC that both application and ISQL sessions
to the server have an ESTABLISHED link to that port on the server, using a
port on the client. e.g. :

TCP MyClient:1177 MyServer:5010 ESTABLISHED
TCP MyClient:1186 MyServer:5010 ESTABLISHED
TCP MyClient:1194 MyServer:5010 ESTABLISHED

The top two (ports 1177 and 1186) are application connections, the bottom
one (port 1194) is an ISQL session.

My customer is planning on implementing a firewall between clients and
server, and needs to be able to allow/deny traffic on specific ports.
Consequently he needs to know the range of client-side ports that Sybase
will use for these connections. I have reviewed the documentation and
searched the internet but cannot find any information on the port ranges
that will be used. Are these fixed ? Configurable ? Any information would
be welcome.

Thanks,

Steve.
Rob Verschoor
2007-05-17 11:08:05 UTC
Permalink
The client-side port assignment is done by the OS, not by Sybase.

HTH,

Rob V.
-------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5 / TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE" (new edition!)
"The Complete Sybase ASE Quick Reference Guide" (new edition!)
"The Complete Sybase Replication Server Quick Reference Guide"

mailto:***@YOUR.SPAM.sypron.nl.NOT.FOR.ME
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------
Post by HP News Feed
A customer has asked me how Sybase allocates ports for client connections
to Sybase SQL Server 11.0 on OpenVMS. I know that the server listens on a
specific port for connection requests, in this case port 5010. I can see
using 'netstat -a' on the client PC that both application and ISQL sessions
to the server have an ESTABLISHED link to that port on the server, using a
TCP MyClient:1177 MyServer:5010 ESTABLISHED
TCP MyClient:1186 MyServer:5010 ESTABLISHED
TCP MyClient:1194 MyServer:5010 ESTABLISHED
The top two (ports 1177 and 1186) are application connections, the bottom
one (port 1194) is an ISQL session.
My customer is planning on implementing a firewall between clients and
server, and needs to be able to allow/deny traffic on specific ports.
Consequently he needs to know the range of client-side ports that Sybase
will use for these connections. I have reviewed the documentation and
searched the internet but cannot find any information on the port ranges
that will be used. Are these fixed ? Configurable ? Any information
would be welcome.
Thanks,
Steve.
HP News Feed
2007-05-17 13:21:53 UTC
Permalink
Thanks for the prompt reply Rob. I don't suppose you know how the OS (Win
XP) chooses which port to use ? Does Sybase make a system call to get one
allocated ?

Regards,

Steve.
Post by Rob Verschoor
The client-side port assignment is done by the OS, not by Sybase.
HTH,
Rob V.
-------------------------------------------------------------
Rob Verschoor
Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5 / TeamSybase
"Tips, Tricks & Recipes for Sybase ASE" (new edition!)
"The Complete Sybase ASE Quick Reference Guide" (new edition!)
"The Complete Sybase Replication Server Quick Reference Guide"
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------
Post by HP News Feed
A customer has asked me how Sybase allocates ports for client connections
to Sybase SQL Server 11.0 on OpenVMS. I know that the server listens on a
specific port for connection requests, in this case port 5010. I can see
using 'netstat -a' on the client PC that both application and ISQL
sessions to the server have an ESTABLISHED link to that port on the
TCP MyClient:1177 MyServer:5010 ESTABLISHED
TCP MyClient:1186 MyServer:5010 ESTABLISHED
TCP MyClient:1194 MyServer:5010 ESTABLISHED
The top two (ports 1177 and 1186) are application connections, the bottom
one (port 1194) is an ISQL session.
My customer is planning on implementing a firewall between clients and
server, and needs to be able to allow/deny traffic on specific ports.
Consequently he needs to know the range of client-side ports that Sybase
will use for these connections. I have reviewed the documentation and
searched the internet but cannot find any information on the port ranges
that will be used. Are these fixed ? Configurable ? Any information
would be welcome.
Thanks,
Steve.
Rob Verschoor
2007-05-17 14:18:51 UTC
Permalink
I cannot help you with that, sorry...

Rob V.
Post by HP News Feed
Thanks for the prompt reply Rob. I don't suppose you know how the OS (Win
XP) chooses which port to use ? Does Sybase make a system call to get one
allocated ?
Regards,
Steve.
Post by Rob Verschoor
The client-side port assignment is done by the OS, not by Sybase.
HTH,
Rob V.
-------------------------------------------------------------
Rob Verschoor
Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5 / TeamSybase
"Tips, Tricks & Recipes for Sybase ASE" (new edition!)
"The Complete Sybase ASE Quick Reference Guide" (new edition!)
"The Complete Sybase Replication Server Quick Reference Guide"
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------
Post by HP News Feed
A customer has asked me how Sybase allocates ports for client connections
to Sybase SQL Server 11.0 on OpenVMS. I know that the server listens on
a specific port for connection requests, in this case port 5010. I can
see using 'netstat -a' on the client PC that both application and ISQL
sessions to the server have an ESTABLISHED link to that port on the
TCP MyClient:1177 MyServer:5010 ESTABLISHED
TCP MyClient:1186 MyServer:5010 ESTABLISHED
TCP MyClient:1194 MyServer:5010 ESTABLISHED
The top two (ports 1177 and 1186) are application connections, the
bottom one (port 1194) is an ISQL session.
My customer is planning on implementing a firewall between clients and
server, and needs to be able to allow/deny traffic on specific ports.
Consequently he needs to know the range of client-side ports that Sybase
will use for these connections. I have reviewed the documentation and
searched the internet but cannot find any information on the port ranges
that will be used. Are these fixed ? Configurable ? Any information
would be welcome.
Thanks,
Steve.
Michael Peppler
2009-05-21 05:42:13 UTC
Permalink
Post by HP News Feed
Thanks for the prompt reply Rob. I don't suppose you know how the OS (Win
XP) chooses which port to use ? Does Sybase make a system call to get one
allocated ?
Sybase just makes an OS system call to create the socket. There is no way
to know which ports this will use.

The firewall should be built in such a way that connections opened from
inside the firewall to the allowed port (say port 5000) are allowed, but
that connections that aren't initiated from inside the secure zone aren't
allowed.

Michael
--
Michael Peppler - Peppler Consulting SaRL
***@peppler.org - http://www.peppler.org
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ - http://www.peppler.org/FAQ/linux.html
Loading...