Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
51 views54 pages

CN - Unit 1-Notes

Uploaded by

Kamna Choudhary
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)
51 views54 pages

CN - Unit 1-Notes

Uploaded by

Kamna Choudhary
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/ 54

Unit 1

Introduction of Computer Networks:


➢ A computer network is a system that connects numerous independent computers in
order to share information (data) and resources.
➢ A computer network is a collection of two or more computer systems that are linked
together.

Criteria of good network:

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

Division based on the communication medium

• 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.

Division based on area covered

1. PAN(Personal Area Network)


o Personal Area Network is a network arranged within an individual person, typically
within a range of 10 meters.
o Personal Area Network is used for connecting the computer devices of personal
use is known as Personal Area Network.

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

Point To Point: Connects two connecting devices through transmission media.

Switched: A switched WAN is a network with more than two ends.

Introduction of Hardware and Software:

Computer is a device comprising both hardware and software.

Components of Hardware:

Input devices –Mouse, Keyboard, Touchpad, Scanners, Joystick, Webcam, etc.

Output devices – Monitor, Printer, Headphones, Speakers, etc.


Storage devices – Hard disk, DVD, etc.

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.

3. Application software : So a word processor, spreadsheet, web browser, and


graphics software are all examples of application software, and they can do
many specific tasks.

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.

Components of Data Communication :

A communication system is made up of the following components:


1. Message: A message is a piece of information that is to be transmitted from one
person to another. It could be a text file, an audio file, a video file, etc.
2. Sender: It is simply a device that sends data messages. It can be a computer, mobile,
telephone, laptop, video camera, or workstation, etc.
3. Receiver: It is a device that receives messages. It can be a computer, telephone
mobile, workstation, etc.
4. Transmission Medium / Communication Channels: Communication channels are
the medium that connect two or more workstations. Workstations can be connected by
either wired media or wireless media.
5. Set of rules (Protocol): When someone sends the data (The sender), it should be
understandable to the receiver also otherwise it is meaningless. For example, Sonali
sends a message to Chetan. If Sonali writes in Hindi and Chetan cannot understand
Hindi, it is a meaningless conversation.
6. TCP(Transmission Control Protocol): It is responsible for dividing messages into
packets on the source computer and reassembling the received packet at the
destination or recipient computer. It also makes sure that the packets have the
information about the source of the message data, the destination of the message
data, the sequence in which the message data should be re-assembled, and checks if
the message has been sent correctly to the specific destination.

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.

Type of data communication / Data Transmission Concepts :

The data communication is divided into three types:


1. Simplex Communication: It is one-way communication or we can say that
unidirectional communication in which one device only receives and another device
only sends data and devices uses their entire capacity in transmission. For example,
IoT, entering data using a keyboard, listing music using a speaker, etc.
2. Half Duplex communication: It is a two-way communication or we can say that it is a
bidirectional communication in which both the devices can send and receive data but
not at the same time. When one device is sending data then another device is only
receiving and vice-versa. For example, walkie-talkie.
3. Full-duplex communication: It is a two-way communication or we can say that it is a
bidirectional communication in which both the devices can send and receive data at
the same time. For example, mobile phones, landlines, etc.

Protocols and Standards :


1. Transmission Control Protocol (TCP): TCP is a popular communication protocol
which is used for communicating over a network. It divides any message into series of
packets that are sent from source to destination and there it gets reassembled at the
destination.
2. Internet Protocol (IP): IP is designed explicitly as addressing protocol. It is mostly used
with TCP. The IP addresses in packets help in routing them through different nodes in a
network until it reaches the destination system. TCP/IP is the most popular protocol
connecting the networks.
3. User Datagram Protocol (UDP): UDP is a substitute communication protocol to
Transmission Control Protocol implemented primarily for creating loss-tolerating and
low-latency linking between different applications.
4. Post office Protocol (POP): POP3 is designed for receiving incoming E-mails.
5. Simple mail transport Protocol (SMTP): SMTP is designed to send and distribute
outgoing E-Mail.
6. File Transfer Protocol (FTP): FTP allows users to transfer files from one machine to
another. Types of files may include program files, multimedia files, text files, and
documents, etc.
7. Hyper Text Transfer Protocol (HTTP): HTTP is designed for transferring a hypertext
among two or more systems. HTML tags are used for creating links. These links may be
in any form like text or images. HTTP is designed on Client-server principles which allow
a client system for establishing a connection with the server machine for making a
request. The server acknowledges the request initiated by the client and responds
accordingly.
8. Hyper Text Transfer Protocol Secure (HTTPS): HTTPS is abbreviated as Hyper Text
Transfer Protocol Secure is a standard protocol to secure the communication among two
computers one using the browser and other fetching data from web server. HTTP is
used for transferring data between the client browser (request) and the web server
(response) in the hypertext format, same in case of HTTPS except that the transferring
of data is done in an encrypted format. So it can be said that https thwart hackers from
interpretation or modification of data throughout the transfer of packets.
9. Telnet: Telnet is a set of rules designed for connecting one system with another. The
connecting process here is termed as remote login. The system which requests for
connection is the local computer, and the system which accepts the connection is the
remote computer.
10. Gopher: Gopher is a collection of rules implemented for searching, retrieving as well as
displaying documents from isolated sites. Gopher also works on the client/server
principle.

