SlideShare a Scribd company logo
3
Most read
4
Most read
5
Most read
0
1st
Assignment Web Technology
Department of Information Technology,
Institute of Graduate Studies and Research,
University of Alexandria,
Egypt.
Presented by:
Eng.Ahmed Atef Elnaggar
Supervisor:
Prof. Ahmed M. Elfatatry
1
Abstract
Data from applications is packaged, transported, and delivered to the appropriate
server daemon or application on the destination device. The processes described in
the OSI Transport layer accept data from the Application layer and prepare it for
addressing at the Network layer. The Transport layer is responsible for the overall
end-to-end transfer of application data.
Transaction control protocol (TCP) and User data gram protocol (UDP) are
transport layer protocols in OSI model and TCP/IP model.
Different applications have different requirements. Different protocols have been
developed to meet them.
Contents:
1- Introduction
2- Objectives
3-The relation between OSI model and TCP and UDP
3. A- Segmentation and Reassembly
4- TCP Vs UDP
4. A- TCP Connection Establishment and Termination
4. B- the difference between TCP and UDP header
4. C- the main features of TCP and UDP protocols
5- Identifying the Conversations
5. A- Port Addressing Types
6- Using both TCP and UDP protocols (Applications)
7-Conclusion
8-References
2
1- Introduction
In this report, we will cover the main points about the difference between TCP and
UDP, not the technical details.
Also we will try to answer the following questions:
1- What is the relation between OSI model and TCP and UDP protocols?
2- In which layer TCP and UDP protocols are operating?
3-What is the difference between TCP and UDP header?
4-What are the main features of TCP and UDP protocols?
5-Whose is specifying whether the segment is TCP or UDP?
6-Which applications are Using TCP and which are using UDP?
2- Objectives
Upon completion of this report, you will be able to:
Describe the role of two TCP/IP Transport layer protocols: TCP and UDP.
Explain how TCP and UDP each handle transported data.
Identify when it is appropriate to use TCP or UDP and provide examples of
applications that use each protocol.
3- The relation between OSI model and TCP and UDP
The transport Layer in OSI model data stream is a logical connection between the
endpoints of a network. It provides transport services from a host to a destination.
This service is sometimes referred to as an end-to-end service.
• Primary responsibilities of the Transport Layer:
• Tracking the individual communications between
applications on the source and destination hosts.
• Segmenting the data and managing each piece.
• Reassembling the segments into streams of
application data.
• Identifying the different applications.
• Performing flow control between end users.
• Enabling error recovery.
• Initiating a session.
Figure 1
3
3. A- Segmentation and Reassembly
An Ethernet frame has a maximum frame size or Maximum Transmission Unit
(MTU) of 1,518 bytes. When a larger message must be sent, the application data
must be segmented into sections that will not exceed the maximum size.
The segment size must also take into account the encapsulation process that must
take place before the frame can be transmitted.
4- TCP Vs UDP
They are two most common Transport Layer protocols but the key difference
between TCP and UDP is reliability.
4. A -TCP Connection Establishment and Termination
For a connection to be established, the two end stations must synchronize on each
other's initial sequence numbers (ISNs).The ISN is the starting sequence number
used when a TCP connection is established (fig 3).
Four step process using the Flag and sequence number fields to terminate session
(fig 4).
Figure 2
Figure 4Figure 3
4
4. B- the difference between TCP and UDP header
4. C- the main features of TCP and UDP protocols
User Datagram Protocol (UDP) Transmission Control Protocol (TCP)
• Connectionless •Connection-oriented
• “Best Effort” delivery •Reliable delivery
• Low overhead •Error checking
• No error checking, No flow control •Flow control
Figure 5
Figure 6
5
5- Identifying the Conversations
At the TCP/IP Internet Layer: The IP Packet Header has a Protocol field that
specifies whether the segment is TCP or UDP.
When a packet is encapsulated at the Network Layer, it is coded to identify the
source of the packet (TCP or UDP). When a packet is decapsulated at the
destination, the code is used to send the packet to the proper protocol (TCP or
UDP).
Both TCP and UDP use port numbers to pass information to the upper layers.
These ports are actually termed sockets.
A socket is simply the combination of the device’s IP address and the
source/destination port for the data, separated by a colon.
• e.g. 207.134.65.2:80 reference an HTTP socket.
5. A- Port Addressing Types
Port numbers are managed and assigned by the Internet Assigned Number
Authority (IANA).
Figure7
Table 1
6
6-Using both TCP and UDP protocols
Some applications may use both TCP and UDP.
For example, the low overhead of UDP enables DNS to serve many client requests
very quickly. Sometimes, however, sending the requested information may require
the reliability of TCP. In this case, the well known port number of 53 is used by
both protocols with this service.
Port Number Application Layer4 Protocol Description
20 FTP TCP File Transfer Protocol – Data
21 FTP TCP File Transfer Protocol – Control Commands
23 TELNET TCP Terminal connection
25 SMTP TCP Simple Mail Transfer Protocol - Email
53 DNS UDP Domain Name System
67,68 DHCP UDP Dynamic Host Configuration Protocol
69 TFTP UDP Trivial File Transfer Protocol
80 HTTP TCP Hypertext Transfer Protocol
Table 2
Applications of TCP and UDP
TCP UDP
File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP)
Telnet Domain Name System (DNS)
Simple Mail Transfer Protocol (SMTP) Simple Network Management Protocol
(SNMP)
Post Office Protocol (POP3) Dynamic Host Configuration Protocol (DHCP)
Hypertext Transfer Protocol (HTTP)
Table 3
7
7-Conclusion
Characteristics TCP UDP
Acronym for: Transmission Control Protocol
User Datagram Protocol or Universal Datagram
Protocol
Function:
As a message makes its way across the
internet from one computer to another.
This is connection based.
UDP is also a protocol used in message transport or
transfer. This is not connection based which means
that one program can send a load of packets to
another and that would be the end of the
relationship.
Usage:
TCP is used in case of non-time critical
applications.
UDP is used for games or applications that require
fast transmission of data. UDP's stateless nature is
also useful for servers that answer small queries from
huge numbers of clients.
Examples: HTTP, HTTPs, FTP, SMTP Telnet etc... DNS, DHCP, TFTP, SNMP, RIP, VOIP etc...
Ordering of
data packets:
TCP rearranges data packets in the
order specified.
UDP has no inherent order as all packets are
independent of each other. If ordering is required, it
has to be managed by the application layer.
Speed of
transfer:
The speed for TCP is slower than UDP.
UDP is faster because there is no error-checking for
packets.
Reliability:
There is absolute guarantee that the
data transferred remains intact and
arrives in the same order in which it
was sent.
There is no guarantee that the messages or packets
sent would reach at all.
Header Size: TCP header size is 20 bytes UDP Header size is 8 bytes.
Streaming of
data:
Data is read as a byte stream, no
distinguishing indications are
transmitted to signal message
(segment) boundaries.
Packets are sent individually and are checked for
integrity only if they arrive. Packets have definite
boundaries which are honored upon receipt, meaning
a read operation at the receiver socket will yield an
entire message as it was originally sent.
Weight:
TCP requires three packets to set up a
socket connection, before any user data
can be sent. TCP handles reliability and
congestion control.
UDP is lightweight. There is no ordering of messages,
no tracking connections, etc. It is a small transport
layer designed on top of IP.
Data Flow
Control:
TCP does Flow Control. TCP requires
three packets to set up a socket
connection, before any user data can be
sent. TCP handles reliability and
congestion control.
UDP does not have an option for flow control
Error Checking: TCP does error checking UDP does error checking, but no recovery options.
8
8-References
1-Sybex (640 607) Cisco CCNA Study Guide 3Ed.
2- Cisco Press CCNA 3.0 Study Guide (Con Indice) 640-607
3- Presentations of collaboration among the instructors at St. Clair College in
Windsor, Ontario.(2007)
4- Online material of Cisco networking academy CCNA Exploration 4.0- Network
Fundamentals. http://www.cisco.com/web/learning/netacad/index.html

