Writing a IP Address range in Slash Notation

Prefr.co
1 min readJun 19, 2021

--

Answer:

10.0.0.0/24: Includes ranges 10.0.0.1–10.0.0.254
10.0.0.0/16: Includes ranges 10.0.0.1–10.0.255.254
10.0.0.0/8: Includes ranges 10.0.0.1–10.255.255.254

Problem: I work with lot of hosting accounts and websites. I regularly need to access their servers via SSH. There was one client with inmotion hosting account. They provided me with thier SSH detaisl but I had the following error

Network error: Connection Timeout, Can’t connect to host.

Knowing the credentials were correct, the possibility was that we had to whitelist IP ADDR.

Out ISP does not provide static IP ADDRESSE so I had to rely on a range of IPs something like 10.10.0.0–10.10.225.225

Most with degrees in CS may already know this but I had no Idea how to add the IP range in Slash Notation.

Explaination

Each place in IP is 8 bits. The slash / tell us how many bits are part of the network

Lets say we have an IP 106.196.88.35 and we want a range 106.196.88.[0–254]

We would write 106.196.88.0/24

This means 24 bits are fixed 106.196.88.[0–254]

--

--

Prefr.co

Services for Business Websites running on Wordpress. Plans start $79/mo https://prefr.co