0% found this document useful (0 votes)
14 views11 pages

IP Address Fragmentation and Subnetting Guide

The document provides a detailed analysis of IP datagram fragmentation, subnetting, and IP address classification. It explains how to fragment a 3000-byte IP datagram into 7 fragments for transmission over a network with an MTU of 500 bytes, and how to subnet the IP address 216.21.5.0 to support 30 usable hosts. Additionally, it classifies various IP addresses into their respective classes, calculates their default subnet masks, network addresses, and identifies multicast addresses.

Uploaded by

ss.gaganb.10d
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views11 pages

IP Address Fragmentation and Subnetting Guide

The document provides a detailed analysis of IP datagram fragmentation, subnetting, and IP address classification. It explains how to fragment a 3000-byte IP datagram into 7 fragments for transmission over a network with an MTU of 500 bytes, and how to subnet the IP address 216.21.5.0 to support 30 usable hosts. Additionally, it classifies various IP addresses into their respective classes, calculates their default subnet masks, network addresses, and identifies multicast addresses.

Uploaded by

ss.gaganb.10d
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Q1: A router receives an IP datagram of size 3000 bytes, consisting of a 20-byte header and a

2980-byte payload. The datagram needs to be fragmented for transmission over a network link
with an MTU of 500 bytes.

1. How many fragments will be generated?


2. What will be the payload size, total length, offset value, and More Fragments (MF) flag
for each fragment?

Assume the header size remains 20 bytes for all fragments, and the offset is calculated in 8-byte
blocks.

Solution:

The problem involves fragmenting a 3000-byte IP datagram with a 20-byte header and 2980-byte
payload for transmission over a network with an MTU of 500 bytes. Let’s break it down step by
step:

1. MTU and Header:


The MTU is 500 bytes, which includes both the IP header and the data payload.
Therefore, each fragment can carry up to 500 - 20 = 480 bytes of payload.
2. Number of Fragments:
The total payload is 2980 bytes. Dividing this by the payload size per fragment:

Number of Fragments=⌈2980/480⌉=⌈6.208⌉=7

So, 7 fragments are needed.

3. Payload in Each Fragment:


o Fragments 1 to 6 will carry 480 bytes each.
o The 7th fragment will carry the remaining payload: 2980−(6×480)=100 bytes.
4. Fragment Details:
Each fragment has a header (20 bytes) and a payload. The total size of each fragment, the
MF (More Fragments) flag, offset, and total length are as follows:

Fragment Payload Size Total Length Offset (in 8-byte units) MF Flag
1 480 500 0 1
2 480 500 60 1
3 480 500 120 1
4 480 500 180 1
5 480 500 240 1
6 480 500 300 1
7 100 120 360 0

o Offset Calculation: The offset is measured in 8-byte blocks. For example, the
offset for the 2nd fragment is (480/8)×1=60(480 / 8) \times 1 = 60(480/8)×1=60.
o MF Flag: Set to 1 for all fragments except the last one (indicating more
fragments follow)

Question:

Q2: Subnet the IP address [Link] into subnets that support exactly 30 usable hosts in each
subnet. Provide the subnet mask, the number of subnets possible, and list the range of IP
addresses for each subnet, including the network address, usable host range, and broadcast
address.

To solve the problem of subnetting the IP address [Link] into subnets that support 30 hosts
in each subnet, let’s proceed step by step:

Step 1: Determine the subnet mask

Each subnet must have at least 30 usable IP addresses. To calculate this:

1. Total required IPs = 30 usable + 2 (1 for network address and 1 for broadcast address) =
32.
2. The number of IPs in a subnet is determined by 2^n, where n is the number of host bits.

2n≥32 ⟹ n=5

So, n=5 host bits are required. This leaves 32−5=27 bits for the subnet mask.

Subnet mask: [Link] or /27.

Step 2: Calculate subnet increments

The subnet increment is determined by the last significant bit in the subnet mask:

1. Subnet increment = 2^5 = 32 in the fourth octet.

This means each subnet will increment by 32 in the fourth octet.

Step 3: List the subnets

Starting with [Link], increment by 32 to find the range of each subnet.


Subnet ID First IP Last Usable IP Broadcast Address
[Link]/27 [Link] [Link] [Link]
[Link]/27 [Link] [Link] [Link]
[Link]/27 [Link] [Link] [Link]
[Link]/27 [Link] [Link] [Link]
[Link]/27 [Link] [Link] [Link]
[Link]/27 [Link] [Link] [Link]
[Link]/27 [Link] [Link] [Link]
[Link]/27 [Link] [Link] [Link]