More Related Content

PPT
Chapter 8: Switching
PPT
Unit 3 Network Layer PPT
PPT
Unit 5 Application Layer
PDF
UDP - User Datagram Protocol
PPTX
Transport layer protocols : TCP and UDP
PPTX
Computer Networks: Quality of service
PPTX
Switching
Chapter 8: Switching
Unit 3 Network Layer PPT
Unit 5 Application Layer
UDP - User Datagram Protocol
Transport layer protocols : TCP and UDP
Computer Networks: Quality of service
Switching

What's hot (20)

PPTX
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
PPTX
Mobile transport layer .
PPTX
Simple Mail Transfer Protocol
PPTX
Link state routing protocol
PPTX
Application layer
PPTX
Routing Techniques
PPTX
Tcp/ip model
PPTX
Unit 4 - Network Layer
PPT
Data link layer
PPTX
TCP/IP and UDP protocols
PPT
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
PPTX
Bellman Ford Routing Algorithm-Computer Networks
PDF
Transport layer services
PDF
TCP over wireless slides
PPTX
Distance Vector & Link state Routing Algorithm
PPT
Tcp Udp Icmp And The Transport Layer
PPTX
Routing protocols
PPTX
COMPUTER NETWORKS NOTES Unit 4
PPTX
Transport layer
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
Mobile transport layer .
Simple Mail Transfer Protocol
Link state routing protocol
Application layer
Routing Techniques
Tcp/ip model
Unit 4 - Network Layer
Data link layer
TCP/IP and UDP protocols
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Bellman Ford Routing Algorithm-Computer Networks
Transport layer services
TCP over wireless slides
Distance Vector & Link state Routing Algorithm
Tcp Udp Icmp And The Transport Layer
Routing protocols
COMPUTER NETWORKS NOTES Unit 4
Transport layer
Ad

