Professional Documents
Culture Documents
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
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.
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.
A Communication model is used to exchange data between two parties. For example:
communication between a computer, server and telephone (through modem).
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: 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:
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.
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.
Some of the most important uses of the Internet for home users are as follows:
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
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.
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.
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:
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.
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
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 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
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.
Intranet advantages:
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 is cost effective.
4. It is easy to understand.
2. If network traffic is heavy or nodes are more the performance of the network
decreases.
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.
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.
1. Transmitting network is not affected by high traffic or by adding more nodes, as only
the nodes having tokens can transmit data.
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
3. Easy to troubleshoot.
5. Only that node is affected which has failed, rest of the nodes can work smoothly.
2. Expensive to use.
3. If the hub fails then the whole network is stopped because all the nodes depend on the
hub.
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
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.
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.
1. Fully connected.
2. Robust.
3. Not flexible.
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. 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. Complex in design.
2. Costly.
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 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.
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.
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 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
SDN Framework
The Software Defined Networking framework has three layers as depicted in the following
diagram −
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
Here, hierarchical means that each upper-layer protocol is supported by two or more lower-
level protocols.
Internet Layer
IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire
TCP/IP suite.
ARP Protocol
ICMP Protocol
The transport layer is responsible for the reliability, flow control, and correction of data
which is being sent over the network.
The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.
Application Layer
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.
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 −
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
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.
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.
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.
Guided Media
It is defined as the physical medium through which the signals are transmitted. It is also
known as Bounded 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:
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.
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.
A shielded twisted pair is a cable that contains the mesh surrounding the wire that allows the
higher transmission rate.
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
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).
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.
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.
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.
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.
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.
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.
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.
Higher bandwidth
Light weight
Disadvantages of Fibre Optic Cable
There are some disadvantages in the use of optical fibre:
High Cost
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
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.
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
o Terrestrial microwave
o Satellite microwave communication.
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 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.
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.
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.
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.
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 −
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.
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.
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.
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.
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.
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.
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).
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.
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
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:
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.
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.