Summary

 Subnet mask: [Link] (/27)


 Each subnet: 32 total addresses (30 usable)
 Number of subnets possible: 2(32−27)=25=82^{(32 - 27)} = 2^5 = 82(32−27)=25=8
subnets.

IP Address Analysis

Q3: For the following IP addresses, identify their classes, calculate the network addresses
(assuming no custom subnetting), and provide their default subnet masks:

a. [Link]
b. [Link]
c. [Link]
d. [Link]
e. [Link]

1. a. [Link]
o Class: Class C (First octet: 192 → falls between 192-223).
o Default Subnet Mask: [Link].
o Network Address: The network address is calculated by applying the subnet
mask to the IP address. Network Address: [Link]\text{Network Address: }
192.168.1.0Network Address: [Link]
2. b. [Link]
o Class: Class A (First octet: 10 → falls between 1-126).
o Default Subnet Mask: [Link].
o Network Address: Network Address: [Link]\text{Network Address: }
10.0.0.0Network Address: [Link]
3. c. [Link]
o Class: Class B (First octet: 172 → falls between 128-191).
o Default Subnet Mask: [Link].
o Network Address: Network Address: [Link]\text{Network Address: }
172.16.0.0Network Address: [Link]
4. d. [Link]
o Class: Class A (First octet: 8 → falls between 1-126).
o Default Subnet Mask: [Link].
o Network Address: Network Address: [Link]\text{Network Address: }
8.0.0.0Network Address: [Link]
5. e. [Link]
o Class: Class D (First octet: 224 → falls between 224-239).
o Default Subnet Mask: Class D does not use subnetting (reserved for multicast
traffic).
o Network Address: Multicast addresses do not have a traditional network address.

Summary Table

IP Address Class Default Subnet Mask Network Address


[Link] C [Link] [Link]
[Link] A [Link] [Link]
[Link] B [Link] [Link]
[Link] A [Link] [Link]
[Link] D Not Applicable Multicast Address

Question:
Q4: Given the IP address [Link], determine the following:

1. Class of the IP address.


2. Default Subnet Mask.
3. Network Address.
4. Net ID and Host ID.

Solution:

1. Class:
The first octet of the IP address is 192, which falls in the range 192-223. Therefore, the IP
address belongs to Class C.
2. Default Subnet Mask:
The default subnet mask for Class C is [Link].
3. Network Address:
To calculate the network address, we perform a bitwise AND operation between the IP
address and the subnet mask:
o IP Address: [Link]
o Subnet Mask: [Link]
o Network Address: [Link]
4. Net ID and Host ID:
o Net ID: The first three octets represent the network portion, which is 192.168.1.
o Host ID: The last octet represents the host portion, which is 1.

Final Answer:

 Class: C
 Default Subnet Mask: [Link]
 Network Address: [Link]
 Net ID: 192.168.1
 Host ID: 1

Question:
Q5: Analyze the following 10 given IP addresses to determine their Class, Default Subnet
Mask, Network Address, Host ID, Net ID, and significance (if applicable).

IP Addresses:

1. [Link]
2. [Link]
3. [Link]
4. [Link]
5. [Link]
6. [Link]
7. [Link]
8. [Link]
9. [Link]
10. [Link]
Solution

1. IP Address: [Link]
o Class: C (First octet: 192, range 192-223)
o Default Subnet Mask: [Link]
o Network Address: [Link]
o Net ID: 192.168.1
o Host ID: 1

2. IP Address: [Link]
o Class: A (First octet: 10, range 0-127)
o Default Subnet Mask: [Link]
o Network Address: [Link]
o Net ID: 10
o Host ID: 0.0.1

3. IP Address: [Link]
o Class: B (First octet: 172, range 128-191)
o Default Subnet Mask: [Link]
o Network Address: [Link]
o Net ID: 172.16
o Host ID: 5.4

4. IP Address: [Link]
o Class: A (First octet: 8, range 0-127)
o Default Subnet Mask: [Link]
o Network Address: [Link]
o Net ID: 8
o Host ID: 8.8.8

5. IP Address: [Link]
o Class: D (First octet: 224, range 224-239, used for multicast)
o Default Subnet Mask: Not applicable for Class D
o Network Address: Not applicable
o Net ID: Not applicable
o Host ID: Not applicable
o Significance: Multicast address used in specific applications, like routing
protocols.

6. IP Address: [Link]
o Class: C (First octet: 203, range 192-223)
o Default Subnet Mask: [Link]
o Network Address: [Link]
o Net ID: 203.0.113
o Host ID: 10

7. IP Address: [Link]
o Class: A (First octet: 15, range 0-127)
o Default Subnet Mask: [Link]
o Network Address: [Link]
o Net ID: 15
o Host ID: 100.25.7

