Chris V. answered 03/18/19
Certified Computer/IT Instructor Specializing in Cybersecurity
Hi Mo, please find the answer below. I've subnetted this and shown subnet mask, CIDR, as well as broadcast and host IP ranges.
- 1st Subnet: 192.168.20.0
- Subnet Mask: 255.255.255.192
- CIDR: 192.168.20.0/26
- Broadcast: 192.168.20.63
- Range: 192.168.20.1 – 192.168.20.62
- 2nd Subnet: 192.168.20.64
- Subnet Mask: 255.255.255.192
- CIDR: 192.168.20.64/26
- Broadcast: 192.168.20.127
- Range: 192.168.20.65 – 192.168.20.126
- 3rd Subnet: 192.168.20.128
- Subnet Mask: 255.255.255.192
- CIDR: 192.168.20.128/26
- Broadcast: 192.168.20.191
- Range: 192.168.20.129 – 192.168.20.190
- Last Subnet: 192.168.20.192
- Subnet Mask: 255.255.255.192
- CIDR: 192.168.20.192/26
- Broadcast: 192.168.20.255
- Range: 192.168.20.193 – 192.168.20.254
Since this sounds like a question directly out of one of your classes, I am not going to answer it directly because that's likely going to violate multiple codes/policies. :)
However, I have taken the table you gave, and I have subnetted 192.168.20.0 (Class C network) to allow for 4 usable subnetworks (subnets).
There are several fundamentals you have to understand in order to complete a problem like this:
- Binary numbers. Plain and simple, you have to be able to "count" from 0 to 255 in binary. There's no easy way about this. Just put the time in and learn it! You have to know simple binary-to-decimal conversions like below:
- 1010 in binary = 10 in decimal
- 11100000 in binary = 224 in decimal
- 00001111 in binary = 15 in decimal
- 11110011 in binary = 243 in decimal
- The purpose of a subnet mask. It's to show you the portion of a network address which belongs to the network (or the subnetwork), and which portion belongs to the host (such as a PC, or a server).
- In a subnet mask, 255.255.255.0, we're saying that the first 3 octets belong to the network. They can't change. The last octet is available for use in assigning addresses to PCs, printers, servers, etc. So, if we're given a network address 192.168.10.0 and a subnet mask 255.255.255.0, we know that we have 192.168.10.1 - 192.168.10.254 which can be assigned to PCs, printers, servers, etc. (Notice the first [192.168.10.0] and last [192.168.10.255] addresses are not assignable)
- In the subnet mask I chose, 255.255.255.192, I have indicated that the network portion of 192.168.20.0 includes the first 3 octets AND the first two bits of the 4th octet. These cannot change. Only the last 6 bits of the 4th octet are available for assigning to PCs, servers, printers, etc. This is where you have to understand binary (see point 1).
- CIDR notation. It's basically shorthand notation to save space on paper when writing the subnet mask. It's shorter to write /24 than 255.255.255.0, right?
- The /# just tells you the same thing, but in # of bits. So /24 is 24 bits. /16 is 16 bits. If you look at a subnet mask, 255.255.255.0 is 11111111.11111111.11111111.00000000 in binary. See the 24 bits (1s)? So in my example above, a /26 is 11111111.11111111.11111111.11000000 or 255.255.255.192. Again, you must understand binary!!! No shortcuts!
- Usable subnets, how many? In my case, I have four usable subnets, and it's because I "borrowed" two bits from the 4th octet. If you understand binary, you know that two bits in binary have four possible combinations: 00, 01, 10, 11. So my possible subnets are .0, .64, .128, and .192...and I'll write those out in binary so you can see...I'll place pipe ( "|") between the host and network portion of the last octet so you can see it:
- 192.168.20.00|000000 = 192.168.20.0
- 192.168.20.01|000000 = 192.168.20.64
- 192.168.20.10|000000 = 192.168.20.128
- 192.168.20.11|000000 = 192.168.20.192
- Usable range. This includes the first assignable address all the way to the last assignable address. To figure that out, you take the above step and just fill in the host portion of the address, which is everything to the RIGHT of my pipe ("|"):
- For 192.168.20.0/26
- 192.168.20.00|000001 = 192.168.20.1
- 192.168.20.00|111110 = 192.168.20.63
- For 192.168.20.64/26
- 192.168.20.01|000001 = 192.168.20.65
- 192.168.20.01|111110 = 192.168.20.126
- For 192.168.20.128/26
- 192.168.20.10|000001 = 192.168.20.129
- 192.168.20.10|111110 = 192.168.20.191
- For 192.168.20.192/26
- 192.168.20.11|000001 = 192.168.20.193
- 192.168.20.11|111110 = 192.168.20.254
That's pretty much it. There's a lot to it, and there's no EASY way to learn this stuff. I hope it helps, and if anyone needs help learning this stuff, I'd be more than happy to help, just contact me directly through Wyzant, and we'll have you subnetting in no time.
** A few tips **
- Break the octet into two portions so your eyes don't go cross:
- 0000 0000 instead of 00000000
- Learn common combinations in binary:
- 1000 0000 = 128
- 1100 0000 = 192
- 1110 0000 = 224
- 1111 0000 = 240
- 1111 1000 = 248
- Did you know that a binary number with ALL 1's is always equal to "1 less than the preceding binary digit"? Sounds complicated, but just look. I don't have to do math to know these INSTANTLY:
- 0000 1111 = You should instantly see 15 here. No counting. Because:
- 0001 0000 = This is binary 16.
- 0111 1111 = Instantly see 127
- 1000 0000 = This is binary 128
- 1111 1110 = Instantly see 254
- 1111 1111 = This is binary 255