0% found this document useful (0 votes)
12 views

DCN I UNIT

Useful

Uploaded by

selvamuthu313
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

DCN I UNIT

Useful

Uploaded by

selvamuthu313
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Noble College of Arts and Science for Women, Palavanatham

(Affiliated to Madurai Kamaraj University


ISO 9001:2015 Certified Institution)
Academic Year – 2024-2025(Even Semester)
Department of Computer Science & BCA

DATA COMMUNICATIONS & COMPUTER NETWORKS -


SCSJC61

UNIT – I NOTES
UNIT – I

Introduction: A Brief History – Applications – Computer Networks – Categories of Networks – Standards


and Standards Organizations – Network Architecture – Open Systems and OSI Model – TCP/IP
Architecture.
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).

Unit I : Introduction – A Brief History

✓ A computer Network is a system in which a number of independent computers are linked


together to share data and peripherals, such as files and printers.

✓ In the modern world, computer networks have become almost indispensable. All major
businesses and governmental and educational institutions make use of computer networks
to such an extent that it is now difficult to imagine a world without them.

✓ Computer networks exist on various scales, from links between two computers in one
room to connecting computers in a building or campus to national and global networks.

✓ Various media are used to carry the communications signals: copper wire, fibre-optic
cables and wireless or radio transmissions etc.
✓ Similarly, the network connecting an organization‟s computers might be owned and
managed by the organization itself (typically in small-scale networks linking machines in
a room or building) or capacity can be rented from a firm providing telecommunications
services (typically in wider area networks).
✓ A network is a collection of computers connected to each other. The network allows
computers to communicate with each other and share resources and information. The
Advance Research Projects Agency (ARPA) designed "Advanced Research Projects
Agency Network" (ARPANET) for the United States Department of Defense. It was the
first computer network in the world in late 1960's and early 1970's.
✓ Computer networks can be discriminated into various types such as Client-Server,peer-to-
peer or hybrid, depending upon its architecture.
• There can be one or more systems acting as Server. Other being Client, requests the
Server to serve requests. Server takes and processes request on behalf of Clients.

• Two systems can be connected Point-to-Point, or in back-to-back fashion. They both


reside at the same level and called peers.

• There can be hybrid network which involves network architecture of both the above
types.
Applications of Computer Networks
Computer systems and peripherals are connected to form a network.They provide numerous
advantages:

• Resource sharing such as printers and storage devices

• Exchange of information by means of e-Mails and FTP

• Information sharing by using Web or Internet

• Interaction with other users using dynamic web pages

• IP phones

• Video conferences

• Parallel computing

• Instant messaging

Components of a computer network


A computer network is composed of:
• Hosts (PCs, laptops, handhelds)
• Routers & switches (IP router, Ethernet switch)
• Links (wired, wireless)
• Protocols (IP, TCP, CSMA/CD, CSMA/CA)
• Applications (network services)
• Humans and service agents
Types of Networks

The following list presents categories used for classifying networks.

✓ Based on their scale, networks can be classified as


1. Local Area Network (LAN),
2. Wide Area Network (WAN),
3. Metropolitan Area Network (MAN),
4. Personal Area Network (PAN),
5. Virtual Private Network (VPN) etc.

✓ Computer networks can also be classified according to the hardware and software
technology that is used to interconnect the individual devices in the network, such
as

1. Optical fiber,

2. Ethernet,

3. Wireless LAN,

4. Home PNA, or Power line communication.

✓ Ethernet uses physical wiring to connect devices. Frequently deployed devices


include hubs, switches, bridges and/or routers.
✓ Wireless LAN technology is designed to connect devices without wiring. These
devices use radio waves or infrared signals as a transmission medium.
✓ Computer networks may be classified according to the functional relationships
which exist among the elements of the network, e.g., Active Networking, Client-
server and Peer-to-peer (workgroup) architecture.

Network topology

✓ Computer networks may be classified according to the network topology upon


which the network is based, such as
1. Bus network,
2. Star network,
3. Ring network,
4. Mesh network,
5. Star- bus network,
6. Tree or Hierarchical topology network,

✓ Network Topology signifies the way in which devices in the network see their
logical relations to one another.
✓ The use of the term "logical" here is significant. That is, network topology is
independent of the "physical" layout of the network.
✓ Even if networked computers are physically placed in a linear arrangement, if
they are connected via a hub, the network has a Star topology, rather than a Bus
Topology.
✓ In this regard the visual and operational characteristics of a network are distinct;
the logical network topology is not necessarily the same as the physical layout.

Types of networks

Below is a list of the most common types of computer networks in order of scale.
Personal Area Network (PAN)
✓ A personal area network (PAN) is a computer network used for communication among
computer devices close to one person.

✓ Some examples of devices that are used in a PAN are printers, fax machines, telephones,
PDAs and scanners.

✓ The reach of a PAN is typically about 20-30 feet (approximately 6-9 meters), but this is
expected to increase with technology improvements.

✓ Personal area networks may be wired with computer buses such as USB and FireWire.

✓ A wireless personal area network (WPAN) can also be made possible with network
technologies such as IrDA and Bluetooth.

Local Area Network (LAN)

• This is a network covering a small geographic area, like a home, office, or building.
Current LANs are most likely to be based on Ethernet technology.
• For example, a library may have a wired or wireless LAN for users to interconnect local
devices (e.g., printers and servers) and to connect to the internet.
• On a wired LAN, PCs in the library are typically connected by category 5 (Cat5) cable,
running the IEEE 802.3 protocol through a system of interconnected devices and
eventually connect to the Internet.
• The cables to the servers are typically on Cat 5e enhanced cable, which will support IEEE
802.3 at 1 Gbit/s.
• A wireless LAN may exist using a different IEEE protocol, 802.11b, 802.11g or possibly
802.11n.
• The staff computers (bright green in the figure) can get to the color printer, checkout
records, and the academic network and the Internet.
• All user computers can get to the Internet and the card catalog. Each workgroup can get
to its local printer. Note that the printers are not accessible from outside their workgroup.

Campus Area Network (CAN)

• This is a network that connects two or more LANs but that is limited to a specific and
contiguous geographical area such as a college campus, industrial complex, office
building, or a military base.
• A CAN may be considered a type of MAN (metropolitan area network), but is generally
limited to a smaller area than a typical MAN.
• This term is most often used to discuss the implementation of networks for a contiguous
area.
• This should not be confused with a Controller Area Network. A LAN connects network
devices over a relatively short distance.
• A networked office building, school, or home usually contains a single LAN, though
sometimes one building will contain a few small LANs (perhaps one per room), and
occasionally a LAN will span a group of nearby buildings.
• In TCP/IP networking, a LAN is often but not always implemented as a single IP subnet.
Metropolitan Area Network (MAN)

• A Metropolitan Area Network is a network that connects two or more Local Area
Networks or Campus Area Networks together but does not extend beyond the boundaries
of the immediate town/city.
• Routers, switches and hubs are connected to create a Metropolitan Area Network.

Wide Area Network (WAN)

• A WAN is a data communications network that covers a relatively broad geographic area
(i.e. one city to another and one country to another country) and that often uses
transmission facilities provided by common carriers, such as telephone companies.
• WAN technologies generally function at the lower three layers of the OSI reference
model: the physical layer, the data link layer, and the network layer.

Global Area Network (GAN)

• Global Area networks (GAN) specifications are in development by several groups, and
there is no common definition.
• In general, however, a GAN is a model for supporting mobile communications across an
arbitrary number of wireless LANs, satellite coverage areas, etc.
• The key challenge in mobile communications is "handing off" the user communications
from one local coverage area to the next.
• In IEEE Project 802, this involves a succession of terrestrial Wireless local area networks
(WLAN).

ISO - OSI Reference Model

International Standards Organization (ISO) – Open Systems Interconnection (OSI) Reference


model is a framework for connecting computers on a network, The main principles applied to the
OSI layered architecture are

– each layer represents a layer of abstraction,

– each performs a set of well-defined functions,


– implementation of a layer should not affect adjacent layers, and inter-
layer communication should be minimized

OSI Model
Open System Interconnect is an open standard for all communication systems. OSI model is established
by International Standard Organization (ISO). This model has seven layers are:

• Application Layer: This layer is responsible for providing interface to the application
user. This layer encompasses protocols which directly interact with the user.

• Presentation Layer: This layer defines how data in the native format of remote host
should be presented in the native format of host.

• Session Layer: This layer maintains sessions between remote hosts. For example, once
user/password authentication is done, the remote host maintains this session for a while
and does not ask for authentication again in that time span.

• Transport Layer: This layer is responsible for end-to-end delivery between hosts.

• Network Layer: This layer is responsible for address assignment and uniquely
addressing hosts in a network.

• Data Link Layer: This layer is responsible for reading and writing data from and
onto the line. Link errors are detected at this layer.

• Physical Layer: This layer defines the hardware, cabling wiring, power output, pulse
rate etc.

Internet Model TCP/IP protocol


Internet uses TCP/IP protocol suite, also known as Internet suite. This defines Internet
Model which contains four layered architecture. OSI Model is general communication model
but Internet Model is what the internet uses for all its communication. The internet is
independent of its underlying network architecture so is its Model. This model has the following
layers:

• Application Layer: This layer defines the protocol which enables user to interact with
the network. For example, FTP, HTTP etc.

• Transport Layer: This layer defines how data should flow between hosts. Major
protocol at this layer is Transmission Control Protocol (TCP). This layer ensures data
delivered between hosts is in-order and is responsible for end-to-end delivery.
• Internet Layer: Internet Protocol (IP) works on this layer. This layer facilitates host
addressing and recognition. This layer defines routing.

