You are on page 1of 80

Computer Networks

UNIT - I

A set of devices often mentioned as nodes connected by media link is called a Network. A
node can be a device which is capable of sending or receiving data generated by other nodes
on the network like a computer, printer etc. These links connecting the devices are
called Communication channels.
Computer network is a telecommunication channel using which we can share data with other
computers or devices, connected to the same network. It is also called Data Network. The
best example of computer network is Internet.

Computer network does not mean a system with one Control Unit connected to multiple other
systems as its slave. That is Distributed system, not Computer Network.

A network must be able to meet certain criteria, these are mentioned below:

1. Performance
2. Reliability
3. Scalability
Computer Networks: Performance

It can be measured in the following ways:

 Transit time : It is the time taken to travel a message from one device to another.
 Response time : It is defined as the time elapsed between enquiry and response.
Other ways to measure performance are :

1. Efficiency of software
2. Number of users
3. Capability of connected hardware
Computer Networks: Reliability

It decides the frequency at which network failure take place. More the failures are, less is the
network's reliability.

Computer Networks: Security

It refers to the protection of data from any unauthorized user or access. While travelling
through network, data passes many layers of network, and data can be traced if attempted.
Hence security is also a very important characteristic for Networks.

Properties of a Good Network


1. Interpersonal Communication: We can communicate with each other efficiently
and easily. Example: emails, chat rooms, video conferencing etc, all of these are
possible because of computer networks.
2. Resources can be shared: We can share physical resources by making them
available on a network such as printers, scanners etc.
3. Sharing files, data: Authorized users are allowed to share the files on the network.

Basic Communication Model

A Communication model is used to exchange data between two parties. For example:
communication between a computer, server and telephone (through modem).

Communication Model: Source : Data to be transmitted is generated by this device,


example: telephones, personal computers etc.

Communication Model: Transmitter: The data generated by the source system is not
directly transmitted in the form its generated. The transmitter transforms and encodes the data
in such a form to produce electromagnetic waves or signals.

Communication Model: Transmission System: A transmission system can be a single


transmission line or a complex network connecting source and destination.

Communication Model: Receiver: Receiver accepts the signal from the transmission system
and converts it into a form which is easily managed by the destination device.

Communication Model: Destination: Destination receives the incoming data from the
receiver.

Data Communication

The exchange of data between two devices through a transmission medium is called Data
Communication. The data is exchanged in the form of 0's and 1's. The transmission medium
used is wire cable. For data communication to occur, the communication device must be a
part of a communication system. Data Communication has two types -
Local and Remote which are discussed below:

Data Communication: Local: Local communication takes place when the communicating
devices are in the same geographical area, same building, or face-to-face etc.
Data Communication: Remote : Remote communication takes place over a distance i.e. the
devices are farther. The effectiveness of a data communication can be measured through the
following features:

1. Delivery: Delivery should be done to the correct destination.


2. Timeliness: Delivery should be on time.
3. Accuracy: Data delivered should be accurate.

Components of Data Communication

1. Message: It is the information to be delivered.


2. Sender: Sender is the person who is sending the message.
3. Receiver: Receiver is the person to whom the message is being sent to.
4. Medium: It is the medium through which the message is sent. For example: A
Modem.
5. Protocol: These are some set of rules which govern data communication. In Order to
make communication successful between devices, some rules and procedures should
be agreed upon at the sending and receiving ends of the system. Such rules and
procedures are called as Protocols. Different types of protocols are used for different
types of communication.

Uses of Computer Networks

Had it not been of high importance, nobody would have bothered connecting computers over
a network. Let's start exploring the uses of Computer Networks with some traditional use
cases at companies and for individuals and then move on to the recent developments in the
area of mobile users and home networking.

Computer Networks: Business Applications

1. Resource Sharing:
The goal is to make all programs, equipment (like printers etc.), and especially data, available
to anyone on the network without regard to the physical location of the resource and the user.
2. Server-Client model:
One can imagine a company's information system as consisting of one or more databases and
some employees who need to access it remotely. In this model, the data is stored on powerful
computers called Servers. Often these are centrally housed and maintained by a system
administrator. In contrast, the employees have simple machines, called Clients, on their
desks, using which they access remote data.

3. Communication Medium:
A computer network can provide a powerful communication medium among employees.
Virtually every company that has two or more computers now has e-mail (electronic mail),
which employees generally use for a great deal of daily communication

4. E-commerce:
A goal that is starting to become more important in businesses is doing business with
consumers over the Internet. Airlines, bookstores and music vendors have discovered that
many customers like the convenience of shopping from home. This sector is expected to
grow quickly in the future.

The most popular forms are listed in the below figure:

Computer Networks: Home Applications

Some of the most important uses of the Internet for home users are as follows:

 Access to remote information


 Person-to-person communication
 Interactive entertainment
 Electronic commerce

Computer Networks: Mobile Users

A mobile computer, such as notebook computers and Mobile phones, is one of the fastest-
growing segments of the entire computer industry. Although wireless networking and mobile
computing are often related, they are not identical, as the below figure shows.
Line Configuration in Computer Networks

A Network is nothing but a connection made through connection links between two or more
devices. Devices can be a computer, printer or any other device that is capable to send and
receive data. There are two ways to connect the devices :

1. Point-to-Point connection

2. Multipoint connection

Point-To-Point Connection

It is a protocol which is used as a communication link between two devices. It is simple to


establish. The most common example for Point-to-Point connection (PPP) is a computer
connected by telephone line. We can connect the two devices by means of a pair of wires or
using a microwave or satellite link.

Example: Point-to-Point connection between remote control and Television for changing the
channels.

MultiPoint Connection
It is also called Multidrop configuration. In this connection two or more devices share a
single link.

There are two kinds of Multipoint Connections:

 If the links are used simultaneously between many devices, then it is spatially shared
line configuration.

 If user takes turns while using the link, then it is time shared (temporal) line
configuration.

Computer Network Types

A computer network is a group of computers linked to each other that enables the computer
to communicate with another computer and share their resources, data, and applications.

A computer network can be categorized by their size. A computer network is mainly of four
types:

o LAN(Local Area Network)


o PAN(Personal Area Network)
o MAN(Metropolitan Area Network)
o WAN(Wide Area Network)

LAN (Local Area Network)


o Local Area Network is a group of computers connected to each other in a small area
such as building, office.
o LAN is used for connecting two or more personal computers through a
communication medium such as twisted pair, coaxial cable, etc.
o It is less costly as it is built with inexpensive hardware such as hubs, network
adapters, and Ethernet cables.
o The data is transferred at an extremely faster rate in Local Area Network.
o Local Area Network provides higher security.

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.
o Thomas Zimmerman was the first research scientist to bring the idea of the Personal
Area Network.
o Personal Area Network covers an area of 30 feet.
o Personal computer devices that are used to develop the personal area network are the
laptop, mobile phones, media player and play stations.

There are two types of Personal Area Network:


o Wired Personal Area Network
o Wireless Personal Area Network

Wireless Personal Area Network: Wireless Personal Area Network is developed by simply
using wireless technologies such as WiFi, Bluetooth. It is a low range network.Ministers of
India | List of Prime Minister of India (1947-2020)
Wired Personal Area Network: Wired Personal Area Network is created by using the USB.

Examples of Personal Area Network:

o Body Area Network: Body Area Network is a network that moves with a
person. For example, a mobile network moves with a person. Suppose a person
establishes a network connection and then creates a connection with another device to
share the information.
o Offline Network: An offline network can be created inside the home, so it is also
known as a home network. A home network is designed to integrate the devices such
as printers, computer, television but they are not connected to the internet.
o Small Home Office: It is used to connect a variety of devices to the internet and to a
corporate network using a VPN

MAN (Metropolitan Area Network)

o A metropolitan area network is a network that covers a larger geographic area by


interconnecting a different LAN to form a larger network.
o Government agencies use MAN to connect to the citizens and private industries.
o In MAN, various LANs are connected to each other through a telephone exchange
line.
o The most widely used protocols in MAN are RS-232, Frame Relay, ATM, ISDN, OC-
3, ADSL, etc.
o It has a higher range than Local Area Network(LAN).
Uses of Metropolitan Area Network:

o MAN is used in communication between the banks in a city.


o It can be used in an Airline Reservation.
o It can be used in a college within a city.
o It can also be used for communication in the military.

WAN (Wide Area Network)

o A Wide Area Network is a network that extends over a large geographical area such
as states or countries.
o A Wide Area Network is quite bigger network than the LAN.
o A Wide Area Network is not limited to a single location, but it spans over a large
geographical area through a telephone line, fibre optic cable or satellite links.
o The internet is one of the biggest WAN in the world.
o A Wide Area Network is widely used in the field of Business, government, and
education.
Examples Of Wide Area Network:

o Mobile Broadband: A 4G network is widely used across a region or country.


o Last mile: A telecom company is used to provide the internet services to the
customers in hundreds of cities by connecting their home with fiber.
o Private network: A bank provides a private network that connects the 44 offices.
This network is made by using the telephone leased line provided by the telecom
company.

Advantages of Wide Area Network:

Following are the advantages of the Wide Area Network:

o Geographical area: A Wide Area Network provides a large geographical area.


Suppose if the branch of our office is in a different city then we can connect with
them through WAN. The internet provides a leased line through which we can
connect with another branch.
o Centralized data: In case of WAN network, data is centralized. Therefore, we do not
need to buy the emails, files or back up servers.
o Get updated files: Software companies work on the live server. Therefore, the
programmers get the updated files within seconds.
o Exchange messages: In a WAN network, messages are transmitted fast. The web
application like Facebook, Whatsapp, Skype allows you to communicate with friends.
o Sharing of software and resources: In WAN network, we can share the software
and other resources like a hard drive, RAM.
o Global business: We can do the business over the internet globally.
o High bandwidth: If we use the leased lines for our company then this gives the high
bandwidth. The high bandwidth increases the data transfer rate which in turn
increases the productivity of our company.

Disadvantages of Wide Area Network:

The following are the disadvantages of the Wide Area Network:

o Security issue: A WAN network has more security issues as compared to LAN and
MAN network as all the technologies are combined together that creates the security
problem.
o Needs Firewall & antivirus software: The data is transferred on the internet which
can be changed or hacked by the hackers, so the firewall needs to be used. Some
people can inject the virus in our system so antivirus is needed to protect from such a
virus.
o High Setup cost: An installation cost of the WAN network is high as it involves the
purchasing of routers, switches.
o Troubleshooting problems: It covers a large area so fixing the problem is difficult.

Internetwork

o An internetwork is defined as two or more computer network LANs or WAN or


computer network segments are connected using devices, and they are configured by
a local addressing scheme. This process is known as internetworking.
o An interconnection between public, private, commercial, industrial, or government
computer networks can also be defined as internetworking.
o An internetworking uses the internet protocol.
o The reference model used for internetworking is Open System Interconnection
(OSI).

Types of Internetwork:
1. Extranet: An extranet is a communication network based on the internet protocol such
as Transmission Control protocol and internet protocol. It is used for information sharing.
The access to the extranet is restricted to only those users who have login credentials. An
extranet is the lowest level of internetworking. It can be categorized as MAN, WAN or other
computer networks. An extranet cannot have a single LAN, at least it must have one
connection to the external network.

2. Intranet: An intranet is a private network based on the internet protocol such


as Transmission Control protocol and internet protocol. An intranet belongs to an
organization which is only accessible by the organization's employee or members. The main
aim of the intranet is to share the information and resources among the organization
employees. An intranet provides the facility to work in groups and for teleconferences.

Intranet advantages:

o Communication: It provides a cheap and easy communication. An employee of the


organization can communicate with another employee through email, chat.
o Time-saving: Information on the intranet is shared in real time, so it is time-saving.
o Collaboration: Collaboration is one of the most important advantage of the intranet.
The information is distributed among the employees of the organization and can only
be accessed by the authorized user.
o Platform independency: It is a neutral architecture as the computer can be connected
to another device with different architecture.
o Cost effective: People can see the data and documents by using the browser and
distributes the duplicate copies over the intranet. This leads to a reduction in the cost.

Types of Computer Networks


There are five main types of Computer Networks:

1. LAN (Local Area Network) –


 Systems connected in a small network like in a building or a small office
 It is inexpensive
 It uses Ethernet or Token-ring technology
 Two or more personal computers can be connected through wires or cables
acting as nodes
 Transfer of data is fast and is highly score
2. PAN (Personal Area Network) –
 The smallest computer network
 Devices may be connected through Bluetooth or other infra-red enables
devices
 It has a connectivity range of up to 10 meters
 It covers an area of up to 30 feet
 Personal devices belonging to a single person can be connected to each other
using PAN
3. MAN (Metropolitan Area Network) –
 A network that can be connected within a city, for example, cable TV
Connection.
 It can be in the form of Ethernet, ATM, Token-ring and FDDI
 It has a higher range
 This type of network can be used to connect citizens with the various
Organizations.
4. WAN (Wide Area Network) –
 A network which covers over a country or a larger range of people
 Telephonic lines are also connected through WAN
 Internet is the biggest WAN in the world
 Mostly used by Government Organizations to manage data and information
5. VPN (Virtual Private Network): –
 A network which is constructed by using public wires to connect to a private
network
 There are a number of systems which enable you to create networks using the
Internet as a medium for transporting data
 These systems use encryptions and other security mechanisms to ensure only
authorized users can access
Types of Network Topology

Network Topology is the schematic description of a network arrangement, connecting various


nodes (sender and receiver) through lines of connection.

BUS Topology

Bus topology is a network type in which every computer and network device is connected to
single cable. When it has exactly two endpoints, then it is called Linear Bus topology.
Features of Bus Topology

1. It transmits data only in one direction.

2. Every device is connected to a single cable

Advantages of Bus Topology

1. It is cost effective.

2. Cable required is least compared to other network topology.

3. Used in small networks.

4. It is easy to understand.

5. Easy to expand joining two cables together.

Disadvantages of Bus Topology

1. Cables fails then whole network fails.

2. If network traffic is heavy or nodes are more the performance of the network
decreases.

3. Cable has a limited length.

4. It is slower than the ring topology.

RING Topology

It is called ring topology because it forms a ring as each computer is connected to another
computer, with the last one connected to the first. Exactly two neighbours for each device.
Features of Ring Topology

1. A number of repeaters are used for Ring topology with 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.

2. The transmission is unidirectional, but it can be made bidirectional by having 2


connections between each Network Node, it is called Dual Ring Topology.

3. In Dual Ring Topology, two ring networks are formed, and data flow is in opposite
direction in them. Also, if one ring fails, the second ring can act as a backup, to keep
the network up.

4. Data is transferred in a sequential manner that is bit by bit. Data transmitted, has to
pass through each node of the network, till the destination node.

Advantages of Ring Topology

1. Transmitting network is not affected by high traffic or by adding more nodes, as only
the nodes having tokens can transmit data.

2. Cheap to install and expand

Disadvantages of Ring Topology

1. Troubleshooting is difficult in ring topology.

2. Adding or deleting the computers disturbs the network activity.

3. Failure of one computer disturbs the whole network.

STAR Topology

In this type of topology all the computers are connected to a single hub through a cable. This
hub is the central node and all others nodes are connected to the central node.
Features of Star Topology

1. Every node has its own dedicated connection to the hub.

2. Hub acts as a repeater for data flow.

3. Can be used with twisted pair, Optical Fibre or coaxial cable.

Advantages of Star Topology

1. Fast performance with few nodes and low network traffic.

2. Hub can be upgraded easily.

3. Easy to troubleshoot.

4. Easy to setup and modify.

5. Only that node is affected which has failed, rest of the nodes can work smoothly.

Disadvantages of Star Topology

1. Cost of installation is high.

2. Expensive to use.

3. If the hub fails then the whole network is stopped because all the nodes depend on the
hub.

4. Performance is based on the hub that is it depends on its capacity

MESH Topology

It is a point-to-point connection to other nodes or devices. All the network nodes are
connected to each other. Mesh has n(n-1)/2 physical channels to link n devices.

There are two techniques to transmit data over the Mesh topology, they are :

1. Routing

2. Flooding

MESH Topology: Routing

In routing, the nodes have a routing logic, as per the network requirements. Like routing logic
to direct the data to reach the destination using the shortest distance. Or, routing logic which
has information about the broken links, and it avoids those node etc. We can even have
routing logic, to re-configure the failed nodes.

MESH Topology: Flooding


In flooding, the same data is transmitted to all the network nodes, hence no routing logic is
required. The network is robust, and the its very unlikely to lose the data. But it leads to
unwanted load over the network.

Types of Mesh Topology

1. Partial Mesh Topology : In this topology some of the systems are connected in the
same fashion as mesh topology but some devices are only connected to two or three
devices.

2. Full Mesh Topology : Each and every nodes or devices are connected to each other.

Features of Mesh Topology

1. Fully connected.
2. Robust.
3. Not flexible.

Advantages of Mesh Topology

1. Each connection can carry its own data load.


2. It is robust.
3. Fault is diagnosed easily.
4. Provides security and privacy.

Disadvantages of Mesh Topology

1. Installation and configuration is difficult.


2. Cabling cost is more.
3. Bulk wiring is required.

TREE Topology

It has a root node and all other nodes are connected to it forming a hierarchy. It is also called
hierarchical topology. It should at least have three levels to the hierarchy.
Features of Tree Topology

1. Ideal if workstations are located in groups.


2. Used in Wide Area Network.

Advantages of Tree Topology

1. Extension of bus and star topologies.


2. Expansion of nodes is possible and easy.
3. Easily managed and maintained.
4. Error detection is easily done.

Disadvantages of Tree Topology

1. Heavily cabled.
2. Costly.
3. If more nodes are added maintenance is difficult.
4. Central hub fails, network fails.

HYBRID Topology

It is two different types of topologies which is a mixture of two or more topologies. For
example if in an office in one department ring topology is used and in another star topology is
used, connecting these topologies will result in Hybrid Topology (ring topology and star
topology).
Features of Hybrid Topology

1. It is a combination of two or topologies


2. Inherits the advantages and disadvantages of the topologies included

Advantages of Hybrid Topology

1. Reliable as Error detecting and trouble shooting is easy.


2. Effective.
3. Scalable as size can be increased easily.
4. Flexible.

Disadvantages of Hybrid Topology

1. Complex in design.
2. Costly.

Transmission Modes in Computer Networks

Transmission mode refers to the mechanism of transferring of data between two devices
connected over a network. It is also called Communication Mode. These modes direct the
direction of flow of information. There are three types of transmission modes. They are:

1. Simplex Mode
2. Half duplex Mode
3. Full duplex Mode
SIMPLEX Mode

In this type of transmission mode, data can be sent only in one direction i.e. communication
is unidirectional. We cannot send a message back to the sender. Unidirectional
communication is done in Simplex Systems where we just need to send a command/signal,
and do not expect any response back.

Examples of simplex Mode are loudspeakers, television broadcasting, television and remote,
keyboard and monitor etc.

HALF DUPLEX Mode

Half-duplex data transmission means that data can be transmitted in both directions on a
signal carrier, but not at the same time.

For example, on a local area network using a technology that has half-duplex transmission,
one workstation can send data on the line and then immediately receive data on the line from
the same direction in which data was just transmitted. Hence half-duplex transmission
implies a bidirectional line (one that can carry data in both directions) but data can be sent in
only one direction at a time.

Example of half duplex is a walkie- talkie in which message is sent one at a time but
messages are sent in both the directions.
FULL DUPLEX Mode

In full duplex system we can send data in both the directions as it is bidirectional at the same
time in other words, data can be sent in both directions simultaneously.

Example of Full Duplex is a Telephone Network in which there is communication between


two persons by a telephone line, using which both can talk and listen at the same time.

In full duplex system there can be two lines one for sending the data and the other for
receiving data.

Network Hardware
The basic computer hardware components that are needed to set up a network are as follows

Network Cables
Network cables are the transmission media to transfer data from one device to another. A
commonly used network cable is category 5 cable with RJ – 45 connector, as shown in the
image below:
Routers
A router is a connecting device that transfers data packets between different computer
networks. Typically, they are used to connect a PC or an organization‟s LAN to a broadband
internet connection. They contain RJ-45 ports so that computers and other devices can
connect with them using network cables.

Repeaters, Hubs, and Switches


