[go: up one dir, main page]

0% found this document useful (0 votes)
34 views31 pages

CN Class Notes

Uploaded by

srikavin1103
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)
34 views31 pages

CN Class Notes

Uploaded by

srikavin1103
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/ 31

Network Devices

1. Hub

● Description: A hub is a basic network device that connects multiple devices within a network
segment. It operates at the physical layer (Layer 1) of the OSI model.
● Function: When a hub receives a data packet from one device, it broadcasts the packet to all
connected devices, regardless of the intended recipient.
● Advantages: Simple and inexpensive; easy to install.
● Disadvantages: Inefficient due to broadcasting; increased collisions and network congestion
as all devices share the same bandwidth.

2. Switch

● Description: A switch is a more advanced network device that operates at the data link layer
(Layer 2) of the OSI model, though multi-layer switches can operate at higher layers.
● Function: It receives data packets, inspects the destination MAC address, and forwards the
packet only to the specific device or port that needs it. This reduces network traffic and
collisions.
● Advantages: Improved network performance and efficiency; supports full-duplex
communication; reduces collisions.
● Disadvantages: More complex and expensive than a hub; requires more configuration and
management.

3. Repeater

● Description: A repeater is a device that amplifies or regenerates signals to extend the


transmission distance of a network. It operates at the physical layer (Layer 1) of the OSI
model.
● Function: It receives weak or distorted signals, amplifies them, and retransmits them at a
higher strength to extend the network’s range.
● Advantages: Extends the reach of a network; simple to use.
● Disadvantages: Does not filter or manage traffic; can propagate errors and noise.

4. Bridge

● Description: A bridge is a device that connects and filters traffic between two or more
network segments at the data link layer (Layer 2) of the OSI model.
● Function: It segments a network into multiple segments, reducing collision domains and
improving network performance. It filters traffic based on MAC addresses and forwards
packets between segments if necessary.
● Advantages: Reduces network traffic and collisions; improves performance by segmenting
the network.
● Disadvantages: Limited scalability; can become a bottleneck if not properly managed.

5. Router
● Description: A router is a device that connects different networks and directs data packets
between them. It operates primarily at the network layer (Layer 3) of the OSI model.
● Function: It uses IP addresses to determine the best path for forwarding packets between
networks. Routers manage traffic between different networks, such as between a local
network and the internet.
● Advantages: Connects multiple networks; supports routing protocols for optimal path
selection; provides network address translation (NAT) and firewall functions.
● Disadvantages: More complex and expensive; requires configuration and management;
potential for added latency due to routing decisions.

Summary

● Hub: Basic device for connecting multiple devices; broadcasts data to all ports; can cause
network congestion.
● Switch: Advanced device that directs data to specific devices based on MAC addresses;
reduces network traffic and collisions.
● Repeater: Amplifies and regenerates signals to extend network distance; does not filter
traffic.
● Bridge: Connects and filters traffic between network segments; reduces collisions and traffic.
● Router: Connects different networks and routes packets based on IP addresses; manages
network traffic and provides additional functionalities like NAT and firewall protection.

Types of Topologies
Bus Topology

● Description: All devices are connected to a single central cable (the bus). Data sent by any
device is available to all other devices but only the intended recipient accepts and processes
the data.
● Advantages: Easy to set up and extend; requires less cable than other topologies.
● Disadvantages: Difficult to troubleshoot; a failure in the bus can bring down the whole
network.

Star Topology

● Description: All devices are connected to a central hub or switch. The central hub manages
data traffic and forwards data to the intended recipient.
● Advantages: Easy to install and manage; failure of one device does not affect others; easy to
add new devices.
● Disadvantages: Requires more cable; if the central hub fails, the whole network is affected.

Ring Topology

● Description: Each device is connected to exactly two other devices, forming a circular data
path. Data travels in one direction (or both in a dual-ring setup) around the ring until it
reaches its destination.
● Advantages: Predictable data transmission times; can be efficient for handling large amounts
of data.
● Disadvantages: A failure in one device or connection can disrupt the entire network; more
complex to set up and maintain.

Mesh Topology

● Description: Each device is connected to every other device in the network. This can be a full
mesh (every device is connected to every other device) or a partial mesh (some devices are
connected to others, but not all).
● Advantages: High redundancy and reliability; failure of one connection does not disrupt the
network.
● Disadvantages: Expensive and complex to install and manage due to the large number of
connections.

Tree Topology

● Description: A combination of star and bus topologies. Groups of star-configured networks


are connected to a linear bus backbone.
● Advantages: Scalable and easy to manage; allows for easy expansion.
● Disadvantages: If the backbone fails, entire sections of the network can be affected.

Hybrid Topology

● Description: Combines two or more different types of topologies to create a more flexible and
scalable network.
● Advantages: Can be designed to meet specific needs; offers benefits of different topologies.
● Disadvantages: Can be complex and expensive to design and maintain.

Topologies in LAN, MAN, and WAN


Local Area Network (LAN)

● Common Topologies:
● Star Topology: Most common in modern LANs, especially in office environments, due
to its ease of setup and management.
● Bus Topology: Sometimes used in older LAN setups or smaller networks.
● Hybrid Topology: Often used in larger LANs to combine the benefits of different
topologies.
● Application: LANs typically use star or hybrid topologies for their reliability and ease of
management.

Metropolitan Area Network (MAN)

● Common Topologies:
● Mesh Topology: Often used in MANs to ensure redundancy and reliability across a
city or large campus.
● Ring Topology: Sometimes used for its predictable performance and ability to handle
high data traffic efficiently.
● Application: MANs often use mesh or ring topologies to provide reliable and
high-performance connectivity across a metropolitan area.

Wide Area Network (WAN)

● Common Topologies:
● Mesh Topology: Used in large WANs, particularly for critical connections between
different geographical locations.
● Hybrid Topology: Often used to combine the benefits of various topologies depending
on the needs of the network.
● Application: WANs often employ mesh or hybrid topologies to manage complex and
large-scale network connections over vast distances.

Summary

● LAN (Local Area Network): Often uses star or hybrid topologies for their ease of installation
and management.
● MAN (Metropolitan Area Network): Typically uses mesh or ring topologies to ensure
coverage and reliability within a metropolitan area.
● WAN (Wide Area Network): Commonly employs mesh or hybrid topologies to handle
extensive and complex network requirements over large distances.

