# Can someone explain this subnetting question to me ?

Registered Users Posts: 3 ■□□□□□□□□□
How did they get this answer.. I worked it out and it doesn't come out to that..

Question: What is the last valid host address on the subnet 10.16.0.0/13?

I just don't understand how they went from .16 to .23 ?

• Member Posts: 20 ■□□□□□□□□□
Since the CIDR is /13, we're working with the 2nd set of numbers. It has 5 1's and 3 0's

11111111.11111000.00000000.00000000

You can draw the line right before the 3rd 0 to find out the block size.

11111|000

Starting from the right, we start at 1, and keep doubling it until we get passed our imaginary line we drew to find the block size. Since there is 3 0's, we'll go from 1 -> 2 -> 4 and then to get passed the line, it will go to 8.

8 is the block size.

On the 10.16.0.0/13 subnet,

The network ID is 10.16.0.0
The valid host ranges from 10.16.0.1 through 10.23.255.254

To answer your question, if we add the block size of 8 to .16, we will get .24. The broadcast address is 1 less than this (10.23.255.255), which makes the last valid host 10.23.255.254.

Let me know if any of that doesn't make sense and I'll see if I can clarify better.
• Member Posts: 88 ■□□□□□□□□□
This is an area I'm still trying to fully grasp. The Prof Messer video on YouTube explaining this is great. My problem seems to be working out the binary to decimal and vise versa. I'm sure I'll eventually get it as long as I keep trying it.
Systems Support Specialist
Associate of Arts Computer Information System
Certifications: CompTIA A+, Network+, Microsoft Technology Associate: Networking Fundamentals
2018 Goals: CompTIA Security+,
CompTIA CySA+

• Member Posts: 20 ■□□□□□□□□□
Techie,

The binary conversion is easy if you can remember 1 number. 128

Start with 128, then halve it over and over until you get 1.

128 64 32 16 8 4 2 1

To translate a binary to decimal, place the binary byte (8 bits / 8 1's and 0's) underneath, one bit at a time.

For example, if we wanted to know what 10110110 is in decimal form, we'll place it underneath.

128
64
32
16
8
4
2
1

1
0
1
1
0
1
1
0

The rest is an addition problem. Anything with a 1 underneath gets added together. So 128+32+16+4+2, which equals 182.

So 10110110 in decimal form is 182. All 0's would be 0. All 1's would be 255. (128+64+32+16+8+4+2+1 = 255)

---

To go the other way around, from decimal to binary, we also start at 128 and halve it until we get 1

128 64 32 16 8 4 2 1

This time though, we put a decimal number on top, starting at 128. The decimal needs to be 255 or under since we are only working with 8 bits. Lets use 155.

155

128
64
32
16
8
4
2
1

So you need to ask yourself, is your decimal (155) greater/equal to, or fewer then 128. If its greater, we subtract 128 from 155, and then put a 1 underneath. Then we take whatever 155-128 is (which is 27) and move it to the next number over, and do the same thing.

155
27

128
64
32
16
8
4
2
1

1

Since 27 is less than 64, we write a 0 underneath, then move 27 over again, and keep doing this until 27 is greater than the number underneath. 27 is greater than 16, so we subtract 16 from 27 to get 11, and put a 1 underneath.

155
27
27
27
11

128
64
32
16
8
4
2
1

1
0
0
1

We keep doing this until we get to 0.

155
27
27
27
11
3
3
1

128
64
32
16
8
4
2
1

1
0
0
1
1
0
1
1

So 155 in binary form is 10011011. To check our work, we add everything that has a 1 underneath together, and we should get back to our original decimal number of 155. (128+16+8+2+1) which it does add back up to 155.

I hope this helps.
• Member Posts: 88 ■□□□□□□□□□
This is an awesome explanation. Greatly appreciate your help. Will continue to practice and prefect it. As they say, practice makes perfect.
Systems Support Specialist
Associate of Arts Computer Information System
Certifications: CompTIA A+, Network+, Microsoft Technology Associate: Networking Fundamentals
2018 Goals: CompTIA Security+,
CompTIA CySA+

• Registered Users Posts: 3 ■□□□□□□□□□
@Jebrown - Thank you for the explanation.
The network ID is 10.16.0.0

So the usable Hosts are from 17 - 22 ?

