2

I'm trying to add a range of IP addresses as suggested in the Google Cloud Platform:

Examples: 192.168.0.1, 172.16.0.0/12, 2001:db8::1 or 2001:db8::/64

So I need a range from:

123.123.123.0 -> 123.123.123.99

This is what I have tried:

123.123.123.0/99

But I get:

Invalid IP address or range. Use CIDR notation and enter the lowest IP address in the subnet.

How can I solve this?

Lis Dya
  • 317
  • 3
  • 14

1 Answers1

4

123.123.123.0/99 is not the right way to create CIDR block for 123.123.123.0 -> 123.123.123.99 range

Max value for CIDR block is 32 and you are passing 99.

To cover range of 123.123.123.0 -> 123.123.123.99 CIDR block will be 123.123.123.0/25

123.123.123.0/25 will cover 123.123.123.0 -> 123.123.123.127.

Gautam Savaliya
  • 1,403
  • 2
  • 20
  • 31
  • Thanks for taking the time to answer my question. This is also available for `123.123.123.0 -> 123.123.123.199`? – Lis Dya Jun 24 '20 at 13:33
  • @LisDya Refer https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing to get more clarity on CIDR – Gautam Savaliya Jun 24 '20 at 13:43
  • One more small question please. And to cover `123.123.123.0 -> 123.123.123.255`? – Lis Dya Jun 24 '20 at 13:45
  • @LisDya `123.123.123.0/24` to cover `123.123.123.0 -> 123.123.123.255`. To get CIDR range refer https://www.ipaddressguide.com/cidr – Gautam Savaliya Jun 24 '20 at 13:46
  • 1
    Thank you very much. – Lis Dya Jun 24 '20 at 13:49
  • THIS IS SO MISLEADING why google cloud can't make a calculator for this thing? do you guys know something that doesn't require making mental calculations because this is just ridiculous in 2021 having to calculate these IP tables mentally. – JBarros35 Mar 14 '21 at 23:05