You are on page 1of 7

Errors: When bits are transmitted over the computer network, they are subject to get corrupted due

to interference and
network problems. The corrupted bits leads to spurious data being received by the destination and are called errors.
Types of Errors: Single bit error − In the received frame, only one bit has been corrupted, i.e. either changed from 0 to 1
or from 1 to 0. Multiple bits error − In the received frame, more than one bits are corrupted. Burst error − In the
received frame, more than one consecutive bits are corrupted.
Error Control: Error detection − Error detection involves checking whether any error has occurred or not. The number
of error bits and the type of error does not matter. Error correction − Error correction involves ascertaining the exact
number of bits that has been corrupted and the location of the corrupted bits. For both error detection and error
correction, the sender needs to send some additional bits along with the data bits. The receiver performs necessary
checks based upon the additional redundant bits. If it finds that the data is free from errors, it removes the redundant
bits before passing the message to the upper layers.
Error Detection Techniques:
Parity Check or Vertical Redundancy Check (VRC): The parity check
is done by adding an extra bit, called parity bit to the data to make
a number of 1s either even in case of even parity or odd in case of
odd parity. While creating a frame, the sender counts the number
of 1s in it and adds the parity bit in the following way. 1) In case of
even parity: If a number of 1s is even then parity bit value is 0. If
the number of 1s is odd then parity bit value is 1. 2) In case of odd
parity: If a number of 1s is odd then parity bit value is 0. If a number
of 1s is even then parity bit value
is 1. On receiving a frame, the receiver counts the number of 1s in it. In case of even parity check, if the count of 1s is
even, the frame is accepted, otherwise, it is
rejected. A similar rule is adopted for odd parity
check. The parity check is suitable for single bit
error detection only.
Longitudinal Redundancy Check (LRC)  is also
known as 2-D parity check. In this method, data
which the user want to send is organized into
tables of rows and columns. A block of bit is
divided into table or matrix of rows and columns.
In order to detect an error, a redundant bit is
added to the whole block and this block is transmitted to receiver. The receiver uses this redundant row to detect
error. After checking the data for errors, receiver accepts the data and discards the redundant row of bits. Advantage:
LRC is used to detect burst errors. Disadvantage: The
main problem with LRC is that, it is not able to detect
error if two bits in a data unit are damaged and two bits
in exactly the same position in other data unit are also
damaged.

Cyclic Redundancy Check (CRC): involves binary division


