Using CIDR notation for the following address: 192.168.5.130/24, I found some statements and a chart stating the following information for the address:
IP address: (binary - 11000000.10101000.00000101.10000010) (dotted decimal - 192.168.5.130)
Subnet mask: (binary - 11111111.11111111.11111111.00000000) (dotted decimal - 255.255.255.0)
Network prefix (binary - 11000000.10101000.00000101.00000000) (dotted decimal - 192.168.5.0)
Host part (binary - 00000000.00000000.00000000.10000010) (dotted decimal - 0.0.0.130)
The information I'm reading states, in part, "an address (192.168.5.130) and its associated /24 network mask (255.255.255.0)"
I understand the /24 comes from the 24 leftmost "1" bits in the subnet mask. What I can't figure out is how one knows that 255.255.255.0 is associated with 192.168.5.130 as a subnet mask. I do understand that certain address class ranges use from 8 to 24 bits in the leftmost bits to designate a mask but something is lost upon me about how the algorithm(?) is applied to the address so that you know which address goes with which mask. Maybe I'm getting deeper than I need to get and can just use a subnet calculator to get the information I need? I don't know. Does anybody out there understand what I'm trying to get at and can maybe help me out here?