DCN UNIT 3 - UDP, Connection-less, Selective Repeat, Multiplexing, De-multiplexing, Additive Increase, Multiplicative Decrease, GBN, TCP Segment Structure, Connection-oriented, Slow Start

Data Communication and Networking - Unit III

1. Explain, why UDP is said to be connection-less?


UDP (User Datagram Protocol)
is said to be connection-less because it does not establish a dedicated end-to-end connection before data transmission. Here are the key points:

  • No Connection Establishment: Unlike TCP, UDP does not perform a handshake process to set up a connection before data is sent.
  • Datagram-Based Communication: Data is sent in discrete packets called datagrams, each independently routed and potentially arriving out of order or not at all.
  • No Guarantees: UDP does not guarantee delivery, order, or error-checking, making it suitable for applications where speed is critical and errors can be tolerated (e.g., live streaming, online gaming).

2. Explain selective repeat with the help of example.

Selective Repeat is an error control protocol for data transmission that allows the receiver to acknowledge received packets individually and request retransmission of only those packets that are missing or corrupted. Here's an example:

Consider a sender that transmits packets numbered 1 through 5. If the receiver successfully receives packets 1, 2, and 4 but packet 3 is lost and packet 5 is received correctly, the receiver will acknowledge packets 1, 2, and 4 and request retransmission of packet 3. The sender will then retransmit packet 3, and the receiver will acknowledge it upon receipt.

This method ensures efficient use of the network by retransmitting only the missing or erroneous packets rather than all packets following the lost one.

3. Explain Multiplexing and De-multiplexing

Multiplexing is the process of combining multiple signals or data streams into one signal over a shared medium. This is used to optimize the use of available bandwidth and improve the efficiency of data transmission. There are several types of multiplexing, including:

  • Time Division Multiplexing (TDM): Each data stream is assigned a specific time slot in which to send its data over a shared medium.
  • Frequency Division Multiplexing (FDM): Each data stream is assigned a specific frequency within the available bandwidth.
  • Wavelength Division Multiplexing (WDM): Similar to FDM but used in fiber-optic communications where each data stream is assigned a specific wavelength.

De-multiplexing is the reverse process of multiplexing. It involves separating the combined signals or data streams back into their original individual signals at the receiver end. The de-multiplexer uses the specific characteristics (time slot, frequency, wavelength) to identify and extract each individual data stream.

4. Explain the following: i. Additive increase, Multiplicative decrease ii. GBN

i. Additive Increase, Multiplicative Decrease (AIMD):

AIMD is a congestion control algorithm used in TCP to manage network traffic and avoid congestion. The algorithm adjusts the congestion window (cwnd) as follows:

  • Additive Increase: When no packet loss is detected, the congestion window size is increased linearly by a fixed amount, typically one Maximum Segment Size (MSS) per Round-Trip Time (RTT).
  • Multiplicative Decrease: When packet loss is detected, the congestion window size is reduced multiplicatively, usually by half. This helps to quickly reduce the load on the network to alleviate congestion.

ii. Go-Back-N (GBN):

GBN is an automatic repeat request (ARQ) protocol for reliable data transmission. In GBN, the sender can send several frames before needing an acknowledgment for the first frame. The sender maintains a window of frames that can be sent. If an error is detected in a frame, all subsequent frames in the window are retransmitted. This ensures that frames are received in the correct order but can be inefficient if many frames need to be retransmitted.

5. Draw and explain TCP segment structure.

The TCP segment structure consists of the following fields:

  • Source Port (16 bits): Identifies the sending port.
  • Destination Port (16 bits): Identifies the receiving port.
  • Sequence Number (32 bits): Specifies the sequence number of the first byte of data in this segment.
  • Acknowledgment Number (32 bits): If the ACK flag is set, this contains the value of the next sequence number that the sender is expecting.
  • Data Offset (4 bits): Specifies the size of the TCP header.
  • Reserved (3 bits): Reserved for future use and should be set to zero.
  • Flags (9 bits): Includes control flags such as URG, ACK, PSH, RST, SYN, and FIN.
  • Window Size (16 bits): Specifies the size of the sender's receive window.
  • Checksum (16 bits): Used for error-checking of the header and data.
  • Urgent Pointer (16 bits): If the URG flag is set, this field indicates the offset from the sequence number where the urgent data ends.
  • Options (variable): May contain additional options for TCP, such as maximum segment size.
  • Data (variable): Contains the actual payload data.

6. Explain, why TCP is said to be connection-oriented?

TCP (Transmission Control Protocol) is said to be connection-oriented because it establishes a reliable connection between the sender and receiver before data transfer begins. Here are the key points:

  • Three-Way Handshake: TCP uses a three-way handshake process (SYN, SYN-ACK, ACK) to establish a connection, ensuring both sides are ready for data transfer.
  • Reliable Data Transfer: TCP ensures that all data packets are delivered, acknowledged, and re-transmitted if lost or corrupted, maintaining data integrity.
  • Connection Maintenance: During the communication session, TCP maintains the connection state and ensures that packets are delivered in the correct order.
  • Graceful Termination: TCP terminates the connection gracefully using a four-step process (FIN, ACK, FIN, ACK), ensuring that all data has been transmitted and acknowledged before closing the connection.

7. Explain the following: i. Additive increase, Multiplicative decrease ii. Slow start

i. Additive Increase, Multiplicative Decrease (AIMD):

AIMD is a congestion control algorithm used in TCP to manage network traffic and avoid congestion. The algorithm adjusts the congestion window (cwnd) as follows:

  • Additive Increase: When no packet loss is detected, the congestion window size is increased linearly by a fixed amount, typically one Maximum Segment Size (MSS) per Round-Trip Time (RTT).
  • Multiplicative Decrease: When packet loss is detected, the congestion window size is reduced multiplicatively, usually by half. This helps to quickly reduce the load on the network to alleviate congestion.

ii. Slow Start:

Slow Start is a congestion control algorithm used by TCP to avoid network congestion by gradually increasing the congestion window size. Here’s how it works:

  • At the beginning of a connection or after a timeout, the congestion window is set to a small value (usually 1 MSS).
  • For each acknowledgment received, the congestion window size is increased exponentially (doubling each RTT).
  • This exponential growth continues until a threshold is reached or packet loss occurs, after which the algorithm switches to additive increase to prevent congestion.