Menu
Coddy logo textTech

Which Subnet Am I In

Lesson 25 of 46 in Coddy's IP Addressing and Subnetting course.

The most common exam and real-life question: given an address and a prefix, which subnet does it belong to? With the block size trick it takes seconds.

Take 192.168.1.150/26. Block size 64, boundaries 0, 64, 128, 192. The last octet 150 falls between 128 and 192, so the subnet is 192.168.1.128 and its broadcast is one short of the next boundary: 192.168.1.191.

Find the boundary at or below the address; that is always the network.

challenge icon

Challenge

Beginner

The machine 192.168.1.150/26: print its network address, then its broadcast address, each on its own line.

Expected output:

192.168.1.128
192.168.1.191

Try it yourself

Terminal

All lessons in IP Addressing and Subnetting

Practice on your own: Terminal playground