Computer Networking
Computer Networking
Computer Networking
Channel Bandwidth:
Defines the range of frequencies a channel can carry. Measured in
Hertz (Hz), determines data rate capacity. Higher bandwidth
accommodates more data transmission simultaneously. Affected by
channel characteristics, modulation, and signal quality. Limited by
available spectrum and interference considerations.
Higher bandwidth supports faster data rates but requires more
resources.
Balances between data capacity, signal quality, and available
resources.
Propagation Time:
Time taken for a signal to travel from sender to receiver.
Affected by distance and speed of electromagnetic waves.
Influenced by transmission medium properties like refractive index.
Longer distances lead to increased propagation delays.
Propagation time = distance / propagation speed.
Critical for long-distance communication, impacts latency.
Cannot be eliminated but can be managed in network design.
Transmission Time:
Time required to send a message's bits onto a channel.
Determined by data rate and message size.
Transmission time = message size / data rate.
Higher data rates reduce transmission time.
Impacted by channel bandwidth and signal encoding efficiency.
Short messages transmit quickly, while longer messages take longer.
Part of overall latency in data communication.
Issues in Data Link Layer:
Error Detection and Correction:
Ensures data integrity by identifying and correcting transmission
errors. Utilizes techniques like checksums or cyclic redundancy
checks (CRC).
Flow Control:
Prevents data congestion by managing the pace of data transmission.
Techniques like Stop-and-Wait, Sliding Window control flow.
Media Access Control (MAC):
Manages fair access to shared communication channels among
devices. MAC protocols like CSMA/CD or CSMA/CA control
channel access.
Addressing and Frame Format:Defines how devices are addressed
and data is organized within frames. MAC addresses and frame
structures are crucial for proper communication.
Collision Detection and Avoidance:Detects and manages collisions
that occur when multiple devices transmit simultaneously. Protocols
like CSMA/CD ensure efficient channel usage.
Framing:Defines how data frames are created and separated. Adds
necessary control characters and synchronization bits for accurate
reception.
Flow Control in Data Link Layer:
Flow control ensures proper data flow between sender and receiver.
Important when sender and receiver have different processing
speeds.Coordinates frame transmission and prevents data overload.
Enables communication between stations with varying
speeds.Restricts sender's data transfer before receiving
acknowledgment from the receiver.
Approaches to Flow Control:
Feedback-based Flow Control:
Receiver acknowledges frames, allowing sender to transmit more
data.
Ensures efficient data transfer and processing coordination.
Rate-based Flow Control:
Limits sender's data rate to match receiver's capacity.
No feedback or acknowledgement needed from the receiver.
Flow Control Techniques:
Stop-and-Wait ARQ:
Alternating bit protocol for error control.
Sender waits for ACK before sending the next data packet.
Resends frame and waits for ACK if timeout occurs.
Sliding Window ARQ:
Used for continuous transmission error control.Go-Back-N ARQ:
Continues to transmit frames specified by window size without
ACK.Selective Repeat ARQ: Retransmits only suspected
lost/damaged frames.Go-Back-N ARQ: Transmits a set of frames,
retransmits all if any error occurs.Selective Repeat ARQ:
Retransmits only frames for which NAK (Negative
Acknowledgment) is received.
Error Control in Data-Link Layer:
Error control in data-link layer ensures accurate data transmission.
Not a strict requirement but optimization for reliability.
Detects, identifies, and retransmits lost/corrupted frames.
Prevents erroneous frames from reaching the receiver.
Automatic Repeat Request (ARQ) is used for retransmission.
Error Detection and Correction:Error Detection:
Purpose: Detects errors in data transmission caused by noise or
impairments.
Techniques: Utilizes methods to identify garbled, unclear, or
distorted data.
Importance: Ensures data integrity and reliability during
transmission.
Application: Commonly used in communication systems to ensure
accurate data transfer.
Error Correction:
Objective: Fixes errors in transmitted data, ensuring the original
message is reconstructed error-free.
Complexity: Error correction methods are expensive and technically
challenging.
Significance: Essential when data accuracy is crucial, but it requires
advanced algorithms.
Use Cases: Applied in scenarios where high data integrity is
paramount, such as critical communication systems.
HDLC (High-Level Data Link Control) Protocol:
HDLC is a synchronous data link layer protocol. It provides error
detection and correction during data transmission. HDLC uses a
frame-based structure for data encapsulation. It is widely used in
point-to-point and multipoint communication.
Features
Asynchronous and synchronous data transmission support.
Three types of stations: primary, secondary, and combined stations.
Full-duplex and half-duplex modes for data exchange.
Efficient flow control using sliding window technique.
Supports various frame types: Information, Supervisory, and
Unnumbered frames.
Merits
Efficient error detection and correction mechanism. Provides reliable
data transmission in both directions.
Demerits
HDLC lacks flexibility for interoperability between different
vendors' equipment.Complex implementation and configuration
compared to other protocols.
PPP (Point-to-Point Protocol):
PPP is a data link layer protocol used for point-to-point
communication.It is used to establish a direct connection between
two network nodes.PPP is often used for connecting a computer to
an Internet Service Provider (ISP).It supports multiple network layer
protocols, including IPv4 and IPv6.
Features
Provides authentication mechanisms for verifying the identity of
endpoints.Supports error detection and correction through cyclic
redundancy check (CRC).Negotiates link configuration parameters
such as maximum transmission unit (MTU).Supports various
network layer protocols using Network Control Protocols (NCPs).
Efficiently handles dynamic IP address allocation using PPPoE (PPP
over Ethernet).
Merits
Lightweight protocol suitable for low-bandwidth connections.
Supports various authentication methods, ensuring secure
connections.
Demerits
Limited to point-to-point connections, not suitable for broadcast
networks. Lacks built-in encryption, requiring additional security
mechanisms for data privacy.
Data Link Layer Functions:
Framing: Encapsulates Network Layer packets into frames for
transmission.
Addressing: Provides layer-2 hardware addressing, unique on the
link.
Synchronization: Ensures both machines are synchronized for data
transfer.
Error Control: Detects and recovers from transmission errors;
provides error reporting.
Flow Control: Enables data exchange at the same speed between
machines.
Multi-Access: Manages shared media access using mechanisms like
CSMA/CD.
Internetworking in Computer Network:
Interconnecting multiple networks to form a larger network.
Facilitating data exchange and communication between separate
networks.
Routers play a vital role in forwarding data packets.
Scalability and expansion of interconnected networks.
Utilizes protocols like IP for data delivery.
Enables global connectivity, as seen in the internet.
Network Layer Addressing Issues:
Assigning unique IP addresses to devices in a network.
Dealing with the hierarchical structure of IP addresses.
IPv4 exhaustion and transition to IPv6 addressing.
Network address translation (NAT) for private IP spaces.
Subnetting to divide IP address blocks into smaller segments.
Handling dynamic IP allocation through DHCP (Dynamic Host
Configuration Protocol).
Implementing CIDR (Classless Inter-Domain Routing) for efficient
IP address allocation.
Resolving IP address conflicts and managing address reservations.
IP address
IP address stands for "Internet Protocol address." It is a numerical
label assigned to each device connected to a computer network. IP
addresses are used to identify and locate devices in networks. They
consist of four sets of numbers separated by dots. IPv4 addresses use
32 bits, while IPv6 addresses use 128 bits. IPv4 addresses are more
common but running out due to growth. IPv6 addresses were
introduced to accommodate the expanding internet. IP addresses
enable communication and data exchange across the internet.
Class A:
Class A addresses have the first bit set to 0, indicating network
addresses.
They have a range of 0.0.0.0 to 127.255.255.255.
The first octet represents the network portion, and the remaining
three octets are for host addresses.
Class A addresses are used for large networks with a large number of
hosts.
They provide a maximum of 16,777,214 host addresses per network.
The default subnet mask for Class A addresses is 255.0.0.0.
Class A addresses are typically assigned to organizations with a large
number of hosts, such as internet service providers.
Class B:
Class B addresses have the first two bits set to 10, indicating
network addresses. They have a range of 128.0.0.0 to
191.255.255.255. The first two octets represent the network portion,
and the remaining two octets are for host addresses.
Class B addresses are used for medium-sized networks with a
moderate number of hosts. They provide a maximum of 65,534 host
addresses per network. The default subnet mask for Class B
addresses is 255.255.0.0. Class B addresses are typically assigned to
organizations with a moderate number of hosts and networks.
Class C:
Class C addresses have the first three bits set to 110, indicating
network addresses. They have a range of 192.0.0.0 to
223.255.255.255. The first three octets represent the network
portion, and the last octet is for host addresses. Class C addresses are
used for small networks with a limited number of hosts.
They provide a maximum of 254 host addresses per network.
The default subnet mask for Class C addresses is 255.255.255.0.
Class C addresses are commonly used for home networks and small
businesses.
Class D:
Class D addresses have the first four bits set to 1110, indicating
multicast addresses.
They have a range of 224.0.0.0 to 239.255.255.255.
Class D addresses are used for multicasting, where data is sent to a
group of devices simultaneously.
They are not assigned to individual devices or networks.
Class D addresses are used for applications such as streaming video
and audio.
Multicast addresses in Class D start with 224.0.0.0 for permanent
groups and 224.0.0.1 to 239.255.255.255 for dynamic groups.
Class D addresses are reserved for special purposes and not used for
regular unicast communication.
Private Addresses:
Used within private networks, not on the internet. Defined by RFC
1918 for IPv4. Examples: 10.0.0.0 - 10.255.255.255, 192.168.0.0 –
192.168.255.255. NAT hides them when communicating with the
internet. Can be reused across different private networks. Enables
many devices to share a single public IP. Provides an extra layer of
network security. Used for communication within specific
organizations.
Public Addresses:
Required for devices to access the internet. Allocated by Regional
Internet Registries (RIRs). Must be unique worldwide to avoid
conflicts. IPv4 shortage led to IPv6 adoption for more addresses.
IPv6 offers a large pool of unique public addresses. Routers use
them to forward traffic globally. Associated with domain names in
DNS for website access. Used for direct communication between
networks on the internet.
subnet mask
A subnet mask is a 32-bit number dividing IP into network and host
segments. It separates addresses using 0s for host bits and 1s for
network bits. Reserves "255" for broadcast, "0" for network; not for
host use. IP, subnet mask, gateway form an underlying structure for
inter-device communication. Subnetting uses subnet masks to divide
IP addresses for efficient subnetworking. The term "mask" implies
using a 32-bit number to separate addresses.
K
Subnetting
Subnetting divides physical network into logical sub-networks
(subnets).Facilitates network expansion without new network
numbers.Reduces traffic, hides complexity, essential for LAN
portions.Subnets are smaller interconnected parts of a larger
network.Enhances efficiency by avoiding unnecessary traffic routes.
Purpose is to establish quick, efficient, robust computer networks.
Subnetting prevents congestion, optimizes traffic pathways.
Subnets enable efficient communication between devices via routers.
Working of Subnetting
Subnetting involves breaking an IP address for efficient network
utilization. IP divided into network and host parts, using subnet
mask. Subnet mask separates by turning network bits to '1' and host
bits to '0'. Subnetting enables creation of smaller sub-networks
within a larger network. Helps manage IP addresses effectively,
reducing wastage. Subnetting improves network performance,
routing efficiency, and scalability.
Merits of Subnetting:
Subnetting prevents IP address wastage, optimizing address space.
Reduces traffic by segmenting network, improving data
transmission.Isolation of subnets enhances network security and
management.
Demerits of Subnetting:Subnetting requires careful planning and
configuration, potentially complex. Managing multiple subnets
increases administrative overhead. Subnetting can add complexity to
routing configurations and maintenance.
Classless Addressing:
Classless addressing, also called Classless Inter-Domain Routing
(CIDR), is an improved IP addressing system. It increases the
effectiveness of IP address allocation because of the absence of class
distribution.
Structure
The CIDR block comprises two parts. These are as follows:
Block id is used for the network identification, but the number of
bits is not pre-defined as it is in the classful IP addressing scheme.
Host id is used to identify the host part of the network.
Notation
CIDR IP addresses look as follows:
w.x.y.z/n
In the example above,w,x,y,z each defines an 8-bit binary number,
whilentells us about the number of bits used to identify the network
and is called an IP network prefix or mask.
Rules
Requirements for CIDR are defined below:
Addresses should be contiguous.
The number of addresses in the block must be in the power of 2.
The first address of every block must be divisible by the size of the
block.
Block information
Given the following IP address, let's find the network and host bits.
200.56.23.41/28
The following illustration gives a clear understanding of the
aforementioned IP address scheme:
nh=24
Classful Address:
Introduced in 1981 as the initial Internet Protocol addressing system.
Replaced by Classless Inter-Domain Routing (CIDR) in 1993.
IP address consists of 32 bits, divided into four sections.
Each section is eight bits (1 byte) long.
Divided into network ID and host ID.
Types of Classful Address:
Class A: Intended for large networks with a huge number of hosts.
Uses the first octet (8 bits) for the network ID.
Can accommodate up to 16 million hosts in each of its networks.
Class B: Suited for medium-sized networks.
Uses the first two octets for the network ID.
Can accommodate around 65,000 hosts in each network.
Class C: Designed for smaller networks.
Uses the first three octets for the network ID.
Can host up to 254 hosts in each network.
Class D: Reserved for multicast groups.
Starts with '1110' in the first four bits.
Used for sending data to multiple recipients simultaneously.
Class E: Reserved for experimental purposes.
Starts with '1111' in the first four bits.
Not intended for regular networking operations.
Classless Addressing
Aspect Classful Addressing
(CIDR)
Division of Fixed divisions into Variable division based on
Address Space classes (A, B, C, D, E) subnet masks
Limited subnetting Extensive subnetting and
Subnetting
capabilities supernetting
Address Fixed length address Variable length address
Format format format
Inefficient IP address Efficient usage of IP
Efficiency
allocation addresses
Often results in address Minimizes address
Wastage
wastage wastage
Relies on class-based Enables route aggregation
Routing
routing for efficient routing
Limited flexibility in Provides greater flexibility
Flexibility
address assignment in addressing
Implementatio Legacy system, less Modern approach,
n adaptable adaptable and scalable
IPv4 Overview:
IPv4 stands for Internet Protocol version 4. Introduced in ARPANET
in 1983. IPv4 addresses are 32-bit integers expressed in decimal
notation. IPv4 address like 192.0.2.126 is a 32-bit numeric identifier.
Parts of IPv4:
Network part: Identifies network and its class, like 192 in
192.0.2.126.
Host Part: Identifies unique machine within the network, like 2 in
192.0.2.126.
Subnet number: Optional, used for dividing large networks into
subnets.
Characteristics of IPv4:
32-bit IP address with dot-separated numeric format.
12 header fields with a 20-byte header length.
Supports Unicast, Broadcast, and Multicast addresses.
Supports VLSM.
Uses ARP for MAC address mapping.
Uses RIP for routing.
Advantages of IPv4:
Offers encryption for security.
Wide router support.
Simplifies device connection.
Provides efficient data transfer.
Allows redefinition of addresses.
Enhances routing scalability.
Specific data communication in multicast.
Limitations of IPv4:
Limited unique IP addresses.Depletion of IP address pool.
Requires new class for additional hosts.
Complex configuration and renumbering.
Large routing tables, security, and other limitations.
IPv6 introduced to overcome these limitations.
IPv6 Overview:
IPv6 developed to address IPv4 exhaustion issue by IETF. IPv6 has
128-bit address space, uses hexadecimal format with colons.
IPv6 Components:
Consists of 8 groups, each representing 2 bytes (16 bits). Hex-digits
(nibbles) are 4 bits each. Address groups are separated by colons (:).
Need for IPv6:
Rising devices, Internet of Things (IoT) led to IPv4 exhaustion. IPv6
addresses issues: processing slowness, multimedia support, security.
IPv6 Advantages:
Realtime Data Transmission: Enables rapid, live data transmission
(e.g., live streaming).
Authentication Support: Ensures data integrity and origin
verification.
Encryption Capability: Encrypts data at network layer, augmenting
security.
Faster Router Processing: Smaller header speeds up routers' packet
handling.
Types of IPv6 Addresses:Unicast: Single node identification (e.g.,
sender or receiver).Multicast: Group of devices, efficient for
multimedia distribution.Anycast: Assigned to interfaces, delivered
to nearest member.
Advantages of IPv6:Vast Address Space: 128-bit address,
overcomes IPv4's address shortage.Enhanced Header Format:
Streamlined header, quicker routing.New Functionalities: Supports
new options for additional features.Scalability & Extension:
Adaptable for future technologies.Resource Allocation: Traffic
class, flow label for specific handling.Security Enhancement:
Encryption and authentication options.
Disadvantages of IPv6:Transition Complexity: Shift from IPv4 to
IPv6 challenging.Intercommunication: IPv4 and IPv6 devices need
intermediaries to communicate.
IPv4 IPv6
IPv4 has a 32-bit address length IPv6 has a 128-bit address length
It Supports Manual and DHCP It supports Auto and renumbering
address configuration address configuration
In IPv4 end to end, connection In IPv6 end-to-end, connection
integrity is Unachievable integrity is Achievable
9 The address space of IPv6 is quite
It can generate 4.29×10 address
large it can produce 3.4×1038
space
address space
The Security feature is dependent IPSEC is an inbuilt security
on the application feature in the IPv6 protocol
Address representation of IPv4 is Address Representation of IPv6 is
in decimal in hexadecimal
Fragmentation performed by In IPv6 fragmentation is
Sender and forwarding routers performed only by the sender
In IPv6 packet flow identification
In IPv4 Packet flow identification
are Available and uses the flow
is not available
label field in the header
In IPv4 checksum field is In IPv6 checksum field is not
available available
Routing type and its necessity
Routing is process of choosing path for data transfer. Routers
forward packets using header info and tables. Algorithms decide
optimal path using metrics like hop count. Routing protocols employ
metrics for best path determination. Routing occurs at network layer
(OSI) or internet layer (TCP/IP).
Dynamic Routing:
Automatically adjusts paths based on real-time network conditions.
Optimizes data transmission by selecting efficient routes
dynamically. Reduces manual configuration efforts compared to
static routing methods. Enhances network adaptability and resilience
to changing topology and congestion. Adapts to network changes,
improving overall efficiency and performance.
Merits of Dynamic Routing:
Efficient adaptation to changing network conditions.
Real-time adjustments for improved reliability.
Reduced manual configuration, easing network management.
Demerits of Dynamic Routing:
Increased complexity due to advanced setup.
Resource-intensive calculations impact network performance.
Vulnerabilities and errors due to protocol dependencies.
Static routing
Static routing is a manual network configuration method. Routes are
pre-defined, don't adapt to network changes. Simple setup, suitable for
small networks with stable topologies. Limited scalability, manual
updates required for any network changes. Less overhead, faster
routing decisions, but lacks flexibility.
Merits of Static Routing:
Simplicity: Easy to configure, suitable for small networks.
Lower Overhead: Minimal network traffic used for routing updates.
Predictable: Stable routes, as they don't change automatically.
Demerits of Static Routing:
Scalability: Inefficient for large networks with frequent changes.
Maintenance: Manual updates needed for topology changes.
Suboptimal Routes: Cannot adapt to network congestion or failures.
Shortest Path Routing Algorithm:
Calculates path with least distance between source and destination.
Utilizes metrics like hop count, distance, or cost of links. Dijkstra's
algorithm is a popular shortest path method. Dijkstra's algorithm
maintains a list of visited and unvisited nodes. It iteratively selects the
node with the smallest distance. Updates distances and predecessors to
determine optimal route. Bellman-Ford algorithm handles negative
edge weights.Used in OSPF, RIP, and other network routing protocols.
Transport Layer:
Fourth layer of OSI model, focuses on end-to-end communication.
Manages data segmentation, reassembly, and error correction.
Provides flow control to prevent overwhelming receivers.
Handles port addressing for process-to-process communication.
Supports both connection-oriented (TCP) and connectionless (UDP)
protocols.
TCP ensures reliable, ordered, and error-checked data delivery.
UDP offers faster but less reliable data transmission.
Facilitates multiplexing and demultiplexing of data streams.
Congestion Control in Transport Layer:
Manages network congestion to maintain optimal data flow.
Prevents network overload that can degrade performance.
Uses mechanisms to detect and handle congestion situations.
Slows down sending rate to avoid overwhelming network resources.
TCP uses sliding window and acknowledgment techniques for
control.AIMD algorithm adjusts congestion window size based on
network feedback.RED, a queue management method, drops packets
to signal congestion.Ensures fair sharing of network resources
among competing connections.
Congestion Control Algorithm - Open Loop Solutions:
Static allocation of resources without real-time feedback.Fixed
bandwidth allocation for each flow or connection.Suitable for
predictable and consistent traffic patterns.Lacks adaptability to
changing network conditions and traffic spikes.Efficient for
dedicated networks with known traffic characteristics.Less
responsive to dynamic congestion situations.Examples: Fixed Time
Slot, Priority Schemes, Pre-allocated Bandwidth.May lead to
underutilization or overutilization in varying scenarios.
Congestion Control Algorithm - Closed Loop Solutions:
Adapts to network conditions using real-time feedback.
Adjusts resource allocation based on network performance
indicators.More efficient in handling varying traffic loads and
congestion scenarios.Utilizes feedback from routers, switches, and
endpoints to make decisions.Ensures better resource utilization and
reduced congestion occurrences.Requires more complex
mechanisms for data flow management.
Examples: TCP AIMD, RED (Random Early Detection), AQM
(Active Queue Management).
Improves responsiveness and fairness in dynamic network
environments.
Leaky Bucket Algorithm:
Controls data rate by allowing a fixed number of packets.
Incoming packets fill the "bucket," excess packets are discarded.
Provides traffic shaping and prevents bursts of data.
Smooths traffic by releasing packets at a constant rate.
Suitable for limiting outgoing traffic to a specific rate.
Can lead to latency for bursty traffic if bucket is small.
Effective for maintaining consistent bandwidth usage.
Prevents network congestion and improves QoS.
Token Bucket Algorithm:
Regulates data flow by granting tokens at a fixed rate.
Tokens represent permission to send a certain amount of data.
Unused tokens accumulate, allowing bursts within token limit.
Controls both average and peak data rates effectively.
Used to shape outgoing traffic and maintain desired bandwidth.
Dynamic token generation handles varying traffic demands.
Ensures fairness by controlling access to network resources.
Widely used in network traffic management and QoS mechanisms.
Flow Control:
Definition: Management of data flow between devices or nodes in a
network to ensure efficient handling.
Challenge: Preventing data overflow due to fast transmission,
causing data loss or retransmission.
Importance: Essential to manage communication efficiency and
prevent congestion.
Scenario: Sender's high data rate and slower receiver can lead to
issues.
Solution: Implement flow control to match sender and receiver
capabilities.
Benefits: Ensures data integrity, prevents congestion, and optimizes
network performance.
Approaches:
Feedback-Based: Receiver sends signals to sender for permission to
send or indicates receiver's status.
Rate-Based: Built-in mechanism in protocol restricts sender's
transmission rate without receiver feedback.
Examples:
Xon-Xoff: Asynchronous serial connection protocol; sender syncs
with receiver's buffer status.
Feedback-Based (Data Link Layer): Receiver provides permission
or status to sender for data transmission.
Rate-Based (Network Layer): Protocol rules limit sender's
transmission until receiver permits continuation.
Quality of Service (QoS):
Definition: Manages data traffic to reduce packet loss, latency, and
jitter.
Objective: Control network resources, set data priorities for optimal
performance.
Needs for QoS:
Video/audio conferencing: Bounded delay and loss rate.
Streaming: Bounded packet loss, less sensitive to delay.
Time-critical apps: Bounded delay crucial (real-time control).
Valuable apps: Better services for important apps.
QoS Specification:
Delay: Time taken for data from source to destination.
Jitter: Variation in packet delay; low jitter preferred.
Throughput: Data transfer rate.
Error Rate: Level of data transmission errors.
IMPORTANCE
Reliability:
Impact of lost packets; retransmission needed.
Varies by application (e.g., email vs. audio conferencing).
Delay:
Significant for real-time apps (audio conferencing).
Tolerable for non-real-time apps (email, file transfer).
Jitter:
Variation in packet delay; low jitter preferred.
High jitter causes inconsistency (unacceptable for telephonic
conversation).
Bandwidth:
Varies for different applications.
Video conferencing demands higher bandwidth than email.
TCP (Transmission Control Protocol):
Reliable data delivery by using acknowledgment and retransmission.
Connection-oriented protocol with three-way handshake for setup.
Error-checking using checksum to ensure data integrity.
Data sequencing for ordered and accurate delivery.
Flow control prevents overwhelming receiver using windowing
mechanism.
Slower due to overhead in error-checking and sequencing.
Suitable for applications requiring data integrity, e.g., web browsing.
Used in applications like HTTP, FTP, email, and file sharing.
Guarantees delivery but can face delays due to retransmissions.
TCP is heavier and consumes more network resources.
UDP (User Datagram Protocol):
Connectionless and lightweight, minimal overhead, and no handshake.
Does not guarantee delivery or order of packets. No error-checking or
retransmission, data integrity is application's responsibility. Suitable for
applications requiring speed over reliability. Used in real-time
applications like video streaming, online gaming. Faster due to lack of
error-checking and retransmission delays. Broadcasts and multicasts are
easily facilitated with UDP. Minimal overhead, suitable for small data
packets and voice data. Examples include DNS, VoIP, DHCP, and some
gaming protocols. More suitable for applications where speed is crucial
but data loss is acceptable.
Feature TCP UDP
Connecti
Connection-oriented Connectionless
on
Reliabilit Reliable data delivery, No guaranteed delivery, no
y retransmissions retransmissions
Guarantees ordered data
Order No guarantee of ordered data
delivery
Error Uses checksum for error
No error-checking
Checking detection
Flow Uses windowing for flow
No built-in flow control
Control control
Slower due to error-
Speed Faster due to lack of overhead
checking and sequencing
Applicati Web browsing, file transfer, Real-time streaming, online
ons email gaming
Higher due to error- Lower due to minimal
Overhead
checking and sequencing overhead
Data High, guarantees data Depends on application's
Integrity integrity handling
Use Applications requiring
Applications prioritizing speed
Cases reliability
HTTP, FTP, email, data Video streaming, VoIP, online
Examples
synchronization gaming
Application Layer:
Closest OSI layer to users; enables direct user-software interaction.
Manages client-server model for data communication between
applications.Identifies available communication partners and checks
network resource availability.Coordinates communication
synchronization for applications requiring cooperation. Supports
network virtual terminals, file management, addressing, mail,
directory, authentication.
Functions/Services within Application Layer:
Network Virtual Terminal: Emulates remote terminal for user
logins. File Transfer, Access, and Management (FTAM): Access,
retrieve, manage files on remote systems. Addressing: Establishes
client-server communication by assigning addresses.
Mail Services: Facilitates email forwarding, storage, and retrieval.
Directory Services: Provides distributed databases for global object
and service information. Authentication: Verifies sender/receiver
message authenticity; ensures secure communication.
SMTP (Simple Mail Transfer Protocol):
Facilitates email sending and receiving, operates on application
layer. Uses TCP for communication, relies on port 25 for
connections.Involves client-server interaction, transmits messages
between mail servers. Vulnerable to spam and email spoofing, lacks
inherent encryption. SMTPS and STARTTLS provide encryption
options for enhanced security. Utilizes commands like HELO, MAIL
FROM, RCPT TO for message flow. Supports MIME encoding,
allows attachments, and multimedia email content. Forms the basis
for electronic communication, crucial for online correspondence. An
integral part of the Internet's email delivery infrastructure.
FTP (File Transfer Protocol):Enables file sharing across networks,
operates on the application layer.Utilizes separate control and data
connections for efficient data transfer. Requires authentication for
secure access, supports anonymous logins.Vulnerable to data
interception due to lack of encryption in standard form.
Active mode initiates connections from the client, passive mode
mitigates issues. Commonly uses port 21 for control, may employ
other ports dynamically. SFTP and FTPS variants provide encryption
for safer file transfers.Involves commands like RETR, STOR, LIST
for file manipulation on servers. Integral for data exchange, widely
used for uploading and downloading files.
DHCP (Dynamic Host Configuration Protocol):
Automates IP allocation, simplifies network setup, operates on
application layer. Leases include IP, subnet, gateway, DNS server
addresses, reducing conflicts. DHCP server assigns temporary IP
addresses dynamically upon device connection.Streamlines IP
management, updates configurations, supports IPv4 and IPv6.
Involves discovery, offer, request, acknowledgment stages during
address assignment. DHCP relay forwards client requests across
network segments for efficient allocation. Prevents rogue DHCP
servers through DHCP snooping security measures. Enhances
network scalability, eases administration by managing IPs centrally.
Essential for modern networks, facilitating seamless device
connectivity and communication.
DNS (Domain Name System):
Translates domains to IPs, hierarchical structure, resolves human-
readable names.Utilizes recursive and iterative queries, operates on
distributed global servers.Employs A, CNAME, MX records to map
domains to IP addresses.Prevents the need to remember numerical
IPs, simplifies web navigation.Vulnerable to cache poisoning
attacks, DNSSEC adds digital signatures for security.Serves as a
backbone for internet navigation, crucial for browsing.Transforms
user-friendly domain names into IP addresses understood by
machines. Enhances web efficiency by swiftly resolving URLs to
corresponding IP addresses.Integral for accessing websites, emails,
and various online services.
HTTP (Hypertext Transfer Protocol):
Foundation of web communication, operates on application layer,
client-server interaction. Facilitates data exchange between web
browsers and servers, uses URLs. Stateless, independent requests,
supports methods like GET, POST, PUT. Allows cookies for session
management, evolved into HTTP/2 for speed.HTTPS encrypts data
using SSL/TLS, securing online transactions and privacy. Defines
how requests, responses formatted, enabling browsing and content
retrieval. Critical for browsing, retrieving resources, underlies the
World Wide Web. Empowers dynamic web content, APIs,
multimedia streaming, and e-commerce. Evolving protocols improve
web performance, ensuring efficient data transfer.
WWW (World Wide Web):
Network of interlinked hypertext documents, accessible via web
browsers. Sir Tim Berners-Lee's innovation, revolutionized global
information sharing. Relies on HTTP for communication, URLs
identify and locate resources. Hyperlinks connect web pages,
enabling seamless navigation and content discovery. Comprises web
servers hosting content, clients accessing through browsers. Utilizes
HTML, CSS, JavaScript for structuring and interactivity, multimedia
integration. Spans diverse domains: education, business,
entertainment, research, and more. Transformed society's
communication, economy, access to knowledge, and entertainment.
Foundation of modern digital experience, shaping modern lifestyles
and interactions.
Confidentiality:
Ensures data privacy, limits access to authorized individuals,
guarding sensitive information. Encryption safeguards data during
transmission and storage, preventing unauthorized decryption.ole-
based access controls restrict data exposure, granting privileges
based on roles. Non-disclosure agreements protect sensitive
information shared among parties.User authentication and strong
passwords prevent unauthorized access to confidential data.
Data masking, redaction, or anonymization techniques shield
sensitive details from exposure. Regular security audits identify
vulnerabilities, ensuring compliance with privacy regulations.
Protected communication channels, secure sockets layer (SSL),
transport layer security (TLS). Crucial for safeguarding personal,
financial, medical, and classified data.
Integrity:Ensures data accuracy, preventing unauthorized
modification, maintaining information reliability. Hashing ensures
data integrity by generating unique checksums for
verification.Digital signatures validate sender authenticity, detect
tampering, and ensure data integrity.Access controls and change
management limit authorized users from altering critical data.
Database constraints prevent unauthorized data modification,
maintaining data consistency. Regular backups and redundancy
strategies safeguard data against loss and corruption.Intrusion
detection systems monitor for unauthorized alterations and raise
alerts.Audit trails track data changes, aiding in forensic
investigations and accountability.Critical for financial, legal,
healthcare systems, maintaining trust and operational efficiency.
Availability:Ensures systems, data, services accessible when
needed, minimizing downtime impact.Redundancy, failover
mechanisms prevent single points of failure, ensuring continuous
operation.Load balancing distributes traffic, prevents server
overload, and enhances system availability.Data replication across
geographically dispersed servers ensures data accessibility and
resilience.Disaster recovery plans, backups, and business continuity
strategies maintain service availability.DDoS protection mitigates
malicious attacks, preserving system and service availability.Cloud-
based solutions offer scalable resources, ensuring high availability
and fault tolerance.Monitoring systems proactively detect and
address issues, minimizing service disruption.Essential for e-
commerce, critical infrastructure, communication networks, and
public services.
DIGITAL SIGNATURE
Validates sender and message integrity in networks for secure
communication.Hashing transforms messages, private key signs for
unique identification.Prevents denial of sending by creating distinct,
verifiable signatures.Recipient confirms authenticity through
verification with sender's public key.Detects even subtle message
alterations, ensuring data integrity during transmission.Legally
recognized for validity, lending credibility to electronic
transactions.Guards against unauthorized changes, securing
documents, transactions, and communication.Enhances
accountability by confirming sender identity and message
integrity.Utilizes cryptographic principles, key pairs, and hashing
algorithms for implementation.
firewalls
Security barrier controlling traffic flow between networks. Filters
data based on preset rules for access control. Blocks unauthorized
access, viruses, malware, cyber threats. Segments networks to hinder
lateral movement of attackers. Enforces security policies, enhancing
overall network safety and integrity.
application areas for firewalls:
Network Security: Firewalls protect networks from external threats,
unauthorized access, and attacks.
Perimeter Protection: They secure the entry point of a network,
defending against malicious traffic.
Web Filtering: Firewalls restrict access to certain websites,
ensuring safe and productive browsing.
Intrusion Prevention: They identify and block suspicious activities,
preventing potential breaches.
Remote Access Security: Firewalls safeguard remote connections,
maintaining data confidentiality and integrity.
Merits: Enhanced Security: Firewalls provide a strong line of
defense against unauthorized access, cyber threats, and attacks,
safeguarding sensitive data. Access Control: They enable precise
control over incoming and outgoing network traffic, allowing
organizations to enforce security policies effectively.
Demerits: False Sense of Security: Relying solely on firewalls
might lead to neglecting other security aspects, leaving
vulnerabilities unnoticed. Complex Configuration: Proper
configuration requires expertise; misconfigurations can lead to
security gaps or operational issues.Inadequate Against Advanced
Threats: Sophisticated attacks can bypass or evade firewalls,
necessitating additional security measures.
here are three types of firewalls
1. Packet Filtering Firewall:Examines packets based on defined
rules. Filters packets by source, destination IP addresses, and port
numbers. Fast processing, suitable for simple traffic filtering.
Limited in dealing with complex attacks and application-layer
filtering. Generally found in routers, less resource-intensive.
2. Stateful Inspection Firewall:Tracks the state of active
connections and enforces policies. Makes decisions based on the
context of the traffic. Offers better security by analyzing packet
history and state. More resource-intensive but effective against
certain attacks.Can provide better protection for modern network
threats.Balances between packet filtering and deep inspection.
3. Application Layer Firewall (Proxy Firewall):Operates at the
application layer, inspects full content of packets. Acts as an
intermediary between internal and external systems. Provides
detailed analysis of traffic, identifying application-specific
threats.Offers better control over applications and content.Can cache
content for improved performance.Slower due to in-depth analysis,
suitable for critical security zones.Remember that advancements in
technology might have led to variations and combinations of these
types in modern firewalls for improved security and efficiency.
VPN (Virtual Private Network):
Secure Network Connection: Establishes a secure, encrypted
connection over a public network. Privacy and Anonymity: Masks
user's IP address, ensuring online anonymity. Remote Access:
Enables users to access a private network remotely, as if on-site.
Data Encryption: Encrypts data transmissions, safeguarding
sensitive information from interception. Bypassing Geo-Restrictions:
Allows users to access region-restricted content by appearing from
another location.
Applications of VPN:
Remote Work: Facilitates secure remote access to a company's
network. Online Privacy: Shields personal data from ISPs and
potential cyber threats. Bypassing Censorship: Allows access to
restricted content in certain regions. Public Wi-Fi Security: Encrypts
data on public networks, preventing data theft. International
Business: Enables secure communication and data sharing across
borders.
Merits of VPN:
Enhanced Security: Encrypts data, preventing unauthorized access
and eavesdropping. Anonymity: Masks IP addresses, ensuring
privacy and protecting against tracking.
Demerits of VPN:
Speed Reduction: Encryption can lead to slower connection speeds.
Dependency on Provider: VPN performance relies on the quality of
the service.
Types of VPN:
1. Remote Access VPN:
Allows individual users to connect securely to a corporate network.
Ideal for remote workers and employees traveling frequently.
Provides access to internal resources without exposing them to the
public internet. Typically uses SSL or IPsec for encryption. Offers
seamless access to resources as if connected locally. Limited in
scalability for large-scale implementations.
2. Site-to-Site VPN (Intranet-based):
Connects multiple networks in different locations. Used by
businesses with multiple branches to create a unified network.
Utilizes routers or firewalls to establish secure tunnels between sites.
Provides consistent access and resource sharing across locations.
Scalable but may require dedicated hardware and configuration.
Suitable for organizations needing centralized management and data
sharing.
3. Extranet-based VPN:
Extends a private network to external partners, suppliers, or
customers.
Enables controlled access to specific resources for authorized
parties.
Enhances collaboration while maintaining security and segregation.
Requires careful access control and security measures to prevent
breaches.
Balances security and communication needs in a controlled manner.
Useful for business-to-business collaborations and sharing sensitive
data.
Wireless Security Threats:
Eavesdropping: Unauthorized interception of wireless
communication.
Unauthorized Access: Intruders gaining network entry without
permission.
Rogue Access Points: Unauthorized points imitating legitimate ones,
posing risks.
Data Interception: Capture of sensitive data during wireless
transmission.
Jamming: Intentional signal interference disrupting wireless
connectivity.
Malware Distribution: Spread of malicious software through
vulnerable devices.
Authentication Attacks: Cracking weak authentication for
unauthorized access.
Man-in-the-Middle (MitM): Intercepting and altering data between
parties.
Denial of Service (DoS): Overloading networks, causing service
disruptions.
Mitigation Techniques:
Encryption: Implement strong encryption like WPA3 to protect data.
Access Control: Use MAC filtering, robust authentication for
authorized users.
Intrusion Detection Systems (IDS): Monitor and detect suspicious
activities.
Regular Updates: Keep devices and access points patched and up-to-
date.
Network Segmentation: Divide networks to limit attack exposure.
Rogue AP Detection: Locate and eliminate unauthorized access
points.
Firewalls: Filter wireless traffic using firewall protection.
Strong Passwords: Enforce complex passwords for network access.
RF Monitoring: Detect and counter signal interference and jamming.
Cryptography:
Definition: Cryptography is the practice and study of techniques for
secure communication and data protection.
Goals: It aims to achieve confidentiality, integrity, authenticity, and
non-repudiation of data.
Types:
Symmetric Cryptography: Same key used for both encryption and
decryption.
Asymmetric Cryptography: Uses a pair of keys - public key for
encryption, private key for decryption.
Hash Functions: Transform input into fixed-size hash value
(digest).
Common Algorithms: AES, DES, RSA, ECC, SHA-256, MD5.
Applications: Secure communication, data protection, digital
signatures, authentication.
Key Management:
Key Generation: Creating cryptographic keys using algorithms or
random processes.
Key Distribution: Securely transmitting keys between parties.
Key Storage: Safely storing keys to prevent unauthorized access.
Key Exchange: Securely swapping keys between parties (Diffie-
Hellman protocol).
Key Derivation: Generating additional keys from a single master
key.
Key Rotation: Periodically changing keys to mitigate potential
breaches.
Key Revocation: Disabling compromised or obsolete keys.
Key Escrow: Storing keys with a third party for recovery purposes.
HSM (Hardware Security Module): Dedicated hardware for
secure key management.
Best Practices: Regular audits, strong authentication for key access,
encryption of stored keys.