• Link Layer: This layer provides mechanism of sending and receiving actual data.
Unlike its OSI Model counterpart, this layer is independent of underlying network
architecture and hardware.

COMMUNICATION MEDIA AND DATA TRANSMISSION:


Analog Transmission
To send the digital data over an analog media, it needs to be converted into analog signal.
There can be two cases according to data formatting.

1. Bandpass: The filters are used to filter and pass frequencies of interest. A bandpass is a
band of frequencies which can pass the filter.

2. Low-pass: Low-pass is a filter that passes low frequencies signals.

When digital data is converted into a bandpass analog signal, it is called digital-to-analog
conversion. When low-pass analog signal is converted into bandpass analog signal, it is called
analog-to-analog conversion.

Digital-to-Analog Conversion
✓ When data from one computer is sent to another via some analog carrier, it is first
converted into analog signals. Analog signals are modified to reflect digital data.

✓ An analog signal is characterized by its amplitude, frequency, and phase. There are
three kinds of digital-to-analog conversions:

1. Amplitude Shift Keying

In this conversion technique, the amplitude of analog carrier signal is modified to


reflect binary data.
When binary data represents digit 1, the amplitude is held; otherwise it is set to 0.
Both frequency and phase remain same as in the original carrier signal.

2. Frequency Shift Keying

In this conversion technique, the frequency of the analog carrier signal is modified to
reflect binary data.

This technique uses two frequencies, f1 and f2. One of them, for example f1, is chosen
to represent binary digit 1 and the other one is used to represent binary digit
0. Both amplitude and phase of the carrier wave are kept intact.

3. Phase Shift Keying

In this conversion scheme, the phase of the original carrier signal is altered to reflect the
binary data.

When a new binary symbol is encountered, the phase of the signal is altered. Amplitude
and frequency of the original carrier signal is kept intact.

3.1 Quadrature Phase Shift Keying

QPSK alters the phase to reflect two binary digits at once. This is done in two different
phases. The main stream of binary data is divided equally into two sub- streams. The
serial data is converted in to parallel in both sub-streams and then each stream is
converted to digital signal using NRZ technique. Later, both the digital signals are
merged together.

Analog-to-Analog Conversion
Analog signals are modified to represent analog data. This conversion is also known as Analog
Modulation. Analog modulation is required when bandpass is used. Analog to analog
conversion can be done in three ways:

1. Amplitude Modulation

In this modulation, the amplitude of the carrier signal is modified to reflect the analog
data.

Amplitude modulation is implemented by means of a multiplier. The amplitude of


modulating signal (analog data) is multiplied by the amplitude of carrier frequency,
which then reflects analog data.

The frequency and phase of carrier signal remain unchanged.

2. Frequency Modulation

In this modulation technique, the frequency of the carrier signal is modified to reflect the
change in the voltage levels of the modulating signal (analog data).
The amplitude and phase of the carrier signal are not altered.

3. Phase Modulation

In the modulation technique, the phase of carrier signal is modulated in order to reflect
the change in voltage (amplitude) of analog data signal.

Phase modulation is practically similar to Frequency Modulation, but in Phase


modulation frequency of the carrier signal is not increased. Frequency of carrier is signal
is changed (made dense and sparse) to reflect voltage change in the amplitude of
modulating signal.

Digital Transmission
✓ Data or information can be stored in two ways, analog and digital. For a computer to use
the data, it must be in discrete digital form.Similar to data, signals can also be in analog
and digital form.

✓ To transmit data digitally, it needs to be first converted to digital form.


Digital-to-Digital Conversion

This section explains how to convert digital data into digital signals. It can be done in two
ways, line coding and block coding. For all communications, line coding is necessary whereas
block coding is optional.

1. Line Coding

The process for converting digital data into digital signal is said to be Line Coding. Digital data
is found in binary format.It is represented (stored) internally as series of 1s and 0s.

Digital signal is denoted by discreet signal, which represents digital data.There are three types
of line coding schemes available:

1.1 Uni-polar Encoding


Unipolar encoding schemes use single voltage level to represent data. In this case, to represent
binary 1, high voltage is transmitted and to represent 0, no voltage is transmitted. It is also
called Unipolar-Non-return-to-zero, because there is no rest condition i.e. it either represents 1
or 0.
1.2 Polar Encoding
Polar encoding scheme uses multiple voltage levels to represent binary values. Polar encodings
is available in four types:

4. Polar Non-Return to Zero (Polar NRZ)

It uses two different voltage levels to represent binary values. Generally, positive
voltage represents 1 and negative value represents 0. It is also NRZ because there is no
rest condition.
NRZ scheme has two variants: NRZ-L and NRZ-I.

NRZ-L changes voltage level at when a different bit is encountered whereas NRZ-I
changes voltage when a 1 is encountered.

5. Return to Zero (RZ)


