Subnetting is the process of dividing a large network into smaller subnetworks or subnets. It is necessary for managing large networks and is facilitated by subnet masks and a technique known as CIDR. Subnetting involves basic binary math techniques and each subnet has its own gateway router. Incorrect subnetting setups are a common issue in IT support, making it crucial to understand this process.
While understanding the concept of subnetting, it's essential to familiarize oneself with terms like 'network ID', 'host ID', and 'gateway router'. The network ID is used by core routers on the internet to identify the network to which an IP address belongs, while the host ID helps the gateway router (which serves as the entry and exit path to a network) route the data to the appropriate system.
In the context of a Class A network, which contains over 16 million individual IPs, subnetting becomes extremely relevant. Managing this massive number of devices connected to the same router would be impractical. Hence, subnetting allows for the creation of numerous smaller networks, each equipped with their own gateway routers to manage the ingress and egress points effectively. It's noteworthy that a robust understanding of subnetting is not just theoretical but has practical implications, especially for those in IT support roles, where incorrect subnetting setups are a frequent challenge.
In a world with subnetting, some bits that would normally comprise that host ID are actually used for the subnet ID. WIth all three of these IDs representable by a single IP address, we now have a single 32-bit number that can be accurately delivered across many different networks. At the internet level core routers only care about the network ID and use this to send the datagram along to the appropriate gateway router to that network. That gateway router then has some additional information that it can use to send the datagram along to the destination machine or the next router in the path to get there. Finally, the host ID is used by that last router to deliver the datagram to the intended recipient machine.
Just like an IP address, subnet masks are 32-bit number that are normally written out as four octets in decimal. The easiest way to understand how subnet masks work is to compare one to an IP address.
subnet mask tell us what we can ignore when computing a host ID. Parts with all the zeroes tell us what to keep.
ip: 9.100.100.100
subnet mask: 255.255.2550
subnet mask determines the size of host id in a network. A single 8-bit number can represent 256 different numbers, or more specifically, the numbers 0-255.
In general subnet can only contain two less than total number of host ID available.
0 is generally not used and 255 is kept as broadcasting address. (1 ~ 254)
ip address: 9.100.100.100/27 would have subnet mask of 255.255.255.224 because the subnet mask is consisted of 27 ones and 5 zeroes out of 32 bit.
skip
With traditional subnetting networkID have 8 bit for Class A, 16bit for classB network 24 for class C network.
C network have 254 max hosts and this is often to small for a business and 65534 max hosts for class B network is often too large. many companies ended up with joining class C networks to meet their needs.