Options

Subnetting Made Easy

1111213141517»

Comments

  • Options
    paulazpaulaz Registered Users Posts: 5 ■□□□□□□□□□
    Hey all. Hoping someone can help clear up what I sometimes get a little iffy on. With the following question What subnet does 10.34.67.234/12 sit on? The block size 16, so when I go to do my ranges, I just want to make sure the max is correct, that being the 3rd and 4th octet

    10.0.0.0---10.15.254.255
    10.16.0.0---10.31.254.255
    10.32.0.0
    10.47.254.255
    10.48.0.0......etc

    The answer is the 10.32.0.0 subnet. For that 3rd subnet, I put the max range of 10.47.254.255 but i don't exactly know why the third octet is 254. Is it correct that the subnet ID is 10.32.0.0 and the broadcast is 10.47.255.255? If so, I know that you cannot use the subnet ID and broadcast, but what is the "rule" that says the max third octet is 254? If I'm correct here, I'm only correct because I have seen it enough times but I don't why I'am right. Hopefully that makes sense.
  • Options
    therealonetherealone Registered Users Posts: 1 ■□□□□□□□□□
    Hi all, thanks for this awesome technique. It really helped me.
    However, I stumbled upon a problem which I don't get it:

    10.101.99.17 -- 255.255.254.0

    So, we are in 3rd octet, right? 256-254 = 2, 2^2 = 4.

    Incrementing third octet:
    10.101.0.0
    10.101.4.0
    ...
    10.101.92.0
    10.101.96.0
    10.101.100.0

    Therefore, 10.101.99.17 falls between 100 and 96 one, so it must be 10.101.96.0 the Network Address?
    But it is wrong? Calculators say it must be 10.101.98.0?

    Btw, my broadcast address (next NA .100, therefore 100-1: 99, 10.101.99.255 is correct)
  • Options
    kpc21kpc21 Registered Users Posts: 2 ■□□□□□□□□□
    Hi everyone,

    @therealone, you are getting it wrong.

    Raising to the power is something which you have to do when you have the netmask given in the CIDR notation (here it would be /23).

    Then it's one bit missing to 24, so you raise 2^1 = 2 and you know the networks will change in the increments of 2.

    See - you have n bits in the octet (the bits being zeros in the netmask) available for the addresses for your network. How many binary numbers can you compose using those n bits? You have n positions which can take 2 possible values: 0 or 1. So the result is: 2 times 2 times 2 etc. repeated n times, in other words, 2^n. And this is the reason why we increment by 2^n to get to the address of the next network. This is the reason why it works - from the mathematical perspective, explained in such a way that, I hope, everyone is able to understand it.

    When you have the netmask given in the 255.255.254.0 notation, then it's enough to do the subtraction.

    256-254 = 2.

    If someone wants a mathematical explanation - I will add it at the end of this post.

    So you have the networks:
    10.101.0.0
    10.101.2.0
    10.101.4.0
    and so on, the decimal numbers representing the third octet will be the multiples of 2, so simply all the even numbers from 0 to 254.

    For your address - 10.101.99.17 - the network will therefore range from 10.101.98.0 to 10.101.99.25 - of course, those are the network and the broadcast address and the available addresses are from 10.101.98.1 to 10.101.99.254.


    I promised an explanation, why the subtraction method works.

    Let's think of an example, such one which will be clearer than the one discussed before.

    A common netmask for point-to-point links: /30 or 255.255.255.252. Let's focus on the last octet. From the CIDR notation you easily see that the binary representation of the last octet is 11111100.

    In binary you easily see all the possible network addresses possible to create with this mask (let's separate the network part and the host part with a space for clarity):
    000000 00
    000001 00
    000010 00
    000011 00
    and so on, up to:
    111111 00

    They will be, generally, incremented by binary 100. Which is decimal 4.

    How to easily get this 100 from the netmask?

    When we subtract 11111100 from 11111111, we get simply 11. This is what you have in the host part of the broadcast address (of course if it wasn't the last octet, this would be a whole subnetwork containing not only the broadcast address, but also plenty of addresses available for our hosts - but it doesn't change anything for us, the last address in this subnet would be anyway the broadcast).

    To move to the first address to the next network it's enough to add 1 to the broadcast address. We get the 100 by adding 1 to 11.

    And this works for any netmask.

    In decimal... our netmask has 252 in the octet which interests us. We subtract it from 255 (11111111) and add 1. Which is equivalent to subtracting from 256. 256-252 = 4, so we know that we increment by 4 to move to the next network address, that addresses separated by at least 4 will be certainly in different networks and that we have 4 addresses available in the network (two of which are the network address and the broadcast address, so actually we have 2 addresses available for the hosts, which is ideal for point-to-point links - by the way, actually it's possible to have a /31 netmask and use the "network" and "broadcast" addresses as hosts addresses on a point-to-point link, but it's out of the scope for the CCNA and if they ask if it's possible, even though they shouldn't, the correct answer will be most likely that it isn't possible).
  • Options
    cymatikatacymatikata Registered Users Posts: 2 ■□□□□□□□□□
    therealone wrote: »
    Hi all, thanks for this awesome technique. It really helped me.
    However, I stumbled upon a problem which I don't get it:

    10.101.99.17 -- 255.255.254.0

    So, we are in 3rd octet, right? 256-254 = 2, 2^2 = 4.

    Incrementing third octet:
    10.101.0.0
    10.101.4.0
    ...
    10.101.92.0
    10.101.96.0
    10.101.100.0

    Therefore, 10.101.99.17 falls between 100 and 96 one, so it must be 10.101.96.0 the Network Address?
    But it is wrong? Calculators say it must be 10.101.98.0?

    Btw, my broadcast address (next NA .100, therefore 100-1: 99, 10.101.99.255 is correct)

    10.101.99.17 /23

    /23 means we only care about the 3rd octet for starts.

    So the so octets always repeat their ranges: 128 | 192 | 224 | 240 | 248 | 252 | 254 | 255 (17|18|19|20|21|22|23|24 bit positioning since we are talking the 3rd out of 4 octets).

    23 = 254. Take that and subtract from 256. You get 2 and you start your networks on the 2's like this:

    0
    2
    4
    6
    8
    .
    .
    .254

    that means 10.101.99.17 falls in the 98-99 network

    10.101.98.1 through 10.101.99.254 is your usable range. 10.101.98.0 is your network and 10.101.99.255 is your broadcast.
Sign In or Register to comment.