Options

Subnetting question

gouki2005gouki2005 Member Posts: 197
What is the broadcast address of the network 172.25.236.0/23?
Answer: 172.25.237.255

I dont get it.

is a class B address so 23-24 = 2^1 = 2 so 2 host per subnet
subnets = 128

So it will 172.25.36.2

I am doing something wrong but I cant tell what it is.

help me here.

Comments

  • Options
    sratakhinsratakhin Member Posts: 818
    It's actually 2^9 hosts per subnet. 32-23=9. That's why you have 172.25.236 and 237. The last host in this subnet is 237.254, and the broadcast is 237.255
  • Options
    KenCKenC Member Posts: 131
    So you said subnets=128...

    The first subnet will be: 172.25.0.0 - 172.25.1.255

    The second subnet will be: 172.25.2.0 - 172.25.3.255

    And so on until you get to the subnet: 172.25.236.0 - 172.25.237.255

    The last is always the broadcast address.
  • Options
    NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    gouki2005 wrote: »
    What is the broadcast address of the network 172.25.236.0/23?
    Answer: 172.25.237.255

    I dont get it.

    A broadcast address has all the host bits are sent to one. It follows that the final digit must be odd, not even.

    When you're stumped, convert the address and mask to binary--

    10101100.00011001.11101100.00000000 (address)
    nnnnnnnn.nnnnnnnn.ssssssssh.hhhhhhhh (mask)

    Again, the broadcast address is formed by setting all the host bits to one--

    10101100.00011001.11101101.11111111

    You get 172.25.237.255.

    Using mathematical shortcuts is great, but only after you get the concepts down.
  • Options
    sratakhinsratakhin Member Posts: 818
    NetworkVeteran, how long does it take you to convert an IP address to binary?
  • Options
    NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    sratakhin wrote: »
    NetworkVeteran, how long does it take you to convert an IP address to binary?

    I'm not sure. Let me time myself with address 192.168.4.0...

    11000000.10101000.00000100.00000000

    About 30 seconds to write out all four octets. I'd do a full conversion when first learning, but you'll doubtlessly identify many shortcuts as you get faster. For example, if asked to ID the broadcast address for 192.168.4.0/22, there's no need to decode the first two octets. :)

    192.168.00000100.00000000 |
    ---.---.00000011.11111111
    192.168.00000111.11111111 = 192.168.7.255

    The OP's original ?, I immedately saw it was wrong, and I reckon it took ~5s to solve.
  • Options
    mapletunemapletune Member Posts: 316
    hm... I have a question about subnets and binary. Hopefully OP won't mind my tangent.

    So basically, I know how to add 1,2,4,...128. But I hate boring tasks so... i usually don't practice/use binary.

    For example,

    172.25.236.0/23

    that's 1 bit host on 3rd octet = 2 per subnet. 0~1, 2~3, etc...

    thus, 236.0 ~ 237.255

    So far so good?

    My question is this: Am I hurting myself by never using binary 0101? All i do is 256 - mask, 2^x, etc...
    Studying: vmware, CompTIA Linux+, Storage+ or EMCISA
    Future: CCNP, CCIE
  • Options
    sratakhinsratakhin Member Posts: 818
    2 mapletune: I do it the same way. I'd probably convert to binary if I can't easily find the right answer within 10 seconds, but it's an overkill for most questions.
  • Options
    NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    mapletune wrote: »
    i usually don't practice/use binary.

    My question is this: Am I hurting myself by never using binary 0101?
    If you plan to work in a role where networking or programming is your primary role, then yes, I'd say you are doing yourself a disservice by not practicing enough to be comfortable with viewing and manipulating values in binary, hex, and decimal. All three formats pop up frequently when working with TCP/IP and troubleshooting networking devices. It's okay to prefer one format, though.
Sign In or Register to comment.