Repeaters, hubs and switches connect network devices together so that they can function as a
single segment.
A repeater receives a signal and regenerates it before re-transmitting so that it can travel
longer distances.
A hub is a multiport repeater having several input/output ports, so that input at any port is
available at every other port.
A switch receives data from a port, uses packet switching to resolve the destination device
and then forwards the data to the particular destination, rather than broadcasting it as a hub.

Bridges
A bridge connects two separate Ethernet network segments. It forwards packets from the
source network to the destined network.

Gateways
A gateway connects entirely different networks that work upon different protocols. It is the
entry and the exit point of a network and controls access to other networks.

Network Interface Cards


NIC is a component of the computer to connect it to a network. Network cards are of two
types: Internal network cards and external network cards.

Network Software
Network software encompasses a broad range of software used for design, implementation,
and operation and monitoring of computer networks. Traditional networks were hardware
based with software embedded. With the advent of Software – Defined Networking (SDN),
software is separated from the hardware thus making it more adaptable to the ever-changing
nature of the computer network.
Functions of Network Software

 Helps to set up and install computer networks


 Enables users to have access to network resources in a seamless manner
 Allows administrations to add or remove users from the network
 Helps to define locations of data storage and allows users to access that data
 Helps administrators and security system to protect the network from data breaches,
unauthorized access and attacks on a network
 Enables network virtualizations

SDN Framework
The Software Defined Networking framework has three layers as depicted in the following
diagram −

 APPLICATION LAYER − SDN applications reside in the Application Layer. The


applications convey their needs for resources and services to the control layer through
APIs.
 CONTROL LAYER − The Network Control Software, bundled into the Network
Operating System, lies in this layer. It provides an abstract view of the underlying
network infrastructure. It receives the requirements of the SDN applications and
relays them to the network components.
 INFRASTRUCTURE LAYER − Also called the Data Plane Layer, this layer
contains the actual network components. The network devices reside in this layer that
shows their network capabilities through the Control to data-Plane Interface.

ISO/ OSI Model

o OSI stands for Open System Interconnection is a reference model that describes
how information from a software application in one computer moves through a
physical medium to the software application in another computer.
o OSI consists of seven layers, and each layer performs a particular network function.
o OSI model was developed by the International Organization for Standardization (ISO)
in 1984, and it is now considered as an architectural model for the inter-computer
communications.
o OSI model divides the whole task into seven smaller and manageable tasks. Each
layer is assigned a particular task.
o Each layer is self-contained, so that task assigned to each layer can be performed
independently.

Characteristics of OSI Model:

o The OSI model is divided into two layers: upper layers and lower layers.
o The upper layer of the OSI model mainly deals with the application related issues, and
they are implemented only in the software. The application layer is closest to the end
user. Both the end user and the application layer interact with the software
applications. An upper layer refers to the layer just above another layer.
o The lower layer of the OSI model deals with the data transport issues. The data link
layer and the physical layer are implemented in hardware and software. The physical
layer is the lowest layer of the OSI model and is closest to the physical medium. The
physical layer is mainly responsible for placing the information on the physical
medium.

Functions of the OSI Layers


There are the seven OSI layers. Each layer has different functions. A list of seven layers are
given below:

1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
Physical layer

o The main functionality of the physical layer is to transmit the individual bits from one
node to another node.
o It is the lowest layer of the OSI model.
o It establishes, maintains and deactivates the physical connection.
o It specifies the mechanical, electrical and procedural network interface specifications.

Functions of a Physical layer:

o Line Configuration: It defines the way how two or more devices can be connected
physically.
o Data Transmission: It defines the transmission mode whether it is simplex, half-
duplex or full-duplex mode between the two devices on the network.
o Topology: It defines the way how network devices are arranged.
o Signals: It determines the type of the signal used for transmitting the information.

Data-Link Layer
o This layer is responsible for the error-free transfer of data frames.
o It defines the format of the data on the network.
o It provides a reliable and efficient communication between two or more devices.
o It is mainly responsible for the unique identification of each device that resides on a
local network.
o It contains two sub-layers:
o Logical Link Control Layer
o It is responsible for transferring the packets to the Network layer of the
receiver that is receiving.
o It identifies the address of the network layer protocol from the header.
o It also provides flow control.
o Media Access Control Layer
o A Media access control layer is a link between the Logical Link
Control layer and the network's physical layer.
o It is used for transferring the packets over the network.

Functions of the Data-link layer

o Framing: The data link layer translates the physical's raw bit stream into packets
known as Frames. The Data link layer adds the header and trailer to the frame. The
header which is added to the frame contains the hardware destination and source
address.

o Physical Addressing: The Data link layer adds a header to the frame that contains a
destination address. The frame is transmitted to the destination address mentioned in
the header.
o Flow Control: Flow control is the main functionality of the Data-link layer. It is the
technique through which the constant data rate is maintained on both the sides so that
no data get corrupted. It ensures that the transmitting station such as a server with
higher processing speed does not exceed the receiving station, with lower processing
speed.
o Error Control: Error control is achieved by adding a calculated value CRC (Cyclic
Redundancy Check) that is placed to the Data link layer's trailer which is added to the
message frame before it is sent to the physical layer. If any error seems to occur, then
the receiver sends the acknowledgment for the retransmission of the corrupted frames.
o Access Control: When two or more devices are connected to the same
communication channel, then the data link layer protocols are used to determine
which device has control over the link at a given time.

Network Layer

o It is a layer 3 that manages device addressing, tracks the location of devices on the
network.
o It determines the best path to move data from source to the destination based on the
network conditions, the priority of service, and other factors.
o The Data link layer is responsible for routing and forwarding the packets.
o Routers are the layer 3 devices; they are specified in this layer and used to provide the
routing services within an internetwork.
o The protocols used to route the network traffic are known as Network layer protocols.
Examples of protocols are IP and Ipv6.

Functions of Network Layer:

o Internetworking: An internetworking is the main responsibility of the network layer.


It provides a logical connection between different devices.
o Addressing: A Network layer adds the source and destination address to the header
of the frame. Addressing is used to identify the device on the internet.
o Routing: Routing is the major component of the network layer, and it determines the
best optimal path out of the multiple paths from source to the destination.
o Packetizing: A Network Layer receives the packets from the upper layer and converts
them into packets. This process is known as Packetizing. It is achieved by internet
protocol (IP).
Transport Layer

o The Transport layer is a Layer 4 ensures that messages are transmitted in the order in
which they are sent and there is no duplication of data.
o The main responsibility of the transport layer is to transfer the data completely.
o It receives the data from the upper layer and converts them into smaller units known
as segments.
o This layer can be termed as an end-to-end layer as it provides a point-to-point
connection between source and destination to deliver the data reliably.

The two protocols used in this layer are:

o Transmission Control Protocol


o It is a standard protocol that allows the systems to communicate over the
internet.
o It establishes and maintains a connection between hosts.
o When data is sent over the TCP connection, then the TCP protocol divides the
data into smaller units known as segments. Each segment travels over the
internet using multiple routes, and they arrive in different orders at the
destination. The transmission control protocol reorders the packets in the
correct order at the receiving end.
o User Datagram Protocol
o User Datagram Protocol is a transport layer protocol.
o It is an unreliable transport protocol as in this case receiver does not send any
acknowledgment when the packet is received, the sender does not wait for any
acknowledgment. Therefore, this makes a protocol unreliable.
Functions of Transport Layer:

o Service-point addressing: Computers run several programs simultaneously due to


this reason, the transmission of data from source to the destination not only from one
computer to another computer but also from one process to another process. The
transport layer adds the header that contains the address known as a service-point
address or port address. The responsibility of the network layer is to transmit the data
from one computer to another computer and the responsibility of the transport layer is
to transmit the message to the correct process.
o Segmentation and reassembly: When the transport layer receives the message from
the upper layer, it divides the message into multiple segments, and each segment is
assigned with a sequence number that uniquely identifies each segment. When the
message has arrived at the destination, then the transport layer reassembles the
message based on their sequence numbers.
o Connection control: Transport layer provides two services Connection-oriented
service and connectionless service. A connectionless service treats each segment as an
individual packet, and they all travel in different routes to reach the destination. A
connection-oriented service makes a connection with the transport layer at the
destination machine before delivering the packets. In connection-oriented service, all
the packets travel in the single route.
o Flow control: The transport layer also responsible for flow control but it is performed
end-to-end rather than across a single link.
o Error control: The transport layer is also responsible for Error control. Error control
is performed end-to-end rather than across the single link. The sender transport layer
ensures that message reach at the destination without any error.

Session Layer
o It is a layer 3 in the OSI model.
o The Session layer is used to establish, maintain and synchronizes the interaction
between communicating devices.

Functions of Session layer:

o Dialog control: Session layer acts as a dialog controller that creates a dialog between
two processes or we can say that it allows the communication between two processes
which can be either half-duplex or full-duplex.
o Synchronization: Session layer adds some checkpoints when transmitting the data in
a sequence. If some error occurs in the middle of the transmission of data, then the
transmission will take place again from the checkpoint. This process is known as
Synchronization and recovery.

Presentation Layer

o A Presentation layer is mainly concerned with the syntax and semantics of the
information exchanged between the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from one
presentation format to another format.
o The Presentation layer is also known as the syntax layer.

Functions of Presentation layer:

o Translation: The processes in two systems exchange the information in the form of
character strings, numbers and so on. Different computers use different encoding
methods, the presentation layer handles the interoperability between the different
encoding methods. It converts the data from sender-dependent format into a common
format and changes the common format into receiver-dependent format at the
receiving end.
o Encryption: Encryption is needed to maintain privacy. Encryption is a process of
converting the sender-transmitted information into another form and sends the
resulting message over the network.
o Compression: Data compression is a process of compressing the data, i.e., it reduces
the number of bits to be transmitted. Data compression is very important in
multimedia such as text, audio, video.

Application Layer

o An application layer serves as a window for users and application processes to access
network service.
o It handles issues such as network transparency, resource allocation, etc.
o An application layer is not an application, but it performs the application layer
functions.
o This layer provides the network services to the end-users.

Functions of Application layer:

