0% found this document useful (0 votes)
12 views

Unit 3 B

Computer Networking

Uploaded by

Shruti Pawar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Unit 3 B

Computer Networking

Uploaded by

Shruti Pawar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 114

Process-to-Process Delivery:

UDP, TCP, and SCTP


OSI Model

Topics discussed in this section:

Client/Server Paradigm

Multiplexing and Demultiplexing

Connectionless Versus Connection-Oriented Service

Reliable Versus Unreliable

Three Protocols
23.2
Types of data deliveries
The transport layer is responsible for process-to-process

delivery.

23.4
1.The delivery of a packet, part of a message, from one process to

another.

2.Two processes communicate in a client/server relationship, as we will

see later.
1.Although there are several ways to achieve process-to process

communication, the most common one is through the client/server

paradigm.

2.A process on the local host, called a client, needs services from a

process usually on the remote host, called a server.

Both processes (client and server) have the same name.

3.Forexample, to get the day and time from a remote machine, we need a

Daytime client process running on the

local host and a Daytime server process running on a remote machine.

23.6
The destination port number is needed for delivery; the source port

number is needed for the reply.

In the Internet model, the port numbers are 16-bit integers between 0 and

65,535.

The client program defines itself with a port number, chosen randomly by

the transport layer software running on the client host. This is the

ephemeral port number.

The server process must also define itself with a port number. This port

number,however, cannot be chosen randomly this is called Well-known 23.7


Port numbers
Figure 23.3 IP addresses versus port numbers

23.9
Figure 23.4 IANA ranges

• Well-known ports.: The ports ranging from 0 to 1023 are assigned and

controlledby lANA. These are the well-known ports.

• Registered ports. : The ports ranging from 1024 to 49,151 are not assigned or

con-trolled by lANA. They can only be registered with lANA to prevent duplication.

• o Dynamic ports. The ports ranging from 49,152 to 65,535 are neither

controllednor registered. They can be used by any process. These are the

ephemeral ports
23.10
Figure 23.5 Socket address

•Process-to-process delivery needs two identifiers, IP address


and the port number, at

each end to make a connection.

• The combination of an IP address and a port number is


called a socket address.

23.11
Multiplexing

At the sender site, there may be several processes that need to send

packets. However,

there is only one transport layer protocol at any time. This is a many-

to-one relationship and requires multiplexing. The protocol accepts

messages from different processes,

differentiated by their assigned port numbers. After adding the


Demultiplexing
header, the transport layer
At the receiver site, the relationship is one-to-many and requires
passes the packet to the network layer.
demultiplexing. The

transport layer receives datagrams from the network layer. After error

checking and

dropping of the header, the transport layer delivers each message to 23.12
Figure 23.6 Multiplexing and demultiplexing

23.13
Connectionless Versus Connection-Oriented Service

A transport layer protocol can either be connectionless or connection-

oriented.

Connectionless Service

In a connectionless service, the packets are sent from one party to

another with no need

for connection establishment or connection release. The packets are

not numbered; they

may be delayed or lost or may arrive out of sequence. There is no

acknowledgment

either. We will see shortly that one of the transport layer protocols in

the Internet model, 23.14


Reliable VS Unreliable

•The transport layer service can be reliable or unreliable. If the application


layer program needs reliability, we use a reliable transport layer protocol

by implementing flow and

error control at the transport layer. This means a slower and more

complex service.

•On the other hand, if the application program does not need reliability
because it uses itsown flow and error control mechanism or it needs fast

service or the nature of the service

does not demand flow and error control (real-time applications) then an
23.15
Thank You

23.16
UDP
Header format !!!!!
UDP (USER DATAGRAM PROTOCOL)

UDP (User Datagram Protocol) is a communications protocol that is primarily


used for establishing low-latency and loss-tolerating connections between
applications on the internet
It speeds up transmissions by enabling the transfer of data before an agreement
is provided by the receiving party. As a result, UDP is beneficial in time-
sensitive communications, including voice over Internet Protocol (VoIP), domain
name system (DNS) lookup, and video or audio playback. UDP is an alternative
to Transmission Control Protocol (TCP).
UDP is considered a connectionless protocol because it doesn't require a
virtual circuit to be established before any data transfer occurs. The
communication protocol just sends the packets, which means that it has much
lower bandwidth overhead and latency.
UDP AND ITS WORKING

