21 Replies to “How IP Addresses Work

  1. 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?

  2. 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

  3. 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?

    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.

  4. 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.

      Please help thank you!

      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)

Leave a Reply