Share
Embed
Transcript
39 slides
-
Contents • Network Layers • Internet Layer • IP •
Transport Layer • TCP TCP -
Abstraction Layers • A way of hiding the implementation details
of a particular set of functionality • Allows the separation of concerns to facilitate interoperability and platform independence IP Network Wired Communication Wireless Communication -
Encapsulation Protocol Data Unit (PDU) = Header + Service Data
Unit (SDU) PDU of Layer N + 1 Header of Layer N SDU of Layer N -
Network Layers with Protocols Physical Layer: Ethernet 1000BASE-T, 802.11, USB,
Bluetooth Network Access Layer: Ethernet, MAC, 802.11, L2TP, PPP, PPTP Internet Layer: IPv4, IPv6 Transport Layer: TCP, UDP Application Layer: HTTP -
Transport Layer • Transmission Control Protocol (TCP) • Connection-Oriented •
Flow control • In-order-delivery • Error recovery • Congestion control • User Datagram Protocol (UDP) • None of the above -
Transmission Control Protocol (TCP) • TCP segment, sequence number, segment
size, Acknowledgement (ACK), Round Trip Time (RTT) A B Acknowledgement (M+N) TCP Segment (seq: M, size: N) Round Trip Time (RTT) -
TCP Handshake – Connection Establishment A B SYN (K), ACK
(J+1) SYN (J) ACK (K+1) connect() listen() accept() connect() returns accept() returns LISTEN SYN_SENT ESTABLISHED ESTABLISHED SYN_RECV Connection-Oriented -
TCP Handshake – Connection Termination A B ACK (M+1) FIN
(M) FIN (N) ACK (N+1) ESTABLISHED ESTABLISHED CLOSE_WAIT FIN_WAIT_1 FIN_WAIT_2 TIME_WAIT LAST_ACK CLOSED close() close() CLOSED Connection-Oriented -
Buffer to Reorder Out-of-order Delivery A B Window SIze: 4
1 2 4 3 Application Layer In-order Delivery -
Automatic Repeat reQuest (or Query) (ARQ) • Error control method
that uses ACK and timeouts to achieve reliable data transmission over unreliable service A B Window SIze: 4 1 2 2 Retransmission TimeOut (RTO) 2 2 Error Recovery -
Types of ARQ • Stop-and-wait ARQ • Go-Back-N ARQ •
Selective Repeat ARQ Error Recovery -
Go-back-N ARQ Error Recovery • One timer • Receiver drops
the out-of-order frames -
Selective Repeat ARQ Error Recovery • One timer per frame
• Receiver keeps the out-of-order frames -
Congestion • Internet had its first congestion collapse event on
October 1986. • 32 Kbps link à 40 bps • What is the problem? 1. A buffer is overflowed 2. New arrival packets are dropped 3. Retransmissions to recover packet losses 4. Drastic reduction of the traffic • How to detect a network congestion? • Packet loss Congestion Control -
Terminology • Congestion Window (CWND) • Limits the amount of
data the TCP can send into network before receiving an ACK • Receiver Window (RWND) • Advertises the amount of data that the destination side can receive • Slow Start Threshold (ssthresh) • A threshold between slow-start mode and congestion avoidance mode • Rount Trip Time (RTT) • A time delay between sending a signal and receiving its ack Congestion Control -
Slow Start • Slow-start (cwnd <= ssthresh) • cwnd =
1 MSS (Maximum segment size) • When ack is received: • cwnd += 1 MSS • It increase cwnd exponentially on each RTT • cwnd *= 2 (on each RTT) • Congestion Avoidance and Control, Van Jacobson, 1988 Congestion Control -
Congestion Avoidance • Congestion avoidance (cwnd > ssthresh) • Additive
Increase, Multiplicative Decrease (AIMD) • When ack is received: • cwnd += MSS * MSS / cwnd • Else: • ssthresh = cwnd / 2 • cwnd = 1 MSS • It increase cwnd linearly on each RTT • cwnd += MSS • Congestion Avoidance and Control, Van Jacobson, 1988 Congestion Control -
Fast Retransmission • 3 duplicate ACK means a congestion is
occurred • TCP Tahoe, 1988 Retransmission TimeOut (RTO) Congestion Control -
Fast Recovery • If 3 dup ack is received •
ssthresh = cwnd / 2 • cwnd = ssthresh • move to congestion avoidance state • If ack times out • ssthresh = cwnd / 2 • cwnd = 1 MSS • move to slow start state • TCP Reno, 1990 Congestion Control -
TCP Variants Name By When New Features TCP Vint Cerf
and Bob Kahn 1973 Ack Congestion Avoidance and Control Van Jacobson 1988 Congstion Window, Slow Start, Congestion Avoidance TCP Tahoe 4.3 BSD Tahoe 1988 Fast Retransmission TCP Reno 4.3 BSD Reno 1990 Fast Recovery TCP Vegas Lawrence Brakmo et al. 1994 Detect congestion based RTT TCP CUBIC Sangtae Ha et al. 2008 window size is cubic function TCP BBR Van Jacobson et al, Google 2016 Model-based Congestion Control -
Packet Loss is not Always Congestion • Shallow Queue •
Overreact à Increase queue size to reduce packet loss • Deep Queue • Let the server know the packet loss late • Bufferbloat (2011) à Priority queue, threshold, track the time a packet stays in queue • All approaches: Increase the accuracy of packet loss as an indicator of congestion 2 Packet/s -
Review • Network Layers • Encapsulation and decapsulation • Internet
Layer • IP • Transport Layer • TCP • Connection-oriented • Flow control • In-order delivery • Error recovery • Congestion control • Slow start / congestion avoidance / fast retransmission / fast recovery • Loss-based congestion control: TCP Tahoe, Reno, Vegas … • Model-based congestion control: TCP BBR -
References • Google • Wikipedia • CLOSE_WAIT & TIME_WAIT 최종
분석 • Van Jacobson’s Congestion Avoidance and Control • TCP Flow Controls • BBR: Congestion-Based Congestion Control