Custom subnetting – any tips?

LukeQuakeLukeQuake Member Posts: 579 ■■■□□□□□□□
Hi peeps,

I am currently studying 291 and am really struggling with custom subnetting. I just can’t get to grips with the concept and how you workout your available hosts / subnets. I have read through the MS press 291 book chapter three times now and watched the CBT nuggets video on it.

Any tips?

For the moment I have moved on but will come back to it.

Thanks,

Comments

  • !30!30 Member Posts: 356
    Hello , @LukeQuake , I'm curently studying for my 291 to , but I pass very fast thourg custom subneting and superneting , because I had practice and knowledge with subneting from my CCNA .

    A tip is to take some CCNA stuff ( where subneting is covered ) , I recomand the stuff from CCNA semesters's ( net academy ) and learn from there.Try Pachet Tracer 3.2 to.

    I think CCNA and the MCSA is a very good opinion , because MCSA cover's many thing's from CCNA , for me is so easy to pass MS cert's having to year's of learning for my CCNA.

    A tip from me , Cheer's !
    Optimism is an occupational hazard of programming: feedback is the treament. (Kent Beck)
  • royalroyal Member Posts: 3,352 ■■■■□□□□□□
    Also, CBT Nuggets explain subnetting rather well. I would look into buying CBT Nuggets material if you can afford it. The instructor for the 2003 series is very good and energetic. Definitely my favorite instructor so far.
    “For success, attitude is equally as important as ability.” - Harry F. Banks
  • LukeQuakeLukeQuake Member Posts: 579 ■■■□□□□□□□
    icroyal wrote:
    Also, CBT Nuggets explain subnetting rather well. I would look into buying CBT Nuggets material if you can afford it. The instructor for the 2003 series is very good and energetic. Definitely my favorite instructor so far.

    I have the CBT Nuggets chief :)
  • royalroyal Member Posts: 3,352 ■■■■□□□□□□
    Ok, let me try to explain how you work out how you dervie your subnets from how many hosts/networks you need.

    Ok, you need 400 client ip addresses. You don't need a Class B. A class b is Network.Network.Host.Host. Those 2 Host octets provide us with 16 bits. 8 bits per octets and there are 4 octets. 8x4=32 hence an ip address is a 32 bit address. Each octet provides you with (2^icon_cool.gif-2=254 address. In our situation, since we have a default Class B network that uses 16 bits, we can have (2^16)-2=65,534.

    So basically, you only need 400 client addresses and a default Class C gives you only 254 addreses, so are you really going to use a Class B and waste 65,534-254=65,280 addresses? The answer is, definitely not! Let me explain how you can use subnetting to your advantage so you don't waste an enourmous amount of addresses.

    Subneeting is the process of conserving ip addresses through the use of "borrowing" bits from the client portion and converting those wasted client bits back into network bits. In this situation, we would use the Class B address and borrow bits from the 3rd octet till we had just enough client bits to satisfy our 400 client bit need. You are probably asking to yourself, well how do I know how many bits I need? There are two methods. You need 400, so add 1 to that number. Open a scientific calculator and put in 401 in decimal and convert it to binary. This gives you 9 bits meaning you NEED 9 client bits. Since the Class C address with 8 bits equalling 254 addresses was not enough, you need to use a Class B address but only borrow 1 bit from the 3rd octet.

    So let me draw this out for you.

    Class C (254 client ips) 1111111 (255) . 11111111 (255) . 11111111 (255) . 00000000 = The 0s represent the amount of client ips (2^icon_cool.gif-2=254
    Class B (64,534 client ips) 1111111 (255) . 1111111 (255) . 0000000 . 00000000 = The 0s represent the amount of client ips (2^icon_cool.gif-2=65,534

    In our case, as I stated, we need to use 9 bits (2^9)-2=510 to meet our 400 client ip need. We'll use a class B address since Class C will only give us 254 max (2^icon_cool.gif-2=254

    11111111 (255) . 11111111 (255.)11111110.00000000

    As you can see, we borrwed 7 bits which gives us 1 extra host bit at the end. It's almost a default Class C, but we borrwed that 1 host bit.. The 1s HAVE to be consecutive. Because of this, you can only have this pattern.

    10000000
    11000000
    11100000
    11110000
    11111000
    11111110
    11111111

    Because of this pattern, your subnet masks will only have this custom subnet address, 255, 254, 252, 248, 240, 224, 192, and 128.

    In our case, since only borrowed 1 client bit which leaves us with 7 extra network bits which means we saved [ (2^16)-2 - (2^9)-2 ] =65,024 addresses. Since we borrwed 7 bits and they have to be the leftmost bits to keep the 1st consecutive, our custom subnet mask is 255.255.254.0.

    Since we're using 7 custom bits for our custom subnet, that gives us (2^7)=128 networks to subnet. You don't have to take off two bits for the subnet because most routers these days (for I think over the last 10 years) have been able to take advantage of routing all 0s and 1st for subnets but clients cannot use all 0s or all 1st for the host section which is why you have to take off two bits. To find out the addresses for these custom subnets, we take the right-most network bit that we subnetted (which is 2) 11111110 (The 1 is turned off and the 1st bit turned on is equaled to 2. That means, our subnets go up by 2s.

    If our assigned Class B address was 132.16.11111110.00000000 that means our subnets will go be like
    132.166.2.0
    132.166.4.0
    132.166.6.0
    alll the way up to 132.166.254.0 because all those bits go up to 254. It's 254 because remember the right-most bit is turned off so the highest we can go up to is 254.

    Hopefullly this helps. I don't have time to really proof-read it. I barely had time to write it because I am studying to take my 291 exam on Tuesday.
    “For success, attitude is equally as important as ability.” - Harry F. Banks
  • LukeQuakeLukeQuake Member Posts: 579 ■■■□□□□□□□
    Thanks icroyal,

    I am really greatful for that, I have read the post a couple of times now and I think i'm getting to grips with it :)

    One of the things that stumped me were the questions in the MS Press 291 book, for example:-

    You have an address of 206.73.118.0/24

    Requirment = 9 subnets

    Number of bits required for subnet ID:
    Number of bits left for host ID:
    Network prefix version of subnet mask:
    Dotted-decimal version of subnet mask:

    So as I figure it the subnet mast in binary is using 24 bits so the mask would be: 255.255.224.0 (Should be 255.255.225.0 but I took one off because you can't have all 1's)

    Now that mast in binary is 11111111.11111111.11111110.00000000

    So we are left with 9 bits for our networks. Now 2^9 = 65536 (-2 is 65534)

    This is where I start to get confused icon_sad.gif - What do I do now?

    I think I understand how you get to the end result if you are asked for 400 client ip addresses.
  • LukeQuakeLukeQuake Member Posts: 579 ■■■□□□□□□□
    Right let me try this, say I need 600 hosts.

    Now because a class b network is going to give me (2^16 - 2) 65534 IPs that I could possible use it seems stupid to waste all of those address, therefore I would use a class c and borrow bits from the network portion of the 32 bit address to increase my available networks and decrease the possible hosts?

    So for example, I would borrow from the 3rd octet, in a class b network the default subnet would be 255.255.0.0 in binary that would be 11111111.11111111.00000000.00000000

    I need 600 hosts so I would add 1 to that and convert to binary, which would be 1011001 which gives me 7 bit positions. So I steel 7 bit position from the host section of my address, so my new subnet would be 11111111.11111111.11111111.10000000 (255.255.255.12icon_cool.gif The 255.128 is the custom part of my subnet mark.

    So now my available hosts would be 2^7 = 128 so where have I gone wrong?
  • sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    Let me take a stab and see if I can help. I have no problem subnetting, but do not claim to be an expert. Let's start here:
    LukeQuake wrote:
    You have an address of 206.73.118.0/24

    Requirment = 9 subnets

    Number of bits required for subnet ID:
    Number of bits left for host ID:
    Network prefix version of subnet mask:
    Dotted-decimal version of subnet mask:

    So as I figure it the subnet mast in binary is using 24 bits so the mask would be: 255.255.224.0 (Should be 255.255.225.0 but I took one off because you can't have all 1's)
    I think your mistake may be in your last statement. You cannot have all 1's in a host address or network address, but the mask of 255.255.255.0 is not the network address, it just tells you that the network address is 206.73.118.0, which is not all 1's. So leave the mask at 255.255.255.0 and subnet from there. To get 9 networks you must borrow how many bits from the last octet (or host portion)? Assuming the 2n-2 rule, if you borrow 1 bit, you get 2-2=0, if you borrow 2 bits you get 4-2=2, borrow 3 to get 8-2=6, borrow 4 to get 16-2=14, okay now we have enough. So you borrowed the first 4 bits of the last octet, leaving 4 bits for the host portion. Then your mask on each subnet is 255.255.255.240. Your subnets look like this:

    Subnetwork ____Broadcast______Host Addresses
    206.73.118.0___206.73.118.15____206.73.118.1 - 206.73.118.14
    206.73.118.16___ 206.73.118.31____206.73.118.17 - 206.73.118.30
    206.73.118.32___206.73.118.47_____206.73.118.33 - 206.73.118.46
    etc
    etc
    206.73.118.240___206.73.118.255____206.73.118.241 - 206.73.118.254


    So see if this looks right:
    Number of bits required for subnet ID:
    Number of bits left for host ID:
    Network prefix version of subnet mask:
    Dotted-decimal version of subnet mask:
    1. 28 or 4 depending on what they mean...
    2. 4
    3. 206.73.118.0/28
    4. 255.255.255.240

    Hope that helps. Anyone better at subnetting please correct anything you see if I am incorrect. Thanks.
    All things are possible, only believe.
  • royalroyal Member Posts: 3,352 ■■■■□□□□□□
    Thing is, CBT Nuggets and MSPress both have stated the 2n-2 rule doesn't apply to the network portion anymore. Routers have been able to route networks that have all 0s and all 1s for years. It's just the hosts portion that have to follow the 2n-2 rule. Of course there's a lot of debate whether microsoft exams follow the 2n-2 rule for network portion or not for their exams, but who knows :/
    “For success, attitude is equally as important as ability.” - Harry F. Banks
  • royalroyal Member Posts: 3,352 ■■■■□□□□□□
    LukeQuake wrote:
    So as I figure it the subnet mast in binary is using 24 bits so the mask would be: 255.255.224.0 (Should be 255.255.225.0 but I took one off because you can't have all 1's)

    Now that mast in binary is 11111111.11111111.11111110.00000000

    So we are left with 9 bits for our networks. Now 2^9 = 65536 (-2 is 65534)

    You mean 9 bits for our hosts, not networks. You hve 7 bits left over for subnets. Remember, since it's a Class B address, you borrowed 7 bits for the network portion. Also, it would be 255.255.254.0. The right-most bit in the 3rd octet's value is only 1. 255-1=254. You can also count from the left, 128 + 64 + 32 + 16 + 8 + 4 + 2 = 254. See how we're not adding the 1 value to it?

    Also, I left out how to figure out how you can derive your subnets with how many actual networks you need. In my other long post I only derived it from how many hosts you need.

    As I said, with hosts, if you need 400, just add 1, add it in scientific calculator, and convert it to binary and count how many bits you need. For finding out if you need a certain amount of networks, just do the opposite. If you need 10 networks, just subtract 1, convert that number into binary, and that's the amount of bits you need. So 10-1=9 and in binary, that's 1001 (4 bits). 2^4=16. This gives us enough bits for the amount of networks we need. That means you'd only have to borrow 4 bits in the 3rd octet if you were given a class B network if you need to segment your network into 10 different broadcast domains (subnets).


    Also, I wouldn't really rely on the you need 400 hosts so put 401 into a scientfifc calculator and convert it to binary and that's the amount of bits you need. I never actually do this but you CAN do it. I actually just do 2^2 and if that doesn't give me enough, I do 2^3, and if that doesn't give me enough, I do 2^4, and so on... This way, I can do it on paper and not be reliant on a scientific calculator.

    Good luck!
    “For success, attitude is equally as important as ability.” - Harry F. Banks
  • LukeQuakeLukeQuake Member Posts: 579 ■■■□□□□□□□
    Right lemme try this one:-

    You have an address of 206.73.118.0/24

    Requirment = 3 subnets

    Number of bits required for subnet ID:
    Number of bits left for host ID:
    Network prefix version of subnet mask:
    Dotted-decimal version of subnet mask:

    so 2^3-2 would give me 8 subnets so I need to steel 8 bits.

    So my subnet would be 255.255.11111111.00000000 (255.255.254.0 took 1 off the third octet)

    So im left with 8 spares bits? But how does that represent the number of bits required for the subnet id? I thought that would be 8 ?! but the MS book says you need 6.

    This is really messing with my head rofl icon_sad.gif
  • royalroyal Member Posts: 3,352 ■■■■□□□□□□
    No, you need to steal 3 bits. 2^3=2=8.

    206.73.18.0/24 (24 means it's a Class C because it's using 24 1s for the subnet).

    So by default, you're working with a 255.255.255.0 subnet mask which is:
    11111111.11111111.11111111.00000000

    Because 2^3-2 gives you what you need from the 3 bits, you only need to borrow 3 bits from the 4th octet. Your new default subnet mask will look like:
    11111111.11111111.1111111.11100000
    255 .255 .255 .224 (128 + 64 + 32)

    You have 5 bits for the host portion (the 0s). That's 2^5-2=30 client ips.


    Take the right-most subnet bit's' value which is 32, and that is your ranges for actual subnets.

    206.73.18.0
    206.73.18.32
    206.73.18.64
    206.73.18.96
    206.73.18.128
    206.73.18.160
    206.73.18.192
    206.73.18.224
    “For success, attitude is equally as important as ability.” - Harry F. Banks
  • LukeQuakeLukeQuake Member Posts: 579 ■■■□□□□□□□
    Ok that be said how on each does the book get to the follow answer?

    You have an address of 206.73.118.0/24

    Requirment = 3 subnets

    Number of bits required for subnet ID: 2
    Number of bits left for host ID: 6
    Network prefix version of subnet mask: /26
    Dotted-decimal version of subnet mask: 255.255.255.192

    btw, thanks for all ur help, im slowly getting to grips with it.
  • royalroyal Member Posts: 3,352 ■■■■□□□□□□
    No problem. I'm glad to be of help :)

    So you need 3 subnets.
    2^1=2 which is not enough
    2^2=4 which is enough if you're not going by the 2n-2 rule for subnets. Here is the confusion. Modern routers over the last several years have been able to support routing subnets that are all 0s and all 1s. Some people believe Microsoft exams go by the 2n-2 rule some people don't. It's up to you whether you are going to go by it. Either way, hosts will always be 2n-2. Personally, I am going to go by 2n for subnets and 2n-2 for hosts which your answers shows to be true because the answer for number of bits is 2.

    So now we have found that we need 2 bits for the subnet mask because 2^2=4. The first 2 represents that you're using base 2 which is binary. The 2nd 2 represents the amount of bits.

    Now for the number of bits left for the host. There are 8 bits in 1 octet. Subract 2 from the amount of bits in an octet, and you get 6 bits left. 8-2=6. So you have 6 bits to work with for the hosts. That means you can have 2^6-2=62 client ip addresses. This means you can have 4 different subnets each with 62 ip addresses.

    Because the 206 address is a Class C, the default subnet mask is 255.255.255.0. That is 11111111.1111111.1111111.000000000. That is 24 consecutive bits turned on; hence the 206.73.118.0/24. Since we are borrwing 2 bits, it is now /26 which is 11111111.1111111.11111111.11000000.

    Those 2 bits that are turned on are in the binary value spots of 128 and 64. That is equalled to 192 hence the 255.2555.255.192.
    “For success, attitude is equally as important as ability.” - Harry F. Banks
  • mrprexmrprex Member Posts: 3 ■□□□□□□□□□
    LukeQuake wrote:
    icroyal wrote:
    Also, <a href=http://www.cbtnuggets.com/techexams target=”_blank”>CBT Nuggets</a> explain subnetting rather well. I would look into buying <a href=http://www.cbtnuggets.com/techexams target=”_blank”>CBT Nuggets</a> material if you can afford it. The instructor for the 2003 series is very good and energetic. Definitely my favorite instructor so far.

    I have the CBT Nuggets chief :)

    DO YOU GUYS RECOMMEND BUYING MATERIALS FROM CBT NUGGET..I CHECKED THEIR WEBSITE AND THE MATERIALS ARE A BIT EXPENSIVE..
  • PashPash Member Posts: 1,600 ■■■■■□□□□□
    http://www.learntosubnet.com/

    OR

    I know a lot of fellas swear by this book:

    http://www.amazon.com/gp/product/078214392X?ie=UTF8&tag=certyourself&link_code=as3&camp=211189&creative=373489&creativeASIN=078214392X

    That is the deluxe version with virtual software, if you are only interested in subnetting you should search for the same book but the standard version (the author is Todd Lammle). Seemingly he is quiet popular for subnetting technique.

    Good luck!
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
Sign In or Register to comment.