




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































3: Transport Layer 3b-
3: Transport Layer 3b-
3: Transport Layer 3b-
Sender
Data (SequenceNum)
Acknowledgment + AdvertisedWindow
Receiver
3: Transport Layer 3b-
Application process
Write bytes
TCP Send buffer
Segment Segment Segment Transmit segments
Application process
Read bytes
TCP Receive buffer
…
… …
3: Transport Layer 3b-
Interactive Bulk Data
3: Transport Layer 3b-
Example: Telnet/Rlogin Send each interactive key stroke in a separate TCP packet server side echos that same character back to be displayed on the local screen
How big are these TCP packets containing a single byte of data? 1 byte data 20 bytes (at least) for TCP header 20 bytes for IP header < 3% data! Do we want to fill the pipeline with small packets like this?
3: Transport Layer 3b-
Problem: Would like to send more data at once or at least piggyback the acks Solution: Delay the ACK for some time hoping for some data to go in the other direction or for more incoming data for a cumulative ack Can we do better than this?
Host A Host B User types ‘C’
host ACKs receipt of echoed ‘C’
host ACKs receipt of ‘C’, echoes back ‘C’
Ack not sent immediately; Delayed hoping to piggy back With data or other ACK
simple telnet scenario
3: Transport Layer 3b-
If a TCP connection has outstanding data for which an acknowledgement has not yet been received, do not send small segments Instead wait for an acknowledgement to be received then send all data collected to that point If collect MSS, go ahead and send without waiting for ACK
Adjusts to network conditions If ACKs coming back rapidly (like on a LAN), data will be sent rapidly If ACKs coming back slowly (like on a WAN), will collect more data together in that time to send together
3: Transport Layer 3b-
Event
in-order segment arrival, no gaps, everything else already ACKed in-order segment arrival, no gaps, one delayed ACK pending
out-of-order segment arrival higher-than-expect seq. # gap detected arrival of segment that partially or completely fills gap
TCP Receiver action
delayed ACK. Wait up to 500ms for next segment. If no next segment, send ACK
immediately send single cumulative ACK
send duplicate ACK, indicating seq. # of next expected byte (sender can use as hint of selective repeat) immediate ACK if segment starts at lower end of gap
3: Transport Layer 3b-
3: Transport Layer 3b-
Host A
time
Host B
3: Transport Layer 3b-
Receiver waiting for data Sender not allowed to send anything
Set timer on receiver after sending window update; If don’t here from sender retransmit Sender periodically sends 1 byte of data even if window is 0
3: Transport Layer 3b-
Occurs when small amounts of data are exchanged over a connection instead of large amounts Sender only knows they can send X bytes of data Receiver can really take 2X but hasn’t had a chance to announce it; gets X bytes so can only advertise X again
Solutions? Receiver doesn’t advertise small windows; Instead waits till larger window opens up Sender holds off sending data till larger amount accumulated Which? In this case both
3: Transport Layer 3b-