Circuit Switching

Circuit Switching is a method of communication in which a dedicated communication path or


circuit is established between two endpoints for the duration of the transmission. This path
remains reserved exclusively for the duration of the connection, regardless of whether the
endpoints are actively communicating or not.

Key Characteristics:

1. Dedicated Path: A dedicated communication path is established between the sender


and receiver for the entire duration of the connection.
2. Continuous Connection: The path remains open and reserved for the duration of the
communication session.
3. Predictable Performance: Since the path is dedicated, performance is predictable with
consistent bandwidth and low latency during the call.
4. Setup Time: There is an initial setup time required to establish the circuit before data
transfer can begin.
5. Resource Utilization: Resources (bandwidth) are reserved for the duration of the call,
even if no data is being transmitted at times.

Common Use Cases:


● Traditional Telephone Networks (PSTN): When a call is made, a dedicated circuit is
established for the duration of the call.
● Leased Lines: Dedicated lines reserved for continuous data transmission.

Advantages:

● Reliable and Consistent: Provides a consistent communication path with predictable


performance.
● Low Latency: Minimal delays due to dedicated resources.

Disadvantages:

● Inefficient Use of Resources: Resources are reserved regardless of whether they are
used, potentially leading to inefficiencies.
● Scalability Issues: Establishing and maintaining dedicated circuits for a large number of
connections can be challenging.

Packet Switching

Packet Switching is a method of communication where data is broken into smaller packets that
are transmitted independently over the network. Each packet can take a different route to reach
the destination, where they are reassembled into the original message.

Key Characteristics:

1. Dynamic Routing: Packets are routed independently, and different packets may follow
different paths to the destination.
2. Efficient Resource Utilization: Network resources are shared among multiple users,
leading to more efficient use of bandwidth.
3. No Dedicated Path: There is no dedicated circuit; packets are sent through various
network nodes based on current network conditions.
4. Variable Performance: Due to shared resources and variable routing, performance can
vary, leading to potential delays and jitter.

Common Use Cases:

● Internet: The primary method used by the internet, where data is split into packets and
sent across the network.
● Local Area Networks (LANs): Used in Ethernet networks and other LAN technologies.

Advantages:

● Efficient Resource Utilization: Resources are used more efficiently since packets from
multiple connections share the same network resources.
● Scalability: Easier to scale as network traffic can be routed dynamically based on
current conditions.
● Resilience: If one route fails, packets can be rerouted through alternative paths.

Disadvantages:

● Variable Performance: Latency and performance can vary due to dynamic routing and
shared resources.
● Packet Loss: Packets may be lost or arrive out of order, requiring mechanisms for error
detection and correction.

Summary

● Circuit Switching: Establishes a dedicated path for the entire communication session,
providing consistent performance but potentially inefficient resource use.
● Packet Switching: Breaks data into packets that are routed independently, offering
efficient resource utilization and scalability but with variable performance.

Guided Media refers to physical transmission media that guide or direct the signal from the
source to the destination. It includes any material or medium that physically guides the signal
along a specific path. Guided media contrasts with unguided media, such as wireless
communication, where signals travel freely through the air.

Types of Guided Media

1. Twisted Pair Cables


○ Description: Consists of pairs of insulated copper wires twisted together. The
twisting helps to reduce electromagnetic interference (EMI) from external
sources.
○ Types:
■ Unshielded Twisted Pair (UTP): Most commonly used in networking,
such as Ethernet. It has no additional shielding around the wires, making
it more susceptible to interference but cheaper and more flexible.
■ Shielded Twisted Pair (STP): Includes an additional shielding layer
around the wires to protect against interference and crosstalk. It is used in
environments with high electromagnetic interference.
○ Applications: Ethernet networks, telephone lines, and data communication.
2. Coaxial Cable
○ Description: Comprises a central conductor, insulating layer, metallic shield, and
outer insulating layer. The central conductor carries the signal, while the shield
reduces interference from external sources.
○ Types:
■ Baseband Coaxial Cable: Used for digital data transmission. Commonly
found in older Ethernet networks (e.g., 10Base2).
■ Broadband Coaxial Cable: Used for analog signals and cable television.
It supports higher bandwidth and is used in cable modems and television.
○ Applications: Cable television, broadband internet, and older network
technologies.
3. Fiber Optic Cable
○ Description: Uses light signals transmitted through glass or plastic fibers. It
consists of a core (through which light travels), cladding (which reflects light back
into the core), and an outer protective layer.
○ Types:
■ Single-Mode Fiber: Has a small core (around 8-10 micrometers in
diameter) and is designed for long-distance communication. It allows a
single mode of light to propagate, minimizing signal loss and dispersion.
■ Multi-Mode Fiber: Has a larger core (about 50-62.5 micrometers in
diameter) and is used for shorter distances. It allows multiple modes of
light to propagate, which can lead to modal dispersion.
○ Applications: High-speed internet, telecommunications, and long-distance data
transmission.
4. Optical Fiber Cables
○ Description: These are a type of fiber optic cable specifically used for
transmitting data using light. They provide high bandwidth and low signal
attenuation over long distances.
○ Applications: High-speed data networks, telephone networks, and internet
backbone connections.

Summary

● Twisted Pair Cables: Common in local area networks (LANs) and telephone systems,
with UTP and STP varieties.
● Coaxial Cable: Used in cable television and broadband internet, offering protection
against interference.
● Fiber Optic Cable: Provides high-speed data transmission with minimal signal loss,
used for long-distance and high-bandwidth applications.

Each type of guided media has specific characteristics and is chosen based on factors like
distance, bandwidth, interference, and cost.
Unguided Media, also known as wireless media, refers to communication methods that
transmit signals through the air without the need for physical cables or wires. Signals are
transmitted via electromagnetic waves, such as radio waves, microwaves, and infrared light.
Unguided media is used for various forms of wireless communication, including radio, television,
and cellular networks.

Types of Unguided Media

