View Single Post
Old 5th July 2014
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Correct. The notation /24 means 24 bits of ones, followed by 8 bits of zeros.

The notation /24 is exactly the same as decimal 255.255.255.0 and is exactly the same as hexadecimal 0xFFFFFF00. All three of these mean the same thing: 24 bits of ones followed by 8 bits of zeros.

The way you had the NICs configured above, with a netmask of "255.0.0.0", means 8 bits of ones followed by 24 bits of zeros. Since the first 8 bits was the same: 00001010, or decimal 10, both NICs were in the same subnet. Or would have been, if you had configured the athn0 file with the keyword "inet".

This subnet begins at 10.0.0.0, the address of the network. It's broadcast address is 10.255.255.255, and between those two reserved addresses, there are 16,177,214 IP addresses which can be assigned to devices in this subnet.

---

With CIDR notation, any number of bits can be used to define the size of the netmask. But for we human beings, we define our IP address in terms of four 8-bit decimal octets (bytes) with periods in between them. So CIDRs of /8, /16, and /24 are the easiest for us to see and understand, because they set the number of bits of ones at 1, 2, or 3 octet boundaries,

A /24 is very handy for our small networks, for two reasons. 1) There are 256 addresses, 254 of them available for devices. 2) The three left bytes define the subnet, and the rightmost byte defines the devices within the subnet.

Example:

10.0.0.1/24 and 10.0.0.207/24 are obviously in the same subnet, because only the right most octet is different. No router is needed for these two devices to communicate. However, a device at10.0.5.13/24 is in a different subnet, because the first three octets are different. IP traffic would need to be routed between the two subnets.
Reply With Quote