o File transfer, access, and management (FTAM): An application layer allows a user
to access the files in a remote computer, to retrieve the files from a computer and to
manage the files in a remote computer.
o Mail services: An application layer provides the facility for email forwarding and
storage.
o Directory services: An application provides the distributed database sources and is
used to provide that global information about various objects.

TCP/IP model

o The TCP/IP model was developed prior to the OSI model.


o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer,
network layer, data link layer and physical layer.
o The first four layers provide physical standards, network interface, internetworking,
and transport functions that correspond to the first four layers of the OSI model and
these four layers are represented in TCP/IP model by a single layer called the
application layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of them
provides specific functionality.

Here, hierarchical means that each upper-layer protocol is supported by two or more lower-
level protocols.

Functions of TCP/IP layers:

Network Access Layer

o A network layer is the lowest layer of the TCP/IP model.


o A network layer is the combination of the Physical layer and Data Link layer defined
in the OSI reference model.
o It defines how the data should be sent physically through the network.
o This layer is mainly responsible for the transmission of the data between two devices
on the same network.
o The functions carried out by this layer are encapsulating the IP datagram into frames
transmitted by the network and mapping of IP addresses into physical addresses.
o The protocols used by this layer are Ethernet, token ring, FDDI, X.25, frame relay.

Internet Layer

o An internet layer is the second layer of the TCP/IP model.


o An internet layer is also known as the network layer.
o The main responsibility of the internet layer is to send the packets from any network,
and they arrive at the destination irrespective of the route they take.

Following are the protocols used in this layer are:

IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire
TCP/IP suite.

Following are the responsibilities of this protocol:

o IP Addressing: This protocol implements logical host addresses known as IP


addresses. The IP addresses are used by the internet and higher layers to identify the
device and to provide internetwork routing.
o Host-to-host communication: It determines the path through which the data is to be
transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the
transport layer protocol. An IP protocol ensures that the data is sent and received
securely, it encapsulates the data into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram
by data link layer protocol is known as Maximum Transmission unit (MTU). If the
size of IP datagram is greater than the MTU unit, then the IP protocol splits the
datagram into smaller units so that they can travel over the local network.
Fragmentation can be done by the sender or intermediate router. At the receiver side,
all the fragments are reassembled to form an original message.
o Routing: When IP datagram is sent over the same local network such as LAN, MAN,
WAN, it is known as direct delivery. When source and destination are on the distant
network, then the IP datagram is sent indirectly. This can be accomplished by routing
the IP datagram through various devices such as routers.

ARP Protocol

o ARP stands for Address Resolution Protocol.


o ARP is a network layer protocol which is used to find the physical address from the IP
address.
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the
device, it broadcasts the ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP request
and process the request, but only recipient recognize the IP address and sends
back its physical address in the form of ARP reply. The recipient adds the
physical address both to its cache memory and to the datagram header

ICMP Protocol

o ICMP stands for Internet Control Message Protocol.


o It is a mechanism used by the hosts or routers to send notifications regarding
datagram problems back to the sender.
o A datagram travels from router-to-router until it reaches its destination. If a router is
unable to route the data because of some unusual conditions such as disabled links, a
device is on fire or network congestion, then the ICMP protocol is used to inform the
sender that the datagram is undeliverable.
o An ICMP protocol mainly uses two terms:
o ICMP Test: ICMP Test is used to test whether the destination is reachable or
not.
o ICMP Reply: ICMP Reply is used to check whether the destination device is
responding or not.
o The core responsibility of the ICMP protocol is to report the problems, not correct
them. The responsibility of the correction lies with the sender.
o ICMP can send the messages only to the source, but not to the intermediate routers
because the IP datagram carries the addresses of the source and destination but not of
the router that it is passed to.
Transport Layer

The transport layer is responsible for the reliability, flow control, and correction of data
which is being sent over the network.

The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.

o User Datagram Protocol (UDP)


o It provides connectionless service and end-to-end delivery of transmission.
o It is an unreliable protocol as it discovers the errors but not specify the error.
o User Datagram Protocol discovers the error, and ICMP protocol reports the
error to the sender that user datagram has been damaged.
o UDP consists of the following fields:
o
Source port address: The source port address is the address of the application
program that has created the message.
o
Destination port address: The destination port address is the address of the
application program that receives the message.
Total length: It defines the total number of bytes of the user datagram in
bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum; it
does not contain any ID of a data segment.

o Transmission Control Protocol (TCP)


o It provides a full transport layer services to applications.
o It creates a virtual circuit between the sender and receiver, and it is active for
the duration of the transmission.
o TCP is a reliable protocol as it detects the error and retransmits the damaged
frames. Therefore, it ensures all the segments must be received and
acknowledged before the transmission is considered to be completed and a
virtual circuit is discarded.
o At the sending end, TCP divides the whole message into smaller units known
as segment, and each segment contains a sequence number which is required
for reordering the frames to form an original message.
o At the receiving end, TCP collects all the segments and reorders them based
on sequence numbers.

Application Layer

o An application layer is the topmost layer in the TCP/IP model.


o It is responsible for handling high-level protocols, issues of representation.
o This layer allows the user to interact with the application.
o When one application layer protocol wants to communicate with another application
layer, it forwards its data to the transport layer.
o There is an ambiguity occurs in the application layer. Every application cannot be
placed inside the application layer except those who interact with the communication
system. For example: text editor cannot be considered in application layer while web
browser using HTTP protocol to interact with the network where HTTP protocol is
an application layer protocol.

Following are the main protocols used in the application layer:

o HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to
access the data over the world wide web. It transfers the data in the form of plain text,
audio, video. It is known as a Hypertext transfer protocol as it has the efficiency to
use in a hypertext environment where there are rapid jumps from one document to
another.
o SNMP: SNMP stands for Simple Network Management Protocol. It is a framework
used for managing the devices on the internet by using the TCP/IP protocol suite.
o SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that
supports the e-mail is known as a Simple mail transfer protocol. This protocol is used
to send the data to another e-mail address.
o DNS: DNS stands for Domain Name System. An IP address is used to identify the
connection of a host to the internet uniquely. But, people prefer to use the names
instead of addresses. Therefore, the system that maps the name to the address is
known as Domain Name System.
o TELNET: It is an abbreviation for Terminal Network. It establishes the connection
between the local computer and remote computer in such a way that the local terminal
appears to be a terminal at the remote system.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used
for transmitting the files from one computer to another computer.
o

Network Standardization
Protocol :

Protocols are set of rules . Such that Communication between Sender and Receiver is not
possible without Protocol.

Standards :

Standards are the set of rules for data communication that are needed for exchange of
information among devices. It is important to follow Standards which are created by
various Standard Organization like IEEE, ISO, and ANSI etc.

Types of Standards:
Standards are of two types:
 De Facto Standard.
 De Jure Standard.

De Facto Standard : The meaning of the work ” De Facto ” is ” By Fact ” or “By


Convention”.
These are the standard s that have not been approved by any Organization , but have been
adopted as Standards because of it‟s widespread use. Also , sometimes these standards are
often established by Manufacturers.
For example : Apple and Google are two companies which established their own rules
on their products which are different . Also they use some same standard rules for
manufacturing for their products.
De Jure Standard : The meaning of the word “De Jure” is “By Law” or “By
Regulations” .
Thus , these are the standards that have been approved by officially recognized body like
ANSI , ISO , IEEE etc. These are the standard which are important to follow if it is
required or needed.

For example : All the data communication standard protocols like SMTP , TCP , IP ,
UDP etc. are important to follow the same when we needed them.
Network Standards
Networking standards define the rules for data communications that are needed for
interoperability of networking technologies and processes. Standards help in creating and
maintaining open markets and allow different vendors to compete on the basis of the quality
of their products while being compatible with existing market products.
During data communication, a number of standards may be used simultaneously at the
different layers. The commonly used standards at each layer are −

 Application layer − HTTP, HTML, POP, H.323, IMAP


 Transport layer − TCP, SPX
 Network layer −IP, IPX
 Data link layer − Ethernet IEEE 802.3, X.25, Frame Relay
 Physical layer −RS-232C (cable), V.92 (modem)
Types of Standards
Standards are of two types

 De facto − these are the standards that are followed without any formal plan or
approval by any organization. They have come into existence due to traditions or
facts. For example, the HTTP had started as a de facto standard.
 De jure − these standards are the ones which have been adopted through legislation
by any officially recognized standards organization. Most of the communication
standards that are used today are de jure standards.
Standards Organizations
Some of the noted standards organizations are

 International Standards Organization (ISO)


 International Telecommunication Union (ITU)
 Institute of Electronics and Electrical Engineers (IEEE)
 American National Standards Institute (ANSI)
 Internet Research Task Force (IETF)
 Electronic Industries Association (EIA)

Transmission media

o Transmission media is a communication channel that carries the information from the
sender to the receiver. Data is transmitted through the electromagnetic signals.
o The main functionality of the transmission media is to carry the information in the
form of bits through LAN(Local Area Network).
o It is a physical path between transmitter and receiver in data communication.
o In a copper-based network, the bits in the form of electrical signals.
o In a fibre based network, the bits in the form of light pulses.
o In OSI(Open System Interconnection) phase, transmission media supports the Layer
1. Therefore, it is considered to be as a Layer 1 component.
o The electrical signals can be sent through the copper wire, fibre optics, atmosphere,
water, and vacuum.
o The characteristics and quality of data transmission are determined by the
characteristics of medium and signal.
o Transmission media is of two types are wired media and wireless media. In wired
media, medium characteristics are more important whereas, in wireless media, signal
characteristics are more important.
o Different transmission media have different properties such as bandwidth, delay, cost
and ease of installation and maintenance.
o The transmission media is available in the lowest layer of the OSI reference model,
i.e., Physical layer.

Some factors need to be considered for designing the transmission media:

o Bandwidth: All the factors are remaining constant, the greater the bandwidth of a
medium, the higher the data transmission rate of a signal.
o Transmission impairment: When the received signal is not identical to the
transmitted one due to the transmission impairment. The quality of the signals will get
destroyed due to transmission impairment.
o Interference: Interference is defined as the process of disrupting a signal when it
travels over a communication medium on the addition of some unwanted signal.

Causes Of Transmission Impairment:

o Attenuation: Attenuation means the loss of energy, i.e., the strength of the signal
decreases with increasing the distance which causes the loss of energy.
o Distortion: Distortion occurs when there is a change in the shape of the signal. This
type of distortion is examined from different signals having different frequencies.
Each frequency component has its own propagation speed, so they reach at a different
time which leads to the delay distortion.
o Noise: When data is travelled over a transmission medium, some unwanted signal is
added to it which creates the noise.

Classification of Transmission Media:

Guided Media

It is defined as the physical medium through which the signals are transmitted. It is also
known as Bounded media.

Types of Guided media:

Twisted pair:

Twisted pair is a physical media made up of a pair of cables twisted with each other. A
twisted pair cable is cheap as compared to other transmission media. Installation of the
twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted pair
cable is from 0 to 3.5KHz.

A twisted pair consists of two insulated copper wires arranged in a regular spiral pattern. The
degree of reduction in noise interference is determined by the number of turns per foot.
Increasing the number of turns per foot decreases noise interference.
Types of Twisted pair:

Unshielded Twisted Pair:

An unshielded twisted pair is widely used in telecommunication. Following are the categories
of the unshielded twisted pair cable:

o Category 1: Category 1 is used for telephone lines that have low-speed data.
o Category 2: It can support upto 4Mbps.
o Category 3: It can support upto 16Mbps.
o Category 4: It can support upto 20Mbps. Therefore, it can be used for long-distance
communication.
o Category 5: It can support upto 200Mbps.

Advantages Of Unshielded Twisted Pair:

o It is cheap.
o Installation of the unshielded twisted pair is easy.
o It can be used for high-speed LAN.

Disadvantage:

o This cable can only be used for shorter distances because of attenuation.

Shielded Twisted Pair

A shielded twisted pair is a cable that contains the mesh surrounding the wire that allows the
higher transmission rate.

Characteristics of Shielded Twisted Pair:

o The cost of the shielded twisted pair cable is not very high and not very low.
o An installation of STP is easy.
o It has higher capacity as compared to unshielded twisted pair cable.
o It has a higher attenuation.
o It is shielded that provides the higher data transmission rate.

Disadvantages

o It is more expensive as compared to UTP and coaxial cable.


o It has a higher attenuation rate.

Coaxial Cable

o Coaxial cable is very commonly used transmission media, for example, TV wire is
usually a coaxial cable.
o The name of the cable is coaxial as it contains two conductors parallel to each other.
o It has a higher frequency as compared to Twisted pair cable.
o The inner conductor of the coaxial cable is made up of copper, and the outer
conductor is made up of copper mesh. The middle core is made up of non-conductive
cover that separates the inner conductor from the outer conductor.
o The middle core is responsible for the data transferring whereas the copper mesh
prevents from the EMI(Electromagnetic interference).

Coaxial cable is of two types:

1. Baseband transmission: It is defined as the process of transmitting a single signal at


high speed.
2. Broadband transmission: It is defined as the process of transmitting multiple signals
simultaneously.

Advantages of Coaxial cable:

o The data can be transmitted at high speed.


o It has better shielding as compared to twisted pair cable.
o It provides higher bandwidth.

Disadvantages of Coaxial cable:

o It is more expensive as compared to twisted pair cable.


o If any fault occurs in the cable causes the failure in the entire network.
Fibre Optic

o Fiber optic cable is a cable that uses electrical signals for communication.
o Fiber optic is a cable that holds the optical fibers coated in plastic that are used to
send the data by pulses of light.
o The plastic coating protects the optical fibers from heat, cold, electromagnetic
interference from other types of wiring.
o Fiber optics provides faster data transmission than copper wires.

Diagrammatic representation of fiber optic cable:

Basic elements of Fiber optic cable:

o Core: The optical fiber consists of a narrow strand of glass or plastic known as a core.
A core is a light transmission area of the fiber. The more the area of the core, the more
light will be transmitted into the fiber.
o Cladding: The concentric layer of glass is known as cladding. The main functionality
of the cladding is to provide the lower refractive index at the core interface as to cause
the reflection within the core so that the light waves are transmitted through the fiber.
o Jacket: The protective coating consisting of plastic is known as a jacket. The main
purpose of a jacket is to preserve the fiber strength, absorb shock and extra fiber
protection.

Following are the advantages of fiber optic cable over copper:

o Greater Bandwidth: The fiber optic cable provides more bandwidth as compared
copper. Therefore, the fiber optic carries more data as compared to copper cable.
o Faster speed: Fiber optic cable carries the data in the form of light. This allows the
fibre optic cable to carry the signals at a higher speed.
o Longer distances: The fiber optic cable carries the data at a longer distance as
compared to copper cable.
o Better reliability: The fiber optic cable is more reliable than the copper cable as it is
immune to any temperature changes while it can cause obstruct in the connectivity of
copper cable.
o Thinner and Sturdier: Fiber optic cable is thinner and lighter in weight so it can
withstand more pull pressure than copper cable.

Fiber Optic Cable

A fiber-optic cable is made of glass or plastic and transmits signals in the form of light.

For better understanding we first need to explore several aspects of the nature of light.

Light travels in a straight line as long as it is mobbing through a single uniform substance. If
ray of light travelling through one substance suddenly enters another substance (of a different
density), the ray changes direction.

The below figure shows how a ray of light changes direction when it is travelling from a
more dense medium to a less dense medium or substance.

Bending of a light ray

As the figure shows:

 If the angle of incidence I (the angle the ray makes with the line perpendicular to the
interface between the two substances) is less than the critical angle, the
ray refracts and moves closer to the surface.
 If the angle of incidence is greater than the critical angle, the ray reflects (makes a
turn) and travels again in the denser substance.

 If the angle of incidence is equal to the critical angle, the ray refracts and moves
parallel to the surface as shown.

Note: The critical angle is a property of the substance, and its value differs from one
substance to another.
Optical fibers use reflection to guide light through a channel. A glass or plastic core is
surrounded by a cladding of less dense glass or plastic. The difference in density of the two
materials must be such that a beam of light moving through the core is reflected off the
cladding instead of being refracted into it.

Internal view of an Optical fiber

Propagation Modes of Fiber Optic Cable

Current technology supports two modes (Multimode and Single mode) for propagating light
along optical channels, each requiring fiber with different physical characteristics. Multimode
can be implemented in two forms: Step-index and Graded-index.
Multimode Propagation Mode
Multimode is so named because multiple beams from a light source move through the core in
different paths. How these beams move within the cable depends on the structure of the core
as shown in the below figure.

 In multimode step-index fibre, the density of the core remains constant from the
centre to the edges. A beam of light moves through this constant density in a straight
line until it reaches the interface of the core and the cladding. The term step-index
refers to the suddenness of this change, which contributes to the distortion of the
signal as it passes through the fibre.

 In multimode graded-index fibre, this distortion gets decreases through the cable.
The word index here refers to the index of refraction. This index of refraction is
related to the density. A graded-index fibre, therefore, is one with varying densities.
Density is highest at the centre of the core and decreases gradually to its lowest at the
edge.

Single Mode
Single mode uses step-index fiber and a highly focused source of light that limits beams to a
small range of angles, all close to the horizontal. The single-mode fiber itself is manufactured
with a much smaller diameter than that of multimode fiber, and with substantially lower
density. The decrease in density results in a critical angle that is close enough to 90 degree to
make the propagation of beams almost horizontal.

Fiber Sizes for Fiber Optic Cable

Optical fibers are defined by the ratio of the diameter or their core to the diameter of their
cladding, both expressed in micrometers. The common sizes are shown in the figure below:
Fiber Optic Cable Connectors

There are three types of connectors for fiber-optic cables, as shown in the figure below.

The Subscriber Channel(SC) connector is used for cable TV. It uses push/pull locking
system. The Straight-Tip(ST) connector is used for connecting cable to the networking
devices. MT-RJ is a connector that is the same size as RJ45.

Advantages of Fibre Optic Cable


Fibre optic has several advantages over metallic cable:

 Higher bandwidth

 Less signal attenuation

 Immunity to electromagnetic interference

 Resistance to corrosive materials

 Light weight

 Greater immunity to tapping


Disadvantages of Fibre Optic Cable
There are some disadvantages in the use of optical fibre:

 Installation and maintenance

 Unidirectional light propagation

 High Cost

Performance of Fibre Optic Cable


Attenuation is flatter than in the case of twisted-pair cable and coaxial cable. The
performance is such that we need fewer (actually one tenth as many) repeaters when we use
the fibre-optic cable.

Applications of Fibre Optic Cable

 Often found in backbone networks because its wide bandwidth is cost-effective.

 Some cable TV companies use a combination of optical fibre and coaxial cable thus
creating a hybrid network.

 Local-area Networks such as 100Base-FX network and 1000Base-X also use fibre-
optic cable.

UnGuided Transmission

o An unguided transmission transmits the electromagnetic waves without using any


physical medium. Therefore it is also known as wireless transmission.
o In unguided media, air is the media through which the electromagnetic energy can
flow easily.

Unguided transmission is broadly classified into three categories:

Radio waves

o Radio waves are the electromagnetic waves that are transmitted in all the directions of
free space.
o Radio waves are omnidirectional, i.e., the signals are propagated in all the directions.
o The range in frequencies of radio waves is from 3Khz to 1 khz.
o In the case of radio waves, the sending and receiving antenna are not aligned, i.e., the
wave sent by the sending antenna can be received by any receiving antenna.
o An example of the radio wave is FM radio.
Applications Of Radio waves:

o A Radio wave is useful for multicasting when there is one sender and many receivers.
o An FM radio, television, cordless phones are examples of a radio wave.

Advantages of Radio transmission:

o Radio transmission is mainly used for wide area networks and mobile cellular phones.
o Radio waves cover a large area, and they can penetrate the walls.
o Radio transmission provides a higher transmission rate.

Microwaves

Microwaves are of two types:

o Terrestrial microwave
o Satellite microwave communication.

Terrestrial Microwave Transmission


o Terrestrial Microwave transmission is a technology that transmits the focused beam of
a radio signal from one ground-based microwave transmission antenna to another.
o Microwaves are the electromagnetic waves having the frequency in the range from
1GHz to 1000 GHz.
o Microwaves are unidirectional as the sending and receiving antenna is to be aligned,
i.e., the waves sent by the sending antenna are narrowly focused.
o In this case, antennas are mounted on the towers to send a beam to another antenna
which is km away.
o It works on the line of sight transmission, i.e., the antennas mounted on the towers are
the direct sight of each other.

