05-08-2023
06:09 PM
- last edited on
05-08-2023
07:02 PM
by
rupeshah
I have a network 172.16.0.0 which by default is a class B network. I need to subnet this network to facilitate minimum number of hosts per subnet (No VLSM). Please keep in mind that this is a textbook question (attached to post), so the primary objective is just to facilitate the minimum number of hosts per subnet (biggest network having 232 hosts). What I did is I subnet this network into a /24 network meaning that there are 256 networks and 254 usable IPs per network (enough to facilitate my largest network without VLSM).
What I am in confusion of is:
Network is now 172.16.0.0 255.255.255.0 meaning that the first 3 octets is network bits and the last octet is host bits. So I know my first subnet range will be:
172.16.0.1 - 172.16.0.254
Will my other range be:
172.16.1.1 - 172.16.1.254
Then
172.16.2.1 - 172.16.2.254
If so then how? Isn't the first 3 octets supposed to be network bits that we do not change?
If not then what will it be and why?
Thank you in advance for your help
Solved! Go to Solution.
05-10-2023 08:00 AM
I suspect you've some misunderstandings about classful and classless IP addressing.
When working with the classful model, taking part of any "natural" (i.e. A, B or C), is a subnet. Combining "natural" networks, is a superset.
For example if a break out a /17 though /32 from a Class B network, the broken out network is a subnet of the Class B. Even if the broken out network is a /24, it's not a Class C.
Or, for example, if I combine Class C networks, into a larger network, the aggregate would be a supernet of the Class Cs. Even if I combined 256 Class Cs into a /16, the latter is not a Class B.
In the Classless model, a network is a network, i.e. there's really not subnets or supernets, although we still often use the term subnet for any network prefix, especially when the network is not an aggregate or address block.
IMO, the decimal dotted notation for IPv4 addresses, tend to "hide" we're just working with a 32 bit binary number, a portion of which is used for an address block and another portion for a host number. Often octal or hexadecimal numbering has been used to represent binary values (as, for example, does Ethernet MACs and IPv6).
When you "look" at the binary values, it's easier to see how to change the scale value for the network and the host numbers, which is always in powers of 2. It also explains why changing the demarcation can only be done on specific binary values. For example, I can take 192.168.0.0/24 and 192.168.1.0/24 and aggregate those as 192.168.0.0/23 but I cannot do that for 192.168.1.0/24 and 192.168.2.0/24.
05-08-2023 09:46 PM - edited 05-08-2023 09:55 PM
Hello @AntonioWells~,
To subnet the network 172.16.0.0/16 into /24 subnets, you are correct that the first 3 octets (24 bits) represent the network portion, and the last octet (8 bits) represents the host portion.
The subnetting process involves borrowing bits from the host portion to create subnets.
To find the subnet range for each subnet, you can increment the third octet (since the first two octets remain the same) by 1 for each subsequent subnet. Therefore, the subnet ranges would be as you said,e.g. 172.16.0.0/24 ; 172.16.1.0/24; 172.16.2.0/24...
And so on, incrementing the third octet for each subsequent subnet.
By doing this, you have divided the 172.16.0.0/16 network into multiple /24 subnets, each with a maximum of 254 usable IP addresses and its own unique network and broadcast addresses.
You use a subnet mask that allows for more subnets and fewer hosts per subnet, or use Variable Length Subnet Masking (VLSM) to allocate different-sized subnets within the class B network.
05-09-2023 05:18 PM
Ok, so for the sake of my subnets, the 3rd octet can be changed, to facilitate my subnets even though it is a network portion now after borrowing bits but the first 2 octets can never be changed because the network is originally a Class B being broken down into Class C networks?
This is understandable. Let's get more complex though, what if I have something like a Class A network eg 93.0.0.0, to be converted to a /19 network (borrowing 11 bits/13 bits are host bits). I now have a network that can facilitate 2048 subnets and 8190 usable IPs. Correct me if I am wrong:
1) All I have to do is increment by 8190 IPs to get my subnet ranges.
2) I can change octets that are now considered to be network portion octets after borrowing bits to facilitate my subnet.
3) I can never change my first octet because the network was originally a Class A network being broken down into smaller /19 networks.
Also on another note is there a way to calculate increments? Manually incrementing large numbers gets really complex.
05-10-2023 08:00 AM
I suspect you've some misunderstandings about classful and classless IP addressing.
When working with the classful model, taking part of any "natural" (i.e. A, B or C), is a subnet. Combining "natural" networks, is a superset.
For example if a break out a /17 though /32 from a Class B network, the broken out network is a subnet of the Class B. Even if the broken out network is a /24, it's not a Class C.
Or, for example, if I combine Class C networks, into a larger network, the aggregate would be a supernet of the Class Cs. Even if I combined 256 Class Cs into a /16, the latter is not a Class B.
In the Classless model, a network is a network, i.e. there's really not subnets or supernets, although we still often use the term subnet for any network prefix, especially when the network is not an aggregate or address block.
IMO, the decimal dotted notation for IPv4 addresses, tend to "hide" we're just working with a 32 bit binary number, a portion of which is used for an address block and another portion for a host number. Often octal or hexadecimal numbering has been used to represent binary values (as, for example, does Ethernet MACs and IPv6).
When you "look" at the binary values, it's easier to see how to change the scale value for the network and the host numbers, which is always in powers of 2. It also explains why changing the demarcation can only be done on specific binary values. For example, I can take 192.168.0.0/24 and 192.168.1.0/24 and aggregate those as 192.168.0.0/23 but I cannot do that for 192.168.1.0/24 and 192.168.2.0/24.
05-10-2023 10:15 AM
This definitely cleared any of my doubts. I finally understand the concept, I appreciate your explanation, many thanks!
05-09-2023 02:17 AM
It's the combination of the IP and network mask that allows for what you've described.
That's also true for classful addressing where the network mask is implied by the IP.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide