IP Subnets
If you’ve looked into colocation before, you may have found that, when it comes to getting IP addresses for your equipment, the colocation service provider has said that they will assign you one or more subnets for your use. What does that mean?
An IP ‘subnet‘ (short for ‘sub network‘), is just a group of contiguous IP addresses of a pre-determined size that has been carved out of a larger group of IPs, in a way that allows it to be treated separately from those that come before and after it. There is a more concise technical explanation to be sure, but it’s really not necessary to go into that. The important point is that, rather than giving you a random scattering of IPs from widely varying ranges, a subnet is a uniform chunk of addresses, all from the same range, assigned solely to you. The size of the subnet can be varied, from as little as a single IP address, on up to thousands or millions… but in all likelihood, your provider will assign you a subnet of perhaps eight, 16, or 32 IP addresses, depending upon how many you can justify.
When you get an IP subnet, you’ll find that not all the IPs in the range can be used as hosts. One or more of the addresses are used for internal networking tasks that are important to making subnetting possible. How may IPs are reserved in a subnet will vary by the numbering version (v4 or v6 – more on this next) and how the net is configured and routed for your use.
The size of a subnet – meaning the number of IPs included in the subnet – is determined by applying a network mask (commonly called an netmask). The netmask is essentially a number string that follows the dotted notation used by IP addresses. A longer network mask will ‘black out’ more of a range, resulting in a smaller subnet (fewer usable IPs). A shorter netmask will result in a larger subnet (more IPs). A unique subnet is denoted by its network address, followed by a ‘/’, followed by the length of it’s subnet mask, i.e. 192.168.1.0/24 (v4), fd7e:e657:486d:9bcf::/64 (v6).