Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

Sliding window in the circular format

Types of Protocols
FSM AND FLOW DIAGRAM
Stop-and-Wait Protocol
FSMs for the Stop-and-Wait protocol
Flow diagram
Go-Back-N Protocol (GBN)
Send window for Go-Back-N
Receive window for Go-Back-N
FSMs for the Go-Back-N protocol
Flow diagram of Go-Back N
Selective-Repeat Protocol
Flow diagram of Selective Repeat
Bidirectional Protocols: Piggybacking
UDP-User Datagram Protocol

 UDP (User Datagram Protocol) is an alternative communications protocol


to Transmission Control Protocol (TCP) used primarily for establishing low-
latency and loss tolerating connections between applications on the Internet.
 UDP is used to send short messages called datagrams but overall, it is an
unreliable, connectionless protocol.
 UDP packets, called user datagrams, have a fixed-size header of 8 bytes
made of four fields, each of 2 bytes (16 bits).
UDP Services

 Process to process: Use of Socket Addresses, a combination of


IP address and port numbers is done for UDP process to process.
 Connectionless Services: UDP is basically a connectionless
protocol. Each datagram is independent and they are not sequence
numbered. They can move in different paths.
 Flow and Error control: There is no flow control and window
mechanism in UDP. This may lead to overflow on the receiver side
with messages.
 Encapsulation and De capsulation: UDP protocol
encapsulates the message from a sending end process in an IP
datagram and de capsulation is done as the receiving end process.
 Multiplexing and De multiplexing: When several processes
need the services of UDP, multiplexing and de multiplexing is done
even though there can be only one UDP in the host.
UDP Applications

 Useful for processes which require simple


request/response communication with no flow
control and error control.
 UDP is useful for processes which have internal flow
and error control mechanisms.
 Multicasting uses UDP.
 Management processes like SNMP uses UDP.
 Routing information protocols use UDP for
updating.
Transmission Control Protocol

 TCP and IP are the work horses of the Internet.


TCP Services
 Process to Process Communication: Port numbers are used to provide process to process
communication.(Please explain about ht e address ports in brief)
 Stream Delivery Service: Unlike UDP, TCP sends data as a stream of bytes.TCP has an
environment for two processes connected by an imaginary tube which carries their data across
internet.
 Sending / Receiving Buffers: TCP needs buffers for storage when the sending process and
the receiving process have different write/read data speeds. They are useful for flow and error
control mechanisms.
 a)The sending buffer has three types: one empty for writing the bytes, second area for the
bytes sent but not acknowledged and the third area for bytes to be sent.
 b)The receiving buffer has two types: one area empty for receiving the bytes, second area
for the received bytes to be read by the receiving process.
 TCP Segments: IP Layer sends the data packets. TCP Header is attached to each segment
before delivering it to the IP Layer.
 Full Duplex Communication: Full duplex service is available in TCP connections. Segments
move in both directions as each TCP has a sending as well as receiving buffer.
 Connection Oriented, Reliable Service: TCP uses an acknowledgment mechanism to
achieve reliable service of data transfer. Connection oriented service has three phases:
Connection establishment, data transfer and connection termination.
 Multiplexing and De Multiplexing: As in UDP, TCP performs multiplexing and de
multiplexing at the sender and receiver respectively. Connection established for a pair of
processes.
 Reliable Service: Reliable service is possible in TCP due to error control, flow control and
congestion control mechanisms in the protocol.
TCP Features

 TCP has several features like,


 Numbering System 2) Flow control 3) Error Control 4) Congestion Control

 Numbering System:
 To Keep track of the segments and proper delivery to the receiving process.
 Three types: Byte numbers: Data bytes are transmitted in a connection are
numbered.
 Sequence Numbers: A sequence Number is assigned to each segment before
transmission.
 Acknowledgment Number: ACK is used to confirm the bytes received by the
receiving process. It can be cumulative.

 Flow control & Error Control:


 TCP uses a byte oriented flow control mechanism to prevent the receiver being
overloaded with data. The numbering system helps TCP flow control.
 Congestion control:
 TCP controls the flow of data transfer as well as traffic congestion in the network.
TCP Segment Header Format

Flags/ Control Field


Connection establishment using three-way
handshaking
Data transfer
Connection Termination
Send Windows in TCP
Receive window in TCP
TCP congestion control
Slow start, exponential increase
Congestion avoidance, additive increase

You might also like