Overview of Computer Networks Basics
Overview of Computer Networks Basics
UNIT – I
INTRODUCTION
Network Hardware
Network Software
OSI
TCP/IP Reference Models
Example Networks - Arpanet
Internet
PHYSICAL LAYER
Guided Transmission Media
Twisted Pairs
Coaxial Cable
Fiber Optics
Wireless Transmission
INTRODUCTION
A network is a set of devices (often referred to as nodes)
connected by communication links. A node can be a
computer, printer, or any other device capable of sending
and/or receiving data generated by other nodes on the
network.
“Computer network’’ to mean a collection of autonomous
computers interconnected by a single technology. Two
computers are said to be interconnected if they are able to
exchange information.
The connection need not be via a copper wire; fiber
optics, microwaves, infrared, and communication
satellites can also be used.
Networks come in many sizes, shapes and forms, as
we will see [Link] are usually connected together to
make larger networks with the Internet being the most
well-known example of a network of networks.
There is considerable confusion in the literature between
a computer network and a distributed system.
The key distinction is that in a distributed system, a
collection of independent computers appears to its users
as a single coherent system. Usually, it has a single model
or paradigm that it presents to the users. Often a layer of
software on top of the operating system, called
middleware, is responsible for implementing this model.
A well-known example of a distributed system is the
World Wide Web.
It runs on top of the Internet and presents a model in
which everything looks like a document (Web page).
USES OF COMPUTER NETWORKS
1. BUSINESS APPLICATIONS
To distribute information throughout the company
(resource sharing). sharing physical resources such as
printers, and tape backup systems, is sharing
information client-server model.
It is widely used and forms the basis of much network
usage communication medium among employees.
Email (electronic mail),which employees generally use
for a great deal of daily communication.
Telephone calls between employees may be carried by
the computer network instead of by the phone company.
This technology is called IP telephony or Voice over IP
(VoIP) when Internet technology is used.
Desktop sharing lets remote workers see and interact
with a graphical computer screen doing business
electronically, especially with customers and suppliers.
This new model is called e-commerce (electronic
commerce) and it has grown rapidly in recent years.
2. HOME APPLICATIONS
peer-to-peer communication
person-to-person communication
electronic commerce
entertainment. (game playing,)
3. MOBILE USERS
Text messaging or texting
Smart phones
GPS (Global Positioning System)
m-commerce
NFC (Near Field Communication)
4. SOCIAL ISSUES
With the good comes the bad, as this new-found
freedom brings with it many unsolved social, political,
and ethical issues. Social networks, message boards,
content sharing sites.
CLSSIFICSTION OF COMPUTER NETWORKS
1. Based on Transmission Mode
2. Based on Type of Connection
3. Based on Topology
4. Types of Network based on size
1) BASED ON TRANSMISSION MODE
Communication between two devices can be simplex,
half-duplex, or full-duplex as shown in Figure.
Simplex
In simplex mode, the communication is unidirectional,
as on a one-way street. Only one of the two devices on
a link can transmit; the other canonly receive (Figure a).
Keyboards and traditional monitors are examples of
simplex devices.
Half-Duplex
In half-duplex mode, each station can both transmit and
receive, but not at the same time. When one device is
sending, the other can only receive, and vice versa (Figure
b). Walkie-talkies and CB (citizens band) radios are both
half- duplex systems.
Full-Duplex
In full-duplex, both stations can transmit and receive
simultaneously (Figure c). One common example of full-
duplex communication is the telephone [Link]
two people are communicating by a telephone line,
both can talk andlisten at the same time. The full-duplex
mode is used when communication inboth directions is
required all the time.
2. BASED ON TYPE OF CONNECTION
There are two possible types of connections: point-to-
point and multipoint.
Point-to-Point A point-to-point connection provides a
dedicated link between two devices. The entire capacity
of the link is reserved for transmission between those
two devices. Most point-to-point connections use an
actual length of wire or cable to connect the two
ends, but
other options, such as microwave or satellite links, are
also possible
When you change television channels by infrared remote
control, you are establishing a point-to-point connection
between the remote control and the television's control
system.
Multipoint A multipoint (also called multi-drop)
connection is one in which more than two specific devices
share a single link
In a multipoint environment, the capacity of the channel
is shared, either spatially or temporally. If several
devices can use the link simultaneously, it is a spatially
shared connection. If users must take turns, it is a time
shared connection.
3. BASED ON TOPOLOGY
I) Physical Topology
The term physical topology refers to the way in which a
network is laid out physically.
Two or more devices connect to a link; two or more links
form a topology. The topology of a network is the
geometric representation of the relationship of all the
links and linking devices (usually called nodes) to one
another.
There are four basic topologies possible: mesh, star, bus,
and ring.
MESH TOPOLOGY
A mesh topology is the one where every node is
connected to every other node in the network. A mesh
topology can be a full mesh topology or a partially
connected mesh topology.
The number of connections in this network can be
calculated using the following formula (n is the
number of computers in the network): n(n-1)/2
In a partially connected mesh topology, at least two of the
computers in the network have connections to multiple
other computers in that network. It is an inexpensive way
to implement redundancy in a network. In the event that
one of the primary computers or connections in the
network fails, the rest of the network continues to operate
normally.
Advantages of a mesh topology
Can handle high amounts of traffic, because multiple
devices can transmit data simultaneously.
A failure of one device does not cause a break in the
network or transmission of data.
Adding additional devices does not disrupt data
transmission between other devices.
Disadvantages of a mesh topology
The cost to implement is higher than other network
topologies, making it a less desirable option.
Building and maintaining the topology is difficult and
time consuming.
STAR TOPOLOGY
RING TOPOLOGY
A ring topology is a network configuration in which
device connections create a circular data path. In a ring
network, packets of data travel from one device to the
next until they reach their destination. Most ring
topologies allow packets to travel only in one direction,
called a unidirectional ring network. Others permit data
to move in either direction, called bidirectional.
The major disadvantage of a ring topology is that if any
individual connection in the ring is broken, the entire
network is affected.
Ring topologies may be used in either local area
networks (LANs) or wide areanetworks (WANs).
Advantages of ring topology
All data flows in one direction, reducing the chance of
packet collisions.
A network server is not needed to control network
connectivity between each workstation.
Data can transfer between workstations at high speeds.
Additional workstations can be added without
impacting performance ofthe network.
Disadvantages of ring topology
All data being transferred over the network must
pass through each workstation on the network, which
can make it slower than a star topology.
The entire network will be impacted if one workstation
shuts down.
The hardware needed to connect each workstation to
the network is moreexpensive than Ethernet cards and
hubs/switches.
II) HYBRID TOPOLOGY
A network can be hybrid. For example, we can have a
main star topology with each branch connecting several
stations in a bus topology as shown in Figure
4. TYPES OF NETWORK BASED ON SIZE
The types of network are classified based upon the size,
the area it covers andits physical architecture. The three
primary network categories are LAN, WAN and MAN.
Each network differs in their characteristics such as
distance, transmission speed, cables and cost.
Basic types
LAN (Local Area Network)
Group of interconnected computers within a small
area. (room, building,campus)
Two or more pc's can from a LAN to share files, folders,
printers, applications and other devices.
Coaxial or CAT 5 cables are normally used for
connections. Due to short distances, errors and noise are
minimum.
Data transfer rate is 10 to 100 mbps. Example: A
computer lab in a school. MAN (Metropolitan Area
Network)Design to extend over a large area.
Connecting number of LAN's to form larger network,
so that resources can beshared.
Networks can be up to 5 to 50 km. Owned by
organization or individual. Data transfer rate is low
compare to LAN.
Example: Organization with different branches located in
the city.
WAN (Wide Area Network)
Are country and worldwide network. Contains multiple
LAN's and MAN's.
Distinguished in terms of geographical range. Uses
satellites and microwave relays.
Data transfer rate depends upon the ISP provider and
varies over the location. Best example is the internet.
Other types
WLAN (Wireless LAN)
A LAN that uses high frequency radio waves for
communication. Provides short range connectivity with
high speed data transmission.
PAN (Personal Area Network)
Network organized by the individual user for its personal
use.
SAN (Storage Area Network) Connects servers to
data storage devices via fiber-optic cables.
NETWORK HARDWARE
Network hardware is a set of physical or network devices that
are essential for interaction and communication between
hardware units operational on a computer network. These are
dedicated hardware components that connect to each other and
enable a network to function effectively and efficiently.
Network devices, also known as networking hardware,
are physical devices that allow hardware on a computer
network to communicate and interact with one another. For
example, Repeater, Hub, Bridge, Switch, Routers, Gateway,
and NIC, etc.
Network hardware plays a key role as industries grow as it
supports scalability. It integrates any number of components
depending on the enterprise’s needs. Network hardware helps
establish an effective mode of communication, thereby
improving the business standards. It also promotes
multiprocessing and enables sharing of resources, information,
and software with ease.
Network equipment is part of advancements of the Ethernet
network protocol and utilizes a twisted pair or fiber cable as a
connection medium. Routers, hubs, switches, and bridges are
some examples of network hardware.
MODEMS: A modem enables a computer to connect to the
internet via a telephone line. The modem at one end converts
the computer’s digital signals into analog signals and sends
them through a telephone line. At the other end, it converts the
analog signals to digital signals that are understandable for
another computer.
ROUTERS: A router connects two or more networks. One
common use of the router is to connect a home or office
network (LAN) to the internet (WAN). It generally has a
plugged-in internet cable along with cables that connect
computers on the LAN. Alternatively, a LAN connection can
also be wireless (Wi-Fi-enabled), making the network device
wireless. These are also referred to as wireless access points
(WAPs).
HUBS, BRIDGES, AND SWITCHES: Hubs, bridges, and
switches are connecting units that allow multiple devices to
connect to the router and enable data transfer to all devices on
a network.
HUBS: A hub broadcasts data to all devices on a network. As
a result, it consumes a lot of bandwidth as many computers
might not need to receive the broadcasted data. The hub could
be useful in linking a few gaming consoles in a local
multiplayer game via a wired or wireless LAN.
BRIDGES: A bridge connects two separate LAN networks. It
scans for the receiving device before sending a message. This
implies that it avoids unnecessary data transfers if the receiving
device is not there. Moreover, it also checks to see whether the
receiving device has already received the message. These
practices improve the overall performance of the network.
SWITCHES: A switch is more powerful than a hub or a
bridge but performs a similar role. It stores the MAC addresses
of network devices and transfers data packets only to those
devices that have requested Thus, when the demand is high, a
switch becomes more efficient as it reduces the amount of
latency.
NETWORK INTERFACE CARDS: A network interface
card (NIC) is a hardware unit installed on a computer, which
allows it to connect to a network. It is typically in the form of a
circuit board or chip. In most modern machines, NICs are built
into the motherboards, while in some computers, an extra
expansion card in the form of a small circuit board is added
externally.
NETWORK CABLES: Cables connect different devices on a
network. Today, most networks have cables over a wireless
connection as they are more secure, i.e., less prone to attacks,
and at the same time carry larger volumes of data per second.
FIREWALL: A firewall is a hardware or software device
between a computer and the rest of the network open to
attackers or hackers. Thus, a LAN can be protected from
hackers by placing a firewall between the LAN and the internet
connection. A firewall allows authorized connections and data-
like emails or web pages to pass through but blocks
unauthorized connections made to a computer or LAN.
box
Antenna
Head end
Internet
Subnet
Router Transmission line
NETWORK SOFTWARE
Network software is an umbrella term used to describe a wide
range of software that streamlines the operations, design,
monitoring, and implementation of computer networks.
Network software is a fundamental element for any networking
system. It helps administrators and security personnel reduce
network complexities, and manage, monitor, and better control
network traffic.
Network software plays a crucial role in managing a network
infrastructure and simplifying IT operations by facilitating
communication, security, content, and data sharing.
The first computer networks were designed with the hardware
as the main concern and the software as an afterthought. This
strategy no longer works. Network software is now highly
structured.
Protocol Hierarchies
Design Issues for the Layers
Connection-Oriented Versus Connectionless Service
Service Primitives
The Relationship of Services to Protocols
FUNCTIONS OF NETWORK SOFTWARE
User management allows administrators to add or remove
users from the network. This is particularly useful when hiring
or relieving
File management lets administrators decide the location of
data storage and control user access to that data.
Access enables users to enjoy uninterrupted access to network
resources.
Network security systems assist administrators in looking
after security and preventing data breaches.
KEY COMPONENTS OF NETWORK SOFTWARE
Network software is an advanced, robust, and secure alternative
to traditional networking, making the network easier to
administer in terms of management, modifications,
configuration, supply resources, and troubleshooting. The use
of network software makes it possible to administer from one
centralized user interface while completely eliminating the
need to acquire additional hardware.
1. APPLICATION LAYER
The first component is the application layer or the application
plane, which refers to the applications and services running on
the network. It is a program that conveys network information,
the status of the network, and the network requirements for
particular resource availability and application.
This is done through the control layer via application
programming interfaces (APIs). The application layer also
consists of the application logic and one or more API drivers.
2. CONTROL LAYER
The control layer lies at the center of the architecture and is one
of the most important components of the three layers. You
could call it the brain of the whole system.
Also called the controller or the control plane, this layer also
includes the network control software and the network
operating system within it. It is the entity in charge of receiving
requirements from the applications and translating the same to
the network components.
The control of the infrastructure layer or the data plane devices
is also done via the controller. In simple terms, the control layer
is the intermediary that facilitates communication between the
top and bottom layers through APIs interfaces.
3. INFRASTRUCTURE LAYER
The infrastructure layer, also called the data plane, consists of
the actual network devices (both physical and virtual) that
reside in this layer. They are primarily responsible for moving
or forwarding the data packets after receiving due instructions
from the control layer.
In simple terms, the data plane in the network architecture
components physically handles user traffic based on the
commands received by the controller.
There are numerous types of network software available, with
most of them being categorized under the communications and
security arena. The varieties of network software differ based
on their key features and costs.
The main role of network software is to eliminate the
dependence on hardware by streamlining communications
across multiple devices, locations, and systems.
REFERENCE MODELS
We will discuss two important network architectures: the OSI
reference model and the TCP/IP reference model. Although the
protocols associated with the OSI model are not used any more,
the model itself is actually quite general and still valid, and the
features discussed at each layer are still very important. The
TCP/IP model has the opposite properties the model itself is not
of much use but the protocols are widely used.
APPLICATION LAYER
Contains all services or protocols needed by application
software or operating system to communicate on the
network
Examples
–Firefox web browser uses HTTP (Hyper-Text Transport
Protocol)
–E-mail program may use POP3 (Post Office Protocol
version 3) to read e-mails and SMTP (Simple Mail
Transport Protocol) to send e-mails
The interaction between layers in the OSI model
TCP/IP MODEL
TCP/IP stands for Model (Transmission Control
Protocol/Internet Protocol). A protocol suite is a large
number of related protocols that work together toallow
networked computers to communicate.
Whereas OSI reference model to the reference model used in
the grandparent of all wide area computer networks, the
ARPANET worldwide Internet.
THE INTERNET
The Internet has revolutionized many aspects of our daily
lives. It has affected the way we do business as well as
the way we spend our leisure time. Count the ways
you've used the Internet recently.
Perhaps you've sent electronic mail (e-mail) to a
business associate, paid a utility bill, read a newspaper
from a distant city, or looked up a local movie schedule-
all by using the Internet.
Or maybe you researched a medical topic, booked a
hotel reservation, chatted with a fellow Trekkie, or
comparison-shopped for a car.
The Internet is a communication system that has
brought a wealth of information to our fingertips and
organized it for our use.
A BRIEF HISTORY
A network is a group of connected communicating
devices such as computers and printers. An internet
(note the lowercase letter i) is two ormore networks that
can communicate with each other.
The most notable internet is called the Internet (uppercase
letter I), a collaboration of more than hundreds of
thousands of interconnected networks.
Private individuals as well as various organizations such
as government agencies, schools, research facilities,
corporations, and libraries in more than 100 countries use
the Internet. Millions of people are users. Yet this
extraordinary communication system only came into
being in 1969.
ARPANET
In the mid-1960s, mainframe computers in research
organizations were standalone devices. Computers from
different manufacturers were unable to communicate
with one another.
The Advanced Research Projects Agency (ARPA) in the
Department of Defense (DoD) was interested in finding a
way to connect computers so that the researchers they
funded could share theirfindings, thereby reducing costs
and eliminating duplication of effort.
In 1967, at an Association for Computing Machinery
(ACM) meeting, ARPA presented its ideas for
ARPANET, a small network of connected computers.
The idea was that each host computer (not necessarily
from the same manufacturer) would be attached to a
specialized computer, called an interface message
processor (IMP).
The IMPs, in tum, would be connected to one another.
Each IMP had to be able to communicate with other IMPs
as well as with its own attached host.
By 1969, ARPANET was a reality. Four nodes, at the
University of California at Los Angeles (UCLA), the
University of California at Santa Barbara (UCSB),
Stanford Research Institute (SRI), and the Universityof
Utah, were connected via the IMPs to form a network.
Software called the Network Control Protocol (NCP)
provided communication between the hosts.
In 1972, Vint Cerf and Bob Kahn, both of whom were
part of the core ARPANET group, collaborated on what
they called the Internetting Project.
Cerf and Kahn's landmark 1973 paper outlined the
protocols to achieve end- to-end delivery of packets. This
paper on Transmission Control Protocol (TCP) included
concepts such as encapsulation, the datagram, and the
functions ofa gateway.
Shortly thereafter, authorities made a decision to split
TCP into twoprotocols: Transmission Control Protocol
(TCP) and Internetworking Protocol (lP).
IP would handle datagram routing while TCP would be
responsible for higher-level functions such as
segmentation, reassembly, and error detection. The
internetworking protocol became known as TCPIIP.
The Internet Today
The Internet has come a long way since the 1960s. The
Internet today is not a simple hierarchical structure. It is
made up of many wide- and local-area networks joined
by connecting devices and switching stations.
It is difficult to give an accurate representation of the
Internet because it is continually changing-new networks
are being added, existing networks are adding addresses,
and networks of defunct companies are being removed.
Todaymost end users who want Internet connection use
the services of Internet service providers (lSPs).
There are international service providers, national service
providers, regional service providers, and local service
providers. The Internet today is run by private companies,
not the government. Figure shows a conceptual (not
geographic) view of the Internet.
International Internet Service Providers:
At the top of the hierarchy are the international service
providers that connect nations together.
National Internet Service Providers:
The national Internet service providers are backbone
networks created and maintained by specialized
companies.
There are many national ISPs operating in North
America; some of the most well-known are Sprint Link,
PSINet, UUNet Technology, AGIS, and internet Mel.
To provide connectivity between the end users, these
backbone networks are connected by complex switching
stations (normally run by a third party) called network
access points (NAPs).
Some national ISP networks are also connected to one
another by private switching stations called peering
points. These normally operate at a high data rate (up to
600 Mbps).
Regional Internet Service Providers:
Regional internet service providers or regional ISPs are
smaller ISPs that are connected to one or more national
ISPs. They are at the third level of the hierarchy with a
smaller data rate.
Local Internet Service Providers:
Local Internet service providers provide direct service to
the end users. The local ISPs can be connected to regional
ISPs or directly to national ISPs.
Most end users are connected to the local ISPs. Note that
in this sense, a local ISP can be a company that just
provides Internet services, a corporation witha network
that supplies services to its own employees, or a nonprofit
organization, such as a college or a university, that runs
its own network. Each of these local ISPs can be
connected to a regional or national service provider.
PHYSICAL LAYER
A transmission medium can be broadly defined as
anything that can carry information from a source to a
destination.
GUIDED MEDIA
Media are roughly grouped into guided media, such as copper
wire and fiber optics, and unguided media, such as terrestrial
wireless, satellite, and lasers through the air.
Guided media, which are those that provide a medium
fromone device to another, include twisted-pair cable,
coaxial cable, and fiber-optic cable. Each one has its own
niche in terms of bandwidth, delay, cost, and ease of installation
and maintenance.
TWISTED-PAIR CABLE
A twisted pair consists of two conductors (normally
copper), each with its own plastic insulation, twisted
together. One of the wires is used to carry signals to the
receiver, and the other is used only as a ground reference.
COAXIAL CABLE
Coaxial cable (or coax) carries signals of higher
frequency ranges than those in twisted pair cable.
Coax has a central core conductor of solid or stranded
wire (usually copper) enclosed in an insulating sheath,
which is, in turn, encased inan outer conductor of metal
foil, braid, or a combination of the two.
The outer metallic wrapping serves both as a shield
against noise and as the second conductor, which
completes the circuit.
This outer conductor is also enclosed in an insulating
sheath, and the whole cable is protected by a plastic
cover.
FIBER CONSTRUCTION
UNIT – II
DATA LINK LAYER
Design issues, framing
Error detection and correction
ELEMENTARY DATA LINK PROTOCOLS
simplex protocol
A simplex stop and wait protocol for an error-free
channel
A simplex stop and wait protocol for noisy channel
SLIDING WINDOW PROTOCOLS:
A one-bit sliding window protocol
A protocol using Go-Back-N
A protocol using Selective Repeat
Example data link protocols
MEDIUM ACCESS SUB LAYER
The channel allocation problem
MULTIPLE ACCESS PROTOCOLS
ALOHA
Carrier sense multiple access protocols
collision free protocols
Wireless LANs
Data link layer switching
DATA LINK LAYER FUNCTIONS
(SERVICES)
1) Providing services to the network layer
Unacknowledged connectionless service.
Appropriate for low error rate and real-time traffic. Ex:
Ethernet
Acknowledged connectionless service.
Useful in unreliable channels, Wi-Fi. Ack/Timer/Resend
Acknowledged connection-oriented service.
Guarantee frames are received exactly once and in the
right order. Appropriate over long, unreliable links such
as a satellite channel or a long- distance telephone circuit
2) Framing: Frames are the streams of bits received
from the network layer into manageable data units. This
division of stream of bits is done by DataLink Layer.
Physical Addressing: The Data Link layer adds a header
to the frame in order to define physical address of the
sender or receiver of the frame, if the frames are to be
distributed to different systems on the network.
3) Flow Control: A receiving node can receive the
frames at a faster rate than it can process the frame.
Without flow control, the receiver's buffer can
overflow, and frames can get lost. To overcome this
problem, the data link layer uses the flow control to
prevent the sending node on one side of the link from
overwhelming the receiving node on another side of the
[Link] prevents traffic jam at the receiver side.
4) Error Control: Error control is achieved by adding
a trailer(set of bits added at the end of a frame) at
the end of the frame. Duplication of frames are also
prevented by using this mechanism. Data Link Layers
adds mechanism to prevent duplication of frames.
5) Error detection: Errors can be introduced by signal
attenuation and noise. Data Link Layer protocol provides
a mechanism to detect one or more errors. This is
achieved by adding error detection bits in the frame
and then receiving node can perform an error check
FRAMING
To provide service to the network layer, the data link
layer must use the service provided to it by the physical
layer. What the physical layer does is accept a raw bit
stream and attempt to deliver it to the destination. This bit
stream is not guaranteed to be error free. The number of
bits received may be less than, equal to, or more than
the number of bits transmitted, and they may have
different values. It is up to the data link layer to detect
and, if necessary, correct errors. The usual approach is
for the data link layer to break the bit stream up into
discrete frames and compute the checksum for each frame
(framing). When a frame arrives at the destination, the
checksum is recomputed. If the newly computed
checksum is different from the one contained in the
frame, the data link layer knows that an error has occurred
and takes steps to deal with it (e.g., discarding the bad
frame and possibly also sending back an error report).
We will look at four framing methods:
Character count.
Flag bytes with byte stuffing.
Starting and ending flags, with bit stuffing.
Physical layer coding violations.
Character count method uses a field in the header to
specify the number of characters in the frame. When the
data link layer at the destination sees the character count,
it knows how many characters follow and hence where
the end of the frame is. This technique is shown in Fig.
(a) For four frames of sizes 5, 5, 8, and 8 characters,
respectively.
A character stream. (a) Without errors. (b) With one error
Flag bytes with byte stuffing method gets around the
problem of resynchronization after an error by having
each frame start and end with special bytes. In the past,
the starting and ending bytes were different, but in recent
years most protocols have used the same byte, called a
flag byte, as both the starting and ending delimiter, as
shown in Fig. (a) as FLAG.
In this way, if the receiver ever loses synchronization, it
can just search for the flag byte to find the end of the
current frame. Two consecutive flag bytes indicate the
end of one frame and start of the next one.
A frame delimited by flag bytes (b) Four examples of
byte sequences before and after byte stuffing
Starting and ending flags, with bit stuffing allows data
frames to contain an arbitrary number of bits and allows
character codes with an arbitrary number of bits per
character. It works like this. Each frame begins and
endswith a special bit pattern, 01111110 (in fact, a flag
byte).
Whenever the sender's data link layer encounters five
consecutive 1s in the data, it automatically stuffs a 0 bit
into the outgoing bit stream. This bit stuffing is analogous
to byte stuffing, in which an escape byte is stuffed into
the outgoing character stream before a flag byte in the
data.
When the receiver sees five consecutive incoming 1 bit,
followed by a 0 bit,it automatically de- stuffs (i.e., deletes)
the 0 bit. Just as byte stuffing is completely transparent to the
network layer in both computers, so is bit stuffing. If the
user data contain the flag pattern, 01111110, this flag
istransmitted as 011111010 but stored in the receiver's
memory as 01111110.
Fig: Bit stuffing. (a) The original data. (b) The data as
they appear on the line.
(c) The data as they are stored in the receiver's memory
after destuffing.
Physical layer coding violations method of framing is
only applicable to networks in which the encoding on
the physical medium contains some redundancy. For
example, some LANs encode 1 bit of data by using 2
physicalbits. Normally, a 1 bit is a high-low pair and a
0 bit is a low-high pair.
The scheme means that every data bit has a transition
in the middle, making it easy for the receiver to locate
the bit boundaries. The combinations high- high and low-
low are not used for data but are used for delimiting
frames insome protocols.
ERROR DETECTION
Error is a condition when the receiver’s information
does not match with the sender’s information. During
transmission, digital signals suffer from noise that can
introduce errors in the binary bits travelling from
sender to receiver. That means a 0 bit may change to
1 or a 1 b i t m a y c h a n g e t o 0 .
Error Detecting Codes (Implemented either at Data
link layer or Transport Layer of OSI Model)
Whenever a message is transmitted, it may get
scrambled by noise or data may get corrupted. To avoid
this, we use error-detecting codes which are additional
data added to a given digital message to help us detect
if any errorhas occurred during transmission of the
message.
Basic approach used for error detection is the use of
redundancy bits, where additional bits are added to
facilitate detection of errors. Some popular techniques for
error detection are:
1. Simple Parity check
2. Two-dimensional Parity check
3. Checksum
4. Cyclic redundancy check
1) Simple Parity check
Blocks of data from the source are subjected to a check
bit or parity bitgenerator form, where a parity of: 1 is
added to the block if it contains odd number of 1’s, and 0
is added if it contains even number of 1’sThis scheme
makes the total number of 1’s even, that is why it is called
even parity checking.
2) Two-dimensional Parity check
Parity check bits are calculated for each row, which is
equivalent to a simple parity check bit. Parity check bits
are also calculated for all columns, then both are sent
along with the data. At the receiving end these are
compared with the parity bits calculated on the received
data.
3) Checksum
In checksum error detection scheme, the data is divided
into k segmentseach of m bits. In the sender’s end
the segmentsare added using 1’s complement
arithmetic to get the sum. The sum is complemented to
get the checksum. The checksum segment is sent along
with the data segments.
At the receiver’s end, all received segments are added
using 1’s complement arithmetic to get the sum. The sum
is complemented.
If the result is zero, the received data is accepted;
otherwise discarded.
2r >=d+r+1
The value of r is calculated by using the above formula.
For example, if the value of d is 4, then the possible
smallest value that satisfies the above relation would be
3.
To determine the position of the bit which is in error, a
technique developed by R.W Hamming is Hamming code
which can be applied to any length of the dataunit and
uses the relationship between data units and redundant
units.