Characteristics of Microwave:

o Frequency range: The frequency range of terrestrial microwave is from 4-6 GHz to
21-23 GHz.
o Bandwidth: It supports the bandwidth from 1 to 10 Mbps.
o Short distance: It is inexpensive for short distance.
o Long distance: It is expensive as it requires a higher tower for a longer distance.
o Attenuation: Attenuation means loss of signal. It is affected by environmental
conditions and antenna size.

Advantages of Microwave:

o Microwave transmission is cheaper than using cables.


o It is free from land acquisition as it does not require any land for the installation of
cables.
o Microwave transmission provides an easy communication in terrains as the
installation of cable in terrain is quite a difficult task.
o Communication over oceans can be achieved by using microwave transmission.

Disadvantages of Microwave transmission:

o Eavesdropping: An eavesdropping creates insecure communication. Any malicious


user can catch the signal in the air by using its own antenna.
o Out of phase signal: A signal can be moved out of phase by using microwave
transmission.
o Susceptible to weather condition: A microwave transmission is susceptible to
weather condition. This means that any environmental change such as rain, wind can
distort the signal.
o Bandwidth limited: Allocation of bandwidth is limited in the case of microwave
transmission.

Satellite Microwave Communication

o A satellite is a physical object that revolves around the earth at a known height.
o Satellite communication is more reliable nowadays as it offers more flexibility than
cable and fiber optic systems.
o We can communicate with any point on the globe by using satellite communication.

How Does Satellite work?

The satellite accepts the signal that is transmitted from the earth station, and it amplifies the
signal. The amplified signal is retransmitted to another earth station.

Advantages of Satellite Microwave Communication:

o The coverage area of a satellite microwave is more than the terrestrial microwave.
o The transmission cost of the satellite is independent of the distance from the centre of
the coverage area.
o Satellite communication is used in mobile and wireless communication applications.
o It is easy to install.
o It is used in a wide variety of applications such as weather forecasting, radio/TV
signal broadcasting, mobile communication, etc.

Disadvantages of Satellite Microwave Communication:

o Satellite designing and development requires more time and higher cost.
o The Satellite needs to be monitored and controlled on regular periods so that it
remains in orbit.
o The life of the satellite is about 12-15 years. Due to this reason, another launch of the
satellite has to be planned before it becomes non-functional.

Infrared
o An infrared transmission is a wireless technology used for communication over short
ranges.
o The frequency of the infrared in the range from 300 GHz to 400 THz.
o It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between a computer and cell phone resides
in the same closed area.

Characteristics of Infrared:

o It supports high bandwidth, and hence the data rate will be very high.
o Infrared waves cannot penetrate the walls. Therefore, the infrared communication in
one room cannot be interrupted by the nearby rooms.
o An infrared communication provides better security with minimum interference.
o Infrared communication is unreliable outside the building because the sun rays will
interfere with the infrared waves.

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.
Data Encoding
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.
The common types of line encoding are Unipolar, Polar, Bipolar, and Manchester.

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 PCMPCM. 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 ASKASK, Frequency Shift Keying FSKFSK, Phase Shift Keying PSKPSK,
etc., fall under this category.
 Digital data to Digital signals − There are several ways to map digital data to digital
signals. Some of them are –

A line code is the code used for data transmission of a digital signal over a transmission line.
This process of coding is chosen so as to avoid overlap and distortion of signal such as inter-
symbol interference.

Properties of Line Coding


Following are the properties of line coding −
 As the coding is done to make more bits transmit on a single signal, the bandwidth
used is much reduced.
 For a given bandwidth, the power is efficiently used.
 The probability of error is much reduced.
 Error detection is done and the bipolar too has a correction capability.
 Power density is much favorable.
 The timing content is adequate.
 Long strings of 1s and 0s is avoided to maintain transparency.
Types of Line Coding
There are 3 types of Line Coding

 Unipolar
 Polar
 Bi-polar

Unipolar Signaling
Unipolar signaling is also called as On-Off Keying or simply OOK.
The presence of pulse represents a 1 and the absence of pulse represents a 0.
There are two variations in Unipolar signaling −

 Non Return to Zero NRZNRZ


 Return to Zero RZRZ
Unipolar Non-Return to Zero NRZ
In this type of unipolar signaling, a High in data is represented by a positive pulse called
as Mark, which has a duration T0 equal to the symbol bit duration. A Low in data input has
no pulse.
The following figure clearly depicts this.
Advantages
The advantages of Unipolar NRZ are −

 It is simple.
 A lesser bandwidth is required.
Disadvantages
The disadvantages of Unipolar NRZ are −
 No error correction done.
 Presence of low frequency components may cause the signal droop.
 No clock is present.
 Loss of synchronization is likely to occur (especially for long strings of 1s and 0s).
Unipolar Return to Zero RZRZ
In this type of unipolar signaling, a High in data, though represented by a Mark pulse, its
duration T0 is less than the symbol bit duration. Half of the bit duration remains high but it
immediately returns to zero and shows the absence of pulse during the remaining half of the
bit duration.
Advantages
The advantages of Unipolar RZ are −

 It is simple.
 The spectral line present at the symbol rate can be used as a clock.
Disadvantages
The disadvantages of Unipolar RZ are −

 No error correction.
 Occupies twice the bandwidth as unipolar NRZ.
 The signal droop is caused at the places where signal is non-zero at 0 Hz.

Polar Signaling
There are two methods of Polar Signaling. They are −

 Polar NRZ
 Polar RZ
Polar NRZ
In this type of Polar signaling, a High in data is represented by a positive pulse, while a Low
in data is represented by a negative pulse. The following figure depicts this well.

Advantages
The advantages of Polar NRZ are −

 It is simple.
 No low-frequency components are present.
Disadvantages
The disadvantages of Polar NRZ are −
 No error correction.
 No clock is present.
 The signal droop is caused at the places where the signal is non-zero at 0 Hz.
Polar RZ
In this type of Polar signaling, a High in data, though represented by a Mark pulse, its
duration T0 is less than the symbol bit duration. Half of the bit duration remains high but it
immediately returns to zero and shows the absence of pulse during the remaining half of the
bit duration.
However, for a Low input, a negative pulse represents the data, and the zero level remains
same for the other half of the bit duration. The following figure depicts this clearly.

Advantages
The advantages of Polar RZ are −

 It is simple.
 No low-frequency components are present.
Disadvantages
The disadvantages of Polar RZ are −
 No error correction.
 No clock is present.
 Occupies twice the bandwidth of Polar NRZ.
 The signal droop is caused at places where the signal is non-zero at 0 Hz.

Bipolar Signaling
This is an encoding technique which has three voltage levels namely +, - and 0. Such a signal
is called as duo-binary signal.
An example of this type is Alternate Mark Inversion AMIAMI. For a 1, the voltage level
gets a transition from + to – or from – to +, having alternate 1s to be of equal polarity.
A 0 will have a zero voltage level.
Even in this method, we have two types.

 Bipolar NRZ
 Bipolar RZ
From the models so far discussed, we have learnt the difference between NRZ and RZ. It just
goes in the same way here too. The following figure clearly depicts this.

The above figure has both the Bipolar NRZ and RZ waveforms. The pulse duration and
symbol bit duration are equal in NRZ type, while the pulse duration is half of the symbol bit
duration in RZ type.
Advantages
Following are the advantages −
 It is simple.
 No low-frequency components are present.
 Occupies low bandwidth than unipolar and polar NRZ schemes.
 This technique is suitable for transmission over AC coupled lines, as signal drooping
doesn‟t occur here.
 A single error detection capability is present in this.
Disadvantages
Following are the disadvantages −

 No clock is present.
 Long strings of data causes loss of synchronization.

Non Return to Zero NRZ


NRZ Codes has 1 for High voltage level and 0 for Low voltage level. The main behavior of
NRZ codes is that the voltage level remains constant during bit interval. The end or start of a
bit will not be indicated and it will maintain the same voltage state, if the value of the
previous bit and the value of the present bit are same.
The following figure explains the concept of NRZ coding.

If the above example is considered, as there is a long sequence of constant voltage level and
the clock synchronization may be lost due to the absence of bit interval, it becomes difficult
for the receiver to differentiate between 0 and 1.
There are two variations in NRZ namely −

NRZ - L NRZ–Level
There is a change in the polarity of the signal, only when the incoming signal changes from 1
to 0 or from 0 to 1. It is the same as NRZ, however, the first bit of the input signal should
have a change of polarity.

NRZ - I NRZ–Inversion
If a 1 occurs at the incoming signal, then there occurs a transition at the beginning of the bit
interval. For a 0 at the incoming signal, there is no transition at the beginning of the bit
interval.
NRZ codes has a disadvantage that the synchronization of the transmitter clock with the
receiver clock gets completely disturbed, when there is a string of 1s and 0s. Hence, a
separate clock line needs to be provided.

Bi-phase Encoding
The signal level is checked twice for every bit time, both initially and in the middle. Hence,
the clock rate is double the data transfer rate and thus the modulation rate is also doubled.
The clock is taken from the signal itself. The bandwidth required for this coding is greater.
There are two types of Bi-phase Encoding.

 Bi-phase Manchester
 Differential Manchester
Bi-phase Manchester
In this type of coding, the transition is done at the middle of the bit-interval. The transition
for the resultant pulse is from High to Low in the middle of the interval, for the input bit 1.
While the transition is from Low to High for the input bit 0.
Differential Manchester
In this type of coding, there always occurs a transition in the middle of the bit interval. If
there occurs a transition at the beginning of the bit interval, then the input bit is 0. If no
transition occurs at the beginning of the bit interval, then the input bit is 1.
The following figure illustrates the waveforms of NRZ-L, NRZ-I, Bi-phase Manchester and
Differential Manchester coding for different digital inputs.

