Posted on 2/24/2018 by Luxul Team
By Rich Cushing, technical support team leader
Imagine it, you’re on your first install. You complete the physical install perfectly. Your client is impressed. But now it’s time to log in to the router and configure the network. You’ve learned about IP addresses and have no problem setting that up. But… what... is... Subnet Mask??
Don't worry. We've got you.
The subnet mask is a number in the IP addressing scheme that defines the range of IP addresses available for devices on your network. Every device in the same subnet must use the same subnet mask. A common subnet mask of 255.255.255.0 allows for 254 IP addresses—you can increase or decrease the number of available IP addresses by modifying the subnet mask.
There are three different classes of subnet masks—Class A, B, and C. Class C subnets (255.255.255.0) will give you the fewest number of IP addresses, Class B (255.255.0.0) will give you more, and Class A (255.0.0.0) will give you more still.
Why would I ever want fewer available IP addresses? Why not always max them out?
Your motive for either increasing or decreasing the number of available IP addresses will entirely depend on the specific network being configured. For example, if the network is at a restaurant, the number of available IP addresses may need to be larger in order for all the company network devices, the point of sale system, the devices of the restaurant’s patrons, and the employee’s devices to each get its own IP address.
Inversely, your Internet service provider (ISP) will set their subnet mask to allow only two IP addresses—one for your router, and one for theirs (your default gateway). ISPs do this, because they’re providing IP addresses to many more routers than just yours, but your router can’t be on the same network as all those other routers. And if they set the subnet to allow the full range of IP addresses available to a larger subnet rather than just the two, they’d be wasting a couple hundred IP addresses they could have otherwise assigned to the other routers on their network.
You’ll probably never see a situation where the subnet mask needs to be set to allow fewer IP addresses than what the default Class C subnet allows. There’s almost no downside to having too many IP addresses available in an average application.
So how do I know what to set the subnet mask to?
We’ve already determined you need to know how many nodes are going to connect to each network before you purchase equipment and start installing it. So by the time you’re setting up the subnet mask, you should have a pretty good idea what to set it to.
If the network is going to have 254 or fewer nodes connected to it at any given time, the default Class C subnet (255.255.255.0) will work. Any more than that, and a Class B subnet should be used—255.255.0.0 is the default, but that will provide you a lot more than 254 IP addresses; you’ll get a whopping 65,000. A Class A default subnet (255.0.0.0) will allow you over 16 million IP addresses.
If you want between 254 and 65,000 or between 65,000 and 16 million available IP addresses, there are solutions that will help you adjust that number. But doing the math to figure out exactly what to set your subnet mask to isn’t much fun and also isn’t necessary—this useful subnet mask calculator can help you determine what the perfect subnet mask is for each application.
Keep in mind, if you set the subnet mask to allow too few IP addresses and more devices are added down the road, you’ll have to go back and change the subnet mask. And no one wants to do more work after the work is done, so plan accordingly!
Oh, and if you ever need additional assistance determining the best subnet for your application, our friendly IP experts at Luxul are always available to assist you.