TCP Connection Termination | FIN Segment (2024)

Spread the love


Three Way Handshake-

Before you go through this article, make sure that you have gone through the previous article on Three Way Handshake.

We have discussed-

  • TCP uses Three Way Handshake to establish a connection between the sender and receiver.
  • Connection establishment using Three Way Handshake involves the steps as shown-

TCP Connection Termination | FIN Segment (1)

Also Read- TCP Retransmission

In this article, we will discuss how a TCP connection is terminated.

TCP Connection Termination-

ATCP connection is terminated using FIN segment where FIN bit is set to 1.

Consider-

  • There is a well established TCP connection between the client and server.
  • Client wants to terminate the connection.

The following steps are followed in terminating the connection-

Step-01:

For terminating the connection,

  • Client sends a FIN segment to the server with FIN bit set to 1.
  • Client enters the FIN_WAIT_1 state.
  • Client waits for an acknowledgement from the server.

TCP Connection Termination | FIN Segment (2)

Step-02:

After receiving the FIN segment,

  • Server frees up its buffers.
  • Server sends an acknowledgement to the client.
  • Server enters the CLOSE_WAIT state.

TCP Connection Termination | FIN Segment (3)

Step-03:

After receiving the acknowledgement, client enters the FIN_WAIT_2 state.

Now,

  • The connection from client to server is terminated i.e. one way connection is closed.
  • Client can not send any data to the server since server has released its buffers.
  • Pure acknowledgements can still be sent from the client to server.
  • The connection from server to client is still open i.e. one way connection is still open.
  • Server can send both data and acknowledgements to the client.

TCP Connection Termination | FIN Segment (4)

Step-04:

Now, suppose server wants to close the connection with the client.

For terminating the connection,

  • Server sends a FIN segment to the client with FIN bit set to 1.
  • Server waits for an acknowledgement from the client.

TCP Connection Termination | FIN Segment (5)

NOTE

If server wanted,

It could have sent the FIN segment along with the previous acknowledgment that it sent to the client.

Step-05:

After receiving the FIN segment,

  • Client frees up its buffers.
  • Client sends an acknowledgement to the server (not mandatory).
  • Client enters the TIME_WAIT state.

TCP Connection Termination | FIN Segment (6)

TIME_WAIT State-

  • The TIME_WAIT state allows the client to resend the final acknowledgement if it gets lost.
  • The time spent by the client in TIME_WAIT state depends on the implementation.
  • The typical values are 30 seconds, 1 minute and 2 minutes.
  • After the wait, the connection gets formally closed.

Next Article- Practice Problems On TCP

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Summary

TCP Connection Termination | FIN Segment (7)

Article Name

TCP Connection Termination | FIN Segment

Description

TCP Connection Termination- A TCP connection is terminated using FIN segment where FIN bit is set to 1. Three Way Handshake is used to establish a TCP Connection. The steps involved in terminating a TCP Connection are described.

Author

Akshay Singhal

Publisher Name

Gate Vidyalay

Publisher Logo

TCP Connection Termination | FIN Segment (8)


Spread the love

TCP Connection Termination | FIN Segment (2024)
Top Articles
divestiture
How Much Postage Do I Need? — Little Postage House
Where To Go After Howling Pit Code Vein
Roblox Roguelike
Restored Republic January 20 2023
Unitedhealthcare Hwp
America Cuevas Desnuda
5 Bijwerkingen van zwemmen in een zwembad met te veel chloor - Bereik uw gezondheidsdoelen met praktische hulpmiddelen voor eten en fitness, deskundige bronnen en een betrokken gemeenschap.
Richard Sambade Obituary
Erskine Plus Portal
Marist Dining Hall Menu
Concacaf Wiki
Minn Kota Paws
Mikayla Campinos Videos: A Deep Dive Into The Rising Star
Audrey Boustani Age
Darksteel Plate Deepwoken
Nalley Tartar Sauce
Stihl Km 131 R Parts Diagram
Blackwolf Run Pro Shop
"Une héroïne" : les funérailles de Rebecca Cheptegei, athlète olympique immolée par son compagnon | TF1 INFO
Jellyfin Ps5
Craigslist Missoula Atv
Publix Super Market At Rainbow Square Shopping Center Dunnellon Photos
10 Fun Things to Do in Elk Grove, CA | Explore Elk Grove
Gayla Glenn Harris County Texas Update
Curver wasmanden kopen? | Lage prijs
Rqi.1Stop
Ppm Claims Amynta
Craigslist Northfield Vt
Little Rock Skipthegames
Like Some Annoyed Drivers Wsj Crossword
Delectable Birthday Dyes
Foodsmart Jonesboro Ar Weekly Ad
Core Relief Texas
Does Circle K Sell Elf Bars
47 Orchid Varieties: Different Types of Orchids (With Pictures)
Soiza Grass
Federal Student Aid
Spinning Gold Showtimes Near Emagine Birch Run
The Boogeyman Showtimes Near Surf Cinemas
How are you feeling? Vocabulary & expressions to answer this common question!
Blasphemous Painting Puzzle
Culvers Lyons Flavor Of The Day
The Wait Odotus 2021 Watch Online Free
Charli D'amelio Bj
Powerboat P1 Unveils 2024 P1 Offshore And Class 1 Race Calendar
Leland Westerlund
Dobratz Hantge Funeral Chapel Obituaries
25100 N 104Th Way
Lux Funeral New Braunfels
Nfsd Web Portal
Grace Charis Shagmag
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 5501

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.