SlideShare a Scribd company logo
1 of 58
K. PALANIVEL
Systems Analyst, Computer Centre
Pondicherry University, Puducherry – 605014.
LECTURE 7 COMS 525: TCPIP
TOPIC
User Datagram Protocol
Transport Layer Protocols
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Transport Layer Responsibilities
Various responsibilities of a Transport Layer –
• Process to process delivery
• End-to-end Connection between hosts
• Multiplexing and Demultiplexing
• Data integrity and Error correction
• Flow control
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Process to Process Delivery
• While Data Link Layer requires the MAC address (48
bits address contained inside the Network Interface
Card of every host machine) of source - destination
hosts to correctly deliver a frame and
• Network layer requires the IP address for appropriate
routing of packets
• Transport Layer requires a Port number to correctly
deliver the segments of data to the correct process
amongst the multiple processes running on a particular
host.
• A port number is a 16 bit address used to identify any
client-server program uniquely.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
End-to-end Connection Between Hosts
• Transport layer is also responsible for creating the end-
to-end Connection between hosts for which it mainly
uses TCP and UDP.
• TCP is a secure, connection- orientated protocol which
uses a handshake protocol to establish a robust
connection between two end- hosts.
• TCP ensures reliable delivery of messages and is used
in various applications.
• UDP on the other hand is a stateless and unreliable
protocol which ensures best-effort delivery.
• It is suitable for the applications which have little
concern with flow or error control and requires to send
bulk of data like video conferencing.
• It is a often used in multicasting protocols.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Multiplexing and Demultiplexing
• Multiplexing allows simultaneous use of different
applications over a network which are running on a host.
• Transport layer provides this mechanism which enables
us to send packet streams from various applications
simultaneously over a network.
• Transport layer accepts these packets from different
processes differentiated by their port numbers and
passes them to network layer after adding proper
headers.
• Similarly Demultiplexing is required at the receiver side to
obtain the data coming from various processes.
• Transport receives the segments of data from network
layer and delivers it to the appropriate process running on
the receiver’s machine.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Congestion Control
• Congestion is a situation in which too many sources over
a network attempt to send data and the router buffers
start overflowing due to which loss of packets occur.
• As a result retransmission of packets from the sources
increase the congestion further.
• In this situation Transport layer provides Congestion
Control in different ways.
• It uses open loop congestion control to prevent the
congestion and closed loop congestion control to
remove the congestion in a network once it occurred.
• TCP provides AIMD- additive increase multiplicative
decrease , leaky bucket technique for congestion control.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Data integrity and Error correction
Transport layer checks
• for errors in the messages coming from application
layer by using error detection codes,
• computing checksums,
• it checks whether the received data is not corrupted and
uses the ACK and NACK services to inform the sender
if the data is arrived or not and checks for the integrity
of data.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Flow control
• Transport layer provides a flow control mechanism
between the adjacent layers of the TCP/IP model.
• TCP also prevents the data loss due to a fast sender
and slow receiver by imposing some flow control
techniques.
• It uses the method of sliding window protocol which is
accomplished by receiver by sending a window back to
the sender informing the size of data it can receive.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Introduction to UDP
 UDP is located between the application layer and the IP
layer, and serves as the intermediary between the
application programs and the network operations.
 UDP is a connectionless transport protocol, i.e. it doesn't
guarantee either packet delivery or that packets arrive in
sequential order.
 With UDP, bytes of data are grouped together in discrete
packets which are sent over the network.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 Packets may travel along different paths depending
on the state of the network.
 No two packets are guaranteed the same route.
 Each packet has a time-to-live (TTL) counter, which
is updated when it is routed along to the next point in
the network. When the timer expires, it will be
discarded, and the recipient will not be notified.
 If a packet does arrive, it will always arrive intact.
Packets that are corrupt or only partially delivered are
discarded.
Introduction contd…
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 In TCP/IP protocol suite, using IP to transport
datagram (similar to IP datagram).
 Allows a application to send datagram to other
application on the remote machine.
 Delivery and duplicate detection are not guaranteed.
 Low overhead: faster than TCP
Introduction contd…
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 End-to-End: an application sends/receives data to/from
another application.
 Connectionless: Application does not need to pre-establish
communication before sending data; application does not need
to terminate communication when finished.
 Message-oriented: application sends/receives individual
messages (UDP datagram), not packets.
 Best-effort: same best-effort delivery semantics as IP. I.e.
message can be lost, duplicated, and corrupted.
 Arbitrary interaction: application communicates with many
or one other applications.
 Operating system independent: identifying application does
not depend on O/S.
UDP Characteristics
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Process to Process Communication
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 Port Number
 Process-to-process communication: client-server paradigm
 Both process (client and server) have the same name
 Daytime client process / daytime server
 Today OS supports multi-user and multi-processors
 A remote computer can run several server programs at
same time
 A local computer can run several client programs at same
time
 For communication, we must define the
 local host, local process, remote host, remote process