8. IP Address: [Link]
o Class: B (First octet: 128, range 128-191)
o Default Subnet Mask: [Link]
o Network Address: [Link]
o Net ID: 128.10
o Host ID: 12.3

9. IP Address: [Link]
o Class: E (First octet: 240, range 240-255, reserved for experimental use)
o Default Subnet Mask: Not applicable
o Network Address: Not applicable
o Net ID: Not applicable
o Host ID: Not applicable
o Significance: Reserved for experimental and future use, not used for public
communication.

10. IP Address: [Link]


o Class: B (First octet: 150, range 128-191)
o Default Subnet Mask: [Link]
o Network Address: [Link]
o Net ID: 150.200
o Host ID: 100.1

Final Summary:

Default Subnet Network


IP Address Class Net ID Host ID Significance
Mask Address
[Link] C [Link] [Link] 192.168.1 1 -
[Link] A [Link] [Link] 10 0.0.1 -
[Link] B [Link] [Link] 172.16 5.4 -
[Link] A [Link] [Link] 8 8.8.8 -
Not Not Multicast
[Link] D Not applicable Not applicable
applicable applicable address
[Link] C [Link] [Link] 203.0.113 10 -
[Link] A [Link] [Link] 15 100.25.7 -
[Link] B [Link] [Link] 128.10 12.3 -
Not Not Experimental
[Link] E Not applicable Not applicable
applicable applicable use
[Link] B [Link] [Link] 150.200 100.1 -
Question:
Q6: An IPv4 packet with a total size of 4020 bytes (including the header) needs to pass through
two networks:

1. LAN1 with an MTU of 1420 bytes.


2. LAN2 with an MTU of 820 bytes.

Assume the IPv4 header size is 20 bytes. Calculate how the packet will be fragmented as it
passes through LAN1 and then LAN2. Provide the sizes and offsets of each fragment.

Solution:

Step 1: Fragmentation at LAN1 (MTU = 1420 bytes)

 Maximum payload size per fragment: MTU−Header


=1420−20=1400 bytes.
 Total payload size: 4020−20=4000 bytes.

⌈40001400⌉=3\lceil \frac{4000}{1400} \rceil = 3⌈14004000⌉=3


 Number of fragments required:

Each fragment (except the last) will carry a payload of 1400 bytes.

Fragments from LAN1:

1. Fragment 1:
o Header = 20 bytes
o Payload = 1400 bytes
o Total = 20+1400=1420 bytes
o Offset = 0÷8=0

2. Fragment 2:
o Header = 20 bytes
o Payload = 1400 bytes
o Total = 20+1400=1420 bytes
o Offset = 1400÷8=175

3. Fragment 3:
o Header = 20 bytes
o Payload = 1200 bytes (remaining payload)
o Total = 20+1200=1220 bytes
o Offset = 2800÷8=350

Step 2: Fragmentation at LAN2 (MTU = 820 bytes)


Each fragment created in LAN1 is now processed for LAN2, which has a smaller MTU.

 Maximum payload size per fragment:


820−20=800 bytes.

Fragment 1 from LAN1 (1420 bytes):

Sub-fragment 1.1:

o Header = 20 bytes
o Payload = 800 bytes
o Total = 20+800=820 bytes
o Offset = 0÷8=0

2. Sub-fragment 1.2:
o Header = 20 bytes
o Payload = 600 bytes (remaining payload)
o Total = 20+600=620 bytes
o Offset = 800÷8=100

Fragment 2 from LAN1 (1420 bytes):

1. Sub-fragment 2.1:
o Header = 20 bytes
o Payload = 800 bytes
o Total = 20+800=820 bytes
o Offset = 1400÷8=175

2. Sub-fragment 2.2:
o Header = 20 bytes
o Payload = 600 bytes (remaining payload)
o Total = 20+600=620 bytes
o Offset = 2200÷8=275

Fragment 3 from LAN1 (1220 bytes):

1. Sub-fragment 3.1:
o Header = 20 bytes
o Payload = 800 bytes
o Total = 20+800=820 bytes
o Offset = 2800÷8=350

2. Sub-fragment 3.2:
o Header = 20 bytes
o Payload = 400 bytes (remaining payload)
o Total = 20+400=420 bytes
o Offset = 3600÷8=450
Final Fragmentation Summary:

1. LAN1 produces 3 fragments:


o Sizes: 1420, 1420, 1220 bytes.

2. LAN2 produces 6 fragments:


o Sizes: 820, 620, 820, 620, 820, 420 bytes

You might also like