SlideShare a Scribd company logo
1 of 9
Download to read offline
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

What's hot

TCP- Transmission Control Protocol
TCP-  Transmission Control Protocol TCP-  Transmission Control Protocol
TCP- Transmission Control Protocol Akhil .B
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocolselvakumar_b1985
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocolMohd Arif
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udprahul kundu
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer servicesMelvin Cabatuan
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)k33a
 
Transport layer (computer networks)
Transport layer (computer networks)Transport layer (computer networks)
Transport layer (computer networks)Fatbardh Hysa
 
PPP (Point to Point Protocol)
PPP (Point to Point Protocol)PPP (Point to Point Protocol)
PPP (Point to Point Protocol)Ali Jafar
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layertmavroidis
 
Protocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol SuiteProtocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol SuiteAtharaw Deshmukh
 
TFTP - Trivial File Transfer Protocol
TFTP - Trivial File Transfer ProtocolTFTP - Trivial File Transfer Protocol
TFTP - Trivial File Transfer ProtocolPeter R. Egli
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)NetProtocol Xpert
 
TCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionTCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionShubham Khedekar
 

What's hot (20)

TCP- Transmission Control Protocol
TCP-  Transmission Control Protocol TCP-  Transmission Control Protocol
TCP- Transmission Control Protocol
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udp
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
 
Overview of TCP IP
Overview of TCP IPOverview of TCP IP
Overview of TCP IP
 
Transport layer (computer networks)
Transport layer (computer networks)Transport layer (computer networks)
Transport layer (computer networks)
 
PPP (Point to Point Protocol)
PPP (Point to Point Protocol)PPP (Point to Point Protocol)
PPP (Point to Point Protocol)
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layer
 
Http protocol
Http protocolHttp protocol
Http protocol
 
Tcp/ip model
Tcp/ip  modelTcp/ip  model
Tcp/ip model
 
Protocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol SuiteProtocols and the TCP/IP Protocol Suite
Protocols and the TCP/IP Protocol Suite
 
Transport layer
Transport layer Transport layer
Transport layer
 
TFTP - Trivial File Transfer Protocol
TFTP - Trivial File Transfer ProtocolTFTP - Trivial File Transfer Protocol
TFTP - Trivial File Transfer Protocol
 
RTP & RTCP
RTP & RTCPRTP & RTCP
RTP & RTCP
 
Dhcp
DhcpDhcp
Dhcp
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
TCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer DescriptionTCP/IP Protocols With All Layer Description
TCP/IP Protocols With All Layer Description
 

Similar to TCP Vs UDP

Unit 4 tansport layer in the internat
Unit 4 tansport layer in the internatUnit 4 tansport layer in the internat
Unit 4 tansport layer in the internatKritika Purohit
 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxGirT2
 
Packet Guide SONET/SDH
Packet Guide SONET/SDHPacket Guide SONET/SDH
Packet Guide SONET/SDHscribd1
 
LECTURE-Transport-Layer_lec.ppt
LECTURE-Transport-Layer_lec.pptLECTURE-Transport-Layer_lec.ppt
LECTURE-Transport-Layer_lec.pptMonirHossain707319
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference ModelMukesh Tekwani
 
presentation on TCP/IP protocols data comunications
presentation on TCP/IP protocols data comunicationspresentation on TCP/IP protocols data comunications
presentation on TCP/IP protocols data comunicationsAnyapuPranav
 
A Comparative Study of TCP & UDP Protocols
A Comparative Study of TCP & UDP ProtocolsA Comparative Study of TCP & UDP Protocols
A Comparative Study of TCP & UDP ProtocolsMinhazul Abedin Munna
 
UDP and TCP header.ppt
UDP and TCP header.pptUDP and TCP header.ppt
UDP and TCP header.pptnehayarrapothu
 
TCPIP SLIDES.ppt
TCPIP SLIDES.pptTCPIP SLIDES.ppt
TCPIP SLIDES.pptaymenshykh
 
ETE405-lec7.ppt
ETE405-lec7.pptETE405-lec7.ppt
ETE405-lec7.pptmashiur
 

Similar to TCP Vs UDP (20)

Unit 4 tansport layer in the internat
Unit 4 tansport layer in the internatUnit 4 tansport layer in the internat
Unit 4 tansport layer in the internat
 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptx
 
Packet Guide SONET/SDH
Packet Guide SONET/SDHPacket Guide SONET/SDH
Packet Guide SONET/SDH
 
TCP/IP & UDP
TCP/IP & UDPTCP/IP & UDP
TCP/IP & UDP
 
Unit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptxUnit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptx
 
Tcp IP Model
Tcp IP ModelTcp IP Model
Tcp IP Model
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
 
計概
計概計概
計概
 
Week10 transport
Week10 transportWeek10 transport
Week10 transport
 
LECTURE-Transport-Layer_lec.ppt
LECTURE-Transport-Layer_lec.pptLECTURE-Transport-Layer_lec.ppt
LECTURE-Transport-Layer_lec.ppt
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
presentation on TCP/IP protocols data comunications
presentation on TCP/IP protocols data comunicationspresentation on TCP/IP protocols data comunications
presentation on TCP/IP protocols data comunications
 
Tcp vs udp
Tcp vs udpTcp vs udp
Tcp vs udp
 
A Comparative Study of TCP & UDP Protocols
A Comparative Study of TCP & UDP ProtocolsA Comparative Study of TCP & UDP Protocols
A Comparative Study of TCP & UDP Protocols
 
UDP and TCP header.ppt
UDP and TCP header.pptUDP and TCP header.ppt
UDP and TCP header.ppt
 
TCPIP SLIDES.ppt
TCPIP SLIDES.pptTCPIP SLIDES.ppt
TCPIP SLIDES.ppt
 
ETE405-lec7.ppt
ETE405-lec7.pptETE405-lec7.ppt
ETE405-lec7.ppt
 
Module 1 slides
Module 1 slidesModule 1 slides
Module 1 slides
 
Udp vs-tcp
Udp vs-tcpUdp vs-tcp
Udp vs-tcp
 
Transport layer
Transport layerTransport layer
Transport layer
 

More from Ahmed Elnaggar

More from Ahmed Elnaggar (9)

Mobile commerce 2
Mobile commerce 2Mobile commerce 2
Mobile commerce 2
 
Semantic web
Semantic webSemantic web
Semantic web
 
Firewall
FirewallFirewall
Firewall
 
SSL Secure socket layer
SSL Secure socket layerSSL Secure socket layer
SSL Secure socket layer
 
Object-oriented analysis and design
Object-oriented analysis and designObject-oriented analysis and design
Object-oriented analysis and design
 
4G
4G4G
4G
 
Topologies
TopologiesTopologies
Topologies
 
OSI layers
OSI layersOSI layers
OSI layers
 
Mobile commerce
Mobile commerceMobile commerce
Mobile commerce
 

Recently uploaded

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

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