Process to Process Communication
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
UDP Port numbers
• The Daytime Protocol is a service in the Internet Protocol Suite RFC 867.
• It is intended for testing and measurement purposes in computer networks.
• A host may connect to a server that supports the Daytime Protocol on either TCP or
UDP port 13.
• The server returns an ASCII character string of the current date and time in an
unspecified format.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
IP vs. Port numbers
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Process to Process Communication
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
UDP packets, called user datagrams, have a fixed-size
header of 8 bytes.
UDP Packets
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
The following is a dump of a UDP header in hexadecimal format.
a. What is the source port number?
b. What is the destination port number?
c. What is the total length of the user datagram?
d. What is the length of the data?
e. Is the packet directed from a client to a server or vice versa?
f. What is the client process?
UDP Packets: Problem
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
a. The source port number is the first four hexadecimal digits
(CB84)16 or 52100.
b. The destination port number is the second four hexadecimal digits
(000D)16 or 13.
c. The third four hexadecimal digits (001C)16 define the length of the
whole UDP packet as 28 bytes.
d. The length of the data is the length of the whole packet
minus the length of the header, or 28 – 8 = 20 bytes.
e. Since the destination port number is 13 (well-known port), the
packet is from the client to the server.
f. The client process is the Daytime
UDP Packets: Solution
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Pseudoheader & Header
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Pseudoheader & Header
• Source Port/Destination Port: A port (socket/session) Virtual
circuit between two communicating processes on two different
computers or devices
• The source port is the port on the sending device.
• The destination port is a TCP port on a receiving device that
corresponds with the source port on the sending device
• Length: contains information about the length of the frame
• Checksum: The checksum is a 16-bit cyclic redundancy check
(CRC) that is computed by adding the length of all header fields
plus the length of the data payload field (the sum of all fields in
the TCP segment).
• Placed in the frame by the sending station.
• The recipient also calculates the checksum and compares its
calculation with the value in the checksum field.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Checksum Calculation
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 Checksum calculation at receiver
 Add the peudoheader to UDP user datagram
 Fill the checksum field with 0s
 Divide the total bits into 16-bit (2 bytes) sections
 If the total number of bytes is not even, add 1 byte of padding
(all 0s). The padding is only for the purpose of calculating the
checksum and will be discarded afterwards.
 Add all 16-bit sections using one’s complement arithmetic
 Complement the result, which is a 16-bit number, and insert
in the checksum field
 Drop the peudoheader and any added padding
 Deliver the user datagram to the IP layer for encapsulation
Checksum calculation at the Sender
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 Checksum calculation at receiver
 Add the peudoheader to UDP user datagram
 Add padding if needed
 Divide the total bits into 16-bit (2 bytes) sections
 Add all 16-bit sections using one’s complement
arithmetic
 Complement the result
 If the result is all 0s, drop the peudoheader and any
added padding and accept the user datagram.
 If the result anything else, discard the user datagram
Checksum calculation at the Receiver
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Encapsulation and Decapsulation
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Encapsulation and Decapsulation
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Encapsulation and Layering
 UDP message is encapsulated into an IP datagram.
 IP datagram in turn is encapsulated into a physical frame for
actually delivery.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Queues in UDP
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Multiplexing and Demultiplexing
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Multiplexing and Demultiplexing
• Multiplexing and Demultiplexing services are provided in
almost every protocol architecture ever designed.
• UDP and TCP perform the demultiplexing and
multiplexing jobs by including two special fields in the
segment headers: the source port number field and the
destination port number field.
• Multiplexing – Gathering data from multiple application
processes of sender, enveloping that data with header
and sending them as a whole to the intended receiver is
called as multiplexing.
• Demultiplexing – Delivering received segments at
receiver side to the correct app layer processes is called
as demultiplexing.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Multiplexing and Demultiplexing
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Multiplexing and Demultiplexing
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Multiplexing and Demultiplexing
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Multiplexing and Demultiplexing
 Sender: multiplexing of UDP datagrams.
 UDP datagrams are received from multiple application programs.
 A single sequence of UDP datagrams is passed to IP layer.
 Receiver: demultiplexing of UDP datagrams.
 Single sequence of UDP datagrams received from IP layer.
 UDP datagram received is passed to appropriate application.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
UDP Design
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 UDP package involves five components:
 a control-block table,
 input queues,
 a control-block module,
 an input module, and
 an output module.
Components of UDP
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Components of UDP
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 Control-Block Table
In our package, UDP has a control-block table to
keep track of the open ports. Each
entry in this table has a minimum of four fields:
the state, which can be FREE or IN-USE,
the process ID, the port number, and the
corresponding queue number.
UDP Design: Control Block Table
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 Input Queues
 Our UDP package uses a set of input queues, one for
each process. In this design, we do not use output
queues.
UDP Design: Input Queues
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 The first activity is the arrival of a user datagram with
destination port number 52,012.
 The input module searches for this port number and
finds it.
 Queue number 38 has been assigned to this port, which
means that the port has been previously used.
 The input module sends the data to queue 38.
 The control-block table does not change.
How it Works?
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 After a few seconds, a process starts.
 It asks the operating system for a port number and is
granted port number 52,014.
 Now the process sends its ID (4,978) and the port
number to the control-block module to create an entry
in the table.
 The module takes the first FREE entry and inserts the
information received.
 The module does not allocate a queue at this moment
because no user datagrams have arrived for this
destination
How it Works?
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
How it Works?
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 UDP communication can be more efficient than
guaranteed-delivery data streams.
 Unlike TCP streams, which establish a connection,
UDP causes fewer overheads.
 Real-time applications that demand up-to-the-second
or better performance may be candidates for UDP, as
there are fewer delays due to error checking and flow
control of TCP.
 UDP sockets can receive data from more than one host