Block Coding
Among the types of block coding, the famous ones are 4B/5B encoding and 8B/6T encoding.
The number of bits are processed in different manners, in both of these processes.
4B/5B Encoding
In Manchester encoding, to send the data, the clocks with double speed is required rather than
NRZ coding. Here, as the name implies, 4 bits of code is mapped with 5 bits, with a
minimum number of 1 bits in the group.
The clock synchronization problem in NRZ-I encoding is avoided by assigning an equivalent
word of 5 bits in the place of each block of 4 consecutive bits. These 5-bit words are
predetermined in a dictionary.
The basic idea of selecting a 5-bit code is that, it should have one leading 0 and it should
have no more than two trailing 0s. Hence, these words are chosen such that two
transactions take place per block of bits.
8B/6T Encoding
We have used two voltage levels to send a single bit over a single signal. But if we use more
than 3 voltage levels, we can send more bits per signal.
For example, if 6 voltage levels are used to represent 8 bits on a single signal, then such
encoding is termed as 8B/6T encoding. Hence in this method, we have as many as
729 3636 combinations for signal and 256 2828 combinations for bits.
These are the techniques mostly used for converting digital data into digital signals by
compressing or coding them for reliable transmission of data.

MODEM
A modem is a box-type device that connects your home/office network directly to the
internet. The router is also a box-type device that enables multiple computer systems (either
wired or wireless) to simultaneously use the internet. Nowadays, both the devices are
integrated and usually provided by the ISP(Internet Service Provider)

when we take the new internet plan. But to get the internet connection for our home/office
network, we need both modem and router either integrated or individual. Although most of
the time people get confused to identify both the devices, both devices have two different
roles on a network.
o A modem is a device that modulates or demodulates the signal. It maintains a
dedicated connection with the ISP to get the internet connection for home or
business.

o It acts as a bridge between the internet/telephone line and the computer.


o The reason to use the modem for an internet connection is that both the internet and
the computer take two different signals. It means that the internet sends the analog
signal, but the computer system can only understand the digital signal. So, we need a
device that can convert an analog signal to a digital signal and vice versa. To do this,
we need a modem.
o It modulates the incoming analog signal from the internet to digital signal and directs
it to the computer, and vice versa.
o Usually, we get the modem from the ISP only when we take a new internet plan.
o It also performs data compression, error correction and controls the flow of
information. It speed-up the process of transmission of data by grouping the data and
send it in one go.
o
Working of a MODEM

As you must have understood till now that modem is responsible for modulating and
demodulating the signal. The working principle of the modem is based on the same process.

The modem is placed between the telephone line and the computer system or router. It
connects the devices with the Ethernet port given in it. It connects the ISP(internet service
provider) to the home network directly for the single PC. Or it is connected with the router to
connect with multiple devices.
The below diagram is converting the incoming analog signal coming from telephone-
lines/optical fiber to a digital signal and sending it to the PC. Without a modem, we cannot
connect to the internet.

Types of Modem
The modem can be of various types based on data transmission and how it is installed. These
types are given below:

1. External Modem:

o The external modem is connected outside the computer system using a serial cable.
o The installation is very easy, and it also provides a high data transmission rate.
o It is expensive but still used due to its high-speed data transmission in offices, mostly
to avoid interruption in network connectivity.

2. Internal Modem:

o As its name suggests, the internal modem is installed over a PC's motherboard, termed
as the internal modem.
o It looks similar to an electronic circuit and mounted into an expansion slot of the
motherboard.
o The installation is complex, and its data transmission speed is also slow; hence it is
used for the dedicated computer in homes/ or small spaces.

3. Wireless Modem
o Wireless modems are connected to the computer systems without any cable, and most
people use these modems for their personal use.
o These modems use radio frequencies to transmit the data through the air and also
provides good transmission speed.

4. Dial-up Modem

o Dial-up modem establishes the internet connection by connecting the ISP to the
computer using the conventional telephone line.
o It uses a PSTN facility (Public Switched telephone network) and provides a
transmission speed of 56kb/sec.

5. Cable Modem

o The cable modem is known as the broadband device as it allows the computer to
communicate with ISP over a landline connection.
o It is connected with the landline connection using the coaxial cable and with the
computer using the Ethernet.

6. DSL Modem

o DSL stands for Digital Subscriber line that allows the transmission of data over the
normal telephone line.
o It provides a high data transmission speed, hence widely used in offices/homes.
o It can be used to connect to a computer or router to provide the internet connection
through the Ethernet port or USB port.
o The DSL modems are of two types:
o ADSL Modem
o SDSL Modem

7. Satellite Modem

o Satellite modems are expensive modems and do not require any telephone connection
for the internet.
o It uses satellite technology to send or receive the data.
o The speed of the modem is comparatively slower than DSL or cable Modem.
8. Half-duplex Modem

o As the name suggests, it allows transmitting the data in one direction only at a time.
o It means if it is receiving the signal from one end, at that time, it will stop receiving
the signal at another end. Once the transmission of one end is completed, then only
the other end can transmit the data.

9. Full Duplex Modem

o The full-duplex modems can transmit the data from both ends at the same time.
o

o It means it can receive the data from one end and the other end simultaneously
without any interruption.

10. Four-wire Modem

o It splits the pair of wires for incoming and outgoing data carriers.
o With this split, it can transmit the same frequency on both ends.

11. Two-wire Modem


o It uses a pair of wires hence called two-wire modems. Only these two wires are used
for incoming and outgoing carriers.
Functions of Modem

There are mainly two functions that a modem performs, which are given below:

o Modulate and demodulate the electrical signal from analog to digital and digital to
analog.
o Provide a secure connection to protect against line overload and other connection
problems.
Advantages of Modems

o The modem enables us to use the internet connection to connect with the entire world.
o Speed is dependent on the cost of the modem.
o
RS-232 Interface

RS-232 is an interface for the interchange of serial binary data between two devices.
It is a standard protocol used for serial communication; it is used for connecting a
computer and its peripheral devices to allow serial data exchange between them.
RS232 Protocol – Basics
RS232 is one of the most widely used techniques to interface external equipment with
computers. RS232 is a Serial Communication Standard developed by the Electronic Industry
Association (EIA) and Telecommunications Industry Association (TIA).

RS232 defines the signals connecting between DTE and DCE. Here, DTE stands for Data
Terminal Equipment and an example for DTE is a computer. DCE stands for Data
Communication Equipment or Data Circuit Terminating Equipment and an example for DCE
is a modem.

RS232 was introduced in 1960‟s and was originally known as EIA Recommended Standard
232. RS232 is one of the oldest serial communication standards with ensured simple
connectivity and compatibility across different manufacturers. Originally, the DTEs in RS32
are electromechanical typewriters and DCEs are modems.

RS232 uses serial communication, where one bit of data is sent at a time along a single data
line. This is contrast to parallel communication, where multiple bits of data are sent at a time
using multiple data lines.
The advantage of using serial communication over parallel communication is the number of
wires required to make a full duplex data transmission will be very less (two wires are
sufficient without considering electrical lines).
RS232 has become a de facto standard for computer and instrumentation devices since it was
standardized in the year 1962 by EIA and as a result, it became the most widely used
communication standard.
But the main drawback of RS232 standard is data rate and length of cable. RS232 supports a
maximum baud rate of 19200 bps and the maximum length of the cable is 20 meters.

RS232
Officially, the RS232 standard is called EIA/TIA – 232 and is defined as the interface
between a DTE and a DCE devices employing serial binary data interchange. RS232 is
considered to be a appropriate standard. This is because RS232 ensures that there is no
conflict between the DTE and DCE devices by specifying:
 Electrical Specifications
 Mechanical Specifications
 Functional Specifications and
 Procedural Specifications

All these specifications provide us different parameters like common voltage levels, signal
levels, pin wiring specifications, control data between the host device and its peripheral etc.
Let us see about the different specifications in detail.

Electrical Characteristics
The electrical characteristics of RS232 defines the specifications related to voltage levels,
line impedance and rate of change of signal levels.
Voltage Levels
RS232 was defined way before TTL logic and hence, it is not unexpected that RS232 doesn‟t
use the TTL specific 5V and GND logic levels.

The logic „1‟ in RS232 is described as being in the voltage range of -15V to -3V and logic „0‟
is described as the voltage range of +3V to +15V i.e. low level voltage is logic „1‟ and high
level voltage is logic „0‟.

Typically, the logic „1‟ in RS232 will be -12V and logic „0‟ will be +12V. All the above
mentioned voltages are with respect to a common ground „GND‟ pin. Any voltage between -
3V and +3V is considered to be an undefined logic state.

Historically, logic ‟1‟ (-15V to -3V) is referred to as Marking and logic „0‟ (+3V to +15V) is
referred to as Spacing.

Slew Rate
The other important electrical characteristic is the rate of change of signal levels i.e. the Slew
Rate. The maximum slew rate in RS232 is limited to 30V/µs. Also, a maximum bit rate of 20
Kbps is also defined.

These limitations of the standard help in reducing the cross – talk with adjacent signals.

Line Impedance
The line impedance i.e. impedance of the wire between the DTE and DCE devices is
specified to be around 3Ω to 7Ω.

Also, the original RS232 standard specifies the maximum length of the cable as 15 meters but
the revised standards specify the maximum length in terms of capacitance per unit length.

Mechanical Specifications

The Mechanical Specifications of RS232 covers the mechanical interface of the standard. The
RS232 standard specifies a 25 – pin D – Type connector to support the full functionality of
RS232.
The following image shows a DB25 Connector. The DTE device uses a female outer casing
with male pins and the DCE device uses a male outer casing with female pins.

There are three types of signals in RS232. They are data, control and ground. The following
table shows the list of pins, their direction in communication along with their signal type.
As the electronic equipment and devices are getting smaller, we do not have room for larger
connector like DB25 and most common applications do not require all the 25 pins in the
connector. Hence, a reduced function 9 – pin connector is used commonly.

The 9 – pin connector is called as DE-9 (often wrongly called as DB-9) and it is a D – Type
subminiature (D- Sub) connector. The following image shows the DE-9 male and female
connectors.

The pins in DE-9 connector, their names and description are given in the following table.
Functional Specifications

Since RS232 is considered a complete standard, it defines more than electrical and
mechanical characteristics. RS232 standard also defines the functions of different signals
used in the interface.
The signals are classified as: Common, Data, Timing and Control Signals.

Procedural Specifications

The Procedural Specifications of RS232 specify the sequence of operations that must be
carried out when a DTE and DCE are connected.

Assume a computer (DTE) is connected to a Modem (DCE) through RS232 interface. In


