0% found this document useful (0 votes)
16 views

Computer Networks

The document provides an introduction to computer networks, detailing their components, uses, and applications, including resource sharing and communication methods. It also explains the OSI reference model, which consists of seven layers, each with specific functions related to data transmission and network communication. Key components discussed include NICs, hubs, switches, routers, and modems, along with their roles in facilitating network connectivity and data exchange.

Uploaded by

Vinaya Rajput
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Computer Networks

The document provides an introduction to computer networks, detailing their components, uses, and applications, including resource sharing and communication methods. It also explains the OSI reference model, which consists of seven layers, each with specific functions related to data transmission and network communication. Key components discussed include NICs, hubs, switches, routers, and modems, along with their roles in facilitating network connectivity and data exchange.

Uploaded by

Vinaya Rajput
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 97

Unit-I: Introduc on to Computer Networks

Overview of computer networks and their applica ons


o Computer Network is a group of computers connected with each other through wires,
op cal fibres or op cal links so that various devices can interact with each other through a
network.

o The aim of the computer network is the sharing of resources among various devices.

o In the case of computer network technology, there are several types of networks that vary
from simple to complex level.

Components Of Computer Network:

Major components of a computer network are:

NIC(Na onal interface card)

NIC is a device that helps the computer to communicate with another device. The network interface
card contains the hardware addresses, the data-link layer protocol use this address to iden fy the
system on the network so that it transfers the data to the correct des na on.

There are two types of NIC: wireless NIC and wired NIC.

o Wireless NIC: All the modern laptops use the wireless NIC. In Wireless NIC, a connec on is
made using the antenna that employs the radio wave technology.

o Wired NIC: Cables use the wired NIC to transfer the data over the medium.

Hub

Hub is a central device that splits the network connec on into mul ple devices. When computer
requests for informa on from a computer, it sends the request to the Hub. Hub distributes this
request to all the interconnected computers.
Switches

Switch is a networking device that groups all the devices over the network to transfer the data to
another device. A switch is be er than Hub as it does not broadcast the message over the network,
i.e., it sends the message to the device for which it belongs to. Therefore, we can say that switch
sends the message directly from source to the des na on.

Backward Skip 10sPlay VideoForward Skip 10s

Cables and connectors

Cable is a transmission media that transmits the communica on signals. There are three types of
cables:

o Twisted pair cable: It is a high-speed cable that transmits the data over 1Gbps or more.

o Coaxial cable: Coaxial cable resembles like a TV installa on cable. Coaxial cable is more
expensive than twisted pair cable, but it provides the high data transmission speed.

o Fibre op c cable: Fibre op c cable is a high-speed cable that transmits the data using light
beams. It provides high data transmission speed as compared to other cables. It is more
expensive as compared to other cables, so it is installed at the government level.

Router

Router is a device that connects the LAN to the internet. The router is mainly used to connect the
dis nct networks or connect the internet to mul ple computers.

Modem

Modem connects the computer to the internet over the exis ng telephone line. A modem is not
integrated with the computer motherboard. A modem is a separate part on the PC slot found on the
motherboard.

Uses Of Computer Network

o Resource sharing: Resource sharing is the sharing of resources such as programs, printers,
and data among the users on the network without the requirement of the physical loca on
of the resource and user.

o Server-Client model: Computer networking is used in the server-client model. A server is a


central computer used to store the informa on and maintained by the system administrator.
Clients are the machines used to access the informa on stored in the server remotely.

o Communica on medium: Computer network behaves as a communica on medium among


the users. For example, a company contains more than one computer has an email system
which the employees use for daily communica on.
o E-commerce: Computer network is also important in businesses. We can do the business
over the internet. For example, amazon.com is doing their business over the internet, i.e.,
they are doing their business over the internet.

Applica ons of computer networks

Communication
 Email: Sending and receiving electronic messages across the globe.
 Instant messaging: Real-time text-based communication.
 Video conferencing: Holding virtual meetings with audio and video.
 Social media: Connecting and sharing information with people worldwide.
Resource Sharing
 File sharing: Accessing and distributing documents, images, and other files.
 Printer sharing: Multiple users printing to a single network printer.
 Software sharing: Running applications from a central server.
 Internet sharing: Multiple devices connecting to the internet through a single
connection.
Business Applications
 E-commerce: Online shopping, banking, and financial transactions.
 Supply chain management: Coordinating the flow of goods and services.
 Customer relationship management (CRM): Storing and managing
customer data.
 Collaboration: Team members working together on projects, regardless of
location.
Education
 Online learning: Accessing courses and educational materials remotely.
 Research: Sharing data and collaborating with researchers worldwide.
 Virtual classrooms: Interactive online learning environments.
Entertainment
 Online gaming: Playing games with people around the world.
 Streaming media: Watching movies and TV shows online.
 Music streaming: Listening to music on demand.
Other Applications
 Healthcare: Storing and accessing patient records, remote diagnosis.
 Transportation: Traffic management, vehicle tracking, and navigation
systems.
 Military: Secure communication and information sharing.
 Scientific research: Data analysis, simulations, and collaboration.

Layered network architecture and the OSI reference model

OSI Model
o OSI stands for Open System Interconnection is a reference model
that describes how information from a software application in
one computer moves through a physical medium to the software
application in another computer.
o OSI consists of seven layers, and each layer performs a particular
network function.
o OSI model was developed by the International Organization for
Standardization (ISO) in 1984, and it is now considered as an
architectural model for the inter-computer communications.
o OSI model divides the whole task into seven smaller and manageable
tasks. Each layer is assigned a particular task.
o Each layer is self-contained, so that task assigned to each layer can be
performed independently.

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.
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.

7 Layers of OSI Model


There are the seven OSI layers. Each layer has different functions. A list of seven
layers are given below:

1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
1) Physical layer

o The main functionality of the physical layer is to transmit the


individual bits from one node to another node.
o It is the lowest layer of the OSI model.
o It establishes, maintains and deactivates the physical connection.
o It specifies the mechanical, electrical and procedural network
interface specifications.

Functions of a Physical layer:


o Line Configuration: It defines the way how two or more devices can
be connected physically.
o Data Transmission: It defines the transmission mode whether it is
simplex, half-duplex or full-duplex mode between the two devices on
the network.
o Topology: It defines the way how network devices are arranged.
o Signals: It determines the type of the signal used for transmitting the
information.

2) Data-Link Layer
o This layer is responsible for the error-free transfer of data frames.
o It defines the format of the data on the network.
o It provides a reliable and efficient communication between two or
more devices.
o It is mainly responsible for the unique identification of each device
that resides on a local network.
o It contains two sub-layers:
o Logical Link Control Layer
o It is responsible for transferring the packets to the
Network layer of the receiver that is receiving.
o It identifies the address of the network layer protocol from
the header.
o It also provides flow control.
o Media Access Control Layer
o A Media access control layer is a link between the Logical
Link Control layer and the network's physical layer.
o It is used for transferring the packets over the network.

Functions of the Data-link layer


o Framing: The data link layer translates the physical's raw bit stream
into packets known as Frames. The Data link layer adds the header
and trailer to the frame. The header which is added to the frame
contains the hardware destination and source address.
o Physical Addressing: The Data link layer adds a header to the frame
that contains a destination address. The frame is transmitted to the
destination address mentioned in the header.
o Flow Control: Flow control is the main functionality of the Data-link
layer. It is the technique through which the constant data rate is
maintained on both the sides so that no data get corrupted. It ensures
that the transmitting station such as a server with higher processing
speed does not exceed the receiving station, with lower processing
speed.
o Error Control: Error control is achieved by adding a calculated value
CRC (Cyclic Redundancy Check) that is placed to the Data link layer's
trailer which is added to the message frame before it is sent to the
physical layer. If any error seems to occurr, then the receiver sends the
acknowledgment for the retransmission of the corrupted frames.
o Access Control: When two or more devices are connected to the
same communication channel, then the data link layer protocols are
used to determine which device has control over the link at a given
time.

3) Network Layer
o It is a layer 3 that manages device addressing, tracks the location of
devices on the network.
o It determines the best path to move data from source to the
destination based on the network conditions, the priority of service,
and other factors.
o The Data link layer is responsible for routing and forwarding the
packets.
o Routers are the layer 3 devices, they are specified in this layer and used
to provide the routing services within an internetwork.
o The protocols used to route the network traffic are known as Network
layer protocols. Examples of protocols are IP and Ipv6.

Functions of Network Layer:


o Internetworking: An internetworking is the main responsibility of the
network layer. It provides a logical connection between different
devices.
o 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.
o Routing: Routing is the major component of the network layer, and it
determines the best optimal path out of the multiple paths from
source to the destination.
o Packetizing: A Network Layer receives the packets from the upper
layer and converts them into packets. This process is known as
Packetizing. It is achieved by internet protocol (IP).

4) Transport Layer
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.
The two protocols used in this layer are:

o 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.
o 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.

Functions of Transport Layer:


o 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.
o 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.
o 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.
o Flow control: The transport layer also responsible for flow control but
it is performed end-to-end rather than across a single link.
o 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.

5) Session Layer

o It is a layer 3 in the OSI model.


o The Session layer is used to establish, maintain and synchronizes the
interaction between communicating devices.

Functions of Session layer:


o Dialog control: Session layer acts as a dialog controller that creates a
dialog between two processes or we can say that it allows the
communication between two processes which can be either half-
duplex or full-duplex.
o Synchronization: Session layer adds some checkpoints when
transmitting the data in a sequence. If some error occurs in the
middle of the transmission of data, then the transmission will take
place again from the checkpoint. This process is known as
Synchronization and recovery.

6) Presentation Layer

o A Presentation layer is mainly concerned with the syntax and


semantics of the information exchanged between the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from
one presentation format to another format.
o The Presentation layer is also known as the syntax layer.

Functions of Presentation layer:


o Translation: The processes in two systems exchange the information
in the form of character strings, numbers and so on. Different
computers use different encoding methods, the presentation layer
handles the interoperability between the different encoding
methods. It converts the data from sender-dependent format into a
common format and changes the common format into receiver-
dependent format at the receiving end.
o Encryption: Encryption is needed to maintain privacy. Encryption is a
process of converting the sender-transmitted information into
another form and sends the resulting message over the network.
o Compression: Data compression is a process of compressing the
data, i.e., it reduces the number of bits to be transmitted. Data
compression is very important in multimedia such as text, audio,
video.
7) Application Layer

o An application layer serves as a window for users and application


processes to access network service.
o It handles issues such as network transparency, resource allocation,
etc.
o An application layer is not an application, but it performs the
application layer functions.
o This layer provides the network services to the end-users.

Functions of Application layer:


o File transfer, access, and management (FTAM): An application layer
allows a user to access the files in a remote computer, to retrieve the
files from a computer and to manage the files in a remote computer.
o Mail services: An application layer provides the facility for email
forwarding and storage.
o Directory services: An application provides the distributed database
sources and is used to provide that global information about various
objects.
Network protocols and services

Network Protocols

Think of protocols as the "rules of the road" for network communication. They define
how data is formatted, transmitted, received, and interpreted. Without protocols,
devices wouldn't understand each other. Here are some key aspects of network
protocols:

 Syntax: The format of data, including the structure and order of bits and
bytes.
 Semantics: The meaning of each section of data and the control information.
 Timing: The timing of data transmission, including when data should be sent
and how fast.
Types of Network Protocols

Protocols can be categorized based on their function and the layer of the OSI model
they operate at. Here are a few important categories and examples:

 Application Layer Protocols: These protocols interact directly with


