[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1182
  • Last Modified:

white listing IPs that end in 0/22

Hi, I'm writing an internet program that only certain networks are allowed to view. I got the list of IP addresses to white list in our database but I'm a coder and not an admin. The IP list they gave me look like this:

201.52.121.0/22

(I changed the IP to something random to protect my client's network, but that's the ending octet)

I'm not sure what range of IPs this actually encompasses. Can someone tell me? Because at first I thought this meant that the IPs I was supposed to white list were

201.52.121.0 - 201.52.121.22.

but apparently that's incorrect.

Also another one has an ending octet of 64/28

Not really sure what the range on that is actually supposed to be
0
tolstoyleo
Asked:
tolstoyleo
4 Solutions
 
ajeabCommented:
google subnet calculator
example
http://www.subnet-calculator.com/subnet.php
put the address then the bit.  
/22 is class b
/28 is class c
0
 
tolstoyleoAuthor Commented:
Still doesn't make any sense to me. Given the above subnet masks that I gave in my first question, what is the range of ip addresses? That's really all i want to know.
0
 
ajeabCommented:
you need to do some work too.  click on the link
for /22 select class B, put in IP address, select 22 from maskbit. it will give you IP range under "Host address range".  so the first one range from x.52.120.1 - x.52.123.255  

try for second one.
0
 
Krys_KCommented:
Hi
I know you want to protect your clients IP address but can you let me know what range it is in.
There are 3 classes (ranges) of IP addresses which use a bit mask with each.
This is the basic class range (though some are spcial addresses within each class, but for simplicity sake)
  • Class A - 0.0.0.0 - 127..255.255.255 /8
  • Class B - 128.0.0.0 - 191.255.255.255 /16
  • Class C - 192.0.0.0 - 223.255.255.255 /24
The /22 you gave suggests your IP is in Class B but the random IP address you gave is in Class C
Can you clarify this?
Cheers
Krystian
0
 
QuoriCommented:
Please never talk in classful address parlance ever again!!!


The /22 represents the number of bits masked as the network bits. So, IP addressing 101 - 32 bits to an IPv4 address, 22 of which make up the network portion and the remaining bits are the hosts and subnets.

201.52.121.0/22 is subnet mask 255.255.252.0

In this case, the /22 mask would cover 201.52.120.0 to 201.52.123.255

Do you need more detail as to how this is worked out?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now