tcp connection management created by m bateman, a ruddle & c allison as part of the tcp view...
TRANSCRIPT
![Page 1: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/1.jpg)
TCP Connection Management
Created by
M Bateman, A Ruddle & C Allison
As part of the TCP View project
![Page 2: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/2.jpg)
Connections
• Both sender an receiver must be ready before start of data transfer– Sender and receiver need to agree on parameters
– Receive buffer size, initial sliding window variables
• Sender and receiver must agree when transfer is over– Both sides must discard state
• This is signalling– Setup/teardown state at the endpoints
– Compare to ‘dialing’ in the telephone network
![Page 3: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/3.jpg)
Connection Management
• Setup– 3-way handshake
• Transfer– Sliding window, data and ACKs in both
directions
• Teardown– 4-way handshake
• Client-server model– Initiator (client) server– Listener (server) responds, provides service
![Page 4: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/4.jpg)
Connection Creation
Active participant(client)
Passive participant(server)
![Page 5: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/5.jpg)
Connection Creation
Active participant(client)
Passive participant(server)
SYN, sequence number = x
![Page 6: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/6.jpg)
Connection Creation
Active participant(client)
Passive participant(server)
SYN, sequence number = x
SYN + ACK, sequence number = y
Acknowledgement = x+ 1
![Page 7: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/7.jpg)
Connection Creation
Active participant(client)
Passive participant(server)
SYN, sequence number = x
SYN + ACK, sequence number = y
Acknowledgement = x+ 1
ACK, acknowledgement = y + 1
![Page 8: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/8.jpg)
ESTABLISHED
CLOSED
LISTEN
SYN_RCVD SYN_SENT
CLOSE_WAIT
LAST_ACKFIN_WAIT_1 CLOSING
FIN_WAIT_2 TIME_WAIT
![Page 9: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/9.jpg)
ESTABLISHED
CLOSED
LISTEN
SYN_RCVD SYN_SENT
CLOSE_WAIT
LAST_ACKFIN_WAIT_1 CLOSING
FIN_WAIT_2 TIME_WAIT
![Page 10: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/10.jpg)
Data Transfer
• Connection is bi-directional
• ACKs can carry data
![Page 11: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/11.jpg)
Connection Teardown
Active participant(client)
Passive participant(server)
![Page 12: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/12.jpg)
Connection Teardown
Active participant(client)
Passive participant(server)
FIN
![Page 13: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/13.jpg)
Connection Teardown
Active participant(client)
Passive participant(server)
FIN
ACK
![Page 14: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/14.jpg)
Connection Teardown
Active participant(client)
Passive participant(server)
FIN
ACK
FIN
![Page 15: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/15.jpg)
Connection Teardown
Active participant(client)
Passive participant(server)
FIN
ACK
ACK
FIN
![Page 16: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/16.jpg)
The TIME_WAIT State
• We wait 2 * maximum segment lifetime (60 seconds) before completing the close
• Why?– ACK might have been lost so FIN would be
resent– Could interfere with subsequent connections
![Page 17: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/17.jpg)
‘Two-Army’ Problem
• Can we use messages and retries to synchronise two machines so they are guaranteed to do some operation at the same time?
![Page 18: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/18.jpg)
Two-Army Problem
A B
![Page 19: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/19.jpg)
Two-Army Problem
A B2:30 Okay to attack?
![Page 20: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/20.jpg)
Two-Army Problem
A B2:30 Okay to attack?
okay
![Page 21: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/21.jpg)
Two-Army Problem
A B2:30 Okay to attack?
okay
So it’s 2:30?
![Page 22: TCP Connection Management Created by M Bateman, A Ruddle & C Allison As part of the TCP View project](https://reader036.vdocuments.site/reader036/viewer/2022062515/56649cf45503460f949c27c2/html5/thumbnails/22.jpg)
Two-Army Problem
A B2:30 Okay to attack?
okay
So it’s 2:30?
What if this message is lost?