applications and provide services to users.
o HTTP (Hypertext Transfer Protocol): Used for web browsing.
o HTTPS (HTTP Secure): Secure version of HTTP, using encryption.
o SMTP (Simple Mail Transfer Protocol): Used for sending email.
o POP3 (Post Office Protocol version 3): Used for retrieving email.
o IMAP (Internet Message Access Protocol): Another protocol for
retrieving email, offering more features than POP3.
o DNS (Domain Name System): Translates domain names (like [invalid
URL removed]) into IP addresses.
o FTP (File Transfer Protocol): Used for transferring files between
computers.
o SSH (Secure Shell): Used for secure remote access to servers.
 Transport Layer Protocols: These protocols provide end-to-end
communication between applications.
o TCP (Transmission Control Protocol): Provides reliable, ordered
delivery of data with error checking and recovery. Used for web
browsing, file transfer, and email.
o UDP (User Datagram Protocol): Provides fast but unreliable delivery
of data without error checking or recovery. Used for streaming video,
online gaming, and DNS.
 Network Layer Protocols: These protocols handle routing of data packets
across networks.
o IP (Internet Protocol): Provides logical addressing (IP addresses) and
routing of data packets.
o ICMP (Internet Control Message Protocol): Used for error reporting
and network diagnostics (e.g., ping).
 Data Link Layer Protocols: These protocols handle communication between
two directly connected nodes.
o Ethernet: A common protocol for local area networks (LANs).
o Wi-Fi (IEEE 802.11): Used for wireless networking.
o ARP (Address Resolution Protocol): Translates IP addresses to
MAC addresses.
Network Services

Network services are applications or functions provided by network devices or


servers to other devices on the network. They utilize network protocols to operate.
Here are some common network services:

 Web Services: Providing access to web pages and web applications using
HTTP/HTTPS.
 Email Services: Sending, receiving, and storing email using SMTP, POP3,
and IMAP.
 File Sharing Services: Allowing users to access and share files stored on a
server using protocols like FTP or SMB/CIFS.
 DNS Services: Translating domain names to IP addresses.
 DHCP (Dynamic Host Configuration Protocol): Automatically assigning IP
addresses and other network configuration information to devices.
 VPN (Virtual Private Network): Creating secure connections over a public
network like the internet.
 Firewall Services: Protecting networks from unauthorized access.
Relationship between Protocols and Services

Network services rely on network protocols to function. For example, web services
use HTTP/HTTPS, email services use SMTP, POP3, and IMAP, and file sharing
services use FTP or SMB/CIFS. The protocols define the rules for communication,
while the services provide specific functions to users.

In short, protocols are the rules, and services are the applications of those rules.
They work together to make network communication possible.
Unit-II: Physical Layer and Data Link Layer
Overview of the physical layer and its func ons

Physical Layer in OSI Model


The OSI model is the abbreviation for Open Systems Interconnection Model. It
defines the transmission of data from one system to another in a computer
network. For example, in the most elemental form, two systems are joined to
each other using Local Area Network (LAN) cables and share data with the help
of a Network Interface Card (NIC) that allows communication over a network,
but if one system is based on Microsoft Windows, and the other is based on
macOS, so how would these computers communicate with each other. To
successfully communicate between systems of distinct architectures, the
International Organization for Standardization (ISO) presented the 7-layered
OSI model in 1984.

The individual layer of the OSI model is a package of protocols. This article will
comprehend the physical layer of the OSI model.

The physical layer is the first and lowest layer from the bottom of the 7-layered
OSI model and delivers security to hardware. This layer is in charge of data
transmission over the physical medium. It is the most complex layer in the OSI
model.
The physical layer converts the data frame received from the data link layer into
bits, i.e., in terms of ones and zeros. It maintains the data quality by
implementing the required protocols on different network modes and
maintaining the bit rate through data transfer using a wired or wireless
medium.

Attributes of the physical layer:


The physical layer has several attributes that are implemented in the OSI
model:

1. Signals: The data is first converted to a signal for efficient data transmission.
There are two kinds of signals:

o Analog Signals: These signals are continuous waveforms in nature


and are represented by continuous electromagnetic waves for the
transmission of data.
o Digital Signals: These signals are discrete in nature and
represent network pulses and digital data from the upper
layers.
2. Transmission media: Data is carried from source to destination with the
help of transmission media. There are two sorts of transmission media:

o Wired Media: The connection is established with the help of cables.


For example, fiber optic cables, coaxial cables, and twisted pair cables.
o Wireless Media: The connection is established using a wireless
communication network. For example, Wi-Fi, Bluetooth, etc.
3. Data Flow: It describes the rate of data flow and the transmission time
frame. The factors affecting the data flow are as follows:

o Encoding: Encoding data for transmission on the channel.


o Error-Rate: Receiving erroneous data due to noise in transmission.
o Bandwidth: The rate of transmission of data in the channel.
4. Transmission mode: It describes the direction of the data flow. Data can be
transmitted in three sorts of transmission modes as follows:

o Simplex mode: This mode of communication is a one-way


communication where a device can only send data. Examples are a
mouse, keyboard, etc.
o Half-duplex mode: This mode of communication supports one-way
communication, i.e., either data can be transmitted or received. An
example is a walkie-talkie.
o Full-duplex mode: This mode of communication supports two-way
communication, i.e., the device can send and receive data at the same
time. An example is cellular communication.
5. Noise in transmission: Transmitted data can get corrupted or damaged
during data transmission due to many reasons. Some of the reasons are
mentioned below:

Advertisement

o Attenuation: It is a gradual deterioration of the network signal on the


communication channel.
o Dispersion: In the case of Dispersion, the data is dispersed and
overlapped during transmission, which leads to the loss of the original
data.
o Data Delay: The transmitted data reaches the destination system
outside the specified frame time.

The physical layer performs various functions and


services:
o It transfers data bit by bit or symbol by symbol.
o It performs bit synchronization, which means that only one bit needs
to be transferred from one system to another at a time. There should
be no overlapping of bits during transmission. Bit synchronization can
be achieved by providing a clock.
o Bit rate control defines how many bits per second can be transmitted,
i.e., the number of bits sent per second.
o The physical layer is responsible for knowing the arrangements made
between devices in networks called physical topologies, such as
mesh, ring, bus, and star.
o The transmission mode in which data is transmitted, and there are
three modes of transmitting data: full-duplex, half-duplex, and
simplex.
o It is responsible for point-to-multipoint, point-to-point, or multipoint
line configurations.
o It is responsible for flow control and start-stop signaling in
asynchronous serial communication.
o Signal processing of physical signals such as training sequence, pulse
shaping, equalization filtering, and others.
o It provides bit-interleaving and another channel coding.
o It is responsible for serial or parallel communication.
o It provides a standardized interface for physical transmission media,
including electrical specifications for transmission line signal levels,
mechanical specifications for electrical cables and connectors, radio
interfaces, and wireless IR communication links, IR specifications.
o The physical layer is responsible for modulation, which means the
conversion of information into radio waves by adding the data to an
optical nerve signal or electrical signal.
o This layer is responsible for circuit switching.
o This layer is concerned with auto-negotiation. Signals are mainly of
two sorts, digital signals & analog signals. The physical layer decides
which signal will be used to transfer the data from one point to
another.
o It also avoids collisions between data flowing in the network due to
the irretrievability of data packets.
o It is responsible for the translation of data received from the data link
layer for further transmission.

Physical Topology:
Physical topology refers to the specification or structure of the connections of
the network between the devices where the transmission will happen. There
are four types of topologies, which are as follows:

Star Topology:
Star topology is a sort of network topology in which each node or device in the
network is individually joined to a central node, which can be a switch or a hub.
This topology looks like a star, due to which this topology is called star topology.
Hub does not provide route data, but it transmits data to other devices
connected to it. The advantage of this topology is that if one cable fails, the
device connected to that cable is affected, and not the others.

Bus Topology:
Bus topology comprises a single communication line or cable that is connected
to each node. The backbone of this network is the central cable, and each node
can communicate with other devices through the central cable.
The signal goes from the ground terminator to the other terminator of the wire.
The terminator stops the signal once it reaches the end of the wire to avoid
signal bounce. Each computer communicates independently with other
computers in what is called a peer-to-peer network. Each computer has a
unique address, so if a message is to be sent to a specific computer, the device
can communicate directly with that computer.

The advantage of bus topology is that collapse in one device will not affect other
devices. The bus topology is not expensive to build because it uses a single wire
and works well for small networks.

Ring Topology:
In a ring topology, the devices are connected in the form of a ring so that each
device has two neighbors for communication. Data moves around the ring in
one direction.

Advertisement

As you can see below, all four devices are connected to each other in the form
of a ring. Each device has two neighbors. Node 2 and Node 4 are neighbors of
Node 1; similarly, Node 1 and Node 3 are neighbors of Node 2, and so on.

The advantage of ring topology is that if you want to add another device to the
ring, you will need an additional cable to do so. Similarly, you can remove a
device and join the wires.

Mesh Topology:
In a mesh topology, each system is directly joined to every other system. The
advantage of mesh topology is that there will be no traffic issues as each device
has a dedicated communication line. If one system is not functioning, it will not
affect other devices. It provides more security or privacy.

Advertisement

The drawback of mesh topology is that it is expensive and more complex than
other topologies.

Importance of the physical layer:


o Without proper data conversion at the physical level, the network
cannot function.
o The physical layer is responsible for maintaining communication
between the hardware and the network mode.
o It handles the data flow rate of the data to be transmitted along with
the timeframe of the transmitted data.

Conclusion:
o You studied the physical layer in OSI model in this article. The physical
layer provides the hardware needed to transmit and receive bits over
a network link.
o You have studied the attributes of the physical layer, such as types of
signals used for data transmission, wired and wireless media of
transmission, rate of data flow, and noise in transmission.
o You have read about the various functions and responsibilities of the
physical layer.
o You have studied physical topologies such as star topology, bus
topology, ring topology, and mesh topology.
o Finally, you have gained knowledge about the importance of the
physical layer in the OSI model.
Transmission media and their characteris cs
1. Guided Media (Wired)

These media use physical cables to guide the signals.

 Twisted-Pair Cable:
o Description: Consists of two insulated copper wires twisted together to reduce
electromagnetic interference (EMI).
o Types:
 Unshielded Twisted Pair (UTP): Commonly used in Ethernet
networks.
 Shielded Twisted Pair (STP): Has a metallic shield for better EMI
protection.
o Characteristics:
 Bandwidth: Moderate (up to 10 Gbps in modern implementations)
 Cost: Low (UTP) to moderate (STP)
 Distance: Limited (typically up to 100 meters)
 Susceptibility to Interference: Moderate (UTP), low (STP)
 Applications: Ethernet LANs, telephone lines
 Coaxial Cable:
o Description: Has a central conductor surrounded by an insulating layer, a
metallic shield, and an outer jacket.
o Characteristics:
 Bandwidth: Higher than twisted-pair
 Cost: Moderate
 Distance: Longer than twisted-pair
 Susceptibility to Interference: Low
 Applications: Cable TV, older Ethernet networks
 Fiber Optic Cable:
o Description: Transmits data as light pulses through thin glass or plastic
fibers.
o Types:
 Single-mode fiber: Has a smaller core and allows only one light path,
enabling long-distance transmission.
 Multi-mode fiber: Has a larger core and allows multiple light paths,
