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

15-441 Computer Networking Lecture 18-More TCP Congestion Control
15-441 Computer Networking Lecture 18 – More TCP & Congestion Control

Good Ideas so far Flow control Stop wait ° Parallel stop&wait Sliding window(e.g, advertised windows) OSs recovery Timeouts Acknowledgement-driven recovery(selective repeat or cumulative acknowledgement Congestion control AIMD> fairness and efficiency How does TCP actually implement these? Lecture 18: TCP Details
2 Lecture 18: TCP Details Good Ideas So Far… • Flow control • Stop & wait • Parallel stop & wait • Sliding window (e.g., advertised windows) • Loss recovery • Timeouts • Acknowledgement-driven recovery (selective repeat or cumulative acknowledgement) • Congestion control • AIMD → fairness and efficiency • How does TCP actually implement these?

Outline The devilish details of tcp TCP connection setup and data transfer TCP reliability Be nice to your data TCP congestion avoidance · Be nice to your routers Lecture 18: TCP Details
3 Lecture 18: TCP Details Outline • The devilish details of TCP • TCP connection setup and data transfer • TCP reliability • Be nice to your data • TCP congestion avoidance • Be nice to your routers 3

Sequence Number Space Each byte in byte stream is numbered ·32 bit va|ue · Wraps around Initial values selected at start up time TCP breaks up the byte stream into packets Packet size is limited to the maximum Segment size Each packet has a sequence number Indicates where it fits in the byte stream 13450 1495016050 17550 packet 8 packet 9 packet 10 Lecture 18: TCP Details
4 Lecture 18: TCP Details Sequence Number Space • Each byte in byte stream is numbered. • 32 bit value • Wraps around • Initial values selected at start up time • TCP breaks up the byte stream into packets. • Packet size is limited to the Maximum Segment Size • Each packet has a sequence number. • Indicates where it fits in the byte stream packet 8 packet 9 packet 10 13450 14950 16050 17550

Establishing Connection Three-Way handshake Each side notifies other of starting sequence number SYN: Seqc it will use for sending ° Why not simply chose0? Must avoid overlap with earlier ACK: Seqc+1 incarnation SYN: Seqs Security issues Each side acknowledges ACK: Seqs+1 other's sequence number SYN-ACK: Acknowledge sequence number 1 Can combine second sYn Client Server with first acK Lecture 18: TCP Details
5 Lecture 18: TCP Details Establishing Connection: Three-Way handshake • Each side notifies other of starting sequence number it will use for sending • Why not simply chose 0? • Must avoid overlap with earlier incarnation • Security issues • Each side acknowledges other’s sequence number • SYN-ACK: Acknowledge sequence number + 1 • Can combine second SYN with first ACK SYN: SeqC ACK: SeqC+1 SYN: SeqS ACK: SeqS+1 Client Server

TCP Connection Setup EXample 09:23:33.0423181P128.2.222.198.3123>192.216.219.96.80:s 4019802004:4019802004(0)win65535(DF) 09:23:33.1183291P192.216.219.96.80>128.2.222.198.3123:s 3428951569:3428951569(0)ack4019802005win5840 (DF) 09:23:33.1184051P128.2.222.198.3123>192.216.219.96.80 ack 3428951570win65535(DE) · Client sYn SeqC: Seg #4019802004, window 65535, max seg. 1260 · Server SYn-ACK+SYN Receive:#4019802005(=SeqC+1) SeqS: Seq #3428951569, window 5840, max. seg 1460 · Client sYn-ACK Receive:#3428951570(=Seqs+1) Lecture 18: TCP Details 6
6 Lecture 18: TCP Details TCP Connection Setup Example • Client SYN • SeqC: Seq. #4019802004, window 65535, max. seg. 1260 • Server SYN-ACK+SYN • Receive: #4019802005 (= SeqC+1) • SeqS: Seq. #3428951569, window 5840, max. seg. 1460 • Client SYN-ACK • Receive: #3428951570 (= SeqS+1) 09:23:33.042318 IP 128.2.222.198.3123 > 192.216.219.96.80: S 4019802004:4019802004(0) win 65535 (DF) 09:23:33.118329 IP 192.216.219.96.80 > 128.2.222.198.3123: S 3428951569:3428951569(0) ack 4019802005 win 5840 (DF) 09:23:33.118405 IP 128.2.222.198.3123 > 192.216.219.96.80: . ack 3428951570 win 65535 (DF)

TCP State Diagram: Connection Setup ient LOSED active OPEn Server create feB passive OPEN CLOSE Snd SYN create TCB delete tcB LISTEN CLOSE delete TcB rcV sYn SEND Snd SYNacK snd syn SYN TCV sYn SYN RCVD snd AcK SENT rcv ack of syn RCV SYN ACK Snd AcK CLOSE Send fin ESTAB Lecture 18: TCP Details
7 Lecture 18: TCP Details TCP State Diagram: Connection Setup CLOSED SYN SENT SYN RCVD ESTAB LISTEN active OPEN create TCB Snd SYN create TCB passive OPEN delete TCB CLOSE delete TCB CLOSE snd SYN SEND snd SYN ACK rcv SYN Send FIN CLOSE rcv ACK of SYN Snd ACK Rcv SYN, ACK rcv SYN snd ACK Client Server

Tearing Down Connection Either side can initiate tear down A B Send FIN signal FIN SegA Im not going to send any more data CK, SegA+1 Other side can continue Data sending data ACK Half open connection Must continue to acknowledge FIN, SeqB Acknowledging FIN ACK, SeqB+1 Acknowledge last sequence number 1 Lecture 18: TCP Details
8 Lecture 18: TCP Details Tearing Down Connection • Either side can initiate tear down • Send FIN signal • “I’m not going to send any more data” • Other side can continue sending data • Half open connection • Must continue to acknowledge • Acknowledging FIN • Acknowledge last sequence number + 1 A B FIN, SeqA ACK, SeqA+1 ACK Data ACK, SeqB+1 FIN, SeqB

TCP Connection Teardown Example 09:54:17.5853961P128.2.222.198.4474>128.2.210.194.6616:E 1489294581:1489294581(0)ack1909787689win65434(DF) 09:54:17.585732IP128.2.210.194.6616>128.2.222.198.4474:E 1909787689:1909787689(0)ack1489294582win5840(DF) 09:54:17.585764IP128.2.222.198.4474>128.2.210.194.6616 ack 1909787690win65434(DF) · Session Echo client on 128.2.222 198 server on 128.2.210.194 Client FIN SeqC:1489294581 Server AcK +FIN Ack:1489294582(=SeqC+1) seqs:1909787689 ClientACK AcK:1909787690(=SeqS+1 ecture 18: TCP Details
9 Lecture 18: TCP Details TCP Connection Teardown Example • Session • Echo client on 128.2.222.198, server on 128.2.210.194 • Client FIN • SeqC: 1489294581 • Server ACK + FIN • Ack: 1489294582 (= SeqC+1) • SeqS: 1909787689 • Client ACK • Ack: 1909787690 (= SeqS+1) 09:54:17.585396 IP 128.2.222.198.4474 > 128.2.210.194.6616: F 1489294581:1489294581(0) ack 1909787689 win 65434 (DF) 09:54:17.585732 IP 128.2.210.194.6616 > 128.2.222.198.4474: F 1909787689:1909787689(0) ack 1489294582 win 5840 (DF) 09:54:17.585764 IP 128.2.222.198.4474 > 128.2.210.194.6616: . ack 1909787690 win 65434 (DF)

State Diagram: Connection Tear-down CLOSE send fin Active CloseESTAB CLOSE rCV FIn Passⅳ ve close send fIn send AcK FIN CLOSE WAIT-1 WAIT rCV fIN ACK snd AcK CLOSE rcv fIN+ACK snd FIN FIN WAIT2 snd ACK CLOSING AST-ACK rcv ACK of FIN rcv AcK df FIN rcV fIN CLOSED imeout=2msl snd AcK delete tcb Lecture 18: TCP Details
10 Lecture 18: TCP Details State Diagram: Connection Tear-down CLOSING CLOSE WAIT FIN WAIT-1 ESTAB TIME WAIT snd FIN CLOSE send FIN CLOSE rcv ACK of FIN LAST-ACK CLOSED FIN WAIT-2 snd ACK rcv FIN delete TCB Timeout=2msl send FIN CLOSE send ACK rcv FIN snd ACK rcv FIN rcv ACK of FIN snd ACK rcv FIN+ACK ACK Active Close Passive Close
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 复旦大学:《计算机网络 Computer Networking》课程电子教案(PPT课件讲稿)17 TCP & Congestion Control.ppt
- 复旦大学:《计算机网络 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》课程电子教案(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
- 复旦大学:《数据库系统》学生数据库设计(MIS)论文_5.蒋君伟——医院管理信息系统.doc