Some Other Protocols

Some other popular protocols act as co-functioning protocols associated with these primary
protocols for core functioning. These are:

• ARP (Address Resolution Protocol)


• DHCP (Dynamic Host Configuration Protocol)
• IMAP4 (Internet Message Access Protocol)
• SIP (Session Initiation Protocol)
• RTP (Real-Time Transport Protocol)
• RLP (Resource Location Protocol)
• RAP (Route Access Protocol)
• L2TP (Layer Two Tunnelling Protocol)
• PPTP (Point To Point Tunnelling Protocol)
• SNMP (Simple Network Management Protocol)
• TFTP (Trivial File Transfer Protocol)

Analog and Digital Transmission :

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

Layered Architecture of Computer Networks :

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.

o n case of layered architecture, no data is transferred from layer n of one machine to


layer n of another machine. Instead, each layer passes the data to the layer immediately
just below it, until the lowest layer is reached.
o Below layer 1 is the physical medium through which the actual communication takes
place.
o In a layered architecture, unmanageable tasks are divided into several small and
manageable tasks.
o The data is passed from the upper layer to lower layer through an interface. A Layered
architecture provides a clean-cut interface so that minimum information is shared among
different layers. It also ensures that the implementation of one layer can be easily
replaced by another implementation.
o A set of layers and protocols is known as network architecture.

Why do we require Layered architecture?


o Divide-and-conquer approach: Divide-and-conquer approach makes a design process
in such a way that the unmanageable tasks are divided into small and manageable
tasks. In short, we can say that this approach reduces the complexity of the design.
o Modularity: Layered architecture is more modular. Modularity provides the
independence of layers, which is easier to understand and implement.
o Easy to modify: It ensures the independence of layers so that implementation in one
layer can be changed without affecting other layers.
o Easy to test: Each layer of the layered architecture can be analyzed and tested
individually.

OSI and TCP/IP Architectures


Layers of OSI Model

• 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 functions of the physical layer are as follows:


1. Bit synchronization: The physical layer provides the synchronization of the bits by
providing a clock. This clock controls both sender and receiver thus providing
synchronization at bit level .
2. Bit rate control: The Physical layer also defines the transmission rate i.e. the number of
bits sent per second.
3. Physical topologies: Physical layer specifies the way in which the different,
devices/nodes are arranged in a network i.e. bus, star, or mesh topology.
4. Transmission mode: Physical layer also defines the way in which the data flows between
the two connected devices. The various transmission modes possible are Simplex, half-
duplex and full-duplex.

Eg.Hub, Repeater, Modem, Cables are Physical Layer devices.


** Network Layer, Data Link Layer, and Physical Layer are also known
as Lower Layers or Hardware Layers.

2. Data Link Layer (DLL) (Layer 2) :

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 functions of the Data Link layer are :


1. Framing: Framing is a function of the data link layer. It provides a way for a sender to
transmit a set of bits that are meaningful to the receiver. This can be accomplished by
attaching special bit patterns to the beginning and end of the frame.
2. Physical addressing: After creating frames, the Data link layer adds physical addresses
(MAC address) of the sender and/or receiver in the header of each frame.
3. Error control: Data link layer provides the mechanism of error control in which it detects
and retransmits damaged or lost frames.
4. Flow Control: The data rate must be constant on both sides else the data may get
corrupted thus, flow control coordinates the amount of data that can be sent before
receiving acknowledgement.
5. Access control: When a single communication channel is shared by multiple devices, the
MAC sub-layer of the data link layer helps to determine which device has control over the
channel at a given time.