1. Radio Waves
○ Description: Radio waves are electromagnetic waves with frequencies ranging
from about 3 kHz to 300 GHz. They are commonly used for broadcasting,
communication, and data transmission.
○ Types:
■ AM Radio: Uses amplitude modulation for broadcasting audio signals
over long distances.
■ FM Radio: Uses frequency modulation for higher sound quality and less
susceptibility to noise.
■ VHF and UHF: Very High Frequency (30 MHz to 300 MHz) and Ultra
High Frequency (300 MHz to 3 GHz) bands are used for television, FM
radio, and mobile communications.
○ Applications: Radio broadcasting, television, and mobile communication.
2. Microwaves
○ Description: Microwaves are electromagnetic waves with frequencies between 1
GHz and 300 GHz. They are used for point-to-point communication and satellite
communication.
○ Types:
■ Terrestrial Microwaves: Use line-of-sight communication between fixed
points. Often used for long-distance communication links and backbone
networks.
■ Satellite Microwaves: Used for communication between satellites and
ground stations. Relies on geostationary satellites to relay signals.
○ Applications: Satellite television, long-distance telephone communication, and
wireless internet.
3. Infrared
○ Description: Infrared communication uses light waves with frequencies just
below visible light (wavelengths between 700 nm and 1 mm). It is used for
short-range communication.
○ Types:
■ Line-of-Sight Infrared: Requires direct line-of-sight between the
transmitter and receiver. Commonly used in remote controls and some
wireless data applications.
■ Diffuse Infrared: Uses diffuse reflections, allowing communication even
with partial obstructions. Used in some local area network applications.
○ Applications: Remote controls, short-range data transfer, and some wireless
LANs.
4. Bluetooth
○ Description: Bluetooth is a short-range wireless technology used for connecting
devices over short distances (typically up to 100 meters).
○ Frequency Band: Operates in the 2.4 GHz ISM band.
○ Applications: Wireless headsets, keyboards, mice, and data transfer between
devices.
5. Wi-Fi
○ Description: Wi-Fi is a wireless networking technology that allows devices to
connect to the internet and communicate with each other using radio waves.
○ Frequency Bands: Typically operates in the 2.4 GHz and 5 GHz bands, with
newer standards also utilizing the 6 GHz band.
○ Applications: Wireless internet access in homes, offices, and public hotspots.
6. Cellular Networks
○ Description: Cellular networks use a network of cell towers to provide wireless
communication over wide areas. Mobile devices connect to the nearest cell tower
to communicate.
○ Generations: Includes various generations like 2G, 3G, 4G LTE, and the latest
5G, each offering increased data rates and capabilities.
○ Applications: Mobile phone communication, mobile internet access, and data
services.

Summary

● Radio Waves: Used for broadcasting and communication over long distances, including
AM/FM radio and TV.
● Microwaves: Used for point-to-point and satellite communications with higher
frequencies and line-of-sight requirements.
● Infrared: Used for short-range communication with line-of-sight or diffuse reflection,
commonly in remote controls and some wireless data applications.
● Bluetooth: Provides short-range wireless communication between devices, such as
headsets and keyboards.
● Wi-Fi: Enables wireless networking within a limited range, such as home or office
networks.
● Cellular Networks: Provide wide-area wireless communication through a network of cell
towers for mobile phones and data services.

1. Calculate the latency (total delay from first bit sent to last bit received) for the following:

a. Sender and receiver are separated by two 1-Gigabit/s links and a single switch. The packet size
is 5000 bits, and each link introduces a propagation delay of 10 microseconds. Assume that the
switch begins forwarding immediately after it has received the last bit of the packet and the
queues are empty.
b. Same as (A) with three switches and four link.

Definitions

● Transmission Delay (T_t): Time taken to push all the packet's bits onto the link.

● Propagation Delay (T_p): Time taken for a signal to travel from sender to receiver.

● Total Latency: Sum of transmission delays, propagation delays, and any switching
delays.

Scenario (a): Two 1-Gigabit/s Links and a Single Switch

1. Calculate the Transmission Delay:


The packet size is 5000 bits, and the bandwidth of each link is 1 Gbps (1 x 10910^9109
bits per second).

2. Calculate the Propagation Delay:


Each link introduces a propagation delay of 10 microseconds.
Tp=10 microseconds (μs)
3. Calculate the Total Latency:
○ Transmission Delay through the first link: 5 μs
○ Propagation Delay through the first link: 10 μs
○ Switching Delay: The switch starts forwarding immediately after receiving the
entire packet. So there is no additional delay for switching in this case.
○ Transmission Delay through the second link: 5 μs
○ Propagation Delay through the second link: 10 μs
4. Total Latency=Tt+Tp+Tt+Tp
Scenario (b): Three Switches and Four Links

1. Calculate the Transmission Delay:


The packet size is 5000 bits, and the bandwidth of each link is 1 Gbps.

2. Calculate the Propagation Delay:


Each link introduces a propagation delay of 10 microseconds.
Tp=10 μs
3. Calculate the Total Latency:
○ Transmission Delay through the first link: 5 μs
○ Propagation Delay through the first link: 10 μs
○ Switching Delay: In this scenario, there are three switches. Each switch
introduces no additional delay beyond the time required to forward the packet,
which is instantaneous once the packet is fully received. So, no additional
switching delay is included.
○ Transmission Delay through the second link: 5 μs
○ Propagation Delay through the second link: 10 μs
○ Transmission Delay through the third link: 5 μs
○ Propagation Delay through the third link: 10 μs
○ Transmission Delay through the fourth link: 5 μs
○ Propagation Delay through the fourth link: 10 μs
4. Total Latency=Tt+Tp+Tt+Tp+Tt+Tp+Tt+Tp

Summary

● Scenario (a): Total Latency = 30 microseconds (μs)


● Scenario (b): Total Latency = 60 microseconds (μs)
ISO/OSI Model

The ISO/OSI Model (International Organization for Standardization/Open Systems


Interconnection Model) is a conceptual framework used to understand and standardize the
functions of a telecommunication or computing system, regardless of its underlying technology.
It divides the process of network communication into seven distinct layers, each with specific
responsibilities. Here is a detailed explanation of each layer:

1. Physical Layer (Layer 1)

Description: The Physical Layer is responsible for the transmission and reception of raw bit
streams over a physical medium. It defines the electrical, mechanical, and procedural aspects of
network communication.

