Glossary

Source Port

The source port is a 16-bit field in TCP and UDP headers that identifies the port number of the sender's application. It enables the receiver to know which application on the sender's host originated the packet, allowing for proper response routing.

Technical Details

Size
16 bits (2 bytes)
Range
0 – 65535
Well-known ports
0 – 1023 (requires privileged access)
Registered ports
1024 – 49151
Dynamic/Ephemeral ports
49152 – 65535
Protocols
TCP, UDP

Related Concepts

Port Binding

When a server application starts, it binds to a specific port number so incoming packets can be directed to the correct service.

NAT and Source Port Translation

Network Address Translators often modify the source port to allow multiple internal hosts to share a single public IP address.

Ephemeral Port Selection

Client applications typically use ephemeral ports (49152–65535) chosen by the operating system for outbound connections.