0% found this document useful (0 votes)
9 views9 pages

Understanding IP Fragmentation and Addressing

Computer networks

Uploaded by

Mubin Ahamad
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)
9 views9 pages

Understanding IP Fragmentation and Addressing

Computer networks

Uploaded by

Mubin Ahamad
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

Discuss the process of fragmentation with the help

of an example
Fragmentation is the process of splitting a large packet into smaller fragments to fit the Maximum
Transmission Unit (MTU) of a network.

Process of Fragmentation:
1. Need for Fragmentation:
When a packet is larger than the MTU (e.g., 3000 bytes with an MTU of 1500 bytes), it
must be split.
2. Creating Fragments:
Each fragment includes an IP header (20 bytes). The data payload per fragment is 1480
bytes ( 1500 - 20 ).
3. Example:
Fragment 1: 1480 bytes of data, offset = 0, MF flag = 1.
Fragment 2: 1480 bytes of data, offset = 185 (1480/8), MF flag = 1.
Fragment 3: 40 bytes of data, offset = 370 (2960/8), MF flag = 0 (last fragment).
4. Transmission and Reassembly:
Each fragment is transmitted separately. The destination uses the Identification
number, Fragment Offset, and MF flag to reassemble the packet.

What is an IP Address?
An IP address (Internet Protocol address) is a unique 32-bit numerical identifier assigned to
each device connected to a network. It functions like a digital address, enabling devices to
locate and communicate with each other over the internet or local networks.
Format: IPv4 addresses are written as four decimal numbers separated by periods (e.g.,
[Link] ), where each number ranges from 0 to 255.
Structure: An IP address is divided into two parts:
Network ID: Identifies the specific network.
Host ID: Identifies a device within that network.

How Classful Addresses are Assigned


Classful addressing was introduced to efficiently allocate IP addresses based on the size of the
network:

