End-to-End Protocols

9 important questions on End-to-End Protocols

What is the goal of this chapter?

Explaining the 4th layer of communication, between applications, end-to-end. We will discuss UDP, TCP and RPC

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

TCP connection is full-duplex byte-stream
- 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?

TCP supports logical connections between processes
- 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
Discover Study Smart

How does the TCP segment format look?

Has a header of 20 bytes, like IPv4, but also many options. Meaning the header needs a (HdrLen) to define the size.

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?

TCP is connection oriented, so a connection first needs to be established.

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?

Sliding window servers multiple purposes
- 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?

TCP is a byte-stream protocol. What if a application wants to work with structured records and fields.

Solution: URG flag + UrgPtr

What is Adaptive Transmission

TCP guarantees transmission. The question is, when to send for retransmission. We need a proper timeout value.

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?

Seems difficult, but only first 3 lines (12 bytes) are obligated. Contributing source + extension header often not there. Makes UDP + RTP as long as TCP without options.

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
Remember faster, study better. Scientifically proven.
Trustpilot Logo