Options

Stumped on a subnetting question...

hbkhbk Member Posts: 24 ■□□□□□□□□□
So I was asked at an interview

Given 192.168.2.56/20, what is the network, broadcast, first usable, and last usable?
I was able to answer that part.

Network: 192.168.0.0
Broadcast: 192.168.15.254
1st Usable: 192.168.0.1
Last Usable: 192.168.15.254

Then they asked me what was the subnet mask if that IP required 4 subnets and 1000 hosts.

I knew that a /22 would give 1022 usable hosts, and 64 subnets....

But then they wanted to know the actual subnets. I wasn't familiar with that question so I didn't know how to answer them icon_sad.gif

Can anyone enlighten me on this one?


Thanks for reading

Comments

  • Options
    Carpe PorcusCarpe Porcus Member Posts: 84 ■■□□□□□□□□
    You should take the bits from the network side to work out how many subnets are required; this is the important part, not the hosts. You've been asked to provide a number of subnets to cater for a number of hosts, you need to work out the subnets that will include the number of hosts even if the total is greater than 1000.

    for four subnets you could use a 255.255.192.0 on a class B as Class C simply doesn't have enough hosts availabe for the answer, you need at least 1000 hosts so move back one octet to octet three as octed four will not provide what is asked for.

    Subnetting a class B address with /18 borrows two bits and provides four networks as requested, the host allowance is larger than expected but you have to consider the number of subnets first, if the host allocation is greater then so be it.

    As for the networks, you have borrowed two bits this equates to a 64 increment.

    Network Broadcast
    172.16.0.0 - 172.16.63.255
    172.16.64.0 - 172.16.127.255
    172.16.128.0 - 172.16.191.255
    172.16.192.0 - 172.16.255.255

    These are your four networks.

    Host ranges fall in between with one greater than the network and one less than the broadcast.

    172.16.0.0 172.16.0.1 - 172.16.63.254 172.16.63.255
    “I'm always admitting I'm wrong. That's how I eventually get to right.”
  • Options
    NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    hbk wrote: »
    Given 192.168.2.56/20, what is the network, broadcast, first usable, and last usable?
    I was able to answer that part.
    Incorrectly. icon_sad.gif
    Broadcast: 192.168.15.254, Last Usable: 192.168.15.254
    Typically broadcasts end in .255, and more importantly aren't usable host addresses.
  • Options
    NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    hbk wrote: »
    Given 192.168.2.56/20
    Then they asked me what was the subnet mask if that IP required 4 subnets and 1000 hosts.

    How would you subdivide that /20 to meet these requirements? As you say, you'd need 2 subnet bits (2^2=4) and 10 host bits (2^10-2=1022). Fortunately, a /20 gives you 12 bits to play with (32-20=12).. precisely what you needed!

    192.168.0.0-192.168.3.255
    192.168.4.0-192.168.7.255
    192.168.8.0-192.168.11.255
    192.168.12.0-192.168.15.255
    Sunbnetting a class B address with /18 borrows two bits and provides four networks as requested, the host allowance is larger than expected but you have to consider the number of subnets first, if the host allocation is greater then so be it.
    If you interpret this as a non-VLSM question, and take 192.168.0.0/16 as your starting block, then any answer from /18 to /22 is correct. They all provide the required 2 subnet bits and 10 host bits.
  • Options
    Carpe PorcusCarpe Porcus Member Posts: 84 ■■□□□□□□□□
    Absolutely, from the first two bits of the third octet it gave the four subnets required which also allowed for the number of hosts albeit excessive and a waste! You are right, any /18 to /22 will give you the desired result. That was the quickest answer I could think of.
    “I'm always admitting I'm wrong. That's how I eventually get to right.”
  • Options
    iamme4evaiamme4eva Member Posts: 272
    hbk wrote: »
    Then they asked me what was the subnet mask if that IP required 4 subnets and 1000 hosts.

    I knew that a /22 would give 1022 usable hosts, and 64 subnets....


    As NV said, a /22 would give 1022 hosts, and 4 subnets, if your reference point is 192.168.0.0/20.

    If I was doing an interview and somebody answered that with a /18, I'd challenge them to explain why. If you were only allocated 162.168.0.0/20, then the first 20 bits are reserved and may be from another part of the network, so you can't just jump back and use them.

    Of course, it depends on the phrasing of the question, but I suspect they were aiming at VLSM.

    Mind you, this is significantly harder than the subnetting question I got in an interview recently: "We want you to split 10.1.0.0/24 into 4 subnets and give us the subnet ID's". They slid a piece of paper across the desk at me so I could work it out and I said "Really? Keep the paper".
    Current objective: CCNA Security
    My blog: mybraindump.co.uk
  • Options
    hbkhbk Member Posts: 24 ■□□□□□□□□□
    Thanks for the input peeps. /18 through /22 will fulfill the requirenments as a /18 would give you exactly 4 subnets while a /22 would give you 64 subnets. I just have a hard time wrapping my head around finding the actual subnets that you can divides those into.
  • Options
    hbkhbk Member Posts: 24 ■□□□□□□□□□
    iamme4eva wrote: »
    "We want you to split 10.1.0.0/24 into 4 subnets and give us the subnet ID's". They slid a piece of paper across the desk at me so I could work it out and I said "Really? Keep the paper".


    Just curious, what did you get for this?
  • Options
    Carpe PorcusCarpe Porcus Member Posts: 84 ■■□□□□□□□□
    From the previous explainations, what do you think it should be?
    “I'm always admitting I'm wrong. That's how I eventually get to right.”
  • Options
    iamme4evaiamme4eva Member Posts: 272
    hbk wrote: »
    /18 through /22 will fulfill the requirenments as a /18 would give you exactly 4 subnets while a /22 would give you 64 subnets.

    As I said in my last post, that depends on your reference point. Borrowing 2 bits will give your 4 subnets. If your organisation is allocated a /20 subnet and you borrow two bits, then it becomes a /22. You can't take it back to the classful boundary unless you were allocated a classful range.

    Look at it this way:

    You work for a large organisation, and have been asked to come up with a network design for the new marketing department. The organisation you work for owns the IP range 164.24.0.0/16. The senior network engineers have given you the subnet 164.24.0.0/20 to use for your part of the network. 164.24.16.0/20 (the next /20 subnet) is used elsewhere in the business by the accounting department. You decide that you want to split up your marketing network into 4 subnets.

    Now the range they have allocated you, based on that mask, is 164.24.0.0 - 164.24.15.255. You absolutely can not use any IP addresses outside of this range, as they are in use elsewhere in the larger organisations network.

    So now lets take your two examples.

    If you used a /22, which is borrowing 2 bits from the /20 you were allocated, you would get the following subnets:
    164.24.0.0 - 164.24.3.255
    164.24.4.0 - 164.24.7.255
    164.24.8.0 - 164.24.11.255
    164.24.12.0 - 164.24.15.255

    That is entirely within the range you have been allocated for your part of the network, so it's all good.

    Now lets look at a /18, which is borrowing two bits from the classful boundary:
    164.24.0.0 - 164.24.63.255

    The very first subnet already takes us outside the range allocated to us. Now we are using addresses allocated to the accounting department, and probably every other part of the business.

    That was kinda my point about why I would consider a /18 to be the wrong answer. However, it does depend on whether they were talking about VLSM or not. A /22 would only divide the subnetwork which you were allocated (the /20) into 4 subnets. It would divide the classful network into 64, but you weren't allocated a classful network.
    Current objective: CCNA Security
    My blog: mybraindump.co.uk
  • Options
    fov001fov001 Member Posts: 35 ■■□□□□□□□□
    Did you get the Jobicon_confused.gif:
  • Options
    iamme4evaiamme4eva Member Posts: 272
    Yeah, I start in 2 weeks.
    Current objective: CCNA Security
    My blog: mybraindump.co.uk
  • Options
    hbkhbk Member Posts: 24 ■□□□□□□□□□
    From the previous explainations, what do you think it should be?


    Please correct me if I'm wrong but here's what I did. I borrowed 2 bits from the /24 to get /26

    10.1.0.0-10.1.0.63
    10.1.0.64-10.1.0.127
    10.1.0.128-10.1.0.191
    10.1.0.192-10.1.0.255
  • Options
    hbkhbk Member Posts: 24 ■□□□□□□□□□
    iamme4eva wrote: »
    As I said in my last post, that depends on your reference point. Borrowing 2 bits will give your 4 subnets. If your organisation is allocated a /20 subnet and you borrow two bits, then it becomes a /22. You can't take it back to the classful boundary unless you were allocated a classful range.

    Look at it this way:

    You work for a large organisation, and have been asked to come up with a network design for the new marketing department. The organisation you work for owns the IP range 164.24.0.0/16. The senior network engineers have given you the subnet 164.24.0.0/20 to use for your part of the network. 164.24.16.0/20 (the next /20 subnet) is used elsewhere in the business by the accounting department. You decide that you want to split up your marketing network into 4 subnets.

    Now the range they have allocated you, based on that mask, is 164.24.0.0 - 164.24.15.255. You absolutely can not use any IP addresses outside of this range, as they are in use elsewhere in the larger organisations network.

    So now lets take your two examples.

    If you used a /22, which is borrowing 2 bits from the /20 you were allocated, you would get the following subnets:
    164.24.0.0 - 164.24.3.255
    164.24.4.0 - 164.24.7.255
    164.24.8.0 - 164.24.11.255
    164.24.12.0 - 164.24.15.255

    That is entirely within the range you have been allocated for your part of the network, so it's all good.

    Now lets look at a /18, which is borrowing two bits from the classful boundary:
    164.24.0.0 - 164.24.63.255

    The very first subnet already takes us outside the range allocated to us. Now we are using addresses allocated to the accounting department, and probably every other part of the business.

    That was kinda my point about why I would consider a /18 to be the wrong answer. However, it does depend on whether they were talking about VLSM or not. A /22 would only divide the subnetwork which you were allocated (the /20) into 4 subnets. It would divide the classful network into 64, but you weren't allocated a classful network.


    I appreciate you taking your time to clearly explain it to me. Your example was perfect
  • Options
    iamme4evaiamme4eva Member Posts: 272
    hbk wrote: »
    Please correct me if I'm wrong but here's what I did. I borrowed 2 bits from the /24 to get /26

    10.1.0.0-10.1.0.63
    10.1.0.64-10.1.0.127
    10.1.0.128-10.1.0.191
    10.1.0.192-10.1.0.255

    That's what I came up with.

    Glad I could help.
    Current objective: CCNA Security
    My blog: mybraindump.co.uk
Sign In or Register to comment.