0% found this document useful (0 votes)
26 views67 pages

Module 4

This document discusses a computer networks course that covers TCP and UDP internet transport protocols. It provides information about the course code, title, semester, and faculty. It then summarizes key topics to be covered, including TCP connection establishment using three-way handshaking, TCP data transfer, connection release, connection management modeling, sliding windows, and congestion control. It also discusses the future of TCP and limitations of IPv4 that led to the development of IPv6.

Uploaded by

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

Module 4

This document discusses a computer networks course that covers TCP and UDP internet transport protocols. It provides information about the course code, title, semester, and faculty. It then summarizes key topics to be covered, including TCP connection establishment using three-way handshaking, TCP data transfer, connection release, connection management modeling, sliding windows, and congestion control. It also discusses the future of TCP and limitations of IPv4 that led to the development of IPv6.

Uploaded by

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

Course Name

Presentation Material
Department of Computer Science & Engineering
Semester
Course Code: 19CS3602 VI
:
Course Title: Computer Networks Year: 3rd
Faculty Name:

Computer Networks - 19CS3602 Department of Computer Science & Engineering 1


MODULE 4
The Internet Transport Protocols: Introduction to TCP and
UDP, The TCP Service Model, The TCP Segment Header, The
Connection Establishment, The TCP Connection Release, The
TCP Connection Management Modeling, The TCP Sliding
Window, The TCP Congestion Control, The future of TCP.

Computer Networks - 19CS3602 Department of Computer Science & Engineering 2


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
26
27
28
29
30
31
32
TCP Connection Establishment:
3 Way Handshake-
Consider-

 Client wants to establish a connection with the server.


 Before Three Way Handshake, both client and server are in closed state.

TCP Handshake involves the following steps in establishing the connection-

Step-01: SYN-

For establishing a connection,

 Client sends a request segment to the server.


 Request segment consists only of TCP Header with an empty payload.
 Then, it waits for a reply segment from the server.

35
Step-02: SYN + ACK-

After receiving the request segment,

 Server responds to the client by sending the reply segment.


 It informs the client of the parameters at the server side.

Step-03: ACK-

After receiving the reply segment,

 Client acknowledges the response of server.


 It acknowledges the server by sending a pure acknowledgement.
36
TCP Data Transfer

38
TCP Connection Release
• One way to avoid data loss is to use symmetric release, in which each
direction is released independently of the other one.
• One can envision a protocol in which host 1 says: I am done. Are you
done too? If host 2 responds: I am done too. Goodbye, the
connection can be safely released.
• Unfortunately, this protocol does not always work.

COMPUTER NETWORKS - 19CS3602 39


COMPUTER NETWORKS - 19CS3602 40
41
COMPUTER NETWORKS - 19CS3602 42
43
44
TCP connection management modeling
• The steps of a establishing and releasing a TCP connection can be
represented as a finite state machine with 11 states.

COMPUTER NETWORKS - 19CS3602 45


46
• TCP Sliding Window:

• window management in TCP decouples the issues of acknowledgement of the correct receipt
of segments and receiver buffer allocation. For example, suppose the receiver has a 4096-byte
buffer, as shown in Fig. 6-40.
• If the sender transmits a 2048-byte segment that is correctly received, the receiver will
acknowledge the segment. However, since it now has only 2048 bytes of buffer space (until
the application removes some data from the buffer), it will advertise a window of 2048
starting at the next byte expected.
∙ Now the sender transmits another 2048 bytes, which are acknowledged, but the advertised
window is of size 0.
∙ The sender must stop until the application process on the receiving host has removed some
data from the buffer, at which time TCP can advertise a larger window and more data can be
sent.
∙ When the window is 0, the sender may not normally send segments, with two exceptions.
∙ First, urgent data may be sent, for example, to allow the user to kill the process running on
the remote machine.
COMPUTER NETWORKS - 19CS3602 47
COMPUTER NETWORKS - 19CS3602 48
∙ Second, the sender may send a 1-byte segment to force the receiver to
reannounce the next byte expected and the window size. This packet is called a
window probe. The TCP standard explicitly provides this option to prevent
deadlock if a window update ever gets lost.
∙ Senders are not required to transmit data as soon as they come in from the
application. Neither are receivers required to send acknowledgements as soon as
possible.
∙ For example, in Fig. 6-40, when the first 2 KB of data came in, TCP, knowing that it
had a 4-KB window, would have been completely correct in just buffering the data
until another 2 KB came in, to be able to transmit a segment with a 4-KB payload.
This freedom can be used to improve performance.

