Subnetting and subnet mask creation are often outsourced to consultants, although doing it yourself may be both difficult and lucrative.
If you work for a large company or organisation, particularly one with more than two locations, there’s a good chance you’re benefiting from a process known as subnetting.
Subnetting, also known as subnetworking, allows big and unmanageable networks to be broken down into smaller, more localised networks by breaking the main networks into two or more strands. with this method i will show you, you don’t need an subnetting calculator.
ON THIS PAGE: Subnetting fundamentals: What is a Subnet?
The procedure is called after a subnetwork, also known as a subnetwork, which is a logical split of an IP network.
To completely comprehend the process of subnetting, it’s necessary to first grasp IP addresses: they are 32-bit integers that are unique to each device and range from zero to 4294967295. IP addresses are divided into four octets, with each octet containing eight bits. Converting each octet into a decimal, separated by a single dot, produces the most usually encountered format of an IP address. This strategy can generate 4.3 billion distinct IP addresses, which is almost enough to supply a different IP address for more than half of the world’s population.
A Network Prefix (or ID) and a Host ID may be thought of as two different fields inside an IP address. They’re divided into five groups depending on the network to which the IP address was issued. From A through E, the courses are named after the first five letters of the Latin alphabet. Most IP addresses will fall into the A to C category, with D and E being reserved.
The default subnet mask for Class A networks is 255.0.0.0, with 0-127 as the first octet. Class B networks have a default subnet mask of 255.255.0.0 and a first octet of 128-191. Class C networks have a default subnet mask of 255.255.255.0 and a first octet of 192-223.
An organization’s IT administrator may further split, or subnet, a Class A, B, or C TCP/IP network.
When the IP system was initially established, it rapidly became evident that although it was much simpler to locate a particular network, sending a data packet to the computer you wanted on that network was far more complex. This is especially true if a network becomes large enough to sustain an organisation, and network performance becomes a bigger concern.
Subnets assist to tackle this issue by dividing the network into smaller segments, resulting in less congestion. Data packets may then travel straight to their destination, bypassing any blockages along the way.
IP subnets may be used by an organisation to separate bigger networks for logical (firewalls, etc.) or physical reasons (smaller broadcast domains, etc). In other words, routers make routing decisions based on subnets.
Subnetting also helps to enhance network security by allowing organisations to apply access limits across subnets, which helps to limit any security problems.
What is the meaning of a subnet mask?
A subnet mask, like an IP address, consists of four bytes (32 bits) and is represented in the same syntax as an IP address, which is generally 255.255.255.0. A subnet mask is required for TCP/IP to function.
The subnet mask is a complement to an IP address that indicates which subnet an IP address belongs to by applying it to the IP address. The network address and the host address are the two parts of an IP address. If more subnetworks are required, subnetting separates the host portion of an IP address into a subnet and a host address. In effect, it hides an IP address and separates it into two parts: a network address and a host address.
A router is used when a computer on one network wants to interact with a computer on another network. A default gateway is a router that is configured on a host that links the host’s subnet to other networks. This connects devices on different subnets with traffic from one subnet.
The local subnet is often connected to the internet via this gateway. There aren’t many areas of the IT industry, particularly networking, that are as mysterious as subnetting—the process of building subnetworks.
Subnets are logical divisions of an existing network defined by the subnet mask and the IP address class. Consultants often provide network design services to new firms in order to assist them in establishing a network that meets their current demands. However, when the company expands and its demands alter, the original network arrangement may become obsolete.
I’m now working on a project that perfectly matches that description. When there were fewer devices and users to satisfy, consultants designed the network. As the company’s demands expanded, it became painfully evident that a single /24 subnet with up to 254 hosts wasn’t going to be adequate. So I’m putting up a new network structure that can handle all of the devices we have now, divided by device type and with space for expansion.
This implies that each collection of devices, such as printers, servers, workstations, and wireless access points, has its own subnet and VLAN. This gives each group as much space as they could require in the future while yet maintaining the network rationally arranged.
As amusing as it may seem, many seasoned IT professionals are still wary of subnetting because they don’t want to put in the effort required to instal it. Do we need a certain number of addresses? What IP strategy will we employ? How many addresses will be allocated statically and how many will be supplied through DHCP?
Will we categorise the devices or just group them together in a certain area of the range (for example, all servers in the first 50 addresses in a range)?
As a consequence, once a network is formed, it is seldom replicated or dramatically altered. But, since our network gives us no other option, and since I am a glutton for torture, I opted to take on this duty myself rather than hire a consultant. To do so, I had to dust up my subnetting expertise, which I hadn’t used in a long time, and re-acquaint myself with host calculation. Here are the fundamentals of subnetting as I understand them, along with a few things to think about at the conclusion.
You’ll need a rudimentary grasp of binary (base-2) numbers and classful networks to effectively subnet. The basic concept behind classful networks is that IPv4 addresses are split down into four octets (eight binary bit portions) and then classified into classes depending on the number of hosts they can support.
The notion of separating an IP address into a network component and a host component to separate off the network is still utilised with subnetting, even if the classful network notion is no longer utilised in today’s public internet, which instead employs classless inter-domain routing. Class A, Class B, and Class C are the three primary private IP ranges utilised in the majority of internal networks. As indicated in the diagram, each of these classes utilises a certain amount of bits for the network component of the address and the remainder for the host component:
In a particular network, the separation of network bits and host bits illustrates which elements of the IP address will not change. The final three octets of an IP address will vary progressively when they are handed out through DHCP or allocated in the case of a class A range of 10.0.0.0, but the first octet will never change. That’s because they are the network bits that identify that network, making 10.255.255.255 the exact last address in that range.
You use a subnet mask to take bits from the host section of an address and add them to the network component to customise the number of hosts you can accommodate while subnetting. A subnet mask is a 32-bit number similar to an IP address, but instead of being used for host addressing, it is used to transmit the network/subnet bits and the host bits of a network address. Setting all of the host bits to 0 and all of the network/subnet bits to 1 creates a subnet mask.
Because an IPv4 address has 32 total bits (eight in each of four octets), subtract the number of network bits and subnet bits from 32 and raise 2 to the power of the difference to determine the number of host addresses accommodated by a specific mask. The amount of host addresses on a /22 network, for example, would be 32 – 22 = 10, 210 = 1024 addresses. The number of host addresses connected with various masks is seen in this graph:
Once you’ve determined how many host addresses you’ll need, add the binary bits from the network and subnet portions of each octet individually to get your subnet mask.
If you’ve followed the reasoning up to this point, you may be wondering, “Was this journey really necessary?” Yes, since subnetting allows you to divide a single network address into many subnets.
Remember that whenever a particular host on your network gets another packet of data, the one question the host has is, “What do I do with this?” Take, for example, Gandalf, a typical networked host. Gandalf examines the Destination field in each outgoing packet’s IP header to determine if the packet’s destination is “local” or “not local.”
If the destination is local, Gandalf looks out the MAC address of the computer in an ARP database and transmits the packet to it. If the destination is not nearby, Gandalf sends the packet to his all-knowing friend who handles everything else, a device known as the default gateway.
(This is some sort of routing device, whether a real router or anything capable of routing, such as your Firebox.) What does Gandalf mean by “local”? Simply put, a local device is any device that has the same subnet address as Gandalf.
Subnets are utilized all across the Internet. However, if you wish, you may utilize subnetting on your own network. You may subnet for any purpose, including security, such as splitting a single network into two or more sections and connecting each subnet with one or more routers.
Because routers are used, broadcasts are (usually) restricted to each subnet. You could also utilize a Firebox’s Optional and Trusted interfaces to separate two subnets, even if they were both internal networks. Subnetting may help with troubleshooting. Tracing an issue on a network segment is simpler if the network has been subnetted into halves; you’re dealing with fewer hosts at a time.
Though subnetting used to imply dividing your network down into smaller physical pieces, subnetting is no longer always associated with the physical world. Subnetting is useful if you want each department (or distant office, or floor in your highrise, or building on your campus, or…) to have its own subnet address.
You may determine, for example, that anything starting with 192.168.100 denotes mobile users and anything beginning with 192.168.200 denotes executive users. You may make wifi addresses immediately identifiable to you so that you can simply keep track of them in your records. Or whatever else you can think of!
Before you start slicing and dicing your own subnets, let’s go on another side trip through TCP/IP history. You should be aware that, although there are 256 potential addresses when using one byte (0 through 255), you will only be allowed to utilize 254. This is because an all-ones address, or 255 in this instance, is allocated for the broadcast address and an all-zeros address is reserved for the network address. Because the broadcast address implies “send to all hosts on this network segment,” it cannot be used as a single host address. The network address is set aside for more conventional purposes.
Assume someone wants to divide their Class C network into four smaller CIDR networks. By dividing the 256 available addresses in a Class C network by four, we can determine that each subnet may contain 64 addresses. (However, due to the reasons stated above, only 62 of those addresses may be utilized as hosts.)
Instead of 255.255.255.0, or /24, a Class C subnet mask of 255.255.255.192, or /26, would be used. This works because six bits (out of the 32 bits in an IP address) are reserved for addressing hosts. Six bits (32 + 16 + 8 + 4 + 2 + 1) are required to generate 64 addresses (the bits total 63, but 0 also counts as one of the addresses).
When subnetting a network, it’s simple to assume that since you have x devices on your network, you merely need to choose an IP range and subnet with enough addresses to cover all of them, but this overlooks certain important aspects.
When you create a mega subnet, such as a /8 with 16,777,216 addresses, you start to experience network congestion. Because each subnet has its own broadcast domain, anytime a switch transmits an ARP broadcast or a computer broadcasts anything else, it will be received by all devices in that broadcast domain. As a consequence, non-broadcast traffic on your network may be drowned out by broadcast packets.
When dealing with 256-1024 or less addresses, broadcast traffic is tolerable, but any larger than that, depending on how loud your devices are, you’re in severe danger.
The best practise is to use VLANs to divide some of your network’s primary kinds of devices into their own subnets or broadcast domains. You can still have as many addresses as you need by using a Layer 3 device to transport data across subnets, but the network noise is manageable. The time it takes to implement a new subnet scheme varies widely depending on your environment, however it’s better to start small.
Grab the low-hanging fruit first to prove the idea, test the routes, and get some breathing space in the congested /24 you’re fleeing. When it comes to IPv6 addressing, much of the same concepts apply, however there are some important variations. Every internal address is also an exterior address, and it employs hexadecimal notation, which consists of 16 characters rather than binary notation, which consists of just two. But that’s a discussion for another day.
Using a program to manage your subnets is one approach to make the process easier. SolarWinds® IP Address Manager (IPAM) is my suggestion since it offers many capabilities that automate and simplify this procedure.
IPAM provides an automatic subnet discovery process that allows you to find and gather information on all of your subnets, displaying which IP addresses are assigned to each one. IPAM can simply import spreadsheets including all of your subnet and IP address information.
It also features a subnet allocation tool, which analyzes your network’s traffic and size before optimizing your IP addresses into subnets that meet your requirements. The interface enables you to categorize and organize your subnets and IP addresses so that you can easily locate the information you need.
IPAM allows you to create subnets by simply selecting a network, group, or supernet to subnet. You may name the subnet, assign it an address, and add custom characteristics if desired using an easy-to-use interface. This streamlines the subnetting process and allows you to create and organize your subnets from the start.
SolarWinds IPAM provides a dashboard that displays the scope of your IP subnet and its usage, as well as the ability to set alerts to notify you when a subnet is approaching capacity or has a large amount of empty space. You may get various views on how your network works and how your IP addresses are assigned by using the IP address view, network view, or chart view. This may assist you in optimizing your subnets and reducing IP address waste.
I hope this IP subnet cheat sheet has helped you understand subnetting better. This subnetting guide has addressed how subnets operate, the fundamental ideas behind them, and the fundamentals of subnetting.
It has also addressed some important concerns regarding subnet problems and looked at how tools may assist you in managing your subnets more simply. SolarWinds IP Address Manager, a powerful program that allows you to efficiently assign IP addresses into subnets, monitor, and manage them, is my preferred solution for this purpose.