Suggest an editImprove this articleRefine the answer for “What is a port?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**A port** is a **logical number at the transport layer (L4)** used to **identify a specific application or process on a device**. **Key point:** a port is needed to determine which exact application on the computer the data is intended for.Shown above the full answer for quick recall.Answer (EN)Image**A port** is a **logical number at the transport layer (L4)** used to **identify a specific application or process on a device**. Simply put: **a port is needed to determine which exact application on the computer the data is intended for**. --- ## Why a port is needed The IP address answers the question: > **which computer to send the data to** The port answers the question: > **which program on that computer to pass the data to** Without ports: - data would reach the device - but the system would not know **which application to hand it to** --- ## How a port is used in practice Data transmission always uses **two ports**: - **source port** - which application the data was sent from - **destination port** - which application it is intended for Example: - browser → port **443** (HTTPS) - mail client → port **25** (SMTP) --- ## Port range A port is a number from **0 to 65535**. ### Main ranges: ### 1. **Well-known ports (0-1023)** - standard services - usually require administrator privileges Examples: - 80 - HTTP - 443 - HTTPS - 22 - SSH - 25 - SMTP --- ### 2. **Registered ports (1024-49151)** - applications and services - often used by servers and programs --- ### 3. **Dynamic / Ephemeral ports (49152-65535)** - temporary ports - usually used by clients - assigned automatically by the OS --- ## Ports and protocols Important for the interview. Ports exist **only together with a protocol**: - TCP port 80 ≠ UDP port 80 - TCP and UDP have **separate port spaces** --- ## What is important to remember - a port is **not a physical connector** - a port is a **logical concept** - a port belongs to the **transport layer** - the combination: ``` IP + port + protocol ``` uniquely identifies a connectionFor the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.