The Header of the UDP is fixed till 8B


The communication of systems in local home and corporate networks as well as
public networks such as the internet is based by default on the internet protocol
family
UDP (User Datagram Protocol) is a connectionless protocol of the internet
protocol family that operates at the transport layer
UDP is used for the fast transmission of data packets in IP networks.
Typical fields of application for UDP are DNS queries, VPN connections, and
audio/video streaming.
UDP Format is a unreliable Format
UDP HEADER FORMAT
THANKS!!!!!

..
UDP
WORKING, SERVICES AND ITS ADVANTAGES, DISADVANTAGES.
UDP (User Datagram
Protocol)
 UDP (User Datagram Protocol) is a communications protocol that is
primarily used for establishing low-latency and loss-tolerating
connections between applications on the internet
 It speeds up transmissions by enabling the transfer of data before
an agreement is provided by the receiving party. As a result, UDP is
beneficial in time-sensitive communications, including voice over
Internet Protocol (VoIP), domain name system (DNS) lookup, and
video or audio playback. UDP is an alternative to Transmission
Control Protocol (TCP).
 UDP is considered a connectionless protocol because it doesn't
require a virtual circuit to be established before any data transfer
occurs. The communication protocol just sends the packets, which
means that it has much lower bandwidth overhead and latency.
UDP And its Working

 The Header of the UDP is fixed till 8B


 The communication of systems in local home and corporate
networks as well as public networks such as the internet is based
by default on the internet protocol family
 UDP (User Datagram Protocol) is a connectionless protocol of the
internet protocol family that operates at the transport layer
 UDP is used for the fast transmission of data packets in IP
networks. Typical fields of application for UDP are DNS queries,
VPN connections, and audio/video streaming.
 UDP Format is a unreliable Format
UDP Header Format
Source Port( 16 B): Destination port ( 16 B ):
Used For The End To End
Delivery
For every system the source
port
number is mandatory as it
gives
every machine the
functionality
to provide information a
destination
port.

Length(16 B): Checksum(16 B) (Hash Value):


