DCCN Notes Unit1
DCCN Notes Unit1
Communication Media and Data Transmission: Fourier Analysis – Analog and Digital Data Transmission
– Modulation and Demodulation – Transmission Media – Wireless Communications – Data Transmission
Basics – Transmission Mode – Interfacing – Multiplexing.
Error Detection and Correction: Types of Errors – Error Detection – Error Correction. Data Link Control
and Protocol Concepts: Flow Control – Error Control – Asynchronous Protocols – Synchronous Protocols
– High-Level Data Link Control (HDLC).
Bit synchronization: The physical layer provides the synchronization of the bits by providing a
clock. This clock controls both sender and receiver thus providing synchronization at the bit level.
Bit rate control: The Physical layer also defines the transmission rate i.e. the number of bits sent
per second.
Physical topologies: Physical layer specifies how the different, devices/nodes are arranged in a
network i.e. bus, star, or mesh topology.
Transmission mode: Physical layer also defines how the data flows between the two connected
devices. The various transmission modes possible are Simplex, half-duplex and full-duplex.
The data link layer refers to the technologies used to connect two machines across a network
where the physical layer already exists. It manages data frames, which are digital signals encapsulated
into data packets. Flow control and error control of data are often key focuses of the data link layer.
Ethernet is an example of a standard at this level. The data link layer is often split into two sub-layers: the
Media Access Control (MAC) layer and Logical Link Control (LLC) layer.
Functions of the Data Link Layer
Framing: Framing is a function of the data link layer. It provides a way for a sender to transmit a
set of bits that are meaningful to the receiver. This can be accomplished by attaching special bit
patterns to the beginning and end of the frame.
Physical addressing: After creating frames, the Data link layer adds physical addresses (MAC
addresses) of the sender and/or receiver in the header of each frame.
Error control: The data link layer provides the mechanism of error control in which it detects
and retransmits damaged or lost frames.
Flow Control: The data rate must be constant on both sides else the data may get corrupted thus,
flow control coordinates the amount of data that can be sent before receiving an acknowledgment.
Access control: When a single communication channel is shared by multiple devices,the MAC
sub-layer of the data link layer helps to determine which device has control over the channel at
The network layer is concerned with concepts such as routing, forwarding, and addressing across
a dispersed network or multiple connected networks of nodes or machines. The network layer may also
manage flow control. Across the internet, the Internet Protocol v4 (IPv4) and IPv6 are used as the main
network layer protocols.
Data Link
Node to Node Delivery of Message. Frame Switch, Bridge
2 Layer
Layer Information Device or
No Layer Name Responsibility Form(Data Unit) Protocol
TCP/IP model
o The TCP/IP model was developed prior to the OSI model.
o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer, network layer,
data link layer and physical layer.
o The first four layers provide physical standards, network interface, internetworking, and transport
functions that correspond to the first four layers of the OSI model and these four layers are
represented in TCP/IP model by a single layer called the application layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of them provides
specific functionality.
Here, hierarchical means that each upper-layer protocol is supported by two or more lower-level
protocols.
Internet Layer
IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP suite.
o IP Addressing: This protocol implements logical host addresses known as IP addresses. The IP
addresses are used by the internet and higher layers to identify the device and to provide
internetwork routing.
o Host-to-host communication: It determines the path through which the data is to be transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the transport layer
protocol. An IP protocol ensures that the data is sent and received securely, it encapsulates the
data into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data link
layer protocol is known as Maximum Transmission unit (MTU). If the size of IP datagram is
greater than the MTU unit, then the IP protocol splits the datagram into smaller units so that they
can travel over the local network. Fragmentation can be done by the sender or intermediate router.
At the receiver side, all the fragments are reassembled to form an original message.
o Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN, it is
known as direct delivery. When source and destination are on the distant network, then the IP
datagram is sent indirectly. This can be accomplished by routing the IP datagram through various
devices such as routers.
ARP Protocol
ICMP Protocol
Transport Layer
The transport layer is responsible for the reliability, flow control, and correction of data which is being
sent over the network.
The two protocols used in the transport layer are User Datagram protocol and Transmission control
protocol.
Application Layer
Communication Services
There are various Communication Services available that offer exchange of information with individuals
or groups. The following table gives a brief introduction to these services:
ElectronicMail
1
Used to send electronic message over the internet.
Telnet
2
Used to log on to a remote computer that is attached to internet.
Newsgroup
3
Offers a forum for people to discuss topics of common interests.
InternetRelayChat(IRC)
4
Allows the people from all over the world to communicate in real time.
MailingLists
5 Used to organize group of internet users to share common information
through e-mail.
InternetTelephony(VoIP)
6 Allows the internet users to talk across internet to any PC equipped to
receive the call.
InstantMessaging
7
Offers real time chat between individuals and group of people. Eg. Yahoo messenger, MSN messenger.
FileTransferProtocol(FTP)
1
Enable the users to transfer files.
Archie
2 It’s updated database of public FTP sites and their content. It helps to
search a file by its name.
Gopher
3
Used to search, retrieve, and display documents on remote sites.
Web Services
Web services allow exchange of information between applications on the web. Using web services,
applications can easily interact with each other.
WWW is also known as W3. It offers a way to access documents spread over the several servers over the
internet. These documents may contain texts, graphics, audio, video, hyperlinks. The hyperlinks allow the
users to navigate between the documents.
Video Conferencing
The Internet Protocol (IP) is a protocol, or set of rules, for routing and addressing packets of data so that
they can travel across networks and arrive at the correct destination. Data traversing the Internet is
divided into smaller pieces, called packets. IP information is attached to each packet, and this information
helps routers to send packets to the right place. Every device or domain that connects to the Internet is
assigned an IP address, and as packets are directed to the IP address attached to them, data arrives where
it is needed.
Once the packets arrive at their destination, they are handled differently depending on which transport
protocol is used in combination with IP. The most common transport protocols are TCP and UDP.
TCP is a connection oriented protocol and offers end-to-end packet delivery. It acts as back bone for
connection.
Transmission Control Protocol (TCP) corresponds to the Transport Layer of OSI Model.
TCP is a reliable and connection oriented protocol.
UDP is connectionless and unreliable protocol. It doesn’t require making a connection with the
host to exchange data. Since UDP is unreliable protocol, there is no mechanism for ensuring that
data sent is received.
FTP is used to copy files from one host to another. FTP offers the mechanism for the same in following
manner:
FTP creates two processes such as Control Process and Data Transfer Process at both ends i.e. at
client as well as at server.
FTP establishes two different connections: one is for data transfer and other is for control
information.
Telnet
Telnet is a protocol used to log in to remote computer on the internet. There are a number of
Telnet clients having user friendly user interface.
Hyper Text Transfer Protocol (HTTP)
Fourier analysis:
The Fourier series decomposes a periodic function as a sum of sine and cosine components as expressed
below:
c is a constant
2DigitalCommunication:
In digital communication digital signal is used rather than analog signal for communication in between
the source and destination. The digital signal consists of discrete values rather than continuous values. In
digital communication physical transfer of data occurs in the form of digital bit stream i.e 0 or 1 over
a point-to-point or point-to-multipoint transmission medium. In digital communication the digital
transmission data can be broken into packets as discrete messages which is not allowed in analog
communication.
The below figure illustrates the Digital Communication System:
Difference between Analog Communication and Digital Communication:
S .No. ANALOG COMMUNICATION DIGITAL COMMUNICATION
Analog communication uses analog signal Digital communication uses digital signal
02. whose amplitude varies continuously with whose amplitude is of two levels either Low
time from 0 to 100. i.e., 0 or either High i.e., 1.
It gets affected by noise highly during It gets affected by noise less during
03. transmission through communication transmission through communication
channel. channel.
Separating out noise and signal in analog Separating out noise and signal in digital
08.
communication is not possible. communication is possible.
S .No. ANALOG COMMUNICATION DIGITAL COMMUNICATION
11. Analog communication system is low cost. Digital communication system is high cost.
16. Not assures an accurate data transmission. It assures a more accurate data transmission.
The process of superimposing a message signal on a carrier signal so that the message can be
transmitted over long distances is called modulation. Here, the carrier signal is the signal of high
frequency which is used to carry the message signal. The following figure shows the block diagram of
modulation.
The modulation of a signal is performed at the transmitting end in the communication system with the
help of a modulator circuit (a part of modem). In the modulation, a specific parameter, i.e. amplitude,
frequency or phase, of the carrier signal is altered in accordance with the modulating signal or message
signal. After modulation, the modulated signal is transmitted over the communication channel by a
transmitter.
The common types of modulation that are being extensively used in data communication are − amplitude
modulation, frequency modulation, phase modulation, polarization modulation, pulse code
modulation, quadrature amplitude modulation, etc.
The modulation process is widely used in transmission of signals using electromagnetic waves, radio
waves, optics (in fiber optics), etc.
What is Demodulation?
The process of obtaining the original message from the modulated signal is called demodulation. In
simple words, demodulation is the process of separating a message signal from a carrier signal. The
process of demodulation is shown in the following block diagram.
The electronic circuit that is used to perform the demodulation process is called demodulator, it is the part
of the modem. The process of demodulation is performed at the receiver end of a communication system.
Modulation and demodulation are the basic processes involved in data communication. There are many
differences between modulation and demodulation that are highlighted in the following table −
Basis of Modulation Demodulation
Difference
TRANSMISSION MEDIA
o Transmission media is a communication channel that carries the information from the sender to the
receiver. Data is transmitted through the electromagnetic signals.
o The main functionality of the transmission media is to carry the information in the form of bits
through LAN(Local Area Network).
o It is a physical path between transmitter and receiver in data communication.
o In a copper-based network, the bits in the form of electrical signals.
o In a fibre based network, the bits in the form of light pulses.
o In OSI(Open System Interconnection) phase, transmission media supports the Layer 1. Therefore, it
is considered to be as a Layer 1 component.
o The electrical signals can be sent through the copper wire, fibre optics, atmosphere, water, and
vacuum.
o The characteristics and quality of data transmission are determined by the characteristics of medium
and signal.
o Transmission media is of two types are wired media and wireless media. In wired media, medium
characteristics are more important whereas, in wireless media, signal characteristics are more
important.
o Different transmission media have different properties such as bandwidth, delay, cost and ease of
installation and maintenance.
o The transmission media is available in the lowest layer of the OSI reference model, i.e., Physical
layer.
Wireless communication :
Wireless communication involves the transmission of information over a distance without the help of
wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and
communicating between two or more devices using a wireless signal through wireless communication
technologies and devices.
The evolution of wireless technology has brought many advancements with its effective features.
The transmitted distance can be anywhere between a few meters (for example, a television's
remote control) and thousands of kilometers (for example, radio communication).
Wireless communication can be used for cellular telephony, wireless access to the internet,
wireless home networking, and so on.
Other examples of applications of radio wireless technology include GPS units, garage door
openers, wireless computer mice, keyboards and headsets, headphones, radio receivers, satellite
television, broadcast television and cordless telephones.
Wireless - Advantages
Wireless communication involves transfer of information without any physical connection between two
or more points. Because of this absence of any 'physical infrastructure', wireless communication has
certain advantages. This would often include collapsing distance or space.
Wireless communication has several advantages; the most important ones are discussed below −
Cost effectiveness
Wired communication entails the use of connection wires. In wireless networks, communication does not
require elaborate physical infrastructure or maintenance practices. Hence the cost is reduced.
Example − Any company providing wireless communication services does not incur a lot of costs, and as
a result, it is able to charge cheaply with regard to its customer fees.
Flexibility
Wireless communication enables people to communicate regardless of their location. It is not necessary to
be in an office or some telephone booth in order to pass and receive messages.
Miners in the outback can rely on satellite phones to call their loved ones, and thus, help improve their
general welfare by keeping them in touch with the people who mean the most to them.
Convenience
Wireless communication devices like mobile phones are quite simple and therefore allow anyone to use
them, wherever they may be. There is no need to physically connect anything in order to receive or pass
messages.
Example − Wireless communications services can also be seen in Internet technologies such as Wi-Fi.
With no network cables hampering movement, we can now connect with almost anyone, anywhere,
anytime.
Speed
Improvements can also be seen in speed. The network connectivity or the accessibility were much
improved in accuracy and speed.
Example − A wireless remote can operate a system faster than a wired one. The wireless control of a
machine can easily stop its working if something goes wrong, whereas direct operation can’t act so fast.
Accessibility
The wireless technology helps easy accessibility as the remote areas where ground lines can’t be properly
laid, are being easily connected to the network.
Example − In rural regions, online education is now possible. Educators no longer need to travel to far-
flung areas to teach their lessons. Thanks to live streaming of their educational modules.
Constant connectivity
Constant connectivity also ensures that people can respond to emergencies relatively quickly.
Example − A wireless mobile can ensure you a constant connectivity though you move from place to
place or while you travel, whereas a wired land line can’t.
DATA TRANSMISSION :
o The way in which data is transmitted from one device to another device is known as transmission
mode.
o The transmission mode is also known as the communication mode.
o Each communication channel has a direction associated with it, and transmission media provide the
direction. Therefore, the transmission mode is also known as a directional mode.
o The transmission mode is defined in the physical layer.
The Transmission mode is divided into three categories:
o Simplex mode
o Half-duplex mode
o Full-duplex mode
Simplex mode
o In Simplex mode, the communication is unidirectional, i.e., the data flow in one direction.
o A device can only send the data but cannot receive it or it can receive the data but cannot send the
data.
o This transmission mode is not very popular as mainly communications require the two-way
exchange
of data. The simplex mode is used in the business field as in sales that do not require any
corresponding reply.
o The radio station is a simplex channel as it transmits the signal to the listeners but never
o allows them to transmit back.
o Keyboard and Monitor are the examples of the simplex mode as a keyboard can only accept the
o data from the user and monitor can only be used to display the data on the screen.
o The main advantage of the simplex mode is that the full capacity of the communication channel
o can be utilized during transmission.
Half-Duplex mode
o In a Half-duplex channel, direction can be reversed, i.e., the station can transmit and receive
o the data as well.
o Messages flow in both the directions, but not at the same time.
o The entire bandwidth of the communication channel is utilized in one direction at a time.
o In half-duplex mode, it is possible to perform the error detection, and if any error occurs,
o then the receiver requests the sender to retransmit the data.
o A Walkie-talkie is an example of the Half-duplex mode. In Walkie-talkie, one party speaks,
o and another party listens. After a pause, the other speaks and first party listens.
o Speaking simultaneously will create the distorted sound which cannot be understood.
Full-duplex mode
o In Full duplex mode, the communication is bi-directional, i.e., the data flow in both the directions.
o Both the stations can send and receive the message simultaneously.
o Full-duplex mode has two simplex channels. One channel has traffic moving in one
o direction, and another channel has traffic flowing in the opposite direction.
o The Full-duplex mode is the fastest mode of communication between devices.
o The most common example of the full-duplex mode is a telephone network.
o When two people are communicating with each other by a telephone line, both can talk
o and listen at the same time.
Send/Receive A device can only send Both the devices can Both the devices can send and
the data but cannot send and receive the receive the data simultaneously.
receive it or it can only data, but one at a
receive the data but time.
cannot send it.
Performance The performance of half- The performance of The Full-duplex mode has better
duplex mode is better full-duplex mode is performance among simplex
than the simplex mode. better than the half- and half-duplex mode as it
duplex mode. doubles the utilization of the
capacity of the communication
channel.
The basis of functions of each and every layered structure is to provide a service to the layer above it.
An entity is an active element in each and every layer, It can be either a software entity or hardware entity.
Example of software entity − Process.
The entities and layer n implement services for the (n+1) which is above the nth layer to
layer n which provides services is called services provider and layer (n+1) which takes
They are available at the interfaces of n and n+1 layer. Services are available at SAP’s that means the layer
n SAPs are those placed at the interfaces where layer n+1 access the service being offered.
For the successful exchange of information between two layers, a set of rules about the interfaces should be
presented, the layer (n+1) entity passes an IDU to the layer and entity through the SAP. IDU contains
mainly two parts: ICI and SDU.
SDU − Services Data Unit is a part of IDU, The SDU is the information which is passed across two
networks from peer network to peer entity and then goes to the help layer (n+1).
ICI − ICI contains the control information which is necessary to help the lower layer n to do the
necessary job.
Protocol data unit
In order to transfer the SDU the layer n entity has to divide into many smaller pieces. Each pieces in given
header is buying the entities to their peer protocol as shown in below figure
What is Multiplexing?
Multiplexing is a technique used to combine and send the multiple data streams over a single medium. The proce
known as multiplexing and hardware used for multiplexing is known as a multiplexer.
Multiplexing is achieved by using a device called Multiplexer (MUX) that combines n input lines to generate a sing
many-to-one, i.e., n input lines and one output line.
Demultiplexing is achieved by using a device called Demultiplexer (DEMUX) available at the receiving end.
component signals (one input and n outputs). Therefore, we can say that demultiplexing follows the one-to-many ap
Why Multiplexing?
ADVERTISEMENT
ADVERTISEMENT
o The transmission medium is used to send the signal from sender to receiver. The medium can only have one
o If there are multiple signals to share one medium, then the medium must be divided in such a way that each
available bandwidth. For example: If there are 10 signals and bandwidth of medium is100 units, then the 10
o When multiple signals share the common medium, there is a possibility of collision. Multiplexing concept i
o Transmission services are very expensive.
History of Multiplexing
o Multiplexing technique is widely used in telecommunications in which several telephone calls are carried th
o Multiplexing originated in telegraphy in the early 1870s and is now widely used in communication.
o George Owen Squier developed the telephone carrier multiplexing in 1910.
Concept of Multiplexing
o The 'n' input lines are transmitted through a multiplexer and multiplexer combines the signals to form a com
o The composite signal is passed through a Demultiplexer and demultiplexer separates a signal to componen
respective destinations.
Advantages of Multiplexing:
Multiplexing Techniques
Multiplexing techniques can be classified as:
o It is an analog technique.
o Frequency Division Multiplexing is a technique in which the available bandwidth of a single
o transmission medium is subdivided into several channels.
o In the above diagram, a single transmission medium is subdivided into several frequency
o channels, and each frequency channel is given to different devices.
o Device 1 has a frequency channel of range from 1 to 5.
o The input signals are translated into frequency bands by using modulation techniques,
o The main aim of the FDM is to subdivide the available bandwidth into different frequency
o Using the modulation technique, the input signals are transmitted into frequency
bands and then combined to form a composite signal.
o The carriers which are used for modulating the signals are known as sub-carriers.
o They are represented as f1,f2..fn.
o FDM is mainly used in radio broadcasts and TV networks.
Advantages Of FDM:
Disadvantages Of FDM:
Applications Of FDM:
o Wavelength Division Multiplexing is same as FDM except that the optical signals are
o It is a digital technique.
o In Frequency Division Multiplexing Technique, all signals operate at the same time
o In Time Division Multiplexing technique, the total time available in the channel
o is distributed among different users. Therefore, each user is allocated with different
o time interval known as a Time slot at which data is to be transmitted by the sender.
o A user takes control of the channel for a fixed amount of time.
o In Time Division Multiplexing technique, data is not transmitted simultaneously rather
o the data is transmitted one-by-one.
o In TDM, the signal is transmitted in the form of frames. Frames contain a cycle of time
o slots in which each frame contains one or more slots dedicated to each user.
o It can be used to multiplex both digital and analog signals but mainly used to multiplex digital signals.
o Synchronous TDM
o Asynchronous TDM
Synchronous TDM
In the above figure, the Synchronous TDM technique is implemented. Each device is allocated
with some time slot. The time slots are transmitted irrespective of whether the sender has data to send or not.
o The capacity of the channel is not fully utilized as the empty slots are also transmitted
o which is having no data. In the above figure, the first frame is completely filled, but in the
o last two frames, some slots are empty. Therefore, we can say that the capacity of the channel
o is not utilized efficiently.
o The speed of the transmission medium should be greater than the total speed of the input lines.
o An alternative approach to the Synchronous TDM is Asynchronous Time Division Multiplexing.
Asynchronous TDM
o An asynchronous TDM is also known as Statistical TDM.
o An asynchronous TDM is a technique in which time slots are not fixed as in the case of
o Synchronous TDM. Time slots are allocated to only those devices which have the data
o to send. Therefore, we can say that Asynchronous Time Division multiplexor transmits o
o nly the data from active workstations.
o An asynchronous TDM technique dynamically allocates the time slots to the devices.
o In Asynchronous TDM, total speed of the input lines can be greater than the capacity of the channel.
o Asynchronous Time Division multiplexor accepts the incoming data streams and creates a
o frame that contains only data with no empty slots.
o In Asynchronous TDM, each slot contains an address part that identifies the source of the data.
o The difference between Asynchronous TDM and Synchronous TDM is that many slots
o in Synchronous TDM are unutilized, but in Asynchronous TDM, slots are fully utilized. This leads to
efficient utilization of the capacity of the channel.
o In Synchronous TDM, if there are n sending devices, then there are n time slots.
o In Asynchronous TDM, if there are n sending devices, then there are m time slots
o where m is less than n (m<n).
o The number of slots in a frame depends on the statistical analysis of the number of input lines.
In the above diagram, there are 4 devices, but only two devices are sending the data, i.e., A and C. Therefore, the d
through the transmission line.
Error Detection
When data is transmitted from one device to another device, the system does not guarantee whether the data
received by the device is identical to the data transmitted by another device. An Error is a situation when
the message received at the receiver end is not identical to the message transmitted.
Types Of Errors
Errors can be classified into two categories:
o Single-Bit Error
o Burst Error
Single-Bit Error:
The only one bit of a given data unit is changed from 1 to 0 or from 0 to 1.
In the above figure, the message which is sent is corrupted as single-bit, i.e., 0 bit is changed to 1.
Single-Bit Error does not appear more likely in Serial Data Transmission. For example, Sender sends the
data at 10 Mbps, this means that the bit lasts only for 1 ?s and for a single-bit error to occurred, a noise must
be more than 1 ?s.
Single-Bit Error mainly occurs in Parallel Data Transmission. For example, if eight wires are used to send
the eight bits of a byte, if one of the wire is noisy, then single-bit is corrupted per byte.
Burst Error:
The two or more bits are changed from 0 to 1 or from 1 to 0 is known as Burst Error.
The Burst Error is determined from the first corrupted bit to the last corrupted bit.
The duration of noise in Burst Error is more than the duration of noise in Single-Bit.
o Single Parity checking is the simple mechanism and inexpensive to detect the errors.
o In this technique, a redundant bit is also known as a parity bit which is appended at the end of the
data unit so that the number of 1s becomes even. Therefore, the total number of transmitted bits
would be 9 bits.
o If the number of 1s bits is odd, then parity bit 1 is appended and if the number of 1s bits is even,
then parity bit 0 is appended at the end of the data unit.
o At the receiving end, the parity bit is calculated from the received data bits and compared with the
received parity bit.
o This technique generates the total number of 1s even, so it is known as even-parity checking.
Drawbacks Of Single Parity Checking
o It can only detect single-bit errors which are very rare.
o If two bits are interchanged, then it cannot detect the errors.
o Performance can be improved by using Two-Dimensional Parity Check which organizes the data
in the form of a table.
o Parity check bits are computed for each row, which is equivalent to the single-parity check.
o In Two-Dimensional Parity check, a block of bits is divided into rows, and the redundant row of bits
is added to the whole block.
o At the receiving end, the parity bits are compared with the parity bits computed from the received
data.
Drawbacks Of 2D Parity Check
o If two bits in one data unit are corrupted and two bits exactly the same position in another data unit
are also corrupted, then 2D Parity checker will not be able to detect the error.
o This technique cannot be used to detect the 4-bit errors or more in some cases.
Checksum
Checksum Generator
A Checksum is generated at the sending side. Checksum generator subdivides the data into equal segments
of n bits each, and all these segments are added together by using one's complement arithmetic. The sum is
complemented and appended to the original data, known as checksum field. The extended data is
transmitted across the network.
Suppose L is the total sum of the data segments, then the checksum would be ?L
The Sender follows the given steps:
The block unit is divided into k sections, and each of n bits.
All the k sections are added together by using one's complement to get the sum.
The sum is complemented and it becomes the checksum field.
The original data and checksum field are sent across the network.
Checksum Checker
A Checksum is verified at the receiving side. The receiver subdivides the incoming data into equal
segments of n bits each, and all these segments are added together, and then this sum is complemented. If
the complement of the sum is zero, then the data is accepted otherwise data is rejected.
o In CRC technique, a string of n 0s is appended to the data unit, and this n number is less than the
number of bits in a predetermined number, known as division which is n+1 bits.
o Secondly, the newly extended data is divided by a divisor using a process is known as binary
division. The remainder generated from this division is known as CRC remainder.
o Thirdly, the CRC remainder replaces the appended 0s at the end of the original data. This newly
generated unit is sent to the receiver.
o The receiver receives the data followed by the CRC remainder. The receiver will treat this whole
unit as a single unit, and it is divided by the same divisor that was used to find the CRC remainder.
If the resultant of this division is zero which means that it has no error, and the data is accepted.
If the resultant of this division is not zero which means that the data consists of an error. Therefore, the data
is discarded.
Let's understand this concept through an example:
CRC Generator
o A CRC generator uses a modulo-2 division. Firstly, three zeroes are appended at the end of the data
as the length of the divisor is 4 and we know that the length of the string 0s to be appended is
always one less than the length of the divisor.
o Now, the string becomes 11100000, and the resultant string is divided by the divisor 1001.
o The remainder generated from the binary division is known as CRC remainder. The generated value
of the CRC remainder is 111.
o CRC remainder replaces the appended string of 0s at the end of the data unit, and the final string
would be 11100111 which is sent across the network.
CRC Checker
o The functionality of the CRC checker is similar to the CRC generator.
o When the string 11100111 is received at the receiving end, then CRC checker performs the modulo-
2 division.
o A string is divided by the same divisor, i.e., 1001.
o In this case, CRC checker generates the remainder of zero. Therefore, the data is accepted.
Data link control and protocol concepts:
Flow control:
Data Link Control is the service provided by the Data Link Layer to provide reliable data
transfer over the physical medium. For example, In the half-duplex transmission mode, one
device can only transmit the data at a time. If both the devices at the end of the links transmit
the data simultaneously, they will collide and leads to the loss of the information.
The Data link layer provides the coordination among the devices so that no collision occurs.
o Line discipline
o Flow Control
o Error Control
Line Discipline
o Line Discipline is a functionality of the Data link layer that provides the coordination
o among the link systems. It determines which device can send, and when it can send the data.
o ENQ/ACK
o Poll/select
END/ACK
END/ACK stands for Enquiry/Acknowledgement is used when there is no wrong receiver
available on the link and having a dedicated path between the two devices so that the device
END/ACK coordinates which device will start the transmission and whether the recipient is ready or not.
Working of END/ACK
The transmitter transmits the frame called an Enquiry (ENQ) asking whether the receiver is
The receiver responses either with the positive acknowledgement(ACK) or with the
receiver is ready to receive the transmission and negative acknowledgement means that the
o If the response to the ENQ is positive, the sender will transmit its data, and once
o all of its data has been transmitted, the device finishes its transmission with an EOT (
o END-of-Transmission) frame.
o If the response to the ENQ is negative, then the sender disconnects and restarts the
o transmission at another time.
o If the response is neither negative nor positive, the sender assumes that the ENQ
o frame was lost during the transmission and makes three attempts to establish
Poll/Select
The Poll/Select method of line discipline works with those topologies where one device is
Working of Poll/Select
o In this, the primary device and multiple secondary devices consist of a single transmission line,
o and all the exchanges are made through the primary device even though the destination is a
o secondary device.
o The primary device has control over the communication link, and the secondary device
o follows the instructions of the primary device.
o The primary device determines which device is allowed to use the communication channel.
o Therefore, we can say that it is an initiator of the session.
o If the primary device wants to receive the data from the secondary device, it asks the
o secondary device that they anything to send, this process is known as polling.
o If the primary device wants to send some data to the secondary device, then it tells the
o target secondary to get ready to receive the data, this process is known as selecting.
Select
o The select mode is used when the primary device has something to send.
o When the primary device wants to send some data, then it alerts the secondary device
o for the upcoming transmission by transmitting a Select (SEL) frame, one field of the
o frame includes the address of the intended secondary device.
o When the secondary device receives the SEL frame, it sends an acknowledgement that
o indicates the secondary ready status.
o If the secondary device is ready to accept the data, then the primary device sends
o two or more data frames to the intended secondary device. Once the data has been transmitted,
o the secondary sends an acknowledgement specifies that the data has been received.
Poll
o The Poll mode is used when the primary device wants to receive some data from the secondary device.
o When a primary device wants to receive the data, then it asks each device whether it has anything to
o send.
o Firstly, the primary asks (poll) the first secondary device, if it responds with the NACK
o (Negative Acknowledgement) means that it has nothing to send. Now, it approaches the
o second secondary device, it responds with the ACK means that it has the data to send.
o The secondary device can send more than one frame one after another or sometimes
o it may be required to send ACK before sending each one, depending on the type of the
o protocol being used.
Flow Control
o It is a set of procedures that tells the sender how much data it can transmit before the data overwhelms the r
o The receiving device has limited speed and limited memory to store the data. Therefore, the receiving
sending device to stop the transmission temporarily before the limits are reached.
o It requires a buffer, a block of memory for storing the information until they are processed.
o Stop-and-wait
o Sliding window
Stop-and-wait
o In the Stop-and-wait method, the sender waits for an acknowledgement after every frame it sends.
o When acknowledgement is received, then only next frame is sent. The process of alternately
o sending and waiting of a frame continues until the sender transmits the EOT (End of transmission) frame.
Advantage of Stop-and-wait
The Stop-and-wait method is simple as each frame is checked and acknowledged before the next frame is sent.
Disadvantage of Stop-and-wait
Stop-and-wait technique is inefficient to use as each frame must travel across all the way to the receiver,
and an acknowledgement travels all the way before the next frame is sent. Each frame sent and
Sliding Window
o The Sliding Window is a method of flow control in which a sender can transmit the several
o frames before getting an acknowledgement.
o In Sliding Window Control, multiple frames can be sent one after the another due to which
o capacity of the communication channel can be utilized efficiently.
o A single ACK acknowledge multiple frames.
o Sliding Window refers to imaginary boxes at both the sender and receiver end.
o The window can hold the frames at either end, and it provides the upper limit on the
o number of frames that can be transmitted before the acknowledgement.
o Frames can be acknowledged even when the window is not completely filled.
o The window has a specific size in which they are numbered as modulo-n means that
o they are numbered from 0 to n-1. For example, if n = 8, the frames are numbered
o from 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
o The size of the window is represented as n-1. Therefore, maximum n-1
o frames can be sent before acknowledgement.
o When the receiver sends the ACK, it includes the number of the next frame that
o it wants to receive. For example, to acknowledge the string of frames ending with
o frame number 4, the receiver will send the ACK containing the number 5.
o When the sender sees the ACK with the number 5, it got to know that the
o frames from 0 through 4 have been received.
Sender Window
o At the beginning of a transmission, the sender window contains n-1 frames, and
o when they are sent out, the left boundary moves inward shrinking the size of the window.
o For example, if the size of the window is w if three frames are sent out, then the number of
o frames left out in the sender window is w-3.
o Once the ACK has arrived, then the sender window expands to the number which
o will be equal to the number of frames acknowledged by ACK.
o For example, the size of the window is 7, and if frames 0 through 4 have been sent out
o and no acknowledgement has arrived, then the sender window contains only two
o frames, i.e., 5 and 6. Now, if ACK has arrived with a number 4 which means that 0 through
o 3 frames have arrived undamaged and the sender window is expanded to include the next four frames.
o Therefore, the sender window contains six frames (5,6,7,0,1,2).
Receiver Window
o At the beginning of transmission, the receiver window does not contain n frames, but it contains
o n-1 spaces for frames.
o When the new frame arrives, the size of the window shrinks.
o The receiver window does not represent the number of frames received, but it represents the
o number of frames that can be received before an ACK is sent. For example, the size of the
o window is w, if three frames are received then the number of spaces available in the window is (w-3).
o Once the acknowledgement is sent, the receiver window expands by the number equal to the
o number of frames acknowledged.
o Suppose the size of the window is 7 means that the receiver window contains seven spaces for
o seven frames. If the one frame is received, then the receiver window shrinks and moving
o the boundary from 0 to 1. In this way, window shrinks one by one, so window now contains
o the six spaces. If frames from 0 through 4 have sent, then the window contains two spaces
o before an acknowledgement is sent.
Error Control
Stop-and-wait ARQ
Stop-and-wait ARQ is a technique used to retransmit the data in case of damaged or lost frames.
This technique works on the principle that the sender will not transmit the next frame until it receives
o Damaged Frame: When the receiver receives a damaged frame, i.e., the frame contains an error,
o then it returns the NAK frame. For example, when the data 0 frame is sent, and then the receiver
o sends the ACK 1 frame means that the data 0 has arrived correctly, and transmits the data 1 frame.
o The sender transmits the next frame: data 1. It reaches undamaged, and the receiver returns ACK 0.
o The sender transmits the next frame: data 0. The receiver reports an error and returns the
o NAK frame. The sender retransmits the data 0 frame.
o Lost Frame: Sender is equipped with the timer and starts when the frame is transmitted.
o Sometimes the frame has not arrived at the receiving end so that it can be acknowledged
o neither positively nor negatively. The sender waits for acknowledgement until the timer goes off.
o If the timer goes off, it retransmits the last transmitted frame.
o In this case, the sender keeps the copies of all the transmitted frames until they have been
o acknowledged. Suppose the frames from 0 through 4 have been transmitted, and the last
o acknowledgement was for frame 2, the sender has to keep the copies of frames 3 and 4
o until they receive correctly.
o The receiver can send either NAK or ACK depending on the conditions. The NAK frame
o tells the sender that the data have been received damaged. Since the sliding window is a
o continuous transmission mechanism, both ACK and NAK must be numbered for the
o identification of a frame. The ACK frame consists of a number that represents the next frame
o which the receiver expects to receive. The NAK frame consists of a number that represents the
o damaged frame.
o The sliding window ARQ is equipped with the timer to handle the lost acknowledgements.
o Suppose then n-1 frames have been sent before receiving any acknowledgement.
o The sender waits for the acknowledgement, so it starts the timer and waits before
o sending any more. If the allotted time runs out, the sender retransmits one or all the frames
o depending upon the protocol used.
o Damaged Frame: When the frame is damaged, then the receiver sends a NAK frame.
In the above figure, three frames have been transmitted before an error discovered in the third frame.
In this case, ACK 2 has been returned telling that the frames 0,1 have been received successfully
without any error. The receiver discovers the error in data 2 frame, so it returns the NAK 2 frame.
The frame 3 is also discarded as it is transmitted after the damaged frame. Therefore, the sender
o Lost Data Frame: In Sliding window protocols, data frames are sent sequentially.
o If any of the frames is lost, then the next frame arrive at the receiver is out of sequence.
o The receiver checks the sequence number of each of the frame, discovers the frame
o that has been skipped, and returns the NAK for the missing frame. The sending device
o retransmits the frame indicated by NAK as well as the frames transmitted after the lost frame.
o Lost Acknowledgement: The sender can send as many frames as the windows allow before
o waiting for any acknowledgement. Once the limit of the window is reached, the sender
o has no more frames to send; it must wait for the acknowledgement. If the acknowledgement is lost,
o then the sender could wait forever. To avoid such situation, the sender is equipped with
o the timer that starts counting
o whenever the window capacity is reached. If the acknowledgement has not been received
o within the time limit, then the sender retransmits the frame since the last ACK.
Selective-Reject ARQ
Basic The transmission begins with the block It employs the start and stops bits to
header, which contains a bit sequence. precede and follow a character.
Data Unit Data is transmitted as frames in It transmits data one byte at a specific
synchronous transmission. time.
Storage It doesn't require any storage at the The local buffer storages are needed to
terminal end. construct blocks at both ends of the line in
asynchronous transmission.
Transmission The data transfer rate of synchronous The data transfer rate is slow.
speed transmission is fast.
Gap between the There is no gap between data in There is a gap between the data bytes, and
data Synchronous transmission due to the it has start and end bits between which
common clock pulse. actual data is present.
Time interval The time delay between two The time delay between two
transmissions is constant. transmissions is random.
Bits The start and stop bits are not utilized The start and stop bits are used to transmit
in data transmission. data with additional overhead.
Synchronized It doesn't require any synchronized It needs synchronized clocks at both ends.
clocks clocks.
Band Channels It mainly uses both voice-band and It mainly uses voice-band channels that
broad-band channels. have a limited type.
High-level Data Link Control (HDLC) is a group of communication protocols of the data link layer
for transmitting data between network points or nodes. Since it is a data link protocol, data is
organized into frames. A frame is transmitted via the network to the destination that verifies
its successful arrival. It is a bit - oriented protocol that is applicable for both point - to - point and
multipoint communications.
Transfer Modes
HDLC supports two types of transfer modes, normal response mode and asynchronous balanced mode.
Normal Response Mode (NRM) − Here, two types of stations are there, a primary station
that send commands and secondary station that can respond to received commands.
It is used for both point - to - point and multipoint communications.
HDLC is a bit - oriented protocol where each frame contains up to six fields. The structure varies
Flag − It is an 8-bit sequence that marks the beginning and the end of the frame. The bit pattern
of the flag is 01111110.
Address − It contains the address of the receiver. If the frame is sent by the primary station,
it contains the address(es) of the secondary station(s). If it is sent by the secondary station,
it contains the address of the primary station. The address field may be from 1 byte to several bytes.
Control − It is 1 or 2 bytes containing flow and error control information.
Payload − This carries the data from the network layer. Its length may vary from one network to another.
FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard code used is
CRC (cyclic redundancy code)
There are three types of HDLC frames. The type of frame is determined by the control field of the frame −
I-frame − I-frames or Information frames carry user data from the network layer.
They also include flow and error control information that is piggybacked on user data.
The first bit of control field of I-frame is 0.
S-frame − S-frames or Supervisory frames do not contain information field.
They are used for flow and error control when piggybacking is not required.
The first two bits of control field of S-frame is 10.
U-frame − U-frames or Un-numbered frames are used for myriad miscellaneous functions,
like link management. It may contain an information field, if required.
The first two bits of control field of U-frame is 11.