SlideShare a Scribd company logo
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

PPTX
08 - COMS 525 Internet Protocols and TCPIP - TCP 1.pptx
PalanivelKuppusamy1
 
PPTX
Tcp3 wayhandshakeprocess
Aashutoshkumar28
 
PPT
Transmission Control Protocol (TCP) connection oriented
devarahul1
 
PPTX
TCP/IP 3-way Handshake
Alok Tripathi
 
PPTX
08 coms 525 tcpip - tcp 1
Palanivel Kuppusamy
 
PDF
Web and internet technology notes for BCA students
nawejakhatar10063
 
PPTX
Part4-reliable-tcp.pptx
Olivier Bonaventure
 
08 - COMS 525 Internet Protocols and TCPIP - TCP 1.pptx
PalanivelKuppusamy1
 
Tcp3 wayhandshakeprocess
Aashutoshkumar28
 
Transmission Control Protocol (TCP) connection oriented
devarahul1
 
TCP/IP 3-way Handshake
Alok Tripathi
 
08 coms 525 tcpip - tcp 1
Palanivel Kuppusamy
 
Web and internet technology notes for BCA students
nawejakhatar10063
 
Part4-reliable-tcp.pptx
Olivier Bonaventure
 

Similar to OLD_chap_20_tcp_estab.ppt (20)

PPTX
tcp-ippresentation-150614172243-lva1-app6892.pptx
AlphaKoiSylvester
 
PPTX
Tcp ip presentation
Satya P. Joshi
 
PDF
TCP - IP Presentation
Harish Chand
 
PDF
7. TCP and UDP_Networks v1.11 – Aaron Balchunas
Nvbinh2005
 
PPTX
13_TCP_Attack.pptx
AlmaOraevi
 
PPT
OSI Model - transport Layer protocols
sandhyakiran10
 
PPT
05Transport protocols and internet design.ppt
Mugabo4
 
PPTX
Part4-reliable-tcp.pptx
Olivier Bonaventure
 
PPT
TCP Part I How does it work - module13-tcp1.ppt
JeanLuc86
 
PPTX
TCP Header and Three way handshake .pptx
Debasishsahoo77
 
PPT
Data Transmission flow using TCP protocol
projob2412
 
PPT
Transport ppt for students examination.ppt
Saini71
 
PPT
05Transport.ppt
McsaMcse1
 
PPT
the transport layer
tumetr1
 
PPT
Transport layer TCP and UDP.ppt
AlliVinay1
 
DOCX
transport layer
BishalWosti1
 
PPTX
Unit V computer network notes for study.
SahilSukhdeve2
 
PPTX
Tcp presentation
Ramla Sheikh
 
PPT
W14-15L28-29 Process to Process Communication.ppt
eagledevil137
 
PPTX
Introduction-to-Transmission Control.pptx
ajaychelikani5
 
tcp-ippresentation-150614172243-lva1-app6892.pptx
AlphaKoiSylvester
 
Tcp ip presentation
Satya P. Joshi
 
TCP - IP Presentation
Harish Chand
 
7. TCP and UDP_Networks v1.11 – Aaron Balchunas
Nvbinh2005
 
13_TCP_Attack.pptx
AlmaOraevi
 
OSI Model - transport Layer protocols
sandhyakiran10
 
05Transport protocols and internet design.ppt
Mugabo4
 
Part4-reliable-tcp.pptx
Olivier Bonaventure
 
TCP Part I How does it work - module13-tcp1.ppt
JeanLuc86
 
TCP Header and Three way handshake .pptx
Debasishsahoo77
 
Data Transmission flow using TCP protocol
projob2412
 
Transport ppt for students examination.ppt
Saini71
 
05Transport.ppt
McsaMcse1
 
the transport layer
tumetr1
 
Transport layer TCP and UDP.ppt
AlliVinay1
 
transport layer
BishalWosti1
 
Unit V computer network notes for study.
SahilSukhdeve2
 
Tcp presentation
Ramla Sheikh
 
W14-15L28-29 Process to Process Communication.ppt
eagledevil137
 
Introduction-to-Transmission Control.pptx
ajaychelikani5
 
Ad

Recently uploaded (20)

PDF
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
PDF
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PDF
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
PPT
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
DOCX
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
PDF
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PDF
Chad Ayach - A Versatile Aerospace Professional
Chad Ayach
 
PDF
Software Testing Tools - names and explanation
shruti533256
 
PPTX
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
PDF
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
PPT
SCOPE_~1- technology of green house and poyhouse
bala464780
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PDF
Zero Carbon Building Performance standard
BassemOsman1
 
PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
PPTX
Tunnel Ventilation System in Kanpur Metro
220105053
 
PDF
Traditional Exams vs Continuous Assessment in Boarding Schools.pdf
The Asian School
 
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
Chad Ayach - A Versatile Aerospace Professional
Chad Ayach
 
Software Testing Tools - names and explanation
shruti533256
 
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
SCOPE_~1- technology of green house and poyhouse
bala464780
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
Zero Carbon Building Performance standard
BassemOsman1
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
Tunnel Ventilation System in Kanpur Metro
220105053
 
Traditional Exams vs Continuous Assessment in Boarding Schools.pdf
The Asian School
 
Ad

OLD_chap_20_tcp_estab.ppt