The Actual Size of the Length is Checksum is used for the error Detection in
2^16=65535 bits UDP (optional value of IPV4)
The Total Length is 65535 but it The Checksum gets calculated as :
would consist of the Header(8 Checksum = UDP Header + UDP Data +
Applications of the UDP

 Query Response System(on request, one reply)(DNS, DHCP).


 Speed (Online Games, Voice over the IP)
 Broadcast / Multicast (RIP)
 Continuous Streaming (Skype, Meeting)
 Less Overhead (It adds less number of fields with the payload)
Advantages of UDP

 UDP(User datagram Protocol) provides a faster access over the


Network
 small packet sizes than TCP by about 60%
 UDP header 20 bytes
 TCP header 80 bytes
 Connectionless: No connection to create and maintain
 You don’t have to create connection first before sending out data
 You have more control of when data is being sent out
Disadvantages of UDP

 Data corruption is a common occurance on the Internet, UDP has


a primitive form of error detection.
 No compensation for lost packets
 Packets can arrive out of order
 No congestion control
Summary of UDP

 UDP(User Datagram Protocol) is a connection less Protocol


 UDP is a unreliable Protocol
 UDP a routing protocol that is wide efficient that of the TCP
 UDP services provides 4 Data header Formats which is quite less
than the TCP that uses multiple Data header Formats with its
Payload
 UDP services provides a one request one reply method that only
is oriented with the destination address and not with the
connection building
 Conclusion :- UDP may be light weight, but not that reliable.
Thankyou everyone!!

Hope the Presentation was Apprehensible..


Transmission Control
Protocol
Transmission Control Protocol (TCP)
● Transmission Control Protocol (TCP) corresponds to the Transport Layer
● TCP is a reliable and connection oriented protocol.
of OSI Model.
● TCP offers connection oriented end-to-end packet delivery.
● It acts as back bone for connection.
● TCP ensures reliability by sequencing bytes with a forwarding acknowledgement number that

indicates to the destination the next byte the source expect to receive.
● It retransmits the bytes not acknowledged with in specified time period.
● example: web, sending mail, receiving mail ,FTPetc
TCP/IP protocol suite
TCP
Services
TCP offers following services :
1. Process to process communication
2. Stream Delivery Service
3. Sending and Receiving Buffers
4. Segments
5. Full Duplex Service
6. Connection Oriented Service
7. Reliable Service
1. Process to process
communication

TCP provides process-to-process communication using port numbers.


2. Stream Delivery Service
➢ TCP protocol is stream oriented because it allows the sending process to send data as stream of bytes and

the receiving process to obtain data as stream of bytes.


➢ TCP creates an environment in which the two processes seem to be connected by an carries
imaginary "tube" that
their data across the Internet.
➢ The sending process produces (writes to) the stream of bytes, and the receiving process consumes (reads
from) them.
3. Sending and Receiving Buffers

● It may not be possible for sending and receiving process to produce and obtain data at
same speed, therefore, TCP needs buffers for storage at sending and receiving ends.
● Circular array of buffer is of 1 byte location.
At sending process -

1. White section - empty space.


2. Colored setion - holds bytes that have sent but not get the acknowledgement from reciever.
3. Shaded section - bytes to be send.

At recieving process -

1. White section- empty space.

2. colored section - Recieved byte to read , after reading it become free\empty.


4. Segments

● The Transmission Control Protocol (TCP), at transport layer groups the bytes into a packet. This packet is
called segment.
● Before transmission of these packets, these segments are encapsulated into an IP datagram.
● Segment are not of same size.
● TCP adds header to each segment and deliver to network layer.
5 . Connection Oriented
Service
● TCP, unlike UDP, is a connection-oriented protocol. When a process at site A wants tosend
and receive data from another process at site B, the following occurs:

1. The two TCPs establish a connection between them.

2. Data are exchanged in both directions.

3. The connection is terminated.

This is a virtual connection, not a physical connection.


6 .Full Duplex
Service
Transmitting the data in duplex mode means flow of data in both the directions at the same time.

7. Reliable Service
For sake of reliability, TCP uses acknowledgement mechanism.
Thank
you….
TCP FEATURES
Some of the TCP features are as following:
1.Numbering System
2.Flow control
3.Error Control
4.Congestion Control
5.Reliable
6.Full Duplex
7.Orderly Delivery
1.NUMBERING SYSTEM :
Numbering System consists:
a. Byte Number
b. Sequence Number
c. Acknowledgment Number
A. Byte Number:
-Bytes of data being transferred in each connection are numbered
by TCP.
-The numbering starts with a randomly generated number.
B. Sequence Number:
-After the bytes have been numbered , TCP assigns a sequence
number to each segment that is being sent.
-The sequence number for each segment is the number of first
byte carried in that segment.
C. Acknowledgment Number:
-Acknowledgment Number is use to confirm the bytes it has
received.
-The value of acknowledgment field in a segment defines number of
next byte a party expects to receive.

2.FLOW CONTROL:
-The receiver of data controls the amount of data that are to be sent by
receiver.
-This is done to prevent the receiver from being overloaded with data.
3.ERROR CONTROL:
-TCP implements error control mechanism.
-If wrong data is received or error is generated TCP will check data by
checksum.
4.CONGESTION CONTROL:
-TCP takes into account congestion in network.
-The amount of data sent by sender is not only
controlled by receiver but is also by level of congestion in the network.
5.RELIABILITY:
-TCP is reliable protocol. That is the receiver always sends
either positive or negative acknowledgement about data packet to the
sender so that sender will know whether data packet is reached the
destination or it needs to be resend it.
6.FULL DUPLEX:
-TCP is full duplex.
-Both parties can send as well as receive the data packets.
7.ORDERLY DELIVER:
-TCP ensures that the data reaches intended destination in same
order it was sent.
TCP Segment structure –
TCP segment consists of data bytes to be
sent and a header that is added to the
data by TCP as shown:
The header of a TCP segment can range from 20-60 bytes. 40
bytes are for options. If there are no options, header is of 20
bytes else it can be of upmost 60 bytes.
Header fields:

Source Port Address –


16 bit field that holds the port address of the application that is sending the data
segment.
Destination Port Address –
16 bit field that holds the port address of the application in the
host that is receiving the data segment.
Sequence Number –
32 bit field that holds the sequence number, i.e, the byte number of the
first byte that is sent in that particular segment. It is used to reassemble
the message at the receiving end if the segments are received out of order.
Acknowledgement Number –
32 bit field that holds the acknowledgement number, i.e, the byte number
that the receiver expects to receive next. It is an acknowledgment for the
previous bytes being received successfully.
Header Length (HLEN) –

This is a 4 bit field that indicates the length of the


TCP header by number of 4-byte words in the
header, i.e, if the header is of 20 bytes(min length
of TCP header), then this field will hold 5 (because
5 x 4 = 20) and the maximum length: 60 bytes,
then it’ll hold the value 15(because 15 x 4 = 60).
Hence, the value of this field is always between 5
and 15
Control flags –
These are 6 1-bit control bits that control connection
establishment, connection termination, connection
abortion, flow control, mode of transfer etc. Their
function is:
URG: Urgent pointer is valid
ACK: Acknowledgement number is valid( used in
case of cumulative acknowledgement)
PSH: Request for push
RST: Reset the connection
SYN: Synchronize sequence numbers
FIN: Terminate the connection
Window size –
This is 16 bits field.
This field tells the window size of the
sending TCP in bytes.
Checksum –
This field holds the checksum for error
control. It is mandatory in TCP as
opposed to UDP.
Urgent pointer –
This is 16 bit field.
This field (valid only if the URG control
flag is set) is used to point to data that is
urgently required that needs to reach
the receiving process at the earliest. The
value of this field is added to the
sequence number to get the byte
number of the last urgent byte.
Options and padding-
There can be upto 40 bytes of optional
information in TCP header.
Thank You!!!
The Three Steps of a Three-Way
Handshake
Step 1: A connection between server and client
is established

First, a connection between server and client is established, so


the target server must have open ports that can accept and
initiate new connections. The client node sends a SYN
(Synchronize Sequence Number) data packet over an IP
network to a server on the same or an external network.
This SYN packet is a random sequence number that the client
Step 2: The server receives the SYN packet
from the client node
When the server receives the SYN packet from the client
node, it responds and returns a confirmation receipt – the
ACK (Acknowledgement Sequence Number) packet or
SYN/ACK packet. This packet includes two sequence
numbers.
The first one is ACK one, which is set by the server to one
more than the sequence number it received from the
client (e.g. 8001).
The second one is the SYN sent by the server, which is
another random sequence number (for example, 15000).
This sequence indicates that the server correctly
acknowledged the client’s packet, and that is sending its
Step 3: Client node receives the SYN/ACK from
the server and responds with an ACK packet

The client node receives the SYN/ACK from the server and
responds with an ACK packet. Once again, each side must
acknowledge the sequence number received by
incrementing it by one.
So now it’s the turn of the client to acknowledge the
server’s packet by adding one to the sequence number (in
this case, 15001), and resend it to the server.
Upon completion of this process, the connection is created
and the host and server can communicate.
Exampl
e:
Error Control in TCP
1. Checksum
• Every segment contains a checksum field which is
used to find corrupted segment.
• If the segment is corrupted, then that segment is
discarded by the destination TCP and is considered
as lost.
• For calculating checksum, a pseudo IP Header is
Used.
2. Acknowledgement
• TCP has another mechanism called
acknowledgement to affirm that the data
segments have been delivered.
• Control segments that contain no data but
has sequence number will be acknowledged
as well but ACK segments are not
acknowledged.
• The acknowledgement number is the
sequence number of the next byte the
receiver expects to receive.
• The receiver ack'ing sequence number x
acknowledges receipt of all data bytes less
than (but not including) byte number x.
3. Retransmission
• When a segment is missing, delayed to deliver to
receiver, corrupted when it is checked by receiver
then that segment is retransmitted again.
• Segments are retransmitted only during two events:
 when the sender receives three duplicate
acknowledgements (ACK).
 when a retransmission timer expires.
a. Retransmission after RTO
• TCP always preserve one retransmission time-
out (RTO) timer for all sent but not
acknowledged segments.
• When the timer runs out of time, the earliest
segment is retransmitted. Here no timer is set
for acknowledgement.
• In TCP, RTO value is dynamic in nature and it is
updated using round trip time (RTT) of
segments.
• RTT is the time duration needed for a segment
to reach receiver and an acknowledgement to
be received to the sender.
b. Retransmission: 3 duplicate ACKs
• Sometimes one segment is lost and the
receiver receives so many out-of-order
segments that they cannot be saved.
• In order to solve this situation, three
duplicate acknowledgement method is used
and missing segment is retransmitted
immediately instead of retransmitting
already delivered segment.
• This is a fast retransmission because it
makes it possible to quickly retransmit lost
segments instead of waiting for timer to
end.
DATA TRAFFIC
The main focus of congestion control and
quality of service is data traffic. In congestion
control we try to avoid traffic congestion. In
quality of service, we try to create an
appropriate environment for the traffic.
DATA TRAFFIC

• TRAFFIC DESCRIPTOR
• TRAFFIC PROFILE
TRAFFIC DESCRIPTORS
TRAFFIC DESCRIPTORS
• Traffic descriptor are qualitative values that
represent a data flow
• Average data rate = amount of data / time;
• Peak data rate : The maximum data rate of
the traffic.
• Maximum burst size : The Maximum length
of time the traffic is generated at the peak
rate.
• Effective bandwidth : Bandwidth that the
network needs to allocate for traffic flow.
TRAFFIC
PROFILES

• CONSTANT BIT RATE


• VARIABLE BIT RATE
• BURSTY
CONSTANT BIT
RATE

• This traffic model has a data rate that does not change.
• The average data rate and peak data rate are the same.
• The maximum burst size is not applicable.
VARIABLE BIT RATE

• The rate of the data flow changes in time.


• The changes are smooth instead of sudden and sharp.
• The average data rate and the peak data rate are different.
• Traffic is more difficult to handle than previous traffic.
BURSTY

• The data rate changes suddenly in a very short time.


• It may also remain at this value for a while.
• The average bit rate and peak bit rate are very different
values in this type of flow.
• The Maximum burst size is significant.
• The profile is very unpredictable hence it is difficult to handle.
THANK YOU…
CONGESTION AND
CONGESTION CONTROL
CONGESTION
 Congestion in network occurs if the
load on the network-the number of
packets send to the network is
greater than the capacity of the
network-the number of packets
network can handle.
 Congestion refers to the mechanism
and techniques to control the
Congestion and keep the load
below the capacity.
QUEUES IN ROUTER
Network Performance
Congestion Control
OPEN CLOSED
LOOP LOOP

Closed loop congestion


Policies are applied to
control mechanism try
prevent congestion
to alleviate congestion
before it happens.
after it happens.

Congestion control is Back pressure, choke


handled by either packet etc mechanism
source or the have been used by
destination different protocols.
Open loop congestion
control policies
Retransmission
Policy

Admission
Window Policy
Policy

Discarding Acknowledgem
Policy ent Policy
Sender Receiver
Closed loop congestion control
mechanisms

Backpress Choke
ure Packet

Implicit Explicit
Signaling Signaling
Backpressure method for
alleviating congestion
Choke Packet
Closed loop congestion control
mechanisms

Backpress Choke
ure Packet

Implicit Explicit
Signaling Signaling
Sender Receiver
Thank You
QUALITY OF SERVICE
WHAT IS QUALITY OF SERVICE?

 Qualityof service is the ability to


provide different priority to different
applications,users,or data flows ,or to
guarantee a certain level of
performance to a data flow.
EXAMPLE FOR QOS
FLOW CHARACTERISTICS
FLOW CLASSES

 Based on the flow characteristics, we can classify


flows into groups, with each group having similar
levels of characteristics.

 This categorization is not formal or universal.


Technique to improve the quality of
service.

 SCHEDULING
 FIFO QUEUING
 PRIORITY QUEUING
 WEIGHTED FAIR QUEUING
 TRAFFIC SHAPING
 LEAKY BUCKET
 TOKEN BUCKET
 RESOURCE RESERVATION
 ADMISSION CONTROL
SCHEDULING

 Packetsfrom different flow arrive at


switch or router for processing.
A good scheduling technique treats the
different flow in a fair and appropriate
manner.
FIFO QUEUING
PRIORITY QUEUING
WEIGHTED FAIR QUEUING
TRAFFIC SHAPING

 Traffic shaping is the mechanism to


control the amount and the rate of the
traffic sent to the network.
LEAKY BUCKET
LEAKY BUCKET IMPLEMENTATION
TOKEN BUCKET
RESOURCE RESERVATION

A flow of data needs resources such as buffer ,


bandwidth , CPU time , and so on.
 QOS can be improved if these resources are
reserved beforehand.
ADMISSION CONTROL

 Routersor switches puts restriction on the


admission of packets from host.
 Beforea router accepts the flow , it checks
the flow for specifications in terms of
bandwidth , buffer size , CPU speed etc.
THANK YOU!

You might also like