Networking Basics - Subnet's
Recently I've had a couple people pick up on my notation style for IP subnet's. I thought I would take a minute to talk about subnet's, and break down CIDR notation.
Subnetting seems to be a skill that is rapidly being lost. A standard Class A,B, or C network is applied but a lot of the time I find broad ranges being assigned unnecessarily. Understanding how subnet's will help troubleshooting, allow you to create a more secure network environment, and save you some money when isolating networks on the same switch fabric (I'll post on VLANs another time)
Today there are two network standards being applied, IPV6 which is the more modern addressing format designed to increase the address space on the Internet and IPV4 which is the common 4 octet decimal notation most of us see today. Personally I think we wont see IPV6 for sometime in the SMB network - At least not directly configured.
So what is a subnet? A subnet is the logical segmentation of a range of addresses on a network. Essentially a way of separating the network broadcast range from another on the same switch fabric.
There are lots of uses for subneting, but more recently I've been using subnetting as a way of managing the physical interface in Hyper-V configurations. Hyper-V supports VLAN tagging, but with my current lab environment subnetting seems a far simpler option.
So what does it mean when you see 192.168.1.0/24. Well it essentially means you have a network defined as 192.168.1.x and the CIDR mask defines how many host addresses are available. I've put a table down below to help out.
CIDR | Mask | Hosts | Networks |
24 | 255.255.255.0 | 254 | 1 |
25 | 255.255.255.128 | 126 | 2 |
26 | 255.255.255.192 | 62 | 4 |
27 | 255.255.255.224 | 30 | 8 |
28 | 255.255.255.240 | 14 | 16 |
29 | 255.255.255.248 | 6 | 32 |
30 | 255.255.255.252 | 2 | 64 |
31 | 255.255.255.254 | P2P | 256 |
I bet your asking how does 24 equal 255.255.255.0? Well the 24 means how many mask bits are being assigned to correlate with the address. It's far easier to draw. (Count the 1's in the mask binary)
Address | Binary | |
Full Address | 192.168.5.10 | 11000000.10101000.00000101.00001010 |
Mask | 255.255.255.0 | 11111111.11111111.11111111.00000000 |
Network | 192.168.5.0 | 11000000.10101000.00000101.00000000 |
Host | 0.0.0.10 | 00000000.00000000.00000000.00001010 |
So the next time your considering buying a new switch to separate you network consider changing a subnet mask and creating a subnet instead. It may just be the solution you're looking for.