# Thread: 65,535 or 65,536 ports?

1. ## 65,535 or 65,536 ports?

Hello fellow member's of AO. I need to clear something up between a friend and me. He's saying their are actually 65,536 ports, I'm saying their are 65,535 port's. So which one is correct? Now I already searched google found this URL which has been posted here before http://www.iana.org/assignments/port-numbers

And it state's:

The port numbers are divided into three ranges: the Well Known Ports,
the Registered Ports, and the Dynamic and/or Private Ports.

The Well Known Ports are those from 0 through 1023.

The Registered Ports are those from 1024 through 49151

The Dynamic and/or Private Ports are those from 49152 through 65535
So my question is are their 65,535 or 65,536 ports? Thank you and all help is greatly appreciated.

2. 65535 is the number ........... 'WE' count from ZERO = 65536 in total it is also 2 to the 16th power

3. 65535 is the number ........... 'WE' count from ZERO = 65536 in total it is also 2 to the 16th power
For a change I will translate into English..

the TOTAL number is 65536.. as Foxy commented 0 is counted as a port.. so counting would be like counting your fingers.. the first one is 1.. now count them with the first one being zero.. who has stolen the finger.?

Is there any application (useful or malicious) that uses Port 0?

4. Is there any application (useful or malicious) that uses Port 0?
Thank you for the fast reply's greatly appreciated. Now to answer your question port0 can be used for malicious purposes. http://www.networkpenetration.com/port0.html

5. Port 0 is officially a reserved port in TCP/IP networking, meaning that it should not be used for any TCP or UDP network communications.

However, port 0 sometimes takes on a special meaning in network programming, particularly Unix socket programming. In this environment, port 0 is a programming technique for specifying system-allocated (dynamic) ports.
Instead of "hard-coding" a particular port number, or writing code that searches for an open port, Unix programmers simply specify port 0 as a connection parameter. That triggers the operating system to automatically search for and return the next available port in the dynamic port number range.

This programming technique does not work the same way in Microsoft Windows as it does in Unix.

Usually, when someone posts a message about "port 0" traffic or alerts, it is little more than an artifact of some monitoring devices inability to correctly report fragments.
Source:http://isc.sans.org/diary.php?date=2005-06-03

CL believes the following are true:
A correctly implemented stack responds to a request to use port 0 by selection of a not-currently-in-use port, generally as low as possible.
Tcl is "passive", that is, simply inherits the behavior of the C API over which it is implemented.
All recent Tcl versions for Unix and Win* behave this way for port 0 requests.
Source:http://wiki.tcl.tk/2230

While this is all googled,anyone know how often its used?

6. Port 0 is disallowed per se on the grounds that a server that responds on port 0 will dynamically assign a port to the communication. Since no-one really wants the server assigning ports dynamically it is unused and considered a bad thing if poeple try to connect to it.

7. Port 0 is sometimes used in OS fingerprinting.

http://www.securiteam.com/securityre...XP0Q2AAKS.html

8. thanks guys..

ta

9. Same here,din't know about port 0

10. / off topic

Teacher is giving a mental arithmetic test to her class. Little Johnny has his hands behind his back and is counting on his fingers.

The teacher asks him "what is four and three"............"seven miss"............"very good! now lets try it with your hands in your pockets?"

"What is five and five?"

"errrrrrr eleven miss?"

Page 1 of 2 12 Last

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•