you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 4 months ago (1 child)

Yeah, but why is CIDR notation like that? You put a bigger number at the end and your subnet becomes smaller? Why would you want that?

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 4 months ago* (last edited 4 months ago)

    When you translate it out it bits it’s the number of bits that are active in the net mask

    0000 0000 0000 0000 0000 0000 0000 is a /0

    1111 1111 1111 1111 1111 1111 0000 0000 is a /24

    1111 1111 1111 1111 1111 1111 1100 0000 is a /26

    And since it’s used for matching, it follows how many there are.

    Edit: typed that quickly, but to expand it further, take a /24 subnet, that is 255.255.255.0, if you look above each group of 8-bits can cover 0-255, so you in essence by having 24 bits turned on that’s what you want for an exact match. You’re basically saying “the first three octets need to exactly match”

  • source
  • parent