CITS3002 Computer Networks  
prev
next CITS3002 help3002 CITS3002 schedule  

Port numbers

IP addresses, alone, are not enough as they only address hosts, and not individual operating system processes on those hosts.

From the perspective of any transport protocol, such as TCP (next), each arriving frame is further identified by a 16-bit positive port number that identifies the 'software end-point' to receive the payload.

One role of TCP is to demultiplexed each arriving segment to its corresponding communication end-point, using a port as an index.

Port numbers below 1024 are described as reserved ports, and on operating systems with distinct users and privilege levels, elevated privilege ('root' or 'administrator' access) is required to create a 'software end-point' bound to such ports.

The file /etc/services on Linux and macOS, or C:\Windows\System32\drivers\etc on Windows, lists ports commonly used (worldwide), and ports in use for dedicated/local applications:

// Ports below 1024 are reserved

echo      7/tcp
ftp       21/tcp         # File transfer protocol
ssh       22/tcp         # SSH Remote Login Protocol
telnet    23/tcp         # Telnet
smtp      25/tcp         # Simple mail transfer protocol
finger    79/tcp
http      80/tcp         # Hypertext transfer protocol
pop3      110/tcp        # POP version 3
sunrpc    111/tcp        # RPC 4.0 portmapper TCP
nntp      119/tcp        # Network news transfer protocol
https     443/tcp        # Secured hypertext transfer protocol
exec      512/tcp        # Remote execution
login     513/tcp

// Ports above 1023 are not reserved, but may be pre-assigned:

ms-sql-s 1433/tcp        # Microsoft-SQL-Server
license  1702/tcp        # matlab/FLEXlm licence manager
nfs      2049/udp        # The network file system (NFS)
x11      6000/tcp        # the X Window System




CITS3002 Computer Networks, Lecture 8, Transport layer protocols and APIs, p2, 24th April 2024.