And can I break this up into different subnets further still staying in the second octet?
Example: 10.24.255.54 to 10.31.255.54?
• Member Posts: 88 ■□□□□□□□□□
So I kept practicing and feel like I have a 100% understanding of the decimal-binary conversion and vise versa but still not understanding the CIDR concept. What am I missing?
Systems Support Specialist
Associate of Arts Computer Information System
Certifications: CompTIA A+, Network+, Microsoft Technology Associate: Networking Fundamentals
2018 Goals: CompTIA Security+,
CompTIA CySA+

• Member Posts: 20 ■□□□□□□□□□
@kevin

The usable hosts is from 10.16.0.1 to 10.23.255.254

Because the block size is 8 and we're working with the 2nd octet, we know that the subnets are

10.0.0.0
10.8.0.0
10.16.0.0
10.24.0.0
10.32.0.0

and so on.

The above addresses are the network ID's. The immediate address before the next subnet is the broadcast address. Everything inbetween is a valid host in that subnet.

So in your question, we're working with the 10.16.0.0 subnet. We know the block size is 8, and we know that the next subnet is 10.24.0.0.

So since we know our network ID is 10.16.0.0, and our broadcast address is 10.23.255.255, everything inbetween is a valid host.

10.16.0.1 - 10.23.255.254

To answer your next question, yes, you can break it up into smaller subnets. You would need to know how many different subnets you need, and how many hosts per subnet.

For example, right now your example of 10.16.0.0 subnet is a CIDR /13. If you had a business that had say, 8 different departments, and you wanted each department to have it's own subnet, you could do so by adding bits to the CIDR. You will know how many bits to add depending on how many subnets you want to add.

You start at 2, and then double that until the result is more than the number of subnets you want.

So 2 -> 4 -> 8. It jumped 3 times, so we add 3 bits to the /13, to make it a /16. In this specific example this doesn't really matter because no business will ever come close to 65,534 devices on a single subnet (probably), but to find the number of hosts available per subnet, you will draw an imaginary line at /16.

1111111.1111111|.00000000.00000000

Then from the right side, you start with the number 2, and double that each time you move left 1 digit. (2 -> 4 -> 8 -> 16, etc.) until you get to your line. If you have a calculator, you can do 2 to the power of however many 0's you have. In this case 2^16 = 65,536, then you subtract 2 for the host ID and broadcast address for 65,534 hosts per subnet.

To summarize. Going from a /13 to /16 would give you 8 subnets with each of the 8 having 65,534 valid hosts.

@Techie

A subnet mask of 255.0.0.0 is a CIDR of /8 because there is 8 bits.
A subnet mask of 255.255.0.0 is a CIDR of /16 because there is 16 bits.

For example, a CIDR of /20 would look like this.

11111111 . 11111111 . 11110000 . 00000000

It would be 20 1's, and the rest 0s.

Now you just do your binary to decimal conversion to find out the subnet mask in decimal form.

so 11111111.11111111.11110000.00000000 is equal to 255.255.240.0

When you are given a CIDR, just break it up into octets, and go from there.
• Member Posts: 52 ■■□□□□□□□□
This is the table I make before I start every practice session:

/0 /1 /2 /3 /4 /5 /6 /7 /8
/8 /9 /10 /11 /12 /13 /14 /15 /16
/16 /17 /18 /19 /20 /21 /22 /23 /24
/24 /25 /26 /27 /28 /29 /30 /31 /32

256 128 64 32 16 8 4 2 1 -Network size
0 255 127 63 31 15 7 3 1 -Wildcard address
0 2 4 8 16 32 64 128 256 -Number of subnets
254 126 62 30 14 6 2 0 0 -Number of hosts per subnet
0 128 192 224 240 248 252 254 255 -Subnet address

Network ID - First IP address
Usable IP Range - (Network ID + 1) through (Broadcast ID - 1)

I apologize for the formatting, but this makes everything easier for me
• Registered Users Posts: 3 ■□□□□□□□□□
Thank you all for taking time from your days to help me and others with this, some great explanations and it definitely makes a lot more sense. I will have to do some more practice questions until I feel I get it 100%

Would be nice to be able to do this in my head without writing it out!
• Member Posts: 88 ■□□□□□□□□□
I agree. I'm very grateful as well for all the people who provide their knowledge and support on this forum. I love learning about networking and also want to become a pro. I found this video on YouTube which has also helped me better understand the subject. He explains it very well and easy to understand. This is video 1 of 3: http://youtu.be/AJPZxXwOc-4
Systems Support Specialist
Associate of Arts Computer Information System
Certifications: CompTIA A+, Network+, Microsoft Technology Associate: Networking Fundamentals
2018 Goals: CompTIA Security+,
CompTIA CySA+