machine.
 Some network protocols specify UDP as the transport
mechanism.
Advantages of UDP
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 When sending a packet, the application must create a
DatagramPacket that will contain the data.
 The address and port information must also be set.
 When the packet is ready for transmission, the send
method of DatagramSocket should be invoked.
Sending UDP Packets
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Packet
DatagramSocket DatagramPacket
UDP application
Reads packets
Translates packets
Into a DatagramPacket
Sending UDP Packets
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
Packet
DatagramSocket
DatagramPacket
UDP application
Binds to a
UDP port
Constructs
packet
Send DatagramPacket
using DatagramSocket
Sending UDP Packets
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 A client-server application such as DNS uses the
services of UDP because a client needs to send a short
request to a server and to receive a quick response
from it.
 The request and response can each fit in one user
datagram.
 Since only one message is exchanged in each direction,
the connectionless feature is not an issue; the client or
server does not worry that messages are delivered out
of order.
Example 1
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 A client-server application such as SMTP, which is used in
electronic mail, cannot use the services of UDP because a user
can send a long e-mail message, which may include multimedia
(images, audio, or video).
 If the application uses UDP and the message does not fit in one
single user datagram, the message must be split by the
application into different user datagrams.
 Here the connectionless service may create problems.
 The user datagrams may arrive and be delivered to the receiver
application out of order.
 The receiver application may not be able to reorder the pieces.
 This means the connectionless service has a disadvantage for an
application program that sends long messages.
Example 2
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 Watching a real-time stream video on our computer.
 Such a program is considered a long file; it is divided into
many small parts and broadcast in real time.
 The parts of the message are sent one after another.
 If the transport layer is supposed to resend a corrupted or
lost frame, the synchronizing of the whole transmission
may be lost.
 The viewer suddenly sees a blank screen and needs to
wait until the second transmission arrives. This is not
tolerable.
Example 3
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 However, if each small part of the screen is sent using one
single user datagram, the receiving UDP can easily ignore
the corrupted or lost packet and deliver the rest to the
application program.
 That part of the screen is blank for a very short period of
the time, which most viewers do not even notice.
 However, video cannot be viewed out of order, so
streaming audio, video, and voice applications that run
over UDP must reorder or drop frames that are out of
sequence.
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 UDP limitations:
 Lack of Guaranteed Delivery
 Lack of Guaranteed Packet Sequencing
 Lack of Flow Control
Overcoming UDP Limitations
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 Packets sent via UDP may become lost in transit.
 UDP packets can also become damaged or lost.
 For some applications, the loss of individual packets
may not have a noticeable effect (e.g. video streams).
 For other applications, loss of packets is not acceptable
(e.g. file transfers).
Lack of Guaranteed Delivery
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 If guaranteed delivery is required,
avoid packet-based communication, and use a
more suitable transport mechanism (e.g. TCP).
send acknowledgement to sender after receiving
packets.
Lack of Guaranteed Delivery
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 Applications that require sequential access to
data should include a sequence number in the
contents of a datagram packet.
 This enables detection of duplicate packets and
also missing packets.
Lack of Guaranteed Packet Sequencing
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
 The technique of flow control is important to avoid
flooding a system with more data than it can handle
due to limited bandwidth.
 One technique of flow control is to limit the number
of unacknowledged packets.
 E.g.: increase control when number of
acknowledgement packets received is much less than
the number of packets sent.
Lack of Flow Control
Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
QUESTIONS ???

More Related Content

What's hot

Internet of things protocols for resource constrained applications
Internet of things protocols for resource constrained applications Internet of things protocols for resource constrained applications
Internet of things protocols for resource constrained applications Pokala Sai
 
ETE405-lec7.ppt
ETE405-lec7.pptETE405-lec7.ppt
ETE405-lec7.pptmashiur
 
ETE405-lec7.pptx
ETE405-lec7.pptxETE405-lec7.pptx
ETE405-lec7.pptxmashiur
 
The Network Protocol Stack Revisited
The Network Protocol Stack RevisitedThe Network Protocol Stack Revisited
The Network Protocol Stack Revisitedinbroker
 
Operating system Interview Questions
Operating system Interview QuestionsOperating system Interview Questions
Operating system Interview QuestionsKuntal Bhowmick
 
A Survey on DPI Techniques for Regular Expression Detection in Network Intrus...
A Survey on DPI Techniques for Regular Expression Detection in Network Intrus...A Survey on DPI Techniques for Regular Expression Detection in Network Intrus...
A Survey on DPI Techniques for Regular Expression Detection in Network Intrus...ijsrd.com
 
MC0087 Internal Assignment (SMU)
MC0087 Internal Assignment (SMU)MC0087 Internal Assignment (SMU)
MC0087 Internal Assignment (SMU)Krishan Pareek
 
Computer Network Fundamentals
Computer Network FundamentalsComputer Network Fundamentals
Computer Network FundamentalsN.Jagadish Kumar
 
PROTECTOR CONTROL PC-AODV-BH IN THE AD HOC NETWORKS
PROTECTOR CONTROL PC-AODV-BH IN THE AD HOC NETWORKSPROTECTOR CONTROL PC-AODV-BH IN THE AD HOC NETWORKS
PROTECTOR CONTROL PC-AODV-BH IN THE AD HOC NETWORKSZac Darcy
 
Proposition of an Adaptive Retransmission Timeout for TCP in 802.11 Wireless ...
Proposition of an Adaptive Retransmission Timeout for TCP in 802.11 Wireless ...Proposition of an Adaptive Retransmission Timeout for TCP in 802.11 Wireless ...
Proposition of an Adaptive Retransmission Timeout for TCP in 802.11 Wireless ...IJERA Editor
 
raim-2015-paper31
raim-2015-paper31raim-2015-paper31
raim-2015-paper31John Wu
 
AODV Improvement by Modification at Source Node and Securing It from Black Ho...
AODV Improvement by Modification at Source Node and Securing It from Black Ho...AODV Improvement by Modification at Source Node and Securing It from Black Ho...
AODV Improvement by Modification at Source Node and Securing It from Black Ho...IJERA Editor
 

What's hot (18)

Internet of things protocols for resource constrained applications
Internet of things protocols for resource constrained applications Internet of things protocols for resource constrained applications
Internet of things protocols for resource constrained applications
 
ETE405-lec7.ppt
ETE405-lec7.pptETE405-lec7.ppt
ETE405-lec7.ppt
 
Check shavad
Check shavadCheck shavad
Check shavad
 
Network layer u3
Network  layer u3Network  layer u3
Network layer u3
 
CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
ETE405-lec7.pptx
ETE405-lec7.pptxETE405-lec7.pptx
ETE405-lec7.pptx
 
The Network Protocol Stack Revisited
The Network Protocol Stack RevisitedThe Network Protocol Stack Revisited
The Network Protocol Stack Revisited
 
Network Layer by-adeel
Network Layer by-adeelNetwork Layer by-adeel
Network Layer by-adeel
 
Operating system Interview Questions
Operating system Interview QuestionsOperating system Interview Questions
Operating system Interview Questions
 
A Survey on DPI Techniques for Regular Expression Detection in Network Intrus...
A Survey on DPI Techniques for Regular Expression Detection in Network Intrus...A Survey on DPI Techniques for Regular Expression Detection in Network Intrus...
A Survey on DPI Techniques for Regular Expression Detection in Network Intrus...
 
MC0087 Internal Assignment (SMU)
MC0087 Internal Assignment (SMU)MC0087 Internal Assignment (SMU)
MC0087 Internal Assignment (SMU)
 
Computer Network
Computer NetworkComputer Network
Computer Network
 
42 46
42 4642 46
42 46
 
Computer Network Fundamentals
Computer Network FundamentalsComputer Network Fundamentals
Computer Network Fundamentals
 
PROTECTOR CONTROL PC-AODV-BH IN THE AD HOC NETWORKS
PROTECTOR CONTROL PC-AODV-BH IN THE AD HOC NETWORKSPROTECTOR CONTROL PC-AODV-BH IN THE AD HOC NETWORKS
PROTECTOR CONTROL PC-AODV-BH IN THE AD HOC NETWORKS
 
Proposition of an Adaptive Retransmission Timeout for TCP in 802.11 Wireless ...
Proposition of an Adaptive Retransmission Timeout for TCP in 802.11 Wireless ...Proposition of an Adaptive Retransmission Timeout for TCP in 802.11 Wireless ...
Proposition of an Adaptive Retransmission Timeout for TCP in 802.11 Wireless ...
 
raim-2015-paper31
raim-2015-paper31raim-2015-paper31
raim-2015-paper31
 
AODV Improvement by Modification at Source Node and Securing It from Black Ho...
AODV Improvement by Modification at Source Node and Securing It from Black Ho...AODV Improvement by Modification at Source Node and Securing It from Black Ho...
AODV Improvement by Modification at Source Node and Securing It from Black Ho...
 

Similar to 07 coms 525 tcpip - udp [autosaved]

21 SCHEME_21EC53_VTU_MODULE-4_COMPUTER COMMUNCATION NETWORK.pdf
21 SCHEME_21EC53_VTU_MODULE-4_COMPUTER COMMUNCATION NETWORK.pdf21 SCHEME_21EC53_VTU_MODULE-4_COMPUTER COMMUNCATION NETWORK.pdf
21 SCHEME_21EC53_VTU_MODULE-4_COMPUTER COMMUNCATION NETWORK.pdfDr. Shivashankar
 
CN Unit 4 - cs8591.pptx
CN Unit 4 - cs8591.pptxCN Unit 4 - cs8591.pptx
CN Unit 4 - cs8591.pptxshamkevin
 
Network Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerNetwork Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerAbdelkhalik Mosa
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingKeyur Vadodariya
 
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriyaIPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriyaVijiPriya Jeyamani
 
COMPUTER NETWORKS NOTES Unit 4
COMPUTER NETWORKS NOTES  Unit 4 COMPUTER NETWORKS NOTES  Unit 4
COMPUTER NETWORKS NOTES Unit 4 sudhakce
 
Private messenger
Private messengerPrivate messenger
Private messengerPiyush Gaur
 
Private messenger
Private messengerPrivate messenger
Private messengerPiyush Gaur
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer servicesMelvin Cabatuan
 

Similar to 07 coms 525 tcpip - udp [autosaved] (20)

21 SCHEME_21EC53_VTU_MODULE-4_COMPUTER COMMUNCATION NETWORK.pdf
21 SCHEME_21EC53_VTU_MODULE-4_COMPUTER COMMUNCATION NETWORK.pdf21 SCHEME_21EC53_VTU_MODULE-4_COMPUTER COMMUNCATION NETWORK.pdf
21 SCHEME_21EC53_VTU_MODULE-4_COMPUTER COMMUNCATION NETWORK.pdf
 
