First of all, I know that private IP ranges are - (65,536 IP addresses) - (1,048,576 IP addresses) - (16,777,216 IP addresses)

But I am confused on what happens if I change the subnet mask of any the IP address of private IP range ? I know that when we use subnet mask of different class with an IP address, we are using CIDR.

For example,

The IP address with subnet mask is private. But what if I change it's subnet mask to Did I just changed the IP address from private to public ?

I am really confused what's happening when I am changing the Subnet mask of the private IP range.

EDIT: I know that changing sub net mask will change the number of hosts and number of network addresses in the range, so my question is not about subnet mask. I am specifically asking about how the type of IP address affected, does it remain private?


1 Answer 1


The mask / prefix length are used for two different purposes: describing the address allocations aka ownership/purpose (e.g. is reserved for use by LANs), and describing IP routing (e.g. packets for are sent via the gateway

These are written using the same syntax but are otherwise independent. A single allocation (range) can be subnetted – split up across several routers (e.g. split up into multiple /12 or /16-sized subnets). On the other hand, multiple small subnets can often be aggregated into a single larger route – for example, in IPv6, an ISP would publish a single /32 route that covers the /48 allocations of all customers, and internally it'd have a single /48 route per customer that covers all the /64 subnets used by that customer.

Since the whole range is massive, most networks will have to split it into many small subnets (e.g. one /12 per building or something such, and then one /16 per floor). For each subnet, the "subnet mask" only describes a route – it tells the OS what portion of the addresses are local (reachable without a gateway). But the individual address still falls under the RFC 1918 private-address allocation regardless of subnetting, so it remains a private address.

It might be easier to see this in terms of ownership. For example, if an organization owns the address range, that's just a short way of saying it owns all addresses from to, regardless of what subnets are used.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .