## Patreon Benefits and Tiers

### 27 thoughts on “How IP Addresses Work”

1. Can i check solution without unlock the patreon

1. The solutions are here as a gift to those that support the site. You can discuss the questions with others or on forums, and come to your own conclusions of course.

1. It’s a monthly subscription, but there’s no contract, so you can cancel your subscription when you’re ready

2. Question 1 in the video
You say that for class a= there are 128 host networks.
The value of 7bits =1111111=64+32+16+8+4+2+1=127
Or do i need to count the 0 as a 1 cause with that i would get 128
The formula for bit is actually 2^b
When i do 2^7 i do get 128
Why is that?

1. Computers always start counting at zero. So, for a 7-bit number, we start at zero, and count to 127. This adds up to 128 numbers in total.

3. The 255.255.0.0 subnet mask has 16 bits turned on. The 255.255.240.0 subnet mask has 20 bits turned on. That’s an additional four bits for subnets.

The 16bits that are turned on come from the first two 255.255 right.
What’s the math behind 255.255.240.0 has 20bits turned on? I can understand that 4 bits subnet is 16. But the rest i cannot

1. I think i got part of the answer 255.255.240.0 has 20 bits cause the first two 255.255. Can fit in the whole 8bit so thats 16. 240 can fit in 128, 240-128=112,
112 -64= 48, 48-32=16, 16-16=0. I have used 4 of the 8 bits right? 16+4=20 bits used for the subnet. Now if i want to convert bits to decimal we go from right to left. That means that 4 bits fits into
2^4=16 so there are 16 subnets.
From the total 32bits we used 20 bits. That means there are still 12 bits left for the host. 2^12=4096 host

1. Looks like you’ve got it!

4. In the video 12:16
You say devices in the same subnet must be in the same ip network
If not they cannot communicate
And if they are on the same ip network, but seperated by a router they are also not able to communicate.

Isn’t that the whole reason why in quiz 4 they are not able to communicate?

1. Because the router is being cut to only have 4 hosts on the network. It cannot connect to the other hosts that are outside of its range. So the middle cannot connect to the right,but the left one can connect to the middle. Still without succes to reaching the right. I am correct?

1. Well done!

2. Yes, in quiz 4, the routers should be in the same subnet (a /30 in this example), but they are not.
As they’re not in the same subnet, they cannot communicate with each other, which is why the network on the left cannot communicate with the network on the right.

1. That’s it exactly, well done!

5. The right router, shouldn’t it be 172.16.2.2 (not 172.16.2.20)? Bcauz if it has subnet mask /30 it can have only 3 hosts. thank u for ur help!

6. Hi! Enjoying the videos so far.

Quiz 3a:
I understand why there are 16 subnets (1111 1111.1111 1111.1111 0000.0000 0000). Can you demonstrate why these are the addresses of those 16 subnets? I was thinking that all of the numbers of the 3rd octet had to start with 1111, but then the subnets would be 240-255. I must be thinking about it wrong.
Thanks!

1. Thinking about it a little further now:
The last four bits of the 3rd octet that I was trying to use in my question are for the host IPs. It is the _first_ four bits of the 3rd octet that the subnet mask will be using. So the subnet addresses are 0000 0000, 0001 0000, 0010 0000, and so on. Is that correct?

2. I still don’t quite understand this statement:

The network is 172.16.2.0 /30. The host IP’s in this network would be 172.16.2.0 – 172.16.2.3.

1. IP (IPv4 to be exact) addresses are 32 bit (digit) binary strings of 1s and 0s. Each one represents a host (client computer), but the address is broken down into the Network bits and the Host bits. The first x number of bits represent which network it is, and the remaining bits are assigned to the host.

To find out x, we need to look at the subnet mask. In the case of 172.16.2.0 /30, the “/30” means that the first 30 bits represent the Network.
If we now look at the individual numbers, “172.16.2” represents 24 bits (8×3). That means that all of that, plus 6 bits of the last octet, are the network bits. Now if we look at the last octet, it’s just ‘0’: in binary, 0000 0000. This means that those first six 0s are also network bits, with only the last two being host bits. Therefore, the available range of hosts are:
Binary | (Decimal)
0000 0000 (0)
0000 0001 (1)
0000 0010 (2)
0000 0011 (3)
And that’s why the range of host IPs for this network is 172.16.2.0 – 172.16.2.3.

Hope that helps!

* It’s important to know which bit represent the network, because that’s how IP routing works. Sending a message to a host inside a network is done in a different way than to someone on a different router. (Specifically, connecting to other networks requires IP routing; he explains this more in other videos)

1. Thank you very much for this!

2. Hi there,

Thanks for the explaination. However there is still a part of it that I could not figure out….

For the very last question: if the subnet mask is 30, so the network bits extend to the last part for the decimal digit. Does that mean the range for the network can now exceed 255? which means for the third part of the address can be 172.16.0.0-172.16.16383.0? or still the maximum will be 255?

1. The bits used for the network dont merge into the third octect. they stay in their specific octets so since the subnet is /30, 30 bits are used. which is 8+8+8+6 so the limit for the network ips is the first 6 bits of the last octet, ie 255.255.255.252 (128+64+32+16+8+4) the rest are used for host. Also max is 256 but written is 255 since we start counting from 0.

7. 我是一个中国人，我英语不好，看您的视频需要边看边翻译，但还是觉得您的视频特别棒！我能够看懂每一个细节！并且理解之前所不理解的内容！非常感谢！