* Packet in Data Link layer is referred to as Frame.


** Data Link layer is handled by the NIC (Network Interface Card) and
device drivers of host machines.
*** Switch & Bridge are Data Link Layer devices.

3. Network Layer (Layer 3) :

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.

4. Transport Layer (Layer 4) :

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.

5. Session Layer (Layer 5) :


This layer is responsible for the establishment of connection, maintenance of sessions,
authentication, and also ensures security.
The functions of the session layer are :
1. Session establishment, maintenance, and termination: The layer allows the two
processes to establish, use and terminate a connection.
2. Synchronization: This layer allows a process to add checkpoints which are considered
synchronization points into the data. These synchronization points help to identify the error
so that the data is re-synchronized properly, and ends of the messages are not cut
prematurely and data loss is avoided.
3. Dialog Controller: The session layer allows two systems to start communication with each
other in half-duplex or full-duplex.
**All the below 3 layers(including Session Layer) are integrated as a single layer in the TCP/IP
model as “Application Layer”.
**Implementation of these 3 layers is done by the network application itself. These are also
known as Upper Layers or Software Layers.

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.

6. Presentation Layer (Layer 6):

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.

7. Application Layer (Layer 7) :


At the very top of the OSI Reference Model stack of layers, we find the Application layer
which is implemented by the network applications. These applications produce the data,
which has to be transferred over the network. This layer also serves as a window for the
application services to access the network and for displaying the received information to
the user.
Example: Application – Browsers, Skype Messenger, etc.
**Application Layer is also called Desktop Layer.

The functions of the Application layer are :


1. Network Virtual Terminal
2. FTAM-File transfer access and management
3. Mail Services
4. Directory Services
TCP/IP Model

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 has 4 layers. OSI has 7 layers.

TCP/IP is more reliable OSI is less reliable


TCP/IP does not have
very strict boundaries. OSI has strict boundaries

TCP/IP follow a
horizontal approach. OSI follows a vertical approach.

TCP/IP uses both


session and presentation
layer in the application OSI uses different session and
layer itself. presentation layers.

TCP/IP developed OSI developed model then


protocols then model. protocol.

Transport layer in TCP/IP


does not provide In OSI model, transport layer
assurance delivery of provides assurance delivery of
packets. packets.

Connection less and connection


TCP/IP model network oriented both services are
layer only provides provided by network layer in
connection less services. OSI model.

While in OSI model, Protocols


Protocols cannot be are better covered and is easy
replaced easily in TCP/IP to replace with the change in
model. technology.

Similarities between the TCP/IP and OSI models

• Both the models are based upon layered structuring


• In both models, data are mainly used to convert raw data into packets and help them
reach their destination node.
• In both models, protocols are defined in a layer-wise manner.
• The layers in the models are compared with each other. The physical layer and the data
link layer of the OSI model correspond to the link layer of the TCP/IP model.
• The session layer, the presentation layer and the application layer of the OSI model
together form the application layer of the TCP/IP model.
• The network layers and the transport layers are the same in both models.
The first layer is the Process layer on the behalf of the sender and Network Access layer on
the behalf of the receiver. During this article, we will be talking on the behalf of the receiver.

1. Network Access Layer –

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.

Frequently Asked Questions on TCP/IP vs OSI Model

Q 1. What is the main difference between TCP/IP and OSI Model?


Ans. TCP/IP Model is a communication protocols suite using which network devices can be connected to the
Internet. On the other hand, the OSI Model is a conceptual framework, using which the functioning of a network
can be described.

Q 2. TCP/IP vs OSI: What are the different layers?


Ans. The TCP/IP Model comprises four layers: Network Interface, Internet, Transport and Application. The OSI
Model comprises seven layers: Physical, Data Link, Network, Transport, Session, Presentation and Application.

Q 3. Is TCP/IP a part of the OSI Model?


Ans. There is a separate layer for Data Link and Physical in the OSI Model, whereas, the TCP/IP has a single
Network Interface layer for the same. Similarly, there is Application, Presentation and Session layers in OSI,
which are combined into one layer (Application) for TCP/IP.

Q 4. TCP/IP vs OSI: Which came first?


Ans. Among TCP/IP and OSI, the Open Systems Interconnection model was introduced by the International
Organisation of Standardization in 1984 and the TCP/IP model was introduced about 10 years before that.