MODULE-4_CCN.pptx
MODULE-4_CCN.pptxMODULE-4_CCN.pptx
MODULE-4_CCN.pptx
 
CN Unit 4 - cs8591.pptx
CN Unit 4 - cs8591.pptxCN Unit 4 - cs8591.pptx
CN Unit 4 - cs8591.pptx
 
Network Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerNetwork Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport Layer
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
 
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriyaIPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
 
Transport layer
Transport layer Transport layer
Transport layer
 
Ez33917920
Ez33917920Ez33917920
Ez33917920
 
COMPUTER NETWORKS NOTES Unit 4
COMPUTER NETWORKS NOTES  Unit 4 COMPUTER NETWORKS NOTES  Unit 4
COMPUTER NETWORKS NOTES Unit 4
 
Transport layer protocols : TCP and UDP
Transport layer protocols  : TCP and UDPTransport layer protocols  : TCP and UDP
Transport layer protocols : TCP and UDP
 
07 coms 525 tcpip - udp
07    coms 525 tcpip - udp07    coms 525 tcpip - udp
07 coms 525 tcpip - udp
 
Networking in Java
Networking in JavaNetworking in Java
Networking in Java
 
06-Networks-Software.pdf
06-Networks-Software.pdf06-Networks-Software.pdf
06-Networks-Software.pdf
 
CN UNIT IV ..pptx
CN UNIT IV ..pptxCN UNIT IV ..pptx
CN UNIT IV ..pptx
 
Transport layer.pptx
Transport layer.pptxTransport layer.pptx
Transport layer.pptx
 
Private messenger
Private messengerPrivate messenger
Private messenger
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Private messenger
Private messengerPrivate messenger
Private messenger
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
ERTOS UNIT6.ppt
ERTOS UNIT6.pptERTOS UNIT6.ppt
ERTOS UNIT6.ppt
 

More from Palanivel Kuppusamy

16 coms 525 tcpip - routing protocols -all
16    coms 525 tcpip - routing protocols -all16    coms 525 tcpip - routing protocols -all
16 coms 525 tcpip - routing protocols -allPalanivel Kuppusamy
 
15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocolsPalanivel Kuppusamy
 
14 coms 525 tcpip - applications - snmp
14    coms 525 tcpip - applications - snmp14    coms 525 tcpip - applications - snmp
14 coms 525 tcpip - applications - snmpPalanivel Kuppusamy
 
13 coms 525 tcpip - applications - file transfer protocol
13   coms 525 tcpip - applications - file transfer protocol13   coms 525 tcpip - applications - file transfer protocol
13 coms 525 tcpip - applications - file transfer protocolPalanivel Kuppusamy
 
12 coms 525 tcpip - applications - http - telnet
12   coms 525 tcpip - applications - http - telnet12   coms 525 tcpip - applications - http - telnet
12 coms 525 tcpip - applications - http - telnetPalanivel Kuppusamy
 
11 coms 525 tcpip - internet protocol - forward
11   coms 525 tcpip - internet protocol - forward11   coms 525 tcpip - internet protocol - forward
11 coms 525 tcpip - internet protocol - forwardPalanivel Kuppusamy
 
10 coms 525 tcpip - internet protocol - ip
10   coms 525 tcpip -  internet protocol - ip10   coms 525 tcpip -  internet protocol - ip
10 coms 525 tcpip - internet protocol - ipPalanivel Kuppusamy
 
06 coms 525 tcpip - dhcp and dns
06   coms 525 tcpip - dhcp and dns06   coms 525 tcpip - dhcp and dns
06 coms 525 tcpip - dhcp and dnsPalanivel Kuppusamy
 
04 coms 525 tcpip - arp and rarp
04   coms 525 tcpip - arp and rarp04   coms 525 tcpip - arp and rarp
04 coms 525 tcpip - arp and rarpPalanivel Kuppusamy
 
02 coms 525 tcpip - introduction to tcpip
02   coms 525 tcpip -  introduction to tcpip02   coms 525 tcpip -  introduction to tcpip
02 coms 525 tcpip - introduction to tcpipPalanivel Kuppusamy
 
01 coms 525 tcpip - networking concepts review
01   coms 525 tcpip - networking concepts review01   coms 525 tcpip - networking concepts review
01 coms 525 tcpip - networking concepts reviewPalanivel Kuppusamy
 
00 coms 525 tcpip - introduction to networks
00   coms 525 tcpip -  introduction to networks00   coms 525 tcpip -  introduction to networks
00 coms 525 tcpip - introduction to networksPalanivel Kuppusamy
 

More from Palanivel Kuppusamy (16)

16 coms 525 tcpip - routing protocols -all
16    coms 525 tcpip - routing protocols -all16    coms 525 tcpip - routing protocols -all
16 coms 525 tcpip - routing protocols -all
 
15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocols
 
14 coms 525 tcpip - applications - snmp
14    coms 525 tcpip - applications - snmp14    coms 525 tcpip - applications - snmp
14 coms 525 tcpip - applications - snmp
 
