CN Class Notes
CN Class Notes
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
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
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.
● 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.
● 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.
● 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
Key Characteristics:
Advantages:
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.
● 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.
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.
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.
Summary
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:
Examples: Ethernet cables (Cat5, Cat6), fiber optic cables, and wireless radio frequencies.
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:
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:
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:
Description: The Session Layer manages and controls the dialog between applications. It
establishes, maintains, and terminates connections between applications.
Functions:
Examples: NetBIOS (Network Basic Input/Output System), RPC (Remote Procedure Call).
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.
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
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.
1. Application Layer
2. Transport Layer
3. Internet Layer
4. Link 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:
2. Transport Layer
Functions:
Protocols:
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:
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.
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
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.
Scenario: You are given an IP address block of 192.168.1.0/24 and need to divide it into 4
equal-sized subnets.
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:
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.
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
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
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):
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
● 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
Subnetting 216.21.5.0
To calculate this:
● Subnet Mask:
32−5=27 (subnet mask: /27)32 - 5 = 27
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
To calculate this:
● Subnet Mask:
32−9=23 (subnet mask: /23)32 - 9 = 23
2(32−23)=29=512 addresses
Subnets:
And so on.
Subnetting 10.0.0.0
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?
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?
Supernetting
Given:
To determine how many smaller networks can be joined to form this supernet, we need to
understand the subnet mask.
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.
To find the Supernet ID and range, we need to calculate the network address for the given IP
address with the /22 subnet mask.
Supernet ID:
Supernetting
Given:
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.
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.
To find the Supernet ID and range, we need to calculate the network address for the given IP
address using the /21 subnet mask.
Supernet ID: