IPv4 Lab - Calculating IPv4 Subnets
IPv4 Lab - Calculating IPv4 Subnets
REVIEW: To determine the network address, perform binary ANDing(multiplication) on the IPv4 address
using the subnet mask provided. The result will be the network address. Hint: If the subnet mask has decimal
value 255 in an octet, the result will ALWAYS be the original value of that octet. If the subnet mask has
decimal value 0 in an octet, the result will ALWAYS be 0 for that octet.
Example:
IP Address 192.168.10.10
Subnet Mask 255.255.255.0 (Class C subnet mask)
==========
Result (Network) 192.168.10.0
Knowing this, you may only have to perform binary ANDing on an octet that does not have 255 or 0 in its
subnet mask portion.
Example:
IP Address 172.30.239.145
Subnet Mask 255.255.192.0
Analyzing this example, you can see that you only have to perform binary ANDing on the third octet. The first
two octets will result in 172.30 due to the subnet mask. The fourth octet will result in 0 due to the subnet
mask.
IP Address 172.30.239.145
Subnet Mask 255.255.192.0
==========
Result (Network) 172.30.?.0
Perform binary ANDing on the third octet.
Decimal Binary
239 11101111
192 11000000
=======
Result 192 11000000
Lab – Calculating IPv4 Subnets
14
2 = 16,384 – 2 = 16,382 hosts
Prefix notation tells us how many bits is used for the network.
AND = x
OR = +
Octets 192.168.10.10
Contain 8 bits (when calculating you use the binary values instead of the decimal values)
11111111 = 255
``
Subnet Classes
Class 1st Octet Decimal Range Default Subnet Mask
A 1 – 126* 255.0.0.0
B 128 – 191 255.255.0.0
C 192 – 223 255.255.255.0
D 224 – 239 Reserved for Multicasting
E 240 – 254 Experimental; used for research
Determine the network and broadcast addresses and number of host bits and hosts for the given IPv4
addresses and prefixes in the following table.
IPv4 Subnet Mask Network Address Number of IP Broadcast Total Number Total
Address/Prefix (IP Address * Address Address of Host Bits Number of
2(number of host bits)
Subnet Mask) Hosts
192.168.100.25/28 255.255.255.240 192.168.100.16 64 192.168.100.80 4 14
172.16.104.99/27 255.255.255.224 5 30
Given:
Find:
Step 1: Fill out the tables below with appropriate answers given the IPv4 address, original
subnet mask, and new subnet mask.
a. Problem 1:
Given:
Find:
b. Problem 2:
Given:
Find:
Given:
Find:
d. Problem 4:
Given:
Find:
Given:
Find:
f. Problem 6:
Given:
Find:
Reflection
Why is the subnet mask so important when analyzing an IPv4 address?