Similar to TCP Vs UDP (20)

DOCX
Udp vs-tcp
PDF
TCP and UDP.pdf55555555555555555555555555555
PDF
What is the difference between udp and tcp internet protocols
PPTX
TCP_UDP_presention_for_network_transtion.pptx
PPTX
Presentation of the details of tcp and udp protocols
PPT
LECTURE-Transport-Layer_lec.ppt
PPTX
Transport layer protocol
PPT
PPT
UDP and TCP header.ppt
PDF
TCP/IP & UDP
PPTX
Transport layer.pptx
PDF
UNit-4 Transport Layer and its protocols.pdf
PDF
Tcp vs udp difference and comparison diffen
DOCX
Tcp vs udp
PPTX
Unit 6 NAHI aa rha hai na ki koi baat nhi hai
PPTX
Module 3IP-based networks use eithe.pptx
PPTX
Introduction of tcp, ip & udp
PPT
unit 3 ns.ppt
PPTX
A Comparative Study of TCP & UDP Protocols
PPTX
What Are TCP and UDP protocols and how they work
Udp vs-tcp
TCP and UDP.pdf55555555555555555555555555555
What is the difference between udp and tcp internet protocols
TCP_UDP_presention_for_network_transtion.pptx
Presentation of the details of tcp and udp protocols
LECTURE-Transport-Layer_lec.ppt
Transport layer protocol
UDP and TCP header.ppt
TCP/IP & UDP
Transport layer.pptx
UNit-4 Transport Layer and its protocols.pdf
Tcp vs udp difference and comparison diffen
Tcp vs udp
Unit 6 NAHI aa rha hai na ki koi baat nhi hai
Module 3IP-based networks use eithe.pptx
Introduction of tcp, ip & udp
unit 3 ns.ppt
A Comparative Study of TCP & UDP Protocols
What Are TCP and UDP protocols and how they work
Ad

More from Ahmed Elnaggar (9)

PDF
Mobile commerce 2
PDF
Semantic web
PDF
Firewall
PDF
SSL Secure socket layer
PDF
Object-oriented analysis and design
PDF
Topologies
PDF
OSI layers
PDF
Mobile commerce
Mobile commerce 2
Semantic web
Firewall
SSL Secure socket layer
Object-oriented analysis and design
Topologies
OSI layers
Mobile commerce

Recently uploaded (20)

PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Mushroom cultivation and it's methods.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
A Presentation on Touch Screen Technology
PDF
project resource management chapter-09.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Heart disease approach using modified random forest and particle swarm optimi...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Encapsulation theory and applications.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
1. Introduction to Computer Programming.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
1 - Historical Antecedents, Social Consideration.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
A novel scalable deep ensemble learning framework for big data classification...
Mushroom cultivation and it's methods.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
OMC Textile Division Presentation 2021.pptx
Getting Started with Data Integration: FME Form 101
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
A Presentation on Touch Screen Technology
project resource management chapter-09.pdf
WOOl fibre morphology and structure.pdf for textiles
Digital-Transformation-Roadmap-for-Companies.pptx

TCP Vs UDP

  • 1. 0 1st Assignment Web Technology Department of Information Technology, Institute of Graduate Studies and Research, University of Alexandria, Egypt. Presented by: Eng.Ahmed Atef Elnaggar Supervisor: Prof. Ahmed M. Elfatatry
  • 2. 1 Abstract Data from applications is packaged, transported, and delivered to the appropriate server daemon or application on the destination device. The processes described in the OSI Transport layer accept data from the Application layer and prepare it for addressing at the Network layer. The Transport layer is responsible for the overall end-to-end transfer of application data. Transaction control protocol (TCP) and User data gram protocol (UDP) are transport layer protocols in OSI model and TCP/IP model. Different applications have different requirements. Different protocols have been developed to meet them. Contents: 1- Introduction 2- Objectives 3-The relation between OSI model and TCP and UDP 3. A- Segmentation and Reassembly 4- TCP Vs UDP 4. A- TCP Connection Establishment and Termination 4. B- the difference between TCP and UDP header 4. C- the main features of TCP and UDP protocols 5- Identifying the Conversations 5. A- Port Addressing Types 6- Using both TCP and UDP protocols (Applications) 7-Conclusion 8-References
  • 3. 2 1- Introduction In this report, we will cover the main points about the difference between TCP and UDP, not the technical details. Also we will try to answer the following questions: 1- What is the relation between OSI model and TCP and UDP protocols? 2- In which layer TCP and UDP protocols are operating? 3-What is the difference between TCP and UDP header? 4-What are the main features of TCP and UDP protocols? 5-Whose is specifying whether the segment is TCP or UDP? 6-Which applications are Using TCP and which are using UDP? 2- Objectives Upon completion of this report, you will be able to: Describe the role of two TCP/IP Transport layer protocols: TCP and UDP. Explain how TCP and UDP each handle transported data. Identify when it is appropriate to use TCP or UDP and provide examples of applications that use each protocol. 3- The relation between OSI model and TCP and UDP The transport Layer in OSI model data stream is a logical connection between the endpoints of a network. It provides transport services from a host to a destination. This service is sometimes referred to as an end-to-end service. • Primary responsibilities of the Transport Layer: • Tracking the individual communications between applications on the source and destination hosts. • Segmenting the data and managing each piece. • Reassembling the segments into streams of application data. • Identifying the different applications. • Performing flow control between end users. • Enabling error recovery. • Initiating a session. Figure 1
  • 4. 3 3. A- Segmentation and Reassembly An Ethernet frame has a maximum frame size or Maximum Transmission Unit (MTU) of 1,518 bytes. When a larger message must be sent, the application data must be segmented into sections that will not exceed the maximum size. The segment size must also take into account the encapsulation process that must take place before the frame can be transmitted. 4- TCP Vs UDP They are two most common Transport Layer protocols but the key difference between TCP and UDP is reliability. 4. A -TCP Connection Establishment and Termination For a connection to be established, the two end stations must synchronize on each other's initial sequence numbers (ISNs).The ISN is the starting sequence number used when a TCP connection is established (fig 3). Four step process using the Flag and sequence number fields to terminate session (fig 4). Figure 2 Figure 4Figure 3
  • 5. 4 4. B- the difference between TCP and UDP header 4. C- the main features of TCP and UDP protocols User Datagram Protocol (UDP) Transmission Control Protocol (TCP) • Connectionless •Connection-oriented • “Best Effort” delivery •Reliable delivery • Low overhead •Error checking • No error checking, No flow control •Flow control Figure 5 Figure 6
  • 6. 5 5- Identifying the Conversations At the TCP/IP Internet Layer: The IP Packet Header has a Protocol field that specifies whether the segment is TCP or UDP. When a packet is encapsulated at the Network Layer, it is coded to identify the source of the packet (TCP or UDP). When a packet is decapsulated at the destination, the code is used to send the packet to the proper protocol (TCP or UDP). Both TCP and UDP use port numbers to pass information to the upper layers. These ports are actually termed sockets. A socket is simply the combination of the device’s IP address and the source/destination port for the data, separated by a colon. • e.g. 207.134.65.2:80 reference an HTTP socket. 5. A- Port Addressing Types Port numbers are managed and assigned by the Internet Assigned Number Authority (IANA). Figure7 Table 1
  • 7. 6 6-Using both TCP and UDP protocols Some applications may use both TCP and UDP. For example, the low overhead of UDP enables DNS to serve many client requests very quickly. Sometimes, however, sending the requested information may require the reliability of TCP. In this case, the well known port number of 53 is used by both protocols with this service. Port Number Application Layer4 Protocol Description 20 FTP TCP File Transfer Protocol – Data 21 FTP TCP File Transfer Protocol – Control Commands 23 TELNET TCP Terminal connection 25 SMTP TCP Simple Mail Transfer Protocol - Email 53 DNS UDP Domain Name System 67,68 DHCP UDP Dynamic Host Configuration Protocol 69 TFTP UDP Trivial File Transfer Protocol 80 HTTP TCP Hypertext Transfer Protocol Table 2 Applications of TCP and UDP TCP UDP File Transfer Protocol (FTP) Trivial File Transfer Protocol (TFTP) Telnet Domain Name System (DNS) Simple Mail Transfer Protocol (SMTP) Simple Network Management Protocol (SNMP) Post Office Protocol (POP3) Dynamic Host Configuration Protocol (DHCP) Hypertext Transfer Protocol (HTTP) Table 3
  • 8. 7 7-Conclusion Characteristics TCP UDP Acronym for: Transmission Control Protocol User Datagram Protocol or Universal Datagram Protocol Function: As a message makes its way across the internet from one computer to another. This is connection based. UDP is also a protocol used in message transport or transfer. This is not connection based which means that one program can send a load of packets to another and that would be the end of the relationship. Usage: TCP is used in case of non-time critical applications. UDP is used for games or applications that require fast transmission of data. UDP's stateless nature is also useful for servers that answer small queries from huge numbers of clients. Examples: HTTP, HTTPs, FTP, SMTP Telnet etc... DNS, DHCP, TFTP, SNMP, RIP, VOIP etc... Ordering of data packets: TCP rearranges data packets in the order specified. UDP has no inherent order as all packets are independent of each other. If ordering is required, it has to be managed by the application layer. Speed of transfer: The speed for TCP is slower than UDP. UDP is faster because there is no error-checking for packets. Reliability: There is absolute guarantee that the data transferred remains intact and arrives in the same order in which it was sent. There is no guarantee that the messages or packets sent would reach at all. Header Size: TCP header size is 20 bytes UDP Header size is 8 bytes. Streaming of data: Data is read as a byte stream, no distinguishing indications are transmitted to signal message (segment) boundaries. Packets are sent individually and are checked for integrity only if they arrive. Packets have definite boundaries which are honored upon receipt, meaning a read operation at the receiver socket will yield an entire message as it was originally sent. Weight: TCP requires three packets to set up a socket connection, before any user data can be sent. TCP handles reliability and congestion control. UDP is lightweight. There is no ordering of messages, no tracking connections, etc. It is a small transport layer designed on top of IP. Data Flow Control: TCP does Flow Control. TCP requires three packets to set up a socket connection, before any user data can be sent. TCP handles reliability and congestion control. UDP does not have an option for flow control Error Checking: TCP does error checking UDP does error checking, but no recovery options.
  • 9. 8 8-References 1-Sybex (640 607) Cisco CCNA Study Guide 3Ed. 2- Cisco Press CCNA 3.0 Study Guide (Con Indice) 640-607 3- Presentations of collaboration among the instructors at St. Clair College in Windsor, Ontario.(2007) 4- Online material of Cisco networking academy CCNA Exploration 4.0- Network Fundamentals. http://www.cisco.com/web/learning/netacad/index.html