Functions:

● Converts data into electrical, optical, or radio signals.


● Defines hardware elements such as cables, switches, and network interface cards.
● Manages data rates, signal strength, and physical connections.

Examples: Ethernet cables (Cat5, Cat6), fiber optic cables, and wireless radio frequencies.

2. Data Link Layer (Layer 2)

Description: The Data Link Layer ensures reliable node-to-node data transfer by organizing
data into frames, detecting and correcting errors, and managing access to the physical medium.

Functions:

● Provides framing, error detection, and correction.


● Manages MAC (Media Access Control) addresses to ensure data is delivered to the
correct device.
● Handles flow control to prevent congestion.

Examples: Ethernet, Wi-Fi, and PPP (Point-to-Point Protocol).

3. Network Layer (Layer 3)

Description: The Network Layer is responsible for routing packets from the source to the
destination across multiple networks. It handles logical addressing and routing of data.

Functions:

● Provides logical addressing through IP addresses.


● Determines the best path for data to travel across networks using routing protocols.
● Manages packet forwarding and fragmentation.
Examples: IP (Internet Protocol), routers, and ICMP (Internet Control Message Protocol).

4. Transport Layer (Layer 4)

Description: The Transport Layer ensures end-to-end communication and data integrity. It
provides error recovery, flow control, and retransmission of lost or corrupted data.

Functions:

● Manages end-to-end data transfer and segmentation.


● Provides error detection and correction through protocols.
● Ensures data is reassembled in the correct order at the destination.

Examples: TCP (Transmission Control Protocol), UDP (User Datagram Protocol).

5. Session Layer (Layer 5)

Description: The Session Layer manages and controls the dialog between applications. It
establishes, maintains, and terminates connections between applications.

Functions:

● Establishes, maintains, and terminates sessions between applications.


● Manages session dialog control and synchronization.
● Provides checkpointing and recovery.

Examples: NetBIOS (Network Basic Input/Output System), RPC (Remote Procedure Call).

6. Presentation Layer (Layer 6)

Description: The Presentation Layer translates, encrypts, and compresses data for the
application layer. It ensures that data is in a readable format for the application layer.

Functions:

● Translates data between the application layer and the network format.
● Handles data encryption and decryption for secure communication.
● Manages data compression and decompression.

Examples: SSL/TLS (Secure Sockets Layer/Transport Layer Security), JPEG, GIF.

7. Application Layer (Layer 7)

Description: The Application Layer provides network services directly to end-user applications.
It is the layer closest to the end user and interacts with software applications to provide network
services.
Functions:

● Interfaces directly with end-user applications and provides services such as file transfer,
email, and web browsing.
● Provides application-specific protocols and services.
● Facilitates communication between applications and the network.

Examples: HTTP (Hypertext Transfer Protocol), FTP (File Transfer Protocol), SMTP (Simple
Mail Transfer Protocol).

Summary

● Layer 1 (Physical Layer): Handles the physical transmission of data.


● Layer 2 (Data Link Layer): Provides error detection and correction, and manages MAC
addresses.
● Layer 3 (Network Layer): Routes packets and handles logical addressing.
● Layer 4 (Transport Layer): Manages end-to-end communication and error recovery.
● Layer 5 (Session Layer): Controls and manages sessions between applications.
● Layer 6 (Presentation Layer): Translates, encrypts, and compresses data.
● Layer 7 (Application Layer): Provides network services to end-user applications.

TCP/IP Model, or Internet Protocol Suite

The TCP/IP Model, or Internet Protocol Suite, is a conceptual framework for understanding
and implementing networking protocols used in the Internet and similar networks. It is a
simplified model compared to the OSI Model and consists of four layers, each responsible for
specific aspects of network communication.

TCP/IP Model Layers

1. Application Layer
2. Transport Layer
3. Internet Layer
4. Link Layer

Here’s a detailed explanation of each layer:

1. Application Layer

Description: The Application Layer provides network services directly to end-user applications.
It is responsible for high-level protocols that enable software applications to communicate over
the network.

Functions:
● Provides protocols and services for end-user applications, such as email, file transfer,
and web browsing.
● Defines how applications interact with the network.
● Handles application-specific data and ensures that data is formatted and presented
correctly for network communication.

Protocols:

● HTTP (Hypertext Transfer Protocol): Used for transferring web pages.


● FTP (File Transfer Protocol): Used for transferring files between systems.
● SMTP (Simple Mail Transfer Protocol): Used for sending emails.
● DNS (Domain Name System): Translates domain names into IP addresses.

2. Transport Layer

Description: The Transport Layer is responsible for providing end-to-end communication


services for applications. It manages data flow control, error detection, and recovery.

Functions:

● Provides reliable or unreliable data transfer between applications running on different


hosts.
● Manages error correction, data retransmission, and flow control to ensure data is
transmitted accurately and efficiently.

Protocols:

● TCP (Transmission Control Protocol): Provides reliable, connection-oriented


communication with error recovery and flow control. It ensures that data packets are
delivered in the correct order and without errors.
● UDP (User Datagram Protocol): Provides connectionless, unreliable communication
with minimal overhead. It is used for applications that require fast transmission and can
tolerate some data loss, such as video streaming or online gaming.

3. Internet Layer

Description: The Internet Layer is responsible for routing data packets between hosts across
multiple networks. It handles logical addressing and packet forwarding.

Functions:

● Provides logical addressing through IP addresses and routes packets across network
boundaries.
● Handles packet fragmentation and reassembly to accommodate different network sizes
and types.
Protocols:

● IP (Internet Protocol): The fundamental protocol for addressing and routing packets
across networks. It includes IPv4 (Internet Protocol version 4) and IPv6 (Internet
Protocol version 6).
● ICMP (Internet Control Message Protocol): Used for error reporting and diagnostics.
For example, it provides feedback about packet delivery issues and network congestion.
● ARP (Address Resolution Protocol): Resolves IP addresses to MAC addresses within
a local network.

4. Link Layer

Description: The Link Layer, also known as the Network Interface Layer, is responsible for the
physical transmission of data over network interfaces and the management of local network
protocols.

Functions:

● Handles communication between devices on the same local network (LAN).