13 coms 525 tcpip - applications - file transfer protocol
13   coms 525 tcpip - applications - file transfer protocol13   coms 525 tcpip - applications - file transfer protocol
13 coms 525 tcpip - applications - file transfer protocol
 
12 coms 525 tcpip - applications - http - telnet
12   coms 525 tcpip - applications - http - telnet12   coms 525 tcpip - applications - http - telnet
12 coms 525 tcpip - applications - http - telnet
 
11 coms 525 tcpip - internet protocol - forward
11   coms 525 tcpip - internet protocol - forward11   coms 525 tcpip - internet protocol - forward
11 coms 525 tcpip - internet protocol - forward
 
10 coms 525 tcpip - internet protocol - ip
10   coms 525 tcpip -  internet protocol - ip10   coms 525 tcpip -  internet protocol - ip
10 coms 525 tcpip - internet protocol - ip
 
09 coms 525 tcpip - tcp 2
09   coms 525 tcpip - tcp 209   coms 525 tcpip - tcp 2
09 coms 525 tcpip - tcp 2
 
08 coms 525 tcpip - tcp 1
08   coms 525 tcpip - tcp 108   coms 525 tcpip - tcp 1
08 coms 525 tcpip - tcp 1
 
06 coms 525 tcpip - dhcp and dns
06   coms 525 tcpip - dhcp and dns06   coms 525 tcpip - dhcp and dns
06 coms 525 tcpip - dhcp and dns
 
05 coms 525 tcpip - icmp
05   coms 525 tcpip - icmp05   coms 525 tcpip - icmp
05 coms 525 tcpip - icmp
 
04 coms 525 tcpip - arp and rarp
04   coms 525 tcpip - arp and rarp04   coms 525 tcpip - arp and rarp
04 coms 525 tcpip - arp and rarp
 
03 coms 525 tcpip - ip address
03   coms 525 tcpip -  ip address03   coms 525 tcpip -  ip address
03 coms 525 tcpip - ip address
 
02 coms 525 tcpip - introduction to tcpip
02   coms 525 tcpip -  introduction to tcpip02   coms 525 tcpip -  introduction to tcpip
02 coms 525 tcpip - introduction to tcpip
 
01 coms 525 tcpip - networking concepts review
01   coms 525 tcpip - networking concepts review01   coms 525 tcpip - networking concepts review
01 coms 525 tcpip - networking concepts review
 
00 coms 525 tcpip - introduction to networks
00   coms 525 tcpip -  introduction to networks00   coms 525 tcpip -  introduction to networks
00 coms 525 tcpip - introduction to networks
 

Recently uploaded

MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

