Lecture3 Ch23 Part II
Lecture3 Ch23 Part II
Lecture3 Ch23 Part II
Sumaya Kazary
Assistant Professor
Department of Computer Science and Engineering
Dhaka University of Engineering & Technology, Gazipur
Acknowledgement
Thanks to the authors of all the books and online tutorials used in this slide.
23-2 USER DATAGRAM PROTOCOL (UDP)
23.2
UDP Operation
UDP characteristics include the following:
•It is a connectionless protocol.
•It is an Unreliable transport protocol. There is no flow control
and error control mechanism.
•It is faster and needs fewer resources.
•The packets don't necessarily arrive in order.
•It allows missing packets - the sender is unable to know whether
a packet has been received.
•It is better suited for applications that need fast, efficient
transmission, such as for VoIP, video streaming, gaming and live
broadcasts.
•UDP is also used for some route updating protocols such as
Routing Information Protocol (RIP)
23.3
Well-known ports used with UDP
4
User Datagram
65,535
23.5
Figure 23.10 Pseudoheader for checksum calculation
23.6
Figure 23.11 shows the checksum calculation for a very small user
datagram with only 7 bytes of data. Because the number of bytes of
data is odd, padding is added for checksum calculation. The
pseudoheader as well as the padding will be dropped when the user
datagram is delivered to IP.
23.8
23-3 TCP
23.9
Functionalities of TCP Protocol:
1. Segmentation
2. Connection Oriented Protocol
3. Full duplex
4. Piggybacking
5. Error Control
6. Flow Control
7. Congestion Control
23.10
TCP Services : Process to Process Communication
23.12
Sending and Receiving Buffers
23.13
TCP Segments
23.14
The bytes of data being transferred in each
connection are numbered by TCP.
The numbering starts with a randomly generated
number.
23.16
TCP Segment
23.18
TCP Connection Establishment and Termination
Connection Establishment
Establishes a virtual path between the source and destination.
A Three-way Handshake is a method used in a TCP/IP network to
create a connection between a local host/client and server.
It is a three-step method that requires both the client and server to
exchange SYN and ACK (acknowledgment) packets before actual
data communication begins.
A three-way handshake is also known as a TCP Handshake.
23.19
Figure 23.18 Connection establishment using three-way handshaking
23.20
Note
23.21
TCP Data Transfer
23.24
Figure 23.21 Half-close
23.25
SYN Flooding Attack : Denial-of-Service (DoS)attack
The connection establishment procedure in TCP is susceptible
to a serious security problem called the SYN flooding attack
A malicious attacker sends a large number of SYN segments
to a server using fake source IP addresses !!!
23.26
Figure 23.22 Sliding window
23.27
Note
23.28
Example 23.4
Solution
The value of rwnd = 5000 − 1000 = 4000. Host B can
receive only 4000 bytes of data before overflowing its
buffer. Host B advertises this value in its next segment to
A.
23.29
Example 23.5
Solution
The size of the window is the smaller of rwnd and cwnd,
which is 3000 bytes.
23.30
Example 23.6
Figure 23.23 shows an unrealistic example of a sliding window.
The sender has sent bytes up to 202. We assume that cwnd is 20 (in
reality this value is thousands of bytes). The receiver has sent an
acknowledgment number of 200 with an rwnd of 9 bytes (in reality
this value is thousands of bytes). The size of the sender window is
the minimum of rwnd and cwnd, or 9 bytes. Bytes 200 to 202 are
sent, but not acknowledged. Bytes 203 to 208 can be sent without
worrying about acknowledgment. Bytes 209 and above cannot be
sent.
23.31
Note
23.32
Error Control in TCP
23.33
Note
23.35
some scenarios of TCP operation
23.36
Figure 23.24 Normal operation
23.37
Figure 23.25 Lost segment
23.38
Figure 23.26 Fast retransmission
23.39
Thanks for Having Patience
23.40