Classful/default subnet masks

We have already identified that the default subnet masks for classes A, B, and C are 255.0.0.0, 255.255.0.0, and 255.255.255.0, respectively. To identify the network element of a classful IP address, we compare it to its subnet mask. If an octet in the subnet mask has a 255 in it, then its respective octet in the IP address is part of the network element. Let's look at each of these in turn.

For class A, we can see that only the first octet of the subnet mask has 255 in it. This means that only the first octet in the IP address is the network element. I tend to write the IP address above the subnet mask and compare them. Look at the following example:

IP address

23 . 78 . 23 . 98

Subnet mask

255 ...

Get Networking Fundamentals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.