COMPUTER NETWORKS - 19CS3602 49


TCP Congestion Control
• When the load offered to any networks is more than it can handle,
congestion builds up. The Internet is no exception.
• Algorithms have been developed over the past decade to deal with
congestion.
• Although the network layer also tries to manage congestion, most of
the heavy lifting is done by TCP because the real solution to
congestion is to slow down the data rate.

COMPUTER NETWORKS - 19CS3602 50


51
52
53
54
• In theory congestion can be dealt with by employing a principle
borrowed from physics: the law of conservation of packets. The idea
is not to inject a new packet into the network until an old one leaves
(i.e. is delivered). TCP attempts to achieve this goal by dynamically
manipulating the Window size.
• The first step in managing congestion is detecting it.
• A timeout caused by a lost packet could have been caused either
a. Noise on a transmission line
b. Packet discarded at a congested router

COMPUTER NETWORKS - 19CS3602 55


56
• The internet solution is to realize that potential problem
exist
a. Sender capacity
b. Receiver capacity
• Each sender maintains two windows: the window the
receiver has granted and a second congestion window each
reflects the number of bytes that sender may transmit
• Each reflects the number of bytes the sender may transmit.
The number of bytes that may be sent is the minimum of the
two windows.
COMPUTER NETWORKS - 19CS3602 57
• When a connection is established, the sender initializes the
congestion window to the size of the maximum segment in use of the
connection. It then sends one maximum segment
• If this segment is acknowledged before the timer goes off, it adds one
more segment’s worth of bytes to the congestion window to make it
two acknowledged
• The congestion window keeps growing exponentially until either a
timeout occurs or the receiver’s window is reached. This algorithm is
called slow start but it is not slow at all (Jacobsan, 1988). It is
exponential.

COMPUTER NETWORKS - 19CS3602 58


• In internet congestion control algorithm, it uses a third parameter, the
threshold.
• When a timeout occurs, the threshold is set to half of the current
congestion window, and the congestion is reset to one maximum
segment.
• Successful transmissions grow the congestion window linearly (by one
maximum segment for each burst) instead of one per segment

COMPUTER NETWORKS - 19CS3602 59


COMPUTER NETWORKS - 19CS3602 60
• The maximum segment size here is 1024 bytes. Initially, the
congestion window was 64KB, but a timeout occurred, so the
threshold is set to 32KB and the congestion window to 1 KB for
transmission 0 here
• The congestion window then grows exponentially until it hits the
threshold(32 KB). Starting then it grows linearly

COMPUTER NETWORKS - 19CS3602 61


• Here, in the above figure, in transmission 13 a timeout occurs.
• The transmission is set to half of the current window and then the
slow start is initiated all over again. Once the acknowledgements from
transmission 14 start coming in, the first four each double the
congestion window, but after that, growth becomes linear again.
• If no more timeouts occur the congestion window will continue to
grow up to the size off the receiver’s window. At that point, it will stop
growing and remain constant as long as there are no more timeouts
and the receivers window does not change size.

COMPUTER NETWORKS - 19CS3602 62


Most Significant Problem
• Address Space Limitation
• IPv4 address space is exhausted.
• To accommodate for Future expansion, IPv6 has been introduced.

COMPUTER NETWORKS - 19CS3602 63


Features of IPv6
• Larger Address
• Flexible Header Format
• Improved Options
• Support for Resource Allocation
• Provision for Protocol extension

COMPUTER NETWORKS - 19CS3602 64


COMPUTER NETWORKS - 19CS3602 65
IPv6
• VERS: Specifies the version of the protocol
• FLOW LABEL: The base header contains information that routers use to
associate a datagram with a specific flow and priority.
• PAYLOAD LENGTH: Specifies the number of octets carried in the datagram.
• NEXT HEADER: Specifies the type of the following header.
• HOP LIMIT: This field interprets a time-to-live as a combination of hop count
and maximum time.
• SOURCE ADDRESS: It requires 16 octets to specify the sender address.
• DESTINATION ADDRESS: It requires 16 octets to specify the recipient address.

COMPUTER NETWORKS - 19CS3602 66


IPv6 Address Types

• Unicast: The destination address specifies a single computer

• Cluster: The destination is a set of computers that all share a single


address prefix

• Multicast The destination is a set of computers, possibly at multiple


locations.

COMPUTER NETWORKS - 19CS3602 67

You might also like