Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.

Similar presentations


Presentation on theme: "CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina."— Presentation transcript:

1 CSCE 515: Computer Network Programming Chin-Tser Huang huangct@cse.sc.edu University of South Carolina

2 3/1/20052 TCP State Transition Diagram

3 3/1/20053 TCP Three-Way Handshake

4 3/1/20054 TCP Normal Close

5 3/1/20055 TCP Half Open Connection

6 3/1/20056 TCP Reset TCP sends reset when a received segment does not seem correct for referenced connection Possible cases of reset Connection request to nonexistent port Aborting a connection Detecting half-open connections

7 3/1/20057 Simultaneous Open Each end transmits a SYN, and the two SYNs pass each other on network In TCP, result is one connection, not two Exchange 4 segments, one more than three-way handshake SYN J SYN K SYN K, ACK J+1 SYN J, ACK K+1 (active open) SYN_SENT SYN_RCVD ESTABLISHED (active open) SYN_SENT SYN_RCVD ESTABLISHED

8 3/1/20058 Simultaneous Close Each end transmits a FIN, and the two FINs pass each other on network Exchange 4 segments, as normal close FIN J FIN K ACK J+1 ACK K+1 (active close) FIN_WAIT_1 CLOSING TIME_WAIT (active close) FIN_WAIT_1 CLOSING TIME_WAIT

9 3/1/20059 TCP Data Flow Two types of TCP data flow Bulk data (e.g. ftp, e-mail) Interactive data (e.g. telnet, rlogin) On packet-count basis, 50% bulk and 50% interactive On byte-count basis, 90% bulk and 10% interactive TCP handles both types but uses different algorithm

10 3/1/200510 Interactive Data Flow Applications like rlogin may cause segments as short as 1 byte to be sent data byte ACK of echoed byte keystroke display server clientserver echo of data byte ACK of data byte echo

11 3/1/200511 Delayed Acknowledgments TCP does not ACK immediately after receiving data Instead, TCP delays ACK for up to 200ms hoping to have data going in same direction as ACK, so as to send ACK along with data Called having the ACK piggyback with data data byte ACK of echoed byte keystroke display server clientserver echo and ACK of data byte echo

12 3/1/200512 Nagle Algorithm Small segments cannot be sent until outstanding data is acknowledged Instead, small amounts of data are collected by TCP and sent in single segment when acknowledgment arrives

13 3/1/200513 Next Class Midterm exam! 20% toward your final grade Mar. 3 9:30am-10:45am


Download ppt "CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina."

Similar presentations


Ads by Google