Computer Networs Notes
Computer Networs Notes
Networks
Data Communication
A system of interconnected computers and computerized peripherals such as
printers is called computer network. This interconnection among computers
facilitates information sharing among them. Computers may connect to each
other by either wired or wireless media.
Geographical span
Inter-connectivity
Administration
Architecture
Geographical Span
Geographically a network can be seen in one of the following categories:
Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.
Inter-Connectivity
Components of a network can be connected to each other differently in some
fashion. By connectedness we mean either logically , physically , or both ways.
Administration
From an administrator’s point of view, a network can be private network which
belongs a single autonomous system and cannot be accessed outside its
physical or logical domain.A network can be public which is accessed by all.
Network Architecture
Computer networks can be discriminated into various types such as
Client-Server,peer-to-peer or hybrid, depending upon its architecture.
There can be one or more systems acting as Server. Other being Client,
requests the Server to serve requests.Server takes and processes request
on behalf of Clients.
Two systems can be connected Point-to-Point, or in back-to-back fashion.
They both reside at the same level and called peers.
There can be hybrid network which involves network architecture of both
the above types.
Network Applications
Computer systems and peripherals are connected to form a network.They
provide numerous advantages:
LAN provides a useful way of sharing the resources between end users.The
resources such as printers, file servers, scanners, and internet are easily
sharable among computers.
Metro Ethernet is a service which is provided by ISPs. This service enables its
users to expand their Local Area Networks. For example, MAN can help an
organization to connect all of its offices in a city.
Backbone of MAN is high-capacity and high-speed fiber optics. MAN works in
between Local Area Network and Wide Area Network. MAN provides uplink for
LANs to WANs or internet.
Internetwork
A network of networks is called an internetwork, or simply the internet. It is the
largest network in existence on this planet.The internet hugely connects all
WANs and it can have connection to LANs and Home networks. Internet uses
TCP/IP protocol suite and uses IP as its addressing protocol. Present day,
Internet is widely implemented using IPv4. Because of shortage of address
spaces, it is gradually migrating from IPv4 to IPv6.
Internet enables its users to share and access enormous amount of information
worldwide. It uses WWW, FTP, email services, audio and video streaming etc. At
huge level, internet works on Client-Server model.
Internet uses very high speed backbone of fiber optics. To inter-connect various
continents, fibers are laid under sea known to us as submarine communication
cable.
Internet is widely deployed on World Wide Web services using HTML linked
pages and is accessible by client software known as Web Browsers. When a user
requests a page using some web browser located on some Web Server
anywhere in the world, the Web Server responds with the proper HTML page.
The communication delay is very low.
Internet is serving many proposes and is involved in many aspects of life. Some
of them are:
Web sites
E-mail
Instant Messaging
Blogging
Social Media
Marketing
Networking
Resource Sharing
Audio and Video Streaming
Ethernet
Ethernet is a widely deployed LAN technology.This technology was invented by
Bob Metcalfe and D.R. Boggs in the year 1970. It was standardized in IEEE 802.3
in 1980.
Ethernet shares media. Network which uses shared media has high probability
of data collision. Ethernet uses Carrier Sense Multi Access/Collision Detection
(CSMA/CD) technology to detect collisions. On the occurrence of collision in
Ethernet, all its hosts roll back, wait for some random amount of time, and then
re-transmit the data.
Fast-Ethernet
To encompass need of fast emerging software and hardware technologies,
Ethernet extends itself as Fast-Ethernet. It can run on UTP, Optical Fiber, and
wirelessly too. It can provide speed up to 100 MBPS. This standard is named as
100BASE-T in IEEE 803.2 using Cat-5 twisted pair cable. It uses CSMA/CD
technique for wired media sharing among the Ethernet hosts and CSMA/CA (CA
stands for Collision Avoidance) technique for wireless Ethernet LAN.
Giga-Ethernet
After being introduced in 1995, Fast-Ethernet could enjoy its high speed status
only for 3 years till Giga-Ethernet introduced. Giga-Ethernet provides speed up
to 1000 mbits/seconds. IEEE802.3ab standardize Giga-Ethernet over UTP using
Cat-5, Cat-5e and Cat-6 cables. IEEE802.3ah defines Giga-Ethernet over Fiber.
Virtual LAN
LAN uses Ethernet which in turn works on shared media. Shared media in
Ethernet create one single Broadcast domain and one single Collision domain.
Introduction of switches to Ethernet has removed single collision domain issue
and each device connected to switch works in its separate collision domain. But
even Switches cannot divide a network into separate Broadcast domains.
Point-to-Point
Point-to-point networks contains exactly two hosts such as computer, switches
or routers, servers connected back to back using a single piece of cable. Often,
the receiving end of one host is connected to sending end of the other and vice-
versa.
If the hosts are connected point-to-point logically, then may have multiple
intermediate devices. But the end hosts are unaware of underlying network and
see each other as if they are connected directly.
Bus Topology
In case of Bus topology, all devices share single communication line or cable.Bus
topology may have problem while multiple hosts sending data at the same time.
Therefore, Bus topology either uses CSMA/CD technology or recognizes one host
as Bus Master to solve the issue. It is one of the simple forms of networking
where a failure of a device does not affect the other devices. But failure of the
shared communication line can make all other devices stop functioning.
Both ends of the shared channel have line terminator. The data is sent in only
one direction and as soon as it reaches the extreme end, the terminator
removes the data from the line.
Star Topology
All hosts in Star topology are connected to a central device, known as hub
device, using a point-to-point connection. That is, there exists a point to point
connection between hosts and hub. The hub device can be any of the following:
As in Bus topology, hub acts as single point of failure. If hub fails, connectivity of
all hosts to all other hosts fails. Every communication between hosts, takes
place through only the hub.Star topology is not expensive as to connect one
more host, only one cable is required and configuration is simple.
Ring Topology
In ring topology, each host machine connects to exactly two other machines,
creating a circular network structure. When one host tries to communicate or
send message to a host which is not adjacent to it, the data travels through all
intermediate hosts. To connect one more host in the existing structure, the
administrator may need only one more extra cable.
Failure of any host results in failure of the whole ring.Thus, every connection in
the ring is a point of failure. There are methods which employ one more backup
ring.
Mesh Topology
In this type of topology, a host is connected to one or multiple hosts.This
topology has hosts in point-to-point connection with every other host or may
also have hosts which are in point-to-point connection to few hosts only.
Hosts in Mesh topology also work as relay for other hosts which do not have
direct point-to-point links. Mesh technology comes into two types:
Full Mesh: All hosts have a point-to-point connection to every other host
in the network. Thus for every new host n(n-1)/2 connections are required.
It provides the most reliable network structure among all network
topologies.
Partially Mesh: Not all hosts have point-to-point connection to every
other host. Hosts connect to each other in some arbitrarily fashion. This
topology exists where we need to provide reliability to some hosts out of
all.
Tree Topology
Also known as Hierarchical Topology, this is the most common form of network
topology in use presently.This topology imitates as extended Star topology and
inherits properties of bus topology.
Each link in daisy chain topology represents single point of failure. Every link
failure splits the network into two segments.Every intermediate host works as
relay for its immediate hosts.
Hybrid Topology
A network structure whose design contains more than one topology is said to be
hybrid topology. Hybrid topology inherits merits and demerits of all the
incorporating topologies.
The above picture represents an arbitrarily hybrid topology. The combining
topologies may contain attributes of Star, Ring, Bus, and Daisy-chain topologies.
Most WANs are connected by means of Dual-Ring topology and networks
connected to them are mostly Star topology networks. Internet is the best
example of largest Hybrid topology
Layered Tasks
In layered architecture of Network Model, one whole network process is divided
into small tasks. Each small task is then assigned to a particular layer which
works dedicatedly to process the task only. Every layer does only specific work.
In layered communication system, one layer of a host deals with the task done
by or to be done by its peer layer at the same level on the remote host. The task
is either initiated by layer at the lowest level or at the top most level. If the task
is initiated by the-top most layer, it is passed on to the layer below it for further
processing. The lower layer does the same thing, it processes the task and
passes on to lower layer. If the task is initiated by lower most layer, then the
reverse path is taken.
Every layer clubs together all procedures, protocols, and methods which it
requires to execute its piece of task. All layers identify their counterparts by
means of encapsulation header and tail.
OSI Model
Open System Interconnect is an open standard for all communication systems.
OSI model is established by International Standard Organization (ISO). This
model has seven layers:
Application Layer: This layer is responsible for providing interface to the
application user. This layer encompasses protocols which directly interact
with the user.
Presentation Layer: This layer defines how data in the native format of
remote host should be presented in the native format of host.
Session Layer: This layer maintains sessions between remote hosts. For
example, once user/password authentication is done, the remote host
maintains this session for a while and does not ask for authentication
again in that time span.
Transport Layer: This layer is responsible for end-to-end delivery
between hosts.
Network Layer: This layer is responsible for address assignment and
uniquely addressing hosts in a network.
Data Link Layer: This layer is responsible for reading and writing data
from and onto the line. Link errors are detected at this layer.
Physical Layer: This layer defines the hardware, cabling wiring, power
output, pulse rate etc.
Internet Model
Internet uses TCP/IP protocol suite, also known as Internet suite. This defines
Internet Model which contains four layered architecture. OSI Model is general
communication model but Internet Model is what the internet uses for all its
communication.The internet is independent of its underlying network
architecture so is its Model. This model has the following layers:
Application Layer: This layer defines the protocol which enables user to
interact with the network.For example, FTP, HTTP etc.
Transport Layer: This layer defines how data should flow between hosts.
Major protocol at this layer is Transmission Control Protocol (TCP). This
layer ensures data delivered between hosts is in-order and is responsible
for end-to-end delivery.
Internet Layer: Internet Protocol (IP) works on this layer. This layer
facilitates host addressing and recognition. This layer defines routing.
Link Layer: This layer provides mechanism of sending and receiving
actual data.Unlike its OSI Model counterpart, this layer is independent of
underlying network architecture and hardware.
All security threats are intentional i.e. they occur only if intentionally triggered.
Security threats can be divided into the following categories:
Interruption
Interruption is a security threat in which availability of resources is
attacked. For example, a user is unable to access its web-server or the
web-server is hijacked.
Privacy-Breach
In this threat, the privacy of a user is compromised. Someone, who is not
the authorized person is accessing or intercepting data sent or received
by the original authenticated user.
Integrity
This type of threat includes any alteration or modification in the original
context of communication. The attacker intercepts and receives the data
sent by the sender and the attacker then either modifies or generates
false data and sends to the receiver. The receiver receives the data
assuming that it is being sent by the original Sender.
Authenticity
This threat occurs when an attacker or a security violator, poses as a
genuine person and accesses the resources or communicates with other
genuine users.
No technique in the present world can provide 100% security. But steps can be
taken to secure data while it travels in unsecured network or internet. The most
widely used technique is Cryptography.
Secret Key
Public Key
Message Digest
Message Digest
In this method, actual data is not sent, instead a hash value is calculated and
sent. The other end user, computes its own hash value and compares with the
one just received.If both hash values are matched, then it is accepted otherwise
rejected.
Physical layer provides its services to Data-link layer. Data-link layer hands over
frames to physical layer. Physical layer converts them to electrical pulses, which
represent binary data.The binary data is then sent over the wired or wireless
media.
Signals
When data is sent over physical medium, it needs to be first converted into
electromagnetic signals. Data itself can be analog such as human voice, or
digital such as file on the disk.Both analog and digital data can be represented
in digital or analog signals.
Digital Signals
Digital signals are discrete in nature and represent sequence of voltage
pulses. Digital signals are used within the circuitry of a computer system.
Analog Signals
Analog signals are in continuous wave form in nature and represented by
continuous electromagnetic waves.
Transmission Impairment
When signals travel through the medium they tend to deteriorate. This may
have many reasons as given:
Attenuation
For the receiver to interpret the data accurately, the signal must be
sufficiently strong.When the signal passes through the medium, it tends to
get weaker.As it covers distance, it loses strength.
Dispersion
As signal travels through the media, it tends to spread and overlaps. The
amount of dispersion depends upon the frequency used.
Delay distortion
Signals are sent over media with pre-defined speed and frequency. If the
signal speed and frequency do not match, there are possibilities that
signal reaches destination in arbitrary fashion. In digital media, this is very
critical that some bits reach earlier than the previously sent ones.
Noise
Random disturbance or fluctuation in analog or digital signal is said to be
Noise in signal, which may distort the actual information being carried.
Noise can be characterized in one of the following class:
o Thermal Noise
Heat agitates the electronic conductors of a medium which may
introduce noise in the media. Up to a certain level, thermal noise is
unavoidable.
o Intermodulation
When multiple frequencies share a medium, their interference can
cause noise in the medium. Intermodulation noise occurs if two
different frequencies are sharing a medium and one of them has
excessive strength or the component itself is not functioning
properly, then the resultant frequency may not be delivered as
expected.
o Crosstalk
This sort of noise happens when a foreign signal enters into the
media. This is because signal in one medium affects the signal of
second medium.
o Impulse
This noise is introduced because of irregular disturbances such as
lightening, electricity, short-circuit, or faulty components. Digital
data is mostly affected by this sort of noise.
Transmission Media
The media over which the information between two computer systems is sent,
called transmission media. Transmission media comes in two forms.
Guided Media
All communication wires/cables are guided media, such as UTP, coaxial
cables, and fiber Optics. In this media, the sender and receiver are
directly connected and the information is send (guided) through it.
Unguided Media
Wireless or open air space is said to be unguided media, because there is
no connectivity between the sender and receiver. Information is spread
over the air, and anyone including the actual recipient may collect the
information.
Channel Capacity
The speed of transmission of information is said to be the channel capacity. We
count it as data rate in digital world. It depends on numerous factors such as:
Multiplexing
Multiplexing is a technique to mix and send multiple data streams over a single
medium. This technique requires system hardware called multiplexer (MUX) for
multiplexing the streams and sending them on a medium, and de-multiplexer
(DMUX) which takes information from the medium and distributes to different
destinations.
Switching
Switching is a mechanism by which data/information sent from source towards
destination which are not directly connected. Networks have interconnecting
devices, which receives data from directly connected sources, stores data,
analyze it and then forwards to the next interconnecting device closest to the
destination.
Digital-to-Digital Conversion
This section explains how to convert digital data into digital signals. It can be
done in two ways, line coding and block coding. For all communications, line
coding is necessary whereas block coding is optional.
Analog-to-Digital Conversion
Microphones create analog voice and camera creates analog videos, which are
treated is analog data. To transmit this analog data over digital signals, we need
analog to digital conversion.
Analog data is a continuous stream of data in the wave form whereas digital
data is discrete. To convert analog wave into digital data, we use Pulse Code
Modulation (PCM).
PCM is one of the most commonly used method to convert analog data into
digital form. It involves three steps:
Sampling
Quantization
Encoding.
Sampling
The analog signal is sampled every T interval. Most important factor in sampling
is the rate at which analog signal is sampled. According to Nyquist Theorem, the
sampling rate must be at least two times of the highest frequency of the signal.
Quantization
Encoding
Transmission Modes
The transmission mode decides how data is transmitted between two
computers.The binary data in the form of 1s and 0s can be sent in two different
modes: Parallel and Serial.
Parallel Transmission
The binary bits are organized in-to groups of fixed length. Both sender and
receiver are connected in parallel with the equal number of data lines. Both
computers distinguish between high order and low order data lines. The sender
sends all the bits at once on all lines.Because the data lines are equal to the
number of bits in a group or data frame, a complete group of bits (data frame) is
sent in one go. Advantage of Parallel transmission is high speed and
disadvantage is the cost of wires, as it is equal to the number of bits sent in
parallel.
Serial Transmission
In serial transmission, bits are sent one after another in a queue manner. Serial
transmission requires only one communication channel.
Analog Transmission
To send the digital data over an analog media, it needs to be converted into
analog signal.There can be two cases according to data formatting.
Digital-to-Analog Conversion
When data from one computer is sent to another via some analog carrier, it is
first converted into analog signals. Analog signals are modified to reflect digital
data.
This technique uses two frequencies, f1 and f2. One of them, for example
f1, is chosen to represent binary digit 1 and the other one is used to
represent binary digit 0. Both amplitude and phase of the carrier wave are
kept intact.
Phase Shift Keying
In this conversion scheme, the phase of the original carrier signal is
altered to reflect the binary data.
When a new binary symbol is encountered, the phase of the signal is
altered. Amplitude and frequency of the original carrier signal is kept
intact.
Quadrature Phase Shift Keying
QPSK alters the phase to reflect two binary digits at once. This is done in
two different phases. The main stream of binary data is divided equally
into two sub-streams. The serial data is converted in to parallel in both
sub-streams and then each stream is converted to digital signal using NRZ
technique. Later, both the digital signals are merged together.
Analog-to-Analog Conversion
Analog signals are modified to represent analog data. This conversion is also
known as Analog Modulation. Analog modulation is required when bandpass is
used. Analog to analog conversion can be done in three ways:
Amplitude Modulation
In this modulation, the amplitude of the carrier signal is modified to reflect
the analog data.
Amplitude modulation is implemented by means of a multiplier. The
amplitude of modulating signal (analog data) is multiplied by the
amplitude of carrier frequency, which then reflects analog data.
The frequency and phase of carrier signal remain unchanged.
Frequency Modulation
In this modulation technique, the frequency of the carrier signal is
modified to reflect the change in the voltage levels of the modulating
signal (analog data).
The amplitude and phase of the carrier signal are not altered.
Phase Modulation
In the modulation technique, the phase of carrier signal is modulated in
order to reflect the change in voltage (amplitude) of analog data signal.
Phase modulation is practically similar to Frequency Modulation, but in
Phase modulation frequency of the carrier signal is not increased.
Frequency of carrier is signal is changed (made dense and sparse) to
reflect voltage change in the amplitude of modulating signal.
Transmission Media
The transmission media is nothing but the physical media over which
communication takes place in computer networks.
Magnetic Media
One of the most convenient way to transfer data from one computer to another,
even before the birth of networking, was to save it on some storage media and
transfer physical from one station to another. Though it may seem old-fashion
way in today’s world of high speed internet, but when the size of data is huge,
the magnetic media comes into play.
For example, a bank has to handle and transfer huge data of its customer, which
stores a backup of it at some geographically far-away place for security reasons
and to keep it from uncertain calamities. If the bank needs to store its huge
backup data then its,transfer through internet is not feasible.The WAN links may
not support such high speed.Even if they do; the cost too high to afford.
In these cases, data backup is stored onto magnetic tapes or magnetic discs,
and then shifted physically at remote places.
STP cables comes with twisted wire pair covered in metal foil. This makes it
more indifferent to noise and crosstalk.
UTP has seven categories, each suitable for specific use. In computer networks,
Cat-5, Cat-5e, and Cat-6 cables are mostly used. UTP cables are connected by
RJ45 connectors.
Coaxial Cable
Coaxial cable has two wires of copper. The core wire lies in the center and it is
made of solid conductor.The core is enclosed in an insulating sheath.The second
wire is wrapped around over the sheath and that too in turn encased by
insulator sheath.This all is covered by plastic cover.
Because of its structure,the coax cable is capable of carrying high frequency
signals than that of twisted pair cable.The wrapped structure provides it a good
shield against noise and cross talk. Coaxial cables provide high bandwidth rates
of up to 450 mbps.
There are three categories of coax cables namely, RG-59 (Cable TV), RG-58
(Thin Ethernet), and RG-11 (Thick Ethernet). RG stands for Radio Government.
Cables are connected using BNC connector and BNC-T. BNC terminator is used
to terminate the wire at the far ends.
Power Lines
Power Line communication (PLC) is Layer-1 (Physical Layer) technology which
uses power cables to transmit data signals.In PLC, modulated data is sent over
the cables. The receiver on the other end de-modulates and interprets the data.
Because power lines are widely deployed, PLC can make all powered devices
controlled and monitored. PLC works in half-duplex.
Narrow band PLC provides lower data rates up to 100s of kbps, as they work at
lower frequencies (3-5000 kHz).They can be spread over several kilometers.
Broadband PLC provides higher data rates up to 100s of Mbps and works at
higher frequencies (1.8 – 250 MHz).They cannot be as much extended as
Narrowband PLC.
Fiber Optics
Fiber Optic works on the properties of light. When light ray hits at critical angle
it tends to refracts at 90 degree. This property has been used in fiber optic. The
core of fiber optic cable is made of high quality glass or plastic. From one end of
it light is emitted, it travels through it and at the other end light detector detects
light stream and converts it to electric data.
Fiber Optic provides the highest mode of speed. It comes in two modes, one is
single mode fiber and second is multimode fiber. Single mode fiber can carry a
single ray of light whereas multimode is capable of carrying multiple beams of
light.
Fiber Optic also comes in unidirectional and bidirectional capabilities. To connect
and access fiber optic special type of connectors are used. These can be
Subscriber Channel (SC), Straight Tip (ST), or MT-RJ.
Wireless Transmission
Wireless transmission is a form of unguided media. Wireless communication
involves no physical link established between two or more devices,
communicating wirelessly. Wireless signals are spread over in the air and are
received and interpreted by appropriate antennas.
Radio waves at lower frequencies can travel through walls whereas higher RF
can travel in straight line and bounce back.The power of low frequency waves
decreases sharply as they cover long distance. High frequency radio waves have
more power.
Lower frequencies such as VLF, LF, MF bands can travel on the ground up to
1000 kilometers, over the earth’s surface.
Radio waves of high frequencies are prone to be absorbed by rain and other
obstacles. They use Ionosphere of earth atmosphere. High frequency radio
waves such as HF and VHF bands are spread upwards. When they reach
Ionosphere, they are refracted back to the earth.
Microwave Transmission
Electromagnetic waves above 100 MHz tend to travel in a straight line and
signals over them can be sent by beaming those waves towards one particular
station. Because Microwaves travels in straight lines, both sender and receiver
must be aligned to be strictly in line-of-sight.
Microwave transmission depends highly upon the weather conditions and the
frequency it is using.
Infrared Transmission
Infrared wave lies in between visible light spectrum and microwaves. It has
wavelength of 700-nm to 1-mm and frequency ranges from 300-GHz to 430-THz.
Infrared wave is used for very short range communication purposes such as
television and it’s remote. Infrared travels in a straight line hence it is directional
by nature. Because of high frequency range, Infrared cannot cross wall-like
obstacles.
Light Transmission
Highest most electromagnetic spectrum which can be used for data
transmission is light or optical signaling. This is achieved by means of LASER.
Lasers cannot penetrate obstacles such as walls, rain, and thick fog.
Additionally, laser beam is distorted by wind, atmosphere temperature, or
variation in temperature in the path.
Laser is safe for data transmission as it is very difficult to tap 1mm wide laser
without interrupting the communication channel.
Multiplexing
Multiplexing is a technique by which different analog and digital streams of
transmission can be simultaneously processed over a shared link. Multiplexing
divides the high capacity medium into low capacity logical medium which is
then shared by different streams.
Communication is possible over the air (radio frequency), using a physical media
(cable), and light (optical fiber). All mediums are capable of multiplexing.
When multiple senders try to send over a single medium, a device called
Multiplexer divides the physical channel and allocates one to each. On the other
end of communication, a De-multiplexer receives data from a single medium,
identifies each, and sends to different receivers.
TDM works in synchronized mode. Both ends, i.e. Multiplexer and De-multiplexer
are timely synchronized and both switch to next channel simultaneously.
Each station is assigned with a unique code, called chip. Signals travel with
these codes independently, inside the whole bandwidth.The receiver knows in
advance the chip code signal it has to receive.
Network Switching
Switching is process to forward packets coming in from one port to a port
leading towards the destination. When data comes on a port it is called ingress,
and when data leaves a port or goes out it is called egress. A communication
system may include number of switches and nodes. At broad level, switching
can be divided into two major categories:
Circuit Switching
When two nodes communicate with each other over a dedicated communication
path, it is called circuit switching.There 'is a need of pre-specified route from
which data will travels and no other data is permitted.In circuit switching, to
transfer the data, circuit must be established so that the data transfer can take
place.
Establish a circuit
Transfer the data
Disconnect the circuit
Circuit switching was designed for voice applications. Telephone is the best
suitable example of circuit switching. Before a user can make a call, a virtual
path between caller and callee is established over the network.
Message Switching
This technique was somewhere in middle of circuit switching and packet
switching. In message switching, the whole message is treated as a data unit
and is switching / transferred in its entirety.
A switch working on message switching, first receives the whole message and
buffers it until there are resources available to transfer it to the next hop. If the
next hop is not having enough resource to accommodate large size message,
the message is stored and switch waits.
This technique was considered substitute to circuit switching. As in circuit
switching the whole path is blocked for two entities only. Message switching is
replaced by packet switching. Message switching has the following drawbacks:
Packet Switching
Shortcomings of message switching gave birth to an idea of packet switching.
The entire message is broken down into smaller chunks called packets. The
switching information is added in the header of each packet and transmitted
independently.
It is easier for intermediate networking devices to store small size packets and
they do not take much resources either on carrier path or in the internal
memory of switches.
Packet switching enhances line efficiency as packets from multiple applications
can be multiplexed over the carrier. The internet uses packet switching
technique. Packet switching enables the user to differentiate data streams
based on priorities. Packets are stored and forwarded according to their priority
to provide quality of service.
Framing
Data-link layer takes packets from Network Layer and encapsulates them
into Frames.Then, it sends each frame bit-by-bit on the hardware. At
receiver’ end, data link layer picks up signals from hardware and
assembles them into frames.
Addressing
Data-link layer provides layer-2 hardware addressing mechanism.
Hardware address is assumed to be unique on the link. It is encoded into
hardware at the time of manufacturing.
Synchronization
When data frames are sent on the link, both machines must be
synchronized in order to transfer to take place.
Error Control
Sometimes signals may have encountered problem in transition and the
bits are flipped.These errors are detected and attempted to recover actual
data bits. It also provides error reporting mechanism to the sender.
Flow Control
Stations on same link may have different speed or capacity. Data-link
layer ensures flow control that enables both machine to exchange data on
same speed.
Multi-Access
When host on the shared link tries to transfer the data, it has a high
probability of collision. Data-link layer provides mechanism such as
CSMA/CD to equip capability of accessing a shared media among multiple
Systems.
Data-link layer uses some error control mechanism to ensure that frames (data
bit streams) are transmitted with certain level of accuracy. But to understand
how errors is controlled, it is essential to know what types of errors may occur.
Types of Errors
There may be three types of errors:
Error detection
Error correction
Error Detection
Errors in the received frames are detected by means of Parity Check and Cyclic
Redundancy Check (CRC). In both cases, few extra bits are sent along with
actual data to confirm that bits received at other end are same as they were
sent. If the counter-check at receiver’ end fails, the bits are considered
corrupted.
Parity Check
One extra bit is sent along with the original bits to make number of 1s either
even in case of even parity, or odd in case of odd parity.
The sender while creating a frame counts the number of 1s in it. For example, if
even parity is used and number of 1s is even then one bit with value 0 is added.
This way number of 1s remains even.If the number of 1s is odd, to make it even
a bit with value 1 is added.
At the other end, the receiver performs division operation on codewords using
the same CRC divisor. If the remainder contains all zeros the data bits are
accepted, otherwise it is considered as there some data corruption occurred in
transit.
Error Correction
In the digital world, error correction can be done in two ways:
For m data bits, r redundant bits are used. r bits can provide 2r combinations of
information. In m+r bit codeword, there is possibility that the r bits themselves
may get corrupted. So the number of r bits used must inform about m+r bit
locations plus no-error information, i.e. m+r+1.
Flow Control
When a data frame (Layer-2 data) is sent from one host to another over a single
medium, it is required that the sender and receiver should work at the same
speed. That is, sender sends at a speed on which the receiver can process and
accept the data. What if the speed (hardware/software) of the sender or receiver
differs? If sender is sending too fast the receiver may be overloaded, (swamped)
and data may be lost.
Error Control
When data-frame is transmitted, there is a probability that data-frame may be
lost in the transit or it is received corrupted. In both cases, the receiver does not
receive the correct data-frame and sender does not know anything about any
loss.
There are three types of techniques available which Data-link layer may deploy
to control the errors by Automatic Repeat Requests (ARQ):
Stop-and-wait ARQ
The following transition may occur in Stop-and-Wait ARQ:
o The sender maintains a timeout counter.
o When a frame is sent, the sender starts the timeout counter.
o If acknowledgement of frame comes in time, the sender transmits
the next frame in queue.
o If acknowledgement does not come in time, the sender assumes
that either the frame or its acknowledgement is lost in transit.
Sender retransmits the frame and starts the timeout counter.
o If a negative acknowledgement is received, the sender retransmits
the frame.
Go-Back-N ARQ
Stop and wait ARQ mechanism does not utilize the resources at their
best.When the acknowledgement is received, the sender sits idle and
does nothing. In Go-Back-N ARQ method, both sender and receiver
maintain a window.
The sending-window size enables the sender to send multiple frames
without receiving the acknowledgement of the previous ones. The
receiving-window enables the receiver to receive multiple frames and
acknowledge them. The receiver keeps track of incoming frame’s
sequence number.
Selective Repeat ARQ
In Go-back-N ARQ, it is assumed that the receiver does not have any
buffer space for its window size and has to process each frame as it
comes. This enforces the sender to retransmit all the frames which are not
acknowledged.
In Selective-Repeat ARQ, the receiver while keeping track of sequence
numbers, buffers the frames in memory and sends NACK for only frame
which is missing or damaged.
The sender in this case, sends only packet for which NACK is received.
Network layer takes the responsibility for routing packets from source to
destination within or outside a subnet. Two different subnet may have different
addressing schemes or non-compatible addressing types. Same with protocols,
two different subnet may be operating on different protocols which are not
compatible with each other. Network layer has the responsibility to route the
packets from source to destination, mapping different addressing schemes and
protocols.
Layer-3 Functionalities
Devices which work on Network Layer mainly focus on routing. Routing may
include various tasks aimed to achieve a single goal. These can be:
Network Addressing
Layer 3 network addressing is one of the major tasks of Network Layer. Network
Addresses are always logical i.e. these are software based addresses which can
be changed by appropriate configurations.
IP
IPX
AppleTalk
We are discussing IP here as it is the only one we use in practice these days.
Hosts in different subnet need a mechanism to locate each other. This task can
be done by DNS. DNS is a server which provides Layer-3 address of remote host
mapped with its domain name or FQDN. When a host acquires the Layer-3
Address (IP Address) of the remote host, it forwards all its packet to its gateway.
A gateway is a router equipped with all the information which leads to route
packets to the destination host.
Routers take help of routing tables, which has the following information:
Routers upon receiving a forwarding request, forwards packet to its next hop
(adjacent router) towards the destination.
The next router on the path follows the same thing and eventually the data
packet reaches its destination.
Network address can be of one of the following:
Internetworking
In real world scenario, networks under same administration are generally
scattered geographically. There may exist requirement of connecting two
different networks of same kind as well as of different kinds. Routing between
two networks is called internetworking.
Tunneling
If they are two geographically separate networks, which want to communicate
with each other, they may deploy a dedicated line between or they have to pass
their data through intermediate networks.
Packet Fragmentation
Most Ethernet segments have their maximum transmission unit (MTU) fixed to
1500 bytes. A data packet can have more or less packet length depending upon
the application. Devices in the transit path also have their hardware and
software capabilities which tell what amount of data that device can handle and
what size of packet it can process.
Class A - it uses first octet for network addresses and last three octets
for host addressing
Class B - it uses first two octets for network addresses and last two for
host addressing
Class C - it uses first three octets for network addresses and last one for
host addressing
Class D - it provides flat IP addressing scheme in contrast to hierarchical
structure for above three.
Class E - It is used as experimental.
IPv4 also has well-defined address spaces to be used as private addresses (not
routable on internet), and public addresses (provided by ISPs and are routable
on internet).
IPv6 has introduced Anycast addressing but has removed the concept of
broadcasting. IPv6 enables devices to self-acquire an IPv6 address and
communicate within that subnet. This auto-configuration removes the
dependability of Dynamic Host Configuration Protocol (DHCP) servers. This way,
even if the DHCP server on that subnet is down, the hosts can communicate
with each other.
IPv6 provides new feature of IPv6 mobility. Mobile IPv6 equipped machines can
roam around without the need of changing their IP addresses.
In client-server model, any process can act as Server or Client. It is not the type
of machine, size of the machine, or its computing power which makes it server;
it is the ability of serving request that makes a machine a server.
A system can act as Server and Client simultaneously. That is, one process is
acting as Server and another is acting as a client. This may also happen that
both client and server processes reside on the same machine.
Communication
Two processes in client-server model can interact in various ways:
Sockets
Remote Procedure Calls (RPC)
Sockets
In this paradigm, the process acting as Server opens a socket using a well-
known (or known by client) port and waits until some client request comes. The
second process acting as a Client also opens a socket but instead of waiting for
an incoming request, the client processes ‘requests first’.
When the request is reached to server, it is served. It can either be an
information sharing or resource request.
The client process calls the client stub. It passes all the parameters
pertaining to program local to it.
All parameters are then packed (marshalled) and a system call is made to
send them to other side of the network.
Kernel sends the data over the network and the other end receives it.
The remote host passes data to the server stub where it is unmarshalled.
The parameters are passed to the procedure and the procedure is then
executed.
The result is sent back to the client in the same manner.
Application Protocols
There are several protocols which work for users in Application Layer.
Application layer protocols can be broadly divided into two categories:
A DNS server is requested with FQDN and it responds back with the IP address
mapped with it. DNS uses UDP port 53.
When a client needs to retrieve mails from server, it opens a connection with
the server on TCP port 110. User can then access his mails and download them
to the local computer. POP3 works in two modes.
To access the web pages, a client normally uses web browsers, who are
responsible for initiating, maintaining, and closing TCP connections. HTTP is a
stateless protocol, which means the Server maintains no information about
earlier requests by clients.
HTTP versions
HTTP 1.0 uses non persistent HTTP. At most one object can be sent over a
single TCP connection.
HTTP 1.1 uses persistent HTTP. In this version, multiple objects can be
sent over a single TCP connection.
Network Services
Computer systems and computerized systems help human beings to work
efficiently and explore the unthinkable. When these devices are connected
together to form a network, the capabilities are enhanced multiple-times. Some
basic services computer network can offer are.
Directory Services
These services are mapping between name and its value, which can be variable
value or fixed. This software system helps to store the information, organize it,
and provides various means of accessing it.
Accounting
In an organization, a number of users have their user names and
passwords mapped to them. Directory Services provide means of storing
this information in cryptic form and make available when requested.
Authentication and Authorization
User credentials are checked to authenticate a user at the time of login
and/or periodically. User accounts can be set into hierarchical structure
and their access to resources can be controlled using authorization
schemes.
Domain Name Services
DNS is widely used and one of the essential services on which internet
works. This system maps IP addresses to domain names, which are easier
to remember and recall than IP addresses. Because network operates with
the help of IP addresses and humans tend to remember website names,
the DNS provides website’s IP address which is mapped to its name from
the back-end on the request of a website name from the user.
File Services
File services include sharing and transferring files over the network.
File Sharing
One of the reason which gave birth to networking was file sharing. File
sharing enables its users to share their data with other users. User can
upload the file to a specific server, which is accessible by all intended
users. As an alternative, user can make its file shared on its own
computer and provides access to intended users.
File Transfer
This is an activity to copy or move file from one computer to another
computer or to multiple computers, with help of underlying network.
Network enables its user to locate other users in the network and
transfers files.
Communication Services
Email
Electronic mail is a communication method and something a computer
user cannot work without. This is the basis of today’s internet features.
Email system has one or more email servers. All its users are provided
with unique IDs. When a user sends email to other user, it is actually
transferred between users with help of email server.
Social Networking
Recent technologies have made technical life social. The computer savvy
peoples, can find other known peoples or friends, can connect with them,
and can share thoughts, pictures, and videos.
Internet Chat
Internet chat provides instant text transfer services between two hosts.
Two or more people can communicate with each other using text based
Internet Relay Chat services. These days, voice chat and video chat are
very common.
Discussion Boards
Discussion boards provide a mechanism to connect multiple peoples with
same interests.It enables the users to put queries, questions, suggestions
etc. which can be seen by all other users. Other may respond as well.
Remote Access
This service enables user to access the data residing on the remote
computer. This feature is known as Remote desktop. This can be done via
some remote device, e.g. mobile phone or home computer.
Application Services
These are nothing but providing network based services to the users such as
web services, database managing, and resource sharing.
Resource Sharing
To use resources efficiently and economically, network provides a mean
to share them. This may include Servers, Printers, and Storage Media etc.
Databases
This application service is one of the most important services. It stores
data and information, processes it, and enables the users to retrieve it
efficiently by using queries. Databases help organizations to make
decisions based on statistics.
Web Services
World Wide Web has become the synonym for internet.It is used to
connect to the internet, and access files and information services
provided by the internet servers.