L11 - Transport Layer: UDP and TCP

(a)

000000

  • None of the control bits are set.
  • A data segment without ACK.

(b)

000001

FIN

  • used in connection termination request
  • this signaling segment does not contain any data

©

010001

ACK + FIN

  • used in confirmation of connection termination
  • this signaling segment does not contain any data

(a) 0632 => Port Number 1586

(b) 000D => Port Number 13

© 001C => 28 bytes

(d) Length of the data = total length - header

28 bytes - 8 bytes = 20 bytes

(e)

If we look at the destination port number, 13 is a well-known port.

meanwhile the source port number, 1586 is a registered port.

So it indicates that A Client is sending a UDP signal to A Server.

The packet directed from a client to a server.

(f)

Port 13 : Daytime

Sequence number (32 bits).

Therefore maximum sequence number = 2321=42949672952^{32} - 1 = 4294967295

If the sequence number starts with 7000, it takes 2327000+12^{32} - 7000 + 1 to go back to zero.

It takes (2327000+1)bytes1Mbytes/s=4295\frac{(2^{32} - 7000 + 1)bytes}{1Mbytes/s} = 4295 seconds.

  • A SYN segment cannot carry data, but it consumes one sequence number
  • A SYN + ACK segment cannot carry data, but does consume one sequence number.

The Acknowledgment of confirmation will not consume 1 sequence number.

  • An ACK segment, if carrying no data, consumes no sequence number.

For the ACK, we can label the incremented SN or the unincremented SN.

After this segment, the next segment “->” with Data must be starting with SSN 14535.

(a)

An ACK segment with acknowledgement number 2500 and window size advertisement 5000 is received

(b)

A segment carrying 4000 bytes is sent

Piggybacking

TCP header = 20 bytes

An ACK segment, if carrying no data, consumes no sequence number.

Message Total Length Sequence Number ACK Number
1 50+20 200 650
2(ACK) 20(only header) 650 200+50
3 300+20 250 650
4(ACK) 20(only header) 650 250+300
5 150+20 650 550
6(ACK) 20(only header) 550 650+150