Study resource

Read at your pace, then save it for later.

Unit 10: Transport Layer Protocols and Services

Section A — 1 Mark Questions

1. What is the primary purpose of the transport layer? [1 Mark]

Answer: To provide end-to-end communication services to processes running on different host machines.

2. Define a connection-oriented service. [1 Mark]

Answer: A service where a logical connection must be established between sender and receiver before data transfer occurs.

3. Name the transport layer protocol that provides connectionless service. [1 Mark]

Answer: UDP (User Datagram Protocol).

4. Is TCP a connection-oriented or connectionless protocol? [1 Mark]

Answer: Connection-oriented.

5. What does UDP stand for? [1 Mark]

Answer: User Datagram Protocol.

6. Name the mechanism used by TCP to ensure reliable data delivery. [1 Mark]

Answer: Acknowledgments and retransmissions.

7. Does UDP provide flow control? [1 Mark]

Answer: No.

8. What is the standard size of a UDP header? [1 Mark]

Answer: 8 bytes.

9. Which transport protocol is preferred for real-time applications like voice calls? [1 Mark]

Answer: UDP.

10. Define a port number. [1 Mark]

Answer: A 16-bit identifier used to distinguish between different processes on a single host.

11. What happens to out-of-order segments in TCP? [1 Mark]

Answer: They are reordered by the receiver before delivery to the application layer.

12. What is the first step of the TCP connection establishment? [1 Mark]

Answer: Sending a SYN (Synchronize) packet.

13. Does TCP provide error checking? [1 Mark]

Answer: Yes, via a checksum.

14. State one disadvantage of TCP compared to UDP. [1 Mark]

Answer: Higher overhead due to connection management and reliability mechanisms.

15. What is the role of a sequence number in TCP? [1 Mark]

Answer: To keep track of the order of data segments sent.

16. Can a single host have multiple transport connections? [1 Mark]

Answer: Yes, using unique port numbers.

17. What is a socket? [1 Mark]

Answer: An endpoint for communication identified by an IP address and a port number.

18. What is the main characteristic of a connectionless service? [1 Mark]

Answer: Data packets are sent independently without prior setup.

19. Does TCP support full-duplex communication? [1 Mark]

Answer: Yes.

20. What is the purpose of a checksum in the transport layer? [1 Mark]

Answer: To detect errors in transmitted data.

Section B — 2/3 Mark Questions

1. Differentiate between connection-oriented and connectionless services. [2 Marks]

Answer: Connection-oriented services require a setup phase before data transfer and guarantee delivery order, whereas connectionless services send data as independent packets without setup, offering no guarantee of delivery or order.

2. List three key services provided by the Transport Layer. [3 Marks]

Answer: 1) End-to-end logical communication between processes. 2) Error detection and correction. 3) Multiplexing and demultiplexing of data streams.

3. Why is UDP referred to as an 'unreliable' protocol? [2 Marks]

Answer: UDP is termed unreliable because it does not acknowledge received packets, does not retransmit lost data, and does not guarantee that packets arrive in the order they were sent.

4. Explain the concept of multiplexing in the transport layer. [2 Marks]

Answer: Multiplexing allows the transport layer to gather data from multiple application processes, wrap them in transport headers, and pass them to the network layer as a single stream.

5. Describe the function of the TCP three-way handshake. [3 Marks]

Answer: It establishes a logical connection. The client sends a SYN packet, the server responds with a SYN-ACK packet, and the client finishes by sending an ACK packet, ensuring both sides are ready to communicate.

6. Why does TCP require more overhead than UDP? [2 Marks]

Answer: TCP requires overhead to manage connection states (SYN/ACK/FIN), maintain sequence numbers for ordering, and track acknowledgments for reliability, which UDP does not perform.

7. Briefly describe how TCP performs error control. [3 Marks]

Answer: TCP uses checksums to identify corrupted data. If data is corrupted, it is discarded. TCP then uses acknowledgments and timeout mechanisms to detect missing packets and triggers retransmission to ensure reliability.

8. What is the significance of a port number in transport layer protocols? [2 Marks]

Answer: Port numbers enable demultiplexing by allowing the receiving host to direct incoming transport layer data to the specific application process that is waiting for that data.