Types of Network Topology

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.

Advantages of this topology:


• Communication is very fast between at the nodes.
• It is robust.
• The fault is diagnosed easily. Data is reliable because data is transferred among the devices
through dedicated channels or links.
• Provides security and privacy.

Problems with this topology:


• Installation and configuration are difficult.
• The cost of cables is high as bulk wiring is required, hence suitable for less number of
devices.
• The cost of maintenance is high.

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.

Advantages of this topology:

• 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.

Problems with this topology:

• 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.

Advantages of this topology:

• 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.

Problems with this topology:

• A bus topology is quite simpler , but still it requires a lot of cabling.


• If the common cable fails, then the whole system will crash down.
• If the network traffic is heavy, it increases collisions in the network. To avoid this, various
protocols are used in the MAC layer known as Pure Aloha, Slotted Aloha, CSMA/CD, etc.
• Adding new devices to network would slow down networks.
• Security is very low.

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.

• Token : It is a frame that circulates around network.

The following operations take place in ring topology are :

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.

Advantages of this topology:

• The data transmission is high-speed.


• The possibility of collision is minimum in this type of topology.
• Cheap to install and expand.
• It is less costly than a star topology.

Problems with this topology:

• 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.

Advantages of this topology :

• 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.

Problems with this topology :

• If the central hub gets fails the entire system fails.


• The cost is high because of cabling.
• If new devices are added, it becomes difficult to reconfigure.

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.

Advantages of this topology :

• This topology is very flexible.


• the size of network can be easily expanded by adding new device.

Problems with this topology :

• It is very difficult to design the architecture of the Hybrid Network.


• Hubs used in this topology are very expensive.
• The infrastructure cost is very high as hybrid network requires a lot of cabling, network
devices.
Guided Transmission Media (Physical Layer) :

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

Types Of Guided media:

There are 3 major types of Guided Media:


1. Twisted Pair Cable –

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:

i. Unshielded Twisted Pair (UTP):

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

ii. Shielded Twisted Pair (STP):


This type of cable consists of a special jacket (a copper braid covering or a foil shield) to
block external interference. It is used in fast-data-rate Ethernet and in voice and data
channels of telephone lines.

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

3. Optical Fiber Cable –

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

3. Unguided Media/ Wireless media:

It is also referred to as Wireless or Unbounded transmission media. No physical medium


is required for the transmission of electromagnetic signals.
Features:
• The signal is broadcasted through air
• Less Secure
• Used for larger distances

There are 3 types of Signals transmitted through unguided media:


(i) Radio waves –

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

Guided media Unguided media

The signal requires a physical path for The signal is broadcasted through air or
transmission. sometimes water

It is called wired communication or It is called wireless communication or


bounded transmission media. unbounded transmission media.

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.

Data Encoding - Digital And Analog Data :


Encoding is the process of using various patterns of voltage or current levels to
represent 1s and 0s of the digital signals on the transmission link.
Encoding is the process of converting the data or a given sequence of characters, symbols,
alphabets etc., into a specified format, for the secured transmission of data. Decoding is the
reverse process of encoding which is to extract the information from the converted format.

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:

(i) 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.

(ii) 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.

