CN Unit
CN Unit
----------------------------------------------------------------------------------------------------
NETWORKS
Definition:
Distributed Processing
Applications
● Electronic Mail (e-mail or Email) replaces snail mail. E-mail is the forwarding
of electronic files to an electronic post office for the recipient to pick up.
● Scheduling Programs allow people across the network to schedule
appointments directly by calling up their fellow worker's schedule and
selecting a time!
● Videotext is the capability of having a 2 way transmission of picture and
sound. Games like Doom, Hearts, distance education lectures, etc..
● Groupware is the latest network application, it allows user groups to share
documents, schedules databases, etc.. ex. Lotus Notes.
● Teleconferencing allows people in different regions to "attend" meetings
using telephone lines.
● Telecommuting allows employees to perform office work at home by
"Remote Access" to the network.
● Automated Banking Machines allow banking transactions to be performed
everywhere: at grocery stores, Drive-in machines etc..
● Information Service Providers: provide connections to the Internet and other
information services. Examples are CompuServe, Genie, Prodigy, America
On-Line (AOL), etc...
● Electronic Bulletin Boards (BBS - Bulletin Board Services) are dialup
connections (use a modem and phone lines) that offer a range of services
for a fee.
● Value Added Networks are common carriers such as AGT, Bell Canada, etc..
(can be private or public companies) who provide additional leased line
connections to their customers. These can be Frame Relay, ATM
(Asynchronous Transfer Mode), X.25, etc.. The leased line is the Value
Added Network.
Types of Connections
Physical Topology
Physical Topology refers to the way in which network is laid out physically.
Two or more links form a topology. The topology of a network is the geometric
representation of the relationship of all the links and the linking devices tone
another.
Mesh
In a mesh topology each device has a dedicated point to point link to every other
device. The term dedicated means that the link carries traffic only between the two
devices it connects.
A fully connected mesh network therefore has n(n-1)/2 physical channels to link n
devices. To accommodate that many links every device on the network has (n-1)
I/O ports.
Merits
● Dedicated link guarantees that each connection can carry its own data load.
This eliminates the traffic problems that occur when links shared by multiple
devices.
● If one link becomes unusable, it does not incapacitate the entire system.
● Privacy or security: When every message travels along a dedicated line only
the intended recipient
● No data traffic issues as there is a dedicated link between two devices which
means the link is only available for those two devices
● Mesh topology is reliable and robust as failure of one link doesn’t affect other links
and the communication between other devices on the network.
● Mesh topology is secure because there is a point to point link thus unauthorized
access is not possible.
● Fault detection is easy.
https://beginnersbook.com/2019/03/computer-network-topology-mesh-star-bus-ring-and-
hybrid/
Demerits
Star topology
Each device has a dedicated point to point link only to a central controller usually
called a hub. If one device has to send data to another it sends the data to the
controller, which then relays the data to the other connected device.
Merits
● Less expensive than a mesh topology. Each device needs only one link and
I/O port to connect it to any number of others.
● Installation and reconfigure is easy.
● Robustness. If one link fails only that link is affected.
● Requires less cable than a mesh.
Demerits
● Require more cable compared to bus and ring topologies.
Bus
One long cable acts as a backbone to link all the devices in a network Nodes are
connected to the bus cable by drop lines and taps. A drop line is a connection
running between the device and the main cable. A tap is a connector that either
splices into the main cable or punctures the sheathing of a cable to create a
contact with a metallic core. As the signal travels farther and farther, it becomes
weaker .So there is limitation in the number of taps a bus can support and on the
distance between those taps.
Merits
● Ease of installation.
● Bus uses less cabling than mesh or star topologies.
Demerits
Ring
Each device has a dedicated point to point connection only with the two devices
on either side of it.
A signal is passed along the ring in one direction from device to device until it
reaches the destination
Each device in the ring incorporates a repeater. It regenerates the bits and passes
them along, when it receives the signal intended for another device.
Merits:
● Easy to install and reconfigure.
● To add or delete a device requires changing only two connections.
● The constraints are maximum ring length and the number of devices.
● If one device does not receive the signal within a specified period, it issue an
alarm that alerts the network operator to the problem and its location
Demerits
A break in the ring disables the entire network. It can be solved by using a dual ring
or a switch capable of closing off the break
Categories of Network
The three primary categories are of network are Local Area Network (LAN),
Metropolitan Area Network (MAN), and Wide Area Network (WAN). The category
into which a network fall is determined by its size, ownership, the distance it covers
and its physical architecture.
LAN
● A LAN is usually privately owned and links the devices in a single office,
building or campus.
● A LAN can be as simple as two PCs or it can extend throughout a company.
LAN size is limited to a few kilometers. The most widely used LAN system is
the Ethernet system developed by the Xerox Corporation.
● It is designed to allow resources (hardware, software or data) to be shared
between PC’s or workstations. It may be used to provide a (shared) access
to remote organizations through a router connected to a Metropolitan Area
Network (MAN) or a Wide Area Network (WAN).
The components used by LANs can be divided into cabling standards, hardware
and protocols. Examples of cabling standards used on LANs are:
Internetwork
When two or more networks are connected they become an internetwork or
internet
Protocols
A protocol is a set of rules that governs data communication. It defines
what is communicated, how it is communicated, and when it is communicated.
The key elements of a protocol are syntax, semantics and timing
Syntax
It refers to the structure or format of the data. This refers the order in which
the data are presented.
Example
● The first 8 bits of data to be the address of the sender.
● The second 8 bits to be the address of the receiver.
● The rest of the stream may be the message itself
Semantics
Example
Timing
When data should be sent and how fast they can be sent.
Example
If a sender produces data at 100 Mbps and the receiver process data
at only 1 Mbps, it will overload the receiver and data will be lost.
Standards
Network Architecture
● general,
● cost-effective,
● fair,
● robust, and
● High-performance connectivity among a large number of computers.
● Designing a network to meet these requirements is no small task.
When the system gets complex, the system designer introduces another level of
abstraction. The idea of an abstraction is to define a unifying model that captures
some important aspect of the system, encapsulate this model in an object that
provides an interface that can be manipulated by other components of the system,
and hide the details of how the object is implemented from the users of the object.
2. It provides a more modular design. If you decide that you want to add some
new service, you may only need to modify the functionality at one layer,
re-using the functions provided at all the other layers.
Protocols
The abstract objects that make up the layers of a network system are called
. That is, a protocol provides a communication service that higher-level
objects (such as application processes, or perhaps higher level protocols) use to
exchange messages
The term protocol is sometimes it refers to the abstract interfaces---that is, the
operations defined by the service interface and the form and meaning of
messages exchanged between peers---and sometimes it refers to the module that
actually implements these two interfaces. To distinguish between the interfaces
and the module that implements these interfaces, we generally refer to the former
as a . Specifications are generally expressed using a
combination of prose, pseudo-code, state transition diagrams, pictures of packet
formats, and other abstract notations.
Encapsulation
A header is a small data structure---on the order of a few bytes to a few dozen
bytes---that is used among peers to communicate with each other. Headers are
usually attached to the front of a message. The rest of the message---i.e., the data
being transmitted on behalf of the application---is called the message's . We
say that the application's data is in the new message created by
protocol RRP. This process of encapsulation is then repeated at each level of the
protocol graph.
.
Multiplexing and Demultiplexing
The Open Systems Interconnection (OSI) architecture has been developed by the
International Organization for Standardization (ISO) to describe the operation and
design of layered protocol architectures. This forms a valuable reference model
and defines much of the language used in data communications.
Layer
●Each layer provides services to the next higher layer and shields the upper
layer from the details implemented in the lower layers.
●Each layer appears to be in direct (virtual) communication with its
associated layer on the other computer. Actual communication between
adjacent layers takes place on one computer only.
●Layering simplifies design, implementation, and testing. Only the lowest
level (Physical layer) can directly communicate with its peer
communications process into parts.
Peer-to-Peer Processes
● The passing of data and network information down through the layers
of the sending device and back up through the layers of the receiving
device is made possible by an interface between each pair of
adjacent layers.
● Each interface defines what information and services a layer must
provide for the layer above it.
● Well defined interfaces and functions provide modularity to a network.
Physical Layer
It also defines the procedures and functions that physical devices and interfaces
have to perform for transmission to occur.
● Representation of bits:
To transmit the bits, it must be encoded into electrical or
optical signals. It defines the type of representation how 0s and
1s are changed to signals.
● Data rate:
The number of bits sent each second is also defined by the
physical layer.
● Synchronization of bits:
Sender and the receiver must be synchronized at the bit level .
i.e the sender and the receiver clocks must be synchronized.
Data link layer
● Framing: The data link layer divides the stream of bits received from
the network layer into manageable data units called frames.
● Physical Addressing: If the frames are to be distributed to different
systems on the network the data link layer adds a header to the frame
to define the receiver or sender of the frame. If the frame is intended
for a system located outside the senders’ network then the receiver
address is the address of the connecting device that connects the
network to the next one.
● Flow Control: If the rate at which the data absorbed by the receiver
is less than the rate produced in the sender, the data link layer
imposes a flow control mechanism to overwhelming the receiver.
● Error control: Reliability is added to the physical layer by data link
layer to detect and retransmit loss or damaged frames. And also to
prevent duplication of frames. This is achieved through a trailer added
to the end of the frame
● Access control: When two or more devices are connected to the
same link it determines which device has control over the link at any
given time.
Network Layer
Transport Layer
Session Layer
Application Layer
It enables the user (human/software) to access the network. It provides user
interfaces and support for services such as electronic mail, remote file access
and transfer, shared database management and other types of distributed
information services.
The Internet architecture, which is also sometimes called the TCP/IP architecture
after its two main protocols are Transmission Control Protocol and Internet
Protocol
● As with the OSI model, the TCP/IP suite uses a layered model.
● TCP/IP model has four or five
● Some people call it a four layer suite - Application, Transport, Internet and
Network Access, others split the Network Access layer into its Physical
and Data link components.
First Layer:
● At the lowest level are a wide variety of network protocols denoted by NET1,
NET2& so on.
● These protocols are implemented by a combination of Hardware (e.g
Network adaptor) and software (e.g a network device driver).
● Protocols used in this layer Ethernet, FDDI.
● These protocols in turn may actually involve several sub layers.
Second Layer:
● This layer consists of a single protocol-the Internet protocol(IP).this protocol
that supports the interconnection of multiple networking technologies in to
a single logical internetwork.
Third Layer
Fourth Layer:
Running above the transport layer are a range of application protocols such as FTP,
TFTP (Trivial File Transport Protocol), Telnet (remote login) and SMTP (Simple
Mail Transfer Protocol)or electronic mail that enable the interoperation of popular
applications.
Three features:
The application is free to bypass the defined transport layers and to directly use IP
or one of the underlying networks.
Programmers are free to define new channel abstractions or applications that run
on top of any of these existing protocols.
This shape reflects the central philosophy of architecture i.e IP serves as focal
point of the architecture.
Network software:
● Protocol Hierarchies
● Service Primitives
Protocol Hierarchies
Protocol:
A protocol is a set of rules and conventions agreed upon and followed by the
communicating entities for data communication. A protocol outlines the
what, how and when of a communication.
Protocol Hierarchies
Most networks are organized as a stack of layers, one on the top of another.
The number of layers and their names vary from network to network. Each
layer has a specified function and adheres to specified protocols. Thus we
obtain a stack of protocols.
The following figure illustrates a four-layer network −
1. Connection is established.
2. Information is sent.
3. Connection is released.
It is similar to the postal services, as it carries the full address where the
message (letter) is to be carried. Each message is routed independently
from source to destination. The order of message sent can be different from
the order received.
PERFORMANCE:
Network performance is measured in following fundamental ways::
● Bandwidth
● Throughput
● Latency(Delay)
Bandwidth:
The number of bits that can be transmitted over the network in a certain
period of time
Bandwidth in bps
-Example:
Gigabit Ethernet can provide a bandwidth of 1Gbps.
Bandwidth in Hertz
A range of frequencies used to transmit signals which is measured in
hertz.
Throughput
● The throughput is a measure of how fast, the data can actually send
through a network
● Bandwidth is bits per second and throughput seem the same , but they
are different
-A link may have a bandwidth of ‘B’ bps , but only send ‘T’ bps
through this link with T<B always.
Latency(Delay)
● The latency or delay defines how long it takes for an entire message to
completely arrive at the destination from the time the first bit is sent
out from the source.
● Components of Latency or Delay:
Latency is made of four components :
1.Transmission delay
2.Propagation delay
3.Queueing delay
4.Processing delay
Latency = Transmission delay + Propagation delay +Queueing delay
+ Processing delay
Propagation Time:
It is the time required for a bit to travel from the source to the
destination. Propagation time can be calculated as the ratio between the link
length (distance) and the propagation speed over the communicating
medium. For example, for an electric signal, propagation time is the time
taken for the signal to travel through a wire.
Propagation time = Distance / Propagation speed
Transmission Time:
● Queuing time is a time based on how long the packet has to sit around
in the router.
● Quite frequently the wire is busy, so we are not able to transmit a
packet immediately.
● The queuing time is usually not a fixed factor, hence it changes with
the load thrust in the network.
● In cases like these, the packet sits waiting, ready to go, in a queue.
These delays are predominantly characterized by the measure of
traffic on the system. The more the traffic, the more likely a packet is
stuck in the queue, just sitting in the memory, waiting.
Processing Delay:
● Processing delay is the delay based on how long it takes the router to
figure out where to send the packet.
● As soon as the router finds it out, it will queue the packet for
transmission. These costs are predominantly based on the complexity
of the protocol.
● The router must decipher enough of the packet to make sense of
which queue to put the packet in.
● Typically the lower level layers of the stack have simpler protocols. If a
router does not know which physical port to send the packet to, it will
send it to all the ports, queuing the packet in many queues immediately.
● Differently, at a higher level, like in IP protocols, the processing may
include making an ARP request to find out the physical address of the
destination before queuing the packet for transmission. This situation
may also be considered as a processing delay
● The function of the data link layer is to provide service to the network layer.
● The principal service is transferring data from the network layer on the
source machine to the network layer on the destination machine.
● The network layer hands some bits to the data link layer for transmission to
the destination, the job of the data link layer is to transmit the bits to the
destination machine, so they can be handed over to the network layer on the
destination machine.
Framing
● In order to provide service to the network layer, the data link layer must use
the service provided to it by the physical layer
● What the physical layer does is accepting raw bit stream and attempt to
deliver it to the destination. This bit stream is not guaranteed to be error free.
● It is up to the data link layer to detect, and if necessary, correct errors.
● The usual approach is for the data link layer to break the bit stream up into
discrete frames and compute the checksum for each frame. When the
frames arrive at the destination, the checksum is re-computed.
There are four methods of breaking up the bit stream
1. Character count.
2. Starting and ending character stuffing.
3. Starting and ending flags, with bit stuffing.
4. Physical layer coding violations.
● The first framing method, Character count, uses a field in the header to
specify the number of characters in the frame. When the data link layer at
the destination sees the character count, it knows how many characters
follow. Problem: count can possible be misrepresented by a transmission
error. This method is rarely used anymore.
● The second framing method, Starting and ending character stuffing, gets
around the problem of resynchronization after an error by having each frame
start with the ASCII character sequence DLE STX and end with the sequence
DLE ETX. (DLE is Data Link Escape, STX is Start of Text, and ETX is End of
Text). Problem: a serious problem occurs with this method when binary
data, such as object programs or floating-point numbers, are being
transmitted it is possible that the DLE, STX, and ETX characters can occur,
which will interfere with the framing. One way to solve this problem is to
have the sender's data link layer insert and DLE character just before each
"accidental" DLE and the data link layer on the other machine removes them
before it gives the data to the network layer, this is called Character stuffing.
● The third method, Starting and ending flags with bit stuffing, allows data
frames to contain and arbitrary number of bits and allows character codes
with an arbitrary number of bits per character. Each frame begins and ends
with a special bit pattern, 01111110, called a flag byte. Whenever the
sender's data link layer encounters five consecutive ones in the data, it
automatically stuffs a 0 bit into the outgoing bit stream, which is called bit
stuffing. The receiving machine destuffs the 0 bit.
Error Control
● The next problem to deal with is who to make sure all frames are eventually
delivered to the network layer at the destination, and in proper order.
● The usual way to ensure reliable delivery is to provide the sender with some
feedback about what is happening at the other end of the line.
● One complication with this is that the frame may vanish completely, in which
case, the receiver will not react at all, since it has no reason to react.
● This possibility is dealt with by introducing timers into the data link layer.
When the sender transmits a frame, it generally also starts a timer. The timer
is set to go off after an interval long enough for the frame to reach the
destination machine. If the frame or acknowledgment is lost the timer will
go off. The obvious solution is to transmit the frame again. This creates the
problem of possible sending frames multiple times. To prevent this from
happening, it is generally necessary to assign sequence numbers to
outgoing frames, so that the receiver can distinguish retransmission from
originals.
● The whole issue of managing the timers and sequence numbers so as to
ensure that each frame is ultimately passed to the network layer at the
destination exactly one, no more no less, is an important part of the data link
layer's duties.
Flow Control
● Another important design issue that occurs in the data link layer (and higher
layers as well) is what to do with a sender that systematically wants to
transmit frames faster than a receiver can accept them.
● This situation can easily occur when the sender is running on a fast
computer and the receiver is running on a slow machine.
● The usual solution is to introduce flow control to throttle the sender into
sending no faster than the receiver can handle the traffic.
● Various flow control schemes are known, but most of them use the same
basic principle.
● The protocol contains well-defined rules about when a sender may transmit
the next frame.
1.3 Framing
With Synchronous Transmission all the letters or data in one group of data is
transmitted at one time as a block of data called a frame or packet.
The start and end of each packet sometimes is marked by adding synchronization
characters (SYN) at the start/end of each packet.
When node A wishes to transmit a frame to node B, it tells its adaptor to transmit a
frame from the node’s memory. This results in a sequence of bits being sent over
the link. The adaptor on node B then collects together the sequence of bits arriving
on the link and deposits the corresponding frame in B’s memory. Recognizing
exactly what set of bits constitutes a frame—that is, determining where the frame
begins and ends—is the central challenge faced by the adaptor.
There are many protocols for synchronous transmission that fall into three broad
categories:
The more recent Point-to-Point Protocol (PPP), which is commonly run over dialup
modem links, is similar to BISYNC in that it uses character stuffing.
● HDLC standardized ISO in 1979 and accepted by most other standards bodies
(ITU-T, ANSI)
● Treat frames as collections of bits, that is, pay no regard to byte boundaries.
● e.g The Synchronous Data Link Control protocol(SDLC) developed by
IBM.SDLC was later standardized by the ISO as the High Level data Link
Control (HDLC) protocol.
● 3 types of end-stations:
–sends commands
–can only responds to Primary’s commands
–can both command and respond
● 3 types of configuration(Note: no balanced multipoint)
TRANSFER MODE OF HDLC
● Mode = relationship between 2 communicating devices;
● Describes who controls the link
o NRM = Normal Response Mode
o ABM = Asynchronous Balanced Mode
o ARM= Asynchronous Response Mode
Only difference is that secondary needs permission from the Primary in NRM,
but doesn’t need permission from the Primary in ARM. But in ABM, both primary &
slave performs equal functions.
TYPES OF FRAMES:
3 types of Frames are
– (information Frame) transports user data and control info about
user data.
– supervisory Frame, only used for transporting control information
– unnumbered Frame, reserved for system management(managing
the link itself)
FRAME FORMAT
HDLC uses
Flag Fields: It has unique pattern at both the ends of frame structure – used to
indicate start & end of frame (01111110). This sequence is also transmitted during
any times that the link is idle so that the sender and receiver can keep their clocks
synchronized.
Bit Stuffing:
On the sending end any time five consecutive 1’s have been transmitted from the
body of the message, the sender inserts a 0 before transmitting next bit. On the
receiving side, should five consecutive 1’s arrive, the receiver makes its decision
based on the next bit it sees. If the next bit is 0, it must have been stuffed and so
the receiver removes it.
● This is end of frame (or) Error has been introduced in to the bit stream
By looking the next bit, the receiver can distinguish between these two cases
HDLC Operation:
1. Initialization
2. Data Transfer
3. Disconnect
ERROR DETECTION AND CORRECTION
ERROR:
TYPES OF ERRORS:
The term single bit error means that only one bit of a given data unit is
changed from 1 to 0 or 0 to 1. 010101 is changed to 110101 here only one
bit is changed by single bit error.
● Burst Error:
A burst error means that 2 or more bits in the data unit have changed.
Example:
● the bits in the frame can be inverted, anywhere within the frame including
the data bits or the frame's control bits,
● additional bits can be inserted into the frame, before the frame or after the
frame and
● Bits can be deleted from the frame.
DETECTION
Redundancy
Error detection use the concept of redundancy, which means adding extra
bits for detecting errors at the destination .i.e., instead of repeating the entire data
stream, a shorter group of bits may be appended to the end of each unit.
Above figure shows the process of using redundant bits to check the accuracy of a
data unit. Once the data stream has been generated, it passes through a device
that analyses it and adds an appropriately coded redundancy check.
The receiver puts the entire stream through a checking function. The received bit
stream passes the checking criteria. The data portion of the unit is accepted if
there is no error, otherwise rejected and the redundant bits are discarded.
Detection methods
● Parity check
● Cyclic redundancy check
● checksum
Parity check
A redundant bit called parity bit is added to every data unit so that the total
number of 1’s in the unit becomes even (or odd).
● Form 3×7 array and add row and column parity bits:
Data bits
1110001 0
1000111 0 row
0011001 1 parity bits
0101111 1
Column parity bits
● Example (cont.): suppose bit in position (1,3) is received in error (in other
words, 1 bit
error)
● Dividing the data unit by a predetermined divisor derives the redundancy bits
used by CRC; the remainder is CRC.
● First a starting of n 0’s is appended to the data unit. The number n is one
less than the number of bits in the predetermined divisor, which is n+ 1 bit.
● The newly elongated data unit is divided by the divisor, using a process
called binary division. The remainder resulting from this division is the CRC.
● The CRC of n bits derived in step 2 replaces the appended 0s at the end of
the data unit. Note that the CRC may consist of all 0s.
● The data unit arrives at the receiver data first, followed by the CRC. The
receiver treats the whole string as unit and divides it by the same divisor that
was used to find the CRC remainder.
● If the string arrives without error, the CRC checker yields a remainder of zero
ad the data unit passes. If the string has been changed in transit, the
division yields a non zero remainder and the data does not pass.
CRC GENERATOR AND CHECKER
CRC GENERATOR
CRC CHECKER
● A CRC checker function is exactly as the generator does. After receiving the
data appended with the CRC, it does the same modulo-2 division.
● If the remainder is all 0s, the CRC is dropped and the data are accepted;
otherwise, the received stream of bits is discarded and data are resent.
● The following figure shows the process of division in the receiver. We
assume that there is an error.
● The remainder is not full of 0s, and the data are rejected.
POLYNOMIALS
The divisor in the CRC most often represented not as a string of 1s and 0s,
but as an algebraic polynomial. The polynomial format is useful to solve the
concept mathematically.
A polynomial
CHECKSUM GENERATOR
● In the sender side, the checksum generator subdivides the data unit into
equal segments of n bits.
● These segments are added using ones complement a, the total is also in n
bits long
● The total is then complemented and appended to the end of the original
data unit as redundancy bits, called the checksum field.
● The extended data is transmitted across the network.
CHECKSUM CHECKER
● The receiver subdivides the data unit into k sections each of n bits.
● All sections are added using ones complement arithmetic to get the sum.
● The sum is complemented.
● If the result is zero, the data are accepted: otherwise they are rejected.
EXAMPLE
10101001 00111001
00111001
1 1 1 0 0 0 1 0 sum
Checksum
The receiver adds these three sections, it will get all ones, which, after
complementing, are all 0s and shows that there is no error.
10101001
00111001
00011101
11111111 sum
The two main features of data kink layer are flow control and error control.
FLOW CONTROL
Flow control coordinates that amount of data that can be sent before receiving
ACK It is one of the most important duties of the data link layer.
ERROR CONTROL
● Error control in the data link layer is based on ARQ (automatic repeat request),
which is the retransmission of data.
● The term error control refers to methods of error detection and retransmission.
● Anytime an error is detected in an exchange, specified frames are retransmitted.
This process is called ARQ.
The sending devise keeps the copy of the last frame transmitted until it receives
an acknowledgement for that frame. Keeping a copy allows the sender to re-
transmit lost or damaged frames until they are received correctly.
OPERATION:
The possible operations are
● Normal operation
● lost frame
● ACK lost
● Delayed ACK.
Normal operation
The sender sends frame 0 and wait to receive ACK 1. When ACK 1 is received it
sends frame 1 and then waits to receive ACK 0, and so on.
The ACK must be received before the time out that is set expires. The following
figure shows successful frame transmission.
o When the receiver receives the damaged frame it discards it, which
essentially means the frame is lost. The receiver remains silent about a
lost frame and keeps its value of R.
o For example in the following figure the sender transmits frame 1, but it is
lost. The receiver does nothing, retaining the value of R (1). After the
timer at the sender site expires, another copy of frame 1 is sent.
Lost acknowledgement
o An ACK can be delayed at the receiver or by some problem with the link.
The following figure shows the delay of ACK 1; it ids received after the
timer for frame 0 as already expired.
o The sender has now received two ACK’s, one that was delayed and one
that was sent after the duplicate frame 0 arrived. The second ACK 1 is
discarded.
BIDIRECTIONAL TRANSMISSION
PIGGYBACKING
It’s a method to combine a data frame with an ACK. In following figure both
the sender and the receiver have data to send. Instead of sending separate data
and ACK frames. It can save bandwidth because the overhead from a data frame
and an ACK frame can be combined into just one frame.
GO-BACK-N ARQ
● As in Stop-and-wait protocol senders have to wait for every ACK then next
frame is transmitted. But in GO-BACK-N ARQ number of frames can be
transmitted without waiting for ACK. A copy of each transmitted frame is
maintained until the respective ACK is received.
1. Sequence numbers.
● Window is a set of frames in a buffer waiting for ACK. This window keeps on
sliding in forward direction, the window size is fixed. As the ACK is received,
the respective frame goes out of window and new frame to sent come into
window. Figure illustrates the sliding window.
● If Sender receives. ACK 4, then it and including Frame 3
were
3. Receiver sliding window:
In the receiver side size of the window is always one. The receiver is expecting to
arrive frame in specifies sequence. Any other frame is received which is out of
order is discarded. The receiver slides over after receiving the expected frame. The
following figure shows the receiver side-sliding window.
4. Control variables:
The sender has a timer for each transmitted frame. The receivers don’t have
any timer.
6. Acknowledgement:
The receiver responds for frame arriving safely by positive ACK. For
damaged or lost frames receiver doesn’t reply, the sender has to retransmit it when
timer of that frame elapsed. The receiver may ACK once for several frames.
7. Resending frames:
Operation
Normal operation: Following diagram shows this mechanism. The sender keeps
track of the outstanding frames and updates the variables and windows as
acknowledgements arrive.
Damaged or lost frame:
Figure shows that frame 2 is lost. Note that when the receiver receives frame 3, it
is discarded because the receiver is expecting frame 2, not frame3. After the timer
for frame 2 expires at the sender site, the sender sends frame 2 and 3.
Delayed Acknowledgement:
● The size of the window should be one half of the value 2m.
● The receiver window size must also be the size. In this the receiver is
looking for a range of sequence numbers.
● The receiver has control variables RF and RL to denote the boundaries
of the window.
● Selective repeat also defines a negative ACK.
● NAK that reports the sequence number of a damaged frame before
the timer expires
Operation
Normal operation
A normal operation of the selective repeat ARQ is same as GO-BACK-N ARQ
mechanism.
Frame 0 and 1 are accepted when received because they are in the range
specified by the receiver window. When frame 3 is received, it is also accepted
for the same reason. However the receiver sends a NAK 2 to show that frame 2
has not been received. When the sender receives the NAK 2, it resends only
frame 2, which is then accepted because it is in the range of the window.
In this sender also sets a timer for each frame sent. The remaining
operations are same as GO-BACK-N ARQ.