---
title: "Port numbers and transport services"
subject: "Computer Networks and Security"
chapter: 5
key: "semester_7/computer_networks_and_security:port-number-transport-services"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/port-number-transport-services
site: BCT Engineering
---

# Port numbers and transport services

Computer Networks and Security · Chapter 5: Transport Layer

- Asked in: 2071 Chaitra, 1+2 marks
- Video: [Lec-22 : What are Ports in Networking 🛜 Why Ports are Used?](https://www.youtube.com/watch?v=cPWn6Sse4Ss) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/port-number-transport-services
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-5

## Question

Why is port number used in networking? What are the services of the transport layer?

## Short answer

Port numbers (16-bit) identify specific processes on a host, enabling process-to-process delivery since IP addresses only identify hosts. Transport layer services include process-to-process delivery, segmentation/reassembly, multiplexing/demultiplexing, connection management (TCP), reliable delivery with error control and sequencing (TCP), flow control, and congestion control.

## Answer

#### Why port numbers are used
An IP address only identifies the host, but many processes run on one host at the same time. A **port number** (16 bits, 0 to 65,535) identifies the particular application process, so the transport layer can deliver data to the correct process (**process-to-process delivery**). The pair IP address + port is a socket.

| Range | Name | Examples |
|---|---|---|
| 0 to 1023 | Well-known | HTTP 80, HTTPS 443, FTP 21, SMTP 25, DNS 53 |
| 1024 to 49151 | Registered | MySQL 3306 |
| 49152 to 65535 | Dynamic / ephemeral | Client-side ports |

#### Services of the transport layer
1. **Process-to-process delivery** using ports.
2. **Segmentation and reassembly** of application data.
3. **Multiplexing and demultiplexing** of many applications over the single network-layer (IP) service.
4. **Connection management** (set-up and release; TCP).
5. **Reliable delivery:** error control, sequencing and retransmission (TCP).
6. **Flow control** to protect the receiver and **congestion control** to protect the network.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Why is a port number needed in addition to the IP address?
   A. To identify the particular application process on the host
   B. To find the network
   C. To encrypt data
   D. To identify the MAC address
   Answer: A. IP identifies the host; the port identifies the process, giving process-to-process delivery. (Key point: Why ports)

2. Which range is well-known ports?
   A. 1024 to 49151
   B. 0 to 1023
   C. 49152 to 65535
   D. 0 to 255
   Answer: B. Well-known ports are 0 to 1023 (HTTP 80, DNS 53 etc.). (Key point: Port ranges)

3. What does multiplexing/demultiplexing do in the transport layer?
   A. Combines several routers
   B. Lets many applications share one IP connection
   C. Translates names to addresses
   D. Encrypts segments
   Answer: B. Many applications use one IP connection; ports separate their data at the receiver. (Key point: Mux/demux)

## Related in Computer Networks and Security

- [Why two transport protocols exist](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Awhy-two-transport-protocols) — Computer Networks and Security, chapter 5

## Related in other subjects

- [ISDN architecture, services and channels](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Aisdn-architecture-channels) — Telecommunications, chapter 8, asked 2×
- [Equivalence partitioning: telephone numbers](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Aequivalence-partitioning) — Software Engineering, chapter 8
- [Algorithm for numbers divisible by 9 not 6](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgo-flowchart-divisible-9-not-6) — Computer Programming, chapter 2
- [Largest of n numbers in FORTRAN](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Afortran-largest-n-numbers) — Computer Programming, chapter 11
