INTRODUCTION TO
IP Addressing
1. IPv4 vs. IPv6:
• IPv4 (Internet Protocol version 4):
o Address Format: 32-bit address, typically
expressed in decimal notation as four
octets separated by periods (e.g.,
192.168.1.1).
o Address Space: Approximately 4.3 billion
unique addresses.
o Characteristics: Limited address space,
leading to issues with address exhaustion.
• IPv6 (Internet Protocol version 6):
o Address Format: 128-bit address,
expressed in hexadecimal notation as
eight groups of four hexadecimal digits
separated by colons (e.g.,
2001:0db8:85a3:0000:0000:8a2e:0370:73
34).
o Address Space: Provides a vastly larger
address space (approximately
3.4×10383.4 \times 10^{38}3.4×1038
addresses), resolving the address
exhaustion issue.
o Characteristics: Includes features like
simplified header format, improved
security, and more efficient routing.
2. Address Classes (IPv4):
• Class A:
o Address Range: 1.0.0.0 to 126.0.0.0
o Subnet Mask: 255.0.0.0 (or /8)
o Usage: Large networks, such as ISPs.
• Class B:
o Address Range: 128.0.0.0 to 191.255.0.0
o Subnet Mask: 255.255.0.0 (or /16)
o Usage: Medium-sized networks.
• Class C:
o Address Range: 192.0.0.0 to
223.255.255.0
o Subnet Mask: 255.255.255.0 (or /24)
o Usage: Small networks, such as local area
networks (LANs).
• Class D:
o Address Range: 224.0.0.0 to
239.255.255.255
o Usage: Multicast addresses.
• Class E:
o Address Range: 240.0.0.0 to
255.255.255.255
o Usage: Reserved for experimental use.
3. Subnetting:
• Concept: Dividing a larger network into
smaller, more manageable sub-networks
(subnets). It helps optimize network
performance and security.
• Subnet Mask: Defines the network and host
portions of an IP address. For example, in a
/24 subnet mask (255.255.255.0), the first 24
bits are used for the network portion, and the
remaining 8 bits are used for hosts.
4. Supernetting:
• Concept: Combining multiple smaller
networks into a larger network. It simplifies
routing by reducing the number of routes.
• Example: Aggregating multiple Class C
networks into a single Class B network.
5. CIDR (Classless Inter-Domain Routing):
• Concept: Replaces class-based IP addressing
with a more flexible method of allocating IP
addresses. CIDR uses variable-length subnet
masking (VLSM) to divide IP address space
more efficiently.
• Notation: Uses a prefix length to specify the
network portion of an IP address (e.g.,
192.168.1.0/24).
Routing
1. Static vs. Dynamic Routing:
• Static Routing:
o Concept: Routes are manually configured
and do not change unless manually
updated by the network administrator.
o Advantages: Simple, predictable, and low
overhead.
o Disadvantages: Scalability issues and
requires manual updates for network
changes.
• Dynamic Routing:
o Concept: Routes are automatically
learned and adjusted by routing protocols
based on network changes.
o Advantages: Adaptable to network
changes, reduces administrative
overhead.
o Disadvantages: More complex and can
introduce routing overhead.
2. Routing Algorithms:
• Distance Vector:
o Concept: Each router maintains a table of
the best paths to all destinations. Routers
periodically exchange information with
their neighbors.
o Examples: Routing Information Protocol
(RIP).
o Characteristics: Simpler to implement but
can suffer from slow convergence and
routing loops.
• Link State:
o Concept: Each router maintains a
complete view of the network topology
and computes the best paths using
algorithms like Dijkstra’s algorithm.
o Examples: Open Shortest Path First
(OSPF).
o Characteristics: More scalable and
converges faster compared to distance
vector algorithms.
3. Routing Protocols:
• RIP (Routing Information Protocol):
o Type: Distance vector protocol.
o Characteristics: Uses hop count as the
metric; maximum of 15 hops allowed.
Simpler and easier to configure but less
efficient for large networks.
• OSPF (Open Shortest Path First):
o Type: Link state protocol.
o Characteristics: Uses Dijkstra's algorithm
to compute the shortest path. Scales well
to larger networks and supports more
complex topologies.
• BGP (Border Gateway Protocol):
o Type: Path vector protocol.
o Characteristics: Used for routing between
different autonomous systems (inter-
domain routing). It’s the protocol that
makes the internet work, managing
routing policies and ensuring data reaches
its destination.
Switching
1. Packet Switching:
• Concept: Data is divided into packets, each of
which is routed independently based on the
destination address. Packets may take
different paths and are reassembled at the
destination.
• Characteristics: Efficient use of network
resources, supports high-speed data
transmission, and is used in modern packet-
switched networks like the internet.
2. Circuit Switching:
• Concept: A dedicated communication path is
established between two endpoints for the
duration of the communication session.
Traditional telephone networks use this
method.
• Characteristics: Provides a constant
connection, but is less efficient for bursty data
traffic.
3. Message Switching:
• Concept: Entire messages are routed from the
source to the destination, with intermediate
nodes storing and forwarding messages.
• Characteristics: Similar to packet switching
but with larger chunks of data. Not commonly
used in modern networks due to delays
introduced by message storage and
forwarding.
ICMP (Internet Control Message Protocol)
1. Purpose:
• Concept: ICMP is used for diagnostic and
error-reporting purposes in IP networks. It
helps manage and control network
communication by reporting errors and
providing operational information.
2. Message Types:
• Error Reporting Messages:
o Destination Unreachable: Indicates that a
packet could not be delivered to its
destination (e.g., network unreachable,
host unreachable).
o Time Exceeded: Indicates that a packet's
time-to-live (TTL) has expired, often used
to diagnose routing loops.
o Redirect: Used to inform a host of a better
route to a destination.
• Query Messages:
o Echo Request and Echo Reply: Used by
the ping command to test connectivity
between hosts and measure round-trip
time.
o Timestamp Request and Reply: Used to
synchronize clocks between hosts.