Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CCNA Exploration 4.docx
Скачиваний:
23
Добавлен:
24.11.2018
Размер:
145 Кб
Скачать
☆

4.2.5 Tcp Session Termination Page 1:

To close a connection, the FIN (Finish) control flag in the segment header must be set. To end each one-way TCP session, a two-way handshake is used, consisting of a FIN segment and an ACK segment. Therefore, to terminate a single conversation supported by TCP, four exchanges are needed to end both sessions. Note: In this explanation, the terms client and server are used in this description as a reference for simplicity, but the termination process can be initiated by any two hosts that complete the session:

1. When the client has no more data to send in the stream, it sends a segment with the FIN flag set.

2. The server sends an ACK to acknowledge the receipt of the FIN to terminate the session from client to server.

3. The server sends a FIN to the client, to terminate the server to client session.

4. The client responds with an ACK to acknowledge the FIN from the server.

When the client end of the session has no more data to transfer, it sets the FIN flag in the header of a segment. Next, the server end of the connection will send a normal segment containing data with the ACK flag set using the acknowledgment number, confirming that all the bytes of data have been received. When all segments have been acknowledged, the session is closed.

The session in the other direction is closed using the same process. The receiver indicates that there is no more data to send by setting the FIN flag in the header of a segment sent to the source. A return acknowledgement confirms that all bytes of data have been received and that session is, in turn, closed.

As shown in the figure, the FIN and ACK control flags are set in the segment header, thereby closing a HTTP session.

It is also possible to terminate the connection by a three-way handshake. When the client has no more data to send, it sends a FIN to the server. If the server also has no more data to send, it can reply with both the FIN and ACK flags set, combining two steps into one. The client replies with an ACK.

4.2.5 - TCP Session Termination The diagram depicts a Wireshark screenshot of an Ethernet frame showing the TCP session termination request (FIN) and the resulting ACK to acknowledge the receipt of the FIN to terminate the session from the client to the server. In the screenshot, various information lines are highlighted:  FIN Frame 20:  The protocol analyzer shows details of frame 20, the TCP FIN request, including the destination and source ports and the header field contents and values.  ACK Frame 20: Source IP 192.168.254.254, Destination IP 10.1.1.1.  FIN Frame 20 detail:  Transmission Control Protocol, Source Port: http (80), Destination Port: 1069 (1069) Seq: 440, Ack: 414, Len: 0.  Flags: 0x11 (FIN, ACK).  00010000=Acknowledgment: Set.  00000001=Fin: Set.  ACK Frame 21:  The protocol analyzer shows details of frame 21, the TCP ACK response, including the destination and source ports and the header field contents and values.  ACK Frame 21: Source IP 10.1.1.1, Destination IP 192.168.254.254.  ACK Frame 21 detail:  Transmission Control Protocol, Source Port: 1069 (1069), Destination Port: http (80) Seq: 414, Ack: 440, Len: 0.  Flags: 0x10 (ACK)  00010000=Acknowledgment: Set  [SEQ/ACK analysis]  [This is an ACK to the segment in frame: 20]

Page 2:

In this activity, you will study the TCP 3-way handshake for session establishment and the TCP process for session termination. Many application protocols use TCP, and visualizing the session establishment and termination processes with Packet Tracer will deepen your understanding.

Click the Packet Tracer icon to launch the Packet Tracer activity.

4.2.5 - TCP Session Termination Link to Packet Tracer Exploration: TCP Session Establishment and Termination.  In this activity, you study the TCP three-way handshake for session establishment and the TCP process for session termination. Many application protocols use TCP. Visualizing the session establishment and termination processes with Packet Tracer will deepen your understanding. 

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]