1. Classes:
The IP address is divided into five classes: A, B, C, D, and E.
Classes A, B, and C are used for regular networks, Class D for multicast, and Class E
for experimental purposes.
2. Class A:
Designed for large networks with many hosts.
Network ID: 8 bits, Host ID: 24 bits.
Address Range: [Link] to [Link] .
Supports 128 networks with up to 16 million hosts each.
3. Class B:
For medium-sized networks.
Network ID: 16 bits, Host ID: 16 bits.
Address Range: [Link] to [Link] .
Supports 16,384 networks with up to 65,534 hosts each.
4. Class C:
For small networks.
Network ID: 24 bits, Host ID: 8 bits.
Address Range: [Link] to [Link] .
Supports 2 million networks with up to 254 hosts each.
![[Pasted image [Link]

Differences Between IPv4 and IPv6

Feature IPv4 IPv6

Address Length 32-bit 128-bit


Address Format Decimal (e.g., Hexadecimal (e.g.,
[Link]) 2001:0db8:85a3::8a2e:0370:7334)
Header Size 20-60 bytes Fixed 40 bytes
Security Optional (dependent Built-in IPsec for encryption and authentication
on applications)
Configuration Manual or DHCP Auto-configuration with Stateless Address
Autoconfiguration (SLAAC) and DHCPv6
Checksum Field Available Not available (improves processing speed)
Transmission Broadcast, Unicast, multicast, and anycast (no broadcast)
Type multicast, and
unicast
Classes Divided into 5 No class system, uses hierarchical addressing
classes (A, B, C, D,
E)
Quality of Limited Improved with flow label field for packet
Service (QoS) prioritization
Support for Supports VLSM Does not use VLSM
VLSM
Compatibility Mostly incompatible Compatible with dual-stack and tunneling for IPv4
with IPv6

Why Was IPv6 Introduced?


IPv6 was introduced to address several key limitations and issues with IPv4, mainly:

1. Limited Address Space: The most significant limitation of IPv4 is its 32-bit address space,
allowing only around 4.3 billion unique addresses. With the rapid growth of internet-connected
devices, the address pool was quickly exhausted.
2. Inefficient Routing: IPv4 networks require more complex configurations and have a
relatively complex header structure, which can lead to inefficiencies in data processing and
routing.
3. Security Concerns: IPv4 lacks built-in security features. Security measures such as IPsec
are optional and require additional configuration, making IPv4 more vulnerable to attacks.
4. Complex Network Configuration: IPv4 often relies on manual configuration or Dynamic
Host Configuration Protocol (DHCP), which can be error-prone and time-consuming.

Key Advantages of IPv6 Over IPv4


1. Larger Address Space: IPv6 uses 128-bit addresses, significantly expanding the number of
available IP addresses. It can provide around 340 undecillion (3.4 × 10³⁸) unique addresses,
accommodating the growing number of internet-connected devices.
2. Built-in Security: IPv6 has mandatory support for IPsec, which provides features like data
encryption and authentication, enhancing overall network security.
3. Simplified Header Structure: The IPv6 header is simpler and more streamlined compared to
IPv4, reducing the processing overhead and improving routing efficiency.
4. Better Quality of Service (QoS): IPv6 includes a flow label field in its header, allowing for
better handling of real-time data traffic, which is beneficial for applications like video
streaming and VoIP.
5. Auto-configuration and Mobility: IPv6 supports Stateless Address Autoconfiguration
(SLAAC), enabling devices to configure themselves automatically when connected to a
network. It also offers better support for mobile devices, allowing seamless handover between
networks.
6. Efficient Multicast and Anycast Communication: IPv6 eliminates the need for broadcast
traffic and instead uses multicast and anycast, reducing unnecessary network load and
enhancing overall performance.

Explain the importance of tunneling in transferring


data with the help of an example.
Tunneling is a crucial technique in networking that allows data packets to be transferred securely
and seamlessly across different network types. It involves encapsulating one type of network
packet within another so that it can traverse intermediate networks that may not support the
original packet format.
Example Scenario: IP Tunneling Across a Non-IP Network
Imagine two offices:

Office A in New York and Office B in London both use IP-based networks (IPv4).
They are connected via an intermediate network that uses a different protocol (e.g., MPLS,
ATM).

Problem: If a computer in New York (Host 1) wants to send data to a computer in London (Host 2),
the data must pass through the intermediate network that does not understand IPv4 packets
directly.

Solution: Tunneling enables the IP packets to travel through this non-IP network by encapsulating
them within a compatible format that the intermediate network can process.
Analogy: Think of a car (the IP packet) needing to cross a river. The car cannot drive through the
water directly, so it is placed on a ferry (tunneling process) to cross the river. Once it reaches the
other side, it continues its journey on the road.

Key Benefits:
1. Interoperability: Allows data transfer across networks with different protocols.
2. Security: Can be used in VPNs to encrypt data, making it more secure.
3. Flexibility: Enables the use of legacy networks without protocol compatibility issues.

IPv4 Header Format


The IPv4 header is 20-60 bytes and includes:

1. Version: 4 bits, specifies IP version (4).


2. IHL: 4 bits, header length.
3. Type of Service (TOS): 8 bits, data priority.
4. Total Length: 16 bits, packet size.
5. Identification, Flags, Fragment Offset: For packet fragmentation.
6. TTL: 8 bits, limits packet lifespan.
7. Protocol: 8 bits, specifies next layer protocol (TCP/UDP).
8. Checksum: Error-checking for the header.
9. Source & Destination Address: 32 bits each, sender and receiver IPs.
IPv6 Header Format
The IPv6 header is fixed at 40 bytes with:

1. Version: 4 bits, specifies IP version (6).


2. Traffic Class: 8 bits, for packet priority.
3. Flow Label: 20 bits, identifies data flows.
4. Payload Length: 16 bits, data size.
5. Next Header: 8 bits, type of next header (TCP/UDP).
6. Hop Limit: 8 bits, similar to TTL.
7. Source & Destination Address: 128 bits each, larger IPs for expanded address space.

IPv6 offers more address space, simplified headers, and improved routing compared to IPv4.

OSPF
OSPF is an interior gateway protocol used for routing within an autonomous system. It is a link-
state protocol, meaning routers exchange information about their links (connections) through Link-
State Advertisements (LSAs). OSPF routers use the Shortest Path First (SPF) algorithm to
calculate the best route to each destination.

Working of OSPF:

1. Neighbor Formation: Routers form OSPF neighbor relationships by exchanging "Hello"


packets to check reachability.
2. LSA Exchange: Once neighbors are established, routers exchange LSDB (Link-State
Database) information.
3. Routing Decision: After exchanging information, each router runs the SPF algorithm to
select the best route.

OSPF Areas: OSPF divides networks into areas to optimize routing. Areas are connected to the
backbone area (Area 0). Special routers like Area Border Routers (ABR) connect different areas,
summarizing routing information.
OSPF Packet Types:

1. Hello: Used to establish neighbor relationships.


2. Database Description: Contains network topology.
3. Link State Request: Requests link state information from neighbors.
4. Link State Update: Advertises link states to neighbors.
5. Link State Acknowledgment: Acknowledges received link state information.

Router Roles:

Designated Router (DR): A router elected to minimize flooding and manage routing info in
broadcast networks.
Backup Designated Router (BDR): A backup to the DR.

BGP
BGP is an inter-domain (inter-AS) routing protocol used to exchange routing information between
different Autonomous Systems (ASes) on the internet. Unlike interior gateway protocols (IGPs),
which focus on path optimality within a single AS, BGP focuses on policy-based routing,
considering factors like security, politics, and economics. For example, a policy may prevent
routing through certain countries or regions.

Types of Autonomous Systems (AS):


1. Stub AS:
Has only one connection to another AS.
Cannot forward traffic from other ASes.
Example: Small corporation.
2. Multiconnected AS:
Has multiple connections to other ASes.
Does not allow traffic between two other ASes to pass through.
Example: Large corporation.
3. Transit AS:
Handles third-party packets, typically for payment.
Example: Internet backbones or ISPs.

BGP Routing:
BGP is a distance-vector protocol but differs from others like RIP.
Each router in BGP tracks the complete path it uses and shares it with neighbors.
BGP routers discard invalid routes and rank others based on policy and path length, ensuring
efficient routing.

Example:
If router F wants to reach destination D, it discards paths that pass through itself (e.g., paths from
routers I and E) and adopts the shortest, valid path according to its policy.

UDP
UDP is a connectionless, lightweight transport layer protocol used in the Internet Protocol (IP)
suite. Unlike TCP, UDP does not establish a connection before data transfer and does not
guarantee packet delivery, order, or error checking, making it faster but less reliable.
Key Features:
1. Connectionless: No connection setup or teardown is required, and data is sent
independently.
2. Minimal Error Checking: UDP provides a checksum for basic error detection but does not
handle retransmissions or flow control.
3. Efficiency: UDP has minimal overhead with a fixed 8-byte header, leading to faster data
transmission compared to TCP.
4. Applications: It is ideal for time-sensitive applications like VoIP, video streaming, and DNS
where speed is prioritized over reliability.

UDP Header:
The UDP header is 8 bytes long and consists of:

Source Port (2 bytes)


Destination Port (2 bytes)
Length (2 bytes, including header and data)
Checksum (2 bytes for error checking)

Applications of UDP:
Real-time communications: VoIP (e.g., Skype), video streaming, online gaming.
DNS: For quick query-response communication.
DHCP: Assigns IP addresses dynamically to devices.

Advantages:
Faster data transfer with less overhead.
Suitable for applications where real-time delivery is critical, and slight packet loss is tolerable.

You might also like