NETW202 Week 6 LAB Calculating Subnet Masks
31 July, 2024 | 7 Min Read
Task 1 ā Calculating Subnet Masks
Step 1: Given a Class A network with the /20 prefix, determine the subnet mask in binary.
- Action:
- Start with the default Class A mask in binary: 11111111.00000000.00000000.00000000
- Borrow 12 bits from the host portion to reach the /20 prefix.
- New mask in binary: 11111111.11111111.11110000.00000000
- Explanation:
- The first 8 bits represent the default network portion of a Class A address.
- We borrowed 12 bits to reach a /20 prefix, leaving 12 bits for the host portion.
- Result:
- Subnet Mask in Binary: 11111111.11111111.11110000.00000000
Step 2: Given a Class A network with the /20 prefix, determine the subnet mask in decimal.
- Action:
- Convert the binary mask 11111111.11111111.11110000.00000000 to decimal.
- Binary to Decimal Conversion:
- 11111111 = 255
- 11111111 = 255
- 11110000 = 240
- 00000000 = 0
- Explanation:
- Translate the binary values of each octet to their decimal equivalents.
- Result:
- Subnet Mask in Decimal: 255.255.240.0
Step 3: Given a Class A network with the /20 prefix, determine the maximum number of hosts it can support.
- Action:
- Count the number of bits left for the host portion: 12 bits.
- Use the formula: 2^N - 2 where N = number of host bits.
- Calculation: 2^12 - 2 = 4094
- Explanation:
- Subtracting 2 accounts for the network address and the broadcast address.
- Result:
- Maximum Number of Hosts: 4094
Step 4: Given a Class A network with the /21 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 13 bits to achieve a /21 prefix.
- Binary Mask: 11111111.11111111.11111000.00000000
- Decimal Mask: 255.255.248.0
- Hosts Supported: 2^11 - 2 = 2046
- Explanation:
- Borrowed 13 bits, leaving 11 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111000.00000000
- Decimal: 255.255.248.0
- Hosts Supported: 2046
Step 5: Given a Class A network with the /22 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 14 bits to achieve a /22 prefix.
- Binary Mask: 11111111.11111111.11111100.00000000
- Decimal Mask: 255.255.252.0
- Hosts Supported: 2^10 - 2 = 1022
- Explanation:
- Borrowed 14 bits, leaving 10 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111100.00000000
- Decimal: 255.255.252.0
- Hosts Supported: 1022
Step 6: Given a Class A network with the /23 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 15 bits to achieve a /23 prefix.
- Binary Mask: 11111111.11111111.11111110.00000000
- Decimal Mask: 255.255.254.0
- Hosts Supported: 2^9 - 2 = 510
- Explanation:
- Borrowed 15 bits, leaving 9 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111110.00000000
- Decimal: 255.255.254.0
- Hosts Supported: 510
Step 7: Given a Class A network with the /24 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 16 bits to achieve a /24 prefix.
- Binary Mask: 11111111.11111111.11111111.00000000
- Decimal Mask: 255.255.255.0
- Hosts Supported: 2^8 - 2 = 254
- Explanation:
- Borrowed 16 bits, leaving 8 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111111.00000000
- Decimal: 255.255.255.0
- Hosts Supported: 254
Step 8: Given a Class A network with the /25 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 17 bits to achieve a /25 prefix.
- Binary Mask: 11111111.11111111.11111111.10000000
- Decimal Mask: 255.255.255.128
- Hosts Supported: 2^7 - 2 = 126
- Explanation:
- Borrowed 17 bits, leaving 7 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111111.10000000
- Decimal: 255.255.255.128
- Hosts Supported: 126
Step 9: Given a Class A network with the /26 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 18 bits to achieve a /26 prefix.
- Binary Mask: 11111111.11111111.11111111.11000000
- Decimal Mask: 255.255.255.192
- Hosts Supported: 2^6 - 2 = 62
- Explanation:
- Borrowed 18 bits, leaving 6 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111111.11000000
- Decimal: 255.255.255.192
- Hosts Supported: 62
Step 10: Given a Class A network with the /27 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 19 bits to achieve a /27 prefix.
- Binary Mask: 11111111.11111111.11111111.11100000
- Decimal Mask: 255.255.255.224
- Hosts Supported: 2^5 - 2 = 30
- Explanation:
- Borrowed 19 bits, leaving 5 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111111.11100000
- Decimal: 255.255.255.224
- Hosts Supported: 30
Step 11: Given a Class A network with the /28 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 20 bits to achieve a /28 prefix.
- Binary Mask: 11111111.11111111.11111111.11110000
- Decimal Mask: 255.255.255.240
- Hosts Supported: 2^4 - 2 = 14
- Explanation:
- Borrowed 20 bits, leaving 4 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111111.11110000
- Decimal: 255.255.255.240
- Hosts Supported: 14
Step 12: Given a Class A network with the /29 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 21 bits to achieve a /29 prefix.
- Binary Mask: 11111111.11111111.11111111.11111000
- Decimal Mask: 255.255.255.248
- Hosts Supported: 2^3 - 2 = 6
- Explanation:
- Borrowed 21 bits, leaving 3 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111111.11111000
- Decimal: 255.255.255.248
- Hosts Supported: 6
Step 13: Given a Class A network with the /30 prefix, determine the subnet mask in binary and decimal. Then calculate the maximum number of hosts it can support.
- Action:
- Start with the default Class A mask: 11111111.00000000.00000000.00000000
- Borrow 22 bits to achieve a /30 prefix.
- Binary Mask: 11111111.11111111.11111111.11111100
- Decimal Mask: 255.255.255.252
- Hosts Supported: 2^2 - 2 = 2
- Explanation:
- Borrowed 22 bits, leaving 2 bits for hosts.
- Result:
- Binary: 11111111.11111111.11111111.11111100
- Decimal: 255.255.255.252
- Hosts Supported: 2
Step 14: You have been assigned the 172.25.0.0 /16 network. You need to establish 12 subnets. Determine the number of bits that need to be borrowed.
- Action:
- Calculate the number of bits required to create 12 subnets.
- Counting in powers of 2: 2^0 = 1, 2^1 = 2, 2^2 = 4, 2^3 = 8, 2^4 = 16
- Explanation:
- It takes 4 bits to create 12 subnets, providing up to 16 subnets.
- Result:
- Action:
- Start with the default Class B mask: 11111111.11111111.00000000.00000000
- Borrow 4 bits, resulting in 11111111.11111111.11110000.00000000
- Convert to decimal: 255.255.240.0
- Explanation:
- Borrowing 4 bits from the host portion results in a /20 prefix.
- Result:
- Binary Mask: 11111111.11111111.11110000.00000000
- Decimal Mask: 255.255.240.0
Step 16: Look at your subnet mask and identify which octet contains the split between the network portion and the host portion of the address.
- Action:
- Determine the octet containing the split: 255.255.240.0
- Explanation:
- The split occurs in the third octet, where 240 is neither 255 nor 0.
- Result:
Step 17: The third octet is 240 in decimal. Subtract this value from 256 to determine the size of the subnet blocks.
- Action:
- Calculate the subnet block size: 256 - 240 = 16
- Explanation:
- Subnet blocks are in multiples of 16.
- Result:
Step 18: On a separate sheet of paper, write down the network IP address you started with: 172.25.0.0. Then write it three more times, each on a separate line, but leave a blank for the octet that contained the network-host split.
- Action:
- Write down the following:
- 172.25. __ .0
- 172.25. __ .0
- 172.25. __ .0
- 172.25. __ .0
- Result:
- This step is a preparatory action for the next calculations.
Step 19: Remember that you calculated the subnet block size to be 16? Each of the 12 subnets will be in blocks of 16, starting with 0. On your paper, fill in the other three blanks in multiples of 16.
- Action:
- Fill in the blanks:
- 172.25.0.0
- 172.25.16.0
- 172.25.32.0
- 172.25.48.0
- Result:
- You now have the first four subnets.
Step 20: Create two more columns to the right of the subnet numbers you listed. For each line, determine what would be the absolutely last possible address before reaching the subnet number in the next line.
- Action:
- Fill in the blanks:
- 172.25.0.0 - 172.25.15.255
- 172.25.16.0 - 172.25.31.255
- 172.25.32.0 - 172.25.47.255
- 172.25.48.0 - 172.25.63.255
- Result:
- You now have the first four subnets and their broadcast addresses.
Step 21: Take the number in the first column, and add one. Place the answer in the middle column. Subtract one from the number in the last column. Place the answer in the middle column, as well. These numbers represent the range of addresses you can assign to hosts for each subnet.
- Action:
- Determine the range of host addresses:
- 172.25.0.1 - 172.25.15.254
- 172.25.16.1 - 172.25.31.254
- 172.25.32.1 - 172.25.47.254
- 172.25.48.1 - 172.25.63.254
- Result:
- You now have the first four subnets, their broadcast addresses, and their host ranges.