of the data bits being sent by a predetermined divisor
agreed upon by the communicating system. The divisor is
generated using polynomials. 1) Here, the sender
performs binary division of the data segment by the
divisor. It then appends the remainder called CRC bits to
the end of the data segment. This makes the resulting
data unit exactly divisible by the divisor. 2) The receiver
divides the incoming data unit by the divisor. If there is
no remainder, the data unit is assumed to be correct and
is accepted. Otherwise, it is understood that the data is
corrupted and is therefore rejected.
Checksum: In this error detection
scheme, the following procedure is
applied. 1) Data is divided into fixed
sized frames or segments. 2) The
sender adds the segments using 1’s
complement arithmetic to get the
sum. It then complements the sum
to get the checksum and sends it
along with the data frames. 3) The
receiver adds the incoming
segments along with the checksum
using 1’s complement arithmetic to
get the sum and then complements
it. 4) If the result is zero, the
received frames are accepted;
otherwise, they are discarded. Error Correction Techniques: 1) Backward Error Correction (Retransmission) −  If the
receiver detects an error in the incoming frame, it requests the sender to retransmit the frame. It is a relatively simple
technique. But it can be efficiently used only where retransmitting is not expensive as in fiber optics and the time for
retransmission is low relative to the requirements of the application. 2) Forward Error Correction −  If the receiver
detects some error in the incoming frame, it executes error-correcting code that generates the actual frame. This saves
bandwidth required for retransmission. It is inevitable in real-time systems. However, if there are too many errors, the
frames need to be retransmitted.
Hamming Code in Computer Networks: Hamming code in computer networks is linear block code for error
correction and was developed by R.W. Hamming. This mechanism is used to identify and correct errors which can occur
during the data transmission. It is possible to detect up to 2 errors and correct only one using hamming code technique.
Hamming code in computer networks is based on the relationship between data bits and redundant bits. For any length
of a data unit, we can apply hamming code for error correction and detection.
Redundant Bits: The central concept in detecting or correcting the error is redundancy. To be able to detect or correct
errors, we need to add some extra bits to our data. The sender adds these redundant bits and the receiver removes
them at the receiver’s side. The presence of redundant bits allows the users to detect or correct corrupted bits. 
The following formula is used to calculate the no. of redundant bits. 2^R = M+R+1, Where R stands for redundant bits
and M is the data bits. Parity Bits: A parity bit is added to the actual data block to make the number of 1’s even or odd.
Basically, there are two types of parity bits: Even Parity: In even parity, an additional bit is added at the end of the data
block to make the number of 1’s even. If the no. of 1s are already even in the data, then parity bit 0 is added. If the no.
of 1’s are added odd in the data block, then parity bit 1 is added. Odd Parity: In odd parity, an additional bit is added to
make the number of 1’s odd. If the no. of 1’s is already odd in the actual data unit, then parity bit 0 is added, otherwise,
parity bit 1 is added. Algorithm of Hamming Code: Encode a message:  We encode the message at the sender’s side and
then it is transmitted over the network. The following steps are involved in encoding a message. 1) Write the bit position
in the binary format. 2) Calculate the number of redundant bits for a message. 3) Do the positioning of redundant bits.
4) Then do the calculations and calculate the value of each redundant bit. 5) Append the redundant bits with actual data
and transmit. Decode the message: At the destination end, the receiver receives the encoded message and performs
the recalculations to calculate the errors. If the message has an error, then these errors are corrected. To perform
recalculations following steps are performed. 1) Calculate the number of redundant bits using the same formula.
2) Do the positioning of redundant bits. 3) The parity checking technique is used to check parity bits.
4) Perform error detection and correction.
Definition of Piggybacking: This technique in which the outgoing acknowledgement is delayed temporarily is
called piggybacking. Advantages of piggybacking :
1. The major advantage of piggybacking is the better use of available channel bandwidth. This happens because an
acknowledgement frame needs not to be sent separately. Usage cost reduction
2. Improves latency of data transfer Disadvantages of piggybacking :
1. The disadvantage of piggybacking is the additional complexity.
2. If the data link layer waits long before transmitting the acknowledgement (block the ACK for some time), the
frame will rebroadcast.
Flow control:  Flow control is a technique that allows two stations working at different speeds to communicate with
each other. It is a set of measures taken to regulate the amount of data that a sender sends so that a fast sender does
not overwhelm a slow receiver. In data link layer, flow control restricts the number of frames the sender can send
before it waits for an acknowledgment from the receiver.
Approaches to Flow Control:  1) Feedback – based Flow Control: In this control technique, sender simply transmits
data or information or frame to receiver, then receiver transmits data back to sender and also allows sender to
transmit more amount of data or tell sender about how receiver is processing or doing. This simply means that sender
transmits data or frames after it has received acknowledgements from user.
2) Rate – based Flow Control: In this control technique, usually when sender sends or transfer data at faster speed to
receiver and receiver is not being able to receive data at the speed, then mechanism known as built-in mechanism in
protocol will just limit or restricts overall rate at which data or information is being transferred or transmitted by
sender without any feedback or acknowledgement from receiver.
Techniques of Flow Control: 1. Stop-and-Wait Flow Control : This method is the easiest and simplest form of flow
control. In this method, basically message or data is broken down into various multiple frames, and then receiver
indicates its readiness to receive frame of data. When acknowledgement is received, then only sender will send or
transfer the next frame. This process is continued until sender transmits EOT (End of Transmission) frame. In this
method, only one of frames can be in transmission at a time. It leads to inefficiency i.e. less productivity if
propagation delay is very much longer than the transmission delay and Ultimately  In this method sender sent single
frame and receiver  take one frame at a time and sent acknowledgement(which is next frame number only) for new
frame.  Advantages: 1) This method is very easiest and simple and each of the frames is checked and acknowledged
well. 2) This method is also very accurate. Disadvantages: 1) this method is fairly slow. 2) In this, only one packet or
frame can be sent at a time. 3) It is very inefficient and makes the transmission process very slow.
2. Sliding Window Flow Control : This method is required where reliable in-order delivery of packets or frames is very
much needed like in data link layer. It is point to point protocol that assumes that none of the other entity tries to
communicate until current data or frame transfer gets completed. In this method, sender transmits or sends various
frames or packets before receiving any acknowledgement. In this method, both the sender and receiver agree upon
total number of data frames after which acknowledgement is needed to be transmitted. Data Link Layer requires and
uses this method that simply allows sender to have more than one unacknowledged packet “in-flight” at a time. This
increases and improves network throughput. and Ultimately  In this method sender sent multiple frame but  receiver
take one by one and  after completing one frame acknowledge(which is next frame number only) for new frame.  
Advantages: 1) It performs much better than stop-and-wait flow control. 2) This method increases efficiency.
3) Multiples frames can be sent one after another. Disadvantages : 1) The main issue is complexity at the sender and
receiver due to the transferring of multiple frames. 2) The receiver might receive data frames or packets out the
sequence. Selective Repeat Protocol (SRP) : This protocol(SRP) is mostly identical to GBN protocol, except that
buffers are used and the receiver, and the sender, each maintains a window of size. SRP works better when the link is
very unreliable. Because in this case, retransmission tends to happen more frequently, selectively retransmitting
frames is more efficient than retransmitting all of them. SRP also requires full-duplex link. backward
acknowledgements are also in progress.
 Sender’s Windows ( Ws) = Receiver’s Windows ( Wr).
 Window size should be less than or equal to half the sequence number in SR protocol. This is to avoid packets