07 coms 525 tcpip - udp [autosaved]

  • 1. K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University, Puducherry – 605014. LECTURE 7 COMS 525: TCPIP TOPIC User Datagram Protocol
  • 2. Transport Layer Protocols Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 3. Transport Layer Responsibilities Various responsibilities of a Transport Layer – • Process to process delivery • End-to-end Connection between hosts • Multiplexing and Demultiplexing • Data integrity and Error correction • Flow control Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 4. Process to Process Delivery • While Data Link Layer requires the MAC address (48 bits address contained inside the Network Interface Card of every host machine) of source - destination hosts to correctly deliver a frame and • Network layer requires the IP address for appropriate routing of packets • Transport Layer requires a Port number to correctly deliver the segments of data to the correct process amongst the multiple processes running on a particular host. • A port number is a 16 bit address used to identify any client-server program uniquely. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 5. End-to-end Connection Between Hosts • Transport layer is also responsible for creating the end- to-end Connection between hosts for which it mainly uses TCP and UDP. • TCP is a secure, connection- orientated protocol which uses a handshake protocol to establish a robust connection between two end- hosts. • TCP ensures reliable delivery of messages and is used in various applications. • UDP on the other hand is a stateless and unreliable protocol which ensures best-effort delivery. • It is suitable for the applications which have little concern with flow or error control and requires to send bulk of data like video conferencing. • It is a often used in multicasting protocols. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 6. Multiplexing and Demultiplexing • Multiplexing allows simultaneous use of different applications over a network which are running on a host. • Transport layer provides this mechanism which enables us to send packet streams from various applications simultaneously over a network. • Transport layer accepts these packets from different processes differentiated by their port numbers and passes them to network layer after adding proper headers. • Similarly Demultiplexing is required at the receiver side to obtain the data coming from various processes. • Transport receives the segments of data from network layer and delivers it to the appropriate process running on the receiver’s machine. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 7. Congestion Control • Congestion is a situation in which too many sources over a network attempt to send data and the router buffers start overflowing due to which loss of packets occur. • As a result retransmission of packets from the sources increase the congestion further. • In this situation Transport layer provides Congestion Control in different ways. • It uses open loop congestion control to prevent the congestion and closed loop congestion control to remove the congestion in a network once it occurred. • TCP provides AIMD- additive increase multiplicative decrease , leaky bucket technique for congestion control. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 8. Data integrity and Error correction Transport layer checks • for errors in the messages coming from application layer by using error detection codes, • computing checksums, • it checks whether the received data is not corrupted and uses the ACK and NACK services to inform the sender if the data is arrived or not and checks for the integrity of data. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 9. Flow control • Transport layer provides a flow control mechanism between the adjacent layers of the TCP/IP model. • TCP also prevents the data loss due to a fast sender and slow receiver by imposing some flow control techniques. • It uses the method of sliding window protocol which is accomplished by receiver by sending a window back to the sender informing the size of data it can receive. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 10. Introduction to UDP  UDP is located between the application layer and the IP layer, and serves as the intermediary between the application programs and the network operations.  UDP is a connectionless transport protocol, i.e. it doesn't guarantee either packet delivery or that packets arrive in sequential order.  With UDP, bytes of data are grouped together in discrete packets which are sent over the network. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 11.  Packets may travel along different paths depending on the state of the network.  No two packets are guaranteed the same route.  Each packet has a time-to-live (TTL) counter, which is updated when it is routed along to the next point in the network. When the timer expires, it will be discarded, and the recipient will not be notified.  If a packet does arrive, it will always arrive intact. Packets that are corrupt or only partially delivered are discarded. Introduction contd… Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 12.  In TCP/IP protocol suite, using IP to transport datagram (similar to IP datagram).  Allows a application to send datagram to other application on the remote machine.  Delivery and duplicate detection are not guaranteed.  Low overhead: faster than TCP Introduction contd… Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 13.  End-to-End: an application sends/receives data to/from another application.  Connectionless: Application does not need to pre-establish communication before sending data; application does not need to terminate communication when finished.  Message-oriented: application sends/receives individual messages (UDP datagram), not packets.  Best-effort: same best-effort delivery semantics as IP. I.e. message can be lost, duplicated, and corrupted.  Arbitrary interaction: application communicates with many or one other applications.  Operating system independent: identifying application does not depend on O/S. UDP Characteristics Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 14. Process to Process Communication Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 15.  Port Number  Process-to-process communication: client-server paradigm  Both process (client and server) have the same name  Daytime client process / daytime server  Today OS supports multi-user and multi-processors  A remote computer can run several server programs at same time  A local computer can run several client programs at same time  For communication, we must define the  local host, local process, remote host, remote process Process to Process Communication Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 16. UDP Port numbers • The Daytime Protocol is a service in the Internet Protocol Suite RFC 867. • It is intended for testing and measurement purposes in computer networks. • A host may connect to a server that supports the Daytime Protocol on either TCP or UDP port 13. • The server returns an ASCII character string of the current date and time in an unspecified format. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 17. IP vs. Port numbers Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 18. Process to Process Communication Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 19. UDP packets, called user datagrams, have a fixed-size header of 8 bytes. UDP Packets Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 20. The following is a dump of a UDP header in hexadecimal format. a. What is the source port number? b. What is the destination port number? c. What is the total length of the user datagram? d. What is the length of the data? e. Is the packet directed from a client to a server or vice versa? f. What is the client process? UDP Packets: Problem Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 21. a. The source port number is the first four hexadecimal digits (CB84)16 or 52100. b. The destination port number is the second four hexadecimal digits (000D)16 or 13. c. The third four hexadecimal digits (001C)16 define the length of the whole UDP packet as 28 bytes. d. The length of the data is the length of the whole packet minus the length of the header, or 28 – 8 = 20 bytes. e. Since the destination port number is 13 (well-known port), the packet is from the client to the server. f. The client process is the Daytime UDP Packets: Solution Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 22. Pseudoheader & Header Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 23. Pseudoheader & Header • Source Port/Destination Port: A port (socket/session) Virtual circuit between two communicating processes on two different computers or devices • The source port is the port on the sending device. • The destination port is a TCP port on a receiving device that corresponds with the source port on the sending device • Length: contains information about the length of the frame • Checksum: The checksum is a 16-bit cyclic redundancy check (CRC) that is computed by adding the length of all header fields plus the length of the data payload field (the sum of all fields in the TCP segment). • Placed in the frame by the sending station. • The recipient also calculates the checksum and compares its calculation with the value in the checksum field. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 24. Checksum Calculation Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 25.  Checksum calculation at receiver  Add the peudoheader to UDP user datagram  Fill the checksum field with 0s  Divide the total bits into 16-bit (2 bytes) sections  If the total number of bytes is not even, add 1 byte of padding (all 0s). The padding is only for the purpose of calculating the checksum and will be discarded afterwards.  Add all 16-bit sections using one’s complement arithmetic  Complement the result, which is a 16-bit number, and insert in the checksum field  Drop the peudoheader and any added padding  Deliver the user datagram to the IP layer for encapsulation Checksum calculation at the Sender Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 26.  Checksum calculation at receiver  Add the peudoheader to UDP user datagram  Add padding if needed  Divide the total bits into 16-bit (2 bytes) sections  Add all 16-bit sections using one’s complement arithmetic  Complement the result  If the result is all 0s, drop the peudoheader and any added padding and accept the user datagram.  If the result anything else, discard the user datagram Checksum calculation at the Receiver Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 27. Encapsulation and Decapsulation Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 28. Encapsulation and Decapsulation Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 29. Encapsulation and Layering  UDP message is encapsulated into an IP datagram.  IP datagram in turn is encapsulated into a physical frame for actually delivery. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 30. Queues in UDP Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 31. Multiplexing and Demultiplexing Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 32. Multiplexing and Demultiplexing • Multiplexing and Demultiplexing services are provided in almost every protocol architecture ever designed. • UDP and TCP perform the demultiplexing and multiplexing jobs by including two special fields in the segment headers: the source port number field and the destination port number field. • Multiplexing – Gathering data from multiple application processes of sender, enveloping that data with header and sending them as a whole to the intended receiver is called as multiplexing. • Demultiplexing – Delivering received segments at receiver side to the correct app layer processes is called as demultiplexing. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 33. Multiplexing and Demultiplexing Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 34. Multiplexing and Demultiplexing Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 35. Multiplexing and Demultiplexing Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 36. Multiplexing and Demultiplexing  Sender: multiplexing of UDP datagrams.  UDP datagrams are received from multiple application programs.  A single sequence of UDP datagrams is passed to IP layer.  Receiver: demultiplexing of UDP datagrams.  Single sequence of UDP datagrams received from IP layer.  UDP datagram received is passed to appropriate application. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 37. UDP Design Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 38.  UDP package involves five components:  a control-block table,  input queues,  a control-block module,  an input module, and  an output module. Components of UDP Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 39. Components of UDP Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 40.  Control-Block Table In our package, UDP has a control-block table to keep track of the open ports. Each entry in this table has a minimum of four fields: the state, which can be FREE or IN-USE, the process ID, the port number, and the corresponding queue number. UDP Design: Control Block Table Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 41.  Input Queues  Our UDP package uses a set of input queues, one for each process. In this design, we do not use output queues. UDP Design: Input Queues Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 42.  The first activity is the arrival of a user datagram with destination port number 52,012.  The input module searches for this port number and finds it.  Queue number 38 has been assigned to this port, which means that the port has been previously used.  The input module sends the data to queue 38.  The control-block table does not change. How it Works? Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 43.  After a few seconds, a process starts.  It asks the operating system for a port number and is granted port number 52,014.  Now the process sends its ID (4,978) and the port number to the control-block module to create an entry in the table.  The module takes the first FREE entry and inserts the information received.  The module does not allocate a queue at this moment because no user datagrams have arrived for this destination How it Works? Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 44. How it Works? Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 45.  UDP communication can be more efficient than guaranteed-delivery data streams.  Unlike TCP streams, which establish a connection, UDP causes fewer overheads.  Real-time applications that demand up-to-the-second or better performance may be candidates for UDP, as there are fewer delays due to error checking and flow control of TCP.  UDP sockets can receive data from more than one host machine.  Some network protocols specify UDP as the transport mechanism. Advantages of UDP Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 46.  When sending a packet, the application must create a DatagramPacket that will contain the data.  The address and port information must also be set.  When the packet is ready for transmission, the send method of DatagramSocket should be invoked. Sending UDP Packets Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 47. Packet DatagramSocket DatagramPacket UDP application Reads packets Translates packets Into a DatagramPacket Sending UDP Packets Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 48. Packet DatagramSocket DatagramPacket UDP application Binds to a UDP port Constructs packet Send DatagramPacket using DatagramSocket Sending UDP Packets Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 49.  A client-server application such as DNS uses the services of UDP because a client needs to send a short request to a server and to receive a quick response from it.  The request and response can each fit in one user datagram.  Since only one message is exchanged in each direction, the connectionless feature is not an issue; the client or server does not worry that messages are delivered out of order. Example 1 Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 50.  A client-server application such as SMTP, which is used in electronic mail, cannot use the services of UDP because a user can send a long e-mail message, which may include multimedia (images, audio, or video).  If the application uses UDP and the message does not fit in one single user datagram, the message must be split by the application into different user datagrams.  Here the connectionless service may create problems.  The user datagrams may arrive and be delivered to the receiver application out of order.  The receiver application may not be able to reorder the pieces.  This means the connectionless service has a disadvantage for an application program that sends long messages. Example 2 Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 51.  Watching a real-time stream video on our computer.  Such a program is considered a long file; it is divided into many small parts and broadcast in real time.  The parts of the message are sent one after another.  If the transport layer is supposed to resend a corrupted or lost frame, the synchronizing of the whole transmission may be lost.  The viewer suddenly sees a blank screen and needs to wait until the second transmission arrives. This is not tolerable. Example 3 Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 52.  However, if each small part of the screen is sent using one single user datagram, the receiving UDP can easily ignore the corrupted or lost packet and deliver the rest to the application program.  That part of the screen is blank for a very short period of the time, which most viewers do not even notice.  However, video cannot be viewed out of order, so streaming audio, video, and voice applications that run over UDP must reorder or drop frames that are out of sequence. Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 53.  UDP limitations:  Lack of Guaranteed Delivery  Lack of Guaranteed Packet Sequencing  Lack of Flow Control Overcoming UDP Limitations Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 54.  Packets sent via UDP may become lost in transit.  UDP packets can also become damaged or lost.  For some applications, the loss of individual packets may not have a noticeable effect (e.g. video streams).  For other applications, loss of packets is not acceptable (e.g. file transfers). Lack of Guaranteed Delivery Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 55.  If guaranteed delivery is required, avoid packet-based communication, and use a more suitable transport mechanism (e.g. TCP). send acknowledgement to sender after receiving packets. Lack of Guaranteed Delivery Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 56.  Applications that require sequential access to data should include a sequence number in the contents of a datagram packet.  This enables detection of duplicate packets and also missing packets. Lack of Guaranteed Packet Sequencing Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.
  • 57.  The technique of flow control is important to avoid flooding a system with more data than it can handle due to limited bandwidth.  One technique of flow control is to limit the number of unacknowledged packets.  E.g.: increase control when number of acknowledgement packets received is much less than the number of packets sent. Lack of Flow Control Dept. of Computer Science, Pondicherry University, Puducherry-605014, India.