suitable for shorter distances.
o Characteristics:
 Bandwidth: Very high (up to terabits per second)
 Cost: Higher than copper cables
 Distance: Very long (up to hundreds of kilometers)
 Susceptibility to Interference: Immune to EMI
 Applications: Long-distance telecommunications, high-speed data
networks, submarine cables
2. Unguided Media (Wireless)

These media use electromagnetic waves to transmit data without physical cables.

 Radio Waves:
o Description: Electromagnetic waves used for various wireless communication
technologies.
o Characteristics:
 Frequency: Different frequency bands are used for different
applications (e.g., Wi-Fi, Bluetooth, cellular networks).
 Range: Varies depending on frequency and power.
 Susceptibility to Interference: Can be affected by other radio waves
and physical obstacles.
 Applications: Wi-Fi, Bluetooth, cellular networks, radio and television
broadcasting
 Microwaves:
o Description: High-frequency radio waves used for line-of-sight
communication.
o Types:
 Terrestrial microwaves: Use ground-based antennas.
 Satellite microwaves: Use satellites in orbit.
o Characteristics:
 Bandwidth: High
 Range: Long (especially for satellite communication)
 Susceptibility to Interference: Can be affected by atmospheric
conditions and obstacles.
 Applications: Long-distance communication, satellite TV, wireless
internet access
 Infrared:
o Description: Uses infrared light to transmit data over short distances.
o Characteristics:
 Range: Short
 Susceptibility to Interference: Can be blocked by obstacles.
 Applications: Remote controls, short-range wireless communication

Key Characteristics to Consider When Choosing a Transmission Medium

 Bandwidth: The amount of data that can be transmitted per unit of time.
 Cost: The cost of the cable or wireless technology and its installation.
 Distance: The maximum distance over which data can be transmitted reliably.
 Susceptibility to Interference: The degree to which the medium is affected by EMI
or other types of interference.
 Security: The level of security provided by the medium.
Data encoding and modulation

Digital Transmission
Data can be represented either in analog or digital form. The computers used
the digital form to store the information. Therefore, the data needs to be
converted in digital form so that it can be used by a computer.

DIGITAL-TO-DIGITAL CONVERSION
Digital-to-digital encoding is the representation of digital information by a
digital signal. When binary 1s and 0s generated by the computer are translated
into a sequence of voltage pulses that can be propagated over a wire, this
process is known as digital-to-digital encoding.

Digital-to-digital encoding is divided into three categories:

o Unipolar Encoding
o Polar Encoding
o Bipolar Encoding

Unipolar
o Digital transmission system sends the voltage pulses over the
medium link such as wire or cable.
o In most types of encoding, one voltage level represents 0, and another
voltage level represents 1.
o The polarity of each pulse determines whether it is positive or
negative.
o This type of encoding is known as Unipolar encoding as it uses only
one polarity.
o In Unipolar encoding, the polarity is assigned to the 1 binary state.
o In this, 1s are represented as a positive value and 0s are represented
as a zero value.
o In Unipolar Encoding, '1' is considered as a high voltage and '0' is
considered as a zero voltage.
o Unipolar encoding is simpler and inexpensive to implement.

Unipolar encoding has two problems that make this scheme less desirable:

o DC Component
o Synchronization

Polar
o Polar encoding is an encoding scheme that uses two voltage levels:
one is positive, and another is negative.
o By using two voltage levels, an average voltage level is reduced, and
the DC component problem of unipolar encoding scheme is
alleviated.
NRZ
o NRZ stands for Non-return zero.
o In NRZ encoding, the level of the signal can be represented either
positive or negative.
The two most common methods used in NRZ are:

NRZ-L: In NRZ-L encoding, the level of the signal depends on the type of the bit
that it represents. If a bit is 0 or 1, then their voltages will be positive and
negative respectively. Therefore, we can say that the level of the signal is
dependent on the state of the bit.

NRZ-I: NRZ-I is an inversion of the voltage level that represents 1 bit. In the NRZ-
I encoding scheme, a transition occurs between the positive and negative
voltage that represents 1 bit. In this scheme, 0 bit represents no change and 1
bit represents a change in voltage level.

RZ
o RZ stands for Return to zero.
o There must be a signal change for each bit to achieve synchronization.
However, to change with every bit, we need to have three values:
positive, negative and zero.
o RZ is an encoding scheme that provides three values, positive voltage
represents 1, the negative voltage represents 0, and zero voltage
represents none.
o In the RZ scheme, halfway through each interval, the signal returns to
zero.
o In RZ scheme, 1 bit is represented by positive-to-zero and 0 bit is
represented by negative-to-zero.

Disadvantage of RZ:

It performs two signal changes to encode one bit that acquires more
bandwidth.

Biphase
o Biphase is an encoding scheme in which signal changes at the middle
of the bit interval but does not return to zero.
Biphase encoding is implemented in two different ways:

Manchester

o It changes the signal at the middle of the bit interval but does not
return to zero for synchronization.
o In Manchester encoding, a negative-to-positive transition represents
binary 1, and positive-to-negative transition represents 0.
o Manchester has the same level of synchronization as RZ scheme
except that it has two levels of amplitude.
Differential Manchester

o It changes the signal at the middle of the bit interval for


synchronization, but the presence or absence of the transition at the
beginning of the interval determines the bit. A transition means
binary 0 and no transition means binary 1.
o In Manchester Encoding scheme, two signal changes represent 0 and
one signal change represent 1.

Bipolar
o Bipolar encoding scheme represents three voltage levels: positive,
negative, and zero.
o In Bipolar encoding scheme, zero level represents binary 0, and binary
1 is represented by alternating positive and negative voltages.
o If the first 1 bit is represented by positive amplitude, then the second
1 bit is represented by negative voltage, third 1 bit is represented by
the positive amplitude and so on. This alternation can also occur even
when the 1bits are not consecutive.
Bipolar can be classified as:

AMI
o AMI stands for alternate mark inversion where mark work comes
from telegraphy which means 1. So, it can be redefined as alternate 1
inversion.
o In Bipolar AMI encoding scheme, 0 bit is represented by zero level and
1 bit is represented by alternating positive and negative voltages.
Advantage:

o DC component is zero.
o Sequence of 1s bits are synchronized.
Disadvantage:

o This encoding scheme does not ensure the synchronization of a long


string of 0s bits.

B8ZS
o B8ZS stands for Bipolar 8-Zero Substitution.
o This technique is adopted in North America to provide
synchronization of a long sequence of 0s bits.
o In most of the cases, the functionality of B8ZS is similar to the bipolar
AMI, but the only difference is that it provides the synchronization
when a long sequence of 0s bits occur.
o B8ZS ensures synchronization of a long string of 0s by providing force
artificial signal changes called violations, within 0 string pattern.
o When eight 0 occurs, then B8ZS implements some changes in 0s
string pattern based on the polarity of the previous 1 bit.
o If the polarity of the previous 1 bit is positive, the eight 0s will be
encoded as zero, zero, zero, positive, negative, zero, negative, positive.
o If the polarity of previous 1 bit is negative, then the eight 0s will be
encoded as zero, zero, zero, negative, positive, zero, positive, negative.

HDB3
o HDB3 stands for High-Density Bipolar 3.
o HDB3 technique was first adopted in Europe and Japan.
o HDB3 technique is designed to provide the synchronization of a long
sequence of 0s bits.
o In the HDB3 technique, the pattern of violation is based on the polarity
of the previous bit.
o When four 0s occur, HDB3 looks at the number of 1s bits occurred
since the last substitution.
o If the number of 1s bits is odd, then the violation is made on the fourth
consecutive of 0. If the polarity of the previous bit is positive, then the
violation is positive. If the polarity of the previous bit is negative, then
the violation is negative.
If the number of 1s bits since the last substitution is odd.
If the number of 1s bits is even, then the violation is made on the place of the
first and fourth consecutive 0s. If the polarity of the previous bit is positive, then
violations are negative, and if the polarity of the previous bit is negative, then
violations are positive.

If the number of 1s bits since the last substitution is even.

ANALOG-TO-DIGITAL CONVERSION
o When an analog signal is digitalized, this is called an analog-to-digital
conversion.
o Suppose human sends a voice in the form of an analog signal, we
need to digitalize the analog signal which is less prone to noise. It
requires a reduction in the number of values in an analog message so
that they can be represented in the digital stream.
o In analog-to-digital conversion, the information contained in a
continuous wave form is converted in digital pulses.

Techniques for Analog-To-Digital Conversion

PAM
o PAM stands for pulse amplitude modulation.
o PAM is a technique used in analog-to-digital conversion.
o PAM technique takes an analog signal, samples it, and generates a
series of digital pulses based on the result of sampling where
sampling means measuring the amplitude of a signal at equal
intervals.
o PAM technique is not useful in data communication as it translates
the original wave form into pulses, but these pulses are not digital. To
make them digital, PAM technique is modified to PCM technique.
PCM
o PCM stands for Pulse Code Modulation.
o PCM technique is used to modify the pulses created by PAM to form
a digital signal. To achieve this, PCM quantizes PAM pulses.
Quantization is a process of assigning integral values in a specific
range to sampled instances.
o PCM is made of four separate processes: PAM, quantization, binary
encoding, and digital-to-digital encoding.
PCM

Next Topic
Modulation

 Modulation is a fundamental process in digital communication,


involving the alteration of a signal's frequency to encode and
carry data. In simpler terms, modulation is the transformation of
a digital signal into an analog signal.
 The complementary process of converting an analog signal back
into a digital signal is known as demodulation. The combined
term MODEM is derived from "modulation" and "demodulation"
and is commonly used to refer to devices that perform both
functions.
 When transmitting a signal from one computer to another over
an analog channel, such as a telephone line, signal conversion
becomes necessary to ensure compatibility between digital data
and analog transmission media.
 Since computers generate digital signals, and telephone lines
carry analog signals, modulation is typically performed at the
sending end to convert the digital data into a format suitable for
analog transmission.
 At the receiving end, the analog signal being carried by the
telephone line must be converted back into a digital signal
through demodulation to retrieve the original digital data.

Why Modulation is Necessary?

 Conversion between digital and analog signals is essential due to


several reasons:
o The data on the receiving side is in digital form and cannot
be directly transmitted in its digital state through analog
transmission media. Hence, it must be converted into an
analog signal for effective transmission.
o Many transmission media, such as telephone lines, are
inherently analog in nature. Therefore, data must be
transformed into an analog signal via modulation for
compatibility with these transmission channels.

Applications of Modulation

 Modulation is a critical process used when a signal requires


transformation from one form to another. It finds applications in
various types of signal transformations:
1. Digital to digital conversion: In this scenario, modulation is
used to encode digital data for more efficient transmission
within digital networks.
2. Analog to digital conversion: Modulation techniques are
employed to convert analog signals into a digital format,
making them compatible with digital networks.
3. Digital to analog conversion: When interfacing with analog
transmission media, modulation is necessary to convert
digital data into analog signals for transmission.
4. Analog to analog conversion: In certain specialized
situations, the preservation of analog signals during
transmission is vital, and modulation techniques are
utilized for this purpose.

Error detec on and correc on

Error Detection
When data is transmitted from one device to another device, the system does
not guarantee whether the data received by the device is identical to the data
transmitted by another device. An Error is a situation when the message
received at the receiver end is not identical to the message transmitted.

Types Of Errors

Errors can be classified into two categories:

o Single-Bit Error
o Burst Error

Single-Bit Error:
The only one bit of a given data unit is changed from 1 to 0 or from 0 to 1.
In the above figure, the message which is sent is corrupted as single-bit, i.e., 0
bit is changed to 1.

