Data Communication and
Computer Networks
Chapter 1 - Introduction
History & overview of Networks
• During the cold war, the most successful scientists and engineers in the US were
designing nuclear weapons and space programs.
• However, the Soviet Union was the one who launched the first satellite in to orbit.
• As a result, the US needed to create something bigger like Internet and Space
program in order to regain technological superiority.
• The US Federal government formed new agencies like NASA and the department
of defence’s Advanced Research Projects Agency (ARPA).
• Because the government of US was afraid of the Soviet Union attacking their
communication system, they wanted to develop an alternative network line.
• An MIT and ARPA scientist JCR Licklider came up with the idea of Galactic
Network. He suggested using computers to
communicate one another. He envisioned a
globally interconnected set of computers
through which everyone could quickly
access data and programs from any site. In
spirit, the concept was very much like the
Internet of today. Hence the concept of
• The first attempt to send simple message from one computer to another
computer was tried in October 29, 1969 to send the message “LOGIN”
from a computer with the size of small house located at University of
California Los Angeles to a computer located at Stanford University,
which is 567 kms away.
• However, the computer at Stanford University received the first 2 letters
“LO”.
In 1971 an Engineer named Ray Tomlinson
managed to send a whole message like
“QWERTYUIOP”. This message became the
first ever email Ray sent for himself.
The impact of Networks on daily life
• In today’s world, through the use of networks, we are connected like
never before.
• People with ideas can communicate instantly with others to make
those ideas a reality.
• News events and discoveries are known worldwide in seconds.
• Individuals can even connect and play games with friends separated by
oceans and continents.
• Networks play a significant role in our daily lives, as they enable us to
connect with one another and access a vast amount of information and
resources.
• Networks allow us to communicate with friends and family through social
media and messaging apps regardless of where they are located, access
news and entertainment through websites and streaming services, and
make purchases and education online.
• Social media networks like Facebook, Instagram, and Twitter have
changed the way we interact with each other and consume news and
information.
• Online commerce platforms like Amazon, and eBay have changed the
way we shop, making it easy to purchase goods and services from the
comfort of our own homes.
• Networks also influence and improve the healthcare monitoring in the
real time by connecting wearable health care gadgets to the network.
• Wearable health care systems can communicate with relevant
responders in case of emergencies like accidents or other medical
conditions that require immediate medical attention.
• Some of the key downside of using networks in our daily life includes
privacy concerns as network applications often collect and share
personal data without our knowledge or consent.
• Similarly, we become more vulnerable to cyber-attacks ranging from
simple scams and viruses to more sophisticated hacking attempts that
can compromise sensitive personal and financial information.
• More serious issues like addictive social media use, spread and
consumption of disinformation and misinformation, cyber-bullying
and harassment etc. can also happen as a result of daily usage of
networks.
The network as a platform
• The network has become a platform for distributing a wide range of
services to end users in a reliable, efficient, and secure manner.
• The Converging Network
• Modern networks are constantly evolving to meet user demands.
• Early data networks were limited to exchanging character-based information
between connected computer systems.
• Traditional telephone, radio, and television networks were maintained separately
from data networks.
• In the past, every one of these services required a dedicated network, with
different communication channels and different technologies to carry a particular
communication signal.
• Each service had its own set of rules and standards to ensure successful
communication.
• Consider a large school in the early 1990s.
• Back then, classrooms were cabled for the public announcement network, the telephone
network, a video network for televisions, a data network, and perhaps a security network.
• These separate networks were disparate, meaning that they could not communicate with each
other.
• Advances in technology are enabling us to consolidate these different
kinds of networks onto one platform, referred to as the converged
network.
• Unlike dedicated networks, converged networks are capable of
delivering voice, video streams, text, and graphics among many
different types of devices over the same communication channel and
network structure.
• Previously separate and distinct communication forms have converged
onto a common platform.
• This platform provides access to a wide range of alternative and new
communication methods that enable people to interact directly with each
other almost instantaneously.
• In a converged network, there are still many points of contact and many
specialized devices, such as personal computers, phones, TVs, and
tablet computers, but there is one common network infrastructure.
• This network infrastructure uses the same set of rules, agreements,
and implementation standards.
Planning for the Future
• The convergence of the different types of communications networks onto one platform
represents the first phase in building the intelligent information network. We are
currently in this phase of network evolution.
• The next phase will be to consolidate not only the different types of messages onto a single
network but to also consolidate the applications that generate, transmit, and secure
the messages onto integrated network devices.
• Not only will voice and video be transmitted over the same network, but the devices that
perform the telephone switching and video broadcasting will also be the same devices that
route the messages through the network.
• The resulting communications platform will provide high-quality application functionality at
a reduced cost.
• The pace at which the development of exciting new converged network applications is
occurring can be attributed to the rapid growth and expansion of the Internet.
• With only about 10 billion of potentially 1.5 trillion things currently connected globally, there
is vast potential to connect the unconnected through the IoE.
• This expansion has created a wider audience for whatever message, product, or service
can be delivered.
• The underlying mechanics and processes that drive this explosive growth have resulted in
a network architecture that is both capable of supporting changes and able to grow.
• As the supporting technology platform for living, learning, working, and playing in the
human network, the network architecture of the Internet must adapt to constantly
changing requirements for a high quality of service and security.
Network Architecture Characteristics
• Networks must support a wide range of applications and services, as well as
operate over many different types of cables and devices, which make up the
physical infrastructure.
• The term network architecture, in this context, refers to the technologies that
support the infrastructure and the programmed services and rules, or
protocols, that move messages across the network.
• As networks evolve, we are discovering that there are four basic
characteristics that the underlying architectures need to address in order to
meet user expectations. These are: Fault tolerance, Scalability, Quality of
service (QoS), Security.
• Fault Tolerance
• The expectation is that the Internet is always available to the millions of users who rely
on it.
• This requires a network architecture that is built to be fault tolerant.
• A fault-tolerant network is one that limits the impact of a failure, so that the fewest
number of devices are affected.
• It is also built in a way that allows quick recovery when such a failure occurs.
• These networks depend on multiple paths between the source and destination of a
message.
• If one path fails, the messages can be instantly sent over a different link.
• One way reliable networks provide redundancy is by implementing a packet-
switched network.
• Packet switching splits traffic into packets that are routed over a shared network.
• A single message, such as an email or a video stream, is broken into multiple message
blocks, called packets.
• Each packet has the necessary addressing information of the source and destination of the
message.
• The routers within the network switch the packets based on the condition of the network at
that moment.
• This means that all the packets in a single message could take very different paths to the
destination. • This is not the case in circuit-switched networks
traditionally used for voice communications.
• A circuit-switched network is one that establishes
a dedicated circuit between the source and
destination before the users may communicate.
• If the call is unexpectedly terminated, the users
must initiate a new connection.
• Scalability
• A scalable network can expand quickly to support new users and
applications without impacting the performance of the service being
delivered to existing users.
• In addition, networks are scalable because the designers follow accepted
standards and protocols. This allows software and hardware vendors to
focus on improving products and services without worrying about
designing a new set of rules for operating within the network.
• Quality of Service
• Quality of Service (QoS) is also an ever-increasing requirement of networks
today.
• New applications available to users over internetworks, such as voice and
live video transmissions, create higher expectations for the quality of the
delivered services.
• Have you ever tried to watch a video with constant breaks and pauses?
• As data, voice, and video content continue to converge onto the same
network, QoS becomes a primary mechanism for managing congestion and
ensuring reliable delivery of content to all users.
• Congestion occurs when the demand for bandwidth exceeds the amount
available.
• Network bandwidth is measured in the number of bits that can be
transmitted in a single second, or bits per second (bps).
• When simultaneous communications are attempted across the network, the
demand for network bandwidth can exceed its availability, creating network
congestion.
• When the volume of traffic is greater than what can be transported
across the network, devices queue, or hold, the packets in memory
until resources become available to transmit them.
• With a QoS policy in place, the router can manage the flow of data and
voice traffic, giving priority to voice communications if the network
experiences congestion.
• Security
• The network infrastructure, services, and the data contained on network-attached
devices are crucial personal and business assets.
• There are two types of network security concerns that must be addressed:
• network infrastructure security and
• information security.
• Securing a network infrastructure includes the physical securing of devices that
provide network connectivity, and preventing unauthorized access to the
management software that resides on them.
• Information security refers to protecting the information contained
within the packets being transmitted over the network and the
information stored on network attached devices.
• In order to achieve the goals of network security, there are three
primary requirements.
• Confidentiality – Data confidentiality means that only the intended and
authorized recipients can access and read data.
• Integrity – Data integrity means having the assurance that the
information has not been altered in transmission, from origin to
destination.
• Availability – Data availability means having the assurance of timely
and reliable access to data services for authorized users.
Network Role & Elements
• Networks are comprised of four basic elements: hardware, software,
protocols and the connection medium.
• Hardware
• Network hardware includes network cards, routers or network switches, modems and
Ethernet repeaters.
• Network cards give computers direct access to network media and enable them to connect to
other equipment, including routers, switches, modems and repeaters.
• Routers or switches allow a single network connection from a modem to be divided between
several computers.
• Repeaters refresh the network signal between Ethernet cable segments, allowing cables to
reach beyond their maximum length without signal loss.
• Software
• In order for the hardware to interact with the network, it needs software to issue
commands.
• The primary form of networking software is protocols -- software that instructs network
devices on how to connect to the network and how to interact with one another.
• Other examples of networking software include connection monitoring software,
networking clients and other tools designed to further facilitate your computer's ability
to connect to the network.
• Client Devices
• Client devices are the computers and mobile devices connected to the network.
• Client devices are vital components of a network, as without clients requiring access the
network is essentially pointless.
• In order to classify as a client device, a computer or mobile device must be able to
connect to the network and utilize it.
• Depending on the network, client devices may also require specialized software to
establish a connection.
• Connection Media
• Without connections, a network cannot function. The medium used to connect the nodes
of a network varies with the type of network.
• Wired networks will often use network cables like Category 6 Ethernet cables, while
• wireless networks make direct connections between devices using radio signals as the medium.
Computer Networks Versus Human
Network
• Human network:
• They possess Biological neurons or nerve cells.
• The Neuron size is approximately 10 m to 6 m.
• They consume the energy of about 6-10 joule per operation per
second.
• Moreover, they possess high Learning capability.
• Computer network:
• Network is made up of Silicon transistors.
• The size of a Single transistor is about 10 m to 9 m.
• It consumes Energy between the range of 10-16 joules per operation
per second.
• Possesses high Programming Capability.
Data Communications
Chapter 2
What is data communication?
• When we communicate, we
are sharing information.
This sharing can be local or
remote. Between
individuals, local
communication usually
occurs face to face, while
remote communication
takes place over distance.
• The term telecommunication, which
includes telephony, telegraphy, and
television, means communication at
a distance (tele is Greek for “far”).
• The word data refers to information
presented in whatever form is
agreed upon by the parties creating
and using the data.
• Data communications are the exchange of data between two devices
via some form of transmission medium such as a wire cable.
• For data communications to occur, the communicating devices must be
part of a communication system made up of a combination of hardware
(physical equipment) and software (programs).
• The effectiveness of a data communications system depends on four
fundamental characteristics: delivery, accuracy, timeliness, and
jitter.
• Delivery.
• The system must deliver data to the correct destination.
• Data must be received by the intended device or user and only by
that device or user.
• Accuracy.
• The system must deliver the data accurately.
• Data that have been altered in transmission and left uncorrected
are unusable.
• Timeliness.
• The system must deliver data in a timely manner.
• Data delivered late are useless.
• In the case of video and audio, timely delivery means delivering
data as they are produced, in the same order that they are
produced, and without significant delay.
• This kind of delivery is called real-time transmission.
• Jitter.
• Jitter refers to the variation in the packet arrival time.
• It is the uneven delay in the delivery of audio or video
packets.
• For example, let us assume that video packets are sent
every 30 ms.
• If some of the packets arrive with 30-ms delay and others
with 40-ms delay, an uneven quality in the video is the
result.
Components of data communication
� Message. - The message is the information (data) to be communicated. Popular forms of information include
text, numbers, pictures, audio, and video.
� Sender. - It can be a computer, workstation, telephone handset, video camera, and so on.
� Receiver. - The receiver is the device that receives the message. It can be a computer, workstation, telephone
handset, television, and so on.
� Transmission medium. - The transmission medium is the physical path by which a message travels from
sender to receiver. Some examples of transmission media include twisted-pair wire, coaxial cable, fiber-optic
cable, and radio waves.
� Protocol. - A protocol is a set of rules that govern data communications. It represents an agreement between the
communicating devices. Without a protocol, two devices may be connected but not communicating, just as a
Data Flow
Analog and Digital Data Transmission
• The term analog data refers to information that is continuous; digital data
refers to information that has discrete states.
• For example, an analog clock that has hour, minute, and second hands
gives information in a continuous form; the movements of the hands are
continuous.
• On the other hand, a digital clock that reports the hours and the
minutes will change suddenly from one state to another.
• Analog data, such as the sounds made by a human voice, take on
continuous values. When someone speaks, an analog wave is created
in the air.
• This can be captured by a microphone and converted to an analog
signal or sampled and converted to a digital signal.
• Digital data take on discrete values. For example, data are stored in
computer memory in the form of 0s and 1s.
Periodic and non-periodic
• Both analog and digital signals can take one of two forms: periodic or
non-periodic.
• A periodic signal completes a pattern within a measurable time frame,
called a period, and repeats that pattern over subsequent identical
periods.
• The completion of one full pattern is called a cycle.
• A non-periodic signal changes without exhibiting a pattern or cycle that
repeats over time. Both analog and digital signals can be periodic or
non-periodic.
• In data communications, we commonly use periodic analog signals
and non-periodic digital signals.
• Periodic analog signals can be classified as simple or composite.
• A simple periodic analog signal, a sine wave, cannot be decomposed
into simpler signals.
• A composite periodic analog signal is composed of multiple sine waves.
• The sine wave is the most fundamental form of a periodic analog signal.
• When we visualize it as a simple oscillating curve, its change over the
course of a cycle is smooth and consistent, a continuous, rolling flow.
• Each cycle consists of a single arc above the time axis followed by a
single arc below it.
• A sine wave can be represented by three parameters: the peak
amplitude, the frequency, and the phase.
• Peak Amplitude
• The peak amplitude of a signal is the absolute value of its highest intensity,
proportional to the energy it carries.
• For electric signals, peak amplitude is normally measured in volts.
• Period and Frequency
• Period refers to the amount of time, in seconds, a signal needs to complete 1
cycle.
• Frequency refers to the number of periods in 1 s.
• Note that period and frequency are just one characteristic defined in two ways.
• Period is the inverse of frequency, and frequency is the inverse of period, as the
following formulas show.
• f=1/T T=1/f
• Period is formally expressed in seconds. Frequency is formally expressed in
Hertz (Hz), which is cycle per second.
• Wavelength
• The wavelength is the distance a simple signal can travel in one period.
• Bandwidth
• The range of frequencies contained in a composite signal is its bandwidth.
• The bandwidth of a composite signal is the difference between the highest
and the lowest frequencies contained in that signal.
• Example
• If a periodic signal is decomposed into five sine waves with frequencies of 100, 300,
500, 700, and 900 Hz, what is its bandwidth?
• Solution
• Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then:
• B = fh - fl = 900 - 100 = 800 Hz
Transmission impairment
• Signals travel through transmission media, which are not perfect.
• The imperfection causes signal impairment.
• This means that the signal at the beginning of the medium is not the
same as the signal at the end of the medium.
• What is sent is not what is received.
• Three causes of impairment are attenuation, distortion, and
noise.
• Attenuation
• Attenuation means a loss of energy.
• When a signal travels through a medium, it loses some of its energy in
overcoming the resistance of the medium.
• That is why a wire carrying electric signals gets warm, if not hot, after a
while.
• Some of the electrical energy in the signal is converted to heat.
• To compensate for this loss, amplifiers are used to amplify the signal.
• To show that a signal has lost or gained strength, engineers use the unit of the
decibel.
• The decibel (dB) measures the relative strengths of two signals or one signal at two
different points.
• Note that the decibel is negative if a signal is attenuated and positive if a signal is
amplified.
Example
1. Suppose a signal travels through a transmission medium and its power is reduced to one-half. This means that
A signal travels through an
P2 =1/2 P1. In this case, the attenuation (loss of power) can be calculated as:
amplifier, and its power is
increased 10 times.
Calculate the amplification
(gain of power).
• Distortion
• Distortion means that the signal changes its form or shape. Distortion
can occur in a composite signal made of different frequencies.
• Noise
• Noise is another cause of impairment. Several types of noise, such as thermal noise,
induced noise, crosstalk, and impulse noise, may corrupt the signal.
• Thermal noise is the random motion of electrons in a wire, which creates an extra signal not
originally sent by the transmitter.
• Induced noise comes from sources such as motors and appliances.
• These devices act as a sending antenna, and the transmission medium acts as the receiving antenna.
• Crosstalk is the effect of one wire on the other. One wire acts as a sending antenna and the other
as the receiving antenna.
• Impulse noise is a spike (a signal with high energy in a very short time) that comes from power
lines, lightning, and so on.
Digital signals
• In addition to being represented by an analog signal, information can
also be represented by a digital signal.
• For example, a 1 can be encoded as a positive voltage and a 0 as zero
voltage.
• A digital signal can have more than two levels.
• In this case, we can send more than 1 bit for each level. The following figure
shows two signals, one with two levels and the other with four. We send 1 bit per
level in part a of the figure and 2 bits per level in part b of the figure. In general, if
a signal has L levels, each level needs log2L bits. For this reason, we can send
Example
log24 = 2 bits in part b.
If a digital signal has eight levels, how many bits are needed per level?
Each signal level is represented by 3 bits. (log28 = 3) (NB: logab = c is
ac=b)
• Bit Rate
• Most digital signals are non-periodic, and thus period and frequency are not
appropriate characteristics. Another term—bit rate (instead of frequency)—is
used to describe digital signals. The bit rate is the number of bits sent in 1s,
expressed in bits per second (bps).
• Example
• Assume we need to download text documents at the rate of 100 pages per second. What is
the required bit rate of the channel?
• Solution
• A page is an average of 24 lines with 80 characters in each line. If we assume that one
character requires 8 bits, the bit rate is:
• 100 x 24 x 80 x 8 = 1,536,000 bps = 1.536 Mbps
• Bit Length
• The bit length is the distance one bit occupies on the transmission medium.
• Bit length = propagation speed x bit duration
• Transmission of Digital Signals
• How can we send a digital signal from point A to point B?
• We can transmit a digital signal by using one of two different approaches:
baseband transmission or broadband transmission (using modulation).
• Baseband Transmission
• Baseband transmission means sending a digital signal over a channel
without changing the digital signal to an analog signal.
• Broadband transmission
• Broadband transmission or modulation means changing the digital signal to
an analog signal for transmission.
Performance
• Throughput
• The throughput is a measure of how fast we can actually send data through a
network.
• Although, at first glance, bandwidth in bits per second and throughput seem the
same, they are different.
• A link may have a bandwidth of B bps, but we can only send T bps through this
link with T always less than B.
• In other words, the bandwidth is a potential measurement of a link; the throughput
is an actual measurement of how fast we can send data.
• For example, we may have a link with a bandwidth of 1 Mbps, but the devices
connected to the end of the link may handle only 200 kbps.
• This means that we cannot send more than 200 kbps through this link.
• Latency
• The latency or delay defines how long it takes for an entire message to
completely arrive at the destination from the time the first bit is sent out from the
source.
• We can say that latency is made of four components: propagation time,
transmission time, queuing time and processing delay.
• Latency = propagation time + transmission time + queuing time + processing
delay
• Propagation time measures the time required for a bit to travel from the source
to the destination.
• The propagation time is calculated by dividing the distance by the propagation speed.
• Propagation time = Distance / (Propagation Speed)
• The propagation speed of electromagnetic signals depends on the medium and on the frequency of
the signal.
• For example, in a vacuum, light is propagated with a speed of 3 × 108 m/s. It is lower in air; it is
much lower in cable.
• The transmission time of a message depends on the size of the message and the
bandwidth of the channel.
Transmission time = (Message size) / Bandwidth
• The queuing time is not a fixed factor; it changes with the load imposed
on the network.
• When there is heavy traffic on the network, the queuing time increases.
• An intermediate device, such as a router, queues the arrived messages
and processes them one by one.
• If there are many messages, each message will have to wait.
Components of the network
• In computer networking, the computers that we use on a daily basis are often
referred to as hosts or end systems.
• They are referred to as hosts because they host (run) application-level
programs such as a Web browser or server program, or an e-mail program.
They are also referred to as end systems because they sit at the edge of the
Internet.
• Hosts are sometimes further divided into two categories: clients and servers.
Informally, clients often tend to be desktop PCs or workstations, whereas
servers are more powerful machines.
• But there is a more precise meaning of a client and a server in computer
networking.
• In the so-called client/server model, a client program running on one end
system requests and receives information from a server running on another
end system.
• This client/server model is undoubtedly the most prevalent structure for
• Network Interface Card (NIC)
• A Network Interface Card (NIC) is a hardware components of computer network
that allows a computer to connect to a network.
• NICs come in various types, such as wired and wireless, and they can support
different network protocols, such as Ethernet, Wi-Fi, Bluetooth, and Fiber
Channel.
• A wired NIC typically uses an RJ45 connector to connect to a network cable,
while a wireless NIC uses antennas to connect to a Wi-Fi network.
• A NIC contains a network controller that manages the communication between
the computer and the network.
• The controller uses software drivers to interpret the network protocols and to
control the flow of data between the computer and the network.
• The drivers are typically installed automatically when the NIC is connected to the
computer, but they can also be installed manually.
• NICs can provide various features and capabilities, such as bandwidth
management, quality of service (QoS), virtual LAN (VLAN) tagging, and
network booting.
• Bandwidth management allows the NIC to prioritize network traffic and allocate
bandwidth to different applications and users.
• QoS allows the NIC to ensure that certain types of traffic, such as voice and
video, receive higher priority than other traffic.
• VLAN tagging allows the NIC to separate network traffic into different virtual
networks, which can improve security and performance.
• Network booting allows the NIC to boot the computer from a network server,
which can simplify system management and deployment.
• Hub
• A hub is a basic networking device that allows multiple devices to communicate
with each other.
• Hubs receive data packets from one device and broadcast them to all the other
devices connected to the hub.
• This means that all devices on the network share the same bandwidth and
receive all data, regardless of whether it is intended for them or not.
• There are mainly three types of hubs: passive, active, and intelligent.
• Passive hub: A passive hub simply connects all devices together, without any signal
amplification or regeneration. It has no power source and does not boost the signal, so it is
not suitable for long-distance connections or large networks. A passive hub is mainly used to
extend the number of ports available on a network.
• Active hub: An active hub, also known as a powered hub, has a power source and can
regenerate and amplify the signal. This means that it can transmit data over longer distances
and support more devices than a passive hub. An active hub also has built-in circuitry that
helps to prevent collisions, which occur when two or more devices attempt to transmit data at
the same time.
• Intelligent hub: An intelligent hub, also known as a managed hub, provides additional
features and capabilities beyond those of a passive or active hub. It can monitor and manage
network traffic, prioritize data transmission, and provide network security features. An
intelligent hub can also support VLANs, which allow a single physical network to be divided
• Switch
• A switch is a networking device that connects multiple devices in a network,
allowing them to communicate with each other.
• Unlike a hub, which broadcasts data to all devices on the network, a switch
forwards data only to the intended recipient, which reduces network congestion
and improves performance.
• A switch can also provide additional security features and management
capabilities, which makes it ideal for larger networks.
• There are several types of switches, which include:
• Unmanaged switch: An unmanaged switch is a basic switch that does not have any
management features. It is simply plug-and-play, which means it can be connected to the
network and used immediately. An unmanaged switch is ideal for small networks where
management features are not required.
• Managed switch: It can be configured and managed using a web-based interface or a
command-line interface. A managed switch can provide features such as VLANs, Quality of
Service (QoS), and Spanning Tree Protocol (STP), which improve network management and
security. STP prevents network loops and associated network outage by blocking redundant
links or paths. The redundant paths can be used to keep the network operational if the primary
link fails.
• PoE switch: A Power over Ethernet (PoE) switch is a switch that provides power to PoE-
enabled devices, such as IP cameras, wireless access points, and VoIP phones. This
eliminates the need for separate power supplies for these devices, which makes installation
and management easier.
• A repeater
• A repeater is a networking device and of the components of computer network
that is used to regenerate and amplify signals in a network.
• When data is transmitted over a network, the signal weakens as it travels
through the network cables.
• A repeater receives the weak signal and regenerates it, amplifying the signal to
its original strength.
• This allows the signal to be transmitted over longer distances without loss of
quality.
• There are mainly two types of repeaters: analog and digital.
• There are also specialized types of repeaters that are used in specific
applications:
• Wireless repeater: A wireless repeater is used to extend the range of a wireless network. It
receives the wireless signal and rebroadcasts it, helping to improve coverage in areas
where the signal is weak.
• Ethernet repeater: An Ethernet repeater, also known as a hub, is used to extend the range
of an Ethernet network. It receives the Ethernet signal and broadcasts it to all devices on
the network.
• Fiber optic repeater: A fiber optic repeater is used to extend the range of a fiber optic
network. It receives the optical signal and regenerates it, amplifying the signal strength and
extending the signal range.
• Router
• A router is a networking device or Components of computer network that
connects multiple networks together, allowing them to communicate
with each other.
• There are several types of routers, which include:
• Residential router:
• A residential router is a router that is designed for home use.
• It is typically provided by an Internet Service Provider (ISP) and is used to connect devices in
a home network to the Internet.
• A residential router may provide features such as wireless connectivity, firewall protection,
and Quality of Service (QoS).
• Enterprise router:
• An enterprise router is a router that is designed for use in large organizations.
• It provides advanced features and capabilities, such as multiple WAN ports, Virtual Private
Network (VPN) connectivity, and traffic shaping.
• An enterprise router is typically managed by a network administrator and may be used to
connect multiple locations together.
• Core router:
• A core router is a router that is used to connect multiple networks together at the
core of a large network, such as an Internet Service Provider’s network.
• A core router is designed for high-speed data transfer and provides advanced
features such as packet filtering, load balancing, and routing protocols.
• Edge router:
• An edge router is a router that is used to connect a local network to an external
network, such as the Internet.
• It provides security features such as firewall protection, Network Address Translation
(NAT), and Access Control Lists (ACLs).
• Virtual router:
• A virtual router is a software-based router that is used in virtualized environments,
such as cloud computing. It provides the same routing functionality as a physical
router but is hosted on a virtual machine.
• Wireless router:
• A wireless router is a router that provides wireless connectivity to devices in a
network. It may use Wi-Fi or Bluetooth technology to provide wireless connectivity.
• Modem
• A modem (short for modulator-demodulator) is a networking device or Components
of computer network that converts digital data to analog signals for transmission over
a telephone line or cable.
• It is used to connect a computer or network to the Internet through a service
provider’s network.
• Server
• A server is a computer system or program that provides a service to other computers
or programs on a network.
• Servers can be used to store files, manage resources, provide access to
applications, and host websites.
• They are designed to handle multiple requests from client computers or other servers
simultaneously, and they may also have features such as redundancy and failover
capabilities for improved reliability.
• Bridge
• A bridge is a networking device or Components of computer network that connects
two or more network segments together, allowing devices on different segments to
communicate with each other. A bridge can be used to segment a network, improve
network performance, and improve network security.
Network Types
Chapter 3
Local Area Network
• A local area network (LAN) is usually privately owned and connects
some hosts in a single office, building, or campus.
• Depending on the needs of an organization, a LAN can be as simple as
two PCs and a printer in someone’s home office, or it can extend
throughout a company and include audio and video devices.
Each host in a LAN has an
identifier, an address, that
uniquely defines the host in 192.168.2.
1 192.168.2.
the LAN. 2
A packet sent by a host to
another host carries both the
source host’s and the
destination host’s addresses.
• In the past, all hosts in a network were connected through a common
cable, which meant that a packet sent from one host to another was
received by all hosts.
• The intended recipient kept the packet; the others dropped the packet.
• Today, most LANs use a
smart connecting switch,
which is able to recognize
the destination address of
the packet and guide the
packet to its destination
without sending it to all
other hosts.
• The switch alleviates the
traffic in the LAN and
allows more than one pair
to communicate with each
other at the same time if
there is no common source
and destination among
Wide Area Network
• A wide area network (WAN) is also an interconnection of devices
capable of communication.
• A LAN is normally limited in size, spanning an office, a building, or a
campus; a WAN has a wider geographical span, spanning a town, a
state, a country, or even the world.
• A LAN interconnects hosts; a WAN interconnects connecting devices
such as switches, routers, or modems.
• A LAN is normally privately owned by the organization that uses it; a
WAN is normally created and run by communication companies and
leased by an organization that uses it.
• There are two distinct examples of WANs:
• point-to-point WANs and
• switched WANs.
• Point-to-Point WAN
• A point-to-point WAN is a network that connects two communicating devices
through a transmission media (cable or air).
• Switched WAN
• A switched WAN is a network with more than two ends.
• A switched WAN is used in the backbone of global communication today.
• We can say that a switched WAN is a combination of several point-to-point
WANs that are connected by switches.
Internetwork
• Today, it is very rare to see a LAN or a WAN in isolation; they are
connected to one another.
• When two or more networks are connected, they make an internetwork,
or internet.
• As an example, assume that an organization has two offices, one on the east
coast and the other on the west coast.
• Each office has a LAN that allows all employees in the office to communicate
with each other.
• To make the communication between employees at different offices possible,
the management leases a point-to-point dedicated WAN from a service provide,
and connects the two LANs.
• Now the company has an internetwork, or a private internet.
• When a host in the west coast office sends a message to another host in the same
office, the router blocks the message, but the switch directs the message to the
destination. On the other hand, when a host on the west coast sends a message to
a host on the east coast, router R1 routes the packet to router R2, and the packet
reaches the destination.
Client-Server Network
• Client-Server Network model is broadly used network model.
• In Client-Server Network, Clients and server are differentiated, specific
server and clients are present.
• In Client-Server Network, Centralized server is used to store the data
because its management is centralized.
• In Client-Server Network, Server respond the services which are
requested by Client.
• In Server-based network, server administers the whole set-up in the
network.
• Access rights and resource allocations are also done by the server.
• Due to centralized storage, it becomes easy to find a file or some other
resource.
• A centralized server makes data backup and recovery possible in a
convenient manner.
• Changes in the network can be made very easily by just upgrading the
server. Also, the network is easily scalable.
• Servers can be accessed remotely from various platforms in the
network.
• Rules defining security and access rights can be defined at the time of
the set-up of the server.
Peer-to-Peer Network
• Peer-to-Peer Network model does not differentiate the clients and the servers,
each and every node is itself client and server.
• In Peer-to-Peer Network, Each and every node can do both request and
respond for the services.
• Peer-to-peer networks are often created by collections of fewer machines.
• All of these computers use unique security to keep their data, but they also
share data with every other node.
• In peer-to-peer networks, the nodes both consume and produce resources.
• Therefore, as the number of nodes grows, so does the peer-to-peer
network’s capability for resource sharing.
• This is distinct from client-server networks where an increase in nodes causes
the server to become overloaded.
• It is challenging to give nodes in peer-to-peer networks proper security
because they function as both clients and servers.
• A denial of service attack may result from this.
• The majority of contemporary operating systems, including Windows and Mac
OS, come with software to implement peer
• Peer-to-peer network model is easy to
implement and manage.
• Nodes or workstations are independent of one
another.
• No access permissions is also needed.
• The network is reliable in nature.
• If a peer fails, it will not affect the working of
others.
• There is no need for any professional software
in such kind of networks.
• The cost of implementation of such networks is
very less.
• In Peer-to-peer network model Storage is
decentralized, and also not so efficiently
managed.
• Data backup options are not available in peer-to-
peer networks.
• These kinds of networks are not so secure too.
Packet-switched and Circuit switched
networks
• Circuit-Switched Network
• In a circuit-switched network, a dedicated connection, called a circuit, is always
available between the two end systems; the switch can only make it active or
inactive.
• Circuit switching was very common in telephone networks in the past, although
part of the telephone network today is a packet-switched network.
• The switches used in this case have forwarding tasks but no storing capability.
• Let us look at two cases.
• In the first case, all telephone sets are busy; four people at one site are
talking with four people at the other site; the capacity of the thick line is
fully used.
• In the second case, only one telephone set at one side is connected to a
telephone set at the other side; only one-fourth of the capacity of the
thick line is used.
• This means that a circuit-switched network is efficient only when it is
working at its full capacity; most of the time, it is inefficient because it
is working at partial capacity.
• The reason that we need to make the capacity of the thick line four times
the capacity of each voice line is that we do not want communication to
fail when all telephone sets at one side want to be connected with all
telephone sets at the other side.
• Packet-Switched Network
• In a computer network, the communication between the two ends is done in
blocks of data called packets.
• In other words, instead of the continuous communication we see between two
telephone sets when they are being used, we see the exchange of individual
data packets between the two computers.
• This allows us to make the switches function for both storing and
forwarding because a packet is an independent entity that can be stored and
sent later.
• A router in a packet-switched network has a queue that can store and
forward the packet.
• Now assume that the capacity of the thick line is only twice the capacity of the
data line connecting the computers to the routers.
• If only two computers (one at each site) need to communicate with each
other, there is no waiting for the packets.
• However, if packets arrive at one router when the thick line is already working
at its full capacity, the packets should be stored and forwarded in the order
they arrived.
• The two simple examples show that a packet-switched network is more
efficient than a circuit switched network, but the packets may encounter
Network cabling & Topologies
• 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
• In a mesh topology, every device has a dedicated point-to-point link to every other device.
• The term dedicated means that the link carries traffic only between the two devices it
connects.
• To find the number of physical links in a fully connected mesh network with n nodes, we first
consider that each node must be connected to every other node.
• Node 1 must be connected to n – 1 nodes, node 2 must be connected to n – 1 nodes, and
finally node n must be connected to n – 1 nodes.
• We need n (n – 1) physical links. However, if each physical link allows communication in both
directions (duplex mode), we can divide the number of links by 2.
• A mesh offers several advantages over other network topologies.
• First, the use of dedicated links guarantees that each connection can
carry its own data load, thus eliminating the traffic problems that can
occur when links must be shared by multiple devices.
• Second, a mesh topology is robust.
• If one link becomes unusable, it does not incapacitate the entire system.
• Third, there is the advantage of privacy or security.
• When every message travels along a dedicated line, only the intended recipient
sees it. Physical boundaries prevent other users from gaining access to messages.
• Finally, point-to-point links make fault identification and fault isolation
easy.
• Traffic can be routed to avoid links with suspected problems. This facility enables
the network manager to discover the precise location of the fault and aids in finding
its cause and solution.
• The main disadvantages of a mesh are related to the
amount of cabling and the number of I/O ports required.
• First, because every device must be connected to
every other device, installation and reconnection are
difficult.
• Second, the sheer bulk of the wiring can be greater
than the available space (in walls, ceilings, or floors)
can accommodate.
• Finally, the hardware required to connect each link
(I/O ports and cable) can be prohibitively expensive.
• One practical example of a mesh topology is the
connection of telephone regional offices in which each
regional office needs to be connected to every other
regional office.
• Star Topology
• In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub or switch, The devices are not directly linked to one another.
• If one device wants to send data to another, it sends the data to the controller, which then
relays the data to the other connected device.
• A star topology is less expensive than a mesh topology.
• In a star, each device needs only one link and one I/O port to connect it to any number of
others.
• This factor also makes it easy to install and reconfigure.
• Far less cabling needs to be housed, and additions, moves, and deletions involve only one
connection: between that device and the hub.
• Other advantages include robustness.
• If one link fails, only that link is affected. This factor also lends itself to easy fault identification and
• One big disadvantage of a star topology is the dependency of the whole
topology on one single point, the hub.
• If the hub goes down, the whole system is dead.
• More cabling is required in a star than ring or bus.
• The star topology is used in local-area networks (LANs).
• High-speed LANs often use a star topology with a central hub.
• Bus Topology
• The preceding examples all describe point-to-point connections.
• A bus topology, on the other hand, is multipoint. One long cable acts as a
backbone to link all the devices in a network.
• Nodes are connected to the bus cable by drop lines and taps.
• A drop line is a connection running between the device and the main cable.
• A tap is a connector that either splices into the main cable or punctures the sheathing of a cable to create a contact
with the metallic core.
• As a signal travels along the backbone, some of its energy is transformed into heat. Therefore, it becomes weaker
and weaker as it travels farther and farther.
• For this reason there is a limit on the number of taps a bus can support and on the distance between those taps.
• Advantages of a bus topology include
• Ease of installation.
• Backbone cable can be laid along the most efficient path, then connected to the nodes by drop lines of various
lengths.
• In this way, a bus uses less cabling than mesh or star topologies
• In a star, for example, four network devices in the same room require four lengths of cable reaching all the way to the hub. In a bus,
this redundancy is eliminated. Only the backbone cable stretches through the entire facility. Each drop line has to reach only as far as
the nearest point on the backbone.
• Disadvantages include
• Difficult reconnection and fault isolation.
• A bus is usually designed to be optimally efficient at installation.
• It can therefore be difficult to add new devices.
• Signal reflection at the taps can cause degradation in quality.
• This degradation can be controlled by limiting the number and spacing of devices connected to a given length of
cable. Adding new devices may therefore require modification or replacement of the backbone.
• In addition, a fault or break in the bus cable stops all transmission, even between devices on the same
side of the problem. The damaged area reflects signals back in the direction of origin, creating noise in
both directions.
• Bus topology was the one of the first topologies used in the design of early local area networks.
Traditional Ethernet LANs can use a bus topology, but they are less popular now.
• Ring Topology
• In a ring topology, each device has a dedicated point-to-point connection with
only the two devices on either side of it.
• A signal is passed along the ring in one direction, from device to device, until it
reaches its destination.
• Each device in the ring incorporates a repeater.
• When a device receives a signal intended for another device, its repeater
regenerates the bits and passes them along.
• A ring is relatively easy to install and reconfigure.
• Each device is linked to only its immediate neighbors (either physically or
logically).
• To add or delete a device requires changing only two connections.
• The only constraints are media and traffic considerations (maximum ring length
and number of devices).
• In addition, fault isolation is simplified.
• Generally, in a ring a signal is circulating at all times.
• If one device does not receive a signal within a specified period, it can issue an
alarm.
• The alarm alerts the network operator to the problem and its location.
• However, unidirectional traffic can be a disadvantage.
• In a simple ring, a break in the ring (such as a disabled station) can disable the
entire network. This weakness can be solved by using a dual ring or a switch
capable of closing off the break.
• Ring topology was prevalent when IBM introduced its local-area network, Token
Ring.
• Today, the need for higher-speed LANs has made this topology less popular.
Network Cabling
• Cable is the medium through which information usually moves from one
network device to another.
• There are several types of cable which are commonly used with LANs.
• The type of cable chosen for a network is related to the network's
topology, protocol, and size.
• Understanding the characteristics of different types of cable and how
they relate to other aspects of a network is necessary for the
development of a successful network.
• Unshielded Twisted Pair (UTP) Cable
• The quality of UTP may vary from telephone-grade wire to extremely high-speed
cable.
• The cable has four pairs of wires inside the jacket.
• Each pair is twisted with a different number of twists per inch to help eliminate
interference from adjacent pairs and other electrical devices.
• The tighter the twisting, the higher the supported transmission rate and the
greater the cost per foot.
• The EIA/TIA (Electronic Industry Association/Telecommunication Industry
Association) has established standards of UTP and rated six categories of wire
(additional categories are emerging).
Category Speed Use
•1 1 Mbps Voice Only (Telephone Wire)
•2 4 Mbps Local Talk & Telephone (Rarely
used)
•3 16 Mbps 10BaseT Ethernet
•4 20 Mbps Token Ring (Rarely used)
•5 100 Mbps (2 pair) 100BaseT Ethernet
1000 Mbps (4 pair) Gigabit Ethernet
• 5e 1,000 Mbps Gigabit Ethernet
•6 10,000 Mbps Gigabit Ethernet
• Unshielded Twisted Pair Connector
• The standard connector for unshielded twisted pair cabling is an RJ-45
connector.
• A slot allows the RJ-45 to be inserted only one way.
• RJ stands for Registered Jack, implying that the connector follows a standard
borrowed from the telephone industry.
• This standard designates which wire goes with each pin inside the connector.
• Shielded Twisted Pair (STP) Cable
• Although UTP cable is the least expensive cable, it may be susceptible to
radio and electrical frequency interference (it should not be too close to
electric motors, fluorescent lights, etc.).
• If you must place cable in environments with lots of potential interference, or
if you must place cable in extremely sensitive environments that may be
susceptible to the electrical current in the UTP, shielded twisted pair may be
the solution.
• Shielded cables can also help to extend the maximum distance of the
cables.
• Shielded twisted pair cable is available in three different configurations:
• Each pair of wires is individually shielded with foil.
• There is a foil or braid shield inside the jacket covering all wires (as a group).
• There is a shield around each individual pair, as well as around the entire group of wires
(referred to as double shield twisted pair).
• Coaxial Cable
• Coaxial cabling has a single copper conductor at its center.
• A plastic layer provides insulation between the center conductor and a braided
metal shield.
• The metal shield helps to block any outside interference from fluorescent lights,
motors, and other computers.
• Although coaxial cabling is difficult to install, it is highly resistant to signal
interference.
• In addition, it can support greater cable lengths between network devices than
twisted pair cable.
• The two types of coaxial cabling are thick coaxial and thin coaxial.
• Thin coaxial cable is also referred to as thinnet.
• 10Base2 refers to the specifications for thin coaxial cable carrying Ethernet signals.
• The 2 refers to the approximate maximum segment length being 200 meters.
• In actual fact the maximum segment length is 185 meters.
• Thin coaxial cable has been popular in school networks, especially linear bus networks.
• Thick coaxial cable is also referred to as thicknet.
• 10Base5 refers to the specifications for thick coaxial cable carrying Ethernet signals.
• The 5 refers to the maximum segment length being 500 meters.
• Thick coaxial cable has an extra protective plastic cover that helps keep moisture away
from the center conductor.
• This makes thick coaxial a great choice when running longer lengths in a linear bus
network.
• One disadvantage of thick coaxial is that it does not bend easily and is difficult to install.
• The most common type of connector used with coaxial cables is the Bayone-Neill-
Concelman (BNC) connector.
• Different types of adapters are available for BNC connectors, including a T-connector,
barrel connector, and terminator.
• Connectors on the cable are the weakest points in any network.
• To help avoid problems with your network, always use the BNC connectors that crimp,
rather screw, onto the cable.
• Fiber Optic Cable
• Fiber optic cabling consists of a center glass core surrounded by several layers of
protective materials.
• It transmits light rather than electronic signals eliminating the problem of electrical
interference.
• This makes it ideal for certain environments that contain a large amount of
electrical interference.
• It has also made it the standard for connecting networks between buildings, due to
its immunity to the effects of moisture and lighting.
• Fiber optic cable has the ability to transmit signals over much longer distances than
coaxial and twisted pair.
• It also has the capability to carry information at vastly greater speeds.
• This capacity broadens communication possibilities to include services such as
video conferencing and interactive services.
• The cost of fiber optic cabling is comparable to copper cabling; however, it is more
difficult to install and modify.
• 10BaseF refers to the specifications for fiber optic cable carrying Ethernet signals.
• The center core of fiber cables is made from glass or plastic fibers.
• A plastic coating then cushions the fiber center, and kevlar fibers help to strengthen
the cables and prevent breakage.
• The outer insulating jacket made of teflon or PVC.
• There are two common types of fiber cables -- single mode and multimode.
• Multimode cable has a larger diameter; however, both cables provide high bandwidth
at high speeds.
• Single mode can provide more distance, but it is more expensive.
Protocols
Chapter 4
Draw anything that comes to your
mind when you hear the term
computer networking or simply
network
Network Protocols
• A network protocol is an established set of rules that determine how
data is transmitted between different devices in the same network.
• Essentially, it allows connected devices to communicate with each other,
regardless of any differences in their internal processes, structure or
design.
• Similar to the way that speaking the same language simplifies
communication between two people, network protocols make it possible
for devices to interact with each other because of predetermined rules
built into devices’ software and hardware.
• Neither local area networks (LAN) nor wide area networks (WAN) could
function the way they do today without the use of network protocols.
• Network protocols take large-scale processes and break them down
into small, specific tasks or functions.
• This occurs at every level of the network, and each function must
cooperate at each level to complete the larger task at hand.
• The term protocol suite refers to a set of smaller network protocols
working in conjunction with each other.
• Network protocols are typically created according to industry standard
by various networking or information technology organizations.
• Among the groups that have defined and published different network
protocols are:
• The Institute of Electrical and Electronics Engineers (IEEE),
• The Internet Engineering Task Force (IETF),
• The International Organization for Standardization (ISO),
• The International Telecommunications Union (ITU) and
• The World Wide Web Consortium (W3C).
• While network protocol models generally work in similar ways,
each protocol is unique and operates in the specific way
detailed by the organization that created it.
• There are thousands of different network protocols, but they all
perform one of three primary actions:
• Communication
• Network management
• Security
• Each type is necessary to use network devices swiftly and
safely, and they work together to facilitate that usage.
• Network Communication Protocols
• Computer networks can't exist without these protocols.
• These protocols formally describe the formats and rules by which data is
transferred over the network.
• Communication protocols also handle authentication and error detection as
well as the syntax, synchronization and semantics that both analog and digital
communications must abide by to function.
• HTTP – often referred to as the protocol of the internet an application layer protocol that
allows the browser and server to communicate.
• TCP – Transmission Control Protocol (TCP) separates data into packets that can be shared
over a network. These packets can then be sent by devices like switches and routers to the
designated targets.
• IP – Internet Protocol (IP) is similar to TCP, this protocol is used by the internet to route and
address data across networks so that it arrives at the right destination.
• UDP – User Datagram Protocol (UDP) works in a similar way to TCP, the key difference
between the two is that TCP ensures a connection is made between the application and
server, but UDP does not.
• IRC – Internet Relay Chat (IRC) is a text-based communication protocol. Software clients are
used to communicate with servers and send messages to other clients. This protocol works
well on networks with a large number of distributed machines.
• SSH – Secure Socket Shell (SSH) is a security-based protocol, built primarily for system
admins. It allows users to securely access devices even over an unsecured network.
• Network Management Protocols
• Network management protocols help define the policies and procedures used to
monitor, manage and maintain your computer network, and help communicate
these needs across the network to ensure stable communication and optimal
performance across the board.
• Generally, network managers can use a management protocol to troubleshoot
connections between host and client devices.
• Management protocols provide network managers with the host connection's
status, availability, packet or data loss, and other related information about the
health of the network connection.
• The policies managed by management protocols can be applied to all devices on
the network, including computers, switches, routers and even servers.
• Two of the most common types of network management protocols include Simple
Network Management Protocol (SNMP) and Internet Control Message Protocol
(ICMP).
• SNMP –This TCP-based protocol allows administrators to view and modify endpoint
information to alter behavior of devices across the network.
• SNMP relies on the use of agents to collect and send data to an overarching SMNP manager,
which in turn queries agents and gets their responses.
• ICMP – Internet Control Message Protocol (ICMP) is primarily used for diagnostic purposes.
• Managed devices on the network can use this protocol to send error messages, providing
information regarding network connectivity issues between devices.
• Network Security Protocols
• Network security protocols work to ensure that data in transit over the network's
connections stays safe and secure.
• Usually, network security protocols rely on encryption and cryptography to
secure data so that only special algorithms, formulas and logical keys can make
this data accessible.
• Some of the most popular protocols for network security include Secure Socket
Layer (SSL), Secure File Transfer Protocol (SFTP) and Secure Hypertext
Transfer Protocol (HTTPS).
• SSL – A Secure Socket Layer (SSL) is a network security protocol primarily used for ensuring
secure internet connections and protecting sensitive data. This protocol can allow for
server/client communication as well as server/server communication.
• Data transferred with SSL is encrypted to prevent it from being readable.
• SFTP – Secure File Transfer Protocol (SFTP), as its name might suggest, is used to securely
transfer files across a network.
• Data is encrypted and the client and server are authenticated.
• HTTPS – Secure Hypertext Transfer Protocol is the secure version of HTTP.
• Data sent between the browser and server are encrypted to ensure protection.
Protocol suites & Industry Standards
• Protocol and standard compliance protects data, resources, and
networks.
• Protocol and standard compliance are crucial to network security for
these reasons:
• Interoperability: Protocols and standards allow devices and systems to
communicate.
• These protocols ensure network components can function together, avoiding risks and
security gaps produced by incompatible or unsupported systems.
• Security Baseline: Protocols and standards contain security principles and best
practices that help secure network infrastructure.
• These protocols allow organizations to protect sensitive data via encryption, authentication,
and access controls.
• Vulnerability Management: Network security protocols and standards help
organizations find and fix vulnerabilities.
• Many standards require regular security assessments, vulnerability scanning, and
penetration testing to discover network infrastructure flaws.
• Organizations can prevent cyberattacks and address vulnerabilities by following these
Layered Models
• Layered Architecture in a computer network is defined as a model where
a whole network process is divided into various smaller sub-tasks.
• These divided sub-tasks are then assigned to a specific layer to
perform only the dedicated tasks.
• A single layer performs only specific type of task.
• To run the application and provide all types of services to clients a lower
layer adds its services to the higher layer present above it.
• Therefore layered architecture provides interactions between the sub-
systems.
• If any type of modification is done in one layer it does not affect the
next layer.
Features of Layered Architecture
• Use of Layered architecture in computer network provides with the feature of
modularity and distinct interfaces.
• Layered architecture ensures independence between layers, by offering
services to higher layers from the lower layers and without specifying how this
services are implemented.
• Layered architecture segments as larger and unmanageable design into small
sub tasks.
• In layer architecture every network has different number of functions, layers
and content.
Elements of Layered Architecture
• There are three different types of elements of a layered architecture. They are
described below:
• Service: Service is defined as a set of functions and tasks being provided by a lower layer
to a higher layer.
• Each layer performs a different type of task. Therefore, actions provided by each layer are different.
• Protocol: Protocol is defined as a set rules used by the layer for exchanging and
transmission of data with its peer entities.
• These rules can consist of details regarding a type of content and their order passed from one layer
to another.
• Interface: Interface is defined as a channel that allows to transmit the messages from one
• Protocol layering
• As discussed previously, a protocol defines the rules that both the sender and
receiver and all intermediate devices need to follow to be able to communicate
effectively.
• When communication is simple, we may need only one simple protocol; when the
communication is complex, we may need to divide the task between different
layers, in which case we need a protocol at each layer, or protocol layering.
• Example:
• Assume Maria and Ann are neighbors with a lot of common ideas. Communication between
Maria and Ann takes place in one layer, face to face, in the same language.
• First, Maria and Ann know that they should greet each other when they meet.
• Second, they know that they should confine their vocabulary to the level of their friendship.
• Third, each party knows that she should refrain from speaking when the other party is
speaking.
• Fourth, each party knows that the conversation should be a dialog, not a monolog: both should
have the opportunity to talk about the issue.
• Fifth, they should exchange some nice words when they leave.
• We can see that the protocol used by Maria and Ann is different from the
communication between a professor and the students in a lecture hall.
• The communication in the second case is mostly monolog; the professor talks
most of the time unless a student has a question, a situation in which the
protocol dictates that she should raise her hand and wait for permission to
speak.
• In this case, the communication is normally very formal and limited to the
subject being taught.
• Assume that Ann is offered a higher-level position in her company, but needs
to move to another branch located in a city very far from Maria. The two
friends still want to continue their communication and exchange ideas
because they have come up with an innovative project to start a new
business when they both retire.
• They decide to continue their conversation using regular mail through the post office.
• However, they do not want their ideas to be revealed by other people if the letters are
intercepted.
• They agree on an encryption/decryption technique.
• But for the moment we assume that Maria and Ann use one technique
that makes it hard to decrypt the letter if one does not have the key for
doing so.
• Now we can say that the communication between Maria and Ann takes
place in three layers, as We assume that Ann and Maria each have three
machines that can perform the task at each layer.
The TCP/IP Model
• TCP/IP is a protocol suite (a set of protocols organized in different
layers) used in the Internet today.
• It is a hierarchical protocol made up of interactive modules, each of
which provides a specific functionality.
• The term hierarchical means that each upper level protocol is supported
by the services provided by one or more lower level protocols.
• The original TCP/IP protocol suite was defined as four software layers
built upon the hardware.
• Today, however, TCP/IP is thought of as a five-layer model.
Layers of TCP/IP Model
• There are five layers in the TCP/IP model.
• Each layer works in order to coordinate another layer above or below it.
• Let us assume that computer A communicates with computer B.
• As the above figure shows, we have five communicating devices in this communication:
• source host (computer A),
• the link-layer switch in link 1,
• the router,
• the link-layer switch in link 2, and
• the destination host (computer B).
• Each device is involved with a set of layers depending on the role of the device in the
internet.
• The two hosts are involved in all five layers; the source host needs to create a message
in the application layer and send it down the layers so that it is physically sent to the
destination host.
• The destination host needs to receive the communication at the physical layer and then
deliver it through the other layers to the application layer.
• The router is involved in only three layers;
• there is no transport or application layer in a router as long as the router is used only for routing
(direction finding).
• Although a router is always involved in one network layer, it is involved in n combinations of link
and physical layers in which n is the number of links the router is connected to.
• The reason is that each link may use its own data-link or physical protocol.
• For example, in the above figure, the router is involved in three links, but the message sent from source A
to destination B is involved in two links.
• Each link may be using different link-layer and physical-layer protocols; the router needs to receive a
packet from link 1 based on one pair of protocols and deliver it to link 2 based on another pair of
protocols.
• A link-layer switch in a link, however, is involved only in two layers, data-link and
Physical Layer
• We can say that the physical layer is responsible for carrying individual
bits in a frame across the link.
• Although the physical layer is the lowest level in the TCP/IP protocol
suite, the communication between two devices at the physical layer is
still a logical communication because there is another, hidden layer, the
transmission media, under the physical layer.
• Two devices are connected by a transmission medium (cable or air).
• We need to know that the transmission medium does not carry bits; it
carries electrical or optical signals.
• So the bits received in a frame from the data-link layer are transformed
and sent through the transmission media, but we can think that the
logical unit between two physical layers in two devices is a bit.
• There are several protocols that transform a bit to a signal.
• Data-link Layer
• We have seen that an internet is made up of several links (LANs and
WANs) connected by routers.
• There may be several overlapping sets of links that a datagram can
travel from the host to the destination.
• The routers are responsible for choosing the best links.
• However, when the next link to travel is determined by the router, the
data-link layer is responsible for taking the datagram and moving it
across the link.
• The link can be a wired LAN with a link-layer switch
• We can also have different protocols used with any link type.
• In each case, the data-link layer is responsible for moving the packet
through the link.
• TCP/IP does not define any specific protocol for the data-link layer.
• It supports all the standard and proprietary protocols.
• Any protocol that can take the datagram and carry it through the link
suffices for the network layer.
• The data-link layer takes a datagram and encapsulates it in a packet
called a frame.
• Each link-layer protocol may provide a different service.
• Some link-layer protocols provide complete error detection and
correction, some provide only error correction.
• Network Layer
• The network layer is responsible for creating a connection between
the source computer and the destination computer.
• The communication at the network layer is host-to-host.
• However, since there can be several routers from the source to the
destination, the routers in the path are responsible for choosing the best
route for each packet.
• We can say that the network layer is responsible for host-to-host
communication and routing the packet through possible routes.
• Again, we may ask ourselves why we need the network layer? We could
have added the routing duty to the transport layer and dropped this layer.
• One reason, as we said before, is the separation of different tasks between
different layers.
• The second reason is that the routers do not need the application and transport
layers. Separating the tasks allows us to use fewer protocols on the routers.
• The network layer in the Internet includes the main protocol, Internet Protocol
(IP) that defines the format of the packet, called a datagram at the network
layer.
• IP also defines the format and the structure of addresses used in this layer.
• IP is also responsible for routing a packet from its source to its destination, which is
achieved by each router forwarding the datagram to the next router in its path.
• IP is a connectionless protocol that provides no flow control, no error control, and no
congestion control services.
• This means that if any of these services is required for an application, the application
should rely only on the transport-layer protocol.
• A routing protocol does not take part in routing (it is the responsibility of IP),
but it creates forwarding tables for routers to help them in the routing process.
• The network layer also has some auxiliary protocols that help IP in its delivery
and routing tasks.
• The Internet Control Message Protocol (ICMP) helps IP to report some problems when
routing a packet.
• The Internet Group Management Protocol (IGMP) is another protocol that helps IP in
multitasking.
• The Dynamic Host Configuration Protocol (DHCP) helps IP to get the network-layer
address for a host.
• Transport Layer
• The logical connection at the transport layer is also end-to-end.
• The transport layer at the source host gets the message from the
application layer, encapsulates it in a transport layer packet (called a
segment or a user datagram in different protocols) and sends it, through the
logical (imaginary) connection, to the transport layer at the destination host.
• In other words, the transport layer is responsible for giving services to the
application layer: to get a message from an application program running on
the source host and deliver it to the corresponding application program on the
destination host.
• We may ask why we need an end-to-end transport layer when we already
have an end-to-end application layer? The reason is the separation of tasks
and duties.
• The transport layer should be independent of the application layer.
• In addition, we will see that we have more than one protocol in the transport
layer, which means that each application program can use the protocol that
• As we said, there are a few transport-layer protocols in the Internet, each
designed for some specific task.
• The main protocol, Transmission Control Protocol (TCP), is a connection-oriented
protocol that first establishes a logical connection between transport layers at two hosts
before transferring data.
• It creates a logical pipe between two TCPs for transferring a stream of bytes.
• TCP provides:
• flow control (matching the sending data rate of the source host with the receiving data rate of the
destination host to prevent overwhelming the destination),
• error control (to guarantee that the segments arrive at the destination without error and resending
the corrupted ones), and
• congestion control to reduce the loss of segments due to congestion in the network.
• The other common protocol, User Datagram Protocol (UDP), is a
connectionless protocol that transmits user datagrams without first creating a
logical connection.
• In UDP, each user datagram is an independent entity without being related to the
previous or the next one (the meaning of the term connectionless).
• UDP is a simple protocol that does not provide flow, error, or congestion control. Its
simplicity, which means small overhead, is attractive to an application program that
needs to send short messages and cannot afford the retransmission of the packets
involved in TCP, when a packet is corrupted or lost.
• Application Layer
• The logical connection between the two application layers is end to-end.
• The two application layers exchange messages between each other as
though there were a bridge between the two layers.
• However, we should know that the communication is done through all
the layers.
• Communication at the application layer is between two processes (two
programs running at this layer).
• To communicate, a process sends a request to the other process and
receives a response.
• Process-to-process communication is the duty of the application layer.
• The application layer in the Internet includes many predefined protocols,
but a user can also create a pair of processes to be run at the two hosts.
• The Hypertext Transfer Protocol (HTTP) is a vehicle for accessing the World Wide
Web (WWW).
• The Simple Mail Transfer Protocol (SMTP) is the main protocol used in electronic
mail (e-mail) service.
• The File Transfer Protocol (FTP) is used for transferring files from one host to
another.
• The Terminal Network (TELNET) and Secure Shell (SSH) are used for accessing
a site remotely.
• The Simple Network Management Protocol (SNMP) is used by an administrator
to manage the Internet at global and local levels.
• The Domain Name System (DNS) is used by other protocols to find the network-
layer address of a computer.
• The Internet Group Management Protocol (IGMP) is used to collect membership
in a group.
Encapsulation at the Source Host
• At the application layer, the data to be exchanged is referred to as a
message.
• A message normally does not contain any header or trailer, but if it does, we
refer to the whole as the message.
• The message is passed to the transport layer.
• The transport layer takes the message as the payload, the load that the
transport layer should take care of.
• It adds the transport layer header to the payload, which contains the identifiers
of the source and destination application programs that want to communicate
plus some more information that is needed for the end-to end delivery of the
message, such as information needed for flow, error control, or congestion
control.
• The result is the transport-layer packet, which is called the segment (in TCP) and
the user datagram (in UDP).
• The transport layer then passes the packet to the network layer.
Encapsulation at the Source Host
• The network layer takes the transport-layer packet as data or payload
and adds its own header to the payload.
• The header contains the addresses of the source and destination hosts and
some more information used for error checking of the header, fragmentation
information, and so on.
• The result is the network-layer packet, called a datagram.
• The network layer then passes the packet to the data-link layer.
• The data-link layer takes the network-layer packet as data or payload
and adds its own header, which contains the link-layer addresses of
the host or the next hop (the router).
• The result is the link-layer packet, which is called a frame.
• The frame is passed to the physical layer for transmission.
Decapsulation and Encapsulation at the Router
• At the router, we have both decapsulation and encapsulation because
the router is connected to two or more links.
• After the set of bits are delivered to the data-link layer, this layer
decapsulates the datagram from the frame and passes it to the network
layer.
• The network layer only inspects the source and destination addresses in
the datagram header and consults its forwarding table to find the next
hop to which the datagram is to be delivered.
• The contents of the datagram should not be changed by the network
layer in the router unless there is a need to fragment the datagram if it is
too big to be passed through the next link.
• The datagram is then passed to the data-link layer of the next link.
• The data-link layer of the next link encapsulates the datagram in a
frame and passes it to the physical layer for transmission.
• Decapsulation at the Destination Host
• At the destination host, each layer only decapsulates the packet
received, removes the payload, and delivers the payload to the
next-higher layer protocol until the message reaches the
application layer.
• It is necessary to say that decapsulation in the host involves
error checking.
• Addressing
• Any communication that involves two parties needs two addresses: source
address and destination address.
• Although it looks as if we need five pairs of addresses, one pair per layer, we
normally have only four because the physical layer does not need addresses;
the unit of data exchange at the physical layer is a bit, which definitely cannot
have an address.
• There is a relationship between the layer, the address used in that layer, and
the packet name at that layer.
• At the application layer, we normally use names to define the site that provides
services, such as someorg.com, or the e-mail address, such as
[email protected].
• At the transport layer, addresses are called port numbers, and these define the
application-layer programs at the source and destination.
• Port numbers are local addresses that distinguish between several programs running at the same
time.
• At the network-layer, the addresses are global, with the whole Internet as the scope. A
network-layer address uniquely defines the connection of a device to the Internet.
• Multiplexing and Demultiplexing
• Since the TCP/IP protocol suite uses several protocols at some layers,
we can say that we have multiplexing at the source and demultiplexing
at the destination.
• Multiplexing in this case means that a protocol at a layer can
encapsulate a packet from several next-higher layer protocols (one at a
time);
• Demultiplexing means that a protocol can decapsulate and deliver a
packet to several next-higher layer protocols (one at a time).
THE OSI MODEL
• Although, when speaking of the Internet, everyone talks about the
TCP/IP protocol suite, this suite is not the only suite of protocols defined.
• Established in 1947, the International Organization for Standardization
(ISO) is a multinational body dedicated to worldwide agreement on
international standards.
• Almost three-fourths of the countries in the world are represented in the
ISO.
• An ISO standard that covers all aspects of network communications is
the Open Systems Interconnection (OSI) model.
• It was first introduced in the late 1970s.
• An open system is a set of protocols that allows any two different
systems to communicate regardless of their underlying architecture.
• The purpose of the OSI model is to show how to facilitate
communication between different systems without requiring
changes to the logic of the underlying hardware and software.
• The OSI model is not a protocol; it is a model for understanding and
designing a network architecture that is flexible, robust, and
interoperable.
• The OSI model was intended to be the basis for the creation of the
protocols in the OSI stack.
• It consists of seven separate but related layers, each of which defines a
part of the process of moving information across a network.
• When we compare the two models, we find that two layers, session and
presentation, are missing from the TCP/IP protocol suite.
• These two layers were not added to the TCP/IP protocol suite after the
publication of the OSI model.
• The application layer in the suite is usually considered to be the
combination of three layers in the OSI model.
• Two reasons were mentioned for this decision.
• First, TCP/IP has more than one transport-layer protocol. Some of the functionalities of
the session layer are available in some of the transport-layer protocols.
• Second, the application layer is not only one piece of software. Many applications can be
developed at this layer. If some of the functionalities mentioned in the session and
presentation layers are needed for a particular application, they can be included in the
development of that piece of software.
• The OSI model appeared after the TCP/IP protocol suite.
• Most experts were at first excited and thought that the TCP/IP protocol would
be fully replaced by the OSI model.
• This did not happen for several reasons.
• First, OSI was completed when TCP/IP was fully in place and a lot of time and money
had been spent on the suite; changing it would cost a lot.
• Second, some layers in the OSI model were never fully defined.
• For example, although the services provided by the presentation and the session layers were
listed in the document, actual protocols for these two layers were not fully defined, nor were they
fully described, and the corresponding software was not fully developed.
• Third, when OSI was implemented by an organization in a different application, it did not
show a high enough level of performance to entice the Internet authority to switch from
the TCP/IP protocol suite to the OSI model.
Overview of familiar Protocols
• 1. Address Resolution Protocol (ARP)
• ARP translates IP addresses to MAC addresses and vice versa so LAN endpoints can
communicate with one another.
• ARP is necessary because IP and MAC addresses are different lengths.
• IP version 4 (IPv4) addresses are 32 bits.
• IPv6 addresses are 128 bits.
• MAC addresses -- a device's physical hardware number -- are 12 hexadecimal digits split into six
pairs.
• Translations between these addresses must occur for proper device communication.
• ARP isn't required every time devices attempt to communicate because the LAN's host
stores the translated addresses in its ARP cache.
• As a result, the ARP translation process is mainly used when new devices join the
network.
• 2. Border Gateway Protocol (BGP)
• BGP makes the internet work.
• This routing protocol controls how packets pass through routers in an autonomous
system (AS) -- one or multiple networks run by a single organization or provider -- and
connect to different networks.
• BGP can connect endpoints on a LAN to one another, and it can connect endpoints in
different LANs to one another over the internet.
• 3. Domain name system (DNS)
• DNS is a database that includes a website's domain name and its corresponding
IP addresses.
• DNS translates the domain name into IP addresses, and these translations are
included within the DNS.
• 4. Dynamic Host Configuration Protocol (DHCP)
• DHCP assigns IP addresses to network endpoints so they can communicate with
other network endpoints over IP.
• 5. File Transfer Protocol (FTP)
• FTP is a client-server protocol, with which a client requests a file and the server
supplies it.
• FTP runs over TCP/IP -- a suite of communications protocols -- and requires a
command channel and a data channel to communicate and exchange files,
respectively.
• Clients request files through the command channel and receive access to
download, edit and copy the file, among other actions, through the data channel.
• FTP has grown less popular as most systems began to use HTTP for file sharing.
• 6. Hypertext Transfer Protocol (HTTP)
• Like FTP, HTTP is a file sharing protocol that runs over TCP/IP.
• HTTP connects to the domain's server and requests the site's HTML, which is the
code that structures and displays the page's design.
• 7. Internet Protocol (IP)
• IP functions similarly to a postal service. When users send and receive data from
their device, the data gets spliced into packets.
• Packets are like letters with two IP addresses: one for the sender and one for the
recipient.
• After the packet leaves the sender, it goes to a gateway, like a post office, that
directs it in the proper direction.
• Packets continue to travel through gateways until they reach their destinations.
• IP is commonly paired with TCP to form TCP/IP, the overall internet protocol
suite.
• Together, IP sends packets to their destinations, and TCP arranges the packets
in the correct order, as IP sometimes sends packets out of order to ensure the
packets travel the fastest ways.
• 8. Simple Mail Transfer Protocol (SMTP)
• SMTP is the most popular email protocol, is part of the TCP/IP suite and controls
how email clients send users' email messages.
• Email servers use SMTP to send email messages from the client to the email
server to the receiving email server. However, SMTP doesn't control how email
clients receive messages -- just how clients send messages.
• 9. Telnet
• Telnet is designed for remote connectivity, and it establishes connections
between a remote endpoint and a host machine to enable a remote session.
Switching &
Multiplexing
Chapter 5
Multiplexing
• Whenever the bandwidth of a medium linking two devices is greater
than the bandwidth needs of the devices, the link can be shared.
Multiplexing
• In a multiplexed system, n lines share the bandwidth of one link.
• The lines on the left direct their transmission streams to a multiplexer
(MUX), which combines them into a single stream (many-to-one).
• At the receiving end, that stream is fed into a de-multiplexer (DEMUX),
which separates the stream back into its component transmissions (one-
to-many) and directs them to their corresponding lines.
Multiplexing
• The word link refers to the physical path.
• The word channel refers to the portion of a link that carries a
transmission between a given pair of lines.
• One link can have many (n) channels.
• The most fundamental need of any communication system design is to
provide to large number of users.
• But this requires a large number of resources and large bandwidths
supporting multiple channels.
• Remember: Bandwidth is the range of frequencies contained in a composite
signal.
• It is the maximum rate of data transfer across a given path.
• Requirement for large number of resources can be met if the resources
are available, but this makes it cost ineffective.
• Therefore, the aim is always to use minimum number of resources and
• As shown Figure below, n number of signals from the low speed
channels have been combined to one high speed link using a n:1
multiplexer.
• Whereas the opposite process is carried out at the other end, where the
signals are further separated into n number of low speed channels.
• This opposite process is referred as de-multiplexing.
• Frequency-Division Multiplexing
• Frequency-division multiplexing (FDM) is an analog technique that can be applied
when the bandwidth of a link (in hertz) is greater than the combined bandwidths
of the signals to be transmitted.
• In FDM, signals generated by each sending device modulate different carrier
frequencies.
• These modulated signals are then combined into a single composite signal that
can be transported by the link.
• Channels can be separated by strips of unused bandwidth—guard bands—to
prevent signals from overlapping.
• Wavelength-Division Multiplexing
• Wavelength-division multiplexing (WDM) is designed to use the high-data-rate
capability of fiber-optic cable.
• The optical fiber data rate is higher than the data rate of metallic transmission
cable, but using a fiber-optic cable for a single line wastes the available
bandwidth.
• Multiplexing allows us to combine several lines into one.
• WDM is conceptually the same as FDM, except that the multiplexing and
demultiplexing involve optical signals transmitted through fiber-optic channels.
• The idea is the same: We are combining different signals of different frequencies.
The difference is that the frequencies are very high.
• Time-Division Multiplexing
• Time-division multiplexing (TDM) is a digital process that allows several
connections to share the high bandwidth of a link.
• Instead of sharing a portion of the bandwidth as in FDM, time is shared.
• Each connection occupies a portion of time in the link.
• TDM is a digital multiplexing technique for combining several low-rate channels
into one high-rate one.
Switching
• A network is a set of connected devices.
• Whenever we have multiple devices, we have the problem of how to
connect them to make one-to-one communication possible.
• One solution is to make a point-to-point connection between each pair of
devices (a mesh
mesh topology)
topology) or
or between a central device and every other
device (a star
star topology).
topology).
Switching
• These methods, however, are impractical and wasteful when applied to
very large networks.
• The number and length of the links require too much infrastructure to
be cost-efficient, and the majority of those links would be idle most of the
time.
• Other topologies employing multipoint connections, such as a bus, are
ruled out because the distances between devices and the total number
of devices increase beyond the capacities of the media and equipment.
• A better solution is switching.
• A switched network consists of a series of interlinked nodes, called
switches.
• Switches are devices capable of creating temporary connections
between two or more devices linked to the switch.
• In a switched network, some of these nodes are connected to the end
systems (computers or telephones, for example). Others are used only
for routing.
• Circuit-switched networks
• A circuit-switched network is made of a set of switches connected by physical
links, in which each link is divided into n channels.
• The end systems, such as computers or telephones, are directly connected to a
switch.
• When end system A needs to communicate with end system M, system
A needs to request a connection to M that must be accepted by all
switches as well as by M itself.
• This is called the setup phase;
• a circuit (channel) is reserved on each link, and
• the combination of circuits or channels defines the dedicated path.
• After the dedicated path made of connected circuits (channels) is established, the
data-transfer phase can take place.
• After all data have been transferred, the circuits are torn down.
• Circuit switching takes place at the physical layer.
• Before starting communication, the stations must make a reservation
for the resources to be used during the communication.
• These resources, such as channels (bandwidth in FDM and time slots in
TDM), switch buffers, switch processing time, and switch input/output
ports, must remain dedicated during the entire duration of data transfer
until the teardown phase.
• Packet switching
• In data communications, if the message is going to pass through a
packet-switched network, it needs to be divided into packets of fixed
or variable size.
• In packet switching, there is no resource allocation for a packet.
• This means that there is no reserved bandwidth on the links, and
there is no scheduled processing time for each packet.
• Resources are allocated on demand.
• The allocation is done on a first-come, first-served basis.
• When a switch receives a packet, no matter what the source or
destination is, the packet must wait if there are other packets being
processed.
• As with other systems in our daily life, this lack of reservation may
create delay.
• We can have two types of packet-switched networks: datagram
networks and virtual circuit networks.
• Datagram Networks
• In a datagram network, each packet is treated independently of all others.
• Even if a packet is part of a multi-packet transmission, the network treats it as though it
existed alone.
• Packets in this approach are referred to as datagrams.
• Datagram switching is normally done at the network layer.
• The switches in a datagram network are traditionally referred to as routers.
• Datagram Networks
• In this example, all four packets (or datagrams) belong to the same message, but may travel
different paths to reach their destination.
• This is so because the links may be involved in carrying packets from other sources and do
not have the necessary bandwidth available to carry all the packets from A to X.
• This approach can cause the datagrams of a transmission to arrive at their destination out of
order with different delays between the packets.
• Datagram Networks
• Packets may also be lost or dropped because of a lack of resources.
• In most protocols, it is the responsibility of an upper-layer protocol to reorder the datagrams
or ask for lost datagrams before passing them on to the application. The datagram networks
are sometimes referred to as connectionless networks.
• The term connectionless here means that the switch (packet switch) does not keep
information about the connection state.
• There are no setup or teardown phases.
• Datagram Networks
• Each packet is treated the same by a switch regardless of its source or destination.
• If there are no setup or teardown phases, how are the packets routed to their destinations in a
datagram network?
• In this type of network, each switch (or packet switch) has a routing table which is based on
the destination address. The routing tables are dynamic and are updated periodically. The
destination addresses and the corresponding forwarding output ports are recorded in the
tables.
• Virtual-Circuit Networks
• A virtual-circuit network has some characteristics of both circuit-switched network and a
datagram network.
• As in a circuit-switched network, there are setup and teardown phases.
• Resources can be allocated during the setup phase, as in a circuit-switched network, or on
demand, as in a datagram network.
• As in a datagram network, data are packetized and each packet carries an address in the
header. However, the address in the header has local jurisdiction (it defines what the next
switch should be and the channel on which the packet is being carried), not end-to-end
jurisdiction.
• As in a circuit-switched network, all packets follow the same path established during the
connection.
• A virtual-circuit network is normally implemented in the data-link layer, while a circuit-
switched network is implemented in the physical layer and a datagram network in the
network layer.
• But this may change in the future.
Ethernet : wired LAN
• Ethernet is a networking technology that includes the protocol, port, cable,
and computer chip needed to plug a desktop or laptop into a local area
network (LAN) for speedy data transmission.
• Ethernet describes how network devices format and transmit data so other
devices on the same LAN can recognize, receive and process the information.
• Ethernet, Token rings, and Wireless LAN using IEEE 802.11 are examples of
standard LAN technologies.
• Ethernet provides a connectionless service, which means each frame sent is
independent of the previous or next frame.
• Ethernet has no connection establishment or connection termination phases.
• The sender sends a frame whenever it has it; the receiver may or may not be
ready for it.
• The sender may overwhelm the receiver with frames, which may result in
dropping frames.
• If a frame drops, the sender will not know about it.
• Since IP, which is using the service of Ethernet, is also connectionless, it will
not know about it either.
• If the transport layer is also a connectionless protocol, such as UDP, the frame
is lost and salvation may only come from the application layer.
• However, if the transport layer is TCP, the sender TCP does not receive
acknowledgment for its segment and sends it again.
• Ethernet is also unreliable like IP and UDP. If a frame is corrupted during
transmission and the receiver finds out about the corruption, the receiver
drops the frame silently. It is the duty of high-level protocols to find out about it.
• The Ethernet frame contains seven fields.
1- Preamble. This field contains 7 bytes (56 bits) of alternating 0s and 1s that alert the
receiving system to the coming frame and enable it to synchronize its clock if it’s out of
synchronization. 2* 2-2- Start frame delimiter (SFD). This field (1 byte: 10101011) signals
the beginning of the frame.
• The SFD warns the station or stations that this is the last chance for synchronization.
• The last 2 bits are (11) 2 and alert the receiver that the next field is the destination address.
• This field is actually a flag that defines the beginning of the frame.
• We need to remember that an Ethernet frame is a variable-length frame.
• It needs a flag to define the beginning of the frame.
• The SFD field is also added at the physical layer.
3- Destination address (DA).
• This field is six bytes (48 bits) and contains the link layer address of the destination station or
stations to receive the packet.
• When the receiver sees its own link-layer address, or a multicast address for a group that the
receiver is a member of, or a broadcast address, it decapsulates the data from the frame and
passes the data to the upperlayer protocol defined by the value of the type field.
4- Source address (SA).
• This field is also six bytes and contains the link-layer address of the sender of the packet.
5- Type.
• This field defines the upper-layer protocol whose packet is encapsulated in the frame.
• This protocol can be IP, ARP, OSPF, and so on.
• In other words, it serves the same purpose as the protocol field in a datagram and the port
number in a segment or user datagram. It is used for multiplexing and demultiplexing.
6. Data.
• This field carries data encapsulated from the upper-layer protocols. It is a minimum of 46 and a
maximum of 1500 bytes.
• If the data coming from the upper layer is more than 1500 bytes, it should be fragmented and
encapsulated in more than one frame.
• If it is less than 46 bytes, it needs to be padded with extra 0s.
• A padded data frame is delivered to the upper-layer protocol as it is (without removing the
padding), which means that it is the responsibility of the upper layer to remove or, in the case of
the sender, to add the padding.
• The upper-layer protocol needs to know the length of its data. For example, a datagram has a field
that defines the length of the data.
8 - CRC.
• The last field contains error detection information, in this case a CRC-32.
• The CRC is calculated over the addresses, types, and data field.
• If the receiver calculates the CRC and finds that it is not zero (corruption in
transmission), it discards the frame.
• Ethernet technology provides rules that allow network-connected devices to
talk to one another without talking over each other.
• In a verbal conversation, when two people speak at the same time, each may
have difficulty understanding what the other is saying.
• This is amplified when, say, 10 people are talking at once. Imagine 100 or
1000 at once.
• In order to handle collisions, the Access control mechanism used in Ethernet
is CSMA/CD.
• More formally, Ethernet is a common name for the IEEE 802.3 standard based
on the Carrier Sense Multiple Access/Collision Detection (CSMA/CD) protocol.
• CSMA/CD defines when to transmit and what is to happen if a collision is detected, as
well as endpoint addressing, transmission speeds, and media.
• When a machine on the network wants to send data to another, it senses the carrier,
which is the main wire connecting the devices.
• If it is free, meaning no one is sending anything, it sends the data packet on the network,
and the other devices check the packet to see whether they are the recipient.
• The recipient consumes the packet. If there is a packet on the highway, the device that
wants to send holds back for some thousandths of a second to try again until it can send.
• Ethernet lies in the lower layers of the Open Systems Interconnection (OSI)
model.
• It facilitates the operation of physical and data link layers.
• Users enter their queries through the application, which forwards it to the next
layer.
• Ethernet has gone through four generations: Standard Ethernet (10 Mbps),
Fast Ethernet (100 Mbps), Gigabit Ethernet (1 Gbps), and 10 Gigabit Ethernet
(10 Gbps).
• Standard Ethernet
• We refer to the original Ethernet technology with the data rate of 10 Mbps as the Standard
Ethernet.
• Fast Ethernet
• It can transfer data at a speed of around 100 Mbps (megabits per second).
• Fast Ethernet uses both fiber optic and twisted pair cables to enable communication.
• There are three categories of Fast Ethernet: 100BASE-TX, 100BASE-FX, and 100BASE-T4.
• The number 100 represents the frequency in MHz
• The word "Base" refers to Baseband. Baseband is the type of communication used by Ethernet and it
means that when a computer is transmitting, it uses all the available bandwith, whereas Broadband
(cable modems) shares the bandwidth available.
• Gigabit Ethernet
• This is an upgrade from Fast Ethernet and is more common nowadays.
• 10-Gigabit Ethernet
• This is an advanced and high-speed network that can transmit data at a
speed of 10 gigabits per second.
• It uses special cables like CAT6a or CAT7 twisted-pair cables and fiber optic
cables.
• With the help of fiber optic cables, this network can cover longer distances, up
to around 10,000 meters.
• Switch Ethernet
• This type of network involves using switches or hubs to improve network
performance.
• Each workstation in this network has its own dedicated connection, which
improves the speed and efficiency of data transfer.
• Switch Ethernet supports a wide range of speeds, from 10 Mbps to 10 Gbps,
depending on the version of Ethernet being used.
Introduction to Wireless Networking
• Wireless communication is one of the fastest-growing technologies.
• The demand for connecting devices without the use of cables is increasing
everywhere.
• The first difference between a wired and a wireless LAN is the medium.
• In a wired LAN, we use wires to connect hosts.
• In a wireless LAN, the medium is air, the signal is generally broadcast.
• When hosts in a wireless LAN communicate with each other, they are sharing the same
medium (multiple access).
• In a wired LAN, a host is always connected to its network at a point with a
fixed link layer address related to its network interface card (NIC).
• Of course, a host can move from one point in the Internet to another point.
• In this case, its link-layer address remains the same, but its network-layer address will
change.
• However, before the host can use the services of the Internet, it needs to be physically
connected to the Internet.
• In a wireless LAN, a host is not physically connected to the network; it can
move freely and can use the services provided by the network.
• A wired isolated LAN is a set of hosts connected via a link-layer
switch (in the recent generation of Ethernet).
• A wireless isolated LAN, called an ad hoc network in wireless
LAN terminology, is a set of hosts that communicate freely with
each other.
• The concept of a link-layer switch does not exist in wireless LANs.
• A wired LAN can be connected to another network or an
internetwork such as the Internet using a router.
• A wireless LAN may be connected to a wired infrastructure
network, to a wireless infrastructure network, or to another
wireless LAN.
Characteristics of Wireless LAN
• Attenuation
• The strength of electromagnetic signals decreases rapidly because the signal disperses in all
directions; only a small portion of it reaches the receiver.
• The situation becomes worse with mobile senders that operate on batteries and normally have
small power supplies.
• Interference
• Another issue is that a receiver may receive signals not only from the intended sender, but
also from other senders if they are using the same frequency band.
• Multipath Propagation
• A receiver may receive more than one signal from the same sender because electromagnetic
waves can be reflected back from obstacles such as walls, the ground, or objects.
• The result is that the receiver receives some signals at different phases (because they travel
different paths).
• This makes the signal less recognizable.
Characteristics of Wireless LAN
• Error
• With the above characteristics of a wireless network, we can expect that errors and error
detection are more serious issues in a wireless network than in a wired network.
Access Control
• The most important issue in a wireless LAN is access control—how a wireless
host can get access to the shared medium (air).
• The Standard Ethernet uses the CSMA/CD algorithm.
• In this method, each host contends to access the medium and sends its frame if it finds
the medium idle.
• If a collision occurs, it is detected and the frame is sent again.
• Collision detection in CSMA/CD serves two purposes.
• If a collision is detected, it means that the frame has not been received and needs to be resent.
• If a collision is not detected, it is a kind of acknowledgment that the frame was received.
• The CSMA/CD algorithm does not work in wireless LANs for three reasons:
• To detect a collision, a host needs to send and receive at the same time (sending the
frame and receiving the collision signal), which means the host needs to work in a duplex
mode.
• Wireless hosts do not have enough power to do so (the power is supplied by batteries).
• They can only send or receive at one time.
• Because of the hidden station problem, in which a station may not be aware of another
station’s transmission due to some obstacles or range problems, collision may occur but
not be detected.
• The distance between stations can be great. Signal fading could prevent a station at
• To overcome the above three problems, Carrier Sense Multiple Access
with Collision Avoidance (CSMA/CA) was invented for wireless LANs.
• Wireless local area networks use a protocol called Carrier Sense, Multiple
Access/Collision Avoidance (CSMA/CA).
• Collisions cannot be detected in wireless media as they can in Ethernet.
• In a WLAN, a device cannot simultaneously transmit or receive data.
• It either does one thing or it doesn’t.
• As a result, it is unable to recognize when two frames collide.
• To prevent a collision, devices rely on signals called “Ready to Send” (RTS) and
“Clear to Send” (CTS).
• A device will scan the airwaves for a signal when it is ready to send.
• If there isn’t already one, it will create a request to transmit (RTS) signal.
• It then delivers its own data and concludes with a CTS signal, which lets other
wireless devices know it’s their turn to communicate.
Introduction to IP Addressing
and Sub-netting
Chapter 6:
• The identifier used in the IP layer of the TCP/IP protocol suite to identify
the connection of each device to the Internet is called the Internet
address or IP address.
• An IPv4 address is a 32-bit address that uniquely and universally
defines the connection of a host or a router to the Internet.
• The IP address is the address of the connection, not the host or the
router, because if the device is moved to another network, the IP
address may be changed.
• IPv4 addresses are unique in the sense that each address defines one,
and only one, connection to the Internet.
• If a device has two connections to the Internet, via two networks, it has
two IPv4 addresses.
• IPv4 addresses are universal in the sense that the addressing system
must be accepted by any host that wants to be connected to the
Internet.
Address Space
• A protocol like IPv4 that defines addresses has an address space.
• An address space is the total number of addresses used by the protocol.
• If a protocol uses b bits to define an address, the address space is 2b because
each bit can have two different values (0 or 1).
• IPv4 uses 32-bit addresses, which means that the address space is 232 or
4,294,967,296 (more than four billion).
• If there were no restrictions, more than 4 billion devices could be connected to
the Internet.
Notation
• There are three common notations to show an IPv4 address:
• Binary notation (base 2)
• In binary notation, an IPv4 address is displayed as 32 bits.
• To make the address more readable, one or more spaces are usually inserted between
each octet (8 bits).
• Each octet is often referred to as a byte.
• Dotted-decimal notation (base 256), and
• To make the IPv4 address more compact and easier to read, it is usually written in
decimal form with a decimal point (dot) separating the bytes.
• This format is referred to as dotted-decimal notation.
• Note that because each byte (octet) is only 8 bits, each number in the dotted-decimal
notation is between 0 and 255.
• Hexadecimal notation (base 16).
• We sometimes see an IPv4 address in hexadecimal notation. Each hexadecimal digit is
equivalent to four bits.
• This means that a 32-bit address has 8 hexadecimal digits.
• This notation is often used in network programming.
Hierarchy in Addressing
• In any communication network that involves delivery, such as a telephone
network or a postal network, the addressing system is hierarchical.
• In a postal network, the postal address (mailing address) includes the country,
state, city, street, house number., and the name of the mail recipient.
• Similarly, a telephone number is divided into the country code, area code, local
exchange, and the connection.
• A 32-bit IPv4 address is also hierarchical, but divided only into two parts.
• The first part of the address, called the prefix, defines the network; the second
part of the address, called the suffix, defines the node (connection of a device
to the Internet).
• The prefix length is n bits and the suffix length is (32 − n) bits.
• A prefix can be fixed length or variable length.
• The network identifier in the IPv4 was first designed as a fixed-length prefix.
• This scheme, which is now obsolete, is referred to as classful addressing.
• The new scheme, which is referred to as classless addressing, uses a variable-
length network prefix.
Hierarchy in Addressing
Classful Addressing
• When the Internet started, an IPv4 address was designed with a fixed-length prefix, but
to accommodate both small and large networks, three fixed-length prefixes were
designed instead of one (n = 8, n = 16, and n = 24).
• The whole address space was divided into five classes (class A, B, C, D, and E).
• This scheme is referred to as classful addressing.
• Although classful addressing belongs to the past, it helps us to understand classless
addressing.
• In class A, the network length is 8 bits, but since the first bit, which is 0, defines the class,
we can have only seven bits as the network identifier.
• This means there are only 27 = 128 networks in the world that can have a class A
address.
• In class B, the network length is 16 bits, but since the first two bits, which are (10)2,
define the class, we can have only 14 bits as the network identifier.
• This means there are only 214 = 16,384 networks in the world that can have a class B
address.
• All addresses that start with (110)2 belong to class C.
• In class C, the network length is 24 bits, but since three bits define the class, we can
have only 21 bits as the network identifier.
21
Address Depletion
• The reason that classful addressing has become obsolete is address depletion.
• Since the addresses were not distributed properly, the Internet was faced with the
problem of the addresses being rapidly used up, resulting in no more addresses
available for organizations and individuals that needed to be connected to the
Internet.
• To understand the problem, let us think about class A.
• This class can be assigned to only 128 organizations in the world, but each organization
needs to have a single network (seen by the rest of the world) with 16,777,216 nodes
(computers in this single network).
• Since there may be only a few organizations that are this large, most of the addresses in this
class were wasted (unused).
• Class B addresses were designed for midsize organizations, but many of the addresses in
this class also remained unused.
• Class C addresses have a completely different flaw in design.
• The number of addresses that can be used in each network (256) was so small that most
companies were not comfortable using a block in this address class.
• Class E addresses were almost never used, wasting the whole class.
Subnetting and Supernetting
• To alleviate address depletion, two strategies were proposed and, to some extent,
implemented: subnetting and supernetting.
• In subnetting, a class A or class B block is divided into several subnets.
• Each subnet has a larger prefix length than the original network.
• For example, if a network in class A is divided into four subnets, each subnet has a prefix of
nsub = 10.
• At the same time, if all of the addresses in a network are not used, subnetting allows the
addresses to be divided among several organizations.
• This idea did not work because most large organizations were not happy about dividing the
block and giving some of the unused addresses to smaller organizations.
• While subnetting was devised to divide a large block into smaller ones,
supernetting was devised to combine several class C blocks into a larger block to
be attractive to organizations that need more than the 256 addresses available in
a class C block.
• This idea did not work either because it makes the routing of packets more
difficult.
• Although classful addressing had several problems and became obsolete, it had
one advantage:
• Given an address, we can easily find the class of the address and, since the prefix length for
each class is fixed, we can find the prefix length immediately.
Classless Addressing
• Subnetting and supernetting in classful addressing did not really solve the
address depletion problem.
• With the growth of the Internet, it was clear that a larger address space was
needed as a long-term solution.
• The larger address space, however, requires that the length of IP addresses also
be increased, which means the format of the IP packets needs to be changed.
• Although the long-range solution has already been devised and is called IPv6, a
short-term solution was also devised to use the same address space but to
change the distribution of addresses to provide a fair share to each organization.
• The short-term solution still uses IPv4 addresses, but it is called classless
addressing.
• In other words, the class privilege was removed from the distribution to
compensate for the address depletion.
• In 1996, the Internet authorities announced a new architecture called classless
addressing.
• In classless addressing, variable-length blocks are used that belong to no
classes.
• In classless addressing, the whole address space is divided into variable length
blocks.
• The prefix in an address defines the block (network); the suffix defines the node
(device).
• Theoretically, we can have a block of 20, 21, 22, . . . , 232 addresses.
• One of the restrictions is that the number of addresses in a block needs to be a
power of 2.
• An organization can be granted one block of addresses.
• Unlike classful addressing, the prefix length in classless addressing is variable.
• We can have a prefix length that ranges from 0 to 32.
• The size of the network is inversely proportional to the length of the prefix.
• A small prefix means a larger network; a large prefix means a smaller network.
• We need to emphasize that the idea of classless addressing can be easily
applied to classful addressing.
• An address in class A can be thought of as a classless address in which the
prefix length is 8.
• An address in class B can be thought of as a classless address in which the
prefix is 16, and so on. In other words, classful addressing is a special case of
• The first question that we need to answer in classless addressing is how to find
the prefix length if an address is given.
• Since the prefix length is not inherent in the address, we need to separately give
the length of the prefix.
• In this case, the prefix length, n, is added to the address, separated by a slash.
• The notation is informally referred to as slash notation and formally as classless
interdomain routing or CIDR (pronounced cider) strategy.
• Examples:
• 12.24.76.8/8
• 23.14.67.92/12
• 220.8.24.255/25
• Given any address in the block, we normally like to know three pieces of information about the
block to which the address belongs:
• The number of addresses, the first address in the block, and the last address.
• Since the value of prefix length, n, is given, we can easily find these three pieces of information:
• The number of addresses in the block is found as N = 232−n
• To find the first address, we keep the n leftmost bits and set the (32 − n) rightmost bits all to
0s.
• To find the last address, we keep the n leftmost bits and set the (32 − n) rightmost bits all to
1s.
Example
• A classless address is given as 167.199.170.82/27. We can find the above three pieces of
information as follows.
• The number of addresses in the network is 232 − n = 25 = 32 addresses.
• The first address can be found by keeping the first 27 bits and changing the rest of the bits to 0s.
• Address: 167.199.170.82/27 10100111 11000111 10101010 01010010
• First address: 167.199.170.64/27 10100111 11000111 10101010
01000000
• The last address can be found by keeping the first 27 bits and changing the rest of the bits to 1s.
• Address: 167.199.170.82/27 10100111 11000111 10101010 01011111
• Last address: 167.199.170.95/27 10100111 11000111 10101010
01011111
• Another way to find the first and last addresses in the block is to use the address
mask.
• The address mask is a 32-bit number in which the n leftmost bits are set to 1s
and the rest of the bits (32 − n) are set to 0s.
• A computer can easily find the address mask because it is the complement of
(232 − n − 1).
• The reason for defining a mask in this way is that it can be used by a computer
program to extract the information in a block, using the three bit-wise operations
NOT, AND, and OR.
• 1.The number of addresses in the block N = NOT (mask) + 1.
• 2.The first address in the block = (Any address in the block) AND (mask).
• 3.The last address in the block = (Any address in the block) OR [(NOT (mask)].
Example
• We repeat the above Example (167.199.170.82/27) using the mask. The mask in dotted-
decimal notation is 256.256.256.224.
• Number of addresses in the block:
• The mask 224 in binary is 11100000.
N = NOT (mask) + 1
N = NOT (11100000) + 1
N = (00011111) + 1
N = 31 + 1 = 32 addresses
• First address: First = (address) AND (mask) = 167.199.170.82
First = (167.199.170.82) AND (256.256.256.224)
First = (167.199.170.(01010010) and (256.256.256.11100000)
First = 167.199.170.(01000000)
First = 167.199.170.64
• Last address: Last = (address) OR (NOT mask) = 167.199.170.255
Last = (167.199.170.82) OR (NOT (256.256.256.224))
Last = (167.199.170.(01010010) OR (NOT (256.256.256.11100000))
Last = (167.199.170.(01010010) OR (256.256.256.00011111))
Last = (167.199.170.11111111
Last = (167.199.170.255)
Network Address
• The above examples show that, given any address, we can find all
information about the block.
• The network address, is particularly important because it is used in
routing a packet to its destination network.
• Let us assume that an internet is made of m networks and a router with
m interfaces.
• When a packet arrives at the router from any source host, the router
needs to know to which network the packet should be sent: from which
interface the packet should be sent out.
• After the network address has been found, the router consults its forwarding table
to find the corresponding interface from which the packet should be sent out.
• The network address is actually the identifier of the network; each network is
identified by its network address.
• The next issue in classless addressing is block allocation.
• How are the blocks allocated?
• The ultimate responsibility of block allocation is given to a global authority called the Internet
Corporation for Assigned Names and Numbers (ICANN).
• However, ICANN does not normally allocate addresses to individual Internet users.
• It assigns a large block of addresses to an ISP.
• For the proper operation of the CIDR, two restrictions need to be applied to the allocated
block.
• 1. The number of requested addresses, N, needs to be a power of 2.
• The reason is that N = 232 − n .
• If N is not a power of 2, we cannot have an integer value for n.
• 2. The requested block needs to be allocated where there is an adequate
number of contiguous addresses available in the address space.
• However, there is a restriction on choosing the first address in the block.
• The first address needs to be divisible by the number of addresses in the block.
• The reason is that the first address needs to be the prefix followed by (32 − n)
number of 0s.
• The decimal value of the first address is then
• first address = (prefix in decimal) × 232 − n
= (prefix in decimal) × N.
Subnetting
• More levels of hierarchy can be created using subnetting.
• An organization (or an ISP) that is granted a range of addresses may divide the
range into several subranges and assign each subrange to a subnetwork (or
subnet).
• Note that nothing stops the organization from creating more levels.
• A subnetwork can be divided into several sub-subnetworks.
• A sub-subnetwork can be divided into several sub-sub-subnetworks, and so on.
• The subnetworks in a network should be carefully designed to enable the routing
of packets.
• We assume the total number of addresses granted to the organization is N, the
prefix length is n, the assigned number of addresses to each subnetwork is Nsub,
and the prefix length for each subnetwork is nsub.
• Then the following steps need to be carefully followed to guarantee the proper
operation of the subnetworks.
• The number of addresses in each subnetwork should be a power of 2.
• The prefix length for each subnetwork should be found using the following formula:
• nsub = 32 − log2Nsub
• After designing the subnetworks, the information about each subnetwork, such as
first and last address, can be found using the process to find the information
about each network in the Internet.
• Example
• An organization is granted a block of addresses with the beginning address
14.24.74.0/24. The organization needs to have 3 sub-blocks of addresses to use
in its three subnets: one sub-block of 10 addresses, one sub-block of 60
addresses, and one sub-block of 120 addresses. Design the sub-blocks.
• Block-1
• The number of addresses in the largest subblock, which requires 120
addresses, is not a power of 2. We allocate 128 addresses.
• The subnet mask for this subnet can be found as n1 = 32 − log2128 = 25.
• The first address in this block is 14.24.74.0/25;
• The last address is 14.24.74.127/25.
• Block-2
• The number of addresses in the second largest subblock, which requires 60
addresses, is not a power of 2 either.
• We allocate 64 addresses.
• The subnet mask for this subnet can be found as n2 = 32 − log264 = 26 .
• The first address in this block is 14.24.74.128/26;
• The last address is 14.24.74.191/26.
• Block-3
• The number of addresses in the smallest subblock, which requires 10 addresses,
is not a power of 2 either.
• We allocate 16 addresses.
• The subnet mask for this subnet can be found as n3 = 32 − log216 = 28.
• The first address in this block is 14.24.74.192/28;
• The last address is 14.24.74.207/28.
• Special Addresses
• This-host Address
• The only address in the block 0.0.0.0/32 is called the this-host address. It is used whenever a
host needs to send an IP datagram but it does not know its own address to use as the source
address.
• Limited-broadcast Address
• The only address in the block 255.255.255.255/32 is called the limited-broadcast address.
• It is used whenever a router or a host needs to send a datagram to all devices in a network.
• The routers in the network, however, block the packet having this address as the destination;
the packet cannot travel outside the network.
• Loopback Address
• The block 127.0.0.0/8 is called the loopback address.
• A packet with one of the addresses in this block as the destination address never leaves the
host; it will remain in the host.
• Any address in the block is used to test a piece of software in the machine.
• For example, we can write a client and a server program in which one of the addresses in the block
is used as the server address.
• We can test the programs using the same host to see if they work before running them on different
computers.
• Private Addresses
• Four blocks are assigned as private addresses: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16,
and 169.254.0.0/16. We will see the applications of these address
Data Security and Integrity
Chapter 7
• With the advent of computers, information storage became
electronic Instead of being stored on physical media.
• The major change that affected security is the introduction of
distributed systems and the use of networks and communications
facilities for carrying data between terminal user and computer and
between computer and computer.
• Network security (internet security) measures are needed to protect
data during their transmission.
• Computing systems are the assets to attackers.
• Today computers are very powerful, work at unimaginable speed and
at very high accuracy.
• With computers we now have new concerns namely automated
attacks, privacy breach, ease of theft because distance doesn’t
matter.
Examples of Security Violations
• User A transmits a file to user B.
• The file contains sensitive information (e.g., payroll records) that is to be protected from
disclosure. User C, who is not authorized to read the file, is able to monitor the transmission and
capture a copy of the file during its transmission.
• A network manager, D, transmits a message to a computer, E, under its
management.
• The message instructs computer E to update an authorization file to include the identities of a
number of new users who are to be given access to that computer. User F intercepts the
message, alters its contents to add or delete entries, and then forwards the message to E, which
accepts the message as coming from manager D and updates its authorization file accordingly.
• Rather than intercept a message, user F constructs its own message with the desired entries and
transmits that message to E as if it had come from manager D. Computer E accepts the message
as coming from manager D and updates its authorization file accordingly.
• An employee is fired without warning.
• The personnel manager sends a message to a server system to invalidate the employee’s
account. When the invalidation is accomplished, the server is to post a notice to the employee’s
file as confirmation of the action. The employee is able to intercept the message and delay it long
enough to make a final access to the server to retrieve sensitive information. The message is then
forwarded, the action taken, and the confirmation posted. The employee’s action may go
unnoticed for some considerable time.
• A message is sent from a customer to a stockbroker with instructions for
various transactions.
• Subsequently, the investments lose value and the customer denies sending the message.
Goals of Information Security
• Confidentiality:
• Confidentiality: Assures that private or confidential information is not made available or
disclosed to unauthorized individuals
• Integrity:
• Data integrity: Assures that information and programs are changed only in a specified
and authorized manner.
• System integrity: Assures that a system performs its intended function in an unimpaired
manner, free from deliberate or inadvertent unauthorized manipulation of the system.
• Availability:
• Assures that systems work promptly and service is not denied to authorized users.
• Authenticity:
• The property of being genuine and being able to be verified and trusted;,
• Accountability:
• The security goal that generates the requirement for actions of an entity to be traced
uniquely to that entity.
OSI security architecture
• The OSI (Open Systems Interconnection) Security Architecture defines
a systematic approach to providing security at each layer.
• The OSI security architecture focuses on security attacks,
mechanisms, and services.
• Security attack
• Security attack is any action that compromises the security of information owned
by an organization.
• Security mechanism
• A process (or a device incorporating such a process) that is designed to detect,
prevent, or recover from a security attack.
• Security service
• A processing or communication service that enhances the security of the data
processing systems and the information transfers of an organization.
• The services are intended to counter security attacks, and they make use of one
or more security mechanisms to provide the service.
unauthorize
d
unauthorized modificatio
access to or n
interception of
data
entity pretends
to be a
different entity
information retransmission to
collected by an produce an
intruder by unauthorized effect
false information may
monitoring online
be given or a real event
traffic
or transaction may be
denied
Types of attacks
• A passive attack is an attempt to learn or make use of information from
the system without affecting system resources;
• Active attack is an attempt to alter system resources or affect their
operation.
• Passive Attacks
• Passive attacks are in the nature of eavesdropping on, or monitoring of,
transmissions. The goal of the opponent is to obtain information that is being
transmitted. Two types of passive attacks are release of message contents and
traffic analysis.
• Active Attacks
• Replay involves the passive capture of a data unit and its subsequent
retransmission to produce an unauthorized effect.
SECURITY MECHANISM
• Security Mechanism is a mechanism that is designed to detect, prevent, or recover from a security
attack.
• The following are lists of the security mechanisms defined in ISO 7498-2.
• The mechanisms are divided into those that are implemented in a specific protocol layer, such as
TCP or an application layer protocol, and those that are not specific (pervasive) to any particular
protocol layer or security.
• SPECIFIC SECURITY MECHANISMS
• Encipherment
• The use of mathematical algorithms to transform data into a form that is not readily intelligible. The transformation and subsequent
recovery of the data depend on an algorithm and zero or more encryption keys.
• Digital Signature
• Data appended to, or a cryptographic transformation of, a data unit that allows a recipient of the data unit to prove the source and
integrity of the data unit and protect against forgery (e.g., by the recipient).
• Access Control
• A variety of mechanisms that enforce access rights to resources.
• Data Integrity
• A variety of mechanisms used to assure the integrity of a data unit or stream of data units.
• Authentication Exchange
• A mechanism intended to ensure the identity of an entity by means of information exchange.
• Traffic Padding
• The insertion of bits into gaps in a data stream to frustrate traffic analysis attempts.
• Routing Control
• Enables selection of particular physically secure routes for certain data and allows routing changes, especially when a breach of
security is suspected.
• Notarization
• The use of a trusted third party to assure certain properties of a data exchange.
• PERVASIVE (Not specific) SECURITY MECHANISMS
• Mechanisms that are not specific to any particular OSI security
service or protocol layer.
• Trusted Functionality
• That which is perceived to be correct with respect to some criteria (e.g., as
established by a security policy).
• Security Label
• The marking bound to a resource (which may be a data unit) that names or
designates the security attributes of that resource.
• Event Detection
• Detection of security-relevant events.
• Security Audit Trail
• Data collected and potentially used to facilitate a security audit, which is an
independent review and examination of system records and activities.
• Security Recovery
• Deals with requests from mechanisms, such as event handling and management
functions, and takes recovery actions.
SECURITY SERVICES
SECURITY MODELS
• No Security:
• In this simplest case, the approach could be a decision to implement no security
at all.
• Security through obscurity:
• In this model, a system is secure simply because nobody knows about its
existence and contents.
• This approach cannot work for too long, as there are many ways an attacker can
come to know about it.
• Hot Security:
• In this scheme, the security for each host is enforced individually. This is a very
safe approach, but the trouble is that it cannot scale well.
• The complexity and diversity of modern sites/organizations makes the task even
harder.
• NETWORK SECURITY:
• Host security is tough to achieve as organizations grow and become more
diverse.
• In Network security technique, the focus is to control network access to various
Cryptography
• Cryptography is the science of using mathematics to encrypt and
decrypt data.
• Cryptography enables you to store sensitive information or transmit it across
insecure networks (like the Internet) so that it cannot be read by anyone except
the intended recipient.
• Cryptanalysis is the science of analyzing and breaking secure
communication.
• Classical cryptanalysis involves an interesting combination of analytical
reasoning, application of mathematical tools, pattern finding, patience,
determination, and luck.
• Cryptanalysts are also called attackers. Cryptology embraces both cryptography
and cryptanalysis.
• There are two forms of encryption in common use: conventional, or
symmetric encryption and public-key, or asymmetric, encryption.
• Symmetric algorithms: (also called “secret key”) use the same key for
both encryption and decryption; asymmetric algorithms: (also called
Symmetric encryption scheme has five ingredients
• There are two requirements for secure use of conventional encryption:
• Strong encryption algorithm
• At a minimum, we would like the algorithm to be such that an opponent who
knows the algorithm and has access to one or more cipher texts would be unable
to decipher the cipher text or figure out the key.
• We assume that it is impractical to decrypt a message on the basis of
the cipher text plus knowledge of the encryption/decryption algorithm.
• In other words, we do not need to keep the algorithm secret; we need to keep
only the key secret. This feature of symmetric encryption is what makes it
feasible for widespread use.
• Cryptographic systems are characterized along three independent
dimensions:
• The type of operations used for transforming plaintext to cipher text.
• All encryption algorithms are based on two general principles:
• Substitution, in which each element in the plaintext (bit, letter, group of bits or letters) is mapped
into another element, and
• Transposition, in which elements in the plaintext are rearranged. The fundamental requirement is
that no information be lost (that is, that all operations are reversible).
• Most systems, referred to as product systems, involve multiple stages of substitutions and
transpositions.
• The number of keys used.
• If both sender and receiver use the same key, the system is referred to as symmetric, single-
key, secret-key, or conventional encryption.
• If the sender and receiver use different keys, the system is referred to as asymmetric, two-
key, or public-key encryption.
• The way in which the plaintext is processed.
• A block cipher processes the input one block of elements at a time, producing an output block
for each input block.
• A stream cipher processes the input elements continuously, producing output one element at
a time, as it goes along.
• Unconditionally secure
• An encryption scheme is unconditionally secure if the cipher text generated by
the scheme does not contain enough information to determine uniquely the
corresponding plaintext, no matter how much cipher text is available.
• That is, no matter how much time an opponent has, it is impossible for him or her
to decrypt the cipher text, simply because the required information is not there.
• Computationally secure
• All that the users of an encryption algorithm can strive for is an algorithm that
meets one or both of the following criteria:
• The cost of breaking the cipher exceeds the value of the encrypted information.
• The time required to break the cipher exceeds the useful lifetime of the information.
• An encryption scheme is said to be computationally secure if either of the
foregoing two criteria are met.
• The rub is that it is very difficult to estimate the amount of effort required to
cryptanalyze cipher text successfully.
• A brute-force attack involves trying every possible key until an
intelligible translation of the cipher text into plaintext is obtained.
• Stream Ciphers and Block Ciphers
• A stream cipher is one that encrypts a digital data stream one bit or one byte at
a time.
• A block cipher is one in which a block of plaintext is treated as a whole and
used to produce a cipher text block of equal length.
• A block cipher operates on a plaintext block of n bits to produce a cipher
text block of n bits.
• Reversible Mapping
Plaintext Cipher text
00 11
01 10
10 00
11 01
• Irreversible Mapping
Plaintext Cipher text
00 11
01 10
10 01
11 01
• Cryptographic Hash Function
• A hash function is a mathematical function that converts a numerical input value
into another compressed numerical value.
• The input to the hash function is of arbitrary length but output is always of fixed
length. A hash function H accepts a variable-length block of data as input and
produces a fixed-size hash value.
• The Purpose of Hash function is to produce a fixed-size “fingerprint” or digest of
arbitrarily long input data to guarantee integrity.
• APPLICATIONS OF CRYPTOGRAPHIC HASH FUNCTIONS
• Message authentication is a mechanism or service used to verify the integrity
of a message.
• Message authentication assures that data received are exactly as sent (i.e.,
contain no modification, insertion, deletion, or replay).