being recognized incorrectly. If the size of the window is greater than half the sequence number space, then if an
ACK is lost, the sender may send new packets that the receiver believes are retransmissions.
 Sender can transmit new packets as long as their number is with W of all unACKed packets.
 Sender retransmit un-ACKed packets after a timeout – Or upon a NAK if NAK is employed.
 Receiver ACKs all correct packets.
 Receiver stores correct packets until they can be delivered in order to the higher layer.
 In Selective Repeat ARQ, the size of the sender and receiver window must be at most one-half of 2^m.
Pipelining is a general concept where the processing of the next task starts before the ending of the previous task. In
networking, the concepts of pipelining specify that the source can send multiple frames before receiving the
acknowledgement for the first transmitted frame.
Go-Back-N ARQ Definition: Go-back-n ARQ protocol is a sliding window protocol that uses the concept of pipelining. In
go-back-n, the ‘N” determines the size of the sender window. The value of N defines the number of frames that can be
sent while the sender is waiting for the acknowledgement. The value of N is always greater than 1 else it would behave
in a stop-and-wait manner. The frames at the sender side are numbered sequentially. In go-back-n, the sender can
buffer N frames whereas the size of the receiver window is 1 which means the receiver can buffer only one frame at a
time. However, there can be multiple data frames and acknowledgement in the channel at the same time and the sliding
sender window can also slide by one or more frames at once. If the sender does not receive an acknowledgement before
the corresponding timer expires the sender retransmits all the frames in the current sender window. While if the
receiver receives a corrupted frame it silently discards that frame without taking any action this results in the expiration
of the corresponding timer at the sender side which lead to retransmission of frames in the current sender window.
That’s why it is referred to as an automatic repeat request.
Working and Example of Go-Back-N: Let us understand the working of go-back-n with the help of an example. Consider
that the sender has 16 frames to transmit. The first thing is to provide a sequence number to the frame so that each
frame has an independent identity.
Sequencing: The frames to be transmitted are numbered using modulo 2 m. Where m is the number of bits allowed by
the frame header to represent the sequence number of a frame. Now if the sender has 16 frames to be transmitted
which if number serially would lie from 0, 1, 2 …, 15.
Consider that the header allows only 3 bits to represent
the sequence number of the frame i.e. m= 3. The
sequence number would range from 0 to 2 3-1 i.e. from 0
to 7. So the 16 frames at the sender side are numbered as
0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7 and so on.
Sender Sliding Window: For the proper working of the
protocol, the maximum size of the sliding window in go-
back-n must be 2m – 1. As in the explanation above we
have m=3 the maximum size of the window would be 2 2 –
1= 7.Now, the entire sender’s window can be classified
into four regions. The very first region of the sender
window has the sequence numbers of frames that are
acknowledged and the sender can purge these frames.
The sequence numbers of frames in the second region are
those frames that are sent but not yet acknowledged by
the receiver. These are also called outstanding packets. The third region is the sequence of frame numbers that can be
sent once the frames with the sequence number in the second region are acknowledged. The fourth region has
sequence numbers that can be used when the window slides. Depending on the number of acknowledgements arrived
the sliding window can slide one or more slots toward the right. Consider that the sender has received
acknowledgement for frame with sequence number 4 then it will slide only one slot towards the right. If the sender
receives two acknowledgements for the frame with sequence numbers 4 and 5 then it will slide two slots towards the
right.
Multiple Access Control – If there is a dedicated link between the sender and the receiver then data link control
layer is sufficient, however if there is no dedicated link present then multiple stations can access the channel
simultaneously. Hence multiple access protocols are required to decrease collision and avoid crosstalk.
1. Random Access Protocol: In this, all stations have same superiority that is no station has more priority than
another station. Any station can send data depending on medium’s state( idle or busy). It has two features:  
1) There is no fixed time for sending data, 2) There is no fixed sequence of stations sending dataThe Random access
protocols are further subdivided as:  (a) ALOHA – It was designed for wireless LAN but is also applicable for shared
medium. ALOHA is a multiple access protocol for transmission of data via a shared network channel. It operates in the
medium access control sublayer (MAC sublayer) of the open systems interconnection (OSI) model. Using this protocol,
several data streams originating from multiple nodes are transferred through a multi-point transmission channel.In
ALOHA, each node or station transmits a frame without trying to detect whether the transmission channel is idle or
busy. If the channel is idle, then the frames will be successfully transmitted. If two frames attempt to occupy the channel
simultaneously, collision of frames will occur and the frames will be discarded. These stations may choose to retransmit
the corrupted frames repeatedly until successful transmission occurs.
Pure Aloha:  When a station sends data it waits for an acknowledgement. If the acknowledgement doesn’t come
within the allotted time then the station waits for a random amount of time called back-off time (Tb) and re-sends the
data. Since different stations wait for different amount of time, the probability of further collision decreases.  
1) Vulnerable Time = 2* Frame transmission time. 2) Throughput = G exp{-2*G}. 3) Maximum throughput = 0.184 for
G=0.5. Slotted Aloha:  It is similar to pure aloha, except that we divide time into slots and sending of data is allowed
only at the beginning of these slots. If a station misses out the allowed time, it must wait for the next slot. This
reduces the probability of collision. 1) Vulnerable Time = Frame transmission time.
2) Throughput = G exp{-*G}. 3) Maximum throughput = 0.368 for G=1
CSMA – Carrier Sense Multiple Access ensures fewer collisions as the station is required to first sense the medium
(for idle or busy) before transmitting data. If it is idle then it sends data, otherwise it waits till the channel becomes
idle. However there is still chance of collision in CSMA due to propagation delay. For example, if station A wants to
send data, it will first sense the medium.If it finds the channel idle, it will start sending data. However, by the time the
first bit of data is transmitted (delayed due to propagation delay) from station A, if station B requests to send data
and senses the medium it will also find it idle and will also send data. This will result in collision of data from station A
and B. CSMA access modes- 
 1-persistent: The node senses the channel, if idle it sends the data, otherwise it continuously keeps on checking