Single-Bit Error does not appear more likely in Serial Data Transmission. For
example, Sender sends the data at 10 Mbps, this means that the bit lasts only
for 1 ?s and for a single-bit error to occurred, a noise must be more than 1 ?s.

Single-Bit Error mainly occurs in Parallel Data Transmission. For example, if


eight wires are used to send the eight bits of a byte, if one of the wire is noisy,
then single-bit is corrupted per byte.

Burst Error:
The two or more bits are changed from 0 to 1 or from 1 to 0 is known as Burst
Error.

The Burst Error is determined from the first corrupted bit to the last corrupted
bit.

The duration of noise in Burst Error is more than the duration of noise in Single-
Bit.

Burst Errors are most likely to occurr in Serial Data Transmission.

Advertisement

The number of affected bits depends on the duration of the noise and data rate.
Error Detecting Techniques:
The most popular Error Detecting Techniques are:

o Single parity check


o Two-dimensional parity check
o Checksum
o Cyclic redundancy check

Single Parity Check


o Single Parity checking is the simple mechanism and inexpensive to
detect the errors.
o In this technique, a redundant bit is also known as a parity bit which
is appended at the end of the data unit so that the number of 1s
becomes even. Therefore, the total number of transmitted bits would
be 9 bits.
o If the number of 1s bits is odd, then parity bit 1 is appended and if the
number of 1s bits is even, then parity bit 0 is appended at the end of
the data unit.
o At the receiving end, the parity bit is calculated from the received data
bits and compared with the received parity bit.
o This technique generates the total number of 1s even, so it is known
as even-parity checking.
Drawbacks Of Single Parity Checking
o It can only detect single-bit errors which are very rare.
o If two bits are interchanged, then it cannot detect the errors.

Two-Dimensional Parity Check


o Performance can be improved by using Two-Dimensional Parity
Check which organizes the data in the form of a table.
o Parity check bits are computed for each row, which is equivalent to
the single-parity check.
o In Two-Dimensional Parity check, a block of bits is divided into rows,
and the redundant row of bits is added to the whole block.
o At the receiving end, the parity bits are compared with the parity bits
computed from the received data.

Drawbacks Of 2D Parity Check


o If two bits in one data unit are corrupted and two bits exactly the same
position in another data unit are also corrupted, then 2D Parity
checker will not be able to detect the error.
o This technique cannot be used to detect the 4-bit errors or more in
some cases.

Checksum
A Checksum is an error detection technique based on the concept of
redundancy.

It is divided into two parts:

Checksum Generator
A Checksum is generated at the sending side. Checksum generator subdivides
the data into equal segments of n bits each, and all these segments are added
together by using one's complement arithmetic. The sum is complemented
and appended to the original data, known as checksum field. The extended
data is transmitted across the network.

Suppose L is the total sum of the data segments, then the checksum would be
?L

1. The Sender follows the given steps:


2. The block unit is divided into k sections, and each of n bits.
3. All the k sections are added together by using one's complement to
get the sum.
4. The sum is complemented and it becomes the checksum field.
5. The original data and checksum field are sent across the network.

Checksum Checker
A Checksum is verified at the receiving side. The receiver subdivides the
incoming data into equal segments of n bits each, and all these segments are
added together, and then this sum is complemented. If the complement of the
sum is zero, then the data is accepted otherwise data is rejected.

1. The Receiver follows the given steps:


2. The block unit is divided into k sections and each of n bits.
3. All the k sections are added together by using one's complement al
gorithm to get the sum.
4. The sum is complemented.
5. If the result of the sum is zero, then the data is accepted otherwise t
he data is discarded.

Cyclic Redundancy Check (CRC)


CRC is a redundancy error technique used to determine the error.

Following are the steps used in CRC for error detection:

o In CRC technique, a string of n 0s is appended to the data unit, and


this n number is less than the number of bits in a predetermined
number, known as division which is n+1 bits.
o Secondly, the newly extended data is divided by a divisor using a
process is known as binary division. The remainder generated from
this division is known as CRC remainder.
o Thirdly, the CRC remainder replaces the appended 0s at the end of
the original data. This newly generated unit is sent to the receiver.
o The receiver receives the data followed by the CRC remainder. The
receiver will treat this whole unit as a single unit, and it is divided by
the same divisor that was used to find the CRC remainder.
If the resultant of this division is zero which means that it has no error, and the
data is accepted.

If the resultant of this division is not zero which means that the data consists of
an error. Therefore, the data is discarded.
Let's understand this concept through an example:

Advertisement

Suppose the original data is 11100 and divisor is 1001.

CRC Generator
o A CRC generator uses a modulo-2 division. Firstly, three zeroes are
appended at the end of the data as the length of the divisor is 4 and
we know that the length of the string 0s to be appended is always one
less than the length of the divisor.
o Now, the string becomes 11100000, and the resultant string is divided
by the divisor 1001.
o The remainder generated from the binary division is known as CRC
remainder. The generated value of the CRC remainder is 111.
o CRC remainder replaces the appended string of 0s at the end of the
data unit, and the final string would be 11100111 which is sent across
the network.
CRC Checker
o The functionality of the CRC checker is similar to the CRC generator.
o When the string 11100111 is received at the receiving end, then CRC
checker performs the modulo-2 division.
o A string is divided by the same divisor, i.e., 1001.
o In this case, CRC checker generates the remainder of zero. Therefore,
the data is accepted.

Error Correction

Error correction techniques allow the receiver to not only detect errors but also to correct
them without requiring retransmission. This is particularly useful in situations where
retransmission is not feasible or efficient, such as in wireless communication or real-time
applications. Here are some common error correction methods:

 Hamming Code:
o Adds redundant bits to the data that can be used to identify the location of a
single-bit error and correct it.
o Uses the concept of Hamming distance to determine the number of bit
differences between valid code words.
 Forward Error Correction (FEC):
o A general term for error correction techniques that allow the receiver to
correct errors without retransmission.
o Includes various codes like Reed-Solomon codes, Turbo codes, and Low-
Density Parity-Check (LDPC) codes.
o These codes are more complex than Hamming codes but can correct multiple
errors.

Comparison of Error Detection and Correction

Feature Error Detection Error Correction


Purpose Identify the presence of errors Correct errors without retransmission
Overhead Lower Higher
Complexity Simpler More complex
Latency Lower Higher
Error Can correct certain types and numbers
Cannot correct errors
Correction of errors
Requires retransmission for error
Retransmission Does not require retransmission
recovery
Networking protocols (e.g., TCP, Storage systems, error-prone
Applications
UDP) environments
Export to Sheets

Key Considerations

 The choice of error detection or correction technique depends on factors such as the
error rate of the channel, the cost of retransmission, and the acceptable level of
overhead.
 Error correction techniques generally have higher overhead than error detection
techniques, as they require more redundant information to be transmitted.
 In many cases, a combination of error detection and correction is used. For example,
CRC might be used for error detection, and if an error is detected, a retransmission is
requested.

Datalink layer and its func ons

Data Link Layer


o In the OSI model, the data link layer is a 4th layer from the top and
2nd layer from the bottom.
o The communication channel that connects the adjacent nodes is
known as links, and in order to move the datagram from source to the
destination, the datagram must be moved across an individual link.
o The main responsibility of the Data Link Layer is to transfer the
datagram across an individual link.
o The Data link layer protocol defines the format of the packet
exchanged across the nodes as well as the actions such as Error
detection, retransmission, flow control, and random access.
o The Data Link Layer protocols are Ethernet, token ring, FDDI and PPP.
o An important characteristic of a Data Link Layer is that datagram can
be handled by different link layer protocols on different links in a path.
For example, the datagram is handled by Ethernet on the first link,
PPP on the second link.
Following services are provided by the Data Link Layer:

o Framing & Link access: Data Link Layer protocols encapsulate each
network frame within a Link layer frame before the transmission
across the link. A frame consists of a data field in which network layer
datagram is inserted and a number of data fields. It specifies the
structure of the frame as well as a channel access protocol by which
frame is to be transmitted over the link.
o Reliable delivery: Data Link Layer provides a reliable delivery service,
i.e., transmits the network layer datagram without any error. A reliable
delivery service is accomplished with transmissions and
acknowledgements. A data link layer mainly provides the reliable
delivery service over the links as they have higher error rates and they
can be corrected locally, link at which an error occurs rather than
forcing to retransmit the data.
o Flow control: A receiving node can receive the frames at a faster rate
than it can process the frame. Without flow control, the receiver's
buffer can overflow, and frames can get lost. To overcome this
problem, the data link layer uses the flow control to prevent the
sending node on one side of the link from overwhelming the receiving
node on another side of the link.
o Error detection: Errors can be introduced by signal attenuation and
noise. Data Link Layer protocol provides a mechanism to detect one
or more errors. This is achieved by adding error detection bits in the
frame and then receiving node can perform an error check.
o Error correction: Error correction is similar to the Error detection,
except that receiving node not only detect the errors but also
determine where the errors have occurred in the frame.
o Half-Duplex & Full-Duplex: In a Full-Duplex mode, both the nodes
can transmit the data at the same time. In a Half-Duplex mode, only
one node can transmit the data at the same time.
Framing, flow control, and error control in data link layer protocols

Framing

In the physical layer, data transmission involves synchronised transmission


of bits from the source to the destination. The data link layer packs these
bits into frames.

Data-link layer takes the packets from the Network Layer and encapsulates
them into frames. If the frame size becomes too large, then the packet may
be divided into small sized frames. Smaller sized frames makes flow control
and error control more efficient.

Then, it sends each frame bit-by-bit on the hardware. At receiver's end, data
link layer picks up signals from hardware and assembles them into frames.

Parts of a Frame
A frame has the following parts −

 Frame Header − It contains the source and the destination addresses of


the frame.
 Payload field − It contains the message to be delivered.
 Trailer − It contains the error detection and error correction bits.
 Flag − It marks the beginning and end of the frame.
Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.

Types of Framing
Framing can be of two types, fixed sized framing and variable sized framing.

Fixed-sized Framing

Here the size of the frame is fixed and so the frame length acts as delimiter
of the frame. Consequently, it does not require additional boundary bits to
identify the start and end of the frame.

Example − ATM cells.

Variable – Sized Framing

Here, the size of each frame to be transmitted may be different. So


additional mechanisms are kept to mark the end of one frame and the
beginning of the next frame.

It is used in local area networks.

Two ways to define frame delimiters in variable sized framing are −

 Length Field − Here, a length field is used that determines the size of the
frame. It is used in Ethernet (IEEE 802.3).
 End Delimiter − Here, a pattern is used as a delimiter to determine the
size of frame. It is used in Token Rings. If the pattern occurs in the
message, then two approaches are used to avoid the situation −
o Byte – Stuffing − A byte is stuffed in the message to differentiate
from the delimiter. This is also called character-oriented framing.
o Bit – Stuffing − A pattern of bits of arbitrary length is stuffed in the
message to differentiate from the delimiter. This is also called bit
– oriented framing.

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.
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.
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.
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:


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.
Sliding Window ARQ

SlidingWindow 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.
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.
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.
Unit-III: Network Layer and Transport Layer
Overview of the network layer and its func ons

Network Layer
o The Network Layer is the third layer of the OSI model.
o It handles the service requests from the transport layer and further
forwards the service request to the data link layer.
o The network layer translates the logical addresses into physical
addresses
o It determines the route from the source to the destination and also
manages the traffic problems such as switching, routing and controls
the congestion of data packets.
o The main role of the network layer is to move the packets from
sending host to the receiving host.

The main functions performed by the network layer are:


o Routing: When a packet reaches the router's input link, the router will
move the packets to the router's output link. For example, a packet
from S1 to R1 must be forwarded to the next router on the path to S2.
o Logical Addressing: The data link layer implements the physical
addressing and network layer implements the logical addressing.
Logical addressing is also used to distinguish between source and
destination system. The network layer adds a header to the packet
which includes the logical addresses of both the sender and the
receiver.
o Internetworking: This is the main role of the network layer that it
provides the logical connection between different types of networks.
o Fragmentation: The fragmentation is a process of breaking the
packets into the smallest individual data units that travel through
different networks.

Forwarding & Routing


In Network layer, a router is used to forward the packets. Every router has a
forwarding table. A router forwards a packet by examining a packet's header
field and then using the header field value to index into the forwarding table.
The value stored in the forwarding table corresponding to the header field
value indicates the router's outgoing interface link to which the packet is to be
forwarded.
For example, the router with a header field value of 0111 arrives at a router, and
then router indexes this header value into the forwarding table that determines
the output link interface is 2. The router forwards the packet to the interface 2.
The routing algorithm determines the values that are inserted in the
forwarding table. The routing algorithm can be centralized or decentralized.

Services Provided by the Network Layer


o Guaranteed delivery: This layer provides the service which
guarantees that the packet will arrive at its destination.
o Guaranteed delivery with bounded delay: This service guarantees
that the packet will be delivered within a specified host-to-host delay
bound.
o In-Order packets: This service ensures that the packet arrives at the
destination in the order in which they are sent.
o Guaranteed max jitter: This service ensures that the amount of time
taken between two successive transmissions at the sender is equal to
the time between their receipt at the destination.
o Security services: The network layer provides security by using a
session key between the source and destination host. The network
layer in the source host encrypts the payloads of datagrams being
sent to the destination host. The network layer in the destination host
would then decrypt the payload. In such a way, the network layer
maintains the data integrity and source authentication services.
Rou ng algorithm and protocols

You're diving into a core aspect of networking! Routing algorithms and protocols are
essential for directing data packets across networks, ensuring they reach their
intended destinations efficiently. Let's break down the key concepts:

Routing Algorithms

Routing algorithms are the "brains" behind the routing process. They are sets of
rules and procedures that routers use to determine the best path for data packets to
travel from source to destination. The "best" path is usually defined as the path with
the lowest cost, which can be based on factors like:

 Number of hops: The number of routers a packet must pass through.


 Bandwidth: The capacity of the links along the path.
 Delay: The time it takes for a packet to travel along the path.
 Load: The current traffic on the links.
Types of Routing Algorithms:

Routing algorithms can be broadly classified into several categories:

 Distance Vector Routing:


o Each router maintains a table of distances to all other networks in the
internetwork.
o Routers exchange this information with their directly connected
neighbors.
o The Bellman-Ford algorithm is a classic example of a distance vector
algorithm.
o Example Protocol: RIP (Routing Information Protocol)
o Limitations: Can suffer from slow convergence (it takes time for
routing tables to stabilize after a network change) and the count-to-
infinity problem (routing loops can occur).
 Link-State Routing:
o Each router maintains a complete map of the network topology.
o Routers flood the network with information about their directly
connected links (link state advertisements - LSAs).
o Each router independently calculates the shortest path to every other
network using algorithms like Dijkstra's algorithm.
o Example Protocol: OSPF (Open Shortest Path First)
o Advantages: Faster convergence than distance vector routing and
avoids routing loops.
 Path Vector Routing:
o Similar to distance vector routing but instead of just advertising
distance, routers advertise the entire path to a destination.
o This helps to avoid routing loops.
o Example Protocol: BGP (Border Gateway Protocol), used for routing
between autonomous systems (AS) on the internet.
Routing Protocols

Routing protocols are the "languages" that routers use to communicate routing
information with each other. They define the format of routing messages, the rules
for exchanging these messages, and the algorithms used to make routing decisions.
Here are some key routing protocols:

 RIP (Routing Information Protocol):


o A distance vector protocol that uses hop count as its metric.
o Simple to implement but has limitations in larger networks.
 OSPF (Open Shortest Path First):
o A link-state protocol that uses a more sophisticated metric based on
link cost.
o Scalable and widely used in enterprise networks.
 BGP (Border Gateway Protocol):
o A path vector protocol used for inter-AS routing on the internet.
o Handles complex routing policies and is essential for the internet's
global routing.
 IS-IS (Intermediate System to Intermediate System):
o Another link-state protocol similar to OSPF.
o Often used in large service provider networks.
Relationship between Algorithms and Protocols

Routing protocols implement routing algorithms. For example, OSPF implements


Dijkstra's algorithm to calculate shortest paths, and RIP implements the Bellman-
Ford algorithm. The protocol defines how routing information is exchanged, while the
algorithm defines how that information is used to make routing decisions.

IPv4 and IPv6 addressing and rou ng

What is IP?
An IP stands for internet protocol. An IP address is assigned to each device
connected to a network. Each device uses an IP address for communication. It
also behaves as an identifier as this address is used to identify the device on a
network. It defines the technical format of the packets. Mainly, both the
networks, i.e., IP and TCP, are combined together, so together, they are referred
to as a TCP/IP. It creates a virtual connection between the source and the
destination.

We can also define an IP address as a numeric address assigned to each device


on a network. An IP address is assigned to each device so that the device on a
network can be identified uniquely. To facilitate the routing of packets, TCP/IP
protocol uses a 32-bit logical address known as IPv4(Internet Protocol version
4).

An IP address consists of two parts, i.e., the first one is a network address, and
the other one is a host address.

There are two types of IP addresses:

What is IPv4?
IPv4 is a version 4 of IP. It is a current version and the most commonly used IP
address. It is a 32-bit address written in four numbers separated by 'dot', i.e.,
periods. This address is unique for each device.
For example, 66.94.29.13

The above example represents the IP address in which each group of numbers
separated by periods is called an Octet. Each number in an octet is in the range
from 0-255. This address can produce 4,294,967,296 possible unique addresses.

In today's computer network world, computers do not understand the IP


addresses in the standard numeric format as the computers understand the
numbers in binary form only. The binary number can be either 1 or 0. The IPv4
consists of four sets, and these sets represent the octet. The bits in each octet
represent a number.

Each bit in an octet can be either 1 or 0. If the bit the 1, then the number it
represents will count, and if the bit is 0, then the number it represents does not
count.

Representation of 8 Bit Octet

The above representation shows the structure of 8- bit octet.

Now, we will see how to obtain the binary representation of the above IP
address, i.e., 66.94.29.13

Step 1: First, we find the binary number of 66.

To obtain 66, we put 1 under 64 and 2 as the sum of 64 and 2 is equal to 66


(64+2=66), and the remaining bits will be zero, as shown above. Therefore, the
binary bit version of 66 is 01000010.

Step 2: Now, we calculate the binary number of 94.

To obtain 94, we put 1 under 64, 16, 8, 4, and 2 as the sum of these numbers is
equal to 94, and the remaining bits will be zero. Therefore, the binary bit version
of 94 is 01011110.

Step 3: The next number is 29.


To obtain 29, we put 1 under 16, 8, 4, and 1 as the sum of these numbers is equal
to 29, and the remaining bits will be zero. Therefore, the binary bit version of 29
is 00011101.

Step 4: The last number is 13.

To obtain 13, we put 1 under 8, 4, and 1 as the sum of these numbers is equal to
13, and the remaining bits will be zero. Therefore, the binary bit version of 13 is
00001101.

Drawback of IPv4
Currently, the population of the world is 7.6 billion. Every user is having more
than one device connected with the internet, and private companies also rely
on the internet. As we know that IPv4 produces 4 billion addresses, which are
not enough for each device connected to the internet on a planet. Although
the various techniques were invented, such as variable- length mask, network
address translation, port address translation, classes, inter-domain translation,
to conserve the bandwidth of IP address and slow down the depletion of an IP
address. In these techniques, public IP is converted into a private IP due to
which the user having public IP can also use the internet. But still, this was not
so efficient, so it gave rise to the development of the next generation of IP
addresses, i.e., IPv6.

What is IPv6?
IPv4 produces 4 billion addresses, and the developers think that these
addresses are enough, but they were wrong. IPv6 is the next generation of IP
addresses. The main difference between IPv4 and IPv6 is the address size of IP
addresses. The IPv4 is a 32-bit address, whereas IPv6 is a 128-bit hexadecimal
address. IPv6 provides a large address space, and it contains a simple header
as compared to IPv4.

Advertisement

It provides transition strategies that convert IPv4 into IPv6, and these strategies
are as follows:

o Dual stacking: It allows us to have both the versions, i.e., IPv4 and
IPv6, on the same device.
o Tunneling: In this approach, all the users have IPv6 communicates
with an IPv4 network to reach IPv6.
o Network Address Translation: The translation allows the
communication between the hosts having a different version of IP.
This hexadecimal address contains both numbers and alphabets. Due to the
usage of both the numbers and alphabets, IPv6 is capable of producing over
340 undecillion (3.4*1038) addresses.

IPv6 is a 128-bit hexadecimal address made up of 8 sets of 16 bits each, and


these 8 sets are separated by a colon. In IPv6, each hexadecimal character
represents 4 bits. So, we need to convert 4 bits to a hexadecimal number at a
time

Address format
The address format of IPv4:

The address format of IPv6:

The above diagram shows the address format of IPv4 and IPv6. An IPv4 is a 32-
bit decimal address. It contains 4 octets or fields separated by 'dot', and each
field is 8-bit in size. The number that each field contains should be in the range
of 0-255. Whereas an IPv6 is a 128-bit hexadecimal address. It contains 8 fields
separated by a colon, and each field is 16-bit in size.

Differences between IPv4 and IPv6


Ipv4 Ipv6

Address length IPv4 is a 32-bit address. IPv6 is a 128-bit address.

IPv4 is a numeric address IPv6 is an alphanumeric


that consists of 4 fields address that consists of 8
Fields
which are separated by fields, which are
dot (.). separated by colon.

IPv4 has 5 different


classes of IP address that
IPv6 does not contain
Classes includes Class A, Class B,
classes of IP addresses.
Class C, Class D, and Class
E.

IPv4 has a limited IPv6 has a large number


Number of IP address
number of IP addresses. of IP addresses.

It supports VLSM (Virtual


Length Subnet Mask).
Here, VLSM means that
VLSM It does not support VLSM.
Ipv4 converts IP
addresses into a subnet of
different sizes.
It supports manual,
It supports manual and DHCP, auto-
Address configuration
DHCP configuration. configuration, and
renumbering.

It generates 340
It generates 4 billion
Address space undecillion unique
unique addresses
addresses.

In IPv4, end-to-end In the case of IPv6, end-


End-to-end connection
connection integrity is to-end connection
integrity
unachievable. integrity is achievable.

In IPv4, security depends


on the application. This IP In IPv6, IPSEC is
Security features address is not developed developed for security
in keeping the security purposes.
feature in mind.

In IPv6, the
In IPv4, the IP address is
Address representation representation of the IP
represented in decimal.
address in hexadecimal.

Fragmentation is done by
Fragmentation is done by
Fragmentation the senders and the
the senders only.
forwarding routers.

It does not provide any It uses flow label field in


Packet flow
mechanism for packet the header for the packet
identification
flow identification. flow identification.

The checksum field is The checksum field is not


Checksum field
available in IPv4. available in IPv6.

On the other hand, IPv6 is


multicasting, which
Transmission scheme IPv4 is broadcasting.
provides efficient network
operations.
It does not provide
Encryption and It provides encryption and
encryption and
Authentication authentication.
authentication.

It consists of 8 fields, and


each field contains 2
Number of octets It consists of 4 octets. octets. Therefore, the total
number of octets in IPv6
is 16.

Transport layer and its func ons

Transport Layer
o The transport layer is a 4th layer from the top.
o The main role of the transport layer is to provide the communication
services directly to the application processes running on different
hosts.
o The transport layer provides a logical communication between
application processes running on different hosts. Although the
application processes on different hosts are not physically connected,
application processes use the logical communication provided by the
transport layer to send the messages to each other.
o The transport layer protocols are implemented in the end systems but
not in the network routers.
o A computer network provides more than one protocol to the network
applications. For example, TCP and UDP are two transport layer
protocols that provide a different set of services to the network layer.
o All transport layer protocols provide multiplexing/demultiplexing
service. It also provides other services such as reliable data transfer,
bandwidth guarantees, and delay guarantees.
o Each of the applications in the application layer has the ability to send
a message by using TCP or UDP. The application communicates by
using either of these two protocols. Both TCP and UDP will then
communicate with the internet protocol in the internet layer. The
applications can read and write to the transport layer. Therefore, we
can say that communication is a two-way process.
Services provided by the Transport Layer
The services provided by the transport layer are similar to those of the data link
layer. The data link layer provides the services within a single network while the
transport layer provides the services across an internetwork made up of many
networks. The data link layer controls the physical layer while the transport
layer controls all the lower layers.

The services provided by the transport layer protocols can be divided into
five categories:

o End-to-end delivery
o Addressing
o Reliable delivery
o Flow control
o Multiplexing
End-to-end delivery:
The transport layer transmits the entire message to the destination. Therefore,
it ensures the end-to-end delivery of an entire message from a source to the
destination.

Reliable delivery:
The transport layer provides reliability services by retransmitting the lost and
damaged packets.

The reliable delivery has four aspects:

o Error control
o Sequence control
o Loss control
o Duplication control

Error Control

o The primary role of reliability is Error Control. In reality, no


transmission will be 100 percent error-free delivery. Therefore,
transport layer protocols are designed to provide error-free
transmission.
o The data link layer also provides the error handling mechanism, but it
ensures only node-to-node error-free delivery. However, node-to-
node reliability does not ensure the end-to-end reliability.
o The data link layer checks for the error between each network. If an
error is introduced inside one of the routers, then this error will not be
caught by the data link layer. It only detects those errors that have
been introduced between the beginning and end of the link.
Therefore, the transport layer performs the checking for the errors
end-to-end to ensure that the packet has arrived correctly.
Sequence Control

o The second aspect of the reliability is sequence control which is


implemented at the transport layer.
o On the sending end, the transport layer is responsible for ensuring
that the packets received from the upper layers can be used by the
lower layers. On the receiving end, it ensures that the various
segments of a transmission can be correctly reassembled.
Loss Control

Loss Control is a third aspect of reliability. The transport layer ensures that all
the fragments of a transmission arrive at the destination, not some of them. On
the sending end, all the fragments of transmission are given sequence
numbers by a transport layer. These sequence numbers allow the receiver?s
transport layer to identify the missing segment.

Duplication Control

Duplication Control is the fourth aspect of reliability. The transport layer


guarantees that no duplicate data arrive at the destination. Sequence numbers
are used to identify the lost packets; similarly, it allows the receiver to identify
and discard duplicate segments.

Flow Control
Flow control is used to prevent the sender from overwhelming the receiver. If
the receiver is overloaded with too much data, then the receiver discards the
packets and asking for the retransmission of packets. This increases network
congestion and thus, reducing the system performance. The transport layer is
responsible for flow control. It uses the sliding window protocol that makes the
data transmission more efficient as well as it controls the flow of data so that
the receiver does not become overwhelmed. Sliding window protocol is byte
oriented rather than frame oriented.

Multiplexing
The transport layer uses the multiplexing to improve transmission efficiency.

Multiplexing can occur in two ways:

o Upward multiplexing: Upward multiplexing means multiple


transport layer connections use the same network connection. To
make more cost-effective, the transport layer sends several
transmissions bound for the same destination along the same path;
this is achieved through upward multiplexing.

o Downward multiplexing: Downward multiplexing means one


transport layer connection uses the multiple network connections.
Downward multiplexing allows the transport layer to split a
connection among several paths to improve the throughput. This
type of multiplexing is used when networks have a low or slow
capacity.
Addressing
o According to the layered model, the transport layer interacts with the
functions of the session layer. Many protocols combine session,
presentation, and application layer protocols into a single layer known
as the application layer. In these cases, delivery to the session layer
means the delivery to the application layer. Data generated by an
application on one machine must be transmitted to the correct
application on another machine. In this case, addressing is provided
by the transport layer.
o The transport layer provides the user address which is specified as a
station or port. The port variable represents a particular TS user of a
specified station known as a Transport Service access point (TSAP).
Each station has only one transport entity.
o The transport layer protocols need to know which upper-layer
protocols are communicating.
Reliable data transfer and flow control
Reliable Data Transfer (RDT) 1.0 works on a perfectly reliable channel,
that is, it assumes that the underlying channel has:
1. No bit errors and
2. No loss of packets
This transfer of data is shown by using FSM (finite state machine). In RDT
1.0, there is only one state each for sender and receiver.
Sender Side: When the sender sends data from the application
layer, RDT simply accepts data from the upper layer via
the rdt_send(data) event. Then it puts the data into a packet (via
the make_pkt(packet,data) event) and sends the packet into the channel
using the udp_send(packet) event.

RDT1.0: Sender side FSM

Receiving Side: On receiving data from the channel, RDT simply accepts
data via the rdt_rcv(data) event. Then it extracts the data from the packet
(via the extract(packet, data)) and sends the data to the application layer
using the deliver_data(data) event.
RDT1.0: Receiving Side FSM

No feedback is required by the receiving side as the channel is perfectly


reliable, that is, no errors are possible during the data transmission
through the underlying channel.

TCP AND UDP PROTOCOLS

What is the TCP?


The TCP stands for Transmission Control Protocol. If we want the
communication between two computers and communication should be good
and reliable. For example, we want to view a web page, then we expect that
nothing should be missing on the page, or we want to download a file, then we
require a complete file, i.e., nothing should be missing either it could be a text
or an image. This can only be possible due to the TCP. It is one of the most
widely used protocols over the TCP/IP network.

Features of TCP
The following are the features of the TCP:

o Data delivery
TCP protocol ensures that the data is received correctly, no data is
missing and in order. If TCP protocol is not used, then the incorrect
data can be received or out of order. For example, if we try to view the
web page or download a file without using TCP, then some data or
images could be missing.
o Protocol
TCP is a connection-oriented protocol. Through the
word connection-oriented, we understand that the computers first
establish a connection and then do the communication. This is done
by using a three-way handshake. In a three-way handshake, the first
sender sends the SYN message to the receiver then the receiver sends
back the SYN ACK message to confirm that the message has been
received. After receiving the SYN ACK message, the sender sends the
acknowledgment message to the receiver. In this way, the connection
is established between the computers. Once the connection is
established, the data will be delivered. This protocol guarantees the
data delivery means that if the data is not received then the TCP will
resend the data.

What is UDP?
The UDP stands for User Datagram Protocol. Its working is similar to the TCP
as it is also used for sending and receiving the message. The main difference is
that UDP is a connectionless protocol. Here, connectionless means that no
connection establishes prior to communication. It also does not guarantee the
delivery of data packets. It does not even care whether the data has been
received on the receiver's end or not, so it is also known as the "fire-and-forget"
protocol. It is also known as the "fire-and-forget" protocol as it sends the data
and does not care whether the data is received or not. UDP is faster than TCP
as it does not provide the assurance for the delivery of the packets.

Differences between the TCP and UDP


o Type of protocol
Both the protocols, i.e., TCP and UDP, are the transport layer protocol.
TCP is a connection-oriented protocol, whereas UDP is a
connectionless protocol. It means that TCP requires connection prior
to the communication, but the UDP does not require any connection.
o Reliability
TCP is a reliable protocol as it provides assurance for the delivery of
the data. It follows the acknowledgment mechanism. In this
mechanism, the sender receives the acknowledgment from the
receiver and checks whether the acknowledgment is positive or
negative. If the ACK is positive means, the data has been received
successfully. If ACK is negative, then TCP will resend the data. It also
follows the flow and error control mechanism.
UDP is an unreliable protocol as it does not ensure the delivery of the
data.
o Flow Control
TCP follows the flow control mechanism that ensures a large number
of packets are not sent to the receiver at the same time, while UDP
does not follow the flow control mechanism.
o Ordering
TCP uses ordering and sequencing techniques to ensure that the data
packets are received in the same order in which they are sent. On the
other hand, UDP does not follow any ordering and sequencing
technique; i.e., data can be sent in any sequence.
o Speed
Since TCP establishes a connection between a sender and receiver,
performs error checking, and also guarantees the delivery of data
packets while UDP neither creates a connection nor it guarantees the
delivery of data packets, so UDP is faster than TCP.
o Flow of data
In TCP, data can flow in both directions means that it provides the full-
duplex service. On the other hand, UDP is mainly suitable for the
unidirectional flow of data.
Let's look at the differences between the TCP and UDP in a tabular form.

TCP UDP

It stands for Transmission It stands for User


Full form
Control Protocol. Datagram Protocol.

It is a connection- It is a connectionless
Type of connection oriented protocol, which protocol, which means
means that the that it sends the data
connection needs to be without checking
established before the whether the system is
data is transmitted over ready to receive or not.
the network.

TCP is a reliable protocol UDP is an unreliable


as it provides assurance protocol as it does not
Reliable
for the delivery of data take the guarantee for
packets. the delivery of packets.

TCP is slower than UDP as


it performs error UDP is faster than TCP as
Speed checking, flow control, it does not guarantee the
and provides assurance delivery of data packets.
for the delivery of

The size of TCP is 20 The size of the UDP is 8


Header size
bytes. bytes.

TCP uses the three-way-


handshake concept. In
this concept, if the sender
UDP does not wait for any
receives the ACK, then
Acknowledgment acknowledgment; it just
the sender will send the
sends the data.
data. TCP also has the
ability to resend the lost
data.

It follows the flow control


mechanism in which too
This protocol follows no
Flow control mechanism many packets cannot be
such mechanism.
sent to the receiver at the
same time.

TCP performs error


checking by using a It does not perform any
checksum. When the error checking, and also
Error checking
data is corrected, then does not resend the lost
the data is retransmitted data packets.
to the receiver.
This protocol is used
This protocol is mainly where fast
used where a secure and communication is
reliable communication required and does not
Applications
process is required, like care about the reliability
military services, web like VoIP, game
browsing, and e-mail. streaming, video and
music streaming, etc.
Unit-IV: Applica on Layer and Security
Overview of the applica on layer and its func ons

Application Layer
The application layer in the OSI model is the closest layer to the end user which
means that the application layer and end user can interact directly with the
software application. The application layer programs are based on client and
servers.

The Application layer includes the following functions:


o Identifying communication partners: The application layer identifies
the availability of communication partners for an application with
data to transmit.
o Determining resource availability: The application layer determines
whether sufficient network resources are available for the requested
communication.
o Synchronizing communication: All the communications occur
between the applications requires cooperation which is managed by
an application layer.

Services of Application Layers


o Network Virtual terminal: An application layer allows a user to log on
to a remote host. To do so, the application creates a software
emulation of a terminal at the remote host. The user's computer talks
to the software terminal, which in turn, talks to the host. The remote
host thinks that it is communicating with one of its own terminals, so
it allows the user to log on.
o File Transfer, Access, and Management (FTAM): An application
allows a user to access files in a remote computer, to retrieve files from
a computer and to manage files in a remote computer. FTAM defines
a hierarchical virtual file in terms of file structure, file attributes and
the kind of operations performed on the files and their attributes.
o Addressing: To obtain communication between client and server,
there is a need for addressing. When a client made a request to the
server, the request contains the server address and its own address.
The server response to the client request, the request contains the
destination address, i.e., client address. To achieve this kind of
addressing, DNS is used.
o Mail Services: An application layer provides Email forwarding and
storage.
o Directory Services: An application contains a distributed database
that provides access for global information about various objects and
services.
Authentication: It authenticates the sender or receiver's message or
both.

Network Application Architecture


Application architecture is different from the network architecture. The
network architecture is fixed and provides a set of services to applications. The
application architecture, on the other hand, is designed by the application
developer and defines how the application should be structured over the
various end systems.

Application architecture is of two types:

o Client-server architecture: An application program running on the


local machine sends a request to another application program is
known as a client, and a program that serves a request is known as a
server. For example, when a web server receives a request from the
client host, it responds to the request to the client host.
Characteristics Of Client-server architecture:

o In Client-server architecture, clients do not directly communicate


with each other. For example, in a web application, two browsers do
not directly communicate with each other.
o A server is fixed, well-known address known as IP address because the
server is always on while the client can always contact the server by
sending a packet to the sender's IP address.
Disadvantage Of Client-server architecture:

It is a single-server based architecture which is incapable of holding all the


requests from the clients. For example, a social networking site can become
overwhelmed when there is only one server exists.

o P2P (peer-to-peer) architecture: It has no dedicated server in a data


center. The peers are the computers which are not owned by the
service provider. Most of the peers reside in the homes, offices,
schools, and universities. The peers communicate with each other
without passing the information through a dedicated server, this
architecture is known as peer-to-peer architecture. The applications
based on P2P architecture includes file sharing and internet
telephony.
Features of P2P architecture
o Self scalability: In a file sharing system, although each peer generates
a workload by requesting the files, each peer also adds a service
capacity by distributing the files to the peer.
o Cost-effective: It is cost-effective as it does not require significant
server infrastructure and server bandwidth.

Client and Server processes


o A network application consists of a pair of processes that send the
messages to each other over a network.
o In P2P file-sharing system, a file is transferred from a process in one
peer to a process in another peer. We label one of the two processes
as the client and another process as the server.
o With P2P file sharing, the peer which is downloading the file is known
as a client, and the peer which is uploading the file is known as a
server. However, we have observed in some applications such as P2P
file sharing; a process can be both as a client and server. Therefore, we
can say that a process can both download and upload the files.
Client server and peer-to-peer architecture
The main difference between peer-to-peer and client-server network, is that,
in a peer-to-peer network, every node can demand for services and deliver
services, but we if talk about client-server, in client-server, the client node can
demand for services and the server node can reply with services.

The device which is in the network can communicate with each other. There
are two types of network types one is peer-to-peer, and another is client-server.
In a client-server network, many clients can connect to a server. The clients
need services, and the server offers needed services. However, in a peer-to-peer
network, we don't have any clients or servers. Instead, all nodes can act as
clients or servers. In other words, every node can request services and deliver
services.

What is Client-Server Network?


A client-server network is also known as a network computing model. In this,
we have clients and servers. A client includes a device or a program. Using this,
end users can access the web. There are various examples of clients such as
web browsers, laptops, desktops, smartphones, etc. A server includes a
program or device that replies to the clients with the services. It
offers databases, files, web pages, and shared resources based on their type.

In a client-server network, the client requests services from the server. The
server reacts to client requests by rendering the necessary service after
listening to their queries. A client-server network's key benefit is that it is safer
because the server constantly controls access and security. Additionally,
making backups is simpler. However, it is not very dependable because a server
failure will impair the clients' ability to work. Additionally, the setup and
maintenance costs are high.

Client-Server Network Example


The World Wide Web consortium is one of the most well-known examples
of client-server architecture. In this, internet users, people like us, act as clients
requesting information from the servers, and the servers reply by providing the
precise information that was asked for.

Advantages of Client Server Network


The following are the advantages of client server network:

o The client-server network offers a good user interface, and can handle
files easily.
o In a client-server network, we can share the resources easily.
o Users have the freedom to access files stored in the central storage
from any location.
o The client-server network has complete control over all network
processes and activities because it is a centralised network.

What We Need to Know About Client-Server Network


The following is the list of some important things which we need to know about
the client-server network:

1. The main focus of the Client-Server Network is on information sharing. However,


the server can distribute its resources such as computing power or hard drive
space with the network.
2. Client-Server Network is more scalable and stable.
3. In order to store data in a client-server network, a centralized server is used. Data
backup and protection are made simpler by centralised file storage.
4. In Client-Server Network, client and server are distinct, and there are particular
servers and clients.
5. In Client-Server Network, the client requests a service, and the server provides
it.
6. It costs a lot of money to implement client-server. A separate computer must
be used to serve as the server, and because a server needs more processing
power, a high-performance machine is necessary.
7. The access time for a service is longer in client-server networks because more
client's requests services from a server.
8. If the number of clients increases, there are no performance issues with the
client-server setup. This is because the server handles most of the heavy lifting
and the clients are not needed to share their computing resources.
9. When compared to peer-to-peer networks, client-server networks are far more
secure. This is due to the server's ability to authenticate a client's access to any
network resource.
10. The clients in a client-server network reply on the server. The operation of every
client will be interfered with if the server fails. Hence it is unreliable.

Peer-to-Peer Network

This model does not distinguish between clients and servers; each node acts as
both a client and server. Every node in a peer-to-peer network has the ability
to request and provide service. A node is also called a peer.

In a peer-to-peer network, a node joins the network and begins offering


services, and then asks other nodes for services. Which node offers which
service can be determined using one of two ways. The service that a node offers
is registered with a centralised lookup service. Any node that needs a service
consults the centralised lookup to determine which node offers particular
facilities.

Then, communication occurs between the service-providing and service-


requesting nodes. In the alternative technique, a node that needs particular
services can broadcast a message to all other nodes that need the same service.
The node with the necessary service responds to the node making the request
by giving the desired service.
Peer-to-Peer networks have a number of benefits. It is simpler to keep up. To
maintain the network, no specialist expertise is required. One machine is not
the only thing that the network depends on. Additionally, the network setup
doesn't call for a lot of hardware. Peer-to-peer networks, on the other hand, lack
security significantly. Keeping an ordered file structure might be challenging
as well. Additionally, users are responsible for managing their own backups.

Peer-to-Peer Network Example


One of the most well-known peer-to-peer networks is torrent. All computer in
this kind of network is linked to the internet, allowing users to download
resources shared by any one computer.

The local area network (LAN), which is typically preferred by small workplaces
for the purpose of resource sharing, is another frequently used example of the
peer-to-peer network.

Advantages of Peer-to-Peer Network


The following are the advantages of peer-to-peer networks:

o Each device linked to the peer-to-peer network exchanges resources


with other network nodes.
o The setup of a peer-to-peer network is easily established with the help
of specialized software.
o Between several devices, resources are exchanged without any issues.
o Peer-to-peer networks are very reliable because other systems
continue to function even when a server fails.
o Being a part of a peer-to-peer network makes it simple for nodes to
share resources like a

What You Need to Know About Peer-To-Peer Network


1. The main focus of the peer-to-peer groups is on connectivity. We can mostly
find it in small offices and homes where centralized access to files or services is
unnecessary.
2. In a peer-to-peer network, every pair contains its own data, and the server is
decentralized.
3. It is less expensive to implement the peer-to-peer network. The simplest peer-
to-peer networks can be created by connecting two computers tother using an
Ethernet cable.
4. If the number of peers increases then, the peer-to-peer network would be less
stable,
5. In this network, the client and server cannot be distinguished.
6. In a peer-to-peer network, each node is able to request and respond to the
services.
7. Compared to a client-server network, the peer-to-peer network is less secure,
and it becomes trickier if the number of clients increases.
8. In a peer-to-peer network, there are multiple services-providing nodes hence it
is more reliable.
9. Since all resources in a peer-to-peer network are shared, performance issues are
quite likely to arise in the case of a large number of clients.
10. Because the service-providing nodes in a peer-to-peer network are dispersed,
the service-requesting nodes do not have a wait very long.

Difference Between Client-Server and Peer-to-Peer


Network

Basis of Comparison Client-Server Network Peer-to-Peer Network

In a client-server network, In a peer-to-peer network,


we have a specific server clients are not
Basic
and specific clients distinguished; every node
connected to the server. act as a client and server.

A Client-Server network
A Peer-to-Peer is less
Expense is more expensive to
expensive to implement.
implement.

It is less
It is more
stable and scalable, if the
Stability stable and scalable than
number of peers
a peer-to-peer network.
increases in the system.
In a client-server network, In a peer-to-peer network,
Data the data is stored in a each peer has its own
centralized server. data.

A server is not
A server may get
bottlenecked since the
overloaded when many
services are dispersed
Server customers make
among numerous servers
simultaneous service
using a peer-to-peer
requests.
network.

Focus Sharing the information. Connectivity.

The server provides the


Each node has the ability
requested service in
Service to both request and
response to the client's
delivers services.
request.

Because the server does Because resources are


the bulk of the work, shared in a big peer-to-
Performance performance is peer network,
unaffected by the growth performance will likely to
of clients. suffer.

A Client-Server network is
a secured network The network's security
because the server can deteriorates, and its
Security
verify a client's access to susceptibility grows as
any area of the network, the number of peers rises.
making it secure.

Key Differences Between Client-Server and Peer-


to-Peer Network
o The main distinction between client-server and peer-to-peer
networks is that client-server networks have a dedicated server and
specialised clients, whereas peer-to-peer networks allow any node to
operate as both a client and a server.
o The importance of connectivity between peers is greater in the peer-
to-peer architecture than in the client-server approach.
o In the client-server network, each peer has its own data, in contrast to
the client-server network, where data is stored on a single server.
o In the client-server network, the server gives the client services. Peer-
to-peer, on the other hand, allows each peer to both requests and
deliver services.
o The client-server network is more stable and scalable than a peer-to-
peer,
o The client-server network is more costly than peer-to-peer network.
o Peer-to-peer systems have distributed servers, which reduces the
likelihood that a server would become bottlenecked. Client-server
systems, on the other hand, have a single server that serves all the
clients, increasing the likelihood that a server will become
bottlenecked.
Common applica on layer protocols (HTTP, FTP, SMTP, DNS)

1. HTTP (Hypertext Transfer Protocol)


 Purpose: The foundation of data communication on the World Wide Web. It's
used for retrieving web pages, images, videos, and other web resources from
web servers.
 How it Works:
