Search code examples
iprangecidr

IP to CIDR conversion


I got this exercise in which I need to convert the following range of directions to CIDR:

160.65.0.0 -161.127.255.255

My try is:

10100000.01000001.0.0 - 10100001.01111111.0.0-> 160.65.0.0/7

However, when I calculate my network 160.65.0.0/7 in an online site, it gives me this:

  • First IP: 160.0.0.1
  • Last IP: 161.255.255.254

Where am I going wrong?


Solution

  • If you want to do that, you need to divide it in 2 blocks:

    160.65.0.0 - 160-255.255.255

    161.0.0.0 - 161.127.255.255