● Provides data framing, error detection, and media access control for network
communication.

Protocols:

● Ethernet: Commonly used for wired LANs, providing data framing and addressing.
● Wi-Fi: Used for wireless LANs, managing wireless communication and network access.
● PPP (Point-to-Point Protocol): Used for direct communication between two network
nodes, often in dial-up and VPN connections.

Summary

● Application Layer: Interfaces with end-user applications and provides services such as
web browsing, email, and file transfer.
● Transport Layer: Manages end-to-end communication, including reliable (TCP) and
unreliable (UDP) data transfer.
● Internet Layer: Handles logical addressing, routing, and packet delivery across multiple
networks using IP and other protocols.
● Link Layer: Manages data transmission over physical media and local network
protocols, providing framing and error detection.

Comparison with OSI Model

● Application Layer (TCP/IP) vs. Application, Presentation, and Session Layers


(OSI): The Application Layer in TCP/IP encompasses functions of the Application,
Presentation, and Session Layers in the OSI Model.
● Transport Layer (TCP/IP) vs. Transport Layer (OSI): Both handle end-to-end
communication, but TCP/IP's Transport Layer only includes TCP and UDP, while OSI’s
Transport Layer might include additional services.
● Internet Layer (TCP/IP) vs. Network Layer (OSI): The Internet Layer is similar to the
Network Layer in the OSI Model, focusing on routing and addressing.
● Link Layer (TCP/IP) vs. Data Link and Physical Layers (OSI): The Link Layer
combines the functionality of the OSI Model's Data Link and Physical Layers, managing
local network communications and hardware interfaces.

Network Address Translation (NAT) is a technique used in networking to map one IP address
space into another. It is primarily used to improve security and reduce the number of IP
addresses an organization needs. NAT is commonly used in scenarios where multiple devices
within a private network need to share a single public IP address to access external networks
like the Internet.

Types of NAT

1. Static NAT:
○ Definition: Maps a single private IP address to a single public IP address. The
mapping is fixed and does not change.
○ Use Case: Useful when a device within a private network needs to be accessible
from the outside world (e.g., web servers, mail servers).
○ Example: Private IP 192.168.1.10 is mapped to public IP 203.0.113.10.
2. Dynamic NAT:
○ Definition: Maps private IP addresses to a pool of public IP addresses on a
dynamic basis. The mapping is not fixed and can change.
○ Use Case: Useful when multiple devices need access to the Internet, but only a
limited number of public IP addresses are available.
○ Example: Private IP 192.168.1.10 might be mapped to one of several public
IPs such as 203.0.113.10, 203.0.113.11, etc., depending on availability.
3. Port Address Translation (PAT):
○ Definition: Also known as "NAT overload" or "masquerading," PAT maps multiple
private IP addresses to a single public IP address by using different port
numbers. It allows many devices on a local network to be mapped to a single
public IP address but with different ports.
○ Use Case: Commonly used in home and small office networks where many
devices share a single public IP address.
○ Example: Private IPs 192.168.1.10 and 192.168.1.11 both use public IP
203.0.113.10 but with different source ports (e.g., port 1024 for
192.168.1.10 and port 1025 for 192.168.1.11).
4. NAT64:
○ Definition: A method of translating IPv6 addresses to IPv4 addresses, enabling
communication between IPv6-only clients and IPv4-only servers.
○ Use Case: Used in networks where IPv6 clients need to communicate with IPv4
servers or vice versa.
○ Example: An IPv6 client requesting a resource on an IPv4 server; NAT64
translates the IPv6 address to an IPv4 address for the communication.
5. NAT46:
○ Definition: A method of translating IPv4 addresses to IPv6 addresses, facilitating
communication from IPv4-only clients to IPv6-only servers.
○ Use Case: Used to connect IPv4 clients to IPv6 networks.
○ Example: An IPv4 client requests a resource on an IPv6 server; NAT46
translates the IPv4 address to an IPv6 address.
6. NAT-PT (Network Address Translation-Protocol Translation):
○ Definition: A deprecated method that translates both IP addresses and transport
layer protocols (e.g., TCP, UDP) between IPv4 and IPv6 networks.
○ Use Case: It was used to provide connectivity between IPv4 and IPv6 networks
but is largely replaced by NAT64 and other modern techniques.
Fixed-Length Subnetting

Fixed-Length Subnetting is a method used in network design to divide an IP address space


into subnets of equal size. This approach simplifies network management and routing by
ensuring that all subnets have the same number of addresses. It’s particularly useful when you
need a uniform subnet structure across a network and simplifies the allocation of IP addresses.

Key Concepts

● Subnet Mask: A fixed-length subnetting scheme uses a consistent subnet mask across
all subnets. This mask determines the number of bits used for the network portion of the
address and the number of bits available for host addresses within each subnet.
● Subnet Address: The base address for each subnet, which is used to identify the
subnet and assign IP addresses to hosts within it.
● Address Space: The range of IP addresses available for use within a subnet.

Steps for Fixed-Length Subnetting

1. Determine the Network Address and Subnet Mask:


○ Start with a given IP address and its associated subnet mask.
○ Choose a new subnet mask to divide the network into equal-sized subnets.
2. Calculate the Number of Subnets and Hosts per Subnet:
○ Determine how many bits are borrowed from the host portion of the address to
create the desired number of subnets.
○ Calculate the number of available host addresses in each subnet.
3. Assign Subnet Addresses:
○ Divide the IP address space into subnets by incrementing the subnet addresses
by the size of each subnet.

Example of Fixed-Length Subnetting

Scenario: You are given an IP address block of 192.168.1.0/24 and need to divide it into 4
equal-sized subnets.

1. Determine the New Subnet Mask:


○ The original subnet mask for 192.168.1.0/24 is 255.255.255.0. This means the
first 24 bits are used for the network portion, and the remaining 8 bits are used
for host addresses.
○ To create 4 subnets, you need to borrow 2 bits from the host portion (since 2 bits
can create 4 subnets: 22=42^2 = 422=4).
2. The new subnet mask will be:
255.255.255.192 (or /26 in CIDR notation)
This is because:

○ Original subnet mask (255.255.255.0) = /24


○ New subnet mask = /26 (24 original bits + 2 borrowed bits)
3. Calculate the Number of Hosts per Subnet:
○ Each /26 subnet mask leaves 6 bits for host addresses (32 total bits - 26 bits for
network = 6 bits for hosts).
○ The number of available host addresses is 26−2=622^6 - 2 = 6226−2=62
(subtracting 2 for network and broadcast addresses).
4. Assign Subnet Addresses:
○ Subnets are created by incrementing the subnet base address by the size of the
subnet. For /26, the subnet size is 64 addresses (including network and
broadcast addresses).
5. The subnets will be:
○ Subnet 1: 192.168.1.0/26
■ Network Address: 192.168.1.0
■ Usable IP Range: 192.168.1.1 - 192.168.1.62
■ Broadcast Address: 192.168.1.63
○ Subnet 2: 192.168.1.64/26
■ Network Address: 192.168.1.64
■ Usable IP Range: 192.168.1.65 - 192.168.1.126
■ Broadcast Address: 192.168.1.127
○ Subnet 3: 192.168.1.128/26
■ Network Address: 192.168.1.128
■ Usable IP Range: 192.168.1.129 - 192.168.1.190
■ Broadcast Address: 192.168.1.191
○ Subnet 4: 192.168.1.192/26
■ Network Address: 192.168.1.192
■ Usable IP Range: 192.168.1.193 - 192.168.1.254
■ Broadcast Address: 192.168.1.255

Summary

Fixed-Length Subnetting divides a network into subnets of equal size using a consistent
subnet mask. This method simplifies network design and management, ensuring uniform subnet
sizes across a network. By calculating the number of required subnets and hosts, you can
effectively plan and allocate IP addresses to meet network requirements.

Example:

● Original Network: 192.168.1.0/24


● Subnet Mask for Subnets: 255.255.255.192 (/26)
● Number of Subnets: 4
● Hosts per Subnet: 62 usable addresses
● Subnets Created:
○ 192.168.1.0/26
○ 192.168.1.64/26
○ 192.168.1.128/26
○ 192.168.1.192/26

Variable-Length Subnet Masking (VLSM)

Variable-Length Subnet Masking (VLSM) is an advanced subnetting technique used to create


subnets of varying sizes from a single network address space. Unlike fixed-length subnetting,
which divides the network into equal-sized subnets, VLSM allows for the allocation of different
subnet sizes based on the specific needs of the network. This provides more efficient use of IP
address space, especially in networks with varied requirements.

Key Concepts

● Subnet Mask: With VLSM, different subnets within the same network can have different
subnet masks, allowing for varying sizes of address space.
● Efficient Address Utilization: VLSM helps in optimizing the use of IP addresses by
allocating subnet sizes that match the needs of different segments of a network.
● Hierarchical Addressing: VLSM enables hierarchical addressing schemes, improving
route summarization and reducing routing table size.

Steps for Variable-Length Subnet Masking

1. Determine the Network Address and Initial Subnet Mask:


○ Start with a given IP address block and a standard subnet mask.
2. List Subnet Requirements:
○ Identify and list the number of required subnets and the number of hosts needed
for each subnet.
3. Assign Subnet Masks Based on Requirements:
○ Allocate subnet masks of varying lengths to meet the needs of different subnets,
starting with the largest subnet and moving to smaller ones.
4. Calculate Subnet Addresses:
○ Assign IP addresses to each subnet based on the subnet mask and the
requirements.

Example of Variable-Length Subnet Masking

Scenario: Given an IP address block of 192.168.1.0/24, you need to create subnets with the
following requirements:

● Subnet 1: 50 hosts
● Subnet 2: 30 hosts
● Subnet 3: 10 hosts
● Subnet 4: 5 hosts

Steps to Implement VLSM:

1. Determine Subnet Masks:


○ For 50 hosts: You need at least 6 bits for hosts (2^6 - 2 = 62 usable addresses).
The subnet mask will be /26 (32 - 6 = 26).
○ For 30 hosts: You need at least 5 bits for hosts (2^5 - 2 = 30 usable addresses).
The subnet mask will be /27 (32 - 5 = 27).
○ For 10 hosts: You need at least 4 bits for hosts (2^4 - 2 = 14 usable addresses).
The subnet mask will be /28 (32 - 4 = 28).
○ For 5 hosts: You need at least 3 bits for hosts (2^3 - 2 = 6 usable addresses).
The subnet mask will be /29 (32 - 3 = 29).
2. Assign Subnet Addresses:
○ Largest Subnet (50 hosts):
■ Subnet Mask: /26
■ Subnet Address: 192.168.1.0
■ Usable IP Range: 192.168.1.1 - 192.168.1.62
■ Broadcast Address: 192.168.1.63
○ Next Largest Subnet (30 hosts):
■ Subnet Mask: /27
■ Subnet Address: 192.168.1.64
■ Usable IP Range: 192.168.1.65 - 192.168.1.94
■ Broadcast Address: 192.168.1.95
○ Next Subnet (10 hosts):
■ Subnet Mask: /28
■ Subnet Address: 192.168.1.96
■ Usable IP Range: 192.168.1.97 - 192.168.1.110
■ Broadcast Address: 192.168.1.111
○ Smallest Subnet (5 hosts):
■ Subnet Mask: /29
■ Subnet Address: 192.168.1.112
■ Usable IP Range: 192.168.1.113 - 192.168.1.118
■ Broadcast Address: 192.168.1.119

Summary

Variable-Length Subnet Masking (VLSM) allows for more flexible and efficient use of IP
address space by allocating subnet sizes based on actual requirements rather than using a
fixed subnet mask for all subnets. This technique helps in optimizing IP address allocation,
reducing wastage, and improving routing efficiency.

Example:
● Initial Network: 192.168.1.0/24
● Subnets Created:
○ Subnet 1: 192.168.1.0/26 (50 hosts)
○ Subnet 2: 192.168.1.64/27 (30 hosts)
○ Subnet 3: 192.168.1.96/28 (10 hosts)
○ Subnet 4: 192.168.1.112/29 (5 hosts)

Problems in Subnet:

An address in a block is given as 185.28.17.9. Find the number of addresses in the block,
the first address and last address.

Address in a Block