9. Describe the connection release process in TCP. [3 Marks]

Answer: Connection release typically uses a four-way handshake. Each side sends a FIN segment to indicate it has no more data to send, and the other side acknowledges it with an ACK, effectively closing both directions of the connection.

10. When would an application choose to use UDP over TCP? [2 Marks]

Answer: Applications choose UDP when low latency is more critical than reliability, such as in live audio/video streaming or online gaming where retransmitting lost packets would cause undesirable delays.

Section C — 5 Mark Questions

1. Compare TCP and UDP across multiple dimensions. [5 Marks]

Answer:

FeatureTCPUDP
ConnectionConnection-orientedConnectionless
ReliabilityGuaranteed deliveryBest-effort delivery
OrderingSegments are reorderedNo ordering
Flow ControlYes, window-basedNo
SpeedSlower due to overheadFaster due to minimal header

Key Differences

  • TCP provides a reliable byte stream, making it suitable for applications like HTTP or FTP where data integrity is paramount.
  • UDP is a datagram-based service, useful for broadcast/multicast and real-time media where speed is the priority over perfect delivery.

2. Explain the role of the Transport Layer in the network architecture. [5 Marks]

Answer:

Introduction

The transport layer acts as the bridge between the application layer and the network layer, providing process-to-process communication.

Main Functions

  • Multiplexing/Demultiplexing: It allows multiple processes to use the network simultaneously by assigning port numbers to distinguish them.
  • Reliability: It provides mechanisms to ensure that data arrives intact, without errors, and in the correct order.
  • Flow Control: It prevents a fast sender from overwhelming a slow receiver by managing the data transmission rate.
  • Congestion Control: It adjusts the rate of data injection into the network to avoid overloading the intermediate routers.
  • Connection Management: It handles the establishment, maintenance, and teardown of logical connections between two hosts.

3. Describe the TCP connection establishment and release process in detail. [5 Marks]

Answer:

Connection Establishment (Three-Way Handshake)

  • SYN: The client sends a segment with the SYN bit set to request a connection.
  • SYN-ACK: The server replies with a segment where both SYN and ACK bits are set, acknowledging the client's request.
  • ACK: The client sends a final ACK to the server, confirming the connection is established.

Connection Release

  • TCP uses a graceful shutdown. When a host is done, it sends a FIN segment. The receiving end acknowledges this with an ACK. Once the other side has no more data, it also sends a FIN, which is acknowledged by the first sender. This ensures both sides have finished processing all queued data.

4. Discuss the header structure and characteristics of UDP. [5 Marks]

Answer:

Characteristics

UDP is a simple, stateless protocol that provides minimal service. It is ideal for protocols that require fast transmission and can tolerate some packet loss.

Header Structure

The UDP header is fixed at 8 bytes, divided into four 16-bit fields:

  • Source Port: Identifies the sending port.
  • Destination Port: Identifies the receiving process.
  • Length: Specifies the total size of the header and data in bytes.
  • Checksum: Used to verify the integrity of the header and data.

Application

UDP is heavily utilized in DNS (Domain Name System) queries and DHCP (Dynamic Host Configuration Protocol) where a lightweight, low-overhead transaction is preferred over a sustained connection.

5. Explain how TCP ensures reliability in data transmission. [5 Marks]

Answer:

Introduction

TCP's reliability is achieved through several integrated mechanisms designed to track, verify, and correct data transmission issues.

Key Mechanisms

  • Sequence Numbers: Every byte sent is numbered. This allows the receiver to reassemble segments in the correct order and detect missing gaps.
  • Acknowledgments (ACKs): The receiver sends ACKs to confirm the bytes received. If the sender does not receive an ACK within a specified time, it assumes the segment was lost.
  • Retransmission: When a timeout occurs or duplicate ACKs are received, TCP retransmits the missing segment to ensure no data is lost.
  • Checksums: Every TCP segment contains a checksum to detect if any part of the header or data has been corrupted during transit.
  • Flow Control: TCP uses a sliding window mechanism, where the receiver advertises how much space is left in its buffer, preventing the sender from exceeding the receiver's capacity.

xxx

Did this help you understand better?

Your feedback improves the quality of this resource for everyone.