Problem with NRZ is that the receiver cannot conclude when a bit ended and when the
next bit is started, in case when sender and receiver‟s clock are not synchronized.
RZ uses three voltage levels, positive voltage to represent 1, negative voltage to
represent 0 and zero voltage for none. Signals change during bits not between bits.

6. Manchester
This encoding scheme is a combination of RZ and NRZ-L. Bit time is divided into two
halves. It transits in the middle of the bit and changes phase when a different bit is
encountered.

7. Differential Manchester
This encoding scheme is a combination of RZ and NRZ-I. It also transit at the middle of
the bit but changes phase only when 1 is encountered.

1.3 Bipolar Encoding


Bipolar encoding uses three voltage levels, positive, negative and zero. Zero voltage represents
binary 0 and bit 1 is represented by altering positive and negative voltages.

2. Block Coding

To ensure accuracy of the received data frame redundant bits are used. For example, in even-
parity, one parity bit is added to make the count of 1s in the frame even. This way the original
number of bits is increased. It is called Block Coding.
Block coding is represented by slash notation, mB/nB.Means, m-bit block is substituted with n-
bit block where n > m. Block coding involves three steps:

1. Division,

2. Substitution

3. Combination.

After block coding is done, it is line coded for transmission.

Analog-to-Digital Conversion

✓ Microphones create analog voice and camera creates analog videos, which are treated is
analog data. To transmit this analog data over digital signals, we need analog to digital
conversion.

✓ Analog data is a continuous stream of data in the wave form whereas digital data is
discrete. To convert analog wave into digital data, we use Pulse Code Modulation
(PCM).

✓ PCM is one of the most commonly used method to convert analog data into digital form.
It involves three steps:

1. Sampling

2. Quantization

3. Encoding.

Sampling
The analog signal is sampled every T interval. Most important factor in sampling is the rate at
which analog signal is sampled. According to Nyquist Theorem, the sampling rate must be at
least two times of the highest frequency of the signal.

Quantization

Sampling yields discrete form of continuous analog signal. Every discrete pattern shows the
amplitude of the analog signal at that instance. The quantization is done between the maximum
amplitude value and the minimum amplitude value. Quantization is approximation of the
instantaneous analog value.

Encoding

In encoding, each approximated value is then converted into binary format.

Transmission Modes

✓ The transmission mode decides how data is transmitted between two computers.The
binary data in the form of 1s and 0s can be sent in two different modes: Parallel and
Serial.
Parallel Transmission

✓ The binary bits are organized in-to groups of fixed length. Both sender and receiver are
connected in parallel with the equal number of data lines.
✓ Both computers distinguish between high order and low order data lines.
✓ The sender sends all the bits at once on all lines.Because the data lines are equal to the
number of bits in a group or data frame, a complete group of bits (data frame) is sent in
one go.
✓ Advantage of Parallel transmission is high speed and disadvantage is the cost of wires,
as it is equal to the number of bits sent in parallel.

Serial Transmission
✓ In serial transmission, bits are sent one after another in a queue manner. Serial
transmission requires only one communication channel.

Serial transmission can be either asynchronous or synchronous.

1.Asynchronous Serial Transmission


✓ It is named so because there‟is no importance of timing. Data-bits have specific pattern
and they help receiver recognize the start and end data bits.

✓ For example, a 0 is prefixed on every data byte and one or more 1s are added at the end.
Two continuous data-frames (bytes) may have a gap between them.

Synchronous Serial Transmission


✓ Timing in synchronous transmission has importance as there is no mechanism followed
to recognize start and end data bits.

✓ There is no pattern or prefix/suffix method. Data bits are sent in burst mode without
maintaining gap between bytes (8-bits).

✓ Single burst of data bits may contain a number of bytes. Therefore, timing becomes very
important.

✓ It is up to the receiver to recognize and separate bits into bytes. The advantage of
synchronous transmission is high speed, and it has no overhead of extra header and
footer bits as in asynchronous transmission.
✓ In a simplex transmission, one device acts as the transmitter and a second device acts as
the receiver.
✓ Data flows in one direction only, whereas in a duplex channel, the communication is bi-
directional. Full-duplex transmission uses two separate communication channels so that
two communicating devices can transmit and receive data at the same time.
✓ Data can flow in both directions simultaneously. Half-duplex transmission is a
compromise between simplex and full-duplex transmission.
✓ A single channel is shared between the devices wishing to communicate, and the devices
must take turns to transmit data. Data can flow in both directions, but not simultaneously.

TRANSMISSION MEDIA

The transmission media is nothing but the physical media over which communication takes
place in computer networks.

1. Magnetic Media
✓ One of the most convenient way to transfer data from one computer to another, even
before the birth of networking, was to save it on some storage media and transfer
physical from one station to another.

✓ Though it may seem old-fashion way in today‟s world of high speed internet, but when
the size of data is huge, the magnetic media comes into play.