Address Given: 185.28.17.9

To find the number of addresses in the block, the first address, and the last address, we need to
know the subnet mask. Since the subnet mask isn't provided, let's assume a common case for
an IP address block of this type.

Assume the address 185.28.17.9 is in a /24 block (common for such addresses):

● Number of Addresses in a /24 Block:


2(32−24)=28=256 addresses
● First Address:
Network Address=185.28.17.0
● Last Address:
Broadcast Address=185.28.17.255

An organization follows class A for their internal network. One of the host in the network
has an IP address 10.200.240.4. Find the number of addresses, the network address, and
the broadcast address of the organization,s network.

Class A Network

IP Address Given: 10.200.240.4

In a Class A network with a default subnet mask of /8:

● Number of Addresses:
2(32−8)=224=16,777,216 addresses
● Network Address:
The network address is 10.0.0.0
● Broadcast Address:
The broadcast address is 10.255.255.255

Subnet the IP address 216.21.5.0 into 30 hosts in each subnet.

Subnetting 216.21.5.0

Requirement: Subnets with 30 hosts each

To calculate this:

● Number of Host Bits Needed:

● Subnet Mask:
32−5=27 (subnet mask: /27)32 - 5 = 27

● Number of Addresses per Subnet:

2(32−27)=25=32 addresses

● Subnets:
○ First Subnet: 216.21.5.0/27
■ Usable IP Range: 216.21.5.1 - 216.21.5.30
■ Broadcast Address: 216.21.5.31
○ Second Subnet: 216.21.5.32/27
■ Usable IP Range: 216.21.5.33 - 216.21.5.62
■ Broadcast Address: 216.21.5.63
Subnet the IP address 150.15.0.0 into 500 hosts in each subnet.

Subnetting 150.15.0.0

Requirement: Subnets with 500 hosts each

To calculate this:

● Number of Host Bits Needed:

2number of bits−2 ≥ 500

29−2=510 (9 bits needed)

● Subnet Mask:
32−9=23 (subnet mask: /23)32 - 9 = 23

Number of Addresses per Subnet:

2(32−23)=29=512 addresses

Subnets:

○ First Subnet: 150.15.0.0/23


■ Usable IP Range: 150.15.0.1 - 150.15.1.254
■ Broadcast Address: 150.15.1.255
○ Second Subnet: 150.15.2.0/23
■ Usable IP Range: 150.15.2.1 - 150.15.3.254
■ Broadcast Address: 150.15.3.255

And so on.

Subnet the IP address 10.0.0.0 into 100 hosts in each subnet.

Subnetting 10.0.0.0

Requirement: Subnets with 100 hosts each

To calculate this:
● Number of Host Bits Needed:

● Subnet Mask:
32−7=25 (subnet mask: /25)32 - 7 = 25

● Number of Addresses per Subnet:
2(32−25)=27=128 addresses
● Subnets:
○ First Subnet: 10.0.0.0/25
■ Usable IP Range: 10.0.0.1 - 10.0.0.126
■ Broadcast Address: 10.0.0.127
○ Second Subnet: 10.0.0.128/25
■ Usable IP Range: 10.0.0.129 - 10.0.0.254
■ Broadcast Address: 10.0.0.255

And so on.

In a block of addresses, we know the IP address of one host is 25.34.12.56/16. What is the
first address and last address in this block?

Address Given: 25.34.12.56/16

● Subnet Mask: 255.255.0.0


● Network Address:
Network Address=25.34.0.0
● First Address:
First Usable Address=25.34.0.1
● Last Address:
Broadcast Address=25.34.255.255
● Last Usable Address=25.34.255.254

If a class B network on the internet has a subnet mask 255.255.248.9, what is the
maximum number of host per subnet?

Subnet Mask 255.255.248.0 (Class B)


Subnet Mask: 255.255.248.0 (or /21)

● Number of Host Bits:


32−21=11 host bits32 - 21 = 11
● Number of Addresses per Subnet:
211=2048 addresses
● Number of Usable Hosts:
2048−2=2046 usable addresses2048 - 2 = 2046

Suppose computers A and B have IP addresses 10.105.1.113 and 10.105.1.191


respectively and they both use the same network N. which of the values of N given below
should not be used if A and B should belong to the same network? a. 255.255.255.0 b.
255.255.255.128 c. 255.255.255.192 d. 255.255.255.224

IP Addresses 10.105.1.113 and 10.105.1.191

Network Addresses to Consider:

● IP Addresses: 10.105.1.113 and 10.105.1.191


● Subnet Masks:
a. 255.255.255.0 (or /24):
○ Network Address: 10.105.1.0
○ Subnet Range: 10.105.1.0 - 10.105.1.255
○ Both IPs belong to this network.
● b. 255.255.255.128 (or /25):
○ Network Address 1: 10.105.1.0 - 10.105.1.127
○ Network Address 2: 10.105.1.128 - 10.105.1.255
○ 10.105.1.113 belongs to the first network; 10.105.1.191 belongs to the
second.
● c. 255.255.255.192 (or /26):
○ Network Address 1: 10.105.1.0 - 10.105.1.63
○ Network Address 2: 10.105.1.64 - 10.105.1.127
○ Network Address 3: 10.105.1.128 - 10.105.1.191
○ Both IPs belong to this network.
● d. 255.255.255.224 (or /27):
○ Network Address 1: 10.105.1.0 - 10.105.1.31
○ Network Address 2: 10.105.1.32 - 10.105.1.63
○ Network Address 3: 10.105.1.64 - 10.105.1.95
○ Network Address 4: 10.105.1.96 - 10.105.1.127
○ Network Address 5: 10.105.1.128 - 10.105.1.159
○ Network Address 6: 10.105.1.160 - 10.105.1.191

10.105.1.113 belongs to Network Address 4; 10.105.1.191 belongs to Network Address 6.


Define supernetting. In class c, if the Supernet mask is 255.255.252.0. How many no
networks can be joined? IP Address in a supernet is 202.89.69.119. Supernet mask is
255.255.252.0. Find the supernet ID and range of supernet.

Supernetting

Definition: Supernetting, or "address aggregation," is the process of combining multiple smaller


