CIDR - IPv4

Classes Inner-Domain Routing

CIDR - IPv4
  • A method for allocating IP address

  • Used in Security Group rules and AWS networking in general

  • They help to define IP address range

  • 192.168.0.0/32 => 2^0 = One IP -> 192.168.0.0

  • 192.168.0.0/31 => 2^1 = 2 IPs -> 192.168.0.0 - 192.168.0.1

  • 192.168.0.0/30 => 2^2 = 4 IPs -> 192.168.0.0 - 192.168.0.3

  • 192.168.0.0/29 => 2^3 = 8 IPs -> 192.168.0.0 - 192.168.0.7

  • 192.168.0.0/28 => 2^4 = 16 IPs -> 192.168.0.0 - 192.168.0.15

  • ...

  • 192.168.0.0/24 => 2^8 = 256 -> 192.168.0.0 - 192.168.0.255

  • ...

  • 192.168.0.0/16 => 2^16 = 65,536 IPs -> 192.168.0.0 - 192.168.255.255

  • ...

  • 192.168.0.0/8 => 2^24 = 16,777,216 IPs -> 192.0.0.0 - 192.255.255.255

  • ...

  • 192.168.0.0/0 => 2^32 = All IPs -> 0.0.0.0 - 255.255.255.255

Tool: https://www.ipaddressguide.com/cidr

Next: https://dixon.hashnode.dev/public-vs-private-ip-ipv4