Sidevrgud IRT 4060 IRT 0020 vooruloeng 8 3

  • Slides: 15
Download presentation
Sidevõrgud IRT 4060/ IRT 0020 vooruloeng 8 / 3. nov 2004 Vooülekanne Avo Ots

Sidevõrgud IRT 4060/ IRT 0020 vooruloeng 8 / 3. nov 2004 Vooülekanne Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst. avo. ots@ttu. ee 79

Application Data loss Bandwidth Time sensitive Application Transport layer protocol File transfer No Elastic

Application Data loss Bandwidth Time sensitive Application Transport layer protocol File transfer No Elastic No FTP TCP E-mail No Elastic No SMTP TCP Web documents No Elastic, Kbps No HTTP TCP Real-time audio/video Yes Kbps, Mbps Yes, 100 s of Msec Proprietary TCP or UDP Stored audio/video Yes Kbps, Mbps Yes, sec Proprietary, NFS TCP or UDP Interactive games Yes Kbps Yes, 100 s of Msec Proprietary TCP or UDP Financial applications No Elastic Both Proprietary TCP: guarantee: deliver all data; no guarantee: rate, delay; connection; congestion control UDP: no guarantee: deliver all data, order, delay; no connection; no congestion control 80

Web cache – proxy server • Network entity that satisfies HTTP requests on behalf

Web cache – proxy server • Network entity that satisfies HTTP requests on behalf of a client. • Keeps copies of recently requested objects in its own disk storage. • Content distribution. client HTTP request HTTP response proxy server is also client of origin server 81

Transport protocols • Transform host-to-host communication, offered by network layer, to process-to-process communication Deliver

Transport protocols • Transform host-to-host communication, offered by network layer, to process-to-process communication Deliver important services to application layer: • 1. 2. 3. 4. 5. 6. 7. 8. • Guaranteed message delivery In-order delivery Detect/eliminate message replication Support arbitrarily large messages Support synchronization between sender & receiver Allow receiver to apply flow control to sender Support multiple application processes on each host Other services? (congestion control, quality-of-service, …) Overview: – – UDP: unreliable message delivery protocol TCP: reliable stream transfer protocol 82

User Datagram Protocol (UDP) • Connectionless, unreliable, message delivery – But, optional checksum provides

User Datagram Protocol (UDP) • Connectionless, unreliable, message delivery – But, optional checksum provides limited error detection • Computed over UDP header, message, and IP pseudoheader • Pseudoheader: IP src & dst addresses, protocol #, and UDP length • If source does not want to compute checksum, it sets it to zero • Allows process demultiplexing using ports – 16 bits per port: 65536 possible channels per host • No flow control: sender can overrun receiver’s buffers 83

Application demultiplexing with UDP Application process Ports Queues Packets demultiplexed UDP Packets arrive 84

Application demultiplexing with UDP Application process Ports Queues Packets demultiplexed UDP Packets arrive 84

Transmission Control Protocol (TCP) • Reliable, connection-oriented, byte-stream delivery service Full duplex connection Supports

Transmission Control Protocol (TCP) • Reliable, connection-oriented, byte-stream delivery service Full duplex connection Supports flow control (and congestion control; to be covered later) Supports application layer demultiplexing using ports Segments vs application-layer “writes”: when does TCP transmit a segment? • Maximum Segment Size (MSS), Push operation, Send-Timer Application process … Write bytes … – – Read bytes TCP Send buffer Receive buffer Segment … Segment Transmit segments 85

Sokkel controlled by application developer controlled by operating system process socket TCP with buffers,

Sokkel controlled by application developer controlled by operating system process socket TCP with buffers, variables Internet 86

TCP Congestion Control 20 Congestion avoidance Congestion occurs 15 Congestion window Threshold 10 5

TCP Congestion Control 20 Congestion avoidance Congestion occurs 15 Congestion window Threshold 10 5 Slow start 0 Round-trip times 87

TCP Window Size Over Time Long-lived TCP connection 88

TCP Window Size Over Time Long-lived TCP connection 88

Slow Start Sequence Plot. . . Sequence No Window doubles every round Time 89

Slow Start Sequence Plot. . . Sequence No Window doubles every round Time 89

The big picture cwnd Timeout Congestion Avoidance Slow Start Time 90

The big picture cwnd Timeout Congestion Avoidance Slow Start Time 90

TCP Fairness goal: if K TCP sessions share same bottleneck link of bandwidth R,

TCP Fairness goal: if K TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K TCP connection 1 TCP connection 2 bottleneck router capacity R 91

Why is TCP fair? Two competing sessions: • Additive increase gives slope of 1,

Why is TCP fair? Two competing sessions: • Additive increase gives slope of 1, as throughout increases • multiplicative decrease drops throughput proportionally equal bandwidth share Connection 2 throughput R loss: decrease window by factor of 2 congestion avoidance: additive increase Connection 1 throughput R 92

TCP Connection Management TCP server lifecycle TCP client lifecycle 93

TCP Connection Management TCP server lifecycle TCP client lifecycle 93