SlideShare a Scribd company logo
1 of 14
1
TCP Connection Establishment and
Termination
1
2
Connection Establishment and
Termination
• required by connection-oriented transport
protocols like TCP
• need connection establishment and
termination procedures to allow:
– each end to know the other exists
– negotiation of optional parameters
– triggers allocation of transport entity resources
2
3
Connection State Diagram
3
Assume a reliable
network (no loss
seen at the
transport layer).
4
Connection Establishment Diagram
4
What if either SYN is
lost? (discussed later)
Assume a reliable network (no
loss seen at the transport layer).
5
Connection Termination
• either or both sides by mutual agreement
• graceful or abrupt termination
• if graceful, initiator must:
– send FIN to other end, requesting termination
– place connection in FIN WAIT state
– when FIN received, inform user and close connection
• other end must:
– when receives FIN must inform TS user and place
connection in CLOSE WAIT state
– when TS user issues CLOSE primitive, send FIN & close
connection
5
6
Connection Establishment
• two way handshake
– A send SYN, B replies with SYN
– lost SYN handled by re-transmission
– ignore duplicate SYNs once connected
• lost or delayed data segments can cause
connection problems
– eg. segment from old connection
6
7
Two Way
Handshake:
Obsolete
Data
Segment
7
Solution: starting SN is far away
from the last SN of the previous
connection.
Use request of the form SYNi
where i +1 is the SN of the first
data segment to be sent.
8
Two Way Handshake:
Obsolete SYN Segment
8
9
TCP Three
Way
Handshake:
State
Diagram
9
10
TCP Three
Way
Handshake:
Examples
10
11
TCP Connection Establishment:
Summary
• three way handshake
– SYN, SYN-ACK, ACK
• connection determined by source and
destination sockets (host, port)
• can only have a single connection between
any unique pairs of ports
• but one port can connect to multiple ports
12
Connection Termination (2)
• also need 3-way handshake
• misordered segments could cause:
– entity in CLOSE WAIT state sends last data segment,
followed by FIN
– FIN arrives before last data segment
– receiver accepts FIN, closes connection, loses data
• need to associate sequence number with FIN
• receiver waits for all segments before FIN sequence
number
12
13
Connection Termination:
Graceful Close
• also have problems with loss of segments and
obsolete segments
• need graceful close which will:
• send FIN i and receive AN i+1
• receive FIN j and send AN j+1
• wait twice maximum expected segment
lifetime
13
14
Reading
• Chapter 20, Stallings’ book
14

More Related Content

Similar to OLD_chap_20_tcp_estab.ppt

Computernetworking21CS52vtunotesseminar.pptx
Computernetworking21CS52vtunotesseminar.pptxComputernetworking21CS52vtunotesseminar.pptx
Computernetworking21CS52vtunotesseminar.pptx
TejashreeSathya
 
Mobile transportlayer
Mobile transportlayerMobile transportlayer
Mobile transportlayer
Rahul Hada
 

Similar to OLD_chap_20_tcp_estab.ppt (20)

M.florence dayana computer networks transport layer
M.florence dayana   computer networks transport layerM.florence dayana   computer networks transport layer
M.florence dayana computer networks transport layer
 
CN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxCN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptx
 
Data link layer
Data link layerData link layer
Data link layer
 
presentationphysicallyer.pdf talked about computer networks
presentationphysicallyer.pdf talked about computer networkspresentationphysicallyer.pdf talked about computer networks
presentationphysicallyer.pdf talked about computer networks
 
Tcp3 wayhandshakeprocess
Tcp3 wayhandshakeprocessTcp3 wayhandshakeprocess
Tcp3 wayhandshakeprocess
 
TCP/IP 3-way Handshake
TCP/IP 3-way Handshake TCP/IP 3-way Handshake
TCP/IP 3-way Handshake
 
Mcseminar
McseminarMcseminar
Mcseminar
 
Multiple Access Methods
Multiple Access MethodsMultiple Access Methods
Multiple Access Methods
 
Data Communication and Networking - Transport and Application Layer of the OS...
Data Communication and Networking - Transport and Application Layer of the OS...Data Communication and Networking - Transport and Application Layer of the OS...
Data Communication and Networking - Transport and Application Layer of the OS...
 
Unit-4 (1).pptx
Unit-4 (1).pptxUnit-4 (1).pptx
Unit-4 (1).pptx
 
5 sharing-app
5 sharing-app5 sharing-app
5 sharing-app
 
Flow Control (1).ppt
Flow Control (1).pptFlow Control (1).ppt
Flow Control (1).ppt
 
Computernetworking21CS52vtunotesseminar.pptx
Computernetworking21CS52vtunotesseminar.pptxComputernetworking21CS52vtunotesseminar.pptx
Computernetworking21CS52vtunotesseminar.pptx
 
Unit IV_Flow.pptx
Unit IV_Flow.pptxUnit IV_Flow.pptx
Unit IV_Flow.pptx
 
Snooping TCP
Snooping TCPSnooping TCP
Snooping TCP
 
Eshcol tech solutions pvt ltd
Eshcol tech solutions pvt ltdEshcol tech solutions pvt ltd
Eshcol tech solutions pvt ltd
 
Olumide pidan b
Olumide pidan bOlumide pidan b
Olumide pidan b
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
Mobile transportlayer
Mobile transportlayerMobile transportlayer
Mobile transportlayer
 
Mobile transport layer
 Mobile transport layer Mobile transport layer
Mobile transport layer
 

Recently uploaded

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Ghuma $ Russian Call Girls Ahmedabad ₹7.5k Pick Up & Drop With Cash Payment 8...
Ghuma $ Russian Call Girls Ahmedabad ₹7.5k Pick Up & Drop With Cash Payment 8...Ghuma $ Russian Call Girls Ahmedabad ₹7.5k Pick Up & Drop With Cash Payment 8...
Ghuma $ Russian Call Girls Ahmedabad ₹7.5k Pick Up & Drop With Cash Payment 8...
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 

OLD_chap_20_tcp_estab.ppt