the medium for being idle and transmits unconditionally(with 1 probability) as soon as the channel gets idle.
 Non-Persistent: The node senses the channel, if idle it sends the data, otherwise it checks the medium after a
random amount of time (not continuously) and transmits when found idle. 
 P-persistent: The node senses the medium, if idle it sends the data with p probability. If the data is not
transmitted ((1-p) probability) then it waits for some time and checks the medium again, now if it is found idle
then it send with p probability. This repeat continues until the frame is sent. It is used in Wifi and packet radio
systems. 
 O-persistent: Superiority of nodes is decided beforehand and transmission occurs in that order. If the medium is
idle, node waits for its time slot to send data. 
 (CSMA/CD) – The CSMA method does not tell us what to do in case there is a collision. Carrier sense multiple access
with collision detection (CSMA/CD) adds to the CSMA algorithm to deal with the collision. In CSMA/CD, the size of a
frame must be large enough so that collision can be detected by the sender while sending the frame. So, the frame
transmission delay must be at least two times the maximum propagation delay. Assume some station transmitted
data packet and successfully get to the destination but it is just the Best Case, so we have to take the Worst
Case scenario in which there will be contention slots. Contention slots are those slots that are not able to transmit
their journey due to the collision.
Channelization: In this, the available bandwidth of the link is shared in time, frequency and code to multiple
stations to access channel simultaneously. 

