Subnetting help
-
I wasn't getting what I needed from my lesson and turned to google to grasp a better understanding of Subnetting. I'm reading this article : https://support.microsoft.com/en-us/help/164015/understanding-tcp-ip-addressing-and-subnetting-basics
About halfway down the page under Subnetting it explains that "The subnet mask 255.255.255.192 gives you four networks of 62 hosts each. This works because in binary notation, 255.255.255.192 is the same as 1111111.11111111.1111111.11000000. The first two digits of the last octet become network addresses, so you get the additional networks 00000000 (0), 01000000 (64), 10000000 (128) and 11000000 (192)....Using a subnet mask of 255.255.255.192, your 192.168.123.0 network then becomes the four networks 192.168.123.0, 192.168.123.64, 192.168.123.128 and 192.168.123.192. These four networks would have as valid host addresses:
192.168.123.1-62
192.168.123.65-126
192.168.123.129-190
192.168.123.193-254Remember, again, that binary host addresses with all ones or all zeros are invalid, so you cannot use addresses with the last octet of 0, 63, 64, 127, 128, 191, 192, or 255."
What I don't understand is why they are excluding 63, 127, and 191? I've converted those to binary and they aren't all 1's or 0's
63=00111111
127=01111111
191=10111111In fact, 64, 128, and 192 aren't all 1's or 0's either, are they incorrectly explaining leaving room for a switch or DC or is there another reason to exclude those numbers?
Edit: my binary conversions needed work, but I fixed that
-
In fact they are... you have to break it into the two sections.
63 is really 00 111111
127 is really 01 111111
191 is really 10 111111The first two places of the last octet are not part of the device address, they are part of the network address. You can't really look at the base 10 value, that's what leads to the confusion. Remember, the subnet mask is 255.255.255.192 in CIDR notation this is a /26 (192.168.1.0/26). So the first 26 bits are part of the network, and the last 6 are the device address.
-
Network and broadcast addresses are never usable is the explanation if my memory is correct so for your example:
NETWORK 1:
Network ID = 192.168.123.0/26
Network Address = 192.168.123.0
Usable IPs = 192.168.123.1 - 62
Broadcast = 192.168.123.63NETWORK 2:
Network ID = 192.168.123.64/26
Network Address = 192.168.123.64
Usable IPs = 192.168.123.65 - 126
Broadcast = 192.168.123.127Rinse and repeat for your other networks
-
@Dashrender Ah, so in the future I need to pay more attention to the /26 part (which they did not notate here), but would have been implied had I known what I was doing prior to reading it.
-
@G-I-Jones said in Subnetting help:
@Dashrender Ah, so in the future I need to pay more attention to the /26 part (which they did not notate here), but would have been implied had I known what I was doing prior to reading it.
Yes, 255.255.255.192 is the same as /26.
each 255 = 8 so 8 + 8 + 8 + 2 (192 = 11000000, and you only include the 1's, and you start from the left) = 26
-
Building large flat networks is mostly legacy now. Companies are moving to VLANs for security and management purposes. We dont have peer to peer applications anymore so flat networks are not required even for workstations.
-
@G-I-Jones said in Subnetting help:
192.168.123.1-62
So this is usable 1-62.
In that subnet...
192.168.123.0 is the unusable network address (address of the network)
192.168.123.64 is the broadcast address of the network (address of everything on the network)Regardless of the underlying binary, the lowest and highest numbers in the range are never available for assignment, officially. Some routers and switches will allow it, but it's not advised.
But if you are writing the network in standard CIDR notation, it makes it way more obvious...
Network is...
192.168.123.0/26 (aka 255.255.255.192)
-
@G-I-Jones said in Subnetting help:
@Dashrender Ah, so in the future I need to pay more attention to the /26 part (which they did not notate here), but would have been implied had I known what I was doing prior to reading it.
Right. And by "in the future" it's like "since 1996". The old notation 255.255.255.192 is still valid, but not popular since moving to CIDR, and isn't anywhere near as usable. The slash / notation is so much clearer and easier to write.
-
@G-I-Jones said in Subnetting help:
The subnet mask 255.255.255.192 gives you four networks of 62 hosts each.
This is incorrect as stated. It gives you four networks of 62 host addresses each (64 - 2), inside the completely arbitrary and unmentioned 192.168.123.0/24 subnet which doesn't exist.
Given that it doesn't exist, saying you get four from it, and not mentioning it at all, makes zero sense. Zero.
It would be like you buy a plot of land that is 400 sq meters and you are taught that you get 20 plots when you size them like that. But that makes no sense, as you aren't subdividing anything. You get 400m2, that's it. How big is 400m2? It's 400m2. Period.
Then you do the math and realize that they are referencing a random, non-existing 2 acre plot that isn't there and saying you get 1/20th of it. Um, okay, but 1/20th of something that doesn't exist? WTF.
-
@G-I-Jones said in Subnetting help:
Using a subnet mask of 255.255.255.192, your 192.168.123.0 network then becomes the four networks 192.168.123.0, 192.168.123.64, 192.168.123.128 and 192.168.123.192. These four networks would have as valid host addresses:
This part gives it away, but there is never a time when this happens. The underlying premise makes no sense.
If they wanted to present this insane situation, you'd write it this way...
Using a subnet mask of /26, your 192.168.123.0/24 network then gets divided into four networks of 192.168.123.0/26, 192.168.123.64/26, 192.168.123.128/26, and 192.168.123.192/26.
Sublet, but critical differences. The biggest problem is that 192.168.123.0 isn't a network at all, it's a node. Unless you add the / at the end it's a node address. If you don't have the /24 or whatever, you have no idea how big it is. Their own example proves this, but they didn't pay attention to their own example. Because they use the old, silly notation it is less obvious how they contradict their own writing.
Because when you write it out, it is really clear that these are all equally valid networks that may exist from a base IP or 192.168.123.0...
192.168.123.0/24
192.168.123.0/25
192.168.123.0/26
192.168.123.0/27
192.168.123.0/28
192.168.123.0/29
192.168.123.0/30Those are all 192.168.123.0, and equally so. Any mention of "a network" that gives a node address, but no / size should immediately be met with "but what's the network information?" The network details only exist as a combination of the node address + mask. Without both, you don't know what's being discussed.
-
@G-I-Jones said in Subnetting help:
What I don't understand is why they are excluding 63, 127, and 191? I've converted those to binary and they aren't all 1's or 0's
63=00111111
127=01111111
191=10111111That's because you are thinking in terms of octets, which are a written notation only and have nothing to do with the subnet math. They are a handy way to make it easy for humans to convey binary numbers, but they can't be used for math.
This is a huge reason why the /24 instead of 255.255.255.0 is important. Sure it's 100x easier to write and read, yeah. But it also eliminates the utterly nonsensical octet notation that leads to the problems you just saw.
The "octet mistakes" are everywhere and come from legacy thinking of 1994 and before. Yet nearly every book and teacher still get it wrong, having learned it wrong "generation after generation" making it clear that the people teaching it actually don't know how basic IPv4 addresses work! It's crazy.
-
@scottalanmiller said in Subnetting help:
Those are all 192.168.123.0, and equally so. Any mention of "a network" that gives a node address, but no / size should immediately be met with "but what's the network information?" The network details only exist as a combination of the node address + mask. Without both, you don't know what's being discussed.
Exactly, because....
in a /23 the 192.168.123.0 is simply another IP in the middle of the range of the 192.168.122.0/23
http://www.subnet-calculator.com/cidr.php
-
@G-I-Jones said in Subnetting help:
@Dashrender Ah, so in the future I need to pay more attention to the /26 part (which they did not notate here), but would have been implied had I known what I was doing prior to reading it.
They do notate, but poorly. /26 and 255.255.255.192 are literally the same thing. One is just written usefully and one is written insanely.
-
@scottalanmiller said in Subnetting help:
s this, but they didn't pay attention to their own example. Because they use the old, silly notation it is less obvious how they
They, the authors, are probably assuming old school classes for the network on 192.168.123.0 of /24... which is horrible writing, and lack of explanation.. but possible. This would also explain why they say it becomes 4 networks, assuming we were working from a single network to begin with.
-
@Dashrender said in Subnetting help:
@scottalanmiller said in Subnetting help:
s this, but they didn't pay attention to their own example. Because they use the old, silly notation it is less obvious how they
They, the authors, are probably assuming old school classes for the network on 192.168.123.0 of /24... which is horrible writing, and lack of explanation.. but possible.
Right, and if they are, it means they don't know the most basic pieces of IPv4. Classful subnets were replaced in 1993. And even pre-1993, it was still less solid than would make what was presented by the author here accurate.
Given that it has been 27 years, there is really no excuse for the oldest, most out of touch networking person to think in classful terms. For 95% of the industry, classful networking hasn't existed during their careers. For 50% of the industry, it hasn't existed in their lifespans. In "IT generational" terms, it's been like five or more generations of IT pros since classful existed, so the "mentors teaching interns" problem has had five or six generations for people to catch on.
This means that the authors not only aren't doing a good job explaining, but lack the skills required for the A+ and certainly aren't prepared to sit for the Net+. This is the first stuff you have to learn about IP networking, because without it, you can't determine how to document or know what the network addresses of your network are!