o Uses a client-server model. A web browser (client) sends a request to
a web server. The server responds with the requested resource (or an
error message).
o Uses requests and responses. Requests include methods like GET
(retrieve a resource), POST (submit data to a server), PUT (update a
resource), and DELETE (delete a resource).
o Stateless protocol. Each request is treated independently, without
knowledge of previous requests.
 Example: When you type a URL into your browser (e.g., [invalid URL
removed]), your browser sends an HTTP GET request to the web server
hosting that website. The server responds with the HTML, CSS, and
JavaScript that make up the web page.
 Port: 80 (default)
2. FTP (File Transfer Protocol)
 Purpose: Used for transferring files between a client and a server.
 How it Works:
o Uses a client-server model. An FTP client connects to an FTP server.
o Uses two connections: a control connection (for commands and
responses) and a data connection (for transferring the actual files).
o Supports various commands for uploading, downloading, deleting,
renaming, and listing files and directories.
 Example: Uploading files to a web server to host a website, or downloading
software from a file repository.
 Ports: 21 (control connection), 20 (data connection)
3. SMTP (Simple Mail Transfer Protocol)
 Purpose: Used for sending email messages between mail servers.
 How it Works:
o Uses a client-server model. A mail client (e.g., Outlook, Thunderbird)
connects to an SMTP server to send email.
o Uses commands to specify the sender, recipient, subject, and message
body.
o Relies on other protocols (like POP3 or IMAP) for retrieving email from
a mail server.
 Example: When you send an email using your email client, the client uses
SMTP to send the message to your mail server, which then relays it to the
recipient's mail server.
 Port: 25 (default)
4. DNS (Domain Name System)
 Purpose: Translates domain names (like [invalid URL removed]) into IP
addresses (like 192.168.1.1). This is essential because humans remember
names more easily than numbers, but computers use IP addresses to
communicate.
 How it Works:
o Uses a distributed database system. DNS servers are organized in a
hierarchy (root servers, top-level domain servers, authoritative name
servers).
o Uses a client-server model. A DNS resolver (usually provided by your
ISP) sends a query to a DNS server to resolve a domain name.
o Uses different types of DNS records (A records for IP addresses, MX
records for mail servers, etc.).
 Example: When you type a URL into your browser, your computer first
contacts a DNS server to get the IP address associated with that domain
name. Once it has the IP address, it can then connect to the web server using
HTTP.
 Port: 53 (UDP and TCP)
Key Differences Summarized:

Protocol Purpose Key Features Port(s)

Requests and responses,


HTTP Web page retrieval 80
stateless

Control and data connections,


FTP File transfer 21, 20
commands for file manipulation

Commands for specifying sender,


SMTP Sending email 25
recipient, etc.

Domain name to IP Distributed database, hierarchical


DNS 53
address translation structure, different record types

Network security threats and vulnerabili es

Threats

These are malicious actions that exploit vulnerabilities to cause harm to a network or
its data.

 Malware (Malicious Software): This is a broad category encompassing


various types of harmful software:
o Viruses: Self-replicating programs that spread by attaching
themselves to other files.
o Worms: Self-replicating programs that spread independently over
networks.
o Trojans: Disguise themselves as legitimate software to trick users into
installing them.
o Ransomware: Encrypts files and demands a ransom for their
decryption.
o Spyware: Secretly gathers information about users' activities.
o Adware: Displays unwanted advertisements.
 Phishing: Deceptive attempts to obtain sensitive information (usernames,
passwords, credit card details) by disguising as a trustworthy entity in
electronic communication.
 Denial-of-Service (DoS) and Distributed Denial-of-Service (DDoS)
Attacks: Overwhelm a network or server with traffic, making it unavailable to
legitimate users. DDoS attacks use multiple compromised devices (a botnet)
to launch the attack.
 Man-in-the-Middle (MitM) Attacks: An attacker intercepts communication
between two parties, potentially eavesdropping or manipulating the data being
exchanged.
 SQL Injection: Exploits vulnerabilities in web applications to inject malicious
SQL code, allowing attackers to access or manipulate database information.
 Zero-Day Exploits: Attacks that target previously unknown vulnerabilities in
software or hardware, for which no patch or fix is available.
 Social Engineering: Manipulating individuals into divulging confidential
information or performing actions that compromise security.
Vulnerabilities

These are weaknesses in a network or system that can be exploited by threats.

 Software Vulnerabilities: Bugs or flaws in software code that can be


exploited by attackers.
 Operating System Vulnerabilities: Weaknesses in operating systems that
can be exploited to gain unauthorized access.
 Network Configuration Vulnerabilities: Misconfigurations of network
devices (routers, firewalls) that create security holes.
 Weak Passwords: Easily guessable passwords that can be cracked by
attackers.
 Lack of Updates and Patching: Failure to install security updates and
patches leaves systems vulnerable to known exploits.
 Lack of Physical Security: Inadequate physical protection of network
devices can allow unauthorized access.
 Human Error: Mistakes made by users or administrators that can
compromise security.
Relationship between Threats and Vulnerabilities

Threats exploit vulnerabilities. A vulnerability is a weakness, while a threat is the


potential for that weakness to be exploited. For example, a software vulnerability
(like a buffer overflow) is a weakness, while a malware exploit that targets that
vulnerability is a threat.

Mitigating Threats and Vulnerabilities

Several measures can be taken to mitigate network security threats and


vulnerabilities:

 Firewalls: Control network traffic and block unauthorized access.


 Intrusion Detection/Prevention Systems (IDS/IPS): Monitor network traffic
for malicious activity and take action to block or prevent it.
 Antivirus and Anti-malware Software: Detect and remove malware from
systems.
 Regular Software Updates and Patching: Install security updates and
patches to fix known vulnerabilities.
 Strong Passwords and Multi-Factor Authentication: Use strong, unique
passwords and enable multi-factor authentication for added security.
 Network Segmentation: Divide the network into smaller subnetworks to limit
the impact of a security breach.
 Security Awareness Training: Educate users about security threats and
best practices.
 Regular Security Audits and Vulnerability Assessments: Identify and
address potential vulnerabilities before they can be exploited.
Cryptography and encryp on techniques

Cryptography is the practice and study of techniques for secure communication in


the presence of adversaries. Encryption is a core component of cryptography,
focusing on transforming information (plaintext) into an unreadable format
(ciphertext) to protect its confidentiality.

1. Basic Cryptography Concepts

 Plaintext: The original, readable data.


 Encryption Algorithm: A mathematical function that transforms plaintext into
ciphertext.
 Key: A secret value used by the encryption and decryption algorithms.
 Ciphertext: The encrypted, unreadable data.
 Decryption Algorithm: A mathematical function that transforms ciphertext
back into plaintext.
2. Types of Encryption
 Symmetric Encryption:
o Uses the same key for both encryption and decryption.
o Faster than asymmetric encryption.
o Key distribution is a challenge.
o Examples: AES, DES
 Asymmetric Encryption (Public-Key Cryptography):
o Uses two keys: a public key for encryption and a private key for
decryption.
o The public key can be freely distributed, while the private key must be
1

kept secret.
o Slower than symmetric encryption.
o Solves the key distribution problem.
o Examples: RSA

3. Common Encryption Techniques


 Substitution Ciphers:
o Replace characters or groups of characters with other characters or
symbols.
o Example: Caesar cipher (shifts each letter by a fixed number of
positions in the alphabet).

 Transposition Ciphers:
o Rearrange the order of characters in the plaintext.
o Example: Rail Fence cipher (writes the plaintext diagonally and then
reads it row by row).

 Modern Ciphers:
o Use complex mathematical operations and multiple rounds of
transformations.
o Examples:
 AES (Advanced Encryption Standard): A widely used
symmetric block cipher.
 RSA: A widely used asymmetric cipher.
4. Cryptographic Hash Functions
 Purpose: Create a fixed-size "fingerprint" (hash value) of a message or data.
 Characteristics:
o One-way function: It's computationally infeasible to reverse the hash
function to get the original data.
o Deterministic: The same input always produces the same hash value.
o Collision-resistant: It's computationally infeasible to find two different
inputs that produce the same hash value.
 Examples: SHA-256, MD5

5. Digital Signatures
 Purpose: Provide authentication and non-repudiation.
 How it works:
o The sender uses their private key to encrypt a hash of the message,
creating a digital signature.
o The receiver uses the sender's public key to decrypt the signature and
verify the message's authenticity and integrity.
Cryptography and encryption are essential tools for protecting sensitive information
in today's digital world. They are used in various applications, including secure
communication, data storage, and authentication.

Security protocols (SSL/TLS, IPSec, VPN)

1. SSL/TLS (Secure Sockets Layer/Transport Layer Security)


 Purpose: Provides secure communication over a network, primarily used for
securing web traffic (HTTPS).
 How it works:
o Operates at the Transport Layer (or slightly above).
o Uses encryption to protect data in transit.
o Provides authentication of the server (and optionally the client).
o Uses digital certificates to verify the identity of the server.
o Establishes a secure "handshake" between the client and server to
negotiate encryption parameters.
 Key Features:
o Encryption: Protects data confidentiality.
o Authentication: Verifies the identity of the communicating parties.
o Integrity: Ensures that data has not been tampered with during
transmission.
 Example: When you access a website with "https" in the URL, your browser
uses SSL/TLS to establish a secure connection with the web server.
 Relationship between SSL and TLS: TLS is the successor to SSL. SSL is
now considered outdated and insecure.
2. IPSec (Internet Protocol Security)
 Purpose: Provides secure communication at the Network Layer (IP Layer).
 How it works:
o Encrypts and/or authenticates IP packets.
o Can be used to create secure tunnels between networks (site-to-site
VPNs) or between a client and a network (remote access VPNs).
o Uses two main protocols:
 Authentication Header (AH): Provides data integrity and
authentication but not encryption.
 Encapsulating Security Payload (ESP): Provides encryption
and optional authentication and integrity.
o Uses Security Associations (SAs) to establish secure connections.
 Key Features:
o Encryption: Protects data confidentiality.
o Authentication: Verifies the identity of the communicating parties.
o Integrity: Ensures that data has not been tampered with during
transmission.
 Example: Used to create a secure connection between two branch offices of
a company over the internet.
3. VPN (Virtual Private Network)
 Purpose: Creates a secure connection over a public network (like the
internet), allowing users to access a private network as if they were directly
connected to it.
 How it works:
o Establishes an encrypted "tunnel" between the user's device and the
VPN server.
o Can use various underlying protocols, including SSL/TLS and IPSec.
o Masks the user's IP address, providing anonymity and privacy.
 Types of VPNs:
o Remote Access VPN: Allows individual users to connect to a private
network remotely.
o Site-to-Site VPN: Connects two or more networks together over the
internet.
 Key Features:
o Confidentiality: Encrypts data to protect it from eavesdropping.
o Authentication: Verifies the identity of the user or network.
o Integrity: Ensures that data has not been tampered with.
 Example: A remote employee using a VPN to securely access their
company's internal network.
Key Differences and Relationships:
 SSL/TLS vs. IPSec:
o SSL/TLS operates at the Transport Layer and is primarily used for
securing web traffic.
o IPSec operates at the Network Layer and can secure any IP traffic.
o SSL/TLS is often used for securing individual application sessions,
while IPSec is often used for securing entire networks or subnets.
 VPNs and SSL/TLS/IPSec:
o A VPN is a broader concept that can use various underlying protocols
to create a secure connection.
o SSL/TLS and IPSec are common protocols used to implement VPNs.
o An SSL VPN uses SSL/TLS for encryption and authentication.
o An IPSec VPN uses IPSec for encryption and authentication.

You might also like