End-to-End Protocols
9 important questions on End-to-End Protocols
What is the goal of this chapter?
Problem: IP is best effort
- applications require better than this: time constraint, or guarantees. Or sent only once
- transport level provides process-to-process channels
Explain the byte stream service
- application process writes/reades bytes to/from buffer
- TCP sends segments of the byte stream
- in two directions simultaneously
There is both a send and receive buffer. TCP wont allow to be sent when the receive buffer is full.
A TCP connection is similar to a stream socket. Every process can have several TCP connections, each connection is locally defined by: (Local IP, Local port, Other IP, other Port)
What are the End-to-End issues?
- process can run on computer located anywhere
TCP connections have widely different variable RTT
- need adaptive timeout mechanism
Packets can be delayed / reoirdered in the network
- need to be prepared for arrival of very old packets
Other side of connection can have different capacity
- mechanism needed to learn what resources are available at other sides
Network capacity is not fixed
- mechanism needed to learn network capacity
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
How does the TCP segment format look?
SequenceNum, Acknowledgement and AdvertisedWindow are for the sliding window mechanism. Instead of frames (in layer 2) here bytes are numbered, and window is in byte size.
Flags are 6 numbers of controlebits. To establish or terminate a connection. To reset the connection, or to pay attention.
For checksum the same algorithm is used
How is a connection established and terminated?
Connection Establishment
- is a three way handshake
- Client sends SYN, sequencenumber = x
- Server responds with SYN + Ack, sequincenum is y & Ack = x
- Client responds with ACK, acknowledgemnt = y + 1
Connection Termination
- both sides of the connection must be closed independently
- Initiator sends fin, receiver acknowledges
- Receiver sends fin in parralel, initiator acknowledges
- initiator can be either the server or the client
How does the Sliding Window work for TCP?
- reliable delivery of data, preservation of order & flow control
Sliding Window in TCP
- using Ack, SeqNum, AdvertisedWindow from TCP header.
- window size is not fixed
- AdvWind << max SeqNum: condition SWS < (MaxSeqNum+1) /2 is always satisfied.
BUFFERS
Both buffers have a limited capacity.
Receiving: LastByteRcvd - LasteByteRead <= MaxRcvBuffer
Sending: LasteByteSent - LastByteAcked <= AdvWindow
When AdvWindow = 0, the sender will get blocked. When its sending buffer is full it will block. The receiver can no longer send AdvWindow updates. After a while it will send this info. --> persistence timer.
What are record boundaries?
Solution: URG flag + UrgPtr
What is Adaptive Transmission
Original Algorithm (Jacobsen)
EstRTT = alpha * EstRTT + (1-alpha) * SampleRTT
TimeOut = 2x EstRtt
Problem: ambiguity after retransmission.
Solution: Do not sample RTT when retransmitting, double timeout after each retransmission
Problem: sample RTT variance not taken into account
Solution: Jacobson / Karels Algorithm
- this because constantly doubling retransmission is rather drastic
How does the RTP header look?
Timing relationships: timestamp field
Application specific frame boundaries: frame marker bit
Detect missing packets: sequence number
Data sources
RTCP = Real-Time Transport Control Protocol
- Sometimes it will send a random packet to the port next to it to check how much delay/congestion there is. This way it can react on it.
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding