SlideShare a Scribd company logo
Yarmouk University – Faculty of Information 
Technology and CS Computer Science 
Department 
Transport Layer
23-2 USER DATAGRAM PROTOCOL (UDP) 
The User Datagram Protocol (UDP) is called a 
connectionless, unreliable transport protocol. It does 
not add anything to the services of IP except to provide 
process-to-process communication instead of host-to-host 
23.2 
communication.
23.3 
Table 23.1 Well-known ports used with UDP
Figure 23.9 User datagram format 
23.4
23.5 
UDP length 
= IP length – IP header’s length 
Note
23-3 TCP 
TCP is a connection-oriented protocol; it creates a 
virtual connection between two TCPs to send data. In 
addition, TCP uses flow and error control mechanisms 
at the transport level. 
23.6
23.7 
Table 23.2 Well-known ports used by TCP
23.8 
The bytes of data being transferred in each connection are numbered by TCP. 
The numbering starts with a randomly generated number. 
USING sequence number and the acknowledgment number FIELDS. These two 
fields refer to the byte number and not the segment number. 
Note
Figure 23.16 TCP segment format 
23.9
Field Description 
Source port address. This is a 16-bit 
Destination port 
address 
This is a 16-bit field 
Sequence number This 32-bit field defines the number assigned to the first byte of data contained in this segment. 
Acknowledgment 
number 
This 32-bit field defines the byte number that the receiver of the segment is expecting to receive from the 
other party. If the receiver of the segment has successfully received byte number x from the other party, it 
defines x + I as the acknowledgment number. 
Header length This 4-bit field indicates the number of 4-byte words in the TCP Header. The length of the header can be 
between 20 and 60 bytes. Therefore, the value of this field can be between 5 (5 x 4 =20) and 15 (15 x 4 =60). 
Reserved This is a 6-bit field reserved for future use 
Control This field defines 6 different control bits or flags 
Window size This field defines the size of the window, in bytes, that the other 
party must maintain. Note that the length of this field is 16 bits, which means that 
the maximum size of the window is 65,535 bytes. This value is normally referred 
to as the receiving window (rwnd) and is determined by the receiver. 
Checksum This 16-bit field 
Urgent pointer •This l6-bit field, which is valid only if the urgent flag is set, is 
used when the segment contains urgent data. It defines the number that must be 
added to the sequence number to obtain the number of the last urgent byte in the 
data section of the segment 
Options There can be up to 40 bytes of optional information in the TCP header
Figure 23.17 Control field 
23.11 
These bits enable flow control, connection establishment and termination, 
connection abortion, and the mode of data transfer in TCP.
23.12 
Table 23.3 Description of flags in the control field
Connection establishment using three-way handshaking 
Random 
With the connection now established, the client will send data whose first byte will be 
given sequence number 4,568. The server's first byte of data will be numbered 12,999.
Connection establishment using three-way handshaking
Figure 23.18 Connection establishment using three-way handshaking 
23.15
Note 
• A SYN segment cannot carry data, but it consumes one sequence number. 
• A SYN + ACK segment cannot carry data, but does consume one sequence number. 
• An ACK segment, if carrying no data, consumes no sequence number. 
23.16
simultaneous Connection establishment using three-way handshaking 
It will not require a 3rd ACK segments. It will be handled in 2 way handshake
Figure 23.19 Data transfer 
23.18
Connection termination using three-way handshaking 
23.19
Note 
• The FIN segment consumes one sequence number if it not carry data. 
• The FIN + ACK segment consumes one sequence number if it does not carry data. 
23.20
Simultaneous Connection termination
Connection termination using Half-close Four-way handshaking
Connection termination using Half-close Four-way handshaking
Connection termination using Half-close Four-way handshaking 
23.24 
One End can stop sending data 
while receiving data. 
And normally issued by the 
CLIENT 
The termination can be only for 
the outbound connection (i.e. 
Sorting) for the client 
(requester) and the server can 
terminate the inbound 
connection and maintain the 
outbound 
Request for the 
termination but the 3rd 
way is not initiated yet. 
Until the server finishes 
the processing and send 
a FIN back to the client. 
In the half closed 
connection, the client 
closes outbound, thus 
cannot send out data 
only ACK. And server 
closes inbound 
connection, thus he still 
can send data if 
needed.
Note 
• ACK segments do not consume sequence numbers and are not acknowledged. 
• Data may arrive out of order and be temporarily stored by the receiving TCP, but 
TCP guarantees that no out-of-order segment is delivered to the process. 
23.25
Figure 23.24 Normal operation 
23.26
Figure 23.25 Lost segment 
23.27
23.28 
The receiver TCP delivers only ordered data to the process. 
Note

More Related Content

PPT
Chapter 31
PPTX
TCP/IP 3-way Handshake
PDF
UDP - User Datagram Protocol
PPT
udp , tcp ,sctp
PPT
Chapter 23
PPT
Network layer tanenbaum
PPTX
Reference models in Networks: OSI & TCP/IP
Chapter 31
TCP/IP 3-way Handshake
UDP - User Datagram Protocol
udp , tcp ,sctp
Chapter 23
Network layer tanenbaum
Reference models in Networks: OSI & TCP/IP

What's hot (20)

PPTX
Distance Vector & Link state Routing Algorithm
PPT
Ch2 network models
PPT
Ip addressing classful
PPTX
User datagram protocol (udp)
PPTX
Transport layer protocols : TCP and UDP
PPTX
Network Layer
PPT
Unit 5 Application Layer
PPSX
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
PPT
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
PPT
Network Layer,Computer Networks
PPT
PDF
Distributed Systems Naming
PPT
osi vs tcp/ip
PPTX
Address resolution protocol (ARP)
PPT
Chapter 25
PPT
Chapter 22
PPTX
Congestion control
Distance Vector & Link state Routing Algorithm
Ch2 network models
Ip addressing classful
User datagram protocol (udp)
Transport layer protocols : TCP and UDP
Network Layer
Unit 5 Application Layer
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
Chapter 26 - Remote Logging, Electronic Mail & File Transfer
Network Layer,Computer Networks
Distributed Systems Naming
osi vs tcp/ip
Address resolution protocol (ARP)
Chapter 25
Chapter 22
Congestion control
Ad

Viewers also liked (20)

PDF
How to send DNS over anything encrypted
PDF
Symantec (ISTR) Internet Security Threat Report Volume 22
PDF
Scripting and automation with the Men & Mice Suite
PDF
Role of DNS in Botnet Command and Control
ODP
(ISC)2 Cincinnati Tri-State Chapter: Phishing Forensics - Is it just suspicio...
PDF
Comodo Multi Domain SSL Certificate: Key Features by CheapSSLsecurity
PPTX
Microsoft Cyber Security IT-Camp
PDF
Social Networks And Phishing
PPTX
Cyber crime & security
PPTX
Cyber Security # Lec 2
PDF
Cisco Connect Toronto 2017 - Anatomy-of-attack
PDF
DNS High-Availability Tools - Open-Source Load Balancing Solutions
ODP
DerbyCon 7.0 Legacy: Regular Expressions (Regex) Overview
PDF
Cisco Connect Toronto 2017 - Accelerating Incident Response in Organizations...
ODP
OISF: Regular Expressions (Regex) Overview
PDF
Umbrella Webcast: Redefining Security for the Nomadic Worker
PDF
Windows Server 2016 Webinar
PPTX
Phishing Scams: 8 Helpful Tips to Keep You Safe
PDF
Dns Hardening Linux Os
PDF
Cisco umbrella overview
How to send DNS over anything encrypted
Symantec (ISTR) Internet Security Threat Report Volume 22
Scripting and automation with the Men & Mice Suite
Role of DNS in Botnet Command and Control
(ISC)2 Cincinnati Tri-State Chapter: Phishing Forensics - Is it just suspicio...
Comodo Multi Domain SSL Certificate: Key Features by CheapSSLsecurity
Microsoft Cyber Security IT-Camp
Social Networks And Phishing
Cyber crime & security
Cyber Security # Lec 2
Cisco Connect Toronto 2017 - Anatomy-of-attack
DNS High-Availability Tools - Open-Source Load Balancing Solutions
DerbyCon 7.0 Legacy: Regular Expressions (Regex) Overview
Cisco Connect Toronto 2017 - Accelerating Incident Response in Organizations...
OISF: Regular Expressions (Regex) Overview
Umbrella Webcast: Redefining Security for the Nomadic Worker
Windows Server 2016 Webinar
Phishing Scams: 8 Helpful Tips to Keep You Safe
Dns Hardening Linux Os
Cisco umbrella overview
Ad

Similar to Tcp udp (20)

PPT
Transport layer TCP and UDP.ppt
PPTX
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
PPTX
Transmission Control Protocol_ Computer Networks
PPT
the transport layer
PDF
Internet technology unit 3
PPTX
TCP and UDP comparison and itsi application.pptx
PPT
Eshcol tech solutions pvt ltd
PPT
Olumide pidan b
PDF
PPT
Unit_3_TCP_UDP.ppt
PDF
Transmission control protocol tcp tcp tcp tcp
PPTX
UNIT IV-Transport Layer.pptx
DOCX
TCP.docx
PPTX
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
PDF
Transport layer udp and tcp network
PDF
20CS2007 Computer Communication Networks
PPTX
Computer networks transport layer
PPT
TCP Part I How does it work - module13-tcp1.ppt
PPTX
08 coms 525 tcpip - tcp 1
Transport layer TCP and UDP.ppt
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
Transmission Control Protocol_ Computer Networks
the transport layer
Internet technology unit 3
TCP and UDP comparison and itsi application.pptx
Eshcol tech solutions pvt ltd
Olumide pidan b
Unit_3_TCP_UDP.ppt
Transmission control protocol tcp tcp tcp tcp
UNIT IV-Transport Layer.pptx
TCP.docx
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
Transport layer udp and tcp network
20CS2007 Computer Communication Networks
Computer networks transport layer
TCP Part I How does it work - module13-tcp1.ppt
08 coms 525 tcpip - tcp 1

More from Programmer (7)

PDF
Protocols
DOCX
Phishing
PPT
Network monotoring
PDF
Intrusion detection
PPT
Deployment guide1
PPT
monotoring Basics2
PPTX
Ip and icmp
Protocols
Phishing
Network monotoring
Intrusion detection
Deployment guide1
monotoring Basics2
Ip and icmp

Recently uploaded (20)

PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
01-Introduction-to-Information-Management.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Insiders guide to clinical Medicine.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Complications of Minimal Access Surgery at WLH
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
01-Introduction-to-Information-Management.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
102 student loan defaulters named and shamed – Is someone you know on the list?
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Insiders guide to clinical Medicine.pdf
VCE English Exam - Section C Student Revision Booklet
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Complications of Minimal Access Surgery at WLH
O5-L3 Freight Transport Ops (International) V1.pdf
RMMM.pdf make it easy to upload and study
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Pharmacology of Heart Failure /Pharmacotherapy of CHF
2.FourierTransform-ShortQuestionswithAnswers.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
O7-L3 Supply Chain Operations - ICLT Program
Supply Chain Operations Speaking Notes -ICLT Program
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Microbial disease of the cardiovascular and lymphatic systems
Chapter 2 Heredity, Prenatal Development, and Birth.pdf

Tcp udp

  • 1. Yarmouk University – Faculty of Information Technology and CS Computer Science Department Transport Layer
  • 2. 23-2 USER DATAGRAM PROTOCOL (UDP) The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. It does not add anything to the services of IP except to provide process-to-process communication instead of host-to-host 23.2 communication.
  • 3. 23.3 Table 23.1 Well-known ports used with UDP
  • 4. Figure 23.9 User datagram format 23.4
  • 5. 23.5 UDP length = IP length – IP header’s length Note
  • 6. 23-3 TCP TCP is a connection-oriented protocol; it creates a virtual connection between two TCPs to send data. In addition, TCP uses flow and error control mechanisms at the transport level. 23.6
  • 7. 23.7 Table 23.2 Well-known ports used by TCP
  • 8. 23.8 The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number. USING sequence number and the acknowledgment number FIELDS. These two fields refer to the byte number and not the segment number. Note
  • 9. Figure 23.16 TCP segment format 23.9
  • 10. Field Description Source port address. This is a 16-bit Destination port address This is a 16-bit field Sequence number This 32-bit field defines the number assigned to the first byte of data contained in this segment. Acknowledgment number This 32-bit field defines the byte number that the receiver of the segment is expecting to receive from the other party. If the receiver of the segment has successfully received byte number x from the other party, it defines x + I as the acknowledgment number. Header length This 4-bit field indicates the number of 4-byte words in the TCP Header. The length of the header can be between 20 and 60 bytes. Therefore, the value of this field can be between 5 (5 x 4 =20) and 15 (15 x 4 =60). Reserved This is a 6-bit field reserved for future use Control This field defines 6 different control bits or flags Window size This field defines the size of the window, in bytes, that the other party must maintain. Note that the length of this field is 16 bits, which means that the maximum size of the window is 65,535 bytes. This value is normally referred to as the receiving window (rwnd) and is determined by the receiver. Checksum This 16-bit field Urgent pointer •This l6-bit field, which is valid only if the urgent flag is set, is used when the segment contains urgent data. It defines the number that must be added to the sequence number to obtain the number of the last urgent byte in the data section of the segment Options There can be up to 40 bytes of optional information in the TCP header
  • 11. Figure 23.17 Control field 23.11 These bits enable flow control, connection establishment and termination, connection abortion, and the mode of data transfer in TCP.
  • 12. 23.12 Table 23.3 Description of flags in the control field
  • 13. Connection establishment using three-way handshaking Random With the connection now established, the client will send data whose first byte will be given sequence number 4,568. The server's first byte of data will be numbered 12,999.
  • 14. Connection establishment using three-way handshaking
  • 15. Figure 23.18 Connection establishment using three-way handshaking 23.15
  • 16. Note • A SYN segment cannot carry data, but it consumes one sequence number. • A SYN + ACK segment cannot carry data, but does consume one sequence number. • An ACK segment, if carrying no data, consumes no sequence number. 23.16
  • 17. simultaneous Connection establishment using three-way handshaking It will not require a 3rd ACK segments. It will be handled in 2 way handshake
  • 18. Figure 23.19 Data transfer 23.18
  • 19. Connection termination using three-way handshaking 23.19
  • 20. Note • The FIN segment consumes one sequence number if it not carry data. • The FIN + ACK segment consumes one sequence number if it does not carry data. 23.20
  • 22. Connection termination using Half-close Four-way handshaking
  • 23. Connection termination using Half-close Four-way handshaking
  • 24. Connection termination using Half-close Four-way handshaking 23.24 One End can stop sending data while receiving data. And normally issued by the CLIENT The termination can be only for the outbound connection (i.e. Sorting) for the client (requester) and the server can terminate the inbound connection and maintain the outbound Request for the termination but the 3rd way is not initiated yet. Until the server finishes the processing and send a FIN back to the client. In the half closed connection, the client closes outbound, thus cannot send out data only ACK. And server closes inbound connection, thus he still can send data if needed.
  • 25. Note • ACK segments do not consume sequence numbers and are not acknowledged. • Data may arrive out of order and be temporarily stored by the receiving TCP, but TCP guarantees that no out-of-order segment is delivered to the process. 23.25
  • 26. Figure 23.24 Normal operation 23.26
  • 27. Figure 23.25 Lost segment 23.27
  • 28. 23.28 The receiver TCP delivers only ordered data to the process. Note