DCN 02
DCN 02
● Receiver must inform the sender before the limits are reached and
request the transmitter to send fewer frames or stop temporarily
Stop-and-Wait
Sliding-Window
Stop-and-Wait Protocol
● The simplest form of flow control, known as stop-and-wait flow
control
● It is also known as request/reply sometimes
● Here, the sender sends one frame, stops until it receives
confirmation from the receiver, and then sends the next frame
● The destination can stop the flow of data simply by withholding
acknowledgment
NOISY CHANNELS
● Although the Stop-and-Wait Protocol gives us an idea of how to add
flow control
● noiseless channels are nonexistent.
Stop-and-Wait ARQ
● Error correction in Stop-and-Wait ARQ is done by keeping a copy of
the sent frame and retransmitting of the frame when required
● These types of errors could occur in Stop-and-Wait:
The frame that arrives at the destination could be corrupted.
The frame is lost.
Damaged acknowledgment.
Delayed acknowledgment.
Solution
The bandwidth-delay product is
Example
The system can send 20,000 bits during the time it takes
for the data to go from the sender to the receiver and then
back again.
However, the system sends only 1000 bits.
We can say that the link utilization is only 1000/20,000, or
5 percent.
Stop-and-Wait Protocol
Advantages:
● It is simple
● Each frame is checked and acknowledged well
Disadvantages:
● Only one frame can be in transmission at a time
● It is inefficient, if the distance between devices is long
Sliding Window
● In sliding window protocol multiple frames are allowed to sent
without waiting for any acknowledgments.
● Receiver have a buffer to store multiple frames.
● To keep track of which frames have been acknowledged, each is
labeled with a sequence number.
● Receiver acknowledges a frame by sending an acknowledgment
that includes the sequence number of the next frame expected.
● This scheme can also be used to acknowledge multiple frames.
● It uses two type of acknowledgement
Receive Ready (RR)
u I have received all frames up to frame number n and am ready to receive
frame number n+1
Piggybacking:
● In two-way communication, when a frame is received, the
receiver waits and does not send the ACK back to the sender
immediately
● The receiver waits until its network layer passes the next data
packet to it. The delayed acknowledgement is then attached to
this outgoing data frame
● This technique of temporarily delaying the acknowledgement so
that it can be hooked with next outgoing data frame is known
as piggybacking.
Sliding Window
● The link utilization in case of Sliding Window Protocol:
● The send window can slide one or more slots when a valid
acknowledgment arrives.
● In case there is long delay before sending the NAK, the sender
will resend the lost frame after its timer times out
● Damaged (or lost) ACK (i.e. RR): If the ACK frame sent by the
receiver is lost, the sender resends the frames after its timer
times out.
● The size of the sender and receiver window must be at most 2m-1.
Selective Repeat ARQ
● The size of the sender and receiver window must be at most 2m-1.
Selective Repeat ARQ
Selective Repeat ARQ (Window Size)
Exercise-1
f only 6 bits are reserved for sequence numbers, then what will be the
efficiency?
Exercise-3
TB = R * Tp
● Each station force to send frame at the beginning of the time slot.
Carrier Sense Multiple Access (CSMA)
● To minimize the chance of collision CSMA method was
developed
A station may sense the medium and find it idle, only because
the first bit sent by another station has not yet been received.
Carrier Sense Multiple Access (CSMA)
Vulnerable time in CSMA
● Before sending the last bit of the frame, the sending station must
detect a collision, if any, and abort the transmission
● This is so because the station, once the entire frame is sent, does
not monitor the line for collision detection
Tfr ≥ 2* Tp
Acknowledgments
Interframe Space (IFS)
● When an idle channel is found, the station does not send
immediately.
● After waiting an IFS time, if the channel is still idle, the station
can send after contention window.
Contention Window
● The contention window is an amount of time divided into slots.
Setup
Phase
Teardow
n Phase
CIRCUIT-SWITCHING
CIRCUIT-SWITCHING
● It requires reservation of resources during the entire
duration of the connection.
Addressing
Global
u an address that can be unique in the scope of the network
Three Phases
● Setup
The source and destination use their global addresses.
● Data transfer
Transfers the data in form of packets with VCI.
● Teardown
The source and destination inform the switches to delete the
corresponding entry.
PACKET-SWITCHING : Virtual-Circuit
Setup Phase
The acknowledgment
u A acknowledgment frame is sent from the destination to the
source.
PACKET-SWITCHING : Virtual-Circuit
Setup Phase
Setup Phase
● The acknowledgment
PACKET-SWITCHING : Virtual-Circuit
Teardown Phase
● Routing metrics and costs are used for determining the best
route.
Delay
Bandwidth
Throughput
Reliability
Type of Routing
Default Routing
Dynamic Routing
u Centralized algorithm
u Distributed algorithm
u Isolation algorithm
u Flooding
u Random walks
Routing Table
Subnet Mask
Next Hop
Outgoing Interface
Metric
Unicast Routing Protocols in Internet
Step - 1
Step - 2
Split Horizon
Poison Reverse
● The cost associated with an edge defines the state of the link.
● Using the least cost tree, node updates its routing table.
Link State Routing : Flooding
● If it is newer, the node discards the old LSP and keeps the
received one.
Types of service
IPv4 Datagram Format
● Total Length: This 16-bit field defines the total length (header plus
data) of the IP datagram in bytes
A 16-bit number can define a total length of up to 65,535 (when all bits
are 1s)
● Flags
The 3-bit flags field defines three flags
● Fragmentation Offset
shows the relative position of this fragment with respect to the whole datagram.
In an IPv4 packet, the value of HLEN is 5, and the value of the total
length field is (0028)16. How many bytes of data are being carried by
this packet?
A packet has arrived in which the offset value is 100, the value of
HLEN is 5, and the value of the total length field is 100. What are the
numbers of the first byte and the last byte?