(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.

(iv) 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.

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.

Data Communication Interface - Synchronous And Asynchronous


Transmission :

1. Synchronous Transmission: In Synchronous Transmission, data is sent in form of


blocks or frames. This transmission is the full-duplex type. Between sender and receiver,
synchronization is compulsory. In Synchronous transmission, There is no gap present
between data. It is more efficient and more reliable than asynchronous transmission to
transfer a large amount of data.
Example:
• Chat Rooms
• Telephonic Conversations
• Video Conferencing

2. Asynchronous Transmission: In Asynchronous Transmission, data is sent in


form of byte or character. This transmission is the half-duplex type transmission. In this
transmission start bits and stop bits are added with data. It does not require synchronization.
Example:
• Email
• Forums
• Letters
S.
No. Synchronous Transmission Asynchronous Transmission

In Synchronous transmission, data


is sent in form of blocks or frames. In Asynchronous transmission, data is
1. sent in form of bytes or characters.

2. Synchronous transmission is fast. Asynchronous transmission is slow.

Synchronous transmission is Asynchronous transmission is


3. costly. economical.

In Synchronous transmission, the In Asynchronous transmission, the


time interval of transmission is time interval of transmission is not
4. constant. constant, it is random.

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

While in Asynchronous transmission,


Efficient use of transmission lines the transmission line remains empty
is done in synchronous during a gap in character
7. transmission. transmission.

The start and stop bits are used in


The start and stop bits are not transmitting data that imposes extra
8. used in transmitting data. overhead.

Asynchronous transmission does not


Synchronous transmission needs need synchronized clocks as parity bit
precisely synchronized clocks for is used in this transmission for
9. the information of new bytes. information of new bytes.

Data Link Layer - Flow Control

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.

Techniques of Flow Control in Data Link Layer :

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.

Error Detecting Codes (Implemented either at Data link layer or Transport


Layer of OSI Model)

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

1. Simple Parity 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.

4. Cyclic redundancy check (CRC)

• Unlike checksum scheme, which is based on addition, CRC is based on binary


division.
• In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are
appended to the end of data unit so that the resulting data unit becomes exactly
divisible by a second, predetermined binary number.
• At the destination, the incoming data unit is divided by the same number. If at this
step there is no remainder, the data unit is assumed to be correct and is therefore
accepted.
• A remainder indicates that the data unit has been damaged in transit and therefore
must be rejected.

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

• It should have accurately one less bit than the divisor.


• Joining it to the end of the data unit should create the resulting bit sequence
precisely divisible by the divisor.

CRC generator and checker

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

• Message D = 1010001101 (10 bits)


• Predetermined P = 110101 (6 bits)
• FCS R = to be calculated 5 bits
• Hence, n = 15 K = 10 and (n – k) = 5
• The message is generated through 25:accommodating 1010001101000
• The product is divided by P.

• The remainder is inserted to 25D to provide T = 101000110101110 that is sent.


• Suppose that there are no errors, and the receiver gets T perfect. The received
frame is divided by P.
• Because of no remainder, there are no errors.
Error Correction
Error Correction codes are used to detect and correct the errors when data is transmitted from
the sender to the receiver.

Error Correction can be handled in two ways:

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.

101(sent bits) → 100(received bits)

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.

1011(sent bits) → 1000(received bits)

Phases in Error Control

• 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.

HDLC And Other Data Link Protocols:


High-Level Data Link Control (HDLC) basically provides reliable delivery of data frames over a
network or communication link. HDLC provides various operations such as framing, data
transparency, error detection, and correction, and even flow control. Primary stations simply
transmit commands that contain address of secondary stations. The secondary station then
simply transmits responses that contain its own address.
HDLC Encapsulation Protocol :

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.

Multiplexing - Frequency Division


Multiplexing is used in cases where the signals of lower bandwidth and the transmitting
media is having higher bandwidth. In this case, the possibility of sending a number of signals
is more. In this, the signals are combined into one and are sent over a link that has greater
bandwidth of media than the communicating nodes.

1. Frequency Division Multiplexing (FDM):

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:

1. In the first generation of mobile phones, FDM was used.


2. The use of FDM in television broadcasting
3. FDM is used to broadcast FM and AM radio frequencies.

2. Time Division Multiplexing (TDM):

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.

2. Asynchronous TDM : Other name of asynchronous TDM is statistical division


multiplexing. It is called so because time-slots are not fixed i.e. slots are flexible. As slots are
not fixed, a device which wants to send data allotted time-slot.

Difference between Synchronous TDM and Asynchronous TDM :


S.
No. Synchronous TDM Asynchronous TDM

In this, multiplexer allocates In this, multiplexer does not


same time slots to each device allocates same time slots to each
without considering fact that device without considering fact
1. device contains data or not. that device contains data or not.

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).

There is no guarantee that full There is guarantee that full


3. capacity link is used. capacity link is used.

Total speed of input lines


cannot be greater than Total speed of input lines can be
4. capacity of path. greater than capacity of path.

5. Usage of devices is less. Usage of devices is more.

Number of time slots in a frame


as always based on statistical
Number of time slots in a analysis of number of input lines
frame as always based on that are likely to be transmitting
6. number of input lines. at any given time.

7. Time slots are fixed and pre- Time-slots are not pre-defined.
S.
No. Synchronous TDM Asynchronous TDM

defined.

Statistical Time Division Multiplexing (STDM)

Statistical time-division multiplexing (STDM) is a form of communication link sharing, which is


almost identical to dynamic bandwidth allocation (DBA).

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.

You might also like