• Aceticon@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 day ago

    Well, a network mask is by definition always a sequence of 1s followed by 0s (in other words, you can’t arbitrarilly have some bits be 0 in between bits which are 1), so that /24 in CIDR notation is literally “/” + the number of bits in the network mask which have the value 1.

    In other words, because of that “sequence of 1s followed by 0s” rule both 255.255.255.0 and /24 are just two different descriptions of the same network mask, first as 4 decimal numbers separated by dots, whilst the second as the count of bits in the binary representation of the mask which have the value 1.

    For example, the 255.255.252.0 network mask from my first example in my last post could also be represented by /22 since the mask has 8+8+6 = 22 bits with value 1 and the rest are 0 - 192.168.0.0/22 means the same as 192.168.0.0/255.255.252.0

    There is no point in having both that part of the CIDR representation and the decimal mask representation at the same time because they’re both different representations of the same thing so having both is redundant.

      • Blaster M@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 day ago

        Depends on the equipment. I prefer cidr because its simpler, and ipv6 uses CIDR. Do you want to spell out a /64 in a netmask format? It would look like this: 255.255.255.255.255.255.255.255.0.0.0.0.0.0.0.0