CN - Unit 1-Notes
CN - Unit 1-Notes
1. Performance: It can be measured in many ways, including transmit time and response
time. Transit time is the amount of time required for a message to travel from one
device to another. Response time is the elapsed time between an inquiry and a
response. The performance of the network depends on a number of factors, including
the number of users, the type of medium & hardware
2. Reliability: In the addition to accuracy is measured by frequency of failure, the time it
takes a link to recover from failure, and the network’s robustness in catastrophe.
3. Security: Network security issues include protecting data from unauthorized access,
protecting data from damage and development, and implementing policies and
procedures for recovery from breaches and data loss.
Goal Of Networking:
• Programs do not have to execute on a single system because of resource and load
sharing.
• Reduced costs – Multiple machines can share printers, tape drives, and other
peripherals.
• Reliability – If one machine fails, another can take its place.
• Scalability (it’s simple to add more processors or computers)
• Communication and mail (people living apart can work together)
• Information Access (remote information access, access to the internet, e-mail, video
conferencing, and online shopping)
• Entertainment that is interactive (online games, videos, etc.)
• Social Networking
Types of Networks
• Wired Network: As we all know, “wired” refers to any physical medium made up of
cables. Copper wire, twisted pair, or fiber optic cables are all options. A wired network
employs wires to link devices to the Internet or another network, such as laptops or
desktop PCs.
• Wireless Network: “Wireless” means without wire, media that is made up of
electromagnetic waves (EM Waves) or infrared waves. Antennas or sensors will be
present on all wireless devices. Cellular phones, wireless sensors, TV remotes,
satellite disc receivers, and laptops with WLAN cards are all examples of wireless
devices. For data or voice communication, a wireless network uses radio frequency
waves rather than wires.
2. Local Area Network (LAN): A LAN is a network that covers an area of around 10
kilometers. For example, a college network or an office network. Depending upon
the needs of the organization, a LAN can be a single office, building, or Campus.
We can have two PCs and one printer in-home office or it can extend throughout a
company and include audio and video devices. Each host in LAN has an identifier,
an address that defines hists in LAN. A packet sent by the host to another host
carries both the source host’s and the destination host’s address.
3. Metropolitan Area Network (MAN): MAN refers to a network that covers an entire
city. For example: consider the cable television network.
4. Wide Area Network (WAN): WAN refers to a network that connects countries or
continents. For example, the Internet allows users to access a distributed system
called www from anywhere around the globe.WAN interconnects connecting
devices such as switches, routers, or modems. A LAN is normally privately owned
by an organization that uses it. We see two distinct examples of WANs today:
point-to-point WANs and Switched WANs
Components of Hardware:
Components of Software:
1. System software :Operating systems like Windows, macOS, Android and iOS
are examples of system software.
2. Utility software : Security programs include anti-virus software that scans and
removes viruses.
Data Communication :
Data communications refers to the transmission of this digital data between two or more
computers and a computer network or data network is a telecommunications network that
allows computers to exchange data.
7. IP(Internet Protocol): Do You ever wonder how does computer determine which
packet belongs to which device. What happens if the message you sent to your friend
is received by your father? Scary Right. Well! IP is responsible for handling the
address of the destination computer so that each packet is sent to its proper
destination.
Some other popular protocols act as co-functioning protocols associated with these primary
protocols for core functioning. These are:
Analog transmission conveys voice, data, image, signal, or video information using an
information signal that is continuously varying; digital transmission transfers data over a
transmission medium discretely.
Transmission Impairments :
Transmission impairment occurs when the received signal is different from the transmitted
signal. As we know, a signal can be transmitted as Analog signal or it can be transmitted as a
digital signal.
In Analog signals due to transmission impairment the resulting received signal gets different
amplitude or the shape. In the case of digitally transmitted signals at the receiver side we get
changes in bits (0's or 1's).
Causes
There are various causes of transmission impairments −
• Noise
• Distortion
• Attenuation
Noise
Noise is the major factor for the transmission distortion as any unwanted signal gets added to
the transmitted signal by which the resulting transmitted signal gets modified and at the receiver
side it is difficult to remove the unwanted noise signal. These noises are various kinds like shot
noise, impulse noise, thermal noise etc.
Distortion
is mainly appearing in case of composite signals in which a composite signal has various
frequency components in it and each frequency component has some time constraint which
makes a complete signal.
Attenuation
Attenuation is generally decreased in signal strength, by which the received signal will be
difficult to receive at the receiver end. This attenuation happens due to the majority factor by
environment as environment imposes a lot of resistance and the signal strength decreases as it
tries to overcome the resistance imposed.
The above picture shows that the signal loses power at its travels time.
Attenuation is diagrammatically represented as follows
o The main aim of the layered architecture is to divide the design into small pieces.
o Each lower layer adds its services to the higher layer to provide a full set of services to
manage communications and run the applications.
o It provides modularity and clear interfaces, i.e., provides interaction between
subsystems.
o It ensures the independence between layers by providing the services from lower to
higher layer without defining how the services are implemented. Therefore, any
modification in a layer will not affect the other layers.
o The number of layers, functions, contents of each layer will vary from network to
network. However, the purpose of each layer is to provide the service from lower to a
higher layer and hiding the details from the layers of how the services are implemented.
o The basic elements of layered architecture are services, protocols, and interfaces.
o Service: It is a set of actions that a layer provides to the higher layer.
o Protocol: It defines a set of rules that a layer uses to exchange the information
with peer entity. These rules mainly concern about both the contents and order of
the messages used.
o Interface: It is a way through which the message is transferred from one layer to
another layer.
o In a layer n architecture, layer n on one machine will have a communication with the
layer n on another machine and the rules used in a conversation are known as a layer-n
protocol.
• OSI stands for Open Systems Interconnection. It has been developed by ISO –
‘International Organization for Standardization‘, in the year 1984.
• It is a 7 layer architecture with each layer having specific functionality to perform.
• All these 7 layers work collaboratively to transmit the data from one person to
another across the globe.
1. Physical Layer (Layer 1) :
The lowest layer of the OSI reference model is the physical layer. It is responsible for the
actual physical connection between the devices. The physical layer contains information in the
form of bits. It is responsible for transmitting individual bits from one node to the next. When
receiving data, this layer will get the signal received and convert it into 0s and 1s and send
them to the Data Link layer, which will put the frame back together.
The data link layer is responsible for the node-to-node delivery of the message. The main
function of this layer is to make sure data transfer is error-free from one node to another, over
the physical layer. When a packet arrives in a network, it is the responsibility of DLL to
transmit it to the Host using its MAC address.
Data Link Layer is divided into two sublayers:
1. Logical Link Control (LLC)
2. Media Access Control (MAC)
The packet received from the Network layer is further divided into frames depending on the
frame size of NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s
MAC address in the header.
The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol)
request onto the wire asking “Who has that IP address?” and the destination host will reply
with its MAC address.
The network layer works for the transmission of data from one host to the other located in
different networks. It also takes care of packet routing i.e. selection of the shortest path to
transmit the packet, from the number of routes available. The sender & receiver’s IP
addresses are placed in the header by the network layer.
The functions of the Network layer are :
1. Routing: The network layer protocols determine which route is suitable from source to
destination. This function of the network layer is known as routing.
2. Logical Addressing: In order to identify each device on internetwork uniquely, the
network layer defines an addressing scheme. The sender & receiver’s IP addresses
are placed in the header by the network layer. Such an address distinguishes each
device uniquely and universally.
* Segment in Network layer is referred to as Packet.
** Network layer is implemented by networking devices such as
routers.
The transport layer provides services to the application layer and takes services from the
network layer. The data in the transport layer is referred to as Segments. It is responsible
for the End to End Delivery of the complete message. The transport layer also provides
the acknowledgement of the successful data transmission and re-transmits the data if an
error is found.
At sender’s side: Transport layer receives the formatted data from the upper layers,
performs Segmentation, and also implements Flow & Error control to ensure proper
data transmission. It also adds Source and Destination port numbers in its header and
forwards the segmented data to the Network Layer.
Note: The sender needs to know the port number associated with the receiver’s application.
Generally, this destination port number is configured, either by default or manually. For
example, when a web application makes a request to a web server, it typically uses port
number 80, because this is the default port assigned to web applications. Many applications
have default ports assigned.
At receiver’s side: Transport Layer reads the port number from its header and forwards the
Data which it has received to the respective application. It also performs sequencing and
reassembling of the segmented data.
The functions of the transport layer are as follows:
1. Segmentation and Reassembly: This layer accepts the message from the (session)
layer, and breaks the message into smaller units. Each of the segments produced has a
header associated with it. The transport layer at the destination station reassembles the
message.
2. Service Point Addressing: In order to deliver the message to the correct process, the
transport layer header includes a type of address called service point address or port
address. Thus by specifying this address, the transport layer makes sure that the message
is delivered to the correct process.
The services provided by the transport layer :
A. Connection-Oriented Service: It is a three-phase process that includes
– Connection Establishment
– Data Transfer
– Termination / disconnection
In this type of transmission, the receiving device sends an acknowledgement, back to the
source after a packet or group of packets is received. This type of transmission is reliable and
secure.
B. Connectionless service: It is a one-phase process and includes Data Transfer. In this
type of transmission, the receiver does not acknowledge receipt of a packet. This approach
allows for much faster communication between devices. Connection-oriented service is more
reliable than connectionless Service.
* Data in the Transport Layer is called as Segments.
** Transport layer is operated by the Operating System. It is a part of the OS and
communicates with the Application Layer by making system calls.
Transport Layer is called as Heart of OSI model.
Scenario:
Let us consider a scenario where a user wants to send a message through some Messenger
application running in his browser. The “Messenger” here acts as the application layer which
provides the user with an interface to create the data. This message or so-called Data is
compressed, encrypted (if any secure data), and converted into bits (0’s and 1’s) so that it can
be transmitted.
The presentation layer is also called the Translation layer. The data from the application
layer is extracted here and manipulated as per the required format to transmit over the
network.
The functions of the presentation layer are :
• Translation: For example, ASCII to EBCDIC.
• Encryption/ Decryption: Data encryption translates the data into another form or
code. The encrypted data is known as the ciphertext and the decrypted data is known
as plain text. A key value is used for encrypting as well as decrypting data.
• Compression: Reduces the number of bits that need to be transmitted on the network.
The OSI Model we just looked at is just a reference/logical model. It was designed to
describe the functions of the communication system by dividing the communication
procedure into smaller and simpler components. But when we talk about the TCP/IP
model, it was designed and developed by Department of Defense (DoD) in 1960s and is
based on standard protocols. It stands for Transmission Control Protocol/Internet
Protocol. The TCP/IP model is a concise version of the OSI model. It contains four layers,
unlike seven layers in the OSI model. The layers are:
Difference between TCP/IP and OSI Model:
TCP/IP OSI
TCP refers to
Transmission Control OSI refers to Open Systems
Protocol. Interconnection.
TCP/IP follow a
horizontal approach. OSI follows a vertical approach.
This layer corresponds to the combination of Data Link Layer and Physical Layer of the OSI
model. It looks out for hardware addressing and the protocols present in this layer allows for
the physical transmission of data.
We just talked about ARP being a protocol of Internet layer, but there is a conflict about
declaring it as a protocol of Internet Layer or Network access layer. It is described as residing
in layer 3, being encapsulated by layer 2 protocols.
2. Internet Layer –
This layer parallels the functions of OSI’s Network layer. It defines the protocols which are
responsible for logical transmission of data over the entire network. The main protocols
residing at this layer are :
1. IP – stands for Internet Protocol and it is responsible for delivering packets from the
source host to the destination host by looking at the IP addresses in the packet
headers. IP has 2 versions:
IPv4 and IPv6. IPv4 is the one that most of the websites are using currently. But IPv6
is growing as the number of IPv4 addresses are limited in number when compared to
the number of users.
2. ICMP – stands for Internet Control Message Protocol. It is encapsulated within IP
datagrams and is responsible for providing hosts with information about network
problems.
3. ARP – stands for Address Resolution Protocol. Its job is to find the hardware address
of a host from a known IP address. ARP has several types: Reverse ARP, Proxy ARP,
Gratuitous ARP and Inverse ARP.
3. Host-to-Host Layer –
This layer is analogous to the transport layer of the OSI model. It is responsible for end-to-
end communication and error-free delivery of data. It shields the upper-layer applications
from the complexities of data. The two main protocols present in this layer are :
1. Transmission Control Protocol (TCP) – It is known to provide reliable and error-free
communication between end systems. It performs sequencing and segmentation of
data. It also has acknowledgment feature and controls the flow of the data through flow
control mechanism. It is a very effective protocol but has a lot of overhead due to such
features. Increased overhead leads to increased cost.
2. User Datagram Protocol (UDP) – On the other hand does not provide any such
features. It is the go-to protocol if your application does not require reliable transport as
it is very cost-effective. Unlike TCP, which is connection-oriented protocol, UDP is
connectionless.
4. Application Layer –
This layer performs the functions of top three layers of the OSI model: Application,
Presentation and Session Layer. It is responsible for node-to-node communication and
controls user-interface specifications. Some of the protocols present in this layer are:
HTTP, HTTPS, FTP, TFTP, Telnet, SSH, SMTP, SNMP, NTP, DNS, DHCP, NFS, X
Window, LPD. Have a look at Protocols in Application Layer for some information about
these protocols. Protocols other than those present in the linked article are :
1. HTTP and HTTPS – HTTP stands for Hypertext transfer protocol. It is used by the
World Wide Web to manage communications between web browsers and servers.
HTTPS stands for HTTP-Secure. It is a combination of HTTP with SSL(Secure Socket
Layer). It is efficient in cases where the browser need to fill out forms, sign in,
authenticate and carry out bank transactions.
2. SSH – SSH stands for Secure Shell. It is a terminal emulations software similar to
Telnet. The reason SSH is more preferred is because of its ability to maintain the
encrypted connection. It sets up a secure session over a TCP/IP connection.
3. NTP – NTP stands for Network Time Protocol. It is used to synchronize the clocks on
our computer to one standard time source. It is very useful in situations like bank
transactions. Assume the following situation without the presence of NTP. Suppose
you carry out a transaction, where your computer reads the time at 2:30 PM while the
server records it at 2:28 PM. The server can crash very badly if it’s out of sync.
The arrangement of a network that comprises nodes and connecting lines via sender and
receiver is referred to as network topology. The various network topologies are:
1. Mesh Topology:
In a mesh topology, every device is connected to another device via a particular channel. In
Mesh Topology, the protocols used are AHCP (Ad Hoc Configuration Protocols), DHCP
(Dynamic Host Configuration Protocol), etc.
Figure 1: Every device is connected with another via dedicated channels. These channels are
known as links.
• Suppose, the N number of devices are connected with each other in a mesh topology, the
total number of ports that are required by each device is N-1. In Figure 1, there are 5 devices
connected to each other, hence the total number of ports required by each device is 4. Total
number of ports required=N*(N-1).
• Suppose, N number of devices are connected with each other in a mesh topology, then the
total number of dedicated links required to connect them is NC2 i.e. N(N-1)/2. In Figure 1,
there are 5 devices connected to each other, hence the total number of links required is
5*4/2 = 10.
2. Star Topology:
In star topology, all the devices are connected to a single hub through a cable. This hub is the
central node and all other nodes are connected to the central node. The hub can be passive in
nature i.e., not an intelligent hub such as broadcasting devices, at the same time the hub can be
intelligent known as an active hub. Active hubs have repeaters in them. Coaxial cable or RJ-45
cables are used to connect the computers. In Star Topology, many popular Ethernet LAN
protocols are used as CD(Collision Detection), CSMA (Carrier Sense Multiple Access), etc.
Figure 2: A star topology having four systems connected to a single point of connection i.e. hub.
• If N devices are connected to each other in a star topology, then the number of cables
required to connect them is N. So, it is easy to set up.
• Each device requires only 1 port i.e. to connect to the hub, therefore the total number of
ports required is N.
• It is Robust. If one link fails only that link will affect and not other than that.
• Easy to fault identification and fault isolation.
• Star topology are cost-effective as it uses inexpensive coaxial cable.
• If the concentrator (hub) on which the whole topology relies fails, the whole system will crash
down.
• The cost of installation is high.
• Performance is based on the single concentrator i.e. hub.
3. Bus Topology:
Bus topology is a network type in which every computer and network device is connected to a
single cable. It transmits the data from one end to another in a single direction. No bi-directional
feature is in bus topology. It is a multi-point connection and a non-robust topology because if the
backbone fails the topology crashes. In Bus Topology, various MAC (Media Access Control)
protocols are followed by LAN ethernet connections like TDMA, Pure Aloha, CDMA, Slotted
Aloha, etc.
Figure 3: A bus topology with shared backbone cable. The nodes are connected to the channel
via drop lines.
• If N devices are connected to each other in a bus topology, then the number of cables
required to connect them is 1, which is known as backbone cable, and N drop lines are
required.
• Coaxial or twisted pair cables are mainly used in bus based networks that support up to 10
Mbps.
• The cost of the cable is less compared to other topologies, but it is used to build small
networks.
• Bus topology is familiar technology as installation and troubleshooting techniques are well
known.
4. Ring Topology:
In this topology, it forms a ring connecting devices with exactly two neighboring devices.
A number of repeaters are used for Ring topology with a large number of nodes, because if
someone wants to send some data to the last node in the ring topology with 100 nodes, then the
data will have to pass through 99 nodes to reach the 100th node. Hence to prevent data loss
repeaters are used in the network.
The data flows in one direction, i.e.., it is unidirectional, but it can be made bidirectional by
having 2 connections between each Network Node, it is called Dual Ring Topology. In-Ring
Topology, the Token Ring Passing protocol is used by the workstations to transmit the data.
Figure 4: A ring topology comprises 4 stations connected with each forming a ring.
The most common access method of ring topology is token passing.
• Token passing : It is network access method in which token is passed from one node ton
another node.
1. One station is known as a monitor station which takes all the responsibility to perform the
operations.
2. To transmit the data, the station has to hold the token. After the transmission is done, the
token is to be released for other stations to use.
3. When no station is transmitting the data, then the token will circulate in the ring.
4. There are two types of token release techniques: Early token release releases the token
just after transmitting the data and Delay token release releases the token after the
acknowledgment is received from the receiver.
• The failure of a single node in the network can cause the entire network to fail.
• Troubleshooting is difficult in this topology.
• The addition of stations in between or removal of stations can disturb the whole topology.
• Less secure.
5. Tree Topology :
This topology is the variation of the Star topology. This topology has a hierarchical flow of
data. In Tree Topology, SAC (Standard Automatic Configuration ) protocols like DHCP and SAC
are used.
Figure 5: In this, the various secondary hubs are connected to the central hub which contains
the repeater. This data flow from top to bottom i.e. from the central hub to the secondary and
then to the devices or from bottom to top i.e. devices to the secondary hub and then to the
central hub. It is a multi-point connection and a non-robust topology because if the backbone
fails the topology crashes.
• It allows more devices to be attached to a single central hub thus it decreases the distance
that is traveled by the signal to come to the devices.
• It allows the network to get isolated and also prioritize from different computers.
• We can add new device to existing network.
• The Error detection and error correction is very easy in tree topology.
6. Hybrid Topology :
This topology technology is the combination of all the various types of topologies we have
studied above. It is used when the nodes are free to take any form. It means these can be
individuals such as Ring or Star topology or can be a combination of various types of topologies
seen above. Each individual topology uses the protocol that has been discussed earlier.
Hybrid Topology
Figure 6: The above figure shows the structure of the Hybrid topology. As seen it contains a
combination of all different types of networks.
A transmission medium is a physical path between the transmitter and the receiver i.e. it
is the channel through which data is sent from one place to another.
1. Guided Media:
It is also referred to as Wired or Bounded transmission media. Signals being transmitted
are directed and confined in a narrow pathway by using physical links.
Features:
• High Speed
• Secure
• Used for comparatively shorter distances
It consists of 2 separately insulated conductor wires wound about each other. Generally,
several such pairs are bundled together in a protective sheath. They are the most widely
used Transmission Media. Twisted Pair is of two types:
UTP consists of two insulated copper wires twisted around one another. This type of cable
has the ability to block interference and does not depend on a physical shield for this
purpose. It is used for telephonic applications.
Advantages:
⇢ Least expensive
⇢ Easy to install
⇢ High-speed capacity
⇢ Susceptible to external interference
⇢ Lower capacity and performance in comparison to STP
⇢ Short distance transmission due to attenuation
Advantages:
⇢ Better performance at a higher data rate in comparison to UTP
⇢ Eliminates crosstalk
⇢ Comparatively faster
⇢ Comparatively difficult to install and manufacture
⇢ More expensive
⇢ Bulky
2. Coaxial Cable –
It has an outer plastic covering containing an insulation layer made of PVC or Teflon and
2 parallel conductors each having a separate insulated protection cover. The coaxial
cable transmits information in two modes: Baseband mode(dedicated cable bandwidth)
and Broadband mode(cable bandwidth is split into separate ranges). Cable TVs and
analog television networks widely use Coaxial cables.
Advantages:
• High Bandwidth
• Better noise Immunity
• Easy to install and expand
• Inexpensive
Disadvantages:
• Single cable failure can disrupt the entire network
It uses the concept of reflection of light through a core made up of glass or plastic. The
core is surrounded by a less dense glass or plastic covering called the cladding. It is used
for the transmission of large volumes of data.
The cable can be unidirectional or bidirectional. The WDM (Wavelength Division
Multiplexer) supports two modes, namely unidirectional and bidirectional mode.
Advantages:
• Increased capacity and bandwidth
• Lightweight
• Less signal attenuation
• Immunity to electromagnetic interference
• Resistance to corrosive materials
Disadvantages:
• Difficult to install and maintain
• High cost
• Fragile
These are easy to generate and can penetrate through buildings. The sending and
receiving antennas need not be aligned. Frequency Range:3KHz – 1GHz. AM and FM
radios and cordless phones use Radio waves for transmission.
(ii) Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas need to be
properly aligned with each other. The distance covered by the signal is directly
proportional to the height of the antenna. Frequency Range:1GHz – 300GHz. These are
majorly used for mobile phone communication and television distribution.
(iii) Infrared –
Infrared waves are used for very short distance communication. They cannot penetrate
through obstacles. This prevents interference between systems. Frequency
Range:300GHz – 400THz. It is used in TV remotes, wireless mouse, keyboard, printer,
etc.
Differences
The signal requires a physical path for The signal is broadcasted through air or
transmission. sometimes water
It provides direction to signal for travelling. It does not provide any direction. Radio waves,
Twisted pair cable, coaxial cable and fibre microwave and infrared are its types.
optic cable are its types.
Encoding Techniques
The data encoding technique is divided into the following types, depending upon the type of data
conversion.
• Analog data to Analog signals − The modulation techniques such as Amplitude
Modulation, Frequency Modulation and Phase Modulation of analog signals, fall under
this category.
• Analog data to Digital signals − This process can be termed as digitization, which is
done by Pulse Code Modulation PCM. Hence, it is nothing but digital modulation. As we
have already discussed, sampling and quantization are the important factors in this. Delta
Modulation gives a better output than PCM.
• Digital data to Analog signals − The modulation techniques such as Amplitude Shift
Keying ASK, Frequency Shift Keying FSK, Phase Shift Keying PSK, etc., fall under this
category. These will be discussed in subsequent chapters.
• Digital data to Digital signals − There are several ways to map digital data to digital
signals.
Digital-to-Digital Conversion
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. 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.
2. Polar Encoding
Polar encoding scheme uses multiple voltage levels to represent binary values. Polar encodings
is available in four types:
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.
(iii) 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.
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.
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:
• Division,
• Substitution
• 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:
• Sampling
• Quantization
• 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.
In encoding, each approximated value is then converted into binary format.
In this transmission, users have to Here, users do not have to wait for
wait till the transmission is the completion of transmission in
complete before getting a order to get a response from the
5. response back from the server. server.
In Synchronous transmission,
there is no gap present between In Asynchronous transmission, there
6. data. is present a gap between data.
S.
No. Synchronous Transmission Asynchronous Transmission
Flow control is design issue at Data Link Layer. It is a technique that generally observes the
proper flow of data from sender to receiver. It is very essential because it is possible for
sender to transmit data or information at very fast rate and hence receiver can receive this
information and process it.
This can happen only if receiver has very high load of traffic as compared to sender, or if
receiver has power of processing less as compared to sender. Flow control is basically a
technique that gives permission to two of stations that are working and processing at different
speeds to just communicate with one another. Flow control in Data Link Layer simply restricts
and coordinates number of frames or amount of data sender can send just before it waits for
an acknowledgement from receiver. Flow control is actually set of procedures that explains
sender about how much data or frames it can transfer or transmit before data overwhelms
receiver. The receiving device also contains only limited amount of speed and memory to
store data. This is why receiving device should be able to tell or inform the sender about
stopping the transmission or transferring of data on temporary basis before it reaches limit. It
also needs buffer, large block of memory for just storing data or frames until they are
processed.
• Feedback – based Flow Control : In this control technique, sender simply transmits
data or information or frame to receiver, then receiver transmits data back to sender
and also allows sender to transmit more amount of data or tell sender about how
receiver is processing or doing. This simply means that sender transmits data or
frames after it has received acknowledgements from user.
• Rate – based Flow Control : In this control technique, usually when sender sends or
transfer data at faster speed to receiver and receiver is not being able to receive data
at the speed, then mechanism known as built-in mechanism in protocol will just limit or
restricts overall rate at which data or information is being transferred or transmitted by
sender without any feedback or acknowledgement from receiver.
There are basically two types of techniques being developed to control the flow of data
1. Stop-and-Wait Flow Control : This method is the easiest and simplest form of
flow control. In this method, basically message or data is broken down into various multiple
frames, and then receiver indicates its readiness to receive frame of data. When
acknowledgement is received, then only sender will send or transfer the next frame. This
process is continued until sender transmits EOT (End of Transmission) frame. In this method,
only one of frames can be in transmission at a time. It leads to inefficiency i.e. less
productivity if propagation delay is very much longer than the transmission delay and
Ultimately In this method sender sent single frame and receiver take one frame at a time and
sent acknowledgement(which is next frame number only) for new frame.
Advantages –
• This method is very easiest and simple and each of the frames is checked and
acknowledged well.
• This method is also very accurate.
•
Disadvantages –
• This method is fairly slow.
• In this, only one packet or frame can be sent at a time.
• It is very inefficient and makes the transmission process very slow.
2. Sliding Window Flow Control : This method is required where reliable in-order
delivery of packets or frames is very much needed like in data link layer. It is point to point
protocol that assumes that none of the other entity tries to communicate until current data or
frame transfer gets completed. In this method, sender transmits or sends various frames or
packets before receiving any acknowledgement. In this method, both the sender and receiver
agree upon total number of data frames after which acknowledgement is needed to be
transmitted. Data Link Layer requires and uses this method that simply allows sender to have
more than one unacknowledged packet “in-flight” at a time. This increases and improves
network throughput. and Ultimately In this method sender sent multiple frame but receiver
take one by one and after completing one frame acknowledge(which is next frame number
only) for new frame.
Advantages –
• It performs much better than stop-and-wait flow control.
• This method increases efficiency.
• Multiples frames can be sent one after another.
Disadvantages –
• The main issue is complexity at the sender and receiver due to the transferring of
multiple frames.
• The receiver might receive data frames or packets out the sequence
Error Detection And Error Control
Error :A condition when the receiver’s information does not match with the sender’s
information. During transmission, digital signals suffer from noise that can introduce errors in
the binary bits travelling from sender to receiver. That means a 0 bit may change to 1 or a 1
bit mmay change to 0.
Whenever a message is transmitted, it may get scrambled by noise or data may get
corrupted. To avoid this, we use error-detecting codes which are additional data added to a
given digital message to help us detect if any error has occurred during transmission of the
message.
Basic approach used for error detection is the use of redundancy bits, where additional bits
are added to facilitate detection of errors.
Some popular techniques for error detection are:
1. Simple Parity check
2. Two-dimensional Parity check
3. Checksum
4. Cyclic redundancy check
Blocks of data from the source are subjected to a check bit or parity bit generator form, where
a parity of :
• 1 is added to the block if it contains odd number of 1’s, and
• 0 is added if it contains even number of 1’s
This scheme makes the total number of 1’s even, that is why it is called even parity checking.
2. Two-dimensional Parity check
Parity check bits are calculated for each row, which is equivalent to a simple parity check bit.
Parity check bits are also calculated for all columns, then both are sent along with the data. At
the receiving end these are compared with the parity bits calculated on the received data.
3. Checksum
• In checksum error detection scheme, the data is divided into k segments each of m
bits.
• In the sender’s end the segments are added using 1’s complement arithmetic to
get the sum. The sum is complemented to get the checksum.
• The checksum segment is sent along with the data segments.
• At the receiver’s end, all received segments are added using 1’s complement
arithmetic to get the sum. The sum is complemented.
• If the result is zero, the received data is accepted; otherwise discarded.
The Cyclic Redundancy Checks (CRC) is the most powerful method for Error-Detection and
Correction. It is given as a kbit message and the transmitter creates an (n – k) bit sequence
called frame check sequence. The out coming frame, including n bits, is precisely divisible by
some fixed number. Modulo 2 Arithmetic is used in this binary addition with no carries, just like
the XOR operation.
Redundancy means duplicacy. The redundancy bits used by CRC are changed by splitting
the data unit by a fixed divisor. The remainder is CRC.
Qualities of CRC
Process
• A string of n 0s is added to the data unit. The number n is one smaller than the
number of bits in the fixed divisor.
• The new data unit is divided by a divisor utilizing a procedure known as binary
division; the remainder appearing from the division is CRC.
• The CRC of n bits interpreted in phase 2 restores the added 0s at the end of the
data unit.
Example
o Backward error correction: Once the error is discovered, the receiver requests the
sender to retransmit the entire data unit.
o Forward error correction: In this case, the receiver uses the error-correcting code
which automatically corrects the errors.
A single additional bit can detect the error, but cannot correct it.
For correcting the errors, one has to know the exact position of the error. For example, If we
want to calculate a single-bit error, the error correction code will determine which one of seven
bits is in error. To achieve this, we have to add some additional redundant bits.
Example :
Error Control
Error Control in the data link layer is a process of detecting and retransmitting the data which
has been lost or corrupted during the transmission of data. Any reliable system must have a
mechanism for detecting and correcting such errors. Error detection and correction occur at
both the transport layer and the data link layer. Here we will talk about the data link layer and
check bit by bit that if there is any error or not.
Types of error
1. Single bit Error: When there is a change in only one bit of the sender's data then it is
called a single bit error.
Example: If the sender sends 101(5) to the receiver but the receiver receives 100(4) then it is
a single bit error.
2. Burst Error: When there is a change in two or more bits of the sender’s data then it is
called a burst error.
Example: If the sender sends 1011(11) to the sender but the receiver receives 1000(8) then it
is a burst error.
• Error Detection: Firstly, we need to detect at the receiver end that the data received
has an error or not.
• Acknowledgement: If any error is detected the receiver sends a negative
acknowledgement(NACK) to the receiver.
• Retransmission: When the sender receives a negative acknowledgement or if any
acknowledgement is not received from the receiver sender retransmits the data again.
We know that each of frames of HDLC includes at least six to seven fields like start/end flag
field, control field, information field, FCS (Frame Check Sequence) field. Standard HDLC
Protocol contains six fields. Whereas on the other hand, Cisco HDLC (cHDLC) contains one
extra protocol field. The standard protocol uses to support only one protocol whereas cHDLC
protocol use to support multi-protocol environments. Supporting multiple protocols is possible
due to protocol field in header, that helps in identifying different protocols. cHDLC was
basically created by Cisco systems.
• Address field –
This field is used to identify and specify type of packet that is present in cHDLC
frame. It can be 0*0F for Unicast and 0*8F for Broadcast packets.
• Control field –
This field is always set to zero i.e. 0*00.
• Protocol field –
This field is especially required to specify and identify type of protocol that is being
encapsulated withing cHDLC frame. It can be 0x0800 for Internet Protocol.
In this, a number of signals are transmitted at the same time, and each source transfers its
signals in the allotted frequency range. There is a suitable frequency gap between the 2
adjacent signals to avoid over-lapping. Since the signals are transmitted in the allotted
frequencies so this decreases the probability of collision. The frequency spectrum is divided
into several logical channels, in which every user feels that they possess a particular
bandwidth. A number of signals are sent simultaneously at the same time allocating separate
frequency bands or channels to each signal. It is used in radio and TV transmission. Therefore
to avoid interference between two successive channels Guard bands are used.
Application of FDM:
This happens when the data transmission rate of media is greater than that of the source, and
each signal is allotted a definite amount of time. These slots are so small that all
transmissions appear to be parallel. In frequency division multiplexing all the signals operate
at the same time with different frequencies, but in time-division multiplexing, all the signals
operate with the same frequency at different times.
Synchronous TDM
1. Synchronous TDM : In synchronous TDM, every device which is present in this has
given the same time slot to transmit data. It does not consider whether the device contains
data or not. The devices place their data on the link when their time slots arrive, if somehow
any device does not contain data its time-slot remains empty. There are various kinds of time
slots that are organized into frames and each frame consist of one or more time slots
dedicated to each sending device.
Number of slots per frame are Number of slots per frame are
equal to number of input lines less than number of input lines
i.e., If it contains n input lines, i.e., If there are n input lines, then
then it must have n slots in there are m slots in one frame
2. one frame. (m<n).
7. Time slots are fixed and pre- Time-slots are not pre-defined.
S.
No. Synchronous TDM Asynchronous TDM
defined.
In STDM, a communication channel is split into a random range of variable bit-rate data streams
or digital channels. The link sharing is tailored for the instantaneous traffic requirements of the
data streams which are transmitted over every channel.
This type of multiplexing is a replacement for creating a fixed link sharing, such as in standard
time division multiplexing (TDM) and frequency division multiplexing (FDM). Upon precise
execution, STDM can offer an improvement in link utilization, referred to as the statistical
multiplexing gain. STDM is facilitated by means of packet-mode or packet-oriented
communication.
STDM is more efficient than standard TDM. In standard TDM, time slots are allotted to channels
even when there is no data to transmit. This leads to wasted bandwidth. STDM was originally
developed to address this inefficiency, where the time allocation to lines happens only when it is
actually required. This is attained through intelligent devices that are ideal for identifying an idle
terminal.