Skip to main content

Computer Network - Transport Layer

Multiplexing/Demultiplexing (Transport Layer)​

20250920191454

UDP Multiplexing/Demultiplexing: Uses 2-tuple (D-IP, D-Port)

20250920191512

TCP Multiplexing/Demultiplexing: Uses 4-tuple (S-IP, S-Port, D-IP, D-Port)

20250920191531

Rdt2.0 FSM (Finite State Machine) Specification​

Bit errors may occur: 0 becomes 1, 1 becomes 0

20250920191554

Sender handles corrupted ACK, NAK packets

rdt2.1 adds sequence number to ensure messages are not processed repeatedly

20250920191611

When ACK received, process next message, seq + 1.

Receiver handles corrupted ACK, NAK packets

20250920191649

rdt2.2 removes NAK

Receiver resends previous ACK and sequence number when message processing fails

20250920191709

rdt3.0 Packets may be lost

20250920191726

20250920191747

20250920191802

20250920191947

Go-Back-N​

20250920192003

Selective Repeat​

20250920192018

20250920192043

Correct Mathematical Constraint Relationship​

2^k β‰₯ 2N

That is:


Ns + Nr ≀ 2^k / 2 = N_max

2N ≀ 2^k
N ≀ 2^(k-1)

Where:

  • k: Number of bits for sequence number
  • 2^k: Sequence number space size
  • N: Sender window size (Sender and Receiver windows are generally equal)
  • Ns: Sender window size
  • Nr: Receiver window size (In SR, often set Ns = Nr = N)
k (Seq bits)Sequence Number Space (2^k)Max Window Size (N ≀)
384
4168
53216

TCP Structure​

20250920192058

20250920192127

  • Represents: Host A sent data 'C', which is its 42nd byte.
  • Also ACK = 79: It tells B: "I have received your data up to byte 78, the next one I want is byte 79."
  • B sent data byte number 79 (This is byte number in B's sending direction)
  • ACK = 43: B tells A: "I received your 42nd byte ('C'), now I am waiting for the 43rd byte."
  • Host A's next byte is 43 (It finished previous 42)
  • Its ACK = 80, indicates it received byte 79 from B, next byte is 80.

TCP Connection Establishment and Termination​

Connection Establishment

20250920192158

Connection Termination

20250920192549

20250920192558

20250920192610

All content comes from sources, course copyright reserved. Document is for learning use only.

If there is any infringement, contact [email protected]

https://www.icourse163.org/learn/HIT-154005?tid=1474180488#/learn/announce

Agreement
The code part of this work is licensed under Apache License 2.0 . You may freely modify and redistribute the code, and use it for commercial purposes, provided that you comply with the license. However, you are required to:
  • Attribution: Retain the original author's signature and code source information in the original and derivative code.
  • Preserve License: Retain the Apache 2.0 license file in the original and derivative code.
The documentation part of this work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License . You may freely share, including copying and distributing this work in any medium or format, and freely adapt, remix, transform, and build upon the material. However, you are required to:
  • Attribution: Give appropriate credit, provide a link to the license, and indicate if changes were made.
  • NonCommercial: You may not use the material for commercial purposes. For commercial use, please contact the author.
  • ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.