order to send data from computer to Modem, the following procedure must be followed.

 When Modem (DCE) is ready to receive, it will send a DCE ready signal.
 When the computer (DTE) is ready to send the data, it sends a Ready to Send (RTS)
signal.
 The Modem (DCE) then sends a Clear to Send (CTS) signal to indicate that data can
be sent by computer (DTE).
 Finally, the Computer (DTE) sends data on Transmit Data (TD) line to the Modem
(DCE).

Practical Implementation of RS232


The voltage levels of RS232 are very different from most of the systems designed today.
Hence, we need a level converter of some sorts to implement RS232 interface. This job is
performed by dedicated level converter ICs like MAX232 by Maxim Integrated for example.

These ICs take in the RS232 signals and generate a TTL level voltages. These ICs also invert
the signals as low voltage levels in RS232 are logic „1‟ and high voltage levels in RS232 are
logic „0‟. The following image shows the implementation of RS232 Driver in a real time
application.
Here, the UART (Universal Asynchronous Receiver Transmitter) generates and receives the
necessary signals for serial communication and the RS232 Driver is responsible for
converting signals between TTL and RS232 interface.

The communication system mentioned in this example is of asynchronous type and it requires
synchronization bits i.e. Start and Stop and error checking bit i.e. Parity. The UART in the
above example is responsible for generating the Start, Stop and Parity bits when transmitting
the data and also detecting errors while receiving data.

The following image illustrates a typical RS232 application between a Computer and a
Modem. Here, the PC or Computer is the DTE and the Modem is the DCE.

The Computer and Modem communicate with each other using RS232 interface and the
communication between the modems is established using telecommunication links.
How RS232 Works?
In RS232, the data is transmitted serially in one direction over a single data line. In order to
establish two way communication, we need at least three wires (RX, TX and GND) apart
from the control signals. A byte of data can transmitted at any time provided the previous
byte has already been transmitted.

RS232 follows asynchronous communication protocol i.e. there is no clock signal to


synchronize transmitter and receiver. Hence, it uses start and stop bits to inform the receiver
when to check for data.

There is a delay of certain time between the transmissions of each bit. This delay is nothing
but an inactive state i.e. the signal is set to logic „1‟ i.e. -12V (if you remember, logic „1‟ in
RS232 is -12V and logic „0‟ is +12V).

First, the transmitter i.e. the DTE sends a Start bit to the receiver i.e. the DCE to inform it that
data transmission starts from next bit. The Start bit is always „0‟ i.e. +12V. The next 5 to 9
characters are data bits.

If parity bit is used, a maximum of 8 bits can be transmitted. If parity isn‟t used, then 9 data
bits can be transmitted. After the data is transmitted, the transmitter sends the stop bits. It can
be either 1 bit or 1.5 bits or 2 bits long. The following image shows the frame format of the
RS232 protocol.

Though RS232 is considered to be a complete standard, many manufacturers may not abide
by the standards. Some manufacturers may implement the complete specifications and some
implement just a partial specification.

The reason behind this variation in implementation of the RS232 standard is that not all
devices and applications require the full specifications and functionality of the RS232
Protocol. For example, a serial Modem using RS232 may require more control lines than a
serial Mouse using serial port.
Then how does the Transmitter and Receiver, which might use different set of specifications,
successfully transmit or receive the data? A process called Handshaking is used for this
purpose.
Handshaking

Handshaking is a process of dynamically setting the parameters of a communication between


the transmitter and receiver before the communication begins.
The need for handshaking is dictated by the speed at with the transmitter (DTE) transmits the
data, the speed at which the receiver (DCE) receives the data and the rate at which the data is
transmitted.
In an asynchronous data transmission system, there can be no handshaking, hardware
handshaking and software handshaking.

No Handshaking

If handshaking is not used, then the receiver (DCE) must read the data that is already
received by it before the transmitter (DTE) sends the next data. For this, the receiver uses a
special memory location called Buffer and since it is used at receiver end, it is called
Receiver Buffer.

The received data is stored in the buffer before it is read by the receiver. The Receiver Buffer
can typically store a single bit of data and this data must be cleared (read) before the next data
arrives and if it is not cleared, the existing data will be overwritten with the new data.
The following image shows a typical transmission and reception of data using transmitter and
receiver buffers. In this setup, the receiver has successfully read the first three bits of data but
did not read the fourth bit. Hence, the next bit i.e. the fifth bit will overwrite the fourth bit and
the fourth bit is lost.

To avoid situations like this, we need some sort of Handshaking mechanism (either Software
or Hardware Handshaking).

Hardware Handshaking
In Hardware Handshaking, the transmitter first asks the receiver whether it is ready to receive
the data. The receiver then checks its buffer and if the buffer is empty, it will then tell the
transmitter that it is ready to receive.

The transmitter will transmit the data and it is loaded into the receiver buffer. During this
time, the receiver tells the transmitter not to send any further data until the data in the buffer
has been read by the receiver.

The RS232 Protocol defines four signals for the purpose of Handshaking:

 Ready to Send (RTS)


 Clear to Send (CTS)
 Data Terminal Ready (DTR) and
 Data Set Ready (DSR)

The following image shows the connection between a 9 – pin Transmitter (DTE) and 25 – pin
Receiver (DCE) and a 9 – pin Transmitter and a 9 – pin Receiver in hardware handshaking
mode.

With the help of Hardware Handshaking, the data from the transmitter is never lost or
overwritten in the receiver buffer. When the transmitter (DTE) wants to send data, it pulls the
RTS (Ready to Send) line to high.

Then the transmitter waits for CTS (Clear to Send) to go high and hence it keeps on
monitoring it. If the CTS line is low, it means that the receiver (DCE) is busy and not yet
ready to receive data.

When the receiver is ready, it pulls the CTS line to high. The transmitter then transmits the
data. This method is also called as RTS/CTS Handshaking.
Though RS232 is considered to be a complete standard, many manufacturers may not abide
by the standards. Some manufacturers may implement the complete specifications and some
implement just a partial specification.

The reason behind this variation in implementation of the RS232 standard is that not all
devices and applications require the full specifications and functionality of the RS232
Protocol. For example, a serial Modem using RS232 may require more control lines than a
serial Mouse using serial port.

Then how does the Transmitter and Receiver, which might use different set of specifications,
successfully transmit or receive the data? A process called Handshaking is used for this
purpose.

Handshaking
Handshaking is a process of dynamically setting the parameters of a communication between
the transmitter and receiver before the communication begins.
The need for handshaking is dictated by the speed at with the transmitter (DTE) transmits the
data, the speed at which the receiver (DCE) receives the data and the rate at which the data is
transmitted.

In an asynchronous data transmission system, there can be no handshaking, hardware


handshaking and software handshaking.

No Handshaking

If handshaking is not used, then the receiver (DCE) must read the data that is already
received by it before the transmitter (DTE) sends the next data. For this, the receiver uses a
special memory location called Buffer and since it is used at receiver end, it is called
Receiver Buffer.
The received data is stored in the buffer before it is read by the receiver. The Receiver Buffer
can typically store a single bit of data and this data must be cleared (read) before the next data
arrives and if it is not cleared, the existing data will be overwritten with the new data.
The following image shows a typical transmission and reception of data using transmitter and
receiver buffers. In this setup, the receiver has successfully read the first three bits of data but
did not read the fourth bit. Hence, the next bit i.e. the fifth bit will overwrite the fourth bit and
the fourth bit is lost.

To avoid situations like this, we need some sort of Handshaking mechanism (either Software

or Hardware Handshaking).

Hardware Handshaking
In Hardware Handshaking, the transmitter first asks the receiver whether it is ready to receive
the data. The receiver then checks its buffer and if the buffer is empty, it will then tell the
transmitter that it is ready to receive.

The transmitter will transmit the data and it is loaded into the receiver buffer. During this
time, the receiver tells the transmitter not to send any further data until the data in the buffer
has been read by the receiver.

The RS232 Protocol defines four signals for the purpose of Handshaking:
 Ready to Send (RTS)
 Clear to Send (CTS)
 Data Terminal Ready (DTR) and
 Data Set Ready (DSR)

The following image shows the connection between a 9 – pin Transmitter (DTE) and 25 – pin
Receiver (DCE) and a 9 – pin Transmitter and a 9 – pin Receiver in hardware handshaking
mode.
With the help of Hardware Handshaking, the data from the transmitter is never lost or
overwritten in the receiver buffer. When the transmitter (DTE) wants to send data, it pulls the
RTS (Ready to Send) line to high.

Then the transmitter waits for CTS (Clear to Send) to go high and hence it keeps on
monitoring it. If the CTS line is low, it means that the receiver (DCE) is busy and not yet
ready to receive data.

When the receiver is ready, it pulls the CTS line to high. The transmitter then transmits the
data. This method is also called as RTS/CTS Handshaking.

Additionally, there are two other wires used in Handshaking. They are DTR (Data Terminal
Ready) and DSR (Data Set Ready). These two signals are used by the DTE and DCE to
indicate their individual status. Often, these two signals are used in modem communication.
The newer standards of RS232 define an 8 signal Hardware Handshaking.

Software Handshaking
Software Handshaking in RS232 involves two special characters for starting and stopping the
communication. These characters are X-ON and X-OFF (Transmitter On and Transmitter
OFF).
When the receiver sends an X-OFF signal, the transmitter stops sending the data. The
transmitter starts sending data only after it receives the X-ON signal.

Limitations of RS232

 RS232 Protocol requires a common ground between the transmitter (DTE) and
receiver (DCE). Hence, the reason for shorter cables between DTE and DCE in
RS232 Protocol.

 The signal in the line is highly susceptible to noise. The noise can be either internal or
external.

 If there is an increase in baud rate and length of the cable, there is a chance of cross
talk introduced by the capacitance between the cables.

 The voltage levels in RS232 are not compatible with modern TTL or CMOS logics.
We need an external level converter.

Applications

 Though RS232 is a very famous serial communication protocol, it is now has been
replaced with advanced protocols like USB.
 Previously they we used for serial terminals like Mouse, Modem etc.
 But, RS232 is still being used in some Servo Controllers, CNC Machines, PLC
machines and some microcontroller boards use RS232 Protocol.

You might also like