✓ For example, a bank has to handle and transfer huge data of its customer, which stores a
backup of it at some geographically far-away place for security reasons and to keep it
from uncertain calamities.

✓ If the bank needs to store its huge backup data then its,transfer through internet is not
feasible. The WAN links may not support such high speed.Even if they do; the cost too
high to afford.

✓ In these cases, data backup is stored onto magnetic tapes or magnetic discs, and then
shifted physically at remote places.

2. Twisted Pair Cable


✓ A twisted pair cable is made of two plastic insulated copper wires twisted together to
form a single media.

✓ Out of these two wires, only one carries actual signal and another is used for ground
reference. The twists between wires are helpful in reducing noise (electro-magnetic
interference) and crosstalk.

There are two types of twisted pair cables:

1. Shielded Twisted Pair (STP) Cable

2. Unshielded Twisted Pair (UTP) Cable

• STP cables comes with twisted wire pair covered in metal foil. This makes it more indifferent
to noise and crosstalk.
• UTP has seven categories, each suitable for specific use. In computer networks, Cat-5, Cat-
5e, and Cat-6 cables are mostly used. UTP cables are connected by RJ45 connectors.

3. Coaxial Cable

• Coaxial cable has two wires of copper. The core wire lies in the center and it is made of
solid conductor.

• The core is enclosed in an insulating sheath.The second wire is wrapped around over the
sheath and that too in turn encased by insulator sheath.This all is covered by plastic
cover.

• Because of its structure,the coax cable is capable of carrying high frequency signals
than that of twisted pair cable.

• The wrapped structure provides it a good shield against noise and cross talk. Coaxial
cables provide high bandwidth rates of up to 450 mbps.

• There are three categories of coax cables namely, RG-59 (Cable TV), RG-58 (Thin
Ethernet), and RG-11 (Thick Ethernet). RG stands for Radio Government.

• Cables are connected using BNC connector and BNC-T. BNC terminator is used to
terminate the wire at the far ends.

Power Lines

• Power Line communication (PLC) is Layer-1 (Physical Layer) technology which uses
power cables to transmit data signals.

• In PLC, modulated data is sent over the cables. The receiver on the other end de-
modulates and interprets the data.

• Because power lines are widely deployed, PLC can make all powered devices controlled
and monitored. PLC works in half-duplex.

There are two types of PLC:

1. Narrow band PLC

2. Broad band PLC

• Narrow band PLC provides lower data rates up to 100s of kbps, as they work at
lower frequencies (3-5000 kHz).They can be spread over several kilometers.

• Broadband PLC provides higher data rates up to 100s of Mbps and works at higher
frequencies (1.8 – 250 MHz).They cannot be as much extended as Narrowband PLC.

Fiber Optics

• Fiber Optic works on the properties of light. When light ray hits at critical angle it tends
to refracts at 90 degree. This property has been used in fiber optic.

• The core of fiber optic cable is made of high quality glass or plastic. From one end of it
light is emitted, it travels through it and at the other end light detector detects light
stream and converts it to electric data.

• Fiber Optic provides the highest mode of speed. It comes in two modes, one is single
mode fiber and second is multimode fiber.

• Single mode fiber can carry a single ray of light whereas multimode is capable of
carrying multiple beams of light.

• Fiber Optic also comes in unidirectional and bidirectional capabilities. To connect and
access fiber optic special type of connectors are used. These can be Subscriber Channel
(SC), Straight Tip (ST), or MT-RJ.
Multiplexing

• Multiplexing is a technique by which different analog and digital streams of


transmission can be simultaneously processed over a shared link.
• Multiplexing divides the high capacity medium into low capacity logical medium which
is then shared by different streams.

• Communication is possible over the air (radio frequency), using a physical media
(cable), and light (optical fiber). All mediums are capable of multiplexing.

• When multiple senders try to send over a single medium, a device called Multiplexer
divides the physical channel and allocates one to each.

• On the other end of communication, a De- multiplexer receives data from a single
medium, identifies each, and sends to different receivers.

Frequency Division Multiplexing

• When the carrier is frequency, FDM is used. FDM is an analog technology. FDM
divides the spectrum or carrier bandwidth in logical channels and allocates one user to
each channel.
• Each user can use the channel frequency independently and has exclusive access of it.
All channels are divided in such a way that they do not overlap with each other.
• Channels are separated by guard bands. Guard band is a frequency which is not used by
either channel.
Time Division Multiplexing

• TDM is applied primarily on digital signals but can be applied on analog signals as well.
In TDM the shared channel is divided among its user by means of time slot.
• Each user can transmit data within the provided time slot only. Digital signals are
divided in frames, equivalent to time slot i.e. frame of an optimal size which can be
transmitted in given time slot.

• TDM works in synchronized mode. Both ends, i.e. Multiplexer and De-multiplexer are
timely synchronized and both switch to next channel simultaneously.