subnets into a larger network or "supernet." This is done by using a larger subnet mask (fewer
bits for the network part) to encompass multiple smaller subnets. Supernetting helps to reduce
the size of routing tables and optimize network management.

Class C Supernet Example

Given:

● IP Address in Supernet: 202.89.69.119


● Supernet Mask: 255.255.252.0

1. Number of Networks that Can Be Joined:

To determine how many smaller networks can be joined to form this supernet, we need to
understand the subnet mask.

● Class C Network: Default subnet mask is 255.255.255.0 or /24.


● Supernet Mask: 255.255.252.0, which is /22.
● Subnet Mask in CIDR Notation: /22

The /22 mask means that the network portion of the address is 22 bits, and the remaining bits
(32 - 22 = 10 bits) are used for host addresses.

● Number of Smaller Subnets: 2(24−22)=22=4 smaller subnets2^{(24 - 22)} = 2^2 = 4


\text{ smaller subnets}2(24−22)=22=4 smaller subnets

This supernet combines 4 smaller Class C networks.

2. Supernet ID and Range:

To find the Supernet ID and range, we need to calculate the network address for the given IP
address with the /22 subnet mask.

● Given IP Address: 202.89.69.119


● Subnet Mask in Decimal: 255.255.252.0
● Subnet Mask in Binary: 11111111.11111111.11111100.00000000
Find the Network Address:

1. Convert IP Address to Binary:


○ 202.89.69.119 in binary is:
11001010.01011001.01000101.0111011111001010.01011001.01000101.0111011
111001010.01011001.01000101.01110111
2. Apply the Subnet Mask:
○ 255.255.252.0 in binary is:
11111111.11111111.11111100.0000000011111111.11111111.11111100.00000000111
11111.11111111.11111100.00000000
○ Perform a bitwise AND operation between the IP address and the subnet mask:
11001010.01011001.01000100.0000000011001010.01011001.01000100.000000
0011001010.01011001.01000100.00000000
3. Convert the Resulting Binary Network Address Back to Decimal:
○ Binary network address: 11001010.01011001.01000100.00000000
○ Decimal network address: 202.89.68.0

Supernet ID:

● Supernet ID (Network Address): 202.89.68.0

Find the Range of the Supernet:

1. Number of Host Addresses per /22 Subnet:


○ Number of host bits: 32 - 22 = 10
○ Number of addresses: 210=10242^{10} = 1024210=1024
○ Number of usable addresses: 1024 - 2 (network and broadcast) = 1022
2. Calculate Broadcast Address:
○ The broadcast address is the last address in the supernet range.
○ Network address + number of addresses - 1:
202.89.68.0+1023=202.89.71.255202.89.68.0 + 1023 =
202.89.71.255202.89.68.0+1023=202.89.71.255

Range of the Supernet:

● Network Address (Supernet ID): 202.89.68.0


● Broadcast Address: 202.89.71.255
● Usable IP Range: 202.89.68.1 - 202.89.71.254
Define supernetting. In class c, if the Supernet mask is 255.255.248.0. How many no
networks can be joined? IP Address in a supernet is 199.15.119.189. Supernet mask is
255.255.248.0. Find the supernet ID and range of supernet.

Supernetting

Definition: Supernetting, or "address aggregation," is the technique of combining multiple


contiguous smaller subnets into a larger network, referred to as a supernet. This is achieved by
using a less specific subnet mask (fewer bits for the network portion) to include several smaller
subnets within a single larger subnet. Supernetting helps in reducing the number of entries in
routing tables and can simplify network management.

Class C Supernet Example

Given:

● IP Address in Supernet: 199.15.119.189


● Supernet Mask: 255.255.248.0

1. Number of Networks that Can Be Joined:

To determine how many smaller networks can be joined to form this supernet, we need to
compare the given supernet mask to the default subnet mask for a Class C network.

● Class C Network: Default subnet mask is 255.255.255.0 or /24.


● Supernet Mask: 255.255.248.0, which is /21.

The /21 mask means that the network portion of the address is 21 bits, and the remaining bits
(32 - 21 = 11 bits) are used for host addresses.

● Number of Smaller Subnets: 2(24−21)=23=8 smaller subnets2^{(24 - 21)} = 2^3 = 8


\text{ smaller subnets}2(24−21)=23=8 smaller subnets

This supernet combines 8 smaller Class C networks.

2. Supernet ID and Range:

To find the Supernet ID and range, we need to calculate the network address for the given IP
address using the /21 subnet mask.

● Given IP Address: 199.15.119.189


● Subnet Mask in Decimal: 255.255.248.0
● Subnet Mask in Binary: 11111111.11111111.11111000.00000000
Find the Network Address:

1. Convert IP Address to Binary:


○ 199.15.119.189 in binary is:
11000111.00001111.01110111.1011110111000111.00001111.01110111.101111011
1000111.00001111.01110111.10111101
2. Apply the Subnet Mask:
○ 255.255.248.0 in binary is:
11111111.11111111.11111000.0000000011111111.11111111.11111000.0000000011
111111.11111111.11111000.00000000
○ Perform a bitwise AND operation between the IP address and the subnet mask:
11000111.00001111.01110000.0000000011000111.00001111.01110000.0000000
011000111.00001111.01110000.00000000
3. Convert the Resulting Binary Network Address Back to Decimal:
○ Binary network address: 11000111.00001111.01110000.00000000
○ Decimal network address: 199.15.112.0

Supernet ID:

● Supernet ID (Network Address): 199.15.112.0

Find the Range of the Supernet:

1. Number of Host Addresses per /21 Subnet:


○ Number of host bits: 32 - 21 = 11
○ Number of addresses: 211=20482^{11} = 2048211=2048
○ Number of usable addresses: 2048 - 2 (network and broadcast) = 2046
2. Calculate Broadcast Address:
○ The broadcast address is the last address in the supernet range.
○ Network address + number of addresses - 1:
199.15.112.0+2047=199.15.119.255199.15.112.0 + 2047 =
199.15.119.255199.15.112.0+2047=199.15.119.255

Range of the Supernet:

● Network Address (Supernet ID): 199.15.112.0


● Broadcast Address: 199.15.119.255
● Usable IP Range: 199.15.112.1 - 199.15.119.254

You might also like