EC 458 A - Computer Communication and Data Networks (EC/ECC/EEE)
3L, 1T 3 Hours, 100 Marks
Computer Communication: Layered architecture of computer
communication networks. DNA, SNA and ISO-OSI models. Properties of
LANs, MANS and WANs. Physical level, data link and transport protocols.
Multiple access protocol organization. Routing techniques, flow and
congestion control in packet switched networks. Window scheme.
Network interconnection-bridges and routers. Dead lock avoidance.
Elements of queuing analysis. Introduction to network security.
Data Networks: Structure and functions of network protocols. Data link
control procedures. Operation of HDLC, SDLC, BISYNC, X.25 and X.21
Protocols Elements of Polling, ALOHA, Reservation ALOHA, CSMA and
token ring, Characteristic features of LANs
Basics of Internet: Evolution; dialup, XDSL, ADSL, cable modem and
other access methods. IP address and domain
Ex No List of Practicals
Exp1 Study of different types of network cables & practically implement the
cross-wire cable & straight cable through clamping tool.
Exp2 Study of different types of network devices in detail.
Exp3 Study of different types of network command and network
configuration command. Show the execution of these commands with
the help of diagram with screenshots
Exp4 Study of network IP
Exp5 Study of different types of network topology using Cisco packet tracer
software.
a) star b) mesh c) ring d) bus e) hybrid
Exp6 To study local area network also verify this type of computer
interconnection using Cisco packet tracer software & how the folders
can be shared through this type of LAN in window operating system
physically.
Exp 7 To study the wide area network and Examining WAN Connections
using cisco packet tracer.
Exp 8 To study and demonstrate the distribution layers function.
Exp 9 What is subnetting? to study and implementing subnetting by using
Cisco Packet Tracer?
Exp10 to implement of Configure DHCP and Web Server through Cisco Packet
Tracer
Exp11 what are the Congestion Control techniques in Computer Networks
S.No. Details of topics Page no.
1 1.1 Data Communication & basics of Computer Network 1-4
2 1.2Types of computer networks 5-9
3 1.3 Network commands 10 - 15
4 1.4 Types of transmission media 15 - 20
5 1.5 Network architecture SNA, DNA 20 - 25
Chapter 1
6 1.6 OSI Layers Network topology 25 - 43
7 1.7 TCP/ IP Model IP Address/IP Protocol, Network protocol 43 - 83
8 1.8 Multiple access protocol organization 87 - 98
9 1.9 Routing techniques 98 - 121
10 1.10 Congestion and flow control techniques 122 - 137
11 1.11 Network interconnection-bridges and routers 137 -141
12 1.12 Dead lock avoidance 142 - 148
13 1.13 Elements of queuing analysis 148 - 152
14 1.14 Introduction to network security 152 - 164
15 2.1 Structure and functions of network protocols 165 - 168
16 2.2 Data link control procedures 168 - 179
17 2.3 High-level Data Link Control (HDLC) 179 - 181
Chapter 2
18 2.4 Synchronous Data Link Control (SDLC) 182 - 185
19 2.5 Binary Synchronous Communication (BISYNC) 186 - 188
20 2.6 X.25 and X.21 Protocols Elements of Polling 188 - 191
21 2.7 ALOHA 191 - 191
22 2.8 Reservation ALOHA 191 - 192
23 2.9 CSMA and token ring. 193 -193
24 2.10 Characteristic features of LANs 193 - 193
25 3.1Basics of Internet 194 - 196
Chapter 3
26 3.2 Dial up 196 - 197
27 3.3 Digital Subscriber Lines (xDSL) 197 - 198
28 3.4 Asymmetric DSL (ADSL) 198 - 199
29 3.5 Cable Modem 199 - 201
30 3.6 IP address and domain 201 - 201
Chapter 1
1.1 Data Communication & basics of Computer Network
Data communications refers to the transmission of this digital data between two or
more computers and a computer network or data network is a telecommunications
network that allows computers to exchange data. The physical connection between
networked computing devices is established using either cable media or wireless
media. The best-known computer network is the Internet.
This tutorial should teach it basics of Data Communication and Computer Network
(DCN) and will also take it through various advance concepts related to Data
Communication and Computer Network.
Computer networking refers to connected computing devices (such as laptops,
desktops, servers, smartphones, and tablets) and an ever-expanding array of IoT
devices (such as cameras, door locks, doorbells, refrigerators, audio/visual systems,
thermostats, and various sensors) that communicate with one another.
Specialized devices such as switches, routers, and access points form the foundation of
computer networks.
Switches connect and help to internally secure computers, printers, servers, and other
devices to networks in homes or organizations. Access points are switches that
connect devices to networks without the use of cables.
Routers connect networks to other networks and act as dispatchers. They analyze data
to be sent across a network, choose the best routes for it, and send it on its way.
Routers connect the home and business to the world and help protect information
from outside security threats.
While switches and routers differ in several ways, one key difference is how they
identify end devices. A Layer 2 switch uniquely identifies a device by its "burned-in"
MAC address. A Layer 3 router uniquely identifies a device's network connection with
a network-assigned IP address.
Today, most switches include some level of routing functionality.
MAC and IP addresses uniquely define devices and network connections, respectively,
in a network. A MAC address is a number assigned to a network interface card (NIC)
by a device's manufacturer. An IP address is a number assigned to a network
connection.
Not for sell 1 Only for reading purpose
1.11 Network Basic Understanding
A system of interconnected computers and computerized peripherals such as printers
is called computer network. This interconnection among computers facilitates
information sharing among them. Computers may connect to each other by either
wired or wireless media.
1.12 Network Engineering
Networking engineering is a complicated task, which involves software, firmware, chip
level engineering, hardware, and electric pulses. To ease network engineering, the
whole networking concept is divided into multiple layers. Each layer is involved in
some particular tasks and is independent of all other layers. But as a whole, almost all
networking tasks depend on all of these layers. Layers share data between them and
they depend on each other only to take input and send output.
1.13 Internet
A network of networks is called an internetwork, or simply the internet. It is the largest
network in existence on this planet. The internet hugely connects all WANs and it can
have connection to LANs and Home networks. Internet uses TCP/IP protocol suite and
uses IP as its addressing protocol. Present day, Internet is widely implemented using
IPv4. Because of shortage of address spaces, it is gradually migrating from IPv4 to
IPv6.
Internet enables its users to share and access enormous amount of information
worldwide. It uses WWW, FTP, email services, audio and video streaming etc. At huge
level, internet works on Client-Server model. Internet uses very high-speed backbone
of fiber optics. To inter-connect various continents, fibers are laid under sea known to
us as submarine communication cable.
1.14 Goals of Networks
Computer Network means an interconnection of autonomous (standalone) computers
for information exchange. The connecting media could be a copper wire, optical fiber,
microwave, or satellite.
1.15 Networking Elements – The computer network includes the following
networking elements:
1. At least two computers
2. Transmission medium either wired or wireless
3. Protocols or rules that govern the communication
4. Network software such as Network Operating System
Not for sell 2 Only for reading purpose
1.16 Network Criteria:
The criteria that have to be met by a computer network are:
1. Performance – It is measured in terms of transit time and response time.
• Transit time is the time for a message to travel from one device to another
• Response time is the elapsed time between an inquiry and a response.
Performance is dependent on the following factors:
• The number of users
• Type of transmission medium
• Capability of connected network
• Efficiency of software
2. Reliability – It is measured in terms of
• Frequency of failure
• Recovery from failures
• Robustness during catastrophe
3. Security – It means protecting data from unauthorized access.
Goals of Computer Networks: The following are some important goals of computer
networks:
1. Resource Sharing –
Many organizations have a substantial number of computers in operations, which
are located apart. Ex. A group of office workers can share a common printer, fax,
modem, scanner, etc.
2. High Reliability –
If there are alternate sources of supply, all files could be replicated on two or
more machines. If one of them is not available, due to hardware failure, the other
copies could be used.
3. Inter-process Communication –
Network users, located geographically apart, may converse in an interactive
session through the network. In order to permit this, the network must provide
almost error-free communications.
4. Flexible access –
Files can be accessed from any computer in the network. The project can be
begun on one computer and finished on another. Other goals include Distribution
of processing functions, Centralized management, and allocation of network
resources, Compatibility of dissimilar equipment and software, good network
performance, Scalability, Saving money, Access to remote information, Device to
device communication, etc.
Not for sell 3 Only for reading purpose
1.17 Applications of Communication & Computer Network
Computer systems and peripherals are connected to form a network. They provide
numerous advantages:
• Resource sharing such as printers and storage • IP phones
devices • Video conferences
• Exchange of information by means of e-Mails • Parallel computing
and FTP • Instant messaging
• Information sharing by using Web or Internet
• Interaction with other users using dynamic
web pages
How the Computer Networks evolving
Modern-day networks deliver more than connectivity. Organizations are embarking on
transforming themselves digitally. Their networks are critical to this transformation
and to their success. The types of network architectures that are evolving to meet
these needs are as follows:
• Software-defined (SDN): In response to new requirements in the "digital" age,
network architecture is becoming more programmable, automated, and open.
In software-defined networks, routing of traffic is controlled centrally through
software-based mechanisms. This helps the network to react quickly to
changing conditions.
• Intent-based: Building on SDN principles, intent-based networking (IBN) not
only introduces agility but also sets up a network to achieve desired
objectives by automating operations extensively, analyzing its performance,
pinpointing problematic areas, providing all-around security, and integrating
with business processes.
• Virtualized: The underlying physical network infrastructure can be partitioned
logically, to create multiple "overlay" networks. Each of these logical
networks can be tuned to meet specific security, quality-of-service (QoS), and
other requirements.
• Controller-based: Network controllers are crucial to scaling and securing
networks. Controllers automate networking functions by translating business
intent to device configurations, and they monitor devices continuously to help
ensure performance and security. Controllers simplify operations and help
organizations respond to changing business requirements.
Not for sell 4 Only for reading purpose
• Multidomain integrations: Larger enterprises may construct separate networks,
also called networking domains, for their offices, WANs, and data centers.
These networks communicate with one another through their controllers.
Such cross-network, or multidomain, integrations generally involve
exchanging relevant operating parameters to help ensure that desired
business outcomes that span network domains are achieved.
1.2 Types of computer networks
The Network allows computers to connect and communicate with different
computers via any medium. LAN, MAN, and WAN are the three major types of
networks designed to operate over the area they cover. There are some
similarities and dissimilarities between them. One of the major differences is
the geographical area they cover, i.e. LAN covers the smallest
area, MAN covers an area larger than LAN and WAN comprises the largest of
all. There are other types of Computer Networks also, like :
• PAN (Personal Area Network)
• SAN (Storage Area Network)
• EPN (Enterprise Private Network)
• VPN (Virtual Private Network)
1.21 Personal Area Network (PAN)-
PAN is a Personal area network having an interconnection of personal technology
devices to communicate over a short distance. It covers only less than 10 meters or 33
feet of area. PAN has fewer users as compared to other networks such as LAN, WAN,
etc. PAN typically uses some form of wireless technology. PAN involves the
transmission of data between information devices such as smartphones, personal
computers, tablet computers, etc.
Advantages:
• Allows for easy communication between personal devices in close proximity.
• Can be set up easily and quickly.
• Uses wireless technology, which eliminates the need for wires and cables.
• PANs are designed to be energy efficient, which means that devices can
communicate with each other without draining their batteries quickly.
• PANs are typically secured using encryption and authentication protocols, which
helps to prevent unauthorized access to data and resources.
Disadvantages:
• Limited coverage area.
Not for sell 5 Only for reading purpose
• May not be suitable for large-scale data transfer or communication.PANs
typically have limited bandwidth, which means that they may not be able to
handle large amounts of data or high-speed communication.
• May experience interference from other wireless devices.
1.22 Local Area Network (LAN) –
LAN or Local Area Network connects network devices in such a way that device
computers and workstations can share data, tools, and programs. The group of
computers and devices are connected together by a switch, or stack of switches, using
a private addressing scheme as defined by the TCP/IP protocol. Private addresses are
unique in relation to other computers on the local network. Routers are found at the
boundary of a LAN, connecting them to the larger WAN.
Data transmits at a very fast rate as the number of computers linked is limited. By
definition, the connections must be high-speed and relatively inexpensive hardware
(Such as hubs, network adapters, and Ethernet cables). LANs cover a smaller
geographical area (Size is limited to a few kilometres) and are privately owned. One
can use it for an office building, home, hospital, school, etc. LAN is easy to design and
maintain. A Communication medium used for LAN has twisted-pair cables and coaxial
cables. It covers a short distance, and so the error and noise are minimized.
Early LANs had data rates in the 4 to 16 Mbps range. Today, speeds are normally 100
or 1000 Mbps. Propagation delay is very short in a LAN. The smallest LAN may only
use two computers, while larger LANs can accommodate thousands of computers.
LAN has a range up to 2km. A LAN typically relies mostly on wired connections for
increased speed and security, but wireless connections can also be part of a LAN. The
fault tolerance of a LAN is more and there is less congestion in this network. For
example, A bunch of students playing Counter-Strike in the same room (without
internet).
CHARACTERITICS
Advantages:
• Provides fast data transfer rates and high-speed communication.
• Easy to set up and manage.
• Can be used to share peripheral devices such as printers and scanners.
• Provides increased security and fault tolerance compared to WANs.
Disadvantages:
• Limited geographical coverage.
• Limited scalability and may require significant infrastructure upgrades to
accommodate growth.
Not for sell 6 Only for reading purpose
• May experience congestion and network performance issues with increased
usage.
1.23 Metropolitan Area Network (MAN) –
MAN, or Metropolitan area Network covers a larger area than that covered by a LAN
and a smaller area as compared to WAN. MAN has a range of 5-50km. It connects two
or more computers that are apart but reside in the same or different cities. It covers a
large geographical area and may serve as an ISP (Internet Service Provider). MAN is
designed for customers who need high-speed connectivity. Speeds of MAN range in
terms of Mbps. It’s hard to design and maintain a Metropolitan Area Network.
The fault tolerance of a MAN is less and also there is more congestion in the network.
It is costly and may or may not be owned by a single organization. The data transfer
rate and the propagation delay of MAN are moderate. Devices used for transmission of
data through MAN are Modem and Wire/Cable. Examples of a MAN are part of the
telephone company network that can provide a high-speed DSL line to the customer or
the cable TV network in a city.
CHARACTERITICS
Advantages:
• Provides high-speed connectivity over a larger geographical area than LAN.
• Can be used as an ISP for multiple customers.
• Offers higher data transfer rates than WAN in some cases.
Disadvantages:
• Can be expensive to set up and maintain.
• May experience congestion and network performance issues with increased
usage.
• May have limited fault tolerance and security compared to LANs.
1.24 Wide Area Network (WAN) –
WAN or Wide Area Network is a computer network that extends over a large
geographical area, although it might be confined within the bounds of a state or
country. WAN has a range of above 50 km. A WAN could be a connection of LAN
Not for sell 7 Only for reading purpose
connecting to other LANs via telephone lines and radio waves and may be limited to
an enterprise (a corporation or an organization) or accessible to the public. The
technology is high-speed and relatively expensive.
There are two types of WAN: Switched WAN and Point-to-Point WAN. WAN is
difficult to design and maintain. Similar to a MAN, the fault tolerance of a WAN is less
and there is more congestion in the network. A Communication medium used for WAN
is PSTN or Satellite Link. Due to long-distance transmission, the noise and error tend
to be more in WAN.
WAN’s data rate is slow about a 10th LAN’s speed since it involves increased distance
and increased number of servers and terminals etc. The speed of WAN ranges from a
few kilobits per second (Kbps) to megabits per second (Mbps). Propagation delay is
one of the biggest problems faced here. Devices used for the transmission of data
through WAN are Optic wires, Microwaves, and Satellites. An example of a Switched
WAN is the asynchronous transfer mode (ATM) network and Point-to-Point WAN is a
dial-up line that connects a home computer to the Internet.
CHARACTERITICS
Advantages:
• Covers large geographical areas and can connect remote locations.
• Provides connectivity to the internet.
• Offers remote access to resources and applications.
• Can be used to support multiple users and applications simultaneously.
Disadvantages:
• Can be expensive to set up and maintain.
• Offers slower data transfer rates than LAN or MAN.
• May experience higher latency and longer propagation delays due to longer
distances and multiple network hops.
• May have lower fault tolerance and security compared to LANs.
Figure1.1 sows LAN, MAN, and WAN
Not for sell 8 Only for reading purpose
Differences between LAN, MAN, and WAN
Basis LAN MAN WAN
Full-Form LAN stands for local MAN stands for WAN stands for wide area
area network. metropolitan area network.
network.
Geographic Operates in small Operates in large Operates in larger areas
Span areas such as the areas such as a city. such as country or continent.
same building or
campus.
Ownership LAN’s ownership is MAN’s ownership can While WAN also might not
private. be private or public. be owned by one
organization.
Transmission The transmission While the Whereas the transmission
Speed speed of a LAN is transmission speed of speed of a WAN is low.
high. a MAN is average.
Propagation The propagation There is a moderate Whereas, there is a long
delay delay is short in a propagation delay in a propagation delay in a
LAN. MAN. WAN.
Congestion There is less While there is more Whereas there is more
congestion in LAN. congestion in MAN. congestion than MAN in
WAN.
Design & LAN’s design and While MAN’s design Whereas WAN’s design and
Maintenance maintenance are and maintenance are maintenance are also
easy. difficult than LAN. difficult than LAN as well
MAN.
Fault tolerance There is more fault While there is less In WAN, there is also less
tolerance in LAN. fault tolerance. fault tolerance.
1.25 Applications of Communication & Computer Network
Computer systems and peripherals are connected to form a network. They provide
numerous advantages:
• Resource sharing such as printers and storage • IP phones
devices • Video conferences
• Exchange of information by means of e-Mails and • Parallel computing
FTP • Instant messaging
• Information sharing by using Web or Internet
• Interaction with other users using dynamic web
pages
Not for sell 9 Only for reading purpose
1.3 UNIQUE IDENTIFIERS OF NETWORK (Network commands)
I. Host name:
Each device in the network is associated with a unique device name known as
Hostname.
Type “hostname” in the command prompt (Administrator Mode) and press
‘Enter’, this displays the hostname of the machine.
II. IPCONFIG(IP Address Internet Protocol address):
Also known as the Logical Address, the IP Address is the network address of
the system across the network. To identify each device in the world-wide-web,
the Internet Assigned Numbers Authority (IANA) assigns an IPV4 (Version 4)
address as a unique identifier to each device on the Internet.
The length of an IPv4 address is 32-bits, hence, we have 2 IP addresses
32
available. The length of an IPv6 address is 128-bits.Type “ipconfig” in the
command prompt and press ‘Enter’, this gives us the IP address of the device.
MAC Address (Media Access Control address):
Also known as physical address, the MAC Address is the unique identifier of
each host and is associated with its NIC (Network Interface Card). A MAC
address is assigned to the NIC at the time of manufacturing. The length of the
MAC address is : 12-nibble/ 6 bytes/ 48 bits
Type “ipconfig/all” in the command prompt and press ‘Enter’, this gives us the
MAC address OR IPConfig/all - Provides primary output with additional
Not for sell 10 Only for reading purpose
information about network adapters.ipconfig/renew - Used to renew the
system’s IP address.ipconfig/release - Removes the system’s current IP address.
III. Port: “NETSTATE-a”
A port can be referred to as a logical channel through which data can be sent-
received to an application. Any host may have multiple applications running,
and each of these applications is identified using the port number on which they
are running. A port number is a 16-bit integer; hence, we have 216 ports
available which are categorized as shown below:
Port Types Range
Well known Ports 0 – 1023
Registered Ports 1024 – 49151
Ephemeral Ports 49152 – 65535
Number of ports: 65,536
Range: 0 – 65535
Type “netstat -a” in the command prompt and press ‘Enter’, this lists all the ports
Not for sell 11 Only for reading purpose
being used.
Socket: The unique combination of IP address and Port number together are termed as
Socket.
IV. Ping
The Ping command is one of the most widely used commands in the prompt
tool, as it allows the user to check the connectivity of our system to another
host. This command sends four experimental packets to the destination host to
check whether it receives them successfully, if so, then, we can communicate
with the destination host. But in case the packets have not been received, that
means, no communication can be established with the destination host.
Command to enter in command prompt:
ping -www.destination( host name or IP address )
Not for sell 12 Only for reading purpose
V. NSLOOKUP ( DNS Server )
DNS stands for Domain Name system. DNS is basically a server which
translates web addresses or URLs (ex: www.google.com) into their
corresponding IP addresses. We don’t have to remember all the IP addresses of
each and every website. The command ‘nslookup’ gives it the IP address of the
domain it are looking for. This also provides the information of our DNS Server.
VI. TRACERT
The TRACERT command is used to trace the route during the transmission of
the data packet over to the destination host and also provides us with the “hop”
count during transmission. Using the number of hops and the hop IP address,
we can troubleshoot network issues and identify the point of the problem
during the transmission of the data packet. Command to enter in Prompt-
tracert IP-address OR tracert www.destination_host_name.com
Not for sell 13 Only for reading purpose
VII. ARP:
ARP stands for Address Resolution Protocol. It is used to convert an IP address
to its corresponding physical address(i.e., MAC Address). ARP is used by the
Data Link Layer to identify the MAC address of the Receiver’s machine.
VIII. RARP:
RARP stands for Reverse Address Resolution Protocol. As the name suggests,
it provides the IP address of the device given a physical address as input. But
RARP has become obsolete since the time DHCP has come into the picture.
IX. SYSTEMINFO
Using the SYSTEMINFO command, we can access the system’s hardware and
software details, such as processor data, booting data, Windows version, etc.
Command to enter in Prompt - systeminfo
Not for sell 14 Only for reading purpose
1.4 Types of Transmission Media
In data communication terminology, a transmission medium is a physical path
between the transmitter and the receiver i.e. it is the channel through which data is
sent from one place to another. Transmission Media is broadly classified into the
following types:
1. Guided Media: It is also referred to as Wired or Bounded transmission media.
Signals being transmitted are directed and confined in a narrow pathway by using
Not for sell 15 Only for reading purpose
physical links.
Features:
• High Speed
• Secure
• Used for comparatively shorter distances
There are 3 major types of Guided Media:
(i) Twisted Pair Cable –
It consists of 2 separately insulated conductor wires wound about each other.
Generally, several such pairs are bundled together in a protective sheath. They are
the most widely used Transmission Media. Twisted Pair is of two types:
• Unshielded Twisted Pair (UTP):
UTP consists of two insulated copper wires twisted around one another.
This type of cable has the ability to block interference and does not depend
on a physical shield for this purpose. It is used for telephonic applications.
Advantages: Disadvantages: Applications:
⇢ Least expensive ⇢ Susceptible to external ⇢ Used in
interference telephone
⇢ Easy to install
connections and
⇢ Lower capacity and
⇢ High-speed capacity LAN networks
performance in comparison to
STP
⇢ Short distance transmission
due to attenuation
• Shielded Twisted Pair (STP):
This type of cable consists of a special jacket (a copper braid covering or a foil
shield) to block external interference. It is used in fast-data-rate Ethernet and in
voice and data channels of telephone lines.
Not for sell 16 Only for reading purpose
Advantages: Disadvantages: Applications:
⇢ Better performance ⇢ More expensive The shielded twisted pair type of
at a higher data rate in cable is most frequently used in
⇢ Bulky
comparison to UTP extremely cold climates, where
the additional layer of outer
⇢ Eliminates crosstalk
covering makes it perfect for
⇢ Comparatively faster withstanding such temperatures
or for shielding the interior
components.
(ii) Coaxial Cable –
It has an outer plastic covering containing an insulation layer made of PVC or Teflon
and 2 parallel conductors each having a separate insulated protection cover. The
coaxial cable transmits information in two modes: Baseband mode (dedicated cable
bandwidth) and Broadband mode(cable bandwidth is split into separate ranges).
Cable TVs and analog television networks widely use Coaxial cables.
Advantages: Disadvantages: Applications:
⇢ High Bandwidth ⇢ Single cable Radio frequency signals are sent
⇢ Better noise ⇢ failure can disrupt over coaxial wire. It can be used
Immunity the entire network for cable television signal
⇢ Easy to install and distribution, digital audio
expand (S/PDIF), computer network
⇢ Inexpensive connections (like Ethernet), and
feedlines that connect radio
transmitters and receivers to
their antennas.
Not for sell 17 Only for reading purpose
(iii) Optical Fiber Cable –
It uses the concept of refraction of light through a core made up of glass or plastic.
The core is surrounded by a less dense glass or plastic covering called the cladding.
It is used for the transmission of large volumes of data. The cable can be
unidirectional or bidirectional. The WDM (Wavelength Division Multiplexer) supports
two modes, namely unidirectional and bidirectional mode.
Advantages: Disadvantages: Applications:
⇢Increased capacity and ⇢Difficult to ⇢Medical Purpose: Used in
bandwidth install and several types of medical
⇢Lightweight maintain instruments.
⇢Less signal attenuation ⇢High cost ⇢Defence Purpose: Used in
⇢Immunity to EM ⇢Fragile transmission of data in
interference aerospace.
⇢Resistance to corrosive ⇢For Communication: This is
materials largely used in formation of
internet cables.
⇢Industrial Purpose: Used for
lighting purposes and safety
measures in designing the
interior and exterior of
automobiles.
(iv) Stripline
Stripline is a transverse electromagnetic (TEM) transmission line medium invented by
Robert M. Barrett of the Air Force Cambridge Research Centre in the 1950s. Stripline
is the earliest form of the planar transmission line. It uses a conducting material to
transmit high-frequency waves it is also called a waveguide. This conducting
material is sandwiched between two layers of the ground plane which are usually
shorted to provide EMI immunity.
Not for sell 18 Only for reading purpose
(v) Microstripline
In this, the conducting material is separated from the ground plane by a layer of
dielectric.
2.UnguidedMedia:
It is also referred to as Wireless or Unbounded transmission media. No physical
medium is required for the transmission of electromagnetic signals.
Features:
• The signal is broadcasted through air
• Less Secure
• Used for larger distances
There are 3 types of Signals transmitted through unguided media:
(i) Radio waves –
These are easy to generate and can penetrate through buildings. The sending and
receiving antennas need not be aligned. Frequency Range:3KHz – 1GHz. AM and FM
radios and cordless phones use Radio waves for transmission.
Further Categorized as (i) Terrestrial and (ii) Satellite.
(ii) Microwaves –
It is a line-of-sight transmission i.e., the sending and receiving antennas need to be
properly aligned with each other. The distance covered by the signal is directly
proportional to the height of the antenna. Frequency Range:1GHz – 300GHz. These
are majorly used for mobile phone communication and television distribution.
(iii) Infrared –
Infrared waves are used for very short distance communication. They cannot
penetrate through obstacles. This prevents interference between systems. Frequency
Not for sell 19 Only for reading purpose
Range:300GHz – 400THz. It is used in TV remotes, wireless mouse, keyboard,
printer, etc.
Microwave Infrared
1.5 Network Architecture
IBM has developed System Network Architecture (SNA) and Digital Network
Architecture (DNA). As we know that the network standards and protocols are needed
for the network developers as well as users. Some standards are The IEEE 802.3
standards (The Institute of Electrical and Electronics Engineers 1980) (LAN), IBM
Standards SAN (LAN), CCITT Standards (Comité Consultatif International
Téléphonique et Télégraphique) (WAN) is the former, but still widely used, name for
the ITU (International Telecommunications Union1865), it became a United Nations
agency in 1947, a Geneva-based organization that sets international communications
standards. SNA Network management is part of Open-Network
Architecture (ONA) and is performed centrally by using management platforms such
as NetView and others. It is distributed into five functions which are similar to the
Open System Interconnection (OSI) model.
Basically, the architecture of a network based on networking models and types of
networks. The network community has set many standards and specification of
network architecture. The networks are managed according the series of layers for
reducing the complexity. These layers are arranged as one over the other.The
functioning and contents varies of each layer from network to network. In 1978 OSI
(open System Interaction) is accepted by ISO. Network architecture: - A set of rules
and conventions by which a network is built. Layers: - Co-relating functions and
managing them into hierarchically distinct levels in the reference model is known by
Not for sell 20 Only for reading purpose
layering. Peer Layer: - The layer at the same level of hierarchy in the source and
destination systems.
Types of Network Standards
· De Facto
A widespread consensus on a particular protocol which has not been ratified by any
official body. These standards are generally used with exclusive right and usually
remain unpublished. De Facto further divided into open and closed system. Most of the
closed system are redesigned to act like open system. The IBM “System Network
architecture” SNA is following the same path.
· De Jure
De Jure standards are developed with intent of enhancing connectivity and
interoperability. These standards are planned and developed by authorized standards
creating bodies. IEEE standards, OSI, ISO standards and TCP/IP are an example of non-
proprietary de jure.
1.51 System Network Architecture (SNA)
SNA has designed for IBM systems only to provide the networking facility. Due to this,
it is used by only limited set of users. It is IBM’s proprietary networking architecture,
developed in the mid 1970s. SNA describes general characteristics of computer
hardware and software required for interconnection. The OSI reference model was
developed a decade after the SNA. SNA supports distributed processing,
internetworking, network management and many advanced features. To implement
the SNA there are requirement of various communication packages, most popular is
Virtual Telecommunication Access Method (VTAM) i.e., the mainframe package for
SNA communication. A communication protocols for exchange of control information,
data and synchronous data link control (SDLC). APPC, APPN and HPR are some
examples of the protocols included with SNA. They can be used to connect the
iSeriestm server with other IBM or number of IBM systems.
· Physical Control: -. This deals with electrical, mechanical, and procedural
characteristics of the media and interfaces to the physical media, and is similar to the
OSI physical layer
· Data Link Control: - Similar to the data link layer, SNA defines SDLC protocol for
message transfer across a communication link. It supports DLS (Data Link switching),
QLLC (Qualified Logic Link Control over X.25) protocols as well.
· Path Control: - Path control layer includes many functions of the network layer; it
performs packet formation, path selection, routing and packet reassembling,
controlling virtual routes. Network Addressable Units (NAU) and Advanced Peer to
Not for sell 21 Only for reading purpose
Peer Networking (APPN) are the supportive components which facilitate the
communication between Transaction Program and SNA network.
· Transmission Control:- The function of this layer likely to the transport layer, the
main functions are to verify the sequence number when packets are receiving,
managing the rate at which requests are sent and received between logical Units.
· Data Flow Control:-The function of this layer is to manage the source and destination
stations. Request and response processing is done here (similar to the session layer).
· Presentation Services:-Resource sharing and data translation algorithms are
performed here.
· Transaction Services (NAU Services):- Application services are provided through
programs.
Architectural Components
The architecture of SNA is based on entities called nodes.
➢ Host or type 5:- A main frame or midrange computers is known as a HOST. The
Host controls a collection of physical and logical units, control domains, which
include one or more subareas. Single SNA network may include several host
nodes.
➢ Communication controllers or type 4:- These nodes are used for controlling
the flow of data in a hierarchical structure.
➢ Peripheral node or type 2:- Peripheral devices on the hierarchical network such
as cluster controllers, printers, terminals work as type 2 node.
Not for sell 22 Only for reading purpose
➢ Physical units: - PUs are a combination of entities such as hardware, software,
and firmware that manage and monitor the resources of a node. The following
are some types:-
a) Type 1.0 Terminal node
b) Type 2.0 Terminals, printers, Cluster controllers and other that can
communicate with only a mainframe.
c) Type 2.1 Minis, gateways, workstations that can communicate with a mainframe
or another Type 2.1 device.
d) Type 4.0 Communication controllers that link lost mainframes and cluster
controllers.
e) Type 5.0 Host computers ·
➢ Logical Units: - These allow applications to access the network. Virtual
Terminal Access Method (VTAM) provides the functions for users and
applications to access the network
a) Type 0 General purposes LU used in program-to program connections.
b) Type 1 Used for application program that communicates with single or multiple
devices.
c) Type 2 Terminals (like the 3270).
d) Type 4 Used for application programs in old peer-to peer connections.
e) Type 6.1 Used for sub-systems to communicate with each other.
f) Type 7 Support session between host applications and computers.
1.52 Digital Network Architecture (DNA)
Digital Equipment Corporation (DEC) has given affirm to network connectivity for
networks. DEC has its own architecture known as Digital Network Architecture (DNA).
The DNA was developed in 1974 to provide communication facility between various
DEC systems. It is designed as peer-to-peer network. On the network there is no node
master. Any DECnet node can communicate with other node. The major design issues
of DECnet are the peer-to-peer design.
DNA Architecture
High-Level Data Link Control (HDLC) HDLC supports synchronous and asynchronous
communication. It is a data link layer protocol and defines both the format of the data
frames and the commands needed to establish frame transfer. DECnet Locates Hosts
Using Area/Node Address Pairs:
DNA supports Digital Equipment Corporation (DEC) proprietary protocols and
standards-based protocols. Products using DNA are referred to as DEC net products.
Digital Data Communications Message Protocol (DDCMP) Operates under
asynchronous and synchronous communication and can be used in full- or half- duplex
communication.
Not for sell 23 Only for reading purpose
Connectionless Network Service (CLNS)
Supported at the network layer, CLNS supports connection oriented and connection
less network services. DNA Phase V(current version) uses CLNS.
Connection-Oriented Network Service (CONS)
Functions at the network layer, but for CLNS are more often used .DNA layers
communicate with each other to provide required communication facility. Each layer
follows a different type of protocol. Session Control Layer is responsible for routing
the packets between DNA nodes and transport layer protocols. The rest of three layers
perform physical network functions and to avail the necessary interface. Network
service protocol (NSP) provides an uninterrupted service via sub channels. For
maintaining the function of network, DECnet maintains two databases. These are the
permanent database and the volatile database. The permanent database contains
static information about the network nodes, interfaces, and the status of node
initialization. The volatile database is used to record the information that dynamically
changes during the network running time. The volatile database exists until the
network is alive. It is erased when the network is down or crashes. DECnet gateways
permit access to other networks such as SNA and X.25 based Networks.
It assumes that there will be high competition between vendors in the area of network
management architecture. Digital Network Architecture has evolved over a parallel
time span. The latest phases of both SNA and DNA have seen the introduction of long-
awaited network management product. System Network Architecture a seven layered
Not for sell 24 Only for reading purpose
model, DEC introduced lower end machines at a reasonable cost on DNA, a five
layered architecture. The bottom three layers of both architectures performed very
similar functions. Commonly in user interfaces, databases, protocols and functions
reduce the complexity. Digital Network Architecture defines the architecture in general
states the specifications for each layer of the architecture and describes the
1.6 Layers of OSI Model
OSI stands for Open Systems Interconnection. It has been developed by ISO –
‘International Organization for Standardization‘, in the year 1984. It is a 7-layer
architecture with each layer having specific functionality to perform. All these 7 layers
work collaboratively to transmit the data from one device to another across the globe.
1.61 Characteristics of OSI Model:
o The OSI model is divided into two layers: upper layers and lower layers.
o The upper layer of the OSI model mainly deals with the application related
issues, and they are implemented only in the software. The application layer is
closest to the end user. Both the end user and the application layer interact with
the software applications. An upper layer refers to the layer just above another
layer.
Not for sell 25 Only for reading purpose
o The lower layer of the OSI model deals with the data transport issues. The data
link layer and the physical layer are implemented in hardware and software.
The physical layer is the lowest layer of the OSI model and is closest to the
physical medium. The physical layer is mainly responsible for placing the
information on the physical medium.
1. Physical Layer (Layer 1) :
The lowest layer of the OSI reference model is the physical layer. It is responsible for
the actual physical connection between the devices. The physical layer contains
information in the form of bits. It is responsible for transmitting individual bits from one
node to the next. When receiving data, this layer will get the signal received and
convert it into 0s and 1s and send them to the Data Link layer, which will put the frame
back together.
Not for sell 26 Only for reading purpose
The functions of the physical layer are as follows:
1. Bit synchronization: The physical layer provides the synchronization of the bits by
providing a clock. This clock controls both sender and receiver thus providing
synchronization at bit level.
2. Bit rate control: The Physical layer also defines the transmission rate i.e. the number
of bits sent per second.
3. Physical topologies: Physical layer specifies the way in which the different,
devices/nodes are arranged in a network i.e. bus, star, or mesh topology.
4. Transmission mode: Physical layer also defines the way in which the data flows
between the two connected devices. The various transmission modes possible are
Simplex, half-duplex and full-duplex.
Types of Network Topology
The arrangement of a network that comprises nodes and connecting lines via sender
and receiver is referred to as network topology. The various network topologies are:
I. Mesh Topology:
In a mesh topology, every device is connected to another device via a particular
channel. In Mesh Topology, the protocols used are AHCP (Ad Hoc Configuration
Protocols), DHCP (Dynamic Host Configuration Protocol), etc.
Figure shows Every device is connected to another via dedicated channels. These
channels are known as links.
Not for sell 27 Only for reading purpose
• Suppose, the N number of devices are connected with each other in a mesh
topology, the total number of ports that are required by each device is N-1. In
Figure 1, there are 5 devices connected to each other, hence the total number of
ports required by each device is 4. The total number of ports required=N*(N-1).
• Suppose, N number of devices are connected with each other in a mesh topology,
then the total number of dedicated links required to connect them is NC2 i.e., N(N-
1)/2. In Figure 1, there are 5 devices connected to each other, hence the total
number of links required is 5*4/2 = 10.
Advantages of this topology:
• Communication is very fast between the nodes.
• It is robust.
• The fault is diagnosed easily. Data is reliable because data is transferred among
the devices through dedicated channels or links.
• Provides security and privacy.
Problems with this topology:
• Installation and configuration are difficult.
• The cost of cables is high as bulk wiring is required, hence suitable for a smaller
number of devices.
• The cost of maintenance is high.
II. Star Topology:
In star topology, all the devices are connected to a single hub through a cable. This
hub is the central node and all other nodes are connected to the central node. The
hub can be passive in nature i.e., not an intelligent hub such as broadcasting devices,
at the same time the hub can be intelligent known as an active hub. Active hubs have
repeaters in them. Coaxial cables or RJ-45 cables are used to connect the computers.
In Star Topology, many popular Ethernet LAN protocols are used as CD(Collision
Detection), CSMA (Carrier Sense Multiple Access), etc.
Figure shows A star topology having four systems connected to a single point of
connection i.e. hub.
Not for sell 28 Only for reading purpose
Advantages of this topology:
• If N devices are connected to each other in a star topology, then the number of
cables required to connect them is N. So, it is easy to set up.
• Each device requires only 1 port i.e. to connect to the hub, therefore the total
number of ports required is N.
• It is Robust. If one link fails only that link will affect and not other than that.
• Easy to fault identification and fault isolation.
• Star topology is cost-effective as it uses inexpensive coaxial cable.
Problems with this topology:
• If the concentrator (hub) on which the whole topology relies fails, the whole
system will crash down.
• The cost of installation is high.
• Performance is based on the single concentrator i.e. hub.
III. Bus Topology:
Bus topology is a network type in which every computer and network device is
connected to a single cable. It is bi-directional. It is a multi-point connection and a
non-robust topology because if the backbone fails the topology crashes. In Bus
Topology, various MAC (Media Access Control) protocols are followed by LAN
ethernet connections like TDMA, Pure Aloha, CDMA, Slotted Aloha, etc.
Figure shows A bus topology with shared backbone cable. The nodes are connected
to the channel via drop lines.
Advantages of this topology:
• If N devices are connected to each other in a bus topology, then the number of
cables required to connect them is 1, known as backbone cable, and N drop lines
are required.
• Coaxial or twisted pair cables are mainly used in bus-based networks that
support up to 10 Mbps.
Not for sell 29 Only for reading purpose
• The cost of the cable is less compared to other topologies, but it is used to build
small networks.
• Bus topology is familiar technology as installation and troubleshooting techniques
are well known.
Problems with this topology:
• A bus topology is quite simpler, but still, it requires a lot of cabling.
• If the common cable fails, then the whole system will crash down.
• If the network traffic is heavy, it increases collisions in the network. To avoid this,
various protocols are used in the MAC layer known as Pure Aloha, Slotted Aloha,
CSMA/CD, etc.
• Adding new devices to the network would slow down networks.
• Security is very low.
IV. Ring Topology:
In this topology, it forms a ring connecting devices with exactly two neighbouring
devices.
A number of repeaters are used for Ring topology with a large number of nodes,
because if someone wants to send some data to the last node in the ring topology
with 100 nodes, then the data will have to pass through 99 nodes to reach the 100th
node. Hence to prevent data loss repeaters are used in the network.
The data flows in one direction, i.e.., it is unidirectional, but it can be made
bidirectional by having 2 connections between each Network Node, it is called Dual
Ring Topology. In-Ring Topology, the Token Ring Passing protocol is used by the
workstations to transmit the data.
Figure shows A ring topology comprises 4 stations connected with each forming a
ring.The most common access method of ring topology is token passing.
Not for sell 30 Only for reading purpose
• Token passing: It is a network access method in which a token is passed from one
node to another node.
• Token: It is a frame that circulates around the network.
The following operations take place in ring topology are :
1. One station is known as a monitor station which takes all the responsibility for
performing the operations.
2. To transmit the data, the station has to hold the token. After the transmission is
done, the token is to be released for other stations to use.
3. When no station is transmitting the data, then the token will circulate in the ring.
4. There are two types of token release techniques: Early token release releases the
token just after transmitting the data and Delayed token release releases the
token after the acknowledgment is received from the receiver.
Advantages of this topology:
• The data transmission is high-speed.
• The possibility of collision is minimum in this type of topology.
• Cheap to install and expand.
• It is less costly than a star topology.
Problems with this topology:
• The failure of a single node in the network can cause the entire network to fail.
• Troubleshooting is difficult in this topology.
• The addition of stations in between or the removal of stations can disturb the
whole topology.
• Less secure.
V. Tree Topology:
This topology is the variation of the Star topology. This topology has a hierarchical
flow of data. In Tree Topology, protocols like DHCP and SAC (Standard Automatic
Configuration ) are used.
In this, the
various secondary hubs are connected to the central hub which contains the repeater.
Not for sell 31 Only for reading purpose
This data flow from top to bottom i.e. from the central hub to the secondary and then
to the devices or from bottom to top i.e. devices to the secondary hub and then to the
central hub. It is a multi-point connection and a non-robust topology because if the
backbone fails the topology crashes.
Advantages of this topology :
• It allows more devices to be attached to a single central hub thus it decreases the
distance that is travelled by the signal to come to the devices.
• It allows the network to get isolated and also prioritize from different computers.
• We can add new devices to the existing network.
• Error detection and error correction are very easy in a tree topology.
Problems with this topology :
• If the central hub gets fails the entire system fails.
• The cost is high because of the cabling.
• If new devices are added, it becomes difficult to reconfigure.
Hybrid Topology :
This topological technology is the combination of all the various types of topologies
we have studied above. It is used when the nodes are free to take any form. It means
these can be individuals such as Ring or Star topology or can be a combination of
various types of topologies seen above. Each individual topology uses the protocol
that has been discussed earlier.
Figure 6 shows The above figure shows the structure of the Hybrid topology. As
seen, it contains a combination of all different types of networks.
Advantages of this topology :
• This topology is very flexible.
Not for sell 32 Only for reading purpose
• The size of the network can be easily expanded by adding new devices.
Problems with this topology :
• It is challenging to design the architecture of the Hybrid Network.
• Hubs used in this topology are very expensive.
• The infrastructure cost is very high as a hybrid network requires a lot of cabling
and network devices.
* Hub, Repeater, Modem, Cables are Physical Layer devices.
** Network Layer, Data Link Layer, and Physical Layer are also known as Lower
Layers or Hardware Layers.
1..62 Data Link Layer (DLL) (Layer 2) :
The data link layer is responsible for the node-to-node delivery of the message. The
main function of this layer is to make sure data transfer is error-free from one node to
another, over the physical layer. When a packet arrives in a network, it is the
responsibility of DLL to transmit it to the Host using its MAC address.
Data Link Layer is divided into two sublayers:
1. Logical Link Control (LLC)
2. Media Access Control (MAC)
The packet received from the Network layer is further divided into frames depending
on the frame size of NIC(Network Interface Card). DLL also encapsulates Sender and
Receiver’s MAC address in the header.
The Receiver’s MAC address is obtained by placing an ARP (Address Resolution
Protocol) request onto the wire asking “Who has that IP address?” and the destination
host will reply with its MAC address.
The functions of the Data Link layer are :
Not for sell 33 Only for reading purpose
1. Framing: Framing is a function of the data link layer. It provides a way for a sender
to transmit a set of bits that are meaningful to the receiver. This can be
accomplished by attaching special bit patterns to the beginning and end of the
frame.
2. Physical addressing: After creating frames, the Data link layer adds physical
addresses (MAC address) of the sender and/or receiver in the header of each frame.
3. Error control: Error control mechanism of error control in which it detects and
retransmits damaged or lost frames. It is achieved by adding a calculated value CRC
(Cyclic Redundancy Check) that is placed to the Data link layer's trailer which is
added to the message frame before it is sent to the physical layer. If any error seems
to occur, then the receiver sends the acknowledgment for the retransmission of the
corrupted frames.
4. Flow Control: Flow control is the main functionality of the Data-link layer. It is the
technique through which the constant data rate is maintained on both the sides so
that no data get corrupted. It ensures that the transmitting station such as a server
with higher processing speed does not exceed the receiving station, with lower
processing speed. Flow control coordinates the amount of data that can be sent
before receiving acknowledgement.
5. Access control: When a single communication channel is shared by multiple
devices, the MAC sub-layer of the data link layer helps to determine which device
has control over the channel at a given time.
* Packet in Data Link layer is referred to as Frame.
** Data Link layer is handled by the NIC (Network Interface Card) and device drivers of
host machines.
*** Switch & Bridge are Data Link Layer devices.
1.63 Network Layer (Layer 3) :
The network layer works for the transmission of data from one host to the other
located in different networks. It also takes care of packet routing i.e. selection of the
shortest path to transmit the packet, from the number of routes available. The sender
& receiver’s IP addresses are placed in the header by the network layer.
The functions of the Network layer are :
Not for sell 34 Only for reading purpose
o It is a layer 3 that manages device addressing, tracks the location of devices on
the network.
o It determines the best path to move data from source to the destination based
on the network conditions, the priority of service, and other factors.
o The Data link layer is responsible for routing and forwarding the packets.
o Routers are the layer 3 devices, they are specified in this layer and used to
provide the routing services within an internetwork.
o The protocols used to route the network traffic are known as Network layer
protocols. Examples of protocols are IP and Ipv6.
Functions of Network Layer:
1. Internetworking: An internetworking is the main responsibility of the network layer.
It provides a logical connection between different devices.
2. Addressing: A Network layer adds the source and destination address to the header
of the frame. Addressing is used to identify the device on the internet.
3. Routing: The network layer protocols determine which route is suitable from source
to destination. This function of the network layer is known as routing.
4. Logical Addressing: In order to identify each device on internetwork uniquely, the
network layer defines an addressing scheme. The sender & receiver’s IP addresses
are placed in the header by the network layer. Such an address distinguishes each
device uniquely and universally.
* Segment in Network layer is referred to as Packet.
** Network layer is implemented by networking devices such as routers.
Not for sell 35 Only for reading purpose
1.64 Transport Layer (Layer 4) :
The transport layer provides services to the application layer and takes services from
the network layer. The data in the transport layer is referred to as Segments. It is
responsible for the End-to-End Delivery of the complete message. The transport layer
also provides the acknowledgement of the successful data transmission and re-
transmits the data if an error is found.
o The Transport layer is a Layer 4 ensures that messages are transmitted in the
order in which they are sent and there is no duplication of data.
o The main responsibility of the transport layer is to transfer the data completely.
o It receives the data from the upper layer and converts them into smaller units
known as segments.
o This layer can be termed as an end-to-end layer as it provides a point-to-point
connection between source and destination to deliver the data reliably.
At sender’s side: Transport layer receives the formatted data from the upper layers,
performs Segmentation, and also implements Flow & Error control to ensure proper
data transmission. It also adds Source and Destination port numbers in its header and
forwards the segmented data to the Network Layer.
Note: The sender needs to know the port number associated with the receiver’s
application.
Generally, this destination port number is configured, either by default or manually. For
example, when a web application makes a request to a web server, it typically uses
port number 80, because this is the default port assigned to web applications. Many
applications have default ports assigned.
Not for sell 36 Only for reading purpose
At receiver’s side: Transport Layer reads the port number from its header and
forwards the Data which it has received to the respective application. It also performs
sequencing and reassembling of the segmented data.
Functions of Transport Layer:
a) Service-point addressing: Computers run several programs simultaneously due
to this reason, the transmission of data from source to the destination not only
from one computer to another computer but also from one process to another
process. The transport layer adds the header that contains the address known
as a service-point address or port address. The responsibility of the network
layer is to transmit the data from one computer to another computer and the
responsibility of the transport layer is to transmit the message to the correct
process.
b) Segmentation and reassembly: When the transport layer receives the message
from the upper layer, it divides the message into multiple segments, and each
segment is assigned with a sequence number that uniquely identifies each
segment. When the message has arrived at the destination, then the transport
layer reassembles the message based on their sequence numbers.
c) Connection control: Transport layer provides two services Connection-oriented
service and connectionless service. A connectionless service treats each
segment as an individual packet, and they all travel in different routes to reach
the destination. A connection-oriented service makes a connection with the
transport layer at the destination machine before delivering the packets. In
connection-oriented service, all the packets travel in the single route.
❖ Connection-Oriented Service: It is a three-phase process that includes
• Connection Establishment
• Data Transfer
• Termination / disconnection
In this type of transmission, the receiving device sends an acknowledgement, back
to the source after a packet or group of packets is received. This type of
transmission is reliable and secure.
❖ B. Connectionless service: It is a one-phase process and includes Data
Transfer. In this type of transmission, the receiver does not acknowledge
receipt of a packet. This approach allows for much faster communication
between devices. Connection-oriented service is more reliable than
connectionless Service.
Not for sell 37 Only for reading purpose
Flow control: The transport layer also responsible for flow control but it is performed
end-to-end rather than across a single link.
Error control: The transport layer is also responsible for Error control. Error control is
performed end-to-end rather than across the single link. The sender transport layer
ensures that message reach at the destination without any error.
➢ Transmission Control Protocol
o It is a standard protocol that allows the systems to communicate over the
internet.
o It establishes and maintains a connection between hosts.
o When data is sent over the TCP connection, then the TCP protocol
divides the data into smaller units known as segments. Each segment
travels over the internet using multiple routes, and they arrive in different
orders at the destination. The transmission control protocol reorders the
packets in the correct order at the receiving end.
User Datagram Protocol
o User Datagram Protocol is a transport layer protocol.
o It is an unreliable transport protocol as in this case receiver does not send any
acknowledgment when the packet is received, the sender does not wait for any
acknowledgment. Therefore, this makes a protocol unreliable.
* Data in the Transport Layer is called as Segments.
** Transport layer is operated by the Operating System. It is a part of the OS
and communicates with the Application Layer by making system calls.
Transport Layer is called as Heart of OSI model.
1.65 Session Layer (Layer 5) :
This layer is responsible for the establishment of connection, maintenance of sessions,
authentication, and also ensures security.
Not for sell 38 Only for reading purpose
The functions of the session layer are :
1. Session establishment, maintenance, and termination: The layer allows the two
processes to establish, use and terminate a connection.
2. Synchronization: This layer allows a process to add checkpoints which are
considered synchronization points into the data. These synchronization points help
to identify the error so that the data is re-synchronized properly, and ends of the
messages are not cut prematurely and data loss is avoided.
3. Dialog Controller: Session layer acts as a dialog controller that creates a dialog
between two processes or we can say that it allows the communication between
two processes which can be either half-duplex or full-duplex.
**All the below 3 layers(including Session Layer) are integrated as a single layer in the
TCP/IP model as “Application Layer”.
**Implementation of these 3 layers is done by the network application itself. These are
also known as Upper Layers or Software Layers.
Scenario:
Let us consider a scenario where a user wants to send a message through some
Messenger application running in his browser. The “Messenger” here acts as the
application layer which provides the user with an interface to create the data. This
message or so-called Data is compressed, encrypted (if any secure data), and
converted into bits (0’s and 1’s) so that it can be transmitted.
Not for sell 39 Only for reading purpose
1.66. Presentation Layer (Layer 6):
The presentation layer is also called the Translation layer. The data from the
application layer is extracted here and manipulated as per the required format to
transmit over the network.
The functions of the presentation layer are :
• Translation: The processes in two systems exchange the information in the
form of character strings, numbers and so on. Different computers use different
encoding methods, the presentation layer handles the interoperability between
the different encoding methods. It converts the data from sender-dependent
format into a common format and changes the common format into receiver-
dependent format at the receiving end. For example, ASCII to EBCDIC.
• Encryption: Encryption is needed to maintain privacy. Encryption is a process of
converting the sender-transmitted information into another form or code and
sends the resulting message over the network. The encrypted data is known as
the ciphertext, and the decrypted data is known as plain text. A key value is
used for encrypting as well as decrypting data.
• Compression: Data compression is a process of compressing the data, i.e., it
reduces the number of bits to be transmitted. Data compression is very
important in multimedia such as text, audio, video.
Not for sell 40 Only for reading purpose
1.67 Application Layer (Layer 7) :
At the very top of the OSI Reference Model stack of layers, we find the Application
layer which is implemented by the network applications. These applications produce
the data, which has to be transferred over the network. This layer also serves as a
window for the application services to access the network and for displaying the
received information to the user.
Example: Application – Browsers, Skype Messenger, etc.
**Application Layer is also called Desktop Layer.
The functions of the Application layer are :
1. Network Virtual Terminal
2. FTAM-File transfer access and management
3. Mail Services
4. Directory Services An application provides the distributed database sources and is
used to provide that global information about various objects.
OSI model acts as a reference model and is not implemented on the Internet because
of its late invention. The current model being used is the TCP/IP model.
Not for sell 41 Only for reading purpose
OSI model in a nutshell
Sr. Type of Layer Working or Responsibility information Devices
No in OSI Model
1 Physical Establishing Physical Bits Hubs, Modem,
Layer connection between devices. cables,Repeaters
2 Data Link Node to Node delivery of Frame Switch, Bridge
Layer messages.
3 Network Transmission data from one Packet Router
Layer Host to other located in
different Network.
4 Transport Take service from network Segment Firewall
Layer layer & provide it to
Heart of OSI Application Layer.
5 Session Establish connection , Message Gateway
Layer Maintenance, Authentication
and safety.
6 Presentation Data from application layer is Message
Layer extracted & manipulated.
7 Application Helps in identifying clients Message Monitor
Layer and synchronise
communication.
The diagrammatic comparison of the TCP/IP and OSI model is as follows:
Layers in TCP/IP OSI Model
Application Application
Presentation
Transport Session
Transport
Network/Internet Network
Data-link Data-link
Physical Physical
Not for sell 42 Only for reading purpose
1.7 TCP/IP Model
The OSI Model we just looked at is just a reference/logical model. It was designed to
describe the functions of the communication system by dividing the communication
procedure into smaller and simpler components. But when we talk about the TCP/IP
model, it was designed and developed by the Department of Defense (DoD) in the
1960s and is based on standard protocols. It stands for Transmission Control
Protocol/Internet Protocol. The TCP/IP model is a concise version of the OSI model. It
contains four layers, unlike the seven layers in the OSI model.
The layers are:
1. Application Layer
2. Transport Layer(TCP/UDP)
3. Network/Internet Layer(IP)
4. Data Link Layer (MAC)
5. Physical Layer
1.71 Physical Layer:
It is a group of applications requiring network communications. This layer is
responsible for generating the data and requesting connections. It acts on behalf of
the sender and the Network Access layer on the behalf of the receiver. During this
article, we will be talking on the behalf of the receiver.
Physical Layer Protocols
Not for sell 43 Only for reading purpose
Typically, a combination of hardware and software programming makes up the
physical layer. It consists of several protocols that control data transmissions on a
network. The following are some examples of Layer 1 protocols:
Typically, a combination of hardware and software programming makes up the
physical layer. It consists of several protocols that control data transmissions on a
network. The following are some examples of Layer 1 protocols:
▪ Ethernet with 1000BASE-T.
▪ Ethernet with 1000BASE-SX.
▪ Ethernet at 100BaseT.
▪ Synchronous Digital Hierarchy/Optical Synchronisation.
▪ Physical-layer variations in 802.11.
▪ Bluetooth.
▪ Networking for controllers.
▪ U.S. Serial Bus.
1.72 Data Link Layer:
The packet’s network protocol type, in this case TCP/IP, is identified by the data-link
layer. Error prevention and “framing” are also provided by the data-link layer. Point-
to-Point Protocol (PPP) framing and Ethernet IEEE 802.2 framing are two examples
of data-link layer protocols.
1.73 Internet Layer:
o This layer parallels the functions of OSI’s Network layer. An internet layer is
the second layer of the TCP/IP model.
o An internet layer is also known as the network layer.
o The main responsibility of the internet layer is to send the packets from any
network, and they arrive at the destination irrespective of the route they take.
It defines the protocols which are responsible for the logical transmission of data
over the entire network. The working of this layer & main protocols residing at this
layer are as follows:
1).IP Protocol
2).ARP Protocol
3).ICMP Protocol
Not for sell 44 Only for reading purpose
1).IP Protocol
Internet Protocol is a method that is useful for sending data from one device to
another from all over the internet. Every device contains a unique IP Address that
helps it communicate and exchange data across other devices present on the
internet.
o IP Addressing: This protocol implements logical host addresses known as IP
addresses. The IP addresses are used by the internet and higher layers to
identify the device and to provide internetwork routing.
o Host-to-host communication: It determines the path through which the data is
to be transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the
transport layer protocol. An IP protocol ensures that the data is sent and
received securely, it encapsulates the data into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP
datagram by data link layer protocol is known as Maximum Transmission unit
(MTU). If the size of IP datagram is greater than the MTU unit, then the IP
protocol splits the datagram into smaller units so that they can travel over the
local network. Fragmentation can be done by the sender or intermediate router.
At the receiver side, all the fragments are reassembled to form an original
message.
o Routing: When IP datagram is sent over the same local network such as LAN,
MAN, WAN, it is known as direct delivery. When source and destination are on
the distant network, then the IP datagram is sent indirectly. This can be
accomplished by routing the IP datagram through various devices such as
routers.
What is an IP Address?
All the computers of the world on the Internet network communicate with each other
with underground or underwater cables or wirelessly. If I want to download a file
from the internet or load a web page or literally do anything related to the internet,
my computer must have an address so that other computers can find and locate mine
in order to deliver that particular file or webpage that I am requesting. In technical
terms, that address is called IP Address or Internet Protocol Address.
Let us understand it with another example, like if someone wants to send it a mail
then he/she must have the home address. Similarly, the computer too needs an
address so that other computers on the internet can communicate with each other
Not for sell 45 Only for reading purpose
without the confusion of delivering information to someone else’s computer. And that
is why each computer in this world has a unique IP Address. Or in other words, an IP
address is a unique address that is used to identify computers or nodes on the
internet. This address is just a string of numbers written in a certain format. It is
generally expressed in a set of numbers for example 192.155.12.1. Here each
number in the set is from 0 to 255 range. Or we can say that a full IP address ranges
from 0.0.0.0 to 255.255.255.255. And these IP addresses are assigned by IANA
(known as Internet Corporation for Internet Assigned Numbers Authority).
But what is Internet protocol? This is just a set of rules that makes the internet work.
It is able to read this article because the computer or phone has a unique address
where the page that it requested has been delivered successfully.
Working of IP addresses
The working of IP addresses is similar to other languages. It can also use some set of
rules to send information. Using these protocols, we can easily send, and receive data
or files to the connected devices. There are several steps behind the scenes. Let us
look at them
• The device directly requests the Internet Service Provider which then grants the
device access to the web.
• And an IP Address is assigned to the device from the given range available.
• The internet activity goes through the service provider, and they route it back to it,
using the IP address.
• The IP address can change. For example, turning the router on or off can change
the IP Address.
• When it is out from the home location the home IP address doesn’t accompany it.
It changes as it change the network of the device.
Network addressing
o Network Addressing is one of the major responsibilities of the network layer.
o Network addresses are always logical, i.e., software-based addresses.
o A host is also known as end system that has one link to the network. The
boundary between the host and link is known as an interface. Therefore, the
host can have only one interface.
o A router is different from the host in that it has two or more links that connect to
it. When a router forwards the datagram, then it forwards the packet to one of
the links. The boundary between the router and link is known as an interface,
and the router can have multiple interfaces, one for each of its links. Each
Not for sell 46 Only for reading purpose
interface is capable of sending and receiving the IP packets, so IP requires each
interface to have an address.
o Each IP address is 32 bits long, and they are represented in the form of "dot-
decimal notation" where each byte is written in the decimal form, and they are
separated by the period. An IP address would look like 193.32.216.9 where 193
represents the decimal notation of first 8 bits of an address, 32 represents the
decimal notation of second 8 bits of an address.
Let's understand through a simple example.
• In the above figure, a router has three interfaces labelled as 1, 2 & 3 and each
router interface contains its own IP address.
• Each host contains its own interface and IP address.
• All the interfaces attached to the LAN 1 is having an IP address in the form of
223.1.1.xxx, and the interfaces attached to the LAN 2 and LAN 3 have an IP
address in the form of 223.1.2.xxx and 223.1.3.xxx respectively.
Each IP address consists of two parts. The first part (first three bytes in IP address) specifies the network
and second part (last byte of an IP address) specifies the host in the network.
Classful Addressing https://www.geeksforgeeks.org/classful-vs-classless-addressing/
An IP address is 32-bit long. An IP address is divided into sub-classes:
• Class A
• Class B
• Class C
• Class D
• Class E
An ip address is divided into two parts:
Not for sell 47 Only for reading purpose
o Network ID: It represents the number of networks.
o Host ID: It represents the number of hosts.
In the above diagram, we observe that each class have a specific range of IP addresses.
The class of IP address is used to determine the number of bits used in a class and
number of networks and hosts available in the class.
Class A
In Class A, an IP address is assigned to those networks that contain a large number of
hosts.
o The network ID is 8 bits long.
o The host ID is 24 bits long.
In Class A, the first bit in higher order bits of the first octet is always set to 0 and the
remaining 7 bits determine the network ID. The 24 bits determine the host ID in any
network.
The total number of networks in Class A = 27 = 128 network address
The total number of hosts in Class A = 224 - 2 = 16,777,214 host address
Not for sell 48 Only for reading purpose
Class B
In Class B, an IP address is assigned to those networks that range from small-sized to
large-sized networks.
o The Network ID is 16 bits long.
o The Host ID is 16 bits long.
In Class B, the higher order bits of the first octet are always set to 10, and the
remaining14 bits determine the network ID. The other 16 bits determine the Host ID.
The total number of networks in Class B = 214 = 16384 network address
The total number of hosts in Class B = 216 - 2 = 65534 host address
Class C
In Class C, an IP address is assigned to only small-sized networks.
o The Network ID is 24 bits long.
o The host ID is 8 bits long.
In Class C, the higher order bits of the first octet are always set to 110, and the
remaining 21 bits determine the network ID. The 8 bits of the host ID determine the
host in a network.
The total number of networks = 221 = 2097152 network address
The total number of hosts = 28 - 2 = 254 host address
Not for sell 49 Only for reading purpose
Class D
In Class D, an IP address is reserved for multicast addresses. It does not possess
subnetting. The higher order bits of the first octet are always set to 1110, and the
remaining bits determines the host ID in any network.
Class E
In Class E, an IP address is used for the future use or for the research and development
purposes. It does not possess any subnetting. The higher order bits of the first octet
are always set to 1111, and the remaining bits determines the host ID in any network.
Rules for assigning Host ID:
The Host ID is used to determine the host within any network. The Host ID is assigned
based on the following rules:
o The Host ID must be unique within any network.
o The Host ID in which all the bits are set to 0 cannot be assigned as it is used to
represent the network ID of the IP address.
o The Host ID in which all the bits are set to 1 cannot be assigned as it is reserved
for the multicast address.
Rules for assigning Network ID:
If the hosts are located within the same local network, then they are assigned with the
same network ID. The following are the rules for assigning Network ID:
o The network ID cannot start with 127 as 127 is used by Class A.
o The Network ID in which all the bits are set to 0 cannot be assigned as it is used
to specify a particular host on the local network.
Not for sell 50 Only for reading purpose
o The Network ID in which all the bits are set to 1 cannot be assigned as it is
reserved for the multicast address.
Classful Network Architecture
Class Higher NET ID HOST No.of No.of Range
bits bits ID bits networks hosts
per
network
A 0 8 24 27 224 0.0.0.0 to
127.255.255.255
B 10 16 16 2 14
216
128.0.0.0 to
191.255.255.255
C 110 24 8 221 28 192.0.0.0 to
223.255.255.255
D 1110 Not Not Not Not 224.0.0.0 to
Defined Defined Defined Defined 239.255.255.255
E 1111 Not Not Not Not 240.0.0.0 to
Defined Defined Defined Defined 255.255.255.255
Types of IP Address
IP Address is of two types:
1. IPv4: Internet Protocol version 4. It consists of 4 numbers separated by the dots.
Each number can be from 0-255 in decimal numbers. But computers do not
understand decimal numbers, they instead change them to binary numbers which are
only 0 and 1. Therefore, in binary, this (0-255) range can be written as (00000000 –
11111111). Since each number N can be represented by a group of 8-digit binary
digits. So, a whole IPv4 binary address can be represented by 32-bits of binary digits.
In IPv4, a unique sequence of bits is assigned to a computer, so a total of (2^32)
devices approximately = 4,294,967,296 can be assigned with IPv4. IPv4 can be
written as:
189.123.123.90
Classes of IPv4 Address: There are around 4.3 billion IPv4 addresses and managing
all those addresses without any scheme is next to impossible. Let’s understand it
with a simple example. If it has to find a word from a language dictionary, how long
will it take? Usually, it will take less than 5 minutes to find that word. It is able to do
Not for sell 51 Only for reading purpose
this because words in the dictionary are organized in alphabetical order. If it has to
find out the same word from a dictionary that doesn’t use any sequence or order to
organize the words, it will take an eternity to find the word. If a dictionary with one
billion words without order can be so disastrous, then it can imagine the pain behind
finding an address from 4.3 billion addresses. For easier management and
assignment IP addresses are organized in numeric order and divided into the
following 5 classes :
IP Class Address Range Maximum number of networks
Class A 0-127 127 (27-1)
Class B 128-191 16384
Class C 192-223 2097152
Class D 224-239 Reserve for multitasking
Class E 240-254 Reserved for Research and development
2. IPv6: But there is a problem with the IPv4 address. With IPv4, we can connect
only the above number of 4 billion devices uniquely, and apparently, there are much
more devices in the world to be connected to the internet. So, gradually we are
making our way to IPv6 Address which is a 128-bit IP address. In human-friendly
form, IPv6 is written as a group of 8 hexadecimal numbers separated with colons(:).
But in the computer-friendly form, it can be written as 128 bits of 0s and 1s. Since, a
unique sequence of binary digits is given to computers, smartphones, and other
devices to be connected to the internet. So, via IPv6 a total of (2^128) devices can be
assigned with unique addresses which are actually more than enough for upcoming
future generations.
IPv6 can be written as:
2011:0bd9:75c5:0000:0000:6b3e:0170:8394
Classification of IP Address
An IP address is classified into the following types:
1. Public IP Address: This address is available publicly and it is assigned by the
network provider to the router, which further divides it to the devices. Public IP
Addresses are of two types,
• Dynamic IP Address: When it connects a smartphone or computer to the internet,
the Internet Service Provider provides it an IP Address from the range of available
Not for sell 52 Only for reading purpose
IP Addresses. Now, the device has an IP Address and it can simply connect the
device to the Internet and send and receive data to and from the device. The very
next time when it tries to connect to the internet with the same device, the
provider provides it with different IP Addresses to the same device and also from
the same available range. Since IP Address keeps on changing every time when it
connects to the internet, it is called a Dynamic IP Address.
• Static IP Address: Static address never changes. They serve as a permanent
internet address. These are used by DNS servers. What are DNS servers?
Actually, these are computers that help it to open a website on the computer.
Static IP Address provides information such as device is located on which
continent, which country, which city, and which Internet Service Provider provides
internet connection to that particular device. Once, we know who is the ISP, we
can trace the location of the device connected to the internet. Static IP Addresses
provide less security than Dynamic IP Addresses because they are easier to track.
2. Private IP Address: This is an internal address of the device which are not routed
to the internet and no exchange of data can take place between a private address
and the internet.
3. Shared IP addresses: Many websites use shared IP addresses where the traffic is
not huge and very much controllable, they decide to rent it to other similar websites
so to make it cost-friendly. Several companies and email sending servers use the
same IP address (within a single mail server) to cut down the cost so that they could
save for the time the server is idle.
4. Dedicated IP addresses: A dedicated IP Address is an address used by a single
company or an individual which gives them certain benefits using a private Secure
Sockets Layer (SSL) certificate which is not in the case of a shared IP address. It
allows to access the website or log in via File Transfer Protocol (FTP) by IP address
instead of its domain name. It increases the performance of the website when the
traffic is high. It also protects from a shared IP address that is black-listed due to
spam.
Lookup IP addresses
To know the public IP, it can simply search “What is my IP?” on google. Other
websites will show it equivalent information: they will see the public IP address
because, by visiting the location, the router has made an invitation/request and thus
revealed the information. the location IP location goes further by showing the name
of the Internet Service Provider and the current city.
Finding the device’s private IP Address depends on the OS or platform it using.
Not for sell 53 Only for reading purpose
• On Windows: Click Start and type “cmd” in the search box and run the command
prompt. In the black command prompt dialog box type “ipconfig” and press enter.
It will be able to see the IP Address there.
• On Mac: Go to system preferences and select Network, it will be able to see the
information regarding the network which includes the IP Address.
IP address security threats
Each IP address is associated with virtual ports in a computer that acts as a doorway
that allows web applications or websites to send and receive data or information on
the device. If after the connection is terminated the ports remain open somehow,
might allow hackers to get into the device. Once, a hacker gets access to the device
remotely through various tools and viruses, they would be able to access all the
stored files and data and the computer hardware as well, which includes the
webcam, mic, speaker, and all the browsing history, the emails and saved passwords.
These are some serious threats from which we need to be extra careful.
Various online activities can reveal the IP address from playing games or accepting
bad cookies from a trap website or commenting on a website or forum. Once, they
have the IP, there are websites that help them get a decent idea of the location. They
can further use social media websites to track the online presence and cross verify
everything that they got from these sites and use the information for their benefits or
can sell these data collected on the dark web which can further exploit it.
The worst which I have seen in my friend’s pc got infected while he was installing an
application that he downloaded from a pirated website. The moment he hit install, a
number of command prompt boxes started appearing, tens of commands started
running and after a while, it was back to normal. Some malware was installed in the
process. After a few days, someone was trying to log in to his social media account
and other accounts using his computer as a host pc (his own IP address) but his
computer was idle. The hacker was using his pc and his network, i.e., his IP address
to do some serious stuff. He formatted his computer then and there, secured all his
emails and other accounts, and changed all the passwords and all the security
measures that had to be taken.
Cybercriminals use different techniques to get hands-on with the IP address and
know the location, get into the network and hack into the computers. For instance,
they will find it through Skype which uses IP addresses to speak. If it is using these
apps, it’s important to notice that the IP address might be vulnerable. Attackers can
Not for sell 54 Only for reading purpose
use the various tools, where they will find the IP address. Some of the threats are:
Online stalking, downloading illegal content using the IP address, tracking the
location, directly attacking the network, and hacking into the device.
Protect and hide IP address
To secure and hide the IP address from unwanted people always remember the
following points:
• Use a proxy server.
• Use a virtual private network (VPN) when using public Wi-Fi, it is traveling,
working remotely, or just want some privacy.
• Change privacy settings on instant messaging applications.
• Create unique passwords.
• Beware of phishing emails and malicious content.
• Use a good and paid antivirus application and keep it up to date.
• When it is using public Wi-Fi in a cafe or station or anywhere, it must hide the IP
address by using VPN. Getting the IP from public Wi-Fi is just a cakewalk for
these hackers and they are very good at stealing all the information while using
the computer’s address. There are different phishing techniques in which they
email it, call it, and SMS it about giving vital information about it. They give links
to vicious websites which are pre-rigged. The moment it opens these websites,
they steal all the device’s information revealing all the information about it and
the device which are to be kept private. These leaks help the hackers to exploit
the device and install or download some spyware and malware on the device. But
using a good anti-virus gives it web security as well, which will prevent those
websites to launch and warn it about the information being passed to these
websites.
• It is also not recommended to use torrent or pirated websites which are a threat
to the online identity and can compromise the device or emails or any other
information about it.
Here is an example of a use case for the Internet Layer:
Imagine that it is using a computer to send an email to a friend. When it clicks “send,”
the email is broken down into smaller packets of data, which are then sent to the
Internet Layer for routing. The Internet Layer assigns an IP address to each packet
and uses routing tables to determine the best route for the packet to take to reach its
destination. The packet is then forwarded to the next hop on its route until it reaches
its destination. When all of the packets have been delivered, the friend’s computer
can reassemble them into the original email message.
Not for sell 55 Only for reading purpose
In this example, the Internet Layer plays a crucial role in delivering the email from the
computer to the friend’s computer. It uses IP addresses and routing tables to
determine the best route for the packets to take, and it ensures that the packets are
delivered to the correct destination. Without the Internet Layer, it would not be
possible to send data across the Internet.
What is a Web Address?
The web address was developed by Sir Tim Berners-Lee and the URL working group
of IEFT (Internet Engineering Task Force) in the year 1994. It is a name that points to
the location of a particular web page in the internet world. It can be the address of
anything like the address of a particular file, directory, photo, video, etc. Every web
page on the internet has a unique web address, with the help of which the user
accesses those web pages. It is the same as the address of the house or school or
any place on this planet. Web Address is also known as URL i.e. uniform resource
locator. For example:
Here, https is the scheme, www.google,com is the domain name and in combination,
it is known as the web address of Google website.
Components of a web address
A web address is written in the following format:
Scheme://Domain name/Path/?Parameters#Anchor
Now we discuss each part in detail:
• Scheme: It is the protocol that is associated with every URL. It tells the browser
what type of address the user is trying to access so that the browser connects
correctly. Generally, http or https protocol is used to connect with the browser,
but other types of the protocol are also available like rtp, dns, chrome, etc.
Not for sell 56 Only for reading purpose
• Domain name: A domain name is a text name that corresponds to the numeric IP
(Internet Protocol) address of the website, followed by the top-level domain
name (e.g.: .gov, .org, .com, etc). Domain names are used to make it easier for the
user to access a particular website. Basically, it tells which web server is being
requested. For example, the domain name to access google.com where .com is the
top-level domain name.
• Path: Path specifies the entire path to a particular web page that the user wants
to access. The user can define the entire path of the particular web page (if he/she
knows). If no path is specified and only the domain name is entered by the user
then the browser loads the default page, also known as the home page, of the
website from where the user can navigate to the desired web page.
• Parameters: Parameters are the query string that begins with a question mark(?)
after the Path. This is the list of key pairs separated by an ampersand(&) sign. It
must have seen it when it has searched for a query on Google or on it tube or any
platform. Each web browser has its own rules for passing the parameters.
• For example,
https://www.google.com/search?q=gfg+login&rlz=1C1CHBD_enIN919IN919&… ,
Not for sell 57 Only for reading purpose
here are the strings after the question mark(?) is the query string or the
parameters.
• Anchor: Anchors are like bookmarks it tell the browser which particular part of a
web page the user wants to access. They are written after the Parameters and
begin with a hashtag(#).
If we combine all the above parts of the web address then the web address looks like
this:
Types of Web Address
There are two types of web addresses:
• Absolute web address: An absolute web address is the web address that
contains the domain name and the entire address of the file/directory to which it
points. It is the web address that is normally seen in the address bar of the
browser and it can be accessed from anywhere in the world. It begins with the
protocols like “http”, “https”, “ftp” etc, and have the structure like:
Protocol://Domain name/Path
Not for sell 58 Only for reading purpose
• Relative web address: Relative web address is the web address that can be
accessed only if it is on the home page or on any web page of the particular
website. It tells the web address is in relation to the current user location(hence it
is named Relative web address). Since it is assumed that the user is already
present on the website, a relative web address only contains the domain name
and the location, e.g.
<a href = "./google.html"
How to use a Web Address?
Web addresses can be accessed in 4 simple steps:
Step 1: Go to the web browser.
Step 2: Type the website name in the address bar, or it can type the entire web
address of the web page it wants to access (if it knows the entire web address).
Step 3: Press Enter.
Step 4: This will take it to the home page of the respective website. It can navigate to
the desired web page from the home page of the website.
Example:
Let’s say we want to access the Google website so the above steps can be followed
as:
• Open the Chrome browser (or any browser which it uses).
2). ARP (Address resolution protocol)
Most computer programs/applications use logical addresses (IP Addresses) to
send/receive messages. However, the actual communication happens over
the Physical Address (MAC Address) that is from layer 2 of the OSI model. So our
mission is to get the destination MAC Address which helps in communicating with
other devices. This is where ARP comes into the picture, its functionality is to
translate IP addresses to Physical Addresses.
Not for sell 59 Only for reading purpose
The acronym ARP stands for Address Resolution Protocol which is one of the most
important protocols of the Data link layer in the OSI model. It is responsible to find
the hardware address of a host from a known IP address. There are three basic ARP
terms.
Note: ARP finds the hardware address, also known as the Media Access Control
(MAC) address, of a host from its known IP address.
Important Terms Associated with ARP
• Reverse ARP
• Proxy ARP
• Inverse ARP
Reverse ARP
Reverse Address Resolution Protocol is a protocol that is used in local area networks
(LAN) by client machines for requesting IP Address (IPv4) from Router’s ARP Table.
Whenever a new machine comes, which requires an IP Address for its use. In that
case, the machine sends a RARP broadcast packet containing MAC Address in the
sender and receiver hardware field.
Proxy ARP
Proxy Address Resolution Protocol work to enable devices that are separated into
network segments connected through the router in the same IP to resolve IP Address
to MAC Address. Proxy ARP is enabled so that the ‘proxy router’ resides with its
MAC address in a local network as it is the desired router to which broadcast is
addressed. In case, when the sender receives the MAC Address of the Proxy Router,
it is going to send the datagram to Proxy Router, which will be sent to the
destination device.
Inverse ARP
Inverse Address Resolution Protocol uses MAC Address to find the IP Address, it can
be simply illustrated as Inverse ARP is just the inverse of ARP. In ATM
(Asynchronous Transfer Mode) Networks, Inverse ARP is used by default. Inverse
ARP helps in finding Layer-3 Addresses from Layer-2 Addresses.
Not for sell 60 Only for reading purpose
How ARP Works?
Imagine a device that wants to communicate with others over the internet. What does
ARP do? It broadcast a packet to all the devices of the source network. The devices of
the network peel the header of the data link layer from the Protocol Data Unit
(PDU) called frame and transfer the packet to the network layer (layer 3 of OSI) where
the network ID of the packet is validated with the destination IP’s network ID of the
packet and if it’s equal then it responds to the source with the MAC address of the
destination, else the packet reaches the gateway of the network and broadcasts packet
to the devices it is connected with and validates their network ID. The above process
continues till the second last network device in the path reaches the destination where
it gets validated and ARP, in turn, responds with the destination MAC address.
3). Internet Control Message Protocol (ICMP)
Internet Control Message Protocol is known as ICMP. The protocol is at the network
layer. It is mostly utilized on network equipment like routers and is utilized for error
handling at the network layer. Since there are various kinds of network layer faults,
ICMP can be utilized to report and troubleshoot these errors.
Since IP does not have an inbuilt mechanism for sending error and control messages. It
depends on Internet Control Message Protocol (ICMP) to provide error control. In this
article, we are going to discuss ICMP in detail along with their uses, messages, etc.
Not for sell 61 Only for reading purpose
ICMP is used for reporting errors and management queries. It is a supporting protocol
and is used by network devices like routers for sending error messages and operations
information. For example, the requested service is not available or a host or router
could not be reached.
Since the IP protocol lacks an error-reporting or error-correcting mechanism,
information is communicated via a message. For instance, when a message is sent to
its intended recipient, it may be intercepted along the route from the sender. The
sender may believe that the communication has reached its destination if no one
reports the problem. If a middleman reports the mistake,
How Does ICMP Work?
ICMP is the primary and important protocol of the IP suite, but ICMP isn’t associated
with any transport layer protocol (TCP or UDP) as it doesn’t need to establish a
connection with the destination device before sending any message as it is a
connectionless protocol.
The working of ICMP is just contrasting with TCP, as TCP is a connection-oriented
protocol whereas ICMP is a connectionless protocol. Whenever a connection is
established before the message sending, both devices must be ready through a TCP
Handshake.
ICMP packets are transmitted in the form of datagrams that contain an IP header with
ICMP data. ICMP datagram is similar to a packet, which is an independent data
entity.
Not for sell 62 Only for reading purpose
ICMP Packet Format
ICMP header comes after IPv4 and IPv6 packet header.
4. Transport Layer:
The TCP/IP transport layer protocols exchange data receipt acknowledgments and
retransmit missing packets to ensure that packets arrive in order and without error.
End-to-end communication is referred to as such. Transmission Control Protocol
(TCP) and User Datagram Protocol are transport layer protocols at this level (UDP).
The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.
o User Datagram Protocol (UDP)
o It provides connectionless service and end-to-end delivery of
transmission.
o It is an unreliable protocol as it discovers the errors but not specify the
error.
o User Datagram Protocol discovers the error, and ICMP protocol reports
the error to the sender that user datagram has been damaged.
o UDP consists of the following fields:
Source port address: The source port address is the address of the
application program that has created the message.
Destination port address: The destination port address is the address of
the application program that receives the message.
Total length: It defines the total number of bytes of the user datagram in
bytes.
Checksum: The checksum is a 16-bit field used in error detection.
Not for sell 63 Only for reading purpose
o UDP does not specify which packet is lost. UDP contains only checksum;
it does not contain any ID of a data segment.
2). Transmission Control Protocol (TCP)
Transmission Control Protocol is a connection-oriented protocol for communications
that helps in the exchange of messages between different devices over a network.
The Internet Protocol (IP), which establishes the technique for sending data packets
between computers, works with TCP.
The position of TCP is at the transport layer of the OSI model. TCP also helps in
ensuring that information is transmitted accurately by establishing a virtual
connection between the sender and receiver.
• It provides a full transport layer services to applications.
• It creates a virtual circuit between the sender and receiver, and it is active for
the duration of the transmission.
• TCP is a reliable protocol as it detects the error and retransmits the
damaged frames. Therefore, it ensures all the segments must be received
and acknowledged before the transmission is considered to be completed
and a virtual circuit is discarded.
• At the sending end, TCP divides the whole message into smaller units
known as segment, and each segment contains a sequence number which is
required for reordering the frames to form an original message.
• At the receiving end, TCP collects all the segments and reorders them based
on sequence numbers.
Working of Transmission Control Protocol (TCP)
Not for sell 64 Only for reading purpose
To make sure that each message reaches its target location intact, the TCP/IP model
breaks down the data into small bundles and afterward reassembles the bundles
into the original message on the opposite end. Sending the information in little
bundles of information makes it simpler to maintain efficiency as opposed to sending
everything in one go.
After a particular message is broken down into bundles, these bundles may travel
along multiple routes if one route is jammed but the destination remains the same.
Full form It stands for Transmission Control Protocol. It stands for User Datagram Protocol.
Type of connection It is a connection-oriented protocol, which It is a connectionless protocol, which
means that the connection needs to be means that it sends the data without
established before the data is transmitted over checking whether the system is ready to
the network. receive or not.
Reliable TCP is a reliable protocol as it provides UDP is an unreliable protocol as it does not
assurance for the delivery of data packets. take the guarantee for the delivery of
packets.
Speed TCP is slower than UDP as it performs error UDP is faster than TCP as it does not
checking, flow control, and provides guarantee the delivery of data packets.
assurance for the delivery of
Header size The size of TCP is 20 bytes. The size of the UDP is 8 bytes.
Acknowledgment TCP uses the three-way-handshake concept. UDP does not wait for any
In this concept, if the sender receives the acknowledgment; it just sends the data.
ACK, then the sender will send the data. TCP
also has the ability to resend the lost data.
Flow control mechanism It follows the flow control mechanism in which This protocol follows no such mechanism.
too many packets cannot be sent to the
receiver at the same time.
Error checking TCP performs error checking by using a It does not perform any error checking, and
checksum. When the data is corrected, then also does not resend the lost data packets.
the data is retransmitted to the receiver.
Applications This protocol is mainly used where a secure This protocol is used where fast
and reliable communication process is communication is required and does not
required, like military services, web browsing, care about the reliability like VoIP, game
and e-mail. streaming, video and music streaming, etc.
Not for sell 65 Only for reading purpose
1.75 Application Layer:
o An application layer is the topmost layer in the TCP/IP model.
o It is responsible for handling high-level protocols, issues of representation.
o This layer allows the user to interact with the application.
o When one application layer protocol wants to communicate with another
application layer, it forwards its data to the transport layer.
o There is an ambiguity occurs in the application layer. Every application cannot
be placed inside the application layer except those who interact with the
communication system. For example: text editor cannot be considered in
application layer while web browser using HTTP protocol to interact with the
network where HTTP protocol is an application layer protocol.
Following are the main protocols used in the application layer:
1. HTTP and HTTPS
2. SNMP
3. SSH
4. NTP
5. DNS
6. TELNET
7. FTP
1. HTTP and HTTPS:-
• HTTP stands for HyperText Transfer Protocol.
• It is a protocol used to access the data on the World Wide Web (www).
• The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.
• This protocol is known as HyperText Transfer Protocol because of its efficiency
that allows us to use in a hypertext environment where there are rapid jumps
from one document to another document.
• HTTP is similar to the FTP as it also transfers the files from one host to another
host. But HTTP is simpler than FTP as HTTP uses only one connection, i.e., no
control connection to transfer the files.
• HTTP is used to carry the data in the form of MIME-like format.
Not for sell 66 Only for reading purpose
• HTTP is similar to SMTP as the data is transferred between client and server.
The HTTP differs from the SMTP in the way the messages are sent from the
client to the server and from server to the client. SMTP messages are stored
and forwarded while HTTP messages are delivered immediately.
Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client
initiates a request and waits for a response from the server. When the server
receives the request, the server processes the request and sends back the
response to the HTTP client after which the client disconnects the connection.
The connection between client and server exists only during the current request
and response time only.
o Media independent: HTTP protocol is a media independent as data can be sent
as long as both the client and server know how to handle the data content. It is
required for both the client and server to specify the content type in MIME-type
header.
o Stateless: HTTP is a stateless protocol as both the client and server know each
other only during the current request. Due to this nature of the protocol, both
the client and server do not retain the information between various requests of
the web pages.
Not for sell 67 Only for reading purpose
Messages
HTTP messages are of two types: request and response. Both the message types
follow the same message format.
Request Message: Response Message:
The request message is sent by the client The response message is sent by the
that consists of a request line, headers, server to the client that consists of a
and sometimes a body. status line, headers, and sometimes a
body.
Request Message:
Response Message:
Uniform Resource Locator (URL)
• A client that wants to access the document in an internet needs an address and
to facilitate the access of documents, the HTTP uses the concept of Uniform
Resource Locator (URL).
• The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
• The URL defines four parts: method, host computer, port, and path.
Not for sell 68 Only for reading purpose
• Method: The method is the protocol used to retrieve the document from a
server. For example, HTTP.
• Host: The host is the computer where the information is stored, and the
computer is given an alias name. Web pages are mainly stored in the computers
and the computers are given an alias name that begins with the characters
"www". This field is not mandatory.
• Port: The URL can also contain the port number of the server, but it's an
optional field. If the port number is included, then it must come between the
host and path and it should be separated from the host by a colon.
• Path: Path is the pathname of the file where the information is stored. The path
itself contain slashes that separate the directories from the subdirectories and
files.
2. SNMP: SNMP stands for Simple Network Management Protocol. It is a
framework used for managing the devices on the internet by using the TCP/IP
protocol suite.SNMP was defined by IETF (Internet Engineering Task Force). It
is used to manage the network. It is an internet standard protocol that monitors
devices in IP networks and collects and organizes the information (data) of
these devices. SNMP is supported by most network devices such as the hub,
switch, router, bridge, server, modem, and printer, etc. The SNMP sends
instructions and messages using both port 161 and port 162. The SNMP agent
uses the port 161, and the SNMP manager uses the port 162.The concept of
SNMP is based on the manager and agent. A manager is like a host that controls a
group of agents, such as routers.
Not for sell 69 Only for reading purpose
SNMP Manager: It is a computer system that monitors network traffic by the SNMP
agent, and it queries these agents, takes answers, and controls them.
SNMP Agent: It is a software program that is located in a network element. It collects
real-time information from the device and passes this information to the SNMP
manager.
Management components
It has two components
1. SMI
2. MIB
1. SMI (Structure of Management Information): SMI is a network management
component that defines the standard rules for the naming object and object
type (including range and length) and also shows how to encode objects and
values.
2. MIB (Management Information Base): MIB is the second component of the
network management. It is virtual information storage where management
information is stored.
SNMP basic operation
➢ GetRequest: The GetRequest operation is used by the SNMP manager to derive
one or more values from the SNMP agent.
➢ GetNextRequest: The GetNextRequest is similar to the GetRequest operation,
but it is used to get the next value from the SNMP agent.
➢ SetRequest: It is used by the manager to set the value of the agent device.
➢ Trap: This command is used by the SNMP agent to send acknowledgment
messages to the SNMP manager.
➢ GetBulkRequest: It is used by the SNMP manager to retrieve the large data
from the SNMP agent.
3. SSH – SSH stands for Secure Shell or Secure Socket Shell. It is a cryptographic
network protocol that allows two computers to communicate and share the
data over an insecure network such as the internet. It is used to login to a
remote server to execute commands and data transfer from one machine to
another machine.
Not for sell 70 Only for reading purpose
The SSH protocol was developed by SSH communication security Ltd to safely
communicate with the remote machine.ecure communication provides a strong
password authentication and encrypted communication with a public key over
an insecure channel. It is used to replace unprotected remote login protocols
such as Telnet, rlogin, rsh, etc., and insecure file transfer protocol FTP.
Its security features are widely used by network administrators for managing
systems and applications remotely.
The SSH protocol protects the network from various attacks such as DNS spoofing, IP
source routing, and IP spoofing.
A simple example can be understood, such as suppose it want to transfer a package to
one of the friends. Without SSH protocol, it can be opened and read by anyone. But if it
will send it using SSH protocol, it will be encrypted and secured with the public keys,
and only the receiver can open it.
Before SSH:
After SSH
Not for sell 71 Only for reading purpose
Usages of SSH protocol
The popular usages of SSH protocol are given below:
▪ It provides secure access to users and automated processes.
▪ It is an easy and secure way to transfer files from one system to another over an
insecure network.
▪ It also issues remote commands to the users.
▪ It helps the users to manage the network infrastructure and other critical system
components.
▪ It is used to log in to shell on a remote system (Host), which replaces Telnet
and rlogin and is used to execute a single command on the host, which
replaces rsh.
▪ It combines with rsync utility to backup, copy, and mirror files with complete
security and efficiency.
▪ It can be used for forwarding a port.
▪ By using SSH, we can set up the automatic login to a remote server such as
OpenSSH.
▪ We can securely browse the web through the encrypted proxy connection with
the SSH client, supporting the SOCKS protocol.
How does SSH Works?
▪ The SSH protocol works in a client-server model, which means it connects a
secure shell client application (End where the session is displayed) with the
SSH server (End where session executes).
▪ As discussed above, it was initially developed to replace insecure login
protocols such as Telnet, rlogin, and hence it performs the same function.
Not for sell 72 Only for reading purpose
The basic use of SSH is to connect a remote system for a terminal session and to do
this, following command is used:
ssh [email protected]
The above command enables the client to connect to the server,
named server.test.com, using the ID UserName.
If we are connecting for the first time, it will prompt the remote host's public key
fingerprint and ask to connect. The below message will be prompt:
The authenticity of host 'sample.ssh.com' cannot be established.
DSA key fingerprint is 01:23:45: 67:89: ab:cd: ef: ff: fe: dc:ba: 98:76:54: 32:10.
Is it sure it wants to continue connecting (yes/no)?
To continue the session, we need to click yes, else no. If we click yes, then the host key
will be stored in the known hosts file of the local system. The key is contained within
the hidden file by default, which is /.ssh/known_hosts in the home directory. Once the
host key is stored in this hidden file, there is no need for further approval as the host
key will automatically authenticate the connection.
The SSH protocol can transfer the following:
o Data
o Text
o Commands
o Files
The files are transferred using the SFTP(Secure file transfer protocol), the encrypted
version of FTP that provides security to prevent any threat.
SSH Encryption Techniques
To make a secure transmission, SSH uses three different encryption techniques at
various points during a transmission. These techniques are:
1. Symmetrical Encryption
2. Asymmetrical Encryption
3. Hashing
Not for sell 73 Only for reading purpose
1.Symmetrical Encryption
Only one key can be used in symmetric encryption techniques to encrypt & decrypt
messages sent and received from the destination. This technique is also known
as shared key encryption because both devices use the same key to encrypt the data
they send and decrypt the received data.
This technique encrypts the entire SSH connection to prevent man-in-middle attacks.
In this technique, one issue arises at the time of initial key exchange. As per this
problem, if a third party is present during the key exchange, they could know the key
and read the entire message.
The Key exchange algorithm is used to prevent this problem. With this algorithm, the
secret keys can be securely exchanged without an interception.
Asymmetrical encryption is required to implement the key exchange algorithm.
2.Asymmetrical Encryption
In asymmetrical encryption, two different keys are used for encryption and decryption,
private and public keys. The private key is private to the user only and cannot be
shared with any other user, whereas the public key is shared publicly. The public key is
saved on the SSH server, whereas the private key is saved locally on the SSH client;
these two keys form a key pair. The message encrypted with the public key can only
decrypt with the corresponding private key.
It is a much secure technique as if a third party gets the public key, and they cannot
decrypt the message because they don't know the private key.
The asymmetrical encryption does not encrypt the complete SSH session. Instead, it is
mainly used for the key exchange algorithm of symmetric encryption. In this, before
establishing a connection, both systems (client and server) generate public-private key
pairs temporarily and then share their private keys to generate the shared secret key.
After establishing a secure symmetric connection, the server uses the public key to
transmit it to the client for authentication. The client can only decrypt the data if it has
the private key, and hence the SSH session establishes.
3.Hashing
Not for sell 74 Only for reading purpose
In SSH, one-way hashing is used as the encryption technique, which is another form of
cryptography. The hashing technique is different from the above two methods, as it is
not meant by decryption. It generates the signature or summary of information. SSH
uses HMAC(Hash-based Message authentication) to ensure that messages are
reached in complete and unmodified form.
In this technique, each transmitted message must have a MAC, which uses three
components: symmetric key, packet sequence number, and message content. These
three components form the hash function that generates a string that doesn't have any
meaning, and this string is sent to the host. The host also has the same information, so
they also generate a hash function, and if the generated hash matches with the
received hash, it means the message is not tempered.
3. NTP – NTP stands for Network Time Protocol (NTP) it is a protocol that helps the
computers clock times to be synchronized in a network. This protocol is an
application protocol that is responsible for the synchronization of hosts on a
TCP/IP network. NTP was developed by David Mills in 1981 at the University of
Delaware. This is required in a communication mechanism so that a seamless
connection is present between the computers. Suppose it carry out a transaction,
where the computer reads the time at 2:30 PM while the server records it at 2:28
PM. The server can crash very badly if it’s out of sync.
Features of NTP :
Some features of NTP are –
• NTP servers have access to highly precise atomic clocks and GPU clocks
• It uses Coordinated Universal Time (UTC) to synchronize CPU clock time.
• Avoids even having a fraction of vulnerabilities in information exchange
communication.
• Provides consistent timekeeping for file servers
Working of NTP :
NTP is a protocol that works over the application layer, it uses a hierarchical system
of time resources and provides synchronization within the stratum servers. First, at
the topmost level, there is highly accurate time resources’ ex. atomic or GPS clocks.
These clock resources are called stratum 0 servers, and they are linked to the below
Not for sell 75 Only for reading purpose
NTP server called Stratum 1,2 or 3 and so on. These servers then provide the
accurate date and time so that communicating hosts are synced to each other.
Architecture of Network Time Protocol :
Applications of NTP :
• Used in a production system where the live sound is recorded.
• Used in the development of Broadcasting infrastructures.
• Used where file system updates needed to be carried out across multiple
computers depending on synchronized clock times.
• Used to implement security mechanism which depend on consistent time
keeping over the network.
• Used in network acceleration systems which rely on timestamp accuracy to
calculate performance.
Advantages of NTP :
• It provides internet synchronization between the devices.
• It provides enhanced security within the premises.
• It is used in the authentication systems like Kerberos.
• It provides network acceleration which helps in troubleshooting problems.
• Used in file systems that are difficult in network synchronization.
Disadvantages of NTP :
Not for sell 76 Only for reading purpose
• When the servers are down the sync time is affected across a running
communication.
• Servers are prone to error due to various time zones and conflict may occur.
• Minimal reduction of time accuracy.
• When NTP packets are increased synchronization is conflicted.
• Manipulation can be done in synchronization.
4. DNS: DNS stands for Domain Name System. An IP address is used to identify the
connection of a host to the internet uniquely. But people prefer to use the
names instead of addresses. Therefore, the system that maps the name to the
address is known as Domain Name System.
• DNS stands for Domain Name System.
• DNS is a directory service that provides a mapping between the name of a host
on the network and its numerical address.
• DNS is required for the functioning of the internet.
• Each node in a tree has a domain name, and a full domain name is a sequence of
symbols specified by dots.
• DNS is a service that translates the domain name into IP addresses. This allows
the users of networks to utilize user-friendly names when looking for other
hosts instead of remembering the IP addresses.
• For example, suppose the FTP site at EduSoft had an IP address of
132.147.165.50, most people would reach this site by specifying
ftp.EduSoft.com. Therefore, the domain name is more reliable than IP address.
DNS is a TCP/IP protocol used on different platforms. The domain name space is
divided into three different sections: generic domains, country domains, and inverse
domain.
Not for sell 77 Only for reading purpose
Generic Domains
• It defines the registered hosts according to their generic behavior.
• Each node in a tree defines the domain name, which is an index to the DNS
database.
• It uses three-character labels, and these labels describe the organization type.
Label Description
aero Airlines and aerospace companies
biz Businesses or firms
com Commercial Organizations
coop Cooperative business Organizations
edu Educational institutions
gov Government institutions
info Information service providers
int International Organizations
mil Military groups
museum Museum & other nonprofit organizations
name Device names
net Network Support centers
org Nonprofit Organizations
pro Professional individual Organizations
Not for sell 78 Only for reading purpose
Country Domain
The format of country domain is same as a generic domain, but it uses two-character
country abbreviations (e.g., us for the United States) in place of three-character
organizational abbreviations.
Inverse Domain
The inverse domain is used for mapping an address to a name. When the server has
received a request from the client, and the server contains the files of only authorized
clients. To determine whether the client is on the authorized list or not, it sends a query
to the DNS server and ask for mapping an address to the name.
Working of DNS
• DNS is a client/server network communication protocol. DNS clients send
requests to the. server while DNS servers send responses to the client.
• Client requests contain a name which is converted into an IP address known as
a forward DNS lookup while requests containing an IP address which is
converted into a name known as reverse DNS lookups.
• DNS implements a distributed database to store the name of all the hosts
available on the internet.
• If a client like a web browser sends a request containing a hostname, then a
piece of software such as DNS resolver sends a request to the DNS server to
obtain the IP address of a hostname. If DNS server does not contain the IP
address associated with a hostname, then it forwards the request to another
DNS server. If IP address has arrived at the resolver, which in turn completes
the request over the internet protocol.
6. TELNET: It is an abbreviation for Terminal Network. It establishes the
connection between the local computer and remote computer in such a way that
the local terminal appears to be a terminal at the remote system.
• The main task of the internet is to provide services to users. For example, users
want to run different application programs at the remote site and transfers a
result to the local site. This requires a client-server program such as FTP, SMTP.
But this would not allow us to create a specific program for each demand.
• The better solution is to provide a general client-server program that lets the
user access any application program on a remote computer. Therefore, a
Not for sell 79 Only for reading purpose
program that allows a user to log on to a remote computer. A popular client-
server program Telnet is used to meet such demands. Telnet is an abbreviation
for Terminal Network.
• Telnet provides a connection to the remote computer in such a way that a local
terminal appears to be at the remote side.
There are two types of logins in TELNET:
a) Local Login
b) Remote login
a) Local Login
I. When a user logs into a local computer, then it is known as local login.
II. When the workstation running terminal emulator, the keystrokes entered by the
user are accepted by the terminal driver. The terminal driver then passes these
characters to the operating system which in turn, invokes the desired application
program.
III. However, the operating system has special meaning to special characters. For
example, in UNIX some combination of characters has special meanings such as
control character with "z" means suspend. Such situations do not create any
problem as the terminal driver knows the meaning of such characters. But it can
cause the problems in remote login.
b) Remote login
When the user wants to access an application program on a remote computer,
then the user must perform remote login.
How remote login occurs
At the local site
Not for sell 80 Only for reading purpose
The user sends the keystrokes to the terminal driver, the characters are then
sent to the TELNET client. The TELNET client which in turn, transforms the
characters to a universal character set known as network virtual terminal
characters and delivers them to the local TCP/IP stack
At the remote site
The commands in NVT forms are transmitted to the TCP/IP at the remote
machine. Here, the characters are delivered to the operating system and then
pass to the TELNET server. The TELNET server transforms the characters which
can be understandable by a remote computer. However, the characters cannot
be directly passed to the operating system as a remote operating system does
not receive the characters from the TELNET server. Therefore, it requires some
piece of software that can accept the characters from the TELNET server. The
operating system then passes these characters to the appropriate application
program.
Network Virtual Terminal (NVT)
▪ The network virtual terminal is an interface that defines how data and
commands are sent across the network.
▪ In today's world, systems are heterogeneous. For example, the operating
system accepts a special combination of characters such as end-of-file token
running a DOS operating system ctrl+z while the token running a UNIX
operating system is ctrl+d.
Not for sell 81 Only for reading purpose
▪ TELNET solves this issue by defining a universal interface known as network
virtual interface.
▪ The TELNET client translates the characters that come from the local terminal
into NVT form and then delivers them to the network. The Telnet server then
translates the data from NVT form into a form which can be understandable by
a remote computer.
7. FTP:
▪ FTP stands for File transfer protocol.
▪ FTP is a standard internet protocol provided by TCP/IP used for transmitting the
files from one host to another.
▪ It is mainly used for transferring the web page files from their creator to the
computer that acts as a server for other computers on the internet.
▪ It is also used for downloading the files to computer from other servers.
Objectives of FTP
✓ It provides the sharing of files.
✓ It is used to encourage the use of remote computers.
✓ It transfers the data more reliably and efficiently.
Why FTP?
Although transferring files from one system to another is very simple and
straightforward, but sometimes it can cause problems. For example, two systems may
have different file conventions. Two systems may have different ways to represent text
and data. Two systems may have different directory structures. FTP protocol
Not for sell 82 Only for reading purpose
overcomes these problems by establishing two connections between hosts. One
connection is used for data transfer, and another connection is used for the control
connection.
Mechanism of FTP
The above figure shows the basic model of the FTP. The FTP client has three
components: the user interface, control process, and data transfer process. The server
has two components: the server control process and the server data transfer process.
There are two types of connections in FTP:
I. Control Connection: The control connection uses very simple rules for
communication. Through control connection, we can transfer a line of command
or line of response at a time. The control connection is made between the
control processes. The control connection remains connected during the entire
interactive FTP session.
Not for sell 83 Only for reading purpose
II. Data Connection: The Data Connection uses very complex rules as data types
may vary. The data connection is made between data transfer processes. The
data connection opens when a command comes for transferring the files and
closes when the file is transferred.
FTP Clients
▪ FTP client is a program that implements a file transfer protocol which allows it
to transfer files between two hosts on the internet.
▪ It allows a user to connect to a remote host and upload or download the files.
▪ It has a set of commands that we can use to connect to a host, transfer the files
between it and the host and close the connection.
▪ The FTP program is also available as a built-in component in a Web browser.
This GUI based FTP client makes the file transfer very easy and also does not
require to remember the FTP commands.
Advantages of FTP:
▪ Speed: One of the biggest advantages of FTP is speed. The FTP is one of the
fastest ways to transfer the files from one computer to another computer.
▪ Efficient: It is more efficient as we do not need to complete all the operations to
get the entire file.
▪ Security: To access the FTP server, we need to login with the username and
password. Therefore, we can say that FTP is more secure.
▪ Back & forth movement: FTP allows us to transfer the files back and forth.
Suppose it are a manager of the company, it sends some information to all the
employees, and they all send information back on the same server.
Disadvantages of FTP:
▪ The standard requirement of the industry is that all the FTP transmissions
should be encrypted. However, not all the FTP providers are equal and not all
the providers offer encryption. So, we will have to look out for the FTP providers
that provides encryption.
▪ FTP serves two operations, i.e., to send and receive large files on a network.
However, the size limit of the file is 2GB that can be sent. It also doesn't allow it
to run simultaneous transfers to multiple receivers.
Not for sell 84 Only for reading purpose
▪ Passwords and file contents are sent in clear text that allows unwanted
eavesdropping. So, it is quite possible that attackers can carry out the brute
force attack by trying to guess the FTP password.
▪ It is not compatible with every system.
Conclusion:
Layer Number Layer Name Protocol Protocol Data-unit Addressing
5(innermost) Application HTTP, SMTP Messages n/a
4 Transport TCP/UDP Segments Ports
3 Network IP Packets IP Address
2 Data-link Ethernet/Wi-Fi Frames MAC Address
1(outermost) Physical 10 Base Bits n/a
Lastly, connection-oriented layers let us see the differences between TCP/IP and OSI
Models in a tabular format that are as follows: follows connectionless.
TCP/IP OSI
TCP refers to Transmission Control OSI refers to Open Systems Interconnection.
Protocol.
TCP/IP has 5 layers. OSI has 7 layers.
TCP/IP is more reliable OSI is less reliable
TCP/IP does not have very strict OSI has strict boundaries
boundaries.
TCP/IP follows connection-less a OSI follows a vertical approach.
horizontal approach.
TCP/IP uses both session and OSI uses different session and presentation
presentation layer in the application layers.
layer itself.
TCP/IP developed protocols then OSI developed model then protocol.
model.
Transport layer in TCP/IP does not In OSI model, transport layer provides assurance
provide assurance delivery of delivery of packets.
packets.
TCP/IP model network layer only Connection less and connection-oriented both
provides connection less services. services are provided by the network layer in the
OSI model.
Not for sell 85 Only for reading purpose
Protocols cannot be replaced easily While in OSI model, Protocols are better
in TCP/IP model. covered and is easy to replace with the change
in technology.
Network Protocols:
Network Protocols refer to the rules and standards that govern the communication
between devices on a network.
Types of Network Protocols :
There are several different types of Network Protocols, including TCP/IP, UDP, FTP,
HTTP, SMTP, and DNS.
1. TCP/IP (Transmission Control Protocol/Internet Protocol) is the most widely used
protocol on the internet. It is a set of rules and standards that govern the transfer
of data between devices on a network.
2. UDP (User Datagram Protocol) is a simpler protocol than TCP/IP, and it is used for
streaming video and audio, gaming, and other applications where low latency is
more important than reliability.
3. FTP (File Transfer Protocol) is a protocol that is used to transfer files between
devices on a network.
4. HTTP (Hypertext Transfer Protocol) is a protocol that is used to transfer files
between devices on a network
5. SMTP (Simple Mail Transfer Protocol) is a protocol that is used to transfer email
between devices on a network.
6. DNS (Domain Name System) is a protocol that is used to translate domain names
into IP addresses.
Differences between Network Topology and Network Protocols
Network Topology Network Protocols
Physical and logical arrangement of Rules and standards that govern the
devices on a network communication between devices on a network
Determines how data is transmitted Determines how data is formatted and processed
between devices
Examples include Bus, Star, Ring, Mesh, Examples include TCP/IP, UDP, FTP, HTTP, SMTP,
and Tree and DNS
Can affect the overall performance and Can affect the overall performance and security of
security of a network a network
Works together with Network Protocols to Works together with Network Topology to create
create a functional network a functional network
Not for sell 86 Only for reading purpose
1.8 Multiple access protocol organization
Multiple access protocols are a set of protocols operating in the Medium Access
Control sublayer (MAC sublayer) of the Open Systems Interconnection (OSI) model.
These protocols allow a number of nodes or users to access a shared network channel.
Several data streams originating from several nodes are transferred through the multi-
point transmission channel.The objectives of multiple access protocols are optimization
of transmission time, minimization of collisions and avoidance of crosstalks.
When a sender and receiver have a dedicated link to transmit data packets, the data
link control is enough to handle the channel. Suppose there is no dedicated path to
communicate or transfer the data between two devices. In that case, multiple stations
access the channel and simultaneously transmits the data over the channel. It may
create collision and cross talk. Hence, the multiple access protocol is required to
reduce the collision and avoid crosstalk between the channels.
For example, suppose that there is a classroom full of students. When a teacher asks a
question, all the students (small channels) in the class start answering the question at
the same time (transferring the data simultaneously). All the students respond at the
same time due to which data is overlap or data lost. Therefore, it is the responsibility of
a teacher (multiple access protocol) to manage the students and make them one
answer. Following are the types of multiple access protocol that is subdivided into the
different process as:
A. Random Access Protocol
In this protocol, all the station has the equal priority to send the data over a channel. In
random access protocol, one or more stations cannot depend on another station nor
Not for sell 87 Only for reading purpose
any station control another station. Depending on the channel's state (idle or busy),
each station transmits the data frame. However, if more than one station sends the
data over a channel, there may be a collision or data conflict. Due to the collision, the
data frame packets may be lost or changed. And hence, it does not receive by the
receiver end.
Following are the different methods of random-access protocols for broadcasting
frames on the channel.
o Aloha
o CSMA
o CSMA/CD
o CSMA/CA
ALOHA (Advocates of Linux Open-source Hawaii Association) Random Access Protocol
It is designed for wireless LAN (Local Area Network) but can also be used in a shared
medium to transmit data. Using this method, any station can transmit data across a
network simultaneously when a data frameset is available for transmission
Aloha Rules
I. Any station can transmit data to a channel at any time.
II. It does not require any carrier sensing.
III. Collision and data frames may be lost during the transmission of data through
multiple stations.
IV. Acknowledgment of the frames exists in Aloha. Hence, there is no collision
detection.
V. It requires retransmission of data after some random amount of time.
Pure Aloha
A sketch of frame generation in an ALOHA system is given in below Fig. Whenever
data is available for sending over a channel at stations, we use Pure Aloha. In pure
Aloha, when each station transmits data to a channel without checking whether the
Not for sell 88 Only for reading purpose
channel is idle or not, the chances of collision may occur, and the data frame can be
lost. When any station transmits the data frame to a channel, the pure Aloha waits for
the receiver's acknowledgment. If it does not acknowledge the receiver end within the
specified time, the station waits for a random amount of time, called the backoff time
(Tb). And the station may assume the frame has been lost or destroyed. Therefore, it
retransmits the frame until all the data are successfully transmitted to the receiver. The
probability of no other traffic during the same slot as our test frame is then e-2 G where
(G is given as attempts per packet time) , which leads to
1. The total vulnerable time of pure Aloha is 2 * Tfr.
2. Maximum throughput occurs when G = 1/ 2 that is 18.4%.
3. Successful transmission of data frame is S = Ge-2 G
As we can see in the figure above, there are four stations for accessing a shared
channel and transmitting data frames. Some frames collide because most stations
send their frames at the same time. Only two frames, frame 1.1 and frame 2.2, are
successfully transmitted to the receiver end. At the same time, other frames are lost or
destroyed. Whenever two frames fall on a shared channel simultaneously, collisions
can occur, and both will suffer damage. If the new frame's first bit enters the channel
before finishing the last bit of the second frame. Both frames are completely finished,
and both stations must retransmit the data frame.
Not for sell 89 Only for reading purpose
Slotted Aloha
Soon after ALOHA came onto the scene, Roberts (1972) published a method for
doubling the capacity of an ALOHA system. His proposal was to divide time into
discrete intervals called slots, each interval corresponding to one frame. This approach
requires the users to agree on slot boundaries. One way to achieve synchronization
would be to have one special station emit a pip at the start of each interval, like a clock.
The slotted Aloha is designed to overcome the pure Aloha's efficiency because pure
Aloha has a very high possibility of frame hitting. In slotted Aloha, the shared channel
is divided into a fixed time interval called slots. So that, if a station wants to send a
frame to a shared channel, the frame can only be sent at the beginning of the slot, and
only one frame is allowed to be sent to each slot. And if the stations are unable to
send data to the beginning of the slot, the station will have to wait until the beginning
of the slot for the next time. However, the possibility of a collision remains when trying
to send a frame at the beginning of two or more station time slot.
1. Maximum throughput occurs in the slotted Aloha when G = 1 that is 37%.
2. The probability of successfully transmitting the data frame in the slotted Aloha
is S = Ge-2 G
3. The total vulnerable time required in slotted Aloha is Tfr.
Not for sell 90 Only for reading purpose
CSMA (Carrier Sense Multiple Access)
It is a carrier sense multiple access based on media access protocol to sense the
traffic on a channel (idle or busy) before transmitting the data. It means that if the
channel is idle, the station can send data to the channel. Otherwise, it must wait until
the channel becomes idle. Hence, it reduces the chances of a collision on a
transmission medium.
CSMA Access Modes
1-Persistent: In the 1-Persistent mode of CSMA that defines each node, first sense the
shared channel and if the channel is idle, it immediately sends the data. Else it must
wait and keep track of the status of the channel to be idle and broadcast the frame
unconditionally as soon as the channel is idle.
Non-Persistent: It is the access mode of CSMA that defines before transmitting the
data, each node must sense the channel, and if the channel is inactive, it immediately
sends the data. Otherwise, the station must wait for a random time (not continuously),
and when the channel is found to be idle, it transmits the frames.
P-Persistent: It is the combination of 1-Persistent and Non-persistent modes. The P-
Persistent mode defines that each node senses the channel, and if the channel is
inactive, it sends a frame with a P probability. If the data is not transmitted, it waits for
a (q = 1-p probability) random time and resumes the frame with the next time slot.
O- Persistent: It is an O-persistent method that defines the superiority of the station
before the transmission of the frame on the shared channel. If it is found that the
channel is inactive, each station waits for its turn to retransmit the data.
Not for sell 91 Only for reading purpose
CSMA/ CD
It is a carrier sense multiple access/ collision detection network protocol to transmit
data frames. The CSMA/CD protocol works with a medium access control layer.
Therefore, it first senses the shared channel before broadcasting the frames, and if the
channel is idle, it transmits a frame to check whether the transmission was successful.
If the frame is successfully received, the station sends another frame. If any collision is
detected in the CSMA/CD, the station sends a jam/ stop signal to the shared channel to
terminate data transmission. After that, it waits for a random time before sending a
frame to a channel.
CSMA/ CA
It is a carrier sense multiple access/collision avoidance network protocol for carrier
transmission of data frames. It is a protocol that works with a medium access control
layer. When a data frame is sent to a channel, it receives an acknowledgment to check
whether the channel is clear. If the station receives only a single (own)
acknowledgment, that means the data frame has been successfully transmitted to the
receiver. But if it gets two signals (its own and one more in which the collision of
frames), a collision of the frame occurs in the shared channel. Detects the collision of
the frame when a sender receives an acknowledgment signal.
Following are the methods used in the CSMA/ CA to avoid the collision:
Interframe space: In this method, the station waits for the channel to become idle, and
if it gets the channel is idle, it does not immediately send the data. Instead of this, it
waits for some time, and this time period is called the Interframe space or IFS.
However, the IFS time is often used to define the priority of the station.
Contention window: In the Contention window, the total time is divided into different
slots. When the station/ sender is ready to transmit the data frame, it chooses a
random slot number of slots as wait time. If the channel is still busy, it does not restart
the entire process, except that it restarts the timer only to send data packets when the
channel is inactive.
Acknowledgment: In the acknowledgment method, the sender station sends the data
frame to the shared channel if the acknowledgment is not received ahead of time.
Not for sell 92 Only for reading purpose
B. Controlled Access Protocol
It is a method of reducing data frame collision on a shared channel. In the controlled
access method, each station interacts and decides to send a data frame by a particular
station approved by all other stations. It means that a single station cannot send the
data frames unless all other stations are not approved. It has three types of controlled
access: Reservation, Polling, and Token Passing.
Reservation
• In the reservation method, a station needs to make a reservation before
sending data.
• The timeline has two kinds of periods:
1. Reservation interval of fixed time length
2. Data transmission period of variable frames.
• If there are M stations, the reservation interval is divided into M slots, and
each station has one slot.
• Suppose if station 1 has a frame to send, it transmits 1 bit during the slot 1.
No other station is allowed to transmit during this slot.
• In general, i th station may announce that it has a frame to send by inserting
a 1 bit into i th slot. After all N slots have been checked, each station knows
which stations wish to transmit.
• The stations which have reserved their slots transfer their frames in that
order.
• After data transmission period, next reservation interval begins.
• Since everyone agrees on who goes next, there will never be any collisions.
The following figure shows a situation with five stations and a five-slot reservation
frame. In the first interval, only stations 1, 3, and 4 have made reservations. In the
second interval, only station 1 has made a reservation.
Advantages of Reservation:
Not for sell 93 Only for reading purpose
• The main advantage of reservation is high rates and low rates of data
accessing time of the respective channel can be predicated easily. Here
time and rates are fixed.
• Priorities can be set to provide speedier access from secondary.
• Predictable network performance: Reservation-based access methods can
provide predictable network performance, which is important in
applications where latency and jitter must be minimized, such as in real-
time video or audio streaming.
• Reduced contention: Reservation-based access methods can reduce
contention for network resources, as access to the network is pre-allocated
based on reservation requests. This can improve network efficiency and
reduce packet loss.
• Quality of Service (QoS) support: Reservation-based access methods can
support QoS requirements, by providing different reservation types for
different types of traffic, such as voice, video, or data. This can ensure that
high-priority traffic is given preferential treatment over lower-priority
traffic.
• Efficient use of bandwidth: Reservation-based access methods can enable
more efficient use of available bandwidth, as they allow for time and
frequency multiplexing of different reservation requests on the same
channel.
• Support for multimedia applications: Reservation-based access methods
are well-suited to support multimedia applications that require guaranteed
network resources, such as bandwidth and latency, to ensure high-quality
performance.
Disadvantages of Reservation:
• Highly trust on controlled dependability.
• Decrease in capacity and channel data rate under light loads; increase in
turn-around time.
Polling
• Polling process is similar to the roll-call performed in class. Just like the
teacher, a controller sends a message to each node in turn.
• In this, one acts as a primary station(controller) and the others are
secondary stations. All data exchanges must be made through the
controller.
• The message sent by the controller contains the address of the node being
selected for granting access.
Not for sell 94 Only for reading purpose
• Although all nodes receive the message the addressed one responds to it
and sends data if any. If there is no data, usually a “poll reject” (NAK)
message is sent back.
• Problems include high overhead of the polling messages and high
dependence on the reliability of the controller.
Advantages of Polling:
• The maximum and minimum access time and data rates on the channel are
fixed predictable.
• It has maximum efficiency.
• It has maximum bandwidth.
• No slot is wasted in polling.
• There is assignment of priority to ensure faster access from some
secondary.
Disadvantages of Polling:
• It consumes more time.
• Since every station has an equal chance of winning in every round, link
sharing is biased.
• Only some station might run out of data to send.
• An increase in the turnaround time leads to a drop in the data rates of the
channel under low loads.
Efficiency Let Tpoll be the time for polling and Tt be the time required for transmission
of data. Then,
Efficiency = Tt / (Tt + Tpoll)
Not for sell 95 Only for reading purpose
Token Passing
• In token passing scheme, the stations are connected logically to each other
in form of ring and access to stations is governed by tokens.
• A token is a special bit pattern or a small message, which circulate from
one station to the next in some predefined order.
• In Token ring, token is passed from one station to another adjacent station
in the ring whereas in case of Token bus, each station uses the bus to send
the token to the next station in some predefined order.
• In both cases, token represents permission to send. If a station has a frame
queued for transmission when it receives the token, it can send that frame
before it passes the token to the next station. If it has no queued frame, it
passes the token simply.
• After sending a frame, each station must wait for all N stations (including
itself) to send the token to their neighbours and the other N – 1 stations to
send a frame, if they have one.
• There exists problems like duplication of token or token is lost or insertion
of new station, removal of a station, which need be tackled for correct and
reliable operation of this scheme.
Performance of token ring can be concluded by 2 parameters:-
1. Delay, is a measure of time between when a packet is ready and when it is
delivered. So, the average time (delay) required to send a token to the next
station = a/N.
2. Throughput, which is a measure of successful traffic.
Throughput, S = 1/(1 + a/N) for a<1
and
S = 1/{a(1 + 1/N)} for a>1.
Not for sell 96 Only for reading purpose
where N = number of stations
a = Tp/Tt
(Tp = propagation delay and Tt = transmission delay)
Advantages of Token passing:
• It may now be applied with routers cabling and includes built-in debugging
features like protective relay and auto reconfiguration.
• It provides good throughput when conditions of high load.
Disadvantages of Token passing:
• Its cost is expensive.
• Topology components are more expensive than those of other, more widely
used standard.
• The hardware element of the token rings are designed to be tricky. This
implies that you should choose on manufacture and use them exclusively.
C. Channelization Protocols
It is a channelization protocol that allows the total usable bandwidth in a shared
channel to be shared across multiple stations based on their time, distance and codes.
It can access all the stations at the same time to send the data frames to the channel.
Following are the various methods to access the channel based on their time, distance
and codes:
1. FDMA (Frequency Division Multiple Access)
2. TDMA (Time Division Multiple Access)
3. CDMA (Code Division Multiple Access)
FDMA
It is a frequency division multiple access (FDMA) method used to divide the available
bandwidth into equal bands so that multiple users can send data through a different
frequency to the subchannel. Each station is reserved with a particular band to prevent
the crosstalk between the channels and interferences of stations.
Not for sell 97 Only for reading purpose
TDMA
Time Division Multiple Access (TDMA) is a channel access method. It allows the same
frequency bandwidth to be shared across multiple stations. And to avoid collisions in
the shared channel, it divides the channel into different frequency slots that allocate
stations to transmit the data frames. The same frequency bandwidth into the shared
channel by dividing the signal into various time slots to transmit it. However, TDMA
has an overhead of synchronization that specifies each station's time slot by adding
synchronization bits to each slot.
CDMA
The code division multiple access (CDMA) is a channel access method. In CDMA, all
stations can simultaneously send the data over the same channel. It means that it
allows each station to transmit the data frames with full frequency on the shared
channel at all times. It does not require the division of bandwidth on a shared channel
based on time slots. If multiple stations send data to a channel simultaneously, their
data frames are separated by a unique code sequence. Each station has a different
unique code for transmitting the data over a shared channel. For example, there are
multiple users in a room that are continuously speaking. Data is received by the users if
only two-device interact with each other using the same language. Similarly, in the
network, if different stations communicate with each other simultaneously with
different code language.
1.9 Routing techniques
▪ Routing is a process that is performed by layer 3 (or network layer) devices in
order to deliver the packet by choosing an optimal path from one network to
another.
▪ A Router is a process of selecting path along which the data can be transferred
from source to the destination. Routing is performed by a special device known
as a router.
▪ A Router works at the network layer in the OSI model and internet layer in
TCP/IP model
▪ A router is a networking device that forwards the packet based on the
information available in the packet header and forwarding table.
▪ The routing algorithms are used for routing the packets. The routing algorithm is
nothing but a software responsible for deciding the optimal path through which
packet can be transmitted.
Not for sell 98 Only for reading purpose
▪ The routing protocols use the metric to determine the best path for the packet
delivery. The metric is the standard of measurement such as hop count,
bandwidth, delay, current load on the path, etc. used by the routing algorithm to
determine the optimal path to the destination.
▪ The routing algorithm initializes and maintains the routing table for the process
of path determination.
Router Or Routing Characteristics
▪ Hop count: Hop count is defined as a metric that specifies the number of passes
through internetworking devices such as a router, a packet must travel in a route
to move from source to the destination. If the routing protocol considers the hop
as a primary metric value, then the path with the least hop count will be
considered as the best path to move from source to the destination.
▪ Delay: It is a time taken by the router to process, queue and transmit a
datagram to an interface. The protocols use this metric to determine the delay
values for all the links along the path end-to-end. The path having the lowest
delay value will be considered as the best path.
▪ Bandwidth: The capacity of the link is known as a bandwidth of the link. The
bandwidth is measured in terms of bits per second. The link that has a higher
transfer rate like gigabit is preferred over the link that has the lower capacity
like 56 kb. The protocol will determine the bandwidth capacity for all the links
along the path, and the overall higher bandwidth will be considered as the best
route.
▪ Load: Load refers to the degree to which the network resource such as a router
or network link is busy. A Load can be calculated in a variety of ways such as
CPU utilization, packets processed per second. If the traffic increases, then the
load value will also be increased. The load value changes with respect to the
change in the traffic.
▪ Reliability: Reliability is a metric factor may be composed of a fixed value. It
depends on the network links, and its value is measured dynamically. Some
networks go down more often than others. After network failure, some network
links repaired more easily than other network links. Any reliability factor can be
considered for the assignment of reliability ratings, which are generally numeric
values assigned by the system administrator.
Not for sell 99 Only for reading purpose
Types of Routing
Routing can be classified into three categories:
1. Static Routing
2. Default Routing
3. Dynamic Routing
1. Static Routing
▪ Static Routing is also known as Nonadaptive Routing.
▪ It is a technique in which the administrator manually adds the routes in a routing
table.
▪ A Router can send the packets for the destination along the route defined by the
administrator.
▪ In this technique, routing decisions are not made based on the condition or
topology of the networks
Advantage of Static Routing Disadvantage of Static Routing
o No Overhead: It has ho overhead on the CPU o For a large network, it becomes a very
usage of the router. Therefore, the cheaper difficult task to add each route manually
router can be used to obtain static routing. to the routing table.
o Bandwidth: It has not bandwidth usage o The system administrator should have a
between the routers. good knowledge of a topology as he has
o Security: It provides security as the system to add each route manually.
administrator is allowed only to have control
over the routing to a particular network.
Not for sell 100 Only for reading purpose
R1 having IP address 172.16.10.6/30 on s0/0/1, 192.168.20.1/24 on fa0/0.
R2 having IP address 172.16.10.2/30 on s0/0/0, 192.168.10.1/24 on fa0/0.
R3 having IP address 172.16.10.5/30 on s0/1, 172.16.10.1/30 on s0/0, 10.10.10.1/24
on fa0/0.
Now because only static routes for router R3:
R3(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.2
R3(config)#ip route 192.168.20.0 255.255.255.0 172.16.10.6
Here, provided the route for the 192.168.10.0 network where 192.168.10.0 is its
network I’d and 172.16.10.2 and 172.16.10.6 are the next-hop address.
Now, configuring for R2:
R2(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.1
R2(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.1
R2(config)#ip route 172.16.10.0 255.255.255.0 172.16.10.1
Similarly, for R1:
R1(config)#ip route 192.168.20.0 255.255.255.0 172.16.10.5
R1(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.5
R1(config)#ip route 172.16.10.0 255.255.255.0 172.16.10.5
2. Default Routing
o Default Routing is a technique in which a router is configured to send all the
packets to the same hop device, and it doesn't matter whether it belongs to a
particular network or not. A Packet is transmitted to the device for which it is
configured in default routing.
o Default Routing is used when networks deal with the single exit point.
o It is also useful when the bulk of transmission networks have to transmit the
data to the same hp device.
o When a specific route is mentioned in the routing table, the router will choose
the specific route rather than the default route. The default route is chosen only
when a specific route is not mentioned in the routing table.
Configuration: Using the same topology which we have used for static routing
before.
Not for sell 101 Only for reading purpose
In this topology, R1 and R2 are stub routers so we can configure default routing for
both these routers.
Configuring default routing for R1:
R1(config)#ip route 0.0.0.0 0.0.0.0 172.16.10.5
Now configuring default routing for R2:
R2(config)#ip route 0.0.0.0 0.0.0.0 172.16.10.1
Dynamic Routing
• It is also known as Adaptive Routing.
• It is a technique in which a router adds a new route in the routing table for each
packet in response to the changes in the condition or topology of the network.
• Dynamic protocols are used to discover the new routes to reach the destination.
• In Dynamic Routing, RIP and OSPF are the protocols used to discover the new
routes.
• If any route goes down, then the automatic adjustment will be made to reach the
destination.
• All the routers must have the same dynamic routing protocol in order to exchange
the routes.
• If the router discovers any change in the condition or topology, then router
broadcast this information to all other route
•
Advantage of Dynamic Routing Disadvantage of Dynamic Routing
It is easier to configure. It is more expensive in terms of CPU and
It is more effective in selecting the best bandwidth usage.
route in response to the changes in the It is less secure as compared to default
condition or topology. and static routing.
Not for sell 102 Only for reading purpose
1.91 The routing algorithm
The routing algorithm is that part of the network layer software responsible for
deciding which output line an incoming packet should be transmitted on. If the network
uses datagrams internally, this decision must be made anew for every arriving data
packet since the best route may have changed since last time. If the network uses
virtual circuits internally, routing decisions are made only when a new virtual circuit is
being set up. Thereafter, data packets just follow the already established route. The
latter case is sometimes called session routing because a route remains in force for an
entire session (e.g., while logged in over a VPN).
It is sometimes useful to make a distinction between routing, and forwarding routing is
making the decision which routes to use, the process of forwarding is what happens
when a packet arrives. A router as having two processes inside it. One of them handles
each packet as it arrives, looking up the outgoing line to use for it in the routing tables.
The other process is responsible for filling in and updating the routing tables. That is
where the routing algorithm comes into play.
Optimality principle
Before we get into specific algorithms, it may be helpful to note that one can make a
general statement about optimal routes without regard to network topology or traffic.
This statement is known as the optimality principle (Bellman, 1957). It states that if
router J is on the optimal path from router I to router K, then the optimal path from J to
K also falls along the same route. To see this, call the part of the route from I to J r1
and the rest of the route r 2. If a route better than r 2 existed from J to K, it could be
concatenated with r 1 to improve the route from I to K, contradicting our statement that
r 1r 2 is optimal.As a direct consequence of the optimality principle, we can see that
the set of optimal routes from all sources to a given destination form a tree rooted at
the destination. Such a tree is called a sink tree and is illustrated in Fig.(b),where the
distance metric is the number of hops. The goal of all routing algorithms is to discover
and use the sink trees for all routers.
Not for sell 103 Only for reading purpose
A sink tree is not necessarily unique; other trees with the same path lengths may exist.
If we allow all of the possible paths to be chosen, the tree becomes a more general
structure called a DAG (Directed Acyclic Graph). DAGs have no loops.
4. Shortest Path Algorithm
The idea is to build a graph of the network, with each node of the graph representing a
router and each edge of the graph representing a communication line, or link. To
choose a route between a given pair of routers, the algorithm just finds the shortest
path between them on the graph.The concept of a shortest path deserves some
explanation. In the general case, the labels on the edges could be computed as a
function of the distance, bandwidth, average traffic, communication cost, measured
delay, and other factors. By changing the weighting function, the algorithm would then
compute the ‘‘shortest’’ path measured according to any one of a number of criteria or
to a combination of criteria several algorithms for computing the shortest path
between two nodes of a graph are known.
Graphs are non-linear data structures representing the "connections" between the
elements. These elements are known as the Vertices (or nodes), Vertices are the basic
units of the graph used to represent real-life objects, devices, or entities. Sometimes,
vertices are also known as Nodes. and the lines or arcs that connect any two vertices in
the graph are known as the Edges(or Arcs). More formally, a Graph comprises a set of
Vertices (V) and a set of Edges (E). The Graph is denoted by G(V, E).
In the above figure, the Vertices/Nodes are denoted with Colored Circles, and the
Edges are denoted with the lines connecting the nodes.
Applications of the Graphs
Graphs are used to solve many real-life problems. Graphs are utilized to represent the
networks. These networks may include telephone or circuit networks or paths in a city.
Not for sell 104 Only for reading purpose
For example, we could use Graphs to design a transportation network model where
the vertices display the facilities that send or receive the products, and the edges
represent roads or paths connecting them. The following is a pictorial representation of
the same:
Graphs are also utilized in different Social Media Platforms like LinkedIn, Facebook,
Twitter, and more. For example, Platforms like Facebook use Graphs to store the data
of their users where every device is indicated with a vertex, and each of them is a
structure containing information like Device ID, Name, Gender, Address, etc.
Types of Graphs
The Graphs can be categorized into two types:
1. Undirected Graph
2. Directed Graph
Undirected Graph: A Graph with edges that do not have a direction is termed an
Undirected Graph. The edges of this graph imply a two-way relationship in which each
edge can be traversed in both directions. The following figure displays a simple
undirected graph with four nodes and five edges.
Not for sell 105 Only for reading purpose
Directed Graph: A Graph with edges with direction is termed a Directed Graph. The
edges of this graph imply a one-way relationship in which each edge can only be
traversed in a single direction. The following figure displays a simple directed graph
with four nodes and five edges.
The absolute length, position, or orientation of the edges in a graph illustration
characteristically does not have meaning. In other words, we can visualize the same
graph in different ways by rearranging the vertices or distorting the edges if the
underlying structure of the graph does not alter.
Weighted Graphs
A Graph is said to be Weighted if each edge is assigned a 'weight'. The weight of an
edge can denote distance, time, or anything that models the 'connection' between the
pair of vertices it connects.
For instance, we can observe a blue number next to each edge in the following figure
of the Weighted Graph. This number is utilized to signify the weight of the
corresponding edge.
Not for sell 106 Only for reading purpose
2. Dijkstra's Algorithm
Dijkstra's Algorithm was designed and published by Dr. Edsger W. Dijkstra, a Dutch
Computer Scientist, Software Engineer, Programmer, Science Essayist, and Systems
Scientist.Dijkstra (1959) which finds the shortest paths between a source and all
destinations in the network. Each node is labeled (in parentheses) with its distance
from the source node along the best-known path. The distances must be non-negative,
as they will be if they are based on real quantities like bandwidth and delay. Initially,
no paths are known, so all nodes are labeled with infinity. As the algorithm proceeds
and paths are found, the labels may change, reflecting better paths. A label may be
either tentative or permanent.Initially, all labels are tentative. When it is discovered
that a label represents the shortest possible path from the source to that node, it is
made permanent and never changed thereafter. A stepwise graphical representation
explained that how the labeling algorithm works (below mentioned figure)
Fundamentals of Dijkstra's Algorithm
The following are the basic concepts of Dijkstra's Algorithm:
1. Dijkstra's Algorithm begins at the node we select (the source node), and it
examines the graph to find the shortest path between that node and all the
other nodes in the graph.
2. The Algorithm keeps records of the presently acknowledged shortest distance
from each node to the source node, and it updates these values if it finds any
shorter path.
3. Once the Algorithm has retrieved the shortest path between the source and
another node, that node is marked as 'visited' and included in the path.
4. The procedure continues until all the nodes in the graph have been included in
the path. In this manner, we have a path connecting the source node to all other
nodes, following the shortest possible path to reach each node.
Working of Dijkstra's Algorithm
A graph and source vertex are requirements for Dijkstra's Algorithm. This Algorithm is
established on Greedy Approach and thus finds the locally optimal choice (local
minima in this case) at each step of the Algorithm.
Each Vertex in this Algorithm will have two properties defined for it:
Not for sell 107 Only for reading purpose
1. Visited Property
2. Path Property
Visited Property:
1. The 'visited' property signifies whether or not the node has been visited.
2. We are using this property so that we do not revisit any node.
3. A node is marked visited only when the shortest path has been found.
Path Property:
1. The 'path' property stores the value of the current minimum path to the node.
2. The current minimum path implies the shortest way we have reached this node
till now.
3. This property is revised when any neighbour of the node is visited.
4. This property is significant because it will store the final answer for each node.
Initially, we mark all the vertices, or nodes, unvisited as they have yet to be visited. The
path to all the nodes is also set to infinity apart from the source node. Moreover, the
path to the source node is set to zero (0).
We then select the source node and mark it as visited. After that, we access all the
neighbouring nodes of the source node and perform relaxation on every node.
Relaxation is the process of lowering the cost of reaching a node with the help of
another node.
In the process of relaxation, the path of each node is revised to the minimum value
amongst the node's current path, the sum of the path to the previous node, and the
path from the previous node to the current node.
Let us suppose that p[n] is the value of the current path for node n, p[m] is the value of
the path up to the previously visited node m, and w is the weight of the edge between
the current node and previously visited one (edge weight between n and m).
In the mathematical sense, relaxation can be exemplified as:
p[n] = minimum(p[n], p[m] + w)
We then mark an unvisited node with the least path as visited in every subsequent
step and update its neighbour’s paths.
Not for sell 108 Only for reading purpose
We repeat this procedure until all the nodes in the graph are marked visited.
Whenever we add a node to the visited set, the path to all its neighboring nodes also
changes accordingly.
If any node is left unreachable (disconnected component), its path remains 'infinity'. In
case the source itself is a separate component, then the path to all other nodes
remains 'infinity'.
Dijkstra's Algorithm with an Example
The following is the step that we will follow to implement Dijkstra's Algorithm:
Step 1: First, we will mark the source node with a current distance of 0 and set the rest
of the nodes to INFINITY.
Step 2: We will then set the unvisited node with the smallest current distance as the
current node, suppose X.
Step 3: For each neighbour N of the current node X: We will then add the current
distance of X with the weight of the edge joining X-N. If it is smaller than the current
distance of N, set it as the new current distance of N.
Step 4: We will then mark the current node X as visited.
Step 5: We will repeat the process from 'Step 2' if there is any node unvisited left in
the graph.
Let us now understand the implementation of the algorithm with the help of an
example:
Not for sell 109 Only for reading purpose
1. We will use the above graph as the input, with node A as the source.
2. First, we will mark all the nodes as unvisited.
3. We will set the path to 0 at node A and INFINITY for all the other nodes.
4. We will now mark source node A as visited and access its neighboring nodes.
Note: We have only accessed the neighboring nodes, not visited them.
5. We will now update the path to node B by 4 with the help of relaxation
because the path to node A is 0 and the path from node A to B is 4, and
the minimum((0 + 4), INFINITY) is 4.
6. We will also update the path to node C by 5 with the help of relaxation because
the path to node A is 0 and the path from node A to C is 5, and the minimum((0
+ 5), INFINITY) is 5. Both the neighbours of node A are now relaxed; therefore,
we can move ahead.
7. We will now select the next unvisited node with the least path and visit it.
Hence, we will visit node B and perform relaxation on its unvisited neighbours.
After performing relaxation, the path to node C will remain 5, whereas the path
to node E will become 11, and the path to node D will become 13.
8. We will now visit node E and perform relaxation on its neighboring nodes B, D,
and F. Since only node F is unvisited, it will be relaxed. Thus, the path to
node B will remain as it is, i.e., 4, the path to node D will also remain 13, and the
path to node F will become 14 (8 + 6).
9. Now we will visit node D, and only node F will be relaxed. However, the path to
node F will remain unchanged, i.e., 14.
10. Since only node F is remaining, we will visit it but not perform any relaxation as
all its neighboring nodes are already visited.
11. Once all the nodes of the graphs are visited, the program will end.
Hence, the final paths we concluded are:
1. A = 0
2. B = 4 (A -> B)
3. C = 5 (A -> C)
4. D = 4 + 9 = 13 (A -> B -> D)
5. E = 5 + 3 = 8 (A -> C -> E)
6. F = 5 + 3 + 6 = 14 (A -> C -> E -> F)
Not for sell 110 Only for reading purpose
Flooding in Computer Network
In a computer network, flooding is a communication method where data packets are
sent to all connected devices, even if they are not the intended recipients of the data.
Although this approach is frequently used in specific network protocols and
circumstances, it can be extremely inefficient and is rarely employed in contemporary
computer networks for routine data transmission.
A straightforward and easy-to-use network communication method called flooding
involves broadcasting data packets to every device connected to the network. Let's see
how it works:
o Sending Data: When a network device wants to send data to another device
but is unsure of the recipient's precise location or address, it creates a data
packet containing the desired information.
o Broadcasting: The sending device sends the data packet to every device on the
network rather than attempting to pinpoint its precise destination. The way to
do this is to give the packet's destination address a special value that denotes
"broadcast" or "all devices."
o Data Reception: The broadcasted data packet is received by all devices
connected to the network, including the one that sent it in the first place.
o Packet inspection: To ascertain whether it is the intended recipient of the data,
each device looks at the header of the packet. It verifies the packet's header's
destination address.
o Filtering: A device will accept a packet and process its contents if the
destination address in the packet matches the address of that device. The device
throws away the packet if the addresses do not match.
o Data packet propagation: After repeating steps 3, 4, and 5, the data packet
keeps travelling through the network until it eventually connects to the device
with the correct destination address.
o Loop Prevention: Flooding frequently uses mechanisms like Time to Live (TTL)
counters to prevent packets from circling endlessly in the network. The TTL
value in the packet's header is decreased each time a device forwards the
packet. The packet is no longer forwarded and is discarded when the TTL
reaches zero. This aids in preventing network infinite loops.
In computer networks, flooding is a very simple and occasionally ineffective method of
communication because it can create a lot of extra network traffic. In some routing
protocols, like Link-State Routing, or when broadcasting messages to every device on
Not for sell 111 Only for reading purpose
a local network segment, like ARP requests in Ethernet networks to translate IP
addresses to MAC addresses, it is used, but only in certain circumstances.
Modern computer networks typically prefer more effective communication techniques
like unicast (sending to a single recipient), multicast (sending to multiple specified
recipients), or broadcast (sending to all devices on a subnet).
3. Fixed and Flooding Routing algorithms
In most situations, packets require multiple hops to make a journey towards the
destination. Routing is one of the most complex and crucial aspects of packet-
switched network design.
Desirable Properties of Routing Algorithms:-
• Correctness and Simplicity
• Robustness: Ability of the network to deliver packets via some route even
in the face of failures.
• Stability: The algorithm should converge to equilibrium fast in the face of
changing conditions in the network.
• Fairness and Optimality
• Efficiency: Minimum overhead.
Design Parameters of Routing Algorithms :
• Performance Criteria: Number of hops, Cost(Send packet with high
bandwidth path as the cost is less), Delay(Size of Queue), Throughput
time(Number of packets delivered/time).
• Decision Time: When to decide to route a packet? Per-Packet(Datagram) or
Per-session(Virtual-Circuit).
• Decision Place: Who will decide about routing? Each Node(distributed),
Central Node (centralized),Originated Node (source) .
• Network Information Source: None, Local, Adjacent node, Nodes along the
route, All nodes.
• Network Information Update Time: Continuous, Periodic, Major Load
Change, Topology Change
Routing Strategies :
1. Fixed Routing
2. Flooding
3. Dynamic Routing
4. Random Routing
5. Flow-based Routing
Fixed Routing –
Not for sell 112 Only for reading purpose
• A route is selected for each source and destination pair of nodes in the
network.
• The route is fixed; changes only if the topology of the network changes.
Fixed Routing: Example (1)
Figure – A simple packet switching network with six nodes (routers)
Figure – Central routing table based on least-cost path algorithm
• A Central routing matrix is created based on the least-cost path which is
stored in the network control center
• The matrix shows for each source-destination of the route, the identity of
the next node on the route.
• Drawback: If the network control center fails, then everything will collapse.
Hence it is not reliable.
Fixed Routing: Example (2)
Not for sell 113 Only for reading purpose
Figure – Routing table stored in different nodes of the network
• Routing Table is created for each node. This is called a distributed routing
algorithm
• Routing table can be created using the least-min path or min-hop reach
method. Two famous path algorithms
1. Dijkstra Algorithm
2. Bellman Ford Algorithm
Advantages –
• Simple
• Works well in reliable network with stable load in a reliable network
• Same for virtual circuit and datagram
Disadvantages –
• Lack of flexibility
• Doesn’t react to failure or network congestion
Flooding –
• Requires no network information like topology, load condition, cost of diff.
paths
• Every incoming packet to a node is sent out on every outgoing like except
the one it arrived on.
• For Example, in the above figure
• An incoming packet to (1) is sent out to (2),(3)
• from (2) is sent to (6),(4), and from (3) it is sent to (4),(5)
• from (4) it is sent to (6),(5),(3), from (6) it is sent to (2),(4),(5),
from (5) it is sent to (4),(3)
Characteristics –
• All possible routes between Source and Destination are tried. A packet will
always get through if the path exists
• As all routes are tried, there will be at least one route which is the shortest
• All nodes directly or indirectly connected are visited
Limitations –
• Flooding generates a vast number of duplicate packets
• Suitable damping mechanism must be used
Hop-Count –
• A hop counter may be contained in the packet header which is
decremented at each hop.
with the packet being discarded when the counter becomes zero
• The sender initializes the hop counter. If no estimate is known, it is set to
the full diameter of the subnet.
Not for sell 114 Only for reading purpose
• Keep track of the packets which are responsible for flooding using a
sequence number. Avoid sending them out a second time.
Selective Flooding: Routers do not send every incoming packet out on every line, only
on those lines that go in approximately in the direction of the destination.
Advantages of Flooding :
• Highly Robust, emergency or immediate messages can be sent (e.g.,
military applications)
• Set up the route in virtual circuit
• Flooding always chooses the shortest path
• Broadcast messages to all the nodes
Disadvantages of Flooding :
• Network congestion: Flooding can cause a significant amount of traffic in
the network, leading to congestion. This can result in slower network
speeds and delays in delivering data packets.
• Wastage of network resources: Flooding uses a lot of network resources,
including bandwidth and processing power, to deliver packets. This can
result in the wastage of valuable network resources and reduce the overall
efficiency of the network.
• Security risks: Flooding can be used as a tool for launching various types of
attacks, including denial of service (DoS) attacks. Attackers can flood the
network with data packets, which can overload the network and cause it to
crash.
• Inefficient use of energy: Flooding can result in an inefficient use of energy
in wireless networks. Since all nodes receive every packet, even if they are
not the intended recipient, they will still need to process it, which can
waste energy and reduce the overall battery life of mobile devices.
• Difficulty in network troubleshooting: Flooding can make it difficult to
troubleshoot network issues. Since packets are sent to all nodes, it can be
challenging to isolate the cause of a problem when it arises.
4. Distance Vector Routing Algorithms (Distributed Bellman-Ford Routing
Algorithm)
Computer networks generally use dynamic routing algorithms that are more complex
than flooding, but more efficient because they find shortest paths for the current
topology. Two dynamic algorithms in particular, distance vector routing and link state
routing, are the most popular.
Not for sell 115 Only for reading purpose
A distance vector routing algorithm operates by having each router maintain a table
(i.e., a vector) giving the best-known distance to each destination and which link to use
to get there. These tables are updated by exchanging information with the neighbours.
Eventually, every router knows the best link to reach each destination.
The distance vector routing algorithm is sometimes called by other names, most
commonly the distributed Bellman-Ford routing algorithm, after the researchers who
developed it (Bellman, 1957; and Ford and Fulkerson, 1962). It was the original
ARPANET routing algorithm and was also used in the Internet under the name RIP
In distance vector routing, each router maintains a routing table indexed by,
and containing one entry for each router in the network. This entry has two parts:
1).the preferred outgoing line to use for that destination
2).an estimate of the distance to that destination(measured as the number of hops)
If the metric is propagation delay, the router can measure it directly with
special ECHO packets that the receiver just timestamps and sends back as fast as it
can. As an example, assume that delay is used as a metric and that the router knows
the delay to each of its neighbours. Once every T msec, each router sends to each
neighbour a list of its estimated delays to each destination. It also receives a similar list
from each neighbour.
This updating process is illustrated in Fig. Part (a) shows a network. The first four
columns of part (b) show the delay vectors received from the neighbours of router J. A
claims to have a 12-msec delay to B, a 25-msec delay to C, a 40- msec delay to D, etc.
Suppose that J has measured or estimated its delay to its neighbours, A, I, H, and K, as
8, 10, 12, and 6 msec, respectively.
Not for sell 116 Only for reading purpose
Consider how J computes its new route to router G. It knows that it can get to A in 8
msec, and furthermore A claims to be able to get to G in 18 msec, so J knows it can
count on a delay of 26 msec to G if it forwards packets bound for G to A. Similarly, it
computes the delay to G via I, H, and K as 41 (31 + 10), 18 (6 + 12), and 37 (31 + 6)
msec, respectively. The best of these values is 18, so it makes an entry in its routing
table that the delay to G is 18 msec and that the route to use is via H. The same
calculation is performed for all the other destinations, with the new routing table
shown in the last column of the figure.
The Count-to-Infinity Problem
The settling of routes to best paths across the network is called Convergence.
Distance vector routing is useful as a simple technique by which routers can
collectively compute shortest paths, but it has a serious drawback in practice: although
it converges to the correct answer, it may do so slowly. In particular, it reacts rapidly to
good news, but leisurely to bad news. Consider a router whose best route to
destination X is long. If, on the next exchange, neighbour A suddenly reports a short
delay to X, the router just switches over to using the line to A to send traffic to X. In
one vector exchange, the good news is processed.
To see how fast good news propagates, consider the five-node (linear) network of Fig.
, where the delay metric is the number of hops. Suppose A is down initially and all the
other routers know this. In other words, they have all recorded the delay to A as
infinity.
From this figure, it should be clear why bad news travels slowly: no router ever has a
value more than one higher than the minimum of all its neighbours. Gradually, all
routers work their way up to infinity, but the number of exchanges required depends
on the numerical value used for infinity. For this reason, it is wise to set infinity to the
longest path plus 1.Not entirely surprisingly, this problem is known as the count-to-
infinity problem. There have been many attempts to solve it, for example, preventing
routers from advertising their best paths back to the neighbours from which they heard
Not for sell 117 Only for reading purpose
them with the split horizon with poisoned reverse rule . However, none of these
heuristics work well in practice despite the colourful names. The core of the problem is
that when X tells Y that it has a path somewhere, Y has no way of knowing whether it
itself is on the path.
5. Link State Routing Algorithm
Distance vector routing was used in the ARPANET until 1979, it was replaced by link
state routing due to the count-to-infinity problem. link state routing, Variants of link
state routing called IS-IS and OSPF are the routing algorithms that are most widely
used inside large networks and the Internet today. The idea behind link state routing is
fairly simple Link state routing is a technique in which each router shares the
knowledge of its neighbourhood with every other router i.e. the internet work and
link-state routing uses link-state routers to exchange messages that allow each router
to learn the entire network topology. Based on this learned topology, each router is
then able to compute its routing table by using the shortest path computation.
Features of Link State Routing Protocols
• Link State Packet: A small packet that contains routing information.
• Link-State Database: A collection of information gathered from the link-
state packet.
• Shortest Path First Algorithm (Dijkstra algorithm): A calculation
performed on the database results in the shortest path
• Routing Table: A list of known paths and interfaces.
It can be stated as five parts. Each router must do the following things to make it work:
1. Discover its neighbours and learn their network addresses.
2. Set the distance or cost metric to each of its neighbours.
3. Construct a packet telling all it has just learned.
4. Send this packet to and receive packets from all other routers.
5. Compute the shortest path to every other router.
In effect, the complete topology is distributed to every router. Then Dijkstra’s algorithm
can be run at each router to find the shortest path to every other router by using an
example.
Illustration
To understand the Dijkstra Algorithm, let’s take a graph and find the shortest path
from the source to all nodes.
Note: We use a boolean array sptSet[] to represent the set of vertices included in
SPT. If a value sptSet[v] is true, then vertex v is included in SPT, otherwise not.
Array dist[] is used to store the shortest distance values of all vertices.
Not for sell 118 Only for reading purpose
Consider the below graph and src = = 0.
STEP 1: The set sptSet is initially empty and distances assigned to vertices are {0,
INF, INF, INF, INF, INF, INF, INF} where INF indicates infinite. Now pick the vertex with
a minimum distance value. The vertex 0 is picked and included in sptSet. So sptSet
becomes {0}. After including 0 to sptSet, update the distance values of its adjacent
vertices. Adjacent vertices of 0 are 1 and 7. The distance values of 1 and 7 are
updated as 4 and 8. The following subgraph shows vertices and their distance
values. Vertices included in SPT are included in GREEN color.
STEP 2: Pick the vertex with minimum distance value and not already included in
SPT (not in sptSET). The vertex 1 is picked and added to sptSet. So sptSet now
becomes {0, 1}. Update the distance values of adjacent vertices of 1. The distance
value of vertex 2 becomes 12.
Not for sell 119 Only for reading purpose
STEP 3: Pick the vertex with minimum distance value and not already included in
SPT (not in sptSET). Vertex 7 is picked. So sptSet now becomes {0, 1, 7}. Update the
distance values of adjacent vertices of 7. The distance value of vertex 6 and 8
becomes finite (15 and 9 respectively).
STEP 4: Pick the vertex with minimum distance value and not already included in
SPT (not in sptSET). Vertex 6 is picked. So sptSet now becomes {0, 1, 7, 6}. Update
the distance values of adjacent vertices of 6. The distance value of vertex 5 and 8 are
updated.
We repeat the above steps until sptSet includes all vertices of the given graph.
Finally, we get the following Shortest Path Tree (SPT).
Not for sell 120 Only for reading purpose
Characteristics of Link State Protocol
• It requires a large amount of memory.
• Shortest path computations require many CPU circles.
• If a network uses little bandwidth; it quickly reacts to topology changes
• All items in the database must be sent to neighbours to form link-state
packets.
• All neighbours must be trusted in the topology.
• Authentication mechanisms can be used to avoid undesired adjacency and
problems.
• No split horizon techniques are possible in the link-state routing.
• OSPF Protocol
Protocols of Link State Routing
1. Open Shortest Path First (OSPF)
2. Intermediate System to Intermediate System (IS-IS)
Open Shortest Path First (OSPF): Open Shortest Path First (OSPF) is a unicast
routing protocol developed by a working group of the Internet Engineering Task
Force (IETF). It is an intradomain routing protocol. It is an open-source protocol. It is
similar to Routing Information Protocol (RIP). OSPF is a classless routing protocol,
which means that in its updates, it includes the subnet of each route it knows about,
thus, enabling variable-length subnet masks. With variable-length subnet masks, an
IP network can be broken into many subnets of various sizes. This provides network
administrators with extra network configuration flexibility. These updates are
multicasts at specific addresses (224.0.0.5 and 224.0.0.6). OSPF is implemented as a
program in the network layer using the services provided by the Internet Protocol. IP
datagram that carries the messages from OSPF sets the value of the protocol field to
89. OSPF is based on the SPF algorithm, which sometimes is referred to as the
Dijkstra algorithm.
Intermediate System to Intermediate System (IS-IS): Intermediate System to
Intermediate System is a standardized link-state protocol that was developed as the
definitive routing protocol for the OSI Model. IS-IS uses System ID to identify a router
on the network. IS-IS doesn’t require IP connectivity between the routers as updates
are sent via CLNS instead of IP.
Not for sell 121 Only for reading purpose
1.10 CONGESTION AND FLOW CONTROL TECHNIQUES
When the network causes packet delays due to too many packets present and lost in
the network that degrades performance of the network, this situation is called
congestion. The network and transport layers share the responsibility for handling
congestion. Since congestion occurs within the network, it is the network layer that
directly experiences it and must ultimately determine what to do with the excess
packets. However, the most effective way to control congestion is to reduce the load
that the transport layer is placing on the network. This requires the network and
transport layers to work together.
Figure shows when the number of packets hosts send into the network is well within it
carrying capacity, the number delivered is proportional to the number sent. If twice as
many are sent, twice as many are delivered. However, as the offered load approaches
the carrying capacity, bursts of traffic occasionally fill up the buffers inside routers and
some packets are lost. These lost packets consume some of the capacity, so the
number of delivered packets falls below the ideal curve. The network is now
congested.
Flow control, in contrast, relates to the traffic between a particular sender and a
particular receiver. Its job is to make sure that a fast sender cannot continually transmit
data faster than the receiver is able to absorb it.
Effects of Congestion
Following are the effects of Congestion −
• Because of the increase in the response time, the overall performance is
reduced.
• Also, in worst situations, because of the delay that takes place, re-transmission
can also occur which worsens the scenario.
Not for sell 122 Only for reading purpose
Approaches to Congestion Control
As shown in Fig. , these solutions are usually applied on different time scales to either
prevent congestion or react to it once it has occurred. The most basic way to avoid
congestion is to build a network that is well matched to the traffic that it carries. If
there is a low-bandwidth link on the path along which most traffic is directed,
congestion is likely. Sometimes resources can be added dynamically when there is
serious congestion, for example, turning on spare routers or enabling lines that are
normally used only as backups (to make the system fault tolerant) or increasing
bandwidth. More often, links and routers that are regularly heavily utilized are
upgraded at the earliest opportunity. This is called provisioning and happens on a time
scale of months, driven by long-term traffic trends.
Classification of Congestion
The broader ways to classify the congestions are as follows −
• Practical network congestion
• TCP/IP congestion
Congestion Control techniques
To control the congestion in networks, the control techniques are broadly classified
under two categories, which are as follows −
• The Open loop refers to the protocols that should be used in order to prevent
congestion. That is, the congestion should not occur in the first place. This is
based on the technique of having a good design implementation in order to
prevent the congestion from taking place.
• The Close loop allows the system to enter in the congestion state if it occurs,
detects it and then proceeds to remove the congestion. This is based on the
feedback mechanism that is received. With the help of the feedback, one can
detect and remove the congestion from the network.
Policies adopted by open loop congestion control –
All the policies are adopted to prevent congestion before it happens in the network.
Not for sell 123 Only for reading purpose
1.Retransmission Policy :
It is the policy in which retransmission of the packets are taken care of. If the sender
feels that a sent packet is lost or corrupted, the packet needs to be retransmitted.
This transmission may increase the congestion in the network. To prevent congestion,
retransmission timers must be designed to prevent congestion and also able to
optimize efficiency.
The TCP retransmission means resending the packets over the network that have been
either lost or damaged. Here, retransmission is a mechanism used by protocols such
as TCP to provide reliable communication. Here, reliable communication means that
the protocol guarantees packet's delivery even if the data packet has been lost or
damaged.
The networks are unreliable and do not guarantee the delay or the retransmission of
the lost or damaged packets. The network which uses a combination of
acknowledgment and retransmission of damaged or lost packets offers reliability.
Retransmission mechanism
Here, retransmission means the data packets have been lost, which leads to a lack of
acknowledgment. This lack of acknowledgment triggers a timer to timeout, which
leads to the retransmission of data packets. Here, the timer means that if no
acknowledgment is received before the timer expires, the data packet is retransmitted.
Let's consider the following scenarios of retransmission.ed:
Scenario 1: When the data Scenario 2: When the packet is Scenario 3: When the early
packet is lost or erroneous. received but the acknowledge timeout occurs.
ment is lost.
Not for sell 124 Only for reading purpose
In this scenario, the packet is In this scenario, the packet is In this scenario, the packet is
sent to the receiver, but no received on the other side, sent, but due to the delay in
acknowledgment is received but the acknowledgment is acknowledgment or timeout
within that timeout period. lost, i.e., the ACK is not has occurred before the actual
When the timeout period received on the sender side. timeout, the packet is
expires, then the packet is Once the period retransmitted. In this case, the
timeout
resent again. When the expires, the packet is resent. packet has been sent again
packet is retransmitted, the There are two copies of the unnecessarily due to the delay
acknowledgment is received. packets on the other side; in acknowledgment or the
Once the acknowledgment is though the packet is received timeout has been set earlier
received, retransmission will correctly,theacknowledgment is than the actual timeout.
not occur again. not received, so the sender
retransmits the packet. In this
case, the retransmission could
have been avoided, but due to
the loss of the ACK, the
packet is retransmitted.
2.Window Policy :
The type of window at the sender’s side may also affect the congestion. Several
packets in the Go-back-n window are re-sent, although some packets may be
received successfully at the receiver side. This duplication may increase the
congestion in the network and make it worse. Therefore, Selective repeat window
should be adopted as it sends the specific packet that may have been lost.
The sliding window is a technique for sending multiple frames at a time. It controls the
data packets between the two devices where reliable and gradual delivery of data
frames is needed. It is also used in TCP (Transmission Control Protocol).
In this technique, each frame has sent from the sequence number. The sequence
numbers are used to find the missing data in the receiver end. The purpose of the
sliding window technique is to avoid duplicate data, so it uses the sequence number.
Terminologies Related to Sliding Window Protocol
Transmission Delay (Tt) – Time to transmit the packet from the host to the outgoing
link. If B is the Bandwidth of the link and D is the Data Size to transmit
Tt = D/B
Not for sell 125 Only for reading purpose
Propagation Delay (Tp) – It is the time taken by the first bit transferred by the host
onto the outgoing link to reach the destination. It depends on the distance d and the
wave propagation speed s (depends on the characteristics of the medium).
Tp = d/s
Efficiency – It is defined as the ratio of total useful time to the total cycle time of a
packet. For stop and wait protocol,
Total time(TT) = Tt(data) + Tp(data) + t(acknowledgement) + Tp(acknowledgement)
= Tt(data) + Tp(data) + Tp(acknowledgement)
= Tt + 2*Tp
Since acknowledgements are very less in size, their transmission delay can be
neglected.
Efficiency = Useful Time / Total Cycle Time
= Tt/(Tt + 2*Tp) (For Stop and Wait)
= 1/(1+2a) [ Using a = Tp/Tt ]
Effective Bandwidth(EB) or Throughput – Number of bits sent per second.
EB = Data Size(D) / Total Cycle time(Tt + 2*Tp)
Multiplying and dividing by Bandwidth (B),
= (1/(1+2a)) * B [ Using a = Tp/Tt ]
= Efficiency * Bandwidth
Capacity of link – If a channel is Full Duplex, then bits can be transferred in both the
directions and without any collisions. Number of bits a channel/Link can hold at
maximum is its capacity.
Capacity = Bandwidth(B) * Propagation(Tp)
For Full Duplex channels,
Capacity = 2*Bandwidth(B) * Propagation(Tp)
Concept of Pipelining
In Stop and Wait protocol, only 1 packet is transmitted onto the link and then sender
waits for acknowledgement from the receiver. The problem in this setup is that
efficiency is very less as we are not filling the channel with more packets after 1st
Not for sell 126 Only for reading purpose
packet has been put onto the link. Within the total cycle time of Tt + 2*Tp units, we
will now calculate the maximum number of packets that sender can transmit on the
link before getting an acknowledgement.
In Tt units ----> 1 packet is Transmitted.
In 1 units ----> 1/Tt packet can be Transmitted.
In Tt + 2*Tp units -----> (Tt + 2*Tp)/Tt
packets can be Transmitted
------> 1 + 2a [Using a = Tp/Tt]
Maximum packets That can be Transmitted in total cycle time = 1+2*a Let me explain
now with the help of an example. Consider Tt = 1ms, Tp = 1.5ms. In the picture given
below, after sender has transmitted packet 0, it will immediately transmit packets 1, 2,
3. Acknowledgement for 0 will arrive after 2*1.5 = 3ms. In Stop and Wait, in time 1 +
2*1.5 = 4ms, we were transferring one packet only. Here we keep a window of
packets that we have transmitted but not yet acknowledged.
After we have received the Ack for packet 0, window slides and the next packet can be
assigned sequence number 0. We reuse the sequence numbers which we have
acknowledged so that header size can be kept minimum as shown in the diagram
given below.
Not for sell 127 Only for reading purpose
Minimum Number of Bits for Sender Window (Very Important For GATE)
As we have seen above,
Maximum window size = 1 + 2*a where a = Tp/Tt
Minimum sequence numbers required = 1 + 2*a.
All the packets in the current window will be given a sequence number. Number of
bits required to represent the sender window = ceil(log2(1+2*a)). But sometimes
number of bits in the protocol headers is pre-defined. Size of sequence number field
in header will also determine the maximum number of packets that we can send in
total cycle time. If N is the size of sequence number field in the header in bits, then
we can have 2N sequence numbers. Window Size ws = min (1+2*a, 2N) If it want to
calculate minimum bits required to represent sequence numbers/sender window, it
will be ceil(log2(ws)). In this article, we have discussed sending window only. For
receiving window, there are 2 protocols namely Go Back N and Selective
Repeat which are used to implement pipelining practically. We will be discussing
receiving window in set 2. https://www.geeksforgeeks.org/difference-between-stop-and-wait-protocol-a
nd-sliding-window-protocol/
Types of Sliding Window Protocol
Sliding window protocol has two types:
I. Go-Back-N ARQ
II. Selective Repeat ARQ
Go-Back-N ARQ
Not for sell 128 Only for reading purpose
Go-Back-N ARQ protocol is also known as Go-Back-N Automatic Repeat Request. It is
a data link layer protocol that uses a sliding window method. In this, if any frame is
corrupted or lost, all subsequent frames have to be sent again.
The size of the sender window is N in this protocol. For example, Go-Back-8, the size
of the sender window, will be 8. The receiver window size is always 1.
If the receiver receives a corrupted frame, it cancels it. The receiver does not accept a
corrupted frame. When the timer expires, the sender sends the correct frame again.
The design of the Go-Back-N ARQ protocol is shown below.
Not for sell 129 Only for reading purpose
Selective Repeat ARQ
Selective Repeat ARQ is also known as the Selective Repeat Automatic Repeat
Request. It is a data link layer protocol that uses a sliding window method. The Go-
back-N ARQ protocol works well if it has fewer errors. But if there is a lot of error in
the frame, lots of bandwidth loss in sending the frames again. So, we use the Selective
Repeat ARQ protocol. In this protocol, the size of the sender window is always equal
to the size of the receiver window. The size of the sliding window is always greater
than 1.
If the receiver receives a corrupt frame, it does not directly discard it. It sends a
negative acknowledgment to the sender. The sender sends that frame again as soon
as on the receiving negative acknowledgment. There is no waiting for any time-out to
send that frame. The design of the Selective Repeat ARQ protocol is shown below.
Not for sell 130 Only for reading purpose
Not for sell 131 Only for reading purpose
Difference between the Go-Back-N ARQ and Selective Repeat ARQ?
Go-Back-N ARQ Selective Repeat ARQ
If a frame is corrupted or lost in it, all In this, only the frame is sent again, which
subsequent frames have to be sent is corrupted or lost.
again.
If it has a high error rate ,it wastes a lot There is a loss of low bandwidth.
of bandwidth.
It is less complex. It is more complex because it has to do
sorting and searching as well. And it also
requires more storage.
It does not require sorting. In this, sorting is done to get the frames in
the correct order.
It does not require searching. The search operation is performed in it.
It is used more. It is used less because it is more complex.
3.Discarding Policy:
A good discarding policy adopted by the routers is that the routers may prevent
congestion and at the same time partially discard the corrupted or less sensitive
packages and also be able to maintain the quality of a message. In case of audio file
transmission, routers can discard fewer sensitive packets to prevent congestion and
also maintain the quality of the audio file.
4Acknowledgment Policy :
Since acknowledgements are also the part of the load in the network, the
acknowledgment policy imposed by the receiver may also affect congestion. Several
approaches can be used to prevent congestion related to acknowledgment. The
receiver should send acknowledgement for N packets rather than sending
acknowledgement for a single packet. The receiver should send an acknowledgment
only if it has to send a packet or a timer expires.
5.Admission Policy :
In admission policy a mechanism should be used to prevent congestion. Switches in a
flow should first check the resource requirement of a network flow before
transmitting it further. If there is a chance of a congestion or there is a congestion in
the network, router should deny establishing a virtual network connection to prevent
further congestion.
Not for sell 132 Only for reading purpose
Closed Loop Congestion Control
Closed loop congestion control techniques are used to treat or alleviate congestion
after it happens. Several techniques are used by different protocols; some of them are:
1. Backpressure :
Backpressure is a technique in which a congested node stops receiving packets from
upstream node. This may cause the upstream node or nodes to become congested and
reject receiving data from above nodes. Backpressure is a node-to-node congestion
control technique that propagate in the opposite direction of data flow. The
backpressure technique can be applied only to virtual circuit where each node has
information of its above upstream node.
In above diagram the 3rd node is congested and stops receiving packets as a result
2nd node may be get congested due to slowing down of the output data flow.
Similarly, 1st node may get congested and inform the source to slow down.
2. Choke Packet Technique :
Choke packet technique is applicable to both virtual networks as well as datagram
subnets. A choke packet is a packet sent by a node to the source to inform it of
congestion. Each router monitors its resources and the utilization at each of its output
lines. Whenever the resource utilization exceeds the threshold value which is set by
the administrator, the router directly sends a choke packet to the source giving it
Not for sell 133 Only for reading purpose
feedback to reduce the traffic. The intermediate nodes through which the packets have
travelled are not warned about congestion.
Congestion control algorithms
• Congestion Control is a mechanism that controls the entry of data packets into
the network, enabling a better use of a shared network infrastructure and
avoiding congestive collapse.
• Congestive-Avoidance Algorithms (CAA) are implemented at the TCP layer as
the mechanism to avoid congestive collapse in a network.
• There are two congestion control algorithm which are as follows:
• Leaky Bucket Algorithm
• The leaky bucket algorithm discovers its use in the context of network traffic
shaping or rate-limiting.
• A leaky bucket execution and a token bucket execution are predominantly used
for traffic shaping algorithms.
• This algorithm is used to control the rate at which traffic is sent to the network
and shape the burst traffic to a steady traffic stream.
• The disadvantages compared with the leaky-bucket algorithm are the inefficient
use of available network resources.
• The large area of network resources such as bandwidth is not being used
effectively.
Let us consider an example to understand
Not for sell 134 Only for reading purpose
Imagine a bucket with a small hole in the bottom.No matter at what rate water enters
the bucket, the outflow is at constant rate. When the bucket is full with water
additional water entering spills over the sides and is lost.
Similarly, each network interface contains a leaky bucket and the following steps are
involved in leaky bucket algorithm:
1. When host wants to send packet, packet is thrown into the bucket.
2. The bucket leaks at a constant rate, meaning the network interface transmits
packets at a constant rate.
3. Bursty traffic is converted to a uniform traffic by the leaky bucket.
4. In practice the bucket is a finite queue that outputs at a finite rate.
• Token bucket Algorithm https://www.geeksforgeeks.org/token-bucket-algorithm/
• The leaky bucket algorithm has a rigid output design at an average rate
independent of the bursty traffic.
• In some applications, when large bursts arrive, the output is allowed to speed
up. This calls for a more flexible algorithm, preferably one that never loses
information. Therefore, a token bucket algorithm finds its uses in network traffic
shaping or rate-limiting.
• It is a control algorithm that indicates when traffic should be sent. This order
comes based on the display of tokens in the bucket.
• The bucket contains tokens. Each of the tokens defines a packet of
predetermined size. Tokens in the bucket are deleted for the ability to share a
packet.
• When tokens are shown, a flow to transmit traffic appears in the display of
tokens.
Not for sell 135 Only for reading purpose
• No token means no flow sends its packets. Hence, a flow transfers traffic up to
its peak burst rate in good tokens in the bucket.
Need of token bucket Algorithm:-
The leaky bucket algorithm enforces output pattern at the average rate, no matter
how bursty the traffic is. So, in order to deal with the bursty traffic we need a flexible
algorithm so that the data is not lost. One such algorithm is token bucket algorithm.
Steps of this algorithm can be described as follows:
In regular intervals tokens are thrown into the bucket. ƒ
1. The bucket has a maximum capacity. ƒ
2. If there is a ready packet, a token is removed from the bucket, and the packet is
sent.
3. If there is no token in the bucket, the packet cannot be sent.
Let’s understand with an example,
In figure (A) we see a bucket holding three tokens, with five packets waiting to be
transmitted. For a packet to be transmitted, it must capture and destroy one token. In
figure (B) We see that three of the five packets have gotten through, but the other two
are stuck waiting for more tokens to be generated.
Ways in which token bucket is superior to leaky bucket: The leaky bucket algorithm
controls the rate at which the packets are introduced in the network, but it is very
conservative in nature. Some flexibility is introduced in the token bucket algorithm. In
the token bucket, algorithm tokens are generated at each tick (up to a certain limit). For
an incoming packet to be transmitted, it must capture a token and the transmission
takes place at the same rate. Hence some of the busty packets are transmitted at the
same rate if tokens are available and thus introduces some amount of flexibility in the
system.
Formula: M * s = C + ? * s where S – is time taken M – Maximum output rate ? – Token
arrival rate C – Capacity of the token bucket in byte
Let’s understand with an example,
Not for sell 136 Only for reading purpose
1.11Network interconnection-bridges and routers
Many different networks exist, including PANs, LANs, MANs, and WANs.
interconnecting one network with other networks, obtaining more information from the
network and publishing one's own news to the network are the main driving forces for
network interconnection. There are many ways to interconnect the network, among
which bridge interconnection and router interconnection are the most used. Several
different devices that connect networks, including repeaters, hubs, switches, bridges,
routers, and gateways. Repeaters and hubs just move bits from one wire to another.
They are mostly analog devices and do not understand anything about higher layer
protocols. Bridges and switches operate at the link layer. They can be used to build
networks, but only with minor protocol translation in the process, for example,
between 10, 100 and 1000 Mbps Ethernet switches. Interconnection devices that
operate at the network layer, namely as the Routers.
Not for sell 137 Only for reading purpose
Networks interconnected by bridges
data
Bridges work at the second layer in the OSI model, the link layer. Complete data frame
(frame) forwarding, the main purpose is to provide transparent communication
between connected networks. The forwarding of the bridge is based on the source
address and destination address in the data frame to determine whether a frame
should be forwarded and to which port. The address in the frame is called the "MAC"
address or "hardware" address, which is generally the address carried by the network
card.
The role of a bridge is to interconnect two or more networks to provide transparent
communication. Devices on the network cannot see the existence of the bridge, and the
communication between devices is as convenient as on a network. Since the bridge is
forwarded on the data frame, it can only connect the same or similar networks (data
frames of the same or similar structure), such as between Ethernet, between Ethernet
and token ring (token ring) Interconnection, for different types of networks (with
different data frame structures), such as between Ethernet and X.25, the bridge is
powerless.
The network bridge expands the scale of the network, improves the performance of
the network, and brings convenience to the network application. In the previous
network, the network bridge was widely used. However, bridge interconnection also
brings a lot of problems: one is broadcast storm, the bridge does not block broadcast
messages in the network, when the network is large (several bridges, multiple
Ethernet segments), it may cause A broadcast storm causes the entire network to be
filled with broadcast information until it is completely paralyzed. The second problem
Not for sell 138 Only for reading purpose
is that when interconnecting with an external network, the bridge will combine the
internal and external networks into one network, and both parties will automatically
fully open their network resources to each other. This type of interconnection is
obviously unacceptable when interconnecting with external networks. The main source
of the problem is that bridges only maximize network communication, regardless of
what information is being sent.
Router interconnection network
A router is a device that connects various local area networks and wide area networks
in the Internet. It will automatically select and set routes according to the channel
conditions and send signals in the best path and in sequence. The router is the hub of
the Internet, the "traffic police". At present, routers have been widely used in all walks
of life, and various products of different grades have become the main force for
realizing the internal connection of various backbone networks, the network
interconnection between backbone networks, and the interconnection between
backbone networks and the Internet
The interconnection of routers is related to the protocol of the TCP/IP networks.
Routers work in the third layer of the OSI model, the network layer. The router uses
the "logical" network address (i.e., IP address) defined by the network layer to
distinguish different networks, realize the interconnection and isolation of networks,
and maintain the independence of each network. Routers do not forward broadcast
messages, but limit broadcast messages within their respective networks. Data sent to
other networks is first sent to the router, and then forwarded by the router.
IP routers only forward IP packets, and block the rest of the network (including
broadcast), so as to maintain the relative independence of each network, which can
form a large network with many networks (subnets) interconnected. Due to the
Not for sell 139 Only for reading purpose
interconnection at the network layer, routers can easily connect different types of
networks. As long as the network layer runs the IP protocol, they can be
interconnected through routers.
Devices on a network communicate with each other using their network addresses (IP
addresses in TCP/IP networks). IP addresses are "logical" addresses independent of
hardware addresses. Routers only forward data based on IP addresses. The structure
of the IP address has two parts, one part defines the network number, and the other
part defines the host number within the network. At present, the subnet mask is used
in the Internet network to determine the network address and the host address in the
IP address. The subnet mask and IP address are also 32 bits, and the two are in one-
to-one correspondence, and it is stipulated that the part of the IP address
corresponding to the number "1" in the subnet mask is the network number, and the
part of the IP address corresponding to the number "0" is the network number. The
corresponding host numbers. The network number and the host number together
constitute a complete IP address. The IP addresses of hosts in the same network must
have the same network numbers. This network is called an IP subnet.
Communication can only be carried out between IP addresses with the same network
number. To communicate with hosts on other IP subnets, it must go through a router or
gateway on the same network. IP addresses of different network numbers cannot
communicate directly, even if they are connected together, they cannot communicate.
Routers have multiple ports for connecting multiple IP subnets. The network number
of the IP address of each port is required to be the same as the network number of the
connected IP subnet. Different ports are different network numbers, corresponding to
different IP subnets, so that the hosts in each subnet can send the required IP packets
to the router through the IP addresses of their own subnets.
Not for sell 140 Only for reading purpose
Sr. Points of Router Bridge
No differences
1 Function The main function is to route the The main function of Bridge is to
packets and to reduce the filter the packets and to keep the
network problems. traffic for each segment
separately.
2 Layers It is a hardware device that works It is a hardware device that works
at the network, data link & at the OSI model's data link and
physical layer of the OSI Model. physical layer.
3 Address The Router has access to the The Bridge has access to a
logical address or IP address of physical address or MAC address
stations. of stations.
4 Protocols RIP, OSPF, etc. these are some In Bridge, there are no protocols
protocols that can be configured to configure.
in the Router.
5 Connection It connects two or more networks The Bridge is used to extend the
and routes packets between existing network or divide or large
them. network into smaller segments.
6 Routing Table The Router uses a routing table The Bridge does not use a routing
to store information. This table is table for storing information.
dynamic and is updated using
routing protocols.
7 Data Structure A router used graph data Bridge used tables data structures
structure.
8 Network In Router enables network In Bridge network segmentation is
Segmentation segmentation. disable.
9 Domain It works on more than single Bridge works on a single
broadcast domains. broadcast domain.
10 Transparency It is not transparent to the end It is transparent to the end
stations. stations and do not rely on the
protocol.
11 Efficiency Routing is more efficient. The Bridge has less efficiency than
the Router.
12 Ports It has more than two ports. It has only two ports.
13 Path Router devices can accommodate Bridge devices can accommodate
multiple paths. a single path.
14 Setup Difficult Easy
15 Cost Routers are relatively expensive Bridges are relatively inexpensive
devices. devices.
Not for sell 141 Only for reading purpose
1.12 Dead lock avoidance
In complex systems involving multiple processes and shared resources, the potential
for deadlocks arises when processes wait for each other to release resources, causing
a standstill. Deadlock is a situation that occurs in a computer system when two or
more processes are blocked and waiting for each other to release resources, resulting
in a stalemate. The resulting deadlocks can cause severe issues in computer systems,
such as performance degradation and even system crashes. To prevent such problems,
the technique of deadlock avoidance is employed. It entails scrutinizing the requests
made by processes for resources and evaluating the available resources to determine if
the grant of such requests would lead to a deadlock. In cases where granting a request
would result in a deadlock, the system denies the request. Deadlock avoidance is a
crucial aspect of operating system design and plays an indispensable role in upholding
the dependability and steadiness of computer systems.
Safe State and Unsafe State
A safe state refers to a system state where the allocation of resources to each process
ensures the avoidance of deadlock. The successful execution of all processes is
achievable, and the likelihood of a deadlock is low. The system attains a safe state
when a suitable sequence of resource allocation enables the successful completion of
all processes.
Conversely, an unsafe state implies a system state where a deadlock may occur. The
successful completion of all processes is not assured, and the risk of deadlock is high.
The system is insecure when no sequence of resource allocation ensures the
successful execution of all processes.
Not for sell 142 Only for reading purpose
Deadlock Avoidance Algorithms
Deadlock detection algorithms are used to identify the presence of deadlocks in
computer systems. These algorithms examine the system's processes and resources to
determine if there is a circular wait situation that could lead to a deadlock. If a deadlock
is detected, the algorithm can take steps to resolve it and prevent it from occurring
again in the future. There are several popular deadlock detection algorithms. Here we
will explore necessary conditions of deadlock, purpose of the deadlock detection
algorithm, mainly each of these algorithms in detail and the situations in which they
are most effective.
• When resource categories have only single instances of their resources,
Resource- Allocation Graph Algorithm is used. In this algorithm, a cycle is a
necessary and sufficient condition for deadlock.
• When resource categories have multiple instances of their resources, Banker’s
Algorithm is used. In this algorithm, a cycle is a necessary but not a sufficient
condition for deadlock.
Resource-Allocation Graph Algorithm
Resource Allocation Graph (RAG) is a popular technique used for deadlock avoidance.
It is a directed graph that represents the processes in the system, the resources
available, and the relationships between them. A process node in the RAG has two
types of edges, request edges, and assignment edges. A request edge represents a
request by a process for a resource, while an assignment edge represents the
assignment of a resource to a process.
• Build a RAG − The first step is to build a Resource Allocation Graph (RAG) that
shows the allocation and request of resources in the system. Each resource type
is represented by a rectangle, and each process is represented by a circle.
Not for sell 143 Only for reading purpose
• Check for cycles − Look for cycles in the RAG. If there is a cycle, it indicates that
the system is deadlocked.
• Identify deadlocked processes − Identify the processes involved in the cycle.
These processes are deadlocked and waiting for resources held by other
processes.
• Determine resource types − Determine the resource types involved in the
deadlock, as well as the resources held and requested by each process.
• Take corrective action − Take corrective action to break the deadlock by
releasing resources, aborting processes, or preempting resources. Once the
deadlock is broken, the system can continue with normal operations.
• Recheck for cycles − After corrective action has been taken, recheck the RAG
for cycles. If there are no more cycles, the system is no longer deadlocked, and
normal operations can resume.
Advantages Disadvantages
• Easy to understand and implement • Can be time-consuming for large
• Can handle multiple types of resources systems
• Helps identify the processes involved • Can give false positives if there are
in a deadlock multiple requests for the same
resource
• Assumes that all resources are pre-
allocated, which may not be the case
in some systems.
Example
Consider a system with two processes, P1 and P2, and two resources, R1 and R2.
Process R1 R2
P1 1 0
P2 0 1
The RAG for this system can be represented as follows:------
P1 -> R1
P2 -> R2
R1 -> P2
R2 -> P1
Not for sell 144 Only for reading purpose
There is a cycle between P1 and P2, indicating a potential deadlock. To confirm
whether there is a deadlock, we can use the cycle-detection algorithm on the RAG.
The algorithm will detect the cycle and identify a potential deadlock between P1 and
P2. We can then take appropriate actions to resolve the deadlock and prevent it from
occurring in the future.
The RAG technique is straightforward to implement and provides a clear visual
representation of the processes and resources in the system. It is also an effective way
to identify the cause of a deadlock if one occurs. However, one of the main limitations
of the RAG technique is that it assumes that all resources in the system are allocated
at the start of the analysis. This assumption can be unrealistic in practice, where
resource allocation can change dynamically during system operation. Therefore, other
techniques such as the Banker's Algorithm are used to overcome this limitation.
Wait-for Graph (WFG) Algorithm
• Build a WFG − The first step is to build a Wait-for Graph (WFG) that shows the
wait for relationships between processes. Each process is represented by a
circle, and an arrow is drawn from one process to another if the former is
waiting for a resource held by the latter.
• Check for cycles − Look for cycles in the WFG. If there is a cycle, it indicates that
the system is deadlocked.
• Identify deadlocked processes − Identify the processes involved in the cycle.
These processes are deadlocked and waiting for resources held by other
processes.
• Determine resource types − Determine the resource types involved in the
deadlock, as well as the resources held and requested by each process.
• Take corrective action − Take corrective action to break the deadlock by
releasing resources, aborting processes, or preempting resources. Once the
deadlock is broken, the system can continue with normal operations.
• Recheck for cycles − After corrective action has been taken, recheck the WFG
for cycles. If there are no more cycles, the system is no longer deadlocked, and
normal operations can resume.
•
Advantages Disadvantages
• Can handle multiple types of resources • Can be time-consuming for large
• Useful for systems with a large systems
number of processes • May give false positives if there are
Not for sell 145 Only for reading purpose
• Provides a clear visualization of the multiple requests for the same
deadlock resource
• Assumes that all resources are pre-
allocated, which may not be the case
in some systems
Example
Three processes, P1, P2, and P3, and two resources, R1 and R2.
Process R1 R2
P1 1 0
P2 0 1
P3 1 1
The wait-for graph (WFG) for this system can be represented as follows −
P1 -> P3
P3 -> P2
P2 -> P3
There is a cycle between P2 and P3, indicating a potential deadlock. To confirm
whether there is a deadlock, we can use the cycle-detection algorithm on the WFG.
The algorithm will detect the cycle and identify a potential deadlock between P2 and
P3. We can then take appropriate actions to resolve the deadlock and prevent it from
occurring in the future.
Banker’s Algorithm
The banker's algorithm is a deadlock avoidance algorithm used in operating systems. It
was proposed by Edsger Dijkstra in 1965. The banker's algorithm works on the
principle of ensuring that the system has enough resources to allocate to each process
so that the system never enters a deadlock state. It works by keeping track of the total
number of resources available in the system and the number of resources allocated to
each process.
The algorithm is used to prevent deadlocks that can occur when multiple processes
are competing for a finite set of resources. The resources can be of different types such
as memory, CPU cycles, or I/O devices. It works by first analysing the current state of
Not for sell 146 Only for reading purpose
the system and determining if granting a resource request from a process will result in
a safe state. A state is considered safe if there is at least one sequence of resource
allocations that can satisfy all processes without causing a deadlock.
The Banker's algorithm assumes that each process declares its maximum resource
requirements upfront. Based on this information, the algorithm allocates resources to
each Resource-Allocation Graph process such that the total number of allocated
resources never exceeds the total number of available resources. The algorithm does
not grant access to resources that could potentially lead to a deadlock situation. The
Banker's algorithm uses a matrix called the "allocation matrix" to keep track of the
resources allocated to each process, and a "request matrix" to keep track of the
resources requested by each process. It also uses a "need matrix" to represent the
resources that each process still needs to complete its execution.
To determine if a request can be granted, the algorithm checks if there are enough
available resources to satisfy the request, and then checks if granting the request will
still result in a safe state. If the request can be granted safely, the algorithm grants the
resources and updates the allocation matrix, request matrix, and need matrix
accordingly. If the request cannot be granted safely, the process must wait until
sufficient resources become available.
1. Initialize the system
• Define the number of processes and resource types.
• Define the total number of available resources for each resource type.
• Create a matrix called the "allocation matrix" to represent the current resource
allocation for each process.
• Create a matrix called the "need matrix" to represent the remaining resource
needs for each process.
2. Define a request
• A process requests a certain number of resources of a particular type.
3. Check if the request can be granted
• Check if the requested resources are available.
• If the requested resources are not available, the process must wait.
• If the requested resources are available, go to the next step.
Not for sell 147 Only for reading purpose
4. Check if the system is in a safe state
• Simulate the allocation of the requested resources to the process.
• Check if this allocation results in a safe state, meaning there is a sequence of
allocations that can satisfy all processes without leading to a deadlock.
• If the state is safe, grant the request by updating the allocation matrix and the
need matrix.
• If the state is not safe, do not grant the request and let the process wait.
Release the Resources
• When a process has finished its execution, releases its allocated resources by
updating the allocation matrix and the need matrix.
The above steps are repeated for each resource request made by any process in the
system. Overall, the Banker's algorithm is an effective way to avoid deadlocks in
resource constrained systems by carefully managing resource allocations and
predicting potential conflicts before they arise.
1.13 Elements of queuing analysis
Routers are critical networking equipment that control the data flow across a network.
Routers have one or more input and output interfaces via which packets are received
and sent. Since a router's memory is limited, it may be unable to handle newly
incoming packets. This happens when the pace at which packets arrive exceeds the
rate at which packets leave the router's memory. New packets are ignored in this
circumstance, while older packets are discarded. Routers must implement some sort of
queuing discipline as part of their resource allocation algorithms, in order to regulate
how packets are stored or discarded as needed.
Because of the limited buffer memory available to router queues, they are
prone to congestion. Congestion occurs when the pace of input traffic exceeds
the quantity that can be transmitted on the output link. The following are some
of the probable reasons for such a situation −
Not for sell 148 Only for reading purpose
• The rate of incoming traffic exceeds that of leaving traffic.
• The entire output capacity is exceeded by the combined traffic from all input interfaces.
• The router processor is incapable of handling the size of the forwarding table to
determine routing paths.
Queuing Models in Operating System
The fundamental model of queuing theories is the same as the model of a computer
system. Each computer system is represented as a collection of servers such as CPUs
and I/O devices, each with its own queue. The article focuses on discussing the
Queuing System in Operating System.
The following topics will be discussed here:
1. Components of Queuing System
2. Number of Servers
3. Measures of Performance for Queuing Systems
4. Notation for Queues
5. Queue Discipline
1.Components of Queuing System
A queuing system typically includes the following elements:
• Arrival process: The arrival process describes how routers enter the
system.
• Server: The server is the device who provides the service to the routers.
• Queue: Routers who are waiting for service are held in a queue.
• Service discipline: The order in which routers are served is determined by
service discipline.
• Service time distribution: The amount of time required to serve a customer
is described as service time distribution.
• Departure process: The departure process describes how routers exit the
system once they have been served.
• System performance measures: System performance measures are used
to analyze and evaluate the system’s performance. Examples include the
average wait time, the number of routers in the system, and the server’s
utilization.
Optional extras include multiple servers or channels, priority service, and feedback or
renege mechanism.
2.Number of Servers
The number of servers in a queuing system can vary depending on the application
Not for sell 149 Only for reading purpose
and the level of service desired. In some cases, a single server may suffice, whereas,
in others, multiple servers may be required to meet demand.
• Single-server queuing systems: These are the most fundamental type of
queuing systems, and they are frequently used in simple applications such
as retail stores or fast-food restaurants. Routers arrive and queue to be
served by a single server in these systems.
• Multi-server queuing systems: multi-server queuing systems on the other
hand, are used in more complex applications where demand is high and
more than one server is required to handle the workload. A call center with
multiple agents to handle incoming calls is an example of this type of
system. Routers are usually directed to an available server in a multi-server
system, and the service time distribution is assumed to be the same across
all servers.
Various methods, such as queuing analysis, simulation, and optimization techniques,
can be used to determine the number of servers in a queuing system. The goal is
typically to find the optimal number of servers that minimizes system costs (e.g., staff
wages) while providing an acceptable level of service.
3.Measures of Performance for Queuing Systems
Performance measures for queuing systems are used to assess how well the system
is performing and to identify areas for improvement. Some common performance
indicators for queuing systems are:
• Utilization: The percentage of time spent by the server serving routers. A
high utilization rate indicates that the server is being used effectively,
whereas a low utilization rate indicates that the server is being
underutilized.
• Average waiting time: The amount of time routers spends waiting in line
to be served. A long waiting time may indicate a system bottleneck,
whereas a short waiting time indicates that the system is running
efficiently.
• An average number of routers in the system: The average number of
routers in the system, including those being served as well as those
waiting in line. A high number of routers in the system may indicate that
there is a high demand for service, whereas a low number indicates that
the system is running efficiently.
• An average number of routers in line: The average number of routers in
line to be served. A large number of routers in the queue may indicate that
Not for sell 150 Only for reading purpose
the system is unable to meet the demand for service, whereas a small
number indicates that the system is operating efficiently.
• Throughput: The rate at which the system serves routers. A high
throughput indicates that the system is running efficiently, whereas a low
throughput may indicate that the system has a bottleneck.
• The steady-state probability distribution of the system: provides the
likelihood of finding a certain number of routers in the system at any given
time.
• Waiting time probability distribution: indicates the likelihood that a
customer will have to wait for a certain amount of time before being
served.
• Response time or cycle time: Response time, also known as cycle time, is
the total amount of time a customer spends in the system from arrival to
departure.
These performance measures are not all applicable to every system; the most
common and important are determined by the queueing model used to represent the
system and the performance objectives.
4.Notation for Queues
Kendall’s notation and A/S/n notation are two popular notations for describing
queues.
• Kendall’s notation: This describes a queue by using a set of symbols to
represent the queue’s various characteristics. It is represented by a three-
letter notation, with each letter representing a different aspect of the
queue. The first letter denotes the arrival process, the second the service
process, and the third the number of servers. For example, an M/M/1 queue
has a Poisson arrival process (represented by the letter M), an exponential
service time distribution (also represented by the letter M), and one server
(indicated by the number 1).
• A/S/n notation: In this notation A represents the probability distribution of
the interarrival time, S represents the service time distribution, and n
represents the number of servers.
M/M/1, for example, denotes a queue with a Poisson arrival process, an exponential
service time distribution, and one server. M/M/c denotes a queue with Poisson Arrival
and Exponential service with c servers, implying that the service is provided by more
than one server while the service time remains exponential.
These notations are widely used in queueing theory and analysis because they allow
for a quick understanding of the queue’s characteristics and the selection of
Not for sell 151 Only for reading purpose
appropriate mathematical models to represent the queueing system and thus
evaluate its performance.
5.Queue Discipline
1. First-In, First-Out Queuing (FIFO)
Most routers use FIFO as their default queuing method. On the server, this
usually needs little to no setup. In FIFO, all packets are serviced in the order in
which they arrive at the router. New packets attempting to enter the router are
discarded when the memory becomes saturated (tail drop).
However, such a system is unsuitable for real-time applications, particularly in
congested areas. During periods of congestion, a real-time application such as
VoIP, which constantly sends packets, may get hungry and have all of its
packets lost.
2. Prioritization of Queuing (PQ)
In Priority Queuing, the router splits the memory into multiple queues based on
some measure of priority rather than using a single queue. After then, each
queue is dealt with in a FIFO manner, with each queue being cycled through one
by one. The queues are labeled as High, Medium, or Low, depending on their
priority. The packets in the high queue are always processed first.
3. Fair Weighted Queuing (WFQ)
WFQ (Weighted Fair Queuing) generates queues based on traffic flows and
distributes bandwidth to them depending on priority. The bandwidths for the
sub-queues are assigned dynamically. Assume there are three queues, each
with a bandwidth percentage of 20%, 30%, and 50%, while they are all active.
1.14 Introduction to network security
Network security is defined as the activity created to protect the integrity of network
and data. Every company or organization that handles a large amount of data, has a
degree of solutions against many cyber threats. Computers, servers, wireless
networks, and other associated devices make up a network. Many of these gadgets are
open to possible intruders. Utilizing a range of hardware and software tools on a
network or as software as a service is necessary for network security.
Not for sell 152 Only for reading purpose
Any action intended to safeguard the integrity and usefulness of the data and
network is known as network security. This is a broad, all-encompassing phrase that
covers software and hardware solutions, as well as procedures, guidelines, and
setups for network usage, accessibility, and general threat protection.
The most basic example of Network Security is password protection which the user
of the network chooses. In recent times, Network Security has become the central
topic of cyber security with many organizations inviting applications from people who
have skills in this area. The network security solutions protect various vulnerabilities
of the computer systems such as:
1. Users
2. Locations
3. Data
4. Devices
5. Applications
Advantages of Network Security
o Network security is essential for safeguarding client data and information,
maintaining the security of shared data, guaranteeing dependable network
performance, and defending against online attacks.
o An effective network security solution lowers overhead costs and protects
businesses from significant losses brought on by a data breach or other security
event.
o Ensuring appropriate access to systems, applications, and data facilitates
company operations and customer service.
Aspects of Network Security
Following are the desirable properties to achieve secure communication:
o Privacy: Privacy means both the sender and the receiver expects confidentiality.
The transmitted message should be sent only to the intended receiver while the
Not for sell 153 Only for reading purpose
message should be opaque for other users. Only the sender and receiver should
be able to understand the transmitted message as eavesdroppers can intercept
the message. Therefore, there is a requirement to encrypt the message so that
the message cannot be intercepted. This aspect of confidentiality is commonly
used to achieve secure communication.
o Message Integrity: Data integrity means that the data must arrive at the receiver
exactly as it was sent. There must be no changes in the data content during
transmission, either maliciously or accident, in a transit. As there are more and
more monetary exchanges over the internet, data integrity is more crucial. The
data integrity must be preserved for secure communication.
o End-point authentication: Authentication means that the receiver is sure of the
sender’s identity, i.e., no imposter has sent the message.
o Non-Repudiation: Non-Repudiation means that the receiver must be able to
prove that the received message has come from a specific sender. The sender
must not deny sending a message that he or she send. The burden of proving the
identity comes on the receiver. For example, if a customer sends a request to
transfer the money from one account to another account, then the bank must
have a proof that the customer has requested for the transaction.
Types of Network Security
There are several types of network security through which we can make our network
more secure, the network and data are shielded from breaches, invasions, and other
dangers by network security. Here below are some important types of network
security:
1. Email Security
The most common danger vector for a security compromise is email gateways.
Hackers create intricate phishing campaigns using recipients’ personal information
and social engineering techniques to trick them and direct them to malicious
websites. To stop critical data from being lost, an email security programme restricts
outgoing messages and stops incoming threats.
Basically, Email security refers to the steps where we protect the email messages
and the information that they contain from unauthorized access, and damage. It
involves ensuring the confidentiality, integrity, and availability of email messages, as
well as safeguarding against phishing attacks, spam, viruses, and another form of
malware. It can be achieved through a combination of technical and non-technical
measures.
Not for sell 154 Only for reading purpose
Steps to Secure Email:
We can take the following actions to protect our email.
• Choose a secure password that is at least 12 characters long, and contains
uppercase and lowercase letters, digits, and special characters.
• Activate the two-factor authentication, which adds an additional layer of
security to your email account by requiring a code in addition to your
password.
• Use encryption, it encrypts your email messages so that only the intended
receiver can decipher them. Email encryption can be done by using the
programs like PGP or S/MIME.
• Keep your software up to date. Ensure that the most recent security
updates are installed on your operating system and email client.
• Beware of phishing scams: Hackers try to steal your personal information
by pretending as someone else in phishing scams. Be careful of emails that
request private information or have suspicious links because these are the
resources of the phishing attack.
• Choose a trustworthy email service provider: Search for a service provider
that protects your data using encryption and other security measures.
• Use a VPN: Using a VPN can help protect our email by encrypting our
internet connection and disguising our IP address, making it more difficult
for hackers to intercept our emails.
• Upgrade Your Application Regularly: People now frequently access their
email accounts through apps, although these tools are not perfect and can
be taken advantage of by hackers. A cybercriminal might use a
vulnerability, for example, to hack accounts and steal data or send spam
mail. Because of this, it’s important to update your programs frequently.
Email Security Policies
The email policies are a set of regulations and standards for protecting the privacy,
accuracy, and accessibility of email communication within the organization. An email
security policy should include the following essential components:
• Appropriate Use: The policy should outline what comprises acceptable
email usage inside the organization, including who is permitted to use
email, how to use it, and for what purpose email we have to use.
• Password and Authentication: The policy should require strong
passwords and two-factor authentication to ensure that only authorized
users can access email accounts.
Not for sell 155 Only for reading purpose
• Encryption: To avoid unwanted access, the policy should mandate that
sensitive material be encrypted before being sent through email.
• Virus Protection: The policy shall outline the period and timing of email
messages and attachment collection.
• Retention and Detection: The policy should outline how long email
messages and their attachments ought to be kept available, as well as
when they should continue to be removed.
• Training: The policy should demand that all staff members take a course
on email best practices, which includes how to identify phishing scams and
other email-based threats.
• Incident Reporting: The policy should outline the reporting and
investigation procedures for occurrences involving email security breaches
or other problems.
• Monitoring: The policy should outline the procedures for monitoring email
communications to ensure that it is being followed, including any logging
or auditing that will be carried out.
• Compliance: The policy should ensure compliance with all essential laws
and regulations, including the health
• Insurance rules, including the health portability and accountability act and
the General Data Protection Regulation (GDPR)(HIPPA).
• Enforcement: The policy should specify the consequences for violating the
email security policy, including disciplinary action and legal consequences if
necessary.
Hence, organizations may help safeguard sensitive information and lower the risk of
data breaches and other security incidents by creating an email security strategy .
2. Firewalls
The trusted internal network and untrusted external networks, like the Internet, are
separated by firewalls. They control traffic by enforcing a set of predetermined rules.
A firewall may consist of software, hardware, or both.
A firewall is a network security device, either hardware or software-based, which
monitors all incoming and outgoing traffic and based on a defined set of security rules
accepts, rejects, or drops that specific traffic.
• Accept: allow the traffic
• Reject: block the traffic but reply with an “unreachable error”
• Drop: block the traffic with no reply
Not for sell 156 Only for reading purpose
A firewall is a type of network security device that filters incoming and outgoing
network traffic with security policies that have previously been set up inside an
organization. A firewall is essentially the wall that separates a private internal network
from the open Internet at its very basic level.
Firewall match the network traffic against the rule set defined in its table. Once the
rule is matched, associate action is applied to the network traffic. For example, Rules
are defined as any employee from Human Resources department cannot access the
data from code server and at the same time another rule is defined like system
administrator can access the data from both Human Resource and technical
department. Rules can be defined on the firewall based on the necessity and security
policies of the organization. From the perspective of a server, network traffic can be
either outgoing or incoming.
firewall maintains a distinct set of rules for both the cases. Mostly the outgoing
traffic, originated from the server itself, allowed to pass. Still, setting a rule on
outgoing traffic is always better in order to achieve more security and prevent
unwanted communication. Incoming traffic is treated differently. Most traffic which
reaches on the firewall is one of these three major Transport Layer protocols- TCP,
UDP or ICMP. All these types have a source address and destination address. Also,
TCP and UDP have port numbers. ICMP uses type code instead of port number which
identifies purpose of that packet.
Functions of Firewall
• Every piece of data that enters or leaves a computer network must go via the firewall.
• If the data packets are safely routed via the firewall, all of the important data remains intact.
• A firewall logs each data packet that passes through it, enabling the user to keep track of all
network activities.
• Since the data is stored safely inside the data packets, it cannot be altered.
• Every attempt for access to our operating system is examined by our firewall, which also blocks
traffic from unidentified or undesired sources.
Not for sell 157 Only for reading purpose
Types of Firewalls
Firewalls can be categorized based on their generation.
I. Packet Filtering Firewall
Packet filtering firewall is used to control network access by monitoring
outgoing and incoming packets and allowing them to pass or stop
based on source and destination IP address, protocols, and ports. It
analyses traffic at the transport protocol layer (but mainly uses first 3
layers). Packet firewalls treat each packet in isolation. They have no
ability to tell whether a packet is part of an existing stream of traffic.
Only It can allow or deny the packets based on unique packet headers.
Packet filtering firewall maintains a filtering table that decides whether
the packet will be forwarded or discarded. From the given filtering
table, the packets will be filtered according to the following rules:
• Incoming packets from network 192.168.21.0 are blocked.
• Incoming packets destined for the internal TELNET server (port 23) are blocked.
• Incoming packets destined for host 192.168.21.3 are blocked.
• All well-known services to the network 192.168.21.0 are allowed.
II. Stateful Inspection Firewall
Stateful firewalls (performs Stateful Packet Inspection) are able to
determine the connection state of packet, unlike Packet filtering firewall,
which makes it more efficient. It keeps track of the state of networks
connection travelling across it, such as TCP streams. So the filtering
decisions would not only be based on defined rules, but also on packet’s
history in the state table.
III. Software Firewall
A software firewall is any firewall that is set up locally or on a cloud server.
When it comes to controlling the inflow and outflow of data packets and
limiting the number of networks that can be linked to a single device, they
Not for sell 158 Only for reading purpose
may be the most advantageous. But the problem with software firewall is
they are time-consuming.
IV. Hardware Firewall
They also go by the name “firewalls based on physical appliances.” It
guarantees that the malicious data is halted before it reaches the network
endpoint that is in danger.
V. Application Layer Firewall
Application layer firewall can inspect and filter the packets on any OSI
layer, up to the application layer. It has the ability to block specific content,
also recognize when certain application and protocols (like HTTP, FTP) are
being misused. In other words, Application layer firewalls are hosts that
run proxy servers. A proxy firewall prevents the direct connection between
either side of the firewall, each packet has to pass through the proxy.
VI. Next Generation Firewalls (NGFW)
NGFW consists of Deep Packet Inspection, Application Inspection,
SSL/SSH inspection and many functionalities to protect the network from
these modern threats.
VII. Proxy Service Firewall
This kind of firewall filters communications at the application layer, and
protects the network. A proxy firewall acts as a gateway between two
networks for a particular application.
VIII. Circuit Level Gateway Firewall
This works as the Sessions layer of the OSI Model’s. This allows for the
simultaneous setup of two Transmission Control Protocol (TCP)
connections. It can effortlessly allow data packets to flow without using
quite a lot of computing power. These firewalls are ineffective because
they do not inspect data packets; if malware is found in a data packet, they
will permit it to pass provided that TCP connections are established
properly.
3. Network Segmentation
Network traffic is divided into several categories by software-defined segmentation,
which also facilitates the enforcement of security regulations. Ideally, endpoint
identity—rather than just IP addresses—is the basis for the classifications. To ensure
that the appropriate amount of access is granted to the appropriate individuals and
that suspicious devices are controlled and remediated, access permissions can be
assigned based on role, location, and other factors.
Not for sell 159 Only for reading purpose
In computer networking, segmentation is an important idea to improve security and
performance. In other words, Network segmentation is the idea of creating subnets
within a network or networks within a network. Sometimes, network segmentation is
also referred to as network isolation or network segregation
For example, an organization has different teams like sales and finance. Both teams
have their network, but they cannot access the files on one another’s networks. In
case the sales team wishes to access the files of the finance team it will have to pass
through a switch, router, and then a firewall. The diagram below is a clear
representation of the same .
The prime benefits of segmentation can therefore be summarised as:
• Useful for organizing networks
• Allows for more efficient use of bandwidth
• Enhances security and reduces the risk of cyber-attacks
• Improve Operational Performance
Types of Network Segmentation:
To segment a network two techniques can be used:
1. Physical Segmentation
2. Virtual Segmentation
To physically segment a network, one has to plug different groups of devices into
separate switches. On the other hand, virtual segmentation (also known as logical
segmentation) means using a Virtual Local Area Network (VLAN). VLAN devices
must connect to the same layer-2 device, often the same switch, but are on separate
lands because they are separated virtually. Using a VLAN for network segmentation
is a popular segmentation technique as it is easier to implement.
Not for sell 160 Only for reading purpose
Network segmentation can also depend on the types of devices involved in the
network. Depending on the business requirements, organizations can also use a
combination of more than one segmentation technique .
4. Access Control
The network should not be accessible to every user. It needs to identify every user
and every device in order to keep out any attackers. It can then put the security
policies into effect. Noncompliant endpoint devices might either have their access
restricted or blocked. Network access control (NAC) is this process.
Access control involves determining a user based on their credentials and then
providing the appropriate level of access once confirmed. Credentials are used to
identify and authenticate a user include passwords, pins, security tokens, and even
biometric scans. Multifactor authentication (MFA) increases security by requiring
users to be validated using more than one method. Once a user’s identity has been
verified, access control policies grant specified permissions, allowing the user to
proceed further. Organizations utilize several access control methods depending on
their needs.
Authentication Factors
• Password or PIN
• Bio-metric measurement (fingerprint & retina scan)
• Card or Key
For computer security, access control includes the authorization, authentication, and
audit of the entity trying to gain access. Access control models have a subject and an
object.
Components of Access Control
• Authentication: Authentication is the process of verifying the identity of a
user. User authentication is the process of verifying the identity of a user
when that user logs in to a computer system.
• Authorization: Authorization determines the extent of access to the
network and what type of services and resources are accessible by the
authenticated user. Authorization is the method of enforcing policies.
• Access: After the successful authentication and authorization, their identity
becomes verified, this allows them to access the resource to which they are
attempting to log in.
• Manage: Organizations can manage their access control system by adding
and removing authentication and authorization for users and systems.
Managing these systems can be difficult in modern IT setups that combine
cloud services and physical systems.
Not for sell 161 Only for reading purpose
• Audit: The access control audit method enables organizations to follow the
principle. This allows them to collect data about user activities and analyze
it to identify possible access violations.
5. Sandboxing
Sandboxing is a cybersecurity technique in which files are opened or code is
performed on a host computer that simulates end-user operating environments in a
secure, isolated environment. To keep threats off the network, sandboxing watches
the code or files as they are opened and searches for harmful activity. sandboxing
mechanisms leverage various techniques:
• Restricted processes: Each browser tab or process runs separately,
restricting code execution and resource access to that specific process.
• Limited permissions: Within the sandbox, websites or scripts operate with
significantly reduced rights, preventing them from modifying vital system
files or accessing sensitive data.
• Memory constraints: The sandbox has a designated memory limit,
protecting against runaway malicious code attempting to hog system
resources.
Types of Browser Sandboxing
• Local Sandboxing: Most modern browsers, such as Chrome, Firefox, and
Edge, have this built in. Sandboxing mechanisms operate within your own
computer’s operating system.
• Remote Sandboxing: Used by organizations for higher-risk activities, these
isolate the browser’s processes on a remote server. This adds an extra
layer of security in very sensitive environments.
6. Cloud Network Security
cloud security includes various types of security like access control for authorized
access, network segmentation for maintaining isolated data, encryption for encoded
data transfer, vulnerability check for patching vulnerable areas, security monitoring
for keeping eye on various security attacks and disaster recovery for backup and
recovery during data loss.
There are different types of security techniques which are implemented to make the
cloud computing system more secure such as SSL (Secure Socket Layer) Encryption,
Multi Tenancy based Access Control, Intrusion Detection System, firewalls,
penetration testing, tokenization, VPN (Virtual Private Networks), and avoiding public
internet connections and many more techniques.
Not for sell 162 Only for reading purpose
As security is a major concern in cloud implementation, so an organization have to
plan for security based on some factors like below represents the three main factors
on which planning of cloud security depends.
• Resources that can be moved to the cloud and test its sensitivity risk are
picked.
• The type of cloud is to be considered.
• The risk in the deployment of the cloud depends on the types of cloud and
service models.
Types of Cloud Computing Security Controls:
There are 4 types of cloud computing security controls i.e.
1. Deterrent Controls: Deterrent controls are designed to block nefarious
attacks on a cloud system. These come in handy when there are insider
attackers.
2. Preventive Controls: Preventive controls make the system resilient to
attacks by eliminating vulnerabilities in it.
3. Detective Controls: It identifies and reacts to security threats and control.
Some examples of detective control software are Intrusion detection
software and network security monitoring tools.
4. Corrective Controls: In the event of a security attack these controls are
activated. They limit the damage caused by the attack.
7. Web security
Web Security is very important nowadays. Websites are always prone to security
threats/risks. Web Security deals with the security of data over the internet/network
or web or while it is being transferred to the internet. For e.g. when you are
transferring data between client and server and you have to protect that data that
security of data is your web security.
Hacking a Website may result in the theft of Important Customer Data, it may be the
credit card information or the login details of a customer or it can be the destruction
of one’s business and propagation of illegal content to the users while somebody
hacks your website they can either steal the important information of the customers
or they can even propagate the illegal content to your users through your website so,
therefore, security considerations are needed in the context of web security.
A Threat is nothing but a possible event that can damage and harm an information
system. Security Threat is defined as a risk that which, can potentially harm
Computer systems & organizations. Whenever an Individual or an Organization
creates a website, they are vulnerable to security attacks .
Not for sell 163 Only for reading purpose
Security attacks are mainly aimed at stealing altering or destroying a piece of personal
and confidential information, stealing the hard drive space, and illegally accessing
passwords. So whenever the website you created is vulnerable to security attacks then
the attacks are going to steal your data alter your data destroy your personal
information see your confidential information and also it accessing your password.
Types of Web Security Threats:
Web security threats are constantly emerging and evolving, but many threats
consistently appear at the top of the list of web security threats. These include:
Threat types Description
Cross-site scripting It is a term used to describe a class of attacks that allow an attacker
(XSS) to inject client-side scripts into other users’ browsers through a
website.
Code Injection Code injection is the malicious injection or introduction of code into
an application. Example: When a developer uses the PHP eval ()
function and passes it untrusted data that an attacker can modify,
code injection could be possible.
SQL Injection SQL Injection is an attempt to manipulate your data or your
database by inserting a rough code into your query.
Phishing Phishing is one type of cyber-attack. It is an unethical way to dupe
the user or victim to click on harmful sites.
Ransomware Ransomware is a type of malware that is designed to block user
access from own system until a ransom fee is paid to ransomware
creator.
Viruses and worms A Virus is a malicious executable code attached to another
executable file. The virus spreads when an infected file is passed
from system to system. Worms replicate themselves on the
system, attaching themselves to different files and looking for
pathways between computers, such as computer network that
shares common file storage.
Spyware Spyware is some sort of malicious software that is usually installed
in your computer or mobile device, even without your consent, to
damage your system or steal sensitive data.
Denial of Service Denial of service is typically accomplished by flooding the targeted
machine or resource with surplus requests in an attempt to
overload systems and prevent some or all legitimate requests from
being fulfilled. For example, if a bank website can handle 10 people
a second by clicking the Login button, an attacker only has to send
10 fake requests per second to make it so no legitimate users can
log in.
Not for sell 164 Only for reading purpose
Chapter 2
2.1 Structure and functions of network protocols
A network protocol is a set of rules that govern data communication between
different devices in the network. It determines what is being communicated, how it is
being communicated, and when it is being communicated. It permits connected
devices to communicate with each other, irrespective of internal and structural
differences.
How do Network Protocols Work?
It is essential to understand how devices communicate over a network by recognizing
network protocols. The Open Systems Interconnection (OSI), the most widely used
model, illustrates how computer systems interact with one another over a network.
The communication mechanism between two network devices is shown by seven
different layers in the OSI model. Every layer in the OSI model works based on
different network protocols. At every layer, one or more protocols are there for
network communication. To enable network-to-network connections, the Internet
Protocol (IP), for instance, routes data by controlling information like the source and
destination addresses of data packets. It is known as a network layer protocol.
Types of Network Protocols
In most cases, communication across a network like the Internet uses the OSI model.
The OSI model has a total of seven layers. Secured connections, network management,
and network communication are the three main tasks that the network
protocol performs. The purpose of protocols is to link different devices.
The protocols can be broadly classified into three major categories:
1. Network Communication
2. Network Management
3. Network Security
1. Network Communication
Communication protocols are really important for the functioning of a network. They
are so crucial that it is not possible to have computer networks without them. These
protocols formally set out the rules and formats through which data is transferred.
These protocols handle syntax, semantics, error detection, synchronization, and
authentication. Below mentioned are some network communication protocols:
Hypertext Transfer Protocol (HTTP) Mentioned in detailed on page no. 66
Not for sell 165 Only for reading purpose
It is a layer 7 protocol that is designed for transferring a hypertext between two or
more systems. HTTP works on a client-server model, most of the data sharing over the
web is done through using HTTP.
Transmission Control Protocol (TCP) )Mentioned in detailed on page no. 64
TCP layouts a reliable stream delivery by using sequenced acknowledgment. It is
a connection-oriented protocol i.e., it establishes a connection between applications
before sending any data. It is used for communicating over a network. It has many
applications such as emails, FTP, streaming media, etc.
User Datagram Protocol (UDP) ) Mentioned in detailed on page no. 63
It is a connectionless protocol that lay-out a basic but unreliable message service. It
adds no flow control, reliability, or error-recovery functions. UPD is functional in cases
where reliability is not required. It is used when we want faster transmission,
for multicasting and broadcasting connections, etc.
Border Gateway Protocol (BGP)
BGP is a routing protocol that controls how packets pass through the router in an
independent system one or more networks run by a single organization and connect to
different networks. It connects the endpoints of a LAN with other LANs and it also
connects endpoints in different LANs to one another.
Address Resolution Protocol (ARP) ) Mentioned in detailed on page no. 59
ARP is a protocol that helps in mapping logical addresses to the physical addresses
acknowledged in a local network. For mapping and maintaining a correlation between
these logical and physical addresses a table known as ARP cache is used.
Internet Protocol (IP) Mentioned in detailed on page no. 45
It is a protocol through which data is sent from one host to another over the internet. It
is used for addressing and routing data packets so that they can reach their
destination.
Dynamic Host Configuration Protocol (DHCP)
it’s a protocol for network management and it’s used for the method of automating the
process of configuring devices on IP networks. A DHCP server automatically assigns
an IP address and various other configurational changes to devices on a network so
they can communicate with other IP networks. it also allows devices to use various
services such as NTP, DNS, or any other protocol based on TCP or UDP.
2. Network Management
These protocols assist in describing the procedures and policies that are used in
monitoring, maintaining, and managing the computer network. These protocols also
help in communicating these requirements across the network to ensure stable
Not for sell 166 Only for reading purpose
communication. Network management protocols can also be used
for troubleshooting connections between a host and a client.
Internet Control Message Protocol (ICMP) Mentioned in detailed on page no. 61
It is a layer 3 protocol that is used by network devices to forward operational
information and error messages. ICMP is used for reporting congestions, network
errors, diagnostic purposes, and timeouts.
Simple Network Management Protocol (SNMP) Mentioned in detailed on page no.
69
It is a layer 7 protocol that is used for managing nodes on an IP network. There are
three main components in the SNMP protocol i.e., SNMP agent, SNMP manager, and
managed device. SNMP agent has the local knowledge of management details, it
translates those details into a form that is compatible with the SNMP manager. The
manager presents data acquired from SNMP agents, thus helping in monitoring
network glitches, and network performance, and troubleshooting them.
Gopher
It is a type of file retrieval protocol that provides downloadable files with some
description for easy management, retrieving, and searching of files. All the files are
arranged on a remote computer in a stratified manner. Gopher is an old protocol and it
is not much used nowadays.
File Transfer Protocol(FTP) Mentioned in detailed on page no. 82
FTP is a Client/server protocol that is used for moving files to or from a host computer,
it allows users to download files, programs, web pages, and other things that are
available on other services.
Post Office Protocol(POP3)
It is a protocol that a local mail client uses to get email messages from a remote email
server over a TCP/IP connection. Email servers hosted by ISPs also use
the POP3 protocol to hold and receive emails intended for their users. Eventually,
these users will use email client software to look at their mailbox on the remote server
and to download their emails. After the email client downloads the emails, they are
generally deleted from the servers.
Telnet Mentioned in detailed on page no. 79
It is a protocol that allows the user to connect to a remote computer program and to
use it i.e., it is designed for remote connectivity. Telnet creates a connection between a
host machine and a remote endpoint to enable a remote session.
3. Network Security Mentioned in detailed on page no. 152
These protocols secure the data in passage over a network. These protocols also
determine how the network secures data from any unauthorized attempts to extract or
review data. These protocols make sure that no unauthorized devices, users, or
Not for sell 167 Only for reading purpose
services can access the network data. Primarily, these protocols depend on encryption
to secure data.
Secure Socket Layer(SSL)
It is a network security protocol mainly used for protecting sensitive data and securing
internet connections. SSL allows both server-to-server and client-to-server
communication. All the data transferred through SSL is encrypted thus stopping any
unauthorized person from accessing it.
Hypertext Transfer Protocol (HTTPS) Mentioned in detailed on page no. 66
It is the secured version of HTTP. this protocol ensures secure communication between
two computers where one sends the request through the browser and the other
fetches the data from the web server.
Transport Layer Security (TLS)
It is a security protocol designed for data security and privacy over the internet, its
functionality is encryption, checking the integrity of data i.e., whether it has been
tampered with or not, and authentication. It is generally used for encrypted
communication between servers and web apps, like a web browser loading a website,
it can also be used for encryption of messages, emails, and VoIP.
2.2 Data link control procedures
Data Link Controls
Data Link Control is the service provided by the Data Link Layer to provide reliable
data transfer over the physical medium. For example, In the half-duplex transmission
mode, one device can only transmit the data at a time. If both the devices at the end of
the links transmit the data simultaneously, they will collide and leads to the loss of the
information. The Data link layer provides the coordination among the devices so that
no collision occurs.
The Data link layer provides three functions:
o Line discipline
o Flow Control
o Error Control
Not for sell 168 Only for reading purpose
Line Discipline
o Line Discipline is a functionality of the Data link layer that provides the
coordination among the link systems. It determines which device can send, and
when it can send the data.
Line Discipline can be achieved in two ways:
o ENQ/ACK
o Poll/select
END/ACK
END/ACK stands for Enquiry/Acknowledgement is used when there is no wrong
receiver available on the link and having a dedicated path between the two devices so
that the device capable of receiving the transmission is the intended one.
END/ACK coordinates which device will start the transmission and whether the
recipient is ready or not.
Working of END/ACK
The transmitter transmits the frame called an Enquiry (ENQ) asking whether the
receiver is available to receive the data or not.
The receiver responses either with the positive acknowledgement(ACK) or with the
negative acknowledgement(NACK) where positive acknowledgement means that the
receiver is ready to receive the transmission and negative acknowledgement means
that the receiver is unable to accept the transmission.
Following are the responses of the receiver:
Not for sell 169 Only for reading purpose
o If the response to the ENQ is positive, the sender will transmit its data, and once
all of its data has been transmitted, the device finishes its transmission with an
EOT (END-of-Transmission) frame.
o If the response to the ENQ is negative, then the sender disconnects and restarts
the transmission at another time.
o If the response is neither negative nor positive, the sender assumes that the
ENQ frame was lost during the transmission and makes three attempts to
establish a link before giving up.
Poll/Select
The Poll/Select method of line discipline works with those topologies where one
device is designated as a primary station, and other devices are secondary stations.
Working of Poll/Select
o In this, the primary device and multiple secondary devices consist of a single
transmission line, and all the exchanges are made through the primary device
even though the destination is a secondary device.
o The primary device has control over the communication link, and the secondary
device follows the instructions of the primary device.
Not for sell 170 Only for reading purpose
o The primary device determines which device is allowed to use the
communication channel. Therefore, we can say that it is an initiator of the
session.
o If the primary device wants to receive the data from the secondary device, it
asks the secondary device that they anything to send, this process is known as
polling.
o If the primary device wants to send some data to the secondary device, then it
tells the target secondary to get ready to receive the data, this process is known
as selecting.
Select
o The select mode is used when the primary device has something to send.
o When the primary device wants to send some data, then it alerts the secondary
device for the upcoming transmission by transmitting a Select (SEL) frame, one
field of the frame includes the address of the intended secondary device.
o When the secondary device receives the SEL frame, it sends an
acknowledgement that indicates the secondary ready status.
o If the secondary device is ready to accept the data, then the primary device
sends two or more data frames to the intended secondary device. Once the data
has been transmitted, the secondary sends an acknowledgement specifies that
the data has been received.
Not for sell 171 Only for reading purpose
Poll
o The Poll mode is used when the primary device wants to receive some data
from the secondary device.
o When a primary device wants to receive the data, then it asks each device
whether it has anything to send.
o Firstly, the primary asks (poll) the first secondary device, if it responds with the
NACK (Negative Acknowledgement) means that it has nothing to send. Now, it
approaches the second secondary device, it responds with the ACK means that
it has the data to send. The secondary device can send more than one frame one
after another or sometimes it may be required to send ACK before sending each
one, depending on the type of the protocol being used.
Flow Control
o It is a set of procedures that tells the sender how much data it can transmit
before the data overwhelms the receiver.
o The receiving device has limited speed and limited memory to store the data.
Therefore, the receiving device must be able to inform the sending device to
stop the transmission temporarily before the limits are reached.
Not for sell 172 Only for reading purpose
o It requires a buffer, a block of memory for storing the information until they are
processed.
Two methods have been developed to control the flow of data:
o Stop-and-wait
o Sliding window
Stop-and-wait
o In the Stop-and-wait method, the sender waits for an acknowledgement after
every frame it sends.
o When acknowledgement is received, then only next frame is sent. The process
of alternately sending and waiting of a frame continues until the sender
transmits the EOT (End of transmission) frame.
Advantage of Stop-and-wait
The Stop-and-wait method is simple as each frame is checked and acknowledged
before the next frame is sent.
Disadvantage of Stop-and-wait
Stop-and-wait technique is inefficient to use as each frame must travel across all the
way to the receiver, and an acknowledgement travels all the way before the next
frame is sent. Each frame sent and received uses the entire time needed to traverse the
link.
Sliding Window
o The Sliding Window is a method of flow control in which a sender can transmit
the several frames before getting an acknowledgement.
o In Sliding Window Control, multiple frames can be sent one after the another
due to which capacity of the communication channel can be utilized efficiently.
o A single ACK acknowledge multiple frames.
o Sliding Window refers to imaginary boxes at both the sender and receiver end.
o The window can hold the frames at either end, and it provides the upper limit on
the number of frames that can be transmitted before the acknowledgement.
o Frames can be acknowledged even when the window is not completely filled.
Not for sell 173 Only for reading purpose
o The window has a specific size in which they are numbered as modulo-n means
that they are numbered from 0 to n-1. For example, if n = 8, the frames are
numbered from 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
o The size of the window is represented as n-1. Therefore, maximum n-1 frames
can be sent before acknowledgement.
o When the receiver sends the ACK, it includes the number of the next frame that
it wants to receive. For example, to acknowledge the string of frames ending
with frame number 4, the receiver will send the ACK containing the number 5.
When the sender sees the ACK with the number 5, it got to know that the
frames from 0 through 4 have been received.
Sender Window
o At the beginning of a transmission, the sender window contains n-1 frames, and
when they are sent out, the left boundary moves inward shrinking the size of
the window. For example, if the size of the window is w if three frames are sent
out, then the number of frames left out in the sender window is w-3.
o Once the ACK has arrived, then the sender window expands to the number
which will be equal to the number of frames acknowledged by ACK.
o For example, the size of the window is 7, and if frames 0 through 4 have been
sent out and no acknowledgement has arrived, then the sender window
contains only two frames, i.e., 5 and 6. Now, if ACK has arrived with a number 4
which means that 0 through 3 frames have arrived undamaged and the sender
window is expanded to include the next four frames. Therefore, the sender
window contains six frames (5,6,7,0,1,2).
Receiver Window
o At the beginning of transmission, the receiver window does not contain n
frames, but it contains n-1 spaces for frames.
Not for sell 174 Only for reading purpose
o When the new frame arrives, the size of the window shrinks.
o The receiver window does not represent the number of frames received, but it
represents the number of frames that can be received before an ACK is sent. For
example, the size of the window is w, if three frames are received then the
number of spaces available in the window is (w-3).
o Once the acknowledgement is sent, the receiver window expands by the
number equal to the number of frames acknowledged.
o Suppose the size of the window is 7 means that the receiver window contains
seven spaces for seven frames. If the one frame is received, then the receiver
window shrinks and moving the boundary from 0 to 1. In this way, window
shrinks one by one, so window now contains the six spaces. If frames from 0
through 4 have sent, then the window contains two spaces before an
acknowledgement is sent.
Error Control
Error Control is a technique of error detection and retransmission.
Categories of Error Control:
Not for sell 175 Only for reading purpose
Stop-and-wait ARQ
Stop-and-wait ARQ is a technique used to retransmit the data in case of damaged or
lost frames.
This technique works on the principle that the sender will not transmit the next frame
until it receives the acknowledgement of the last transmitted frame.
Four features are required for the retransmission:
o The sending device keeps a copy of the last transmitted frame until the
acknowledgement is received. Keeping the copy allows the sender to retransmit
the data if the frame is not received correctly.
o Both the data frames and the ACK frames are numbered alternately 0 and 1 so
that they can be identified individually. Suppose data 1 frame acknowledges the
data 0 frame means that the data 0 frame has been arrived correctly and
expects to receive data 1 frame.
o If an error occurs in the last transmitted frame, then the receiver sends the NAK
frame which is not numbered. On receiving the NAK frame, sender retransmits
the data.
o It works with the timer. If the acknowledgement is not received within the
allotted time, then the sender assumes that the frame is lost during the
transmission, so it will retransmit the frame.
Two possibilities of the retransmission:
o Damaged Frame: When the receiver receives a damaged frame, i.e., the frame
contains an error, then it returns the NAK frame. For example, when the data 0
frame is sent, and then the receiver sends the ACK 1 frame means that the data
0 has arrived correctly, and transmits the data 1 frame. The sender transmits the
next frame: data 1. It reaches undamaged, and the receiver returns ACK 0. The
sender transmits the next frame: data 0. The receiver reports an error and
returns the NAK frame. The sender retransmits the data 0 frame.
o Lost Frame: Sender is equipped with the timer and starts when the frame is
transmitted. Sometimes the frame has not arrived at the receiving end so that it
can be acknowledged neither positively nor negatively. The sender waits for
acknowledgement until the timer goes off. If the timer goes off, it retransmits
the last transmitted frame.
Not for sell 176 Only for reading purpose
Sliding Window ARQ
Sliding Window ARQ is a technique used for continuous transmission error control.
Three Features used for retransmission:
o In this case, the sender keeps the copies of all the transmitted frames until they
have been acknowledged. Suppose the frames from 0 through 4 have been
transmitted, and the last acknowledgement was for frame 2, the sender has to
keep the copies of frames 3 and 4 until they receive correctly.
o The receiver can send either NAK or ACK depending on the conditions. The NAK
frame tells the sender that the data have been received damaged. Since the
sliding window is a continuous transmission mechanism, both ACK and NAK
must be numbered for the identification of a frame. The ACK frame consists of a
number that represents the next frame which the receiver expects to receive.
The NAK frame consists of a number that represents the damaged frame.
o The sliding window ARQ is equipped with the timer to handle the lost
acknowledgements. Suppose then n-1 frames have been sent before receiving
any acknowledgement. The sender waits for the acknowledgement, so it starts
the timer and waits before sending any more. If the allotted time runs out, the
sender retransmits one or all the frames depending upon the protocol used.
Two protocols used in sliding window ARQ:
o Go-Back-n ARQ: In Go-Back-N ARQ protocol, if one frame is lost or damaged,
then it retransmits all the frames after which it does not receive the positive
ACK.
Three possibilities can occur for retransmission:
o Damaged Frame: When the frame is damaged, then the receiver sends a NAK
frame.
Not for sell 177 Only for reading purpose
In the above figure, three frames have been transmitted before an error discovered in
the third frame. In this case, ACK 2 has been returned telling that the frames 0,1 have
been received successfully without any error. The receiver discovers the error in data 2
frame, so it returns the NAK 2 frame. The frame 3 is also discarded as it is transmitted
after the damaged frame. Therefore, the sender retransmits the frames 2,3.
o Lost Data Frame: In Sliding window protocols, data frames are sent
sequentially. If any of the frames is lost, then the next frame arrive at the
receiver is out of sequence. The receiver checks the sequence number of each of
the frame, discovers the frame that has been skipped, and returns the NAK for
the missing frame. The sending device retransmits the frame indicated by NAK
as well as the frames transmitted after the lost frame.
o Lost Acknowledgement: The sender can send as many frames as the windows
allow before waiting for any acknowledgement. Once the limit of the window is
reached, the sender has no more frames to send; it must wait for the
acknowledgement. If the acknowledgement is lost, then the sender could wait
forever. To avoid such situation, the sender is equipped with the timer that
starts counting whenever the window capacity is reached. If the
acknowledgement has not been received within the time limit, then the sender
retransmits the frame since the last ACK.
Selective-Reject ARQ
o Selective-Reject ARQ technique is more efficient than Go-Back-n ARQ.
Not for sell 178 Only for reading purpose
o In this technique, only those frames are retransmitted for which negative
acknowledgement (NAK) has been received.
o The receiver storage buffer keeps all the damaged frames on hold until the
frame in error is correctly received.
o The receiver must have an appropriate logic for reinserting the frames in a
correct order.
o The sender must consist of a searching mechanism that selects only the
requested frame for retransmission.
2.3 High-level Data Link Control (HDLC)
High-level Data Link Control (HDLC) is a group of communication protocols of
the data link layer for transmitting data between network points or nodes. Since it is
a data link protocol, data is organized into frames. A frame is transmitted via the
network to the destination that verifies its successful arrival. It is a bit - oriented
protocol that is applicable for both point - to - point and multipoint communications.
Transfer Modes
HDLC supports two types of transfer modes, normal response mode and
asynchronous balanced mode.
• Normal Response Mode (NRM) − Here, two types of stations are there, a
primary station that send commands and secondary station that can respond to
Not for sell 179 Only for reading purpose
received commands. It is used for both point - to - point and multipoint
communications.
• Asynchronous Balanced Mode (ABM) − Here, the configuration is balanced, i.e.
each station can both send commands and respond to commands. It is used for
only point - to - point communications.
HDLC Frame
HDLC is a bit - oriented protocol where each frame contains up to six fields. The
structure varies according to the type of frame. The fields of a HDLC frame are −
• Flag − It is an 8-bit sequence that marks the beginning and the end of the
frame. The bit pattern of the flag is 01111110.
• Address − It contains the address of the receiver. If the frame is sent by the
primary station, it contains the address(es) of the secondary station(s). If it is
sent by the secondary station, it contains the address of the primary station. The
address field may be from 1 byte to several bytes.
• Control − It is 1- or 2-bytes containing flow and error control information.
Not for sell 180 Only for reading purpose
• Payload − This carries the data from the network layer. Its length may vary from
one network to another.
• FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The
standard code used is CRC (cyclic redundancy code)
Types of HDLC Frames
There are three types of HDLC frames. The type of frame is determined by the control
field of the frame −
• I-frame − I-frames or Information frames carry user data from the network layer.
They also include flow and error control information that is piggybacked on user
data. The first bit of control field of I-frame is 0.
• S-frame − S-frames or Supervisory frames do not contain information field.
They are used for flow and error control when piggybacking is not required. The
first two bits of control field of S-frame is 10.
• U-frame − U-frames or Un-numbered frames are used for myriad miscellaneous
functions, like link management. It may contain an information field, if required.
The first two bits of control field of U-frame is 11.
Not for sell 181 Only for reading purpose
2.4 Synchronous Data Link Control (SDLC)
Synchronous Data Link Control is a layer 2 protocol used in data communication to
manage and maintain error−free transmission between devices. SDLC provides
synchronization, error control, and flow control mechanisms necessary for efficient
data transfer.
There are two types of loops in SDLC − primary and secondary loops. The primary loop
consists of all the stations that take part in frame transmission, while the secondary
loop consists of stations that only receive frames.
The primary loop is responsible for initiating frame transmission and maintaining
control over the flow of data between stations. On the other hand, the secondary loop
listens to incoming frames, acknowledges receipt, and retransmits any lost or
damaged frames.
SDLC Operations
Primary Station Operations
The primary station in an SDLC loop is the controller of the communication protocol. It
is responsible for initiating and controlling all transmissions on the loop. In this section,
we will discuss the Initialization process for the primary station, Frame transmission
process from the primary station to secondary stations, and Acknowledgement process
for received frames from secondary stations.
Frame Transmission Process
The frame transmission process from the primary station to secondary stations follows
a specific sequence of events. The primary station builds a frame, including any
necessary control information such as addressing information and error correction
codes before transmitting it on the loop.
Acknowledgement Process
When a secondary station receives a frame from a primary station on an SDLC loop it
acknowledges receipt by sending back an acknowledgement message (ACK). The ACK
contains information about which frame was received successfully by using various
checksums and verification processes used by SDLC protocol.
Not for sell 182 Only for reading purpose
Secondary Station Operations
Initialization process for the secondary station
Once the primary station has completed its initialization process, the secondary
stations can begin their initialization process. The secondary stations constantly
monitor the loop to detect a polling sequence from the primary station.
When a polling sequence is detected, an identification (ID) code is sent by each
secondary station in response to the poll. The ID code is used by the primary station to
identify each individual secondary station on the loop.
Frame reception process from the primary station
Once a secondary station has received permission from the primary station to transmit
data onto the loop, it can then begin receiving frames that are transmitted by other
stations on that same loop. As frames are transmitted around a synchronous loop, they
pass through all of the other stations on that same loop including all of those
connected as either primary or secondary nodes.
Acknowledgement process for received frames
Each time a frame is successfully received by a given intermediate node or final
destination point, an acknowledgement must be sent back to indicate successful
receipt and processing of that frame. This acknowledgement is necessary so that any
errors or issues with transmission can be detected and rectified quickly before they
cause serious problems within larger systems.
The acknowledgement message includes information about which specific frame has
been acknowledged along with identifying information about both sender and receiver
nodes involved in this communication exchange.
On an SDLC data link, all of data and control transmission are simply organized and
managed in specific format that is basically known as transmission frame.
Transmission frame is also known as SDLC frame or just a frame.
Transmission frame simply carries or transfer control information and data of user
among transmitting or sending station and receiving station. It allows and gives
permission to receiving station:
Not for sell 183 Only for reading purpose
Frame Format:
Transmission frame of each of SDLC has specific frame format. Each frame is made
up of following fields:
Not for sell 184 Only for reading purpose
1. Flag Field –
Flag (F) is beginning frame that represents beginning of frame. This field is
used to initiate and terminate occurrence of error by regular checking.
2. Address Field –
Address (A) filed follows just after beginning flag. It is used to identifies
and determines secondary station that is transmitting frame. This is done
because frame contains information or data regarding group address,
specific address. Broadcast address, etc.
3. Control Field –
Control (C) field follows just after address field. It is used to specify
functions of particular frame.
This field can be present in three types of formats as given below:
• (i). Unnumbered (U) format:
It is required to perform various functions such as to establish
disconnect link, to report some procedural errors, to transfer or
transmit data especially when location or address of data in
frame sequence is not needed to be checked.
• (ii). Supervisory (S) format:
It is required to perform various functions such as to
acknowledge received frames, to convey ready or busy
conditions, report frame numbering errors, etc. This format does
not contain any information field.
• (iii). Information (I) format:
It is required to perform various functions such as to transfer data
or information, to control sequence in which frames are needed to
send and number of frames.
4. Information Field –
Information (I) field follows just after control field. This field is an optional
field that mainly contains information data. The data is needed to be
transmitted on data link is present in this field.
5. FCS Field –
Frame Check Sequence (FCS) field follows just after information field. This
field especially allows and grants permission to receiving stations to simply
ensure and check transmission accuracy of frame. This field simply checks
received frame for any kind of error that might have been occurred by link
connection.
6. Ending Flag Field –
This field indicates ending of frame.
Not for sell 185 Only for reading purpose
2.5 Binary Synchronous Communication (BISYNC)
Binary Synchronous Communication (BISYNC) is a communication protocol that uses
synchronous transmission to transfer data between devices. is basically a character or
byte-oriented form of communication which means that the groups of bits or bytes
are the important elements of transmission rather than a stream of bits. BISYNC was
established or originated by IBM in 1960’s. It generally includes characters and
procedures for simply controlling the establishment or development of a valid
connection and transmission of data. It is a half-duplex link protocol that has
replaced the Synchronous transmit-receive (STR) protocol usually used with second-
generation computers. It is also known as Basic Mode Protocol that is required for
transmission of bit-oriented data basically known as transparent mode. It is also
being replaced largely by much more efficient protocol of IBM i.e., Synchronous Data
Link Control (SDLC) that is usually under SAN (Systems Network Architecture). BSC
or BISYNC also used to describe various types of data packets as given below:
• ENQ (Enquiry)
• ACK (Acknowledge)
• NAK (Negative Acknowledge)
• EOT (End of Transmission)
Types of Frames: There are basically two types of BSC or BISYNC frames as shown
below: 1. Control Frame: These frames are basically required for exchange of
information or data among devices to develop or obtain initial connection, provide
flow and error control, and also disconnect the devices when the session is
completely over. This frame does not contain
any header.
2. Data Frame: These frames are basically required to carry user data. It is also used
to show the direction of data transfer. BISYNC allows for two types of block
messages i.e., Single-block and multiple-block message. The only difference in both
of these blocks is that data in single-block messages would be terminated with ETB
Not for sell 186 Only for reading purpose
(End of Transmission Block) character rather than an ETX (End of Text)
character. Single Block Data Frame :
Multiple Block Data Frame :
Control Characters for BISYNC : Some of the Standard Control Protocols that are
used in BISYNC frames are given below :
Character ASCII Code Function
ACK 0 DLE 0 Good even frame received or ready to receive
ACK 1 DLE 1 Good odd frame received
DLE DLE Data Transparency Marker
EOT EOT Sender Terminating
ETX ETX End of Text in message
ETB ETB End of Transmission block: ACK required
SOH SOH Header Information Begins
STX STX Text Begins
SYN SYN Alert receiver to the incoming frame
Not for sell 187 Only for reading purpose
Advantage and disadvantage of BISYNC
Advantage Disadvantage
1. Reliability: BISYNC is a reliable 1. Complexity: BISYNC is a relatively
protocol for data transfer because it complex protocol, which can make it
uses synchronous communication. difficult to implement and maintain.
This means that the sender and This complexity can also result in
receiver are synchronized, and data is longer processing times, which can
transferred in a continuous stream, impact performance.
reducing the possibility of errors. 2. Limited Speed: BISYNC was
2. Flexibility: BISYNC can be used with developed in the 1960s when data
different types of data transmission transfer speeds were much slower
lines, including leased lines and dial- than today. As a result, it is not ideal
up lines. This makes it a flexible for high-speed data transfer
protocol that can be used in various applications.
applications. 3. Lack of Compatibility: BISYNC is not
3. Error Detection: BISYNC includes compatible with other
error detection mechanisms that help communication protocols, which can
to identify and correct transmission limit its usefulness in some
errors. This is important in ensuring applications. This can result in the
the accuracy of data transfer. need for additional hardware and
4. Flow Control: BISYNC also includes software to support data transfer
flow control mechanisms that between different systems.
regulate the flow of data between 4. Cost: Implementing BISYNC can be
the sender and receiver. This ensures expensive due to the need for
that the receiver can process the data specialized hardware and software.
without getting overwhelmed by a This can make it less attractive for
flood of data. smaller organizations or those with
limited budgets.
2.6- X.25 and X.21 Protocols Elements of Polling
X.25 is generally a protocol that was developed by Telecommunication
Standardization Sector (ITU-T) of International Telecommunication Union. It usually
allows various logical channels to make use of same physical line. It basically defines
a series of documents particularly issued by ITU. These documents are also known as
X.25 Recommendations. X.25 also supports various conversations by multiplexing
packets and also with the help of virtual communication channels. X.25 basically
encompasses or suits to the lower three layers of the Open System Interconnection
(OSI) reference model for networking. These three protocol layers are :
Not for sell 188 Only for reading purpose
1. Physical Layer
2. Frame Layer
3. Packet Layer
These are explained as following below.
1. Physical Layer: This layer is basically concerned with electrical or
signaling. The physical layer interface of X.25 also known as X.21 bis was
basically derived from RS-232 interface for serial transmission. This layer
provides various communication lines that transmit or transfer some
electrical signals. X.21 implementer is usually required for linking.
2. Data Link Layer : Data link layer is also known as Frame Layer. This layer
is an implementation or development of ISO High-Level Data Link Layer
(HDLC) standard which is known as LAPB (Link Access Procedure
Balanced). It also provides a communication link and transmission that is
error-free among any two physically connected nodes or X.25 nodes. LAPB
also allows DTE (Data Terminal Equipment) or DCE (Data Circuit-
Terminating Equipment) simply to start or end a communication session or
start data transmission. This layer is one of the most important and
essential parts of X.25 Protocol. This layer also provides a mechanism for
checking in each hop during the transmission. This service also ensures a
bit-oriented, error-free, and also sequenced and ordered delivery of data
frames or packets. There are many protocols that can be used in frame-
level as given below :
• Link Access Procedure Balanced (LAPB) – It is specified by ITU-
T Recommendation X usually derived from HDLC. It is the most
commonly used protocol that allows establishing a logical
connection.
• Link Access Protocol (LAP) – This protocol is very rarely used.
This is usually used for framing and transferring data packets
across point-to-point links.
Not for sell 189 Only for reading purpose
• Link Access Procedure D-channel (LAPD) – It is used to convey
or transfer data over D-channel. It also enables and allows
transmission of data among DTEs through D channel especially
among a DTE and an ISDN node.
• Logical Link Control (LLC) – It is used to manage and ensure the
integrity of transmissions of data. It also allows transmission of
X.25 data packets or frames through a LAN (Local Area Network)
channel.
3. Packet Layer : Packet layer is also known as Network Layer protocol of
X.25. This layer generally governs the end-to-end communications among
various DTE devices. It also defines how to address and deliver X.25
packets among end nodes and switches on a network with the help of
PVCs (Permanent Virtual Circuits) or SVCs (Switched Virtual Circuits). This
layer also governs and manages set-up and teardown and also flow
control among DTE devices as well as various routing functions along with
multiplexing multiple logical or virtual connections. This layer also defines
and explains the format of data packets and also the procedures for control
and transmission of data frames. This layer is also responsible for
establishing a connection, transmitting data frames or packets, ending or
terminating a connection, error and flow control, transmitting data packets
over external virtual circuits.
CCITT X21 is a physical and electrical interface that uses two types of circuits:
balanced (X.27N.1 1) and unbalanced (X.26N.10). CCITT X.21 calls out the DA-15
(also known by DB-15) connector.
The physical interface between the DTE and the local PTT-supplied DCE is defined in
ITU-T recommendation X.21. The DCE provides a full-duplex, bit-serial, synchronous
transmission path between the DTE and the local PSE. It can operate at data rates
Not for sell 190 Only for reading purpose
from 600bps to 64Kbps. A second standard, X.21bis has been defined for use on
existing (analogue) networks. An X.21bis is a subset of EIA-232D/V.24 therefore
allowing existing user equipment to be readily interfaced using this standard. It should
perhaps be emphasized here that V24 defines the data terminal equipment interface to
the modem and is not concerned with the interface between the modem and the line
itself. The modems themselves therefore form part of the conceptual physical
connection. The V24 interface is thus independent of both modulation technique and
data throughput rate.
The X.21 interface protocol is concerned only with the set-up and clearing operations
between DTE and DCE associated with each call. The control of the ensuing data
transfer is the responsibility of the link layer.
X21 Overview
X.21 is a state-driven protocol running full duplex at 9600 bps to 64 Kbps with
subscriber networks. It is a circuit-switching protocol using Synchronous ASCII with
odd parity to connect and disconnect a subscriber to the public-switching network.
The data-transfer phase is transparent to the network. Any data can be transferred
through the network after Call Establishment is made successfully via the X.21
protocol. The call-control phases which are used were defined in the CCITT (now ITU)
1988 "Blue Book" Recommendations X.1 - X.32.
X.21 Protocol Operation
As stated previously, X.21 is a state protocol. Both the DTE and DCE can be in a Ready
or Not-Ready state.
The Ready state for the DTE is indicated by a continuous transmission of binary 1's on
the T lead. The Ready state for the DCE is continuous transmission of binary 1's on the
R lead. During this continuous transmission of Ready state, the control leads are OFF.
During the Not-Ready state, the DCE transmits binary 0's on the R lead with the I lead
in the OFF state.
The DTE Uncontrolled Not-Ready is indicated by transmission of binary 0's with the C
lead in the OFF state. The DTE Uncontrolled Not-Ready state signifies that the DTE is
unable to accept calls due to an abnormal condition.
Not for sell 191 Only for reading purpose
The DTE Controlled Not-Ready state sends a pattern of alternating 1's and 0's on the
T lead with the C lead OFF. This state indicates that the DTE is operational, but unable
to accept incoming calls.
The characters sent between the DTE and DCE during call-control phases are
International Alphabet 5 (IA5), defined by CCITT Recommendation V.3. At least two
Sync characters must precede all sequences of characters sent between the DTE and
DCE to establish 8-bit byte synchronization between the transmitter and the receiver.
If the Byte Timing (B) lead is used, these Sync characters must align with the B lead
timing signals.
2.7 ALOHA) Mentioned in detailed on page no. 88
2.8 Reservation ALOHA
In computing, DAMA refers to switching circuits in a manner designed to meet
infrequent or periodic system and/or user demand requirements.
DAMA, which was developed by the United States government, is not a new
technology. In 1968, it was used along with KRUG, a similar satellite communication
system developed by the Russians some features of ALOHA are
❖ Channel efficiency only 18% for Aloha, 36% for Slotted Aloha (assuming
Poisson distribution for packet arrival and packet length)
❖ Reservation can increase efficiency to 80%
a sender reserves a future time-slot
1.
2. sending within this reserved time-slot is possible without collision
3. reservation also causes higher delays
4. typical scheme for satellite links
❖ Examples for reservation algorithms:
1. Explicit Reservation according to Roberts (Reservation ALOHA)
2. Implicit Reservation (PRMA)
3. Reservation-TDMA
Reservation ALOHA
Explicit Reservation (Reservation Aloha):
• two modes:
Not for sell 192 Only for reading purpose
1. ALOHA mode for reservation: competition for small reservation slots,
collisions possible
2. reserved mode for data transmission within successful reserved slots
(no collisions possible).
• During a contention phase following the slotted Aloha scheme, all stations can try to
reserve future slots.
• It is important for all stations to keep the reservation list consistent at any point in
time and, therefore, all stations have to synchronize from time to time
The chief difference between Slotted ALOHA and Reservation ALOHA is that with
Slotted ALOHA, any slot is available for utilization without regards to prior usage.
Under Reservation ALOHA's contention-based reservation schema,
the slot is temporarily considered "owned “by the station that successfully used it.
Also with Reservation ALOHA, once the station has completed its transmission,
it simply stops sending data. As a rule, idle slots are considered available to
all stations that may then implicitly reserve (utilize) the slot on a contention basis.
Implicit reservation (PRMA - Packet Reservation MA):
❖ a certain number of slots form a frame, frames are repeated
❖ stations compete for empty slots according to the slotted aloha principle
❖ once a station reserves a slot successfully, this slot is automatically assigned to
this station in all following frames as long as the station has data to send
❖ competition for this slots starts again as soon as the slot was empty in the last
frame
2.9 CSMA and token ring.) Mentioned in detailed on page no. 96
2.10 Characteristic features of LANs.) Mentioned in detailed on page no. 06
Not for sell 193 Only for reading purpose
Chapter 3
3.1Basics of Internet:
Internet is a global network that connects billions of computers across the world with
each other and to the World Wide Web. It uses standard internet protocol suite
(TCP/IP) to connect billions of computer users worldwide. It is set up by using cables
such as optical fibres and other wireless and networking technologies. At present,
internet is the fastest mean of sending or exchanging information and data between
computers across the world. It is believed that the internet was developed by "Defense
Advanced Projects Agency" (DARPA) department of the United States. And, it was
first connected in 1969.
The forerunner of the Internet, the ARPANet, went live for the first time in 1969. The
TCP/IP, open networking protocol suite, was adopted by the ARPANet in 1983, and
the National Science Foundation Network (NSFN) developed the network to link
university computer science departments across the US in 1985.
When the hypertext transfer protocol (HTTP) was developed in 1989, it enabled
different computer platforms to connect to the same Internet sites, which dramatically
improved communications over the network. The Mosaic Web browser was developed
in 1993.
Over the years of its existence, the Internet has remained a constant growth and
development. For instance, IPv6 was created to provide for a significant future rise in
the number of IP addresses that could be used. In a related development, the Internet
of Things (IoT) refers to the rapidly developing environment where nearly any entity or
device can be given a unique identifier (UID) and the capability to communicate data
automatically over the Internet.
Working of the internet: The internet is a global computer network that connects
various devices and sends a lot of information and media. It uses an Internet Protocol
(IP) and Transport Control Protocol (TCP)-based packet routing network. TCP and IP
work together to ensure that data transmission across the internet is consistent and
reliable, regardless of the device or location. Data is delivered across the internet in
the form of messages and packets. A message is a piece of data delivered over the
internet, but before it is sent, it is broken down into smaller pieces known as packets.
IP is a set of rules that control how data is transmitted from one computer to another
via the internet. The IP system receives further instructions on how the data should
Not for sell 194 Only for reading purpose
be transferred using a numerical address (IP Address). The TCP is used with IP to
ensure that data is transferred in a secure and reliable manner. This ensures that no
packets are lost, that packets are reassembled in the correct order, and that there is
no delay that degrades data quality.
Advantages of the Internet:
o Instant Messaging: You can send messages or communicate to anyone using
internet, such as email, voice chat, video conferencing, etc.
o Get directions: Using GPS technology, you can get directions to almost every
place in a city, country, etc. You can find restaurants, malls, or any other service
near your location.
o Online Shopping: It allows you to shop online such as you can be clothes,
shoes, book movie tickets, railway tickets, flight tickets, and more.
o Pay Bills: You can pay your bills online, such as electricity bills, gas bills, college
fees, etc.
o Online Banking: It allows you to use internet banking in which you can check
your balance, receive or transfer money, get a statement, request cheque-book,
etc.
o Online Selling: You can sell your products or services online. It helps you reach
more customers and thus increases your sales and profit.
Not for sell 195 Only for reading purpose
o Work from Home: In case you need to work from home, you can do it using a
system with internet access. Today, many companies allow their employees to
work from home.
o Entertainment: You can listen to online music, watch videos or movies, play
online games.
o Cloud computing: It enables you to connect your computers and internet-
enabled devices to cloud services such as cloud storage, cloud computing, etc.
o Career building: You can search for jobs online on different job portals and send
you CV through email if required.
Disadvantages of the Internet
o Time wastage: Although, Internet has a lot of advantages, it also contains some
limitations. Time wasting is one of among them. It can decrease your
productivity if you are spending too much time on the Internet using social
media apps while doing nothing. Rather than squandering time, one should use
that time to do something useful and even more productive.
o Bad impacts on health: You can get health related issues if you spend too much
time online; your body needs outside activities, exercise, and many other things.
If you look at the screen for a long time, it causes negative effects on the eyes.
o Cyber Crimes: These days, crimes including cyberbullying, spam, viruses,
hacking, and data theft are increasing day by day. Cybercriminals can quickly
break into your system, which store all of your private information.
o Effects on children: The constant watching of videos and playing games on the
Internet by young children is bad for their social and overall personality
development.
o Bullying and spreading negativity: Social media applications have provided a
free tool to all those people who regularly attempt to spread negativity with
really repulsive and humiliating comments and try to bully each other, which is
wrong and does bad impact on society.
Different ways to Connect to the Internet
The various methods for connecting to the Internet are briefly discussed below:
3.2 Dial-Up: Users must connect their phone line to a computer system in such
connections in order to access the Internet connection. The user is unable to make or
receive calls using the tier home phone service while connected. dial-up Internet
Not for sell 196 Only for reading purpose
access is a form of Internet access that uses the facilities of the public switched
telephone network (PSTN) to establish a connection to an Internet service
provider (ISP) by dialing a telephone number on a conventional telephone line. The
user's computer or router uses an attached modem to encode and decode information
into and from audio frequency signals, respectively. Despite the proliferation of high-
speed Internet access (broadband), dial-up Internet access may be used where other
forms are not available or the cost is too high, such as in some rural or remote areas.
Dial-up Internet has been around since the 1980s via public providers such as
NSFNET-linked universities and was first offered commercially in July 1992 by Sprint.
3.3 Digital Subscriber Lines (xDSL)
xDSL, a term that encompasses the broad range of digital subscriber line (DSL) service
options, has the potential to revolutionize the areas of Internet access and
telecommuting by offering a low-cost, high-speed data transport option for both
individuals and businesses.
The basic allure of xDSL is that it provides faster data services than today’s top-speed,
56-kbps analog modems—more than 100 times faster—using the local loop, the
existing outside-plant telephone cable network that runs right to your home or office.
The appeal is obvious: This technology enables telephone companies to offer
broadband service without major network rewiring and can be implemented quickly
and profitably, especially because it stands to benefit both the consumer (with faster
data rates) and the service providers (with new revenues from old cables). Here’s how
it works. Nearly all existing telephone lines can carry frequencies up to 1 MHz. But
analog telephone service only requires a maximum frequency of 3.3 KHz, leaving a
large amount of the bandwidth unused. xDSL makes use of this otherwise wasted
space by piggybacking high-speed data traffic onto the unused bandwidth.
By filtering the frequencies at each end of this wide-open range (4 KHz to 2.2 MHz)
and isolating them from the voice-bandwidth channel, the local telco can transport
both traditional telephone signals and high-speed xDSL signals over the same old
four-wire telephone line that already links your home or business to their central office
(CO). At least, that’s the promise of xDSL.
But reality has cast a shadow over the case for xDSL being made by telco providers,
competitive local exchange carriers (CLECs), and Internet service providers—all
Not for sell 197 Only for reading purpose
clamoring for a piece of what’s estimated to become a billion-dollar business over the
next several years.
Anecdotal reports from early cable modem users, who once enjoyed the lion’s share of
the service’s 10-Mbps coax pipeline, suggest data slowdowns are an increasing
problem as more people tap into the shared service, leaving smaller portions of the
overall pie for anyone to access.
Additionally, with a comparatively modest 65 million sites around the globe wired
with the hybrid fiber coax (HFC) cabling system necessary to support cable modem
service, xDSL arguably enjoys a strategic market advantage.
Digital Subscriber Line (DSL).
DSL is the root of all xDSL services. In fact, DSL is the root physical layer for ISDN BRI
service—two 64-kbps bearer (B) channels and one 16-kbps data (D) channel (2B+D)
all bundled together to provide a functional 128-kbps pipeline capable of supporting
simultaneous transmission of voice and data, fax, or video signals.
DSL service can support high-speed data transmission over a local loop ranging up to
18,000 feet from the CO. As with most xDSL services, data rates will increase near the
CO and taper off with distance. One other important thing to consider when discussing
xDSL is that top speeds and distances are almost always expressed as theoretical
maximums, assuming ideal line conditions.
Various factors such as excessive crosstalk, wire gauge, the physical condition of the
line, and hardware issues such as the presence of load coils or bridge taps on the loop
all may conspire to limit the effectiveness of, or even preclude the possibility of using,
xDSL services.
Not for sell 198 Only for reading purpose
3.4 Asymmetric DSL (ADSL)
More bandwidth is usually required for downstream transmissions, such as receiving
data from a host computer or downloading multimedia files. ADSL’s asymmetrical
nature provides bandwidth where it’s needed.
ADSL provides transmission speeds ranging from downstream/upstream rates of 9
Mbps/640 kbps over a relatively short distance to 1.544 Mbps/16 kbps as far away as
18,000 feet. The former speeds are more suited to a business, the latter more to the
computing needs of a residential customer.
The lopsided nature of ADSL is what makes it most likely to be used for high-speed
Internet access. And the various speed/distance options available within this range are
one more point in ADSL’s favour. Standardized by ANSI as T1.413, ADSL enables you
to lease and pay for only the bandwidth you need.
G.lite.
Also known as ADSL lite, this simplified xDSL offering was standardized as G.992.2 by
the ITU in June 1999.
Unlike some xDSL offerings, G.lite is the closest thing to plug-and-play DSL. Other
DSL services require a truck roll—an on-site visit from telco service personnel to
configure customer premises equipment (CPE), install a DSL modem and a splitter
(which keeps the voice and data channels separate), and even install an Ethernet card
in the customer’s computer.
In theory, at least, G.lite can eliminate the need for on-site installation by providing the
customer with everything to set up the system themselves—without a splitter.
Essentially consumer-grade DSL, G.lite is a direct response to the cable modem
challenge. Initially driven by the Universal ADSL Working Group (UAWG), a
consortium led by Microsoft®, Intel®, and Compaq® to standardize a mass-market
version of DSL that could be implemented quickly and affordably, G.lite offers
customers a variety of slower-speed DSL service levels to choose from to suit their
particular system requirements.
3.5 Cable Modems
Cable modem is a hardware device that is used to connect the computer with the
Internet Service Provider (ISP) through the local cable TV line. It has two interfaces –
Not for sell 199 Only for reading purpose
one to the cable TV network outlet and the other to a computer or television or set-top
box.
Configuration
Cable modems used to be proprietary in the initial days and had to be installed by the
cable company. Nowadays, cable modems of open standards are available that can be
personally installed by the user. The standard is called Data Over Cable Service
Interface Spectrum (DOSCIS). The modem to computer interface is normally Ethernet
or USB. The interface between the modem and the cable network outlet supports
FDM, TDM, and CDMA so that the bandwidth of the cable can be shared among the
subscribers.
Establishment of Connection
After a cable modem is plugged on to the cable TV network, it scans the downstream
channels for a particular packet that is periodically sent over the network. On detecting
it, the modem announces its presence over the network. If its authentication criteria are
met, then it is assigned for both upstream and downstream communication.
Channels for Communication
For downstream data, 6HMz or 8MHz channels are used which are modulated using
QAM-64. This gives the data rate of 36Mbps. For upstream data, there is more radio-
frequency noise. Consequently, the data rate is around 9Mbps.
o Broadband: Today's most popular high-speed internet connection, broadband is
offered either by cable or phone companies.
Not for sell 200 Only for reading purpose
o Wireless Connection: This category includes Mobile and Wi-Fi services
providers. No matter where you are, you can connect to the Internet anywhere
because connectivity is made possible by radio waves. Several instances of
wireless connections are provided below:
o Wi-fi: Without the use of cables, wi-fi or wireless fidelity, enables high-speed
internet connectivity.
o Mobile Phones: In modern times, all smartphones include an Internet
connectivity option that can be availed using Internet packs and coupons. These
don't require a wire or external connection as well.
o Satellite: Satellites are utilized for wireless Internet connectivity in areas Where
broadband connections is not available.
o Integrated Services Digital Network: With the help of using telephone lines,
ISDN enables users to send audio or video data.
3.6 IP address and domain) Mentioned in detailed on page no. 45
Wish you all
the best
Yazdan Khan
Not for sell 201 Only for reading purpose