• When channel A transmits its frame at one end,the De-multiplexer provides media to
channel A on the other end.As soon as the channel A‟s time slot expires, this side
switches to channel B.
• On the other end, the De-multiplexer works in a synchronized manner and provides
media to channel B. Signals from different channels travel the path in interleaved
manner.

Wavelength Division Multiplexing

• Light has different wavelength (colors). In fiber optic mode, multiple optical carrier
signals are multiplexed into an optical fiber by using different wavelengths.
• This is an analog multiplexing technique and is done conceptually in the same manner
as FDM but uses light as signals.
• Further, on each wavelength time division multiplexing can be incorporated to
accommodate more data signals.

Code Division Multiplexing

• Multiple data signals can be transmitted over a single frequency by using Code Division
Multiplexing.
• FDM divides the frequency in smaller channels but CDM allows its users to full
bandwidth and transmit signals all the time using a unique code.
• CDM uses orthogonal codes to spread signals.

• Each station is assigned with a unique code, called chip. Signals travel with these codes
independently, inside the whole bandwidth.

• The receiver knows in advance the chip code signal it has to receive.

ERROR DETECTION AND CORRECTION

✓ There are many reasons such as noise, cross-talk etc., which may help data to get corrupted
during transmission.
✓ The upper layers work on some generalized view of network architecture and are not aware
of actual hardware data processing.
✓ Hence, the upper layers expect error-free transmission between the systems. Most of the
applications would not function expectedly if they receive erroneous data.
✓ Applications such as voice and video may not be that affected and with some errors they
may still function well.
✓ Data-link layer uses some error control mechanism to ensure that frames (data bit streams)
are transmitted with certain level of accuracy.
✓ But to understand how errors is controlled, it is essential to know what types of errors may
occur.

Types of Errors

There may be three types of errors:


• Single bit error

In a frame, there is only one bit, anywhere though, which is corrupt.


• Multiple bits error

Frame is received with more than one bits in corrupted state.


• Burst error

Frame contains more than1 consecutive bits corrupted.


Error control mechanism may involve two possible ways:
• Error detection
• Error correction

Error Detection

✓ Errors in the received frames are detected by means of Parity Check and Cyclic
Redundancy Check (CRC).
✓ In both cases, few extra bits are sent along with actual data to confirm that bits received
at other end are same as they were sent.
✓ If the counter-check at receiver‟ end fails, the bits are considered corrupted.
Parity Check
✓ One extra bit is sent along with the original bits to make number of 1s either even in
case of even parity, or odd in case of odd parity.

✓ The sender while creating a frame counts the number of 1s in it.

✓ For example, if even parity is used and number of 1s is even then one bit with value 0 is
added. This way number of 1s remains even.If the number of 1s is odd, to make it even a
bit with value 1 is added.

✓ The receiver simply counts the number of 1s in a frame.

✓ If the count of 1s is even and even parity is used, the frame is considered to be not-
corrupted and is accepted. If the count of 1s is odd and odd parity is used, the frame is
still not corrupted.
✓ If a single bit flips in transit, the receiver can detect it by counting the number of 1s. But
when more than one bits are erro neous, then it is very hard for the receiver to detect the
error.

Cyclic Redundancy Check (CRC)


✓ CRC is a different approach to detect if the received frame contains valid data. This
technique involves binary division of the data bits being sent.
✓ The divisor is generated using polynomials. The sender performs a division operation on
the bits being sent and calculates the remainder.
✓ Before sending the actual bits, the sender adds the remainder at the end of the actual bits.
Actual data bits plus the remainder is called a codeword. The sender transmits data bits
as codewords.
✓ At the other end, the receiver performs division operation on codewords using the same
CRC divisor.

✓ If the remainder contains all zeros the data bits are accepted, otherwise it is considered
as there some data corruption occurred in transit.

Error Correction

In the digital world, error correction can be done in two ways:


• Backward Error Correction When the receiver detects an error in the data received, it
requests back the sender to retransmit the data unit.
• Forward Error Correction When the receiver detects some error in the data received,
it executes error-correcting code, which helps it to auto-recover and to correct some
kinds of errors.
➢ The first one, Backward Error Correction, is simple and can only be efficiently used where
retransmitting is not expensive. For example, fiber optics. But in case of wireless
transmission retransmitting may cost too much. In the latter case, Forward Error Correction
is used.
➢ To correct the error in data frame, the receiver must know exactly which bit in the frame is
corrupted. To locate the bit in error, redundant bits are used as parity bits for error detection.
For example, we take ASCII words (7 bits data), then there could be 8 kind of information
we need: first seven bits to tell us which bit is error and one more bit to tell that there is no
error.
➢ For m data bits, r redundant bits are used. r bits can provide 2r combinations of information.
In m+r bit codeword, there is possibility that the r bits themselves may get corrupted. So the
number of r bits used must inform about m+r bit locations plus no-error information, i.e.
m+r+1.