Frequency Division Multiple Access (FDMA) – The available bandwidth is divided into equal bands so that each
station can be allocated its own band. Guard bands are also added so that no two bands overlap to avoid
crosstalk and noise. 
Time Division Multiple Access (TDMA) – In this, the bandwidth is shared between multiple stations. To avoid
collision time is divided into slots and stations are allotted these slots to transmit data. However there is a
overhead of synchronization as each station needs to know its time slot. This is resolved by adding
synchronization bits to each slot. Another issue with TDMA is propagation delay which is resolved by addition of
guard bands. 
Code Division Multiple Access (CDMA) – One channel carries all transmissions simultaneously. There is neither
division of bandwidth nor division of time. For example, if there are many people in a room all speaking at the
same time, then also perfect reception of data is possible if only two person speak the same language. Similarly,
data from different stations can be transmitted simultaneously in different code languages.
Orthogonal Frequency Division Multiple Access (OFDMA) –  In OFDMA the available bandwidth is divided into
small subcarriers in order to increase the overall performance, Now the data is transmitted through these small
subcarriers. it is widely used in the 5G technology. Advantages: 1) Increase in efficiency. 2) High data rates. 3)
Good for multimedia traffic. Disadvantages: 1) Complex to implement 2) High peak to power ratio
Spatial Division Multiple Access (SDMA) – SDMA uses multiple antennas at the transmitter and receiver to
separate the signals of multiple users that are located in different spatial directions. This technique is commonly
used in MIMO (Multiple-Input, Multiple-Output) wireless communication systems. Advantages: 1) Frequency
band uses effectively. 2) The overall signal quality will be improved. 3) The overall data rate will be increased
Disadvantages: 1) It is complex to implement. 2) It require the accurate information about the channel
FDDI stands for Fiber Distributed Data Interface. It is a set of ANSI and ISO guidelines for information
transmission on fiber-optic lines in Local Area Network (LAN) that can expand in run upto 200 km (124 miles).
The FDDI convention is based on the token ring protocol. In expansion to being expansive geographically, an
FDDI neighborhood region arranges can support thousands of clients. FDDI is habitually utilized on the spine for
a Wide Area Network(WAN).  An FDDI network contains two token rings, one for possible backup in case the
essential ring falls flat.  The primary ring offers up to 100 Mbps capacity. In case the secondary ring isn’t required
for backup, it can also carry information, amplifying capacity to 200 Mbps. The single ring can amplify the most
extreme remove; a double ring can expand 100 km (62 miles).  
Characteristics of FDDI:
1) FDDI gives 100 Mbps of information throughput. 2) FDDI incorporates two interfaces.
3) It is utilized to associate the equipment to the ring over long distances. 4) FDDI could be a LAN with Station
Management. 5) Allows all stations to have broken even with the sum of time to transmit information.
5) FDDI defines two classes of traffic viz. synchronous and asynchronous.
Advantages of FDDI: 1) Fiber optic cables transmit signals over more noteworthy separations of approximately
200 km. 2) It is conceivable to supply the need to the work stations associated within the chain. Consequently,
based on the prerequisite a few stations are bypassed to supply speedier benefit to the rest. 3) FDDI
employments different tokens to make strides organize speed. 4) It offers a higher transmission capacity (up to
250 Gbps). Thus, it can handle information rates up to 100 Mbps. 5) It offers tall security because it is
troublesome to spy on the fiber-optic link. 6) Fiber optic cable does not break as effectively as other sorts of
cables.
Disadvantages of FDDI: 1) FDDI is complex. Thus establishment and support require an incredible bargain of
expertise. 2) FDDI is expensive.
ISDN stands for Integrated Services Digital Network. It is used to bridge the Central Office's local loop and the
premise connection (home). ISDN uses the existing wiring so that no new cabling is required. It is a digital service that
restores the analog plain old telephone set. An Integrated Digital Network (ISDN) is a network in which digital switching
connections are used to transmit digital signals. Integrated Services refers to ISDNs ability to deliver two simultaneous
connections, in any merging of data, voice, video and fax, over an individual line. Multiple devices can be connected to
the line and sent as needed. An ISDN is a network, in general evolving from telephony ISDN, which provides end-to-end
digital connectivity to provide a broad range of services such as voice and non-voice services, to which customers have
to create by a limited set of standard multipurpose user network interfaces.
Advantages: 1) ISDN is a mature technology, and it has been around since the late 1980s. It has been tried, tested and
works. 2) A worldwide set of standards governs it. 3) It offers symmetrical transfer rates− the transmit rate is the same
as the receiving rate. 3) It is a competitive price compared to other technologies.
Disadvantages: 1) An external power supply is required. The telecommunication doesn't supply power for ISDN lines. If
the power fails, the mobile phones won't work.
2) Unique digital phones are necessary or a terminal adapter to talk to the existing plain old telephone set devices.
3) It is costly to upgrade a central office switch ($500,000+) to ISDN. 4) If the ISDN fails-the phone fails.

