0% found this document useful (0 votes)
18 views26 pages

Unit4 2 Tcp&connectionmanagement

Tcp connection management CN unit 4

Uploaded by

vasutyagi963446
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views26 pages

Unit4 2 Tcp&connectionmanagement

Tcp connection management CN unit 4

Uploaded by

vasutyagi963446
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

VIVEK JAIN, AP (CSE)

1
Transport Layer:
TCP & Connection Management

2
TCP

TCP is a connection-oriented protocol; it creates a


virtual connection between two TCPs to send data. In
addition, TCP uses flow and error control mechanisms
at the transport level.

3
Table 1 Well-known ports used by TCP

4
Figure 1 Stream delivery

5
Figure 2 Sending and receiving buffers

6
Figure 3 TCP segments

7
Note

The bytes of data being transferred in


each connection are numbered by TCP.
The numbering starts with a randomly
generated number.

8
Example 1

The following shows the sequence number for each


segment:

9
Note

The value in the sequence number field


of a segment defines the
number of the first data byte
contained in that segment.

10
Note

The value of the acknowledgment field


in a segment defines
the number of the next byte a party
expects to receive.
The acknowledgment number is
cumulative.

11
Figure 4 TCP segment format

12
Figure 5 Control field

13
Table 2 Description of flags in the control field

14
TCP connection

TCP is a connection-oriented protocol. It establishes a


virtual path between the source and the destination.

Connection Establishment
Connection Termination
Connection Resetting

15
Figure 6 Connection establishment using three-way handshaking

16
Figure 7 Connection termination using three-way handshaking

17
Figure 8 Half-close

18
Figure 9 Sliding window

19
Note

A sliding window is used to make


transmission more efficient as well as
to control the flow of data so that the
destination does not become
overwhelmed with data.
TCP sliding windows are byte-oriented.

20
Figure 10 Example 2

21
Silly Window Syndrome

Syndrome Created by Sender – Nagle’s algorithm


Syndrome Created by Receiver – Clark’s Solution & Delayed
acknowlegement

22
Note

Some points about TCP sliding windows:


❏ The size of the window is the lesser of rwnd and
cwnd.
❏ The source does not have to send a full window’s
worth of data.
❏ The window can be opened or closed by the
receiver, but should not be shrunk.
❏ The destination can send an acknowledgment at
any time as long as it does not result in a shrinking
window.
❏ The receiver can temporarily shut down the
window; the sender, however, can always send a
segment of 1 byte after the window is shut down.

23
Figure 11 Normal operation

24
Figure 12 Lost segment

25
TCP Timers

To perform its operation smoothly.

Retransmission
Persistence
Keep-alive
Time-waited

26

You might also like