DATA LINK CONTROL AND PROTOCOL CONCEPTS

Flow Control

✓ When a data frame (Layer-2 data) is sent from one host to another over a single medium,
it is required that the sender and receiver should work at the same speed.

✓ That is, sender sends at a speed on which the receiver can process and accept the data.

✓ What if the speed (hardware/software) of the sender or receiver differs? If sender is


sending too fast the receiver may be overloaded, (swamped) and data may be lost.

Two types of mechanisms can be deployed to control the flow:


1. Stop and Wait

✓ This flow control mechanism forces the sender after transmitting a data frame to
stop and wait until the acknowledgement of the data-frame sent is received.
2. Sliding Window
✓ In this flow control mechanism, both sender and receiver agree on the number of
data-frames after which the acknowledgement should be sent.
✓ As we learnt, stop and wait flow control mechanism wastes resources, this
protocol tries to make use of underlying resources as much as possible.

Error Control
✓ When data-frame is transmitted, there is a probability that data-frame may be lost in the
transit or it is received corrupted.
✓ In both cases, the receiver does not receive the correct data-frame and sender does not
know anything about any loss.
✓ In such case, both sender and receiver are equipped with some protocols which helps
them to detect transit errors such as loss of data-frame.
✓ Hence, either the sender retransmits the data-frame or the receiver may request to resend
the previous data-frame.
Requirements for error control mechanism:
• Error detection - The sender and receiver, either both or any, must ascertain that there
is some error in the transit.
• Positive ACK - When the receiver receives a correct frame, it should acknowledge it.
• Negative ACK - When the receiver receives a damaged frame or a duplicate frame, it
sends a NACK back to the sender and the sender must retransmit the correct frame.
• Retransmission: The sender maintains a clock and sets a timeout period. If an
acknowledgement of a data-frame previously transmitted does not arrive before the
timeout the sender retransmits the frame, thinking that the frame or it‟s
acknowledgement is lost in transit.
There are three types of techniques available which Data-link layer may deploy to control the
errors by Automatic Repeat Requests (ARQ):

• Stop-and-wait ARQ
The following transition may occur in Stop-and-Wait ARQ:

o The sender maintains a timeout counter.


o When a frame is sent, the sender starts the timeout counter.
o If acknowledgement of frame comes in time, the sender transmits the next frame
in queue.
o If acknowledgement does not come in time, the sender assumes that either the
frame or its acknowledgement is lost in transit. Sender retransmits the frame and
starts the timeout counter.
o If a negative acknowledgement is received, the sender retransmits the frame.
• Go-Back-N ARQ
✓ Stop and wait ARQ mechanism does not utilize the resources at their best.
✓ When the acknowledgement is received, the sender sits idle and does nothing.
✓ In Go-Back-N ARQ method, both sender and receiver maintain a window.
✓ The sending-window size enables the sender to send multiple frames without
receiving the acknowledgement of the previous ones.
✓ The receiving-window enables the receiver to receive multiple frames and
acknowledge them.
✓ The receiver keeps track of incoming frame‟s sequence number.
✓ When the sender sends all the frames in window, it checks up to what sequence
number it has received positive acknowledgement.
✓ If all frames are positively acknowledged, the sender sends next set of frames.
✓ If sender finds that it has received NACK or has not receive any ACK for a
particular frame, it retransmits all the frames after which it does not receive any
positive ACK.

• Selective Repeat ARQ


✓ In Go-back-N ARQ, it is assumed that the receiver does not have any buffer
space for its window size and has to process each frame as it comes.
✓ This enforces the sender to retransmit all the frames which are not
acknowledged.
✓ In Selective-Repeat ARQ, the receiver while keeping track of sequence numbers,
buffers the frames in memory and sends NACK for only frame which is missing
or damaged.
✓ The sender in this case, sends only packet for which NACK is received.

PROTOCOLS

✓ A protocol is a set of rules which governs how data is sent from one point to
another. In data communications, there are widely accepted protocols for sending
data.

✓ Both the sender and receiver must use the same protocol when communicating.

Asynchronous Transmission

✓ The asynchronous protocol evolved early in the history of telecommunications. It became


popular with the invention of the early tele-typewriters that were used to send telegrams
around the world.
✓ Asynchronous systems send data bytes between the sender and receiver by
packaging the data in an envelope.

✓ This envelope helps transport the character across the transmission link that
separates the sender and receiver.

✓ The transmitter creates the envelope, and the receiver uses the envelope to
extract the data. Each character (data byte) the sender transmits is preceded
with a start bit, and suffixed with a stop bit.

✓ These extra bits serve to synchronize the receiver with the sender.

✓ In asynchronous serial transmission, each character is packaged in an envelope,


and sent across a single wire, bit by bit, to a receiver.

✓ Because no signal lines are used to convey clock (timing) information, this
method groups data together into a sequence of bits (five - eight), then prefixes
them with a start bit and appends the data with a stop bit.