Hamming Code: Hamming code is a block code that is capable of detecting up to two simultaneous bit errors and
correcting single-bit errors. It was developed by R.W. Hamming for error correction.
In this coding method, the source encodes the message by inserting redundant bits within the message. These
redundant bits are extra bits that are generated and inserted at specific positions in the message itself to enable error
detection and correction. When the destination receives this message, it performs recalculations to detect errors and
find the bit position that has error.
Encoding a message by Hamming Code: The procedure used by the sender to encode the message encompasses the
following steps −
 Step 1 − Calculation of the number of redundant bits.
 Step 2 − Positioning the redundant bits.
 Step 3 − Calculating the values of each redundant bit.
Decoding a message in Hamming Code: Once the receiver gets an incoming message, it performs re-calculations to
detect errors and correct them. The steps for recalculation are −
 Step 1 − Calculation of the number of redundant bits.
 Step 2 − Positioning the redundant bits.
 Step 3 − Parity checking.
 Step 4 − Error detection and correction
Linear Block Codes:  It is a simple error control coding technique used for error detection and correction.
 Information data is partitioned into blocks of length K pieces for example Information word.
 Every information word is then coded into a block of length n bits called a codeword. Here, n > k
 Also, n = k + r, where ‘r ‘ denotes the parity bits or check bits added to every information word.
 Vector documentation is utilized for the Data word and Codeword: message m = (m1, m2 mn ),
 Codeword c = (c1, c2 cn).
Cyclic Codes
 The cyclic property of code words is that any cyclic-shift of a code word is also a code word. Cyclic codes follow
this cyclic property.
 Cyclic codes are used for error correction. They are mainly used to correct double errors and burst errors.
 Hence, these are a few error correcting codes, which are to be detected at the receiver. These codes prevent the
errors from getting introduced and disturb the communication. They also prevent the signal from getting tapped
by unwanted receivers.

You might also like