复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)17 TCP & Congestion Control

15-441 Computer Networking ecture 17-TCP& Congestion Control
15-441 Computer Networking Lecture 17 – TCP & Congestion Control

Good Ideas so far Flow control Stop wait Parallel stop wait Sliding window Loss recovery · Timeouts Acknowledgement-driven recovery(selective repeat or cumulative acknowledgement Lecture 17: TCP Congestion Control
2 Lecture 17: TCP & Congestion Control Good Ideas So Far… • Flow control • Stop & wait • Parallel stop & wait • Sliding window • Loss recovery • Timeouts • Acknowledgement-driven recovery (selective repeat or cumulative acknowledgement)

Outline TCP flow control Congestion sources and collapse Congestion control basics Lecture 17: TCP Congestion Control
3 Lecture 17: TCP & Congestion Control Outline • TCP flow control • Congestion sources and collapse • Congestion control basics

Sequence Numbers (reminder How large do sequence numbers need to be? Must be able to detect wrap-around Depends on sender/receiver window size E.g Max seq=7, send win=recv win=7 If pkts 0. 6 are sent succesfully and all acks lost Receiver expects 7, 0.5, sender retransmits old 0.6! ! Max sequence must be s send window recv window Lecture 17: TCP Congestion Control
4 Lecture 17: TCP & Congestion Control Sequence Numbers (reminder) • How large do sequence numbers need to be? • Must be able to detect wrap-around • Depends on sender/receiver window size • E.g. • Max seq = 7, send win=recv win=7 • If pkts 0..6 are sent succesfully and all acks lost • Receiver expects 7,0..5, sender retransmits old 0..6!!! • Max sequence must be send window + recv window

Sequence Numbers 32 Bits, Unsigned> for bytes not packets! Circular Comparison b Max 0 Max 0 bSending Window +Receiving Window Also, want to guard against stray packets With IP, packets have maximum lifetime of 120s Sequence number would wrap around in this time at 286MB/s=- 2. 3Gbit/s ecture 17: TCP Congestion Control
5 Lecture 17: TCP & Congestion Control Sequence Numbers • 32 Bits, Unsigned → for bytes not packets! • Circular Comparison • Why So Big? • For sliding window, must have • |Sequence Space| > |Sending Window| + |Receiving Window| • No problem • Also, want to guard against stray packets • With IP, packets have maximum lifetime of 120s • Sequence number would wrap around in this time at 286MB/s =~ 2.3Gbit/s (hmm!) Max 0 a b a < b Max 0 b a b < a

TCP FloW Control TCP is a sliding window protocol For window size n, can send up to n bytes without receiving an acknowledgement When the data is acknowledged then the window slides forward Each packet advertises a window size Indicates number of bytes the receiver has space for Original tcp always sent entire window But receiver buffer space I= available net capacity! Congestion control now limits this window= min(receiver window, congestion window) Lecture 17: TCP Congestion Control
6 Lecture 17: TCP & Congestion Control TCP Flow Control • TCP is a sliding window protocol • For window size n, can send up to n bytes without receiving an acknowledgement • When the data is acknowledged then the window slides forward • Each packet advertises a window size • Indicates number of bytes the receiver has space for • Original TCP always sent entire window • But receiver buffer space != available net. capacity! • Congestion control now limits this • window = min(receiver window, congestion window)

Window flow control: send side window Sent and acked Sent but not acked Not yet sent Next to be sent Lecture 17: TCP Congestion Control 7
7 Lecture 17: TCP & Congestion Control Window Flow Control: Send Side Sent but not acked Not yet sent window Next to be sent Sent and acked

Window flow control: send side Packet Sent Packet Received Source Port Dest, Port Source Port Dest. port Sequence Number Sequence Number Acknowledgment Acknowledgment HL/Flags Window HL/Flags Window D Checksum Urgent pointer D Checksum Urgent Pointer Options Options App write acknowledged sent to be sent outside window ecture 17: TCP& Congestion Control
8 Lecture 17: TCP & Congestion Control acknowledged sent to be sent outside window Source Port Dest. Port Sequence Number Acknowledgment HL/Flags Window D. Checksum Urgent Pointer Options… Source Port Dest. Port Sequence Number Acknowledgment HL/Flags Window D. Checksum Urgent Pointer Options... Packet Sent Packet Received App write Window Flow Control: Send Side

Window flow control: receive side What should receiver do? New Receive buffer Acked but not Not yet delivered to user acked window ecture 17: TCP& Congestion Control
9 Lecture 17: TCP & Congestion Control Acked but not delivered to user Not yet acked Receive buffer window Window Flow Control: Receive Side New What should receiver do?

TCP Persist What happens if window is 0? Receiver updates window when application reads data What if this update is lost? TCP Persist state Sender periodically sends 1 byte packets Receiver responds with aCK even if it can 't store the packet Lecture 17: TCP Congestion Control
10 Lecture 17: TCP & Congestion Control TCP Persist • What happens if window is 0? • Receiver updates window when application reads data • What if this update is lost? • TCP Persist state • Sender periodically sends 1 byte packets • Receiver responds with ACK even if it can’t store the packet
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)16 Transport Protocols.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)15 Virtual Circuits, ATM, MPLS.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)14 ip-grab-bag(IP Wrap up).ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)13 DNS.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)12 Inter-Domain Routing BGP(Border Gateway Protocol).ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)11 Multicast.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)10 Intra-Domain Routing.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)09 IP Packets.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)08 Software School.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)07 Ethernet.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)06 Physical Layer(Cont)& Data Link Layer.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)05 physical_Transmission.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)04 Socket Programming.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)03 Design Philosophy & Applications.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)02 Protocol Stacks and Layering.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)01 Introduction.ppt
- 复旦大学:《计算机网络 Computer Networking》课程实验指导_拥塞控制_project3-congestion_control.ppt
- 复旦大学:《计算机网络 Computer Networking》课程实验指导_拥塞控制_project3_2013.pdf
- 复旦大学:《计算机网络 Computer Networking》课程实验指导_因特网中继聊天(IRC)路由_project 2 IRC routing.pptx
- 复旦大学:《计算机网络 Computer Networking》课程实验指导_因特网中继聊天(IRC)服务器_socketProgramming-Part2.pptx
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)18 tcpdetails_More TCP & Congestion.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)19 TCP Performance.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)20 The Web.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)21 Peer-to-Peer(p2p).ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)22 Queue Management and QoS.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)23 mobile_Wireless Networking.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)25 Secure Communication with an Insecure Internet Infrastructure.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)25 security-dosfirewall——Attacks and Countermeasures.ppt
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)26 Wireless, Ad-Hoc Networks, Sensor Networks.ppt
- 复旦大学:《计算机网络》课程PPT课件_10 IP-Prot——Routers and Routing.pdf
- 《数据库系统》参考书籍:《Database Management Systems》2nd Ed(Raghu Ramakrishnan / Johannes Gehrke).pdf
- 《数据库系统》课程参考资料:DB2系统管理员指南 IBM DB2 Version 8 Administrator Guide(1/3)Planning.pdf
- 《数据库系统》课程参考资料:DB2系统管理员指南 IBM DB2 Version 8 Administrator Guide(2/3)Implementation.pdf
- 《数据库系统》课程参考资料:DB2 SQL指南 IBM DB2 Universal Database SQL Reference Volume 1 Version 8(1/2).pdf
- 《数据库系统》课程参考资料:DB2系统管理员指南 IBM DB2 Version 8 Administrator Guide(3/3)Performance.pdf
- 《数据库系统》课程参考资料:DB2 SQL指南 IBM DB2 Universal Database SQL Reference Volume 2 Version 8(2/2).pdf
- 复旦大学:《数据库系统》学生数据库设计(MIS)论文_1.奚亚蓉——电信局程控机房维护管理信息系统.doc
- 复旦大学:《数据库系统》学生数据库设计(MIS)论文_2.吴小莉——检测管理信息系统.doc
- 复旦大学:《数据库系统》学生数据库设计(MIS)论文_3.周瑾——图书借阅管理系统.doc
- 复旦大学:《数据库系统》学生数据库设计(MIS)论文_4.邓彦——上药三厂科技图书信息管理系统.doc