✓ The purpose of the start and stop bits was introduced for the old
electromechanical Tele-typewriters.

✓ These used motors driving cams that actuated solenoids that sampled the signal
at specific time intervals.

✓ The motors took a while to get up to speed, thus by prefixing the first data bit
with a start bit, this gave time for the motors to get up to speed. The cams
generate a reference point for the start of the first data bit.

It's important to realize that the receiver


and sender are re-synchronized each time a
character arrives. What that means is that
the motors/cams are restarted each time a
start bit arrives at the receiver.

Nowadays, electronic clocks that provide


the timing sequences necessary to decode
the incoming signal have replaced the
electromechanical motors.

✓ This method of transmission is suitable for slow speeds less than about 32000
bits per second.
✓ In addition, notice that the signal that is sent does not contain any information
that can be used to validate if it was received without modification.
✓ This means that this method does not contain error detection information, and
is susceptible to errors.
✓ In addition, for every character that is sent, an additional two bits is also sent.
Consider the sending of a text document which contains 1000 characters.

✓ Each character is eight bits, thus the total number of bits sent are 10000 (8 bits
per character plus a start and stop bit for each character).

✓ This 10000 bits is actually 1250 characters, meaning that an additional 250
equivalent characters are sent due to the start and stop bits.

✓ This represents a large overhead in sending data, clearly making this method
an inefficient means of sending large amounts of data.

Synchronous Transmission

✓ One of the problems associated with asynchronous transmission is the high


overhead associated with transmitting data.
✓ For instance, for every character of 8 bits transmitted, at least an additional
overhead of 2 bits is required. For large amounts of data, this quickly adds up.
✓ For example, to transmit 1000 characters, this requires 12000 bits, an extra
2000 bits for the start and stops. This is equivalent to an overhead of 250
characters.
✓ Another problem is the complete lack of any form of error detection. This
means the sender has no method of knowing whether the receiver is correctly
recognizing the data being transmitted.

✓ In synchronous transmission, greater efficiency is achieved by grouping


characters together, and doing away with the start and stop bits for each
character.

✓ We still envelop the information in a similar way as before, but this time we
send more characters between the start and end sequences.

✓ In addition, the start and stop bits are replaced with a new format that permits
greater flexibility. An extra ending sequence is added to perform error
checking.

✓ A start type sequence, called a header, prefixes each block of characters, and a
stop type sequence, called a tail, suffixes each block of characters.

✓ The tail is expanded to include a check code, inserted by the transmitter, and
used by the receiver to determine if the data block of characters was received
without errors.

✓ In this way, synchronous transmission overcomes the two main deficiencies of


the asynchronous method, that of inefficiency and lack of error detection.
✓ There are variations of synchronous transmission, which are split into two
groups, namely character orientated and bit orientated.

✓ In character orientated, information is encoded as characters. In bit orientated,


information is encoded using bits or combinations of bits, and is thus more
complex than the character orientated version.

✓ Binary synchronous is an example of character orientated, and High Level Data


Link Control (HDLC) is an example of bit orientated.

✓ In asynchronous transmission, if there was no data to transmit, nothing was


sent. We relied on the start bit to start the motor and thus begin the preparation
to decode the incoming character.

✓ However, in synchronous transmission, because the start bit has been dropped,
the receiver must be kept in a state of readiness. This is achieved by sending a
special code by the transmitter whenever it has no data to send.

In bit orientated protocols, the line idle state


is changed to 7E, which synchronizes the
receiver to the sender. The start and stop
bits are removed, and each character is
combined with others into a data packet.

User data is prefixed with a header field,


and suffixed with a trailer field which
includes a checksum value (used by the
receiver to check for errors in sending).

✓ The header field is used to convey address information (sender and receiver),
packet type and control data.
✓ The data field contains the users data (if it can't fit in a single packet, then use
multiple packets and number them). Generally, it has a fixed size.
✓ The tail field contains checksum information which the receiver uses to check
whether the packet was corrupted during transmission.

High Level Link Control (HDLC) Protocol

✓ The HDLC protocol is a general purpose protocol which operates at the data
link layer of the OSI reference model.
✓ The protocol uses the services of a physical layer, and provides either a best
effort or reliable communications path between the transmitter and receiver
(i.e. with acknowledged data transfer).
✓ The type of service provided depends upon the HDLC mode which is used.
✓ Each piece of data is encapsulated in an HDLC frame by adding a trailer and a
header.

✓ The header contains an HDLC address and an HDLC control field. The trailer
is found at the end of the frame, and contains a Cyclic Redundancy Check
(CRC) which detects any errors which may occur during transmission.

✓ The frames are separated by HDLC flag sequences which are transmitted
between each frame and whenever there is no data to be transmitted.

HDLC Frame Structure showing flags, header (address and control), data and trailer
(CRC- 16).

You might also like