TCP - Networking - Lecture Slides, Slides of Computer Networks

A lecture from Networking with following key points: TCP, TCp Header, Sequence Numbers, Stream of Bytes, Sequence Numbers, Timing Illustration, Karels Algorithm, Initial Sequence Number

Typology: Slides

2013/2014

Uploaded on 01/29/2014

sundar
sundar 🇮🇳

4.7

(9)

104 documents

1 / 69

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
TCP
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45

Partial preview of the text

Download TCP - Networking - Lecture Slides and more Slides Computer Networks in PDF only on Docsity!

TCP

TCP Header

2

Source port Destination port

Sequence number

Acknowledgment

HdrLen (^) Flags Advertised window 0

Checksum Urgent pointer

Options (variable)

Data

Used to mux

and demux

What does TCP do?

Many of our previous ideas, but some key differences

  • Checksum

TCP Header

5

Source port Destination port

Sequence number

Acknowledgment

HdrLen (^) Flags Advertised window 0

Checksum Urgent pointer

Options (variable)

Data

Computed

over header

and data

TCP: Segments and

Sequence Numbers

TCP “Stream of Bytes” Service…

Application @ Host A

Application @ Host B

TCP Segment

  • IP packet
    • No bigger than Maximum Transmission Unit (MTU)
    • E.g., up to 1500 bytes with Ethernet
  • TCP packet
    • IP packet with a TCP header and data inside
    • TCP header  20 bytes long
  • TCP segment
    • No more than Maximum Segment Size (MSS) bytes
    • E.g., up to 1460 consecutive bytes from the stream
    • MSS = MTU – (IP header) – (TCP header)

IP Hdr

IP Data

TCP Data (segment) TCP Hdr

Sequence Numbers

Host A

ISN (initial sequence number)

Sequence number

= 1

st

byte in segment =

ISN + k

k bytes

TCP Header

Source port Destination port

Sequence number

Acknowledgment

HdrLen (^) Flags Advertised window 0

Checksum Urgent pointer

Options (variable)

Data

Starting byte

offset of data

carried in this

segment

What does TCP do?

Most of our previous tricks, but a few differences

  • Checksum
  • Sequence numbers are byte offsets
  • Receiver sends cumulative acknowledgements (like GBN)

Normal Pattern

  • Sender: seqno=X, length=B
  • Receiver: ACK=X+B
  • Sender: seqno=X+B, length=B
  • Receiver: ACK=X+2B
  • Sender: seqno=X+2B, length=B
  • Seqno of next packet is same as last ACK field

TCP Header

17

Source port Destination port

Sequence number

Acknowledgment

HdrLen (^) Flags Advertised window 0

Checksum Urgent pointer

Options (variable)

Data

Acknowledgment

gives seqno just

beyond highest

seqno received in

order

( “ What Byte

is Next ” )

Loss with cumulative ACKs

  • Sender sends packets with 100B and seqnos.:
    • 100, 200, 300, 400, 500, 600, 700, 800, 900, …
  • Assume the fifth packet (seqno 500) is lost, but no others
  • Stream of ACKs will be:
    • 200, 300, 400, 500, 500, 500, 500,…

What does TCP do?

Most of our previous tricks, but a few differences

  • Checksum
  • Sequence numbers are byte offsets
  • Receiver sends cumulative acknowledgements (like GBN)
  • Receivers may not drop out-of-sequence packets (like SR)
  • Introduces fast retransmit: optimization that uses duplicate

ACKs to trigger early retransmission