Computer Networks CS 3623 16 EndtoEnd Protocol Applications

  • Slides: 27
Download presentation
Computer Networks (CS 3623) #16 | End-to-End Protocol

Computer Networks (CS 3623) #16 | End-to-End Protocol

Applications Requirements Transport Level of services Network

Applications Requirements Transport Level of services Network

4 services 1. a simple asynchronous demultiplexing services UDP 2. a reliable byte-stream service

4 services 1. a simple asynchronous demultiplexing services UDP 2. a reliable byte-stream service TCP 3. a request/reply service RPC 4. a service for real-time applications RTP

1. Simple demultiplexor • host-to-host delivery service process-toprocess communication service • Example: User Datagram

1. Simple demultiplexor • host-to-host delivery service process-toprocess communication service • Example: User Datagram Protocol (UDP) [RFC 768] • Indirect process identification: port – a source process sends a message to a port – the destination process receives the message from a port

Format for UDP header

Format for UDP header

well-known port • each server receives its messages at some fixed port that is

well-known port • each server receives its messages at some fixed port that is widely published – http: 80, DNS: 53, mail: 25 etc. • just the starting point for communication

UDP message queue

UDP message queue

Checksum • IPv 4 = optional • IPv 6 = mandatory • Computes: –

Checksum • IPv 4 = optional • IPv 6 = mandatory • Computes: – UDP header – the contents of the message body – Pseudoheader: • 3 fields from the IP header: – protocol number, source IP@, destination IP@ • the UDP length field

2. Reliable byte-stream • offers a reliable, connection-oriented, bytestream service • frees the application

2. Reliable byte-stream • offers a reliable, connection-oriented, bytestream service • frees the application from having to worry about missing or reordered data • Example: Transmission Control Protocol (TCP) [RFC 675, 793, 1122, 1323, 2581, 3186, 5681, …]

TCP Properties • • • reliable, in-order delivery of a stream of bytes a

TCP Properties • • • reliable, in-order delivery of a stream of bytes a full-duplex protocol Demultiplexing mechanism Flow control Congestion control

Byte stream

Byte stream

TCP header • TCP’s demux key = (Src. Port, Src. IPAddr, Dst. Port, Dst.

TCP header • TCP’s demux key = (Src. Port, Src. IPAddr, Dst. Port, Dst. IPAddr)

Seq. Num, Ack, Adv. Win • Sequence. Num = sequence number for the first

Seq. Num, Ack, Adv. Win • Sequence. Num = sequence number for the first byte of data carried in that segment

Three-way handshake

Three-way handshake

TCP state-transition diagram

TCP state-transition diagram

TCP’s sliding window • Purpose: reliable delivery, delivered in order, flow-control (using Adv. Window)

TCP’s sliding window • Purpose: reliable delivery, delivered in order, flow-control (using Adv. Window)

Flow control: receiver • Last. Byte. Rcvd− Last. Byte. Read ≤ Max. Rcv. Buffer

Flow control: receiver • Last. Byte. Rcvd− Last. Byte. Read ≤ Max. Rcv. Buffer • Advertised. Window = Max. Rcv. Buffer−((Next. Byte. Expected− 1) −Last. Byte. Read)

Flow control: sender • Last. Byte. Written−Last. Byte. Acked ≤ Max. Send. Buffer •

Flow control: sender • Last. Byte. Written−Last. Byte. Acked ≤ Max. Send. Buffer • Last. Byte. Sent−Last. Byte. Acked ≤ Advertised. Window • Effective. Window = Advertised. Window−(Last. Byte. Sent−Last. Byte. Acked)

Trigger the transmission • maximum segment size (MSS) – MSS = MTU – (IP_header

Trigger the transmission • maximum segment size (MSS) – MSS = MTU – (IP_header + TCP_header) • a push operation • a timer fires silly window syndrome Nagle’s Algorithm

Adaptive retransmission • Original alg: – Estimated. RTT = α × Estimated. RTT +

Adaptive retransmission • Original alg: – Estimated. RTT = α × Estimated. RTT + (1−α) × Sample. RTT – Time. Out = 2 × Estimated. RTT • Problem:

Solutions • Karn/Partridge algorithm: – it only measures Sample. RTT for segments that have

Solutions • Karn/Partridge algorithm: – it only measures Sample. RTT for segments that have been sent only once – exponential backoff for TCP • Jacobson/Karels algorithm: – Time. Out = μ × Estimated. RTT + φ × Deviation • Difference = Sample. RTT−Estimated. RTT • Estimated. RTT = Estimated. RTT + (δ × Difference) • Deviation = Deviation + δ(|Difference| − Deviation)

3. Remote Procedure Call

3. Remote Procedure Call

RPC mechanism

RPC mechanism

RPC timeline

RPC timeline

Example: Sun. RPC

Example: Sun. RPC

4. Transport for real-time applications • Real-Time Protocol (RTP) – [RFC 3550 & updates]

4. Transport for real-time applications • Real-Time Protocol (RTP) – [RFC 3550 & updates] • RTP is used in conjunction with the RTP Control Protocol (RTCP)

RTP header format

RTP header format