Unit 3 B
Unit 3 B
Client/Server Paradigm
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.
see later.
1.Although there are several ways to achieve process-to process
paradigm.
2.A process on the local host, called a client, needs services from a
3.Forexample, to get the day and time from a remote machine, we need a
23.6
The destination port number is needed for delivery; the source port
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
The server process must also define itself with a port number. This port
23.9
Figure 23.4 IANA ranges
• Well-known ports.: The ports ranging from 0 to 1023 are assigned and
• 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
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-
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
oriented.
Connectionless Service
acknowledgment
either. We will see shortly that one of the transport layer protocols in
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
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
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
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
● 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 -
At recieving process -
● 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:
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:
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
• 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
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?
SCHEDULING
FIFO QUEUING
PRIORITY QUEUING
WEIGHTED FAIR QUEUING
TRAFFIC SHAPING
LEAKY BUCKET
TOKEN BUCKET
RESOURCE RESERVATION
ADMISSION CONTROL
SCHEDULING