Options

Class B subnet question

Tricon7Tricon7 Inactive Imported Users Posts: 238
I've been unable to resolve this question about a broadcast address for a class B subnet. If one has an address of 172.16.0.0 with a CIDR of /20, what would the broadcast address be on the 2nd available subnet? Also, if the CIDR was /26 what would the broadcast be on the 2nd available subnet? I'm working out the differences between using only the third octet and the fourth octet. Many thanks.

Comments

  • Options
    EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    /20 = 255.255.240.0 256-240 = 16 subnets 0,16,32,48 etc second is 16
    broadcast is 172.16.31.255

    /26 = 255.255.255.192 256-192 = 64 => subnets 0,64,128,192 second is 64
    broadcast is 172.16.0.63

    Simple when you know how,if you dont understand use the search engine! This has been explained over and over again.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • Options
    Tricon7Tricon7 Inactive Imported Users Posts: 238
    EdTheLad wrote:
    /20 = 255.255.240.0 256-240 = 16 subnets 0,16,32,48 etc second is 16
    broadcast is 172.16.31.255
    /

    I thought the second is 32, which would give a broadcast, if I'm right, of 172.16.47.255, wouldn't it?
  • Options
    james_james_ Member Posts: 97 ■■□□□□□□□□
    172.16.0.0 /20 (255.255.240.0)

    172.16.0.0 - 172.16.15.255 is the first subnet
    172.16.16.0 - 172.16.31.255 is the second subnet

    Providing Subnet Zero is allowed, 31.255 is the second subnet's broadcast address.

    Hope this helps,
    James.
  • Options
    georgemcgeorgemc Member Posts: 429
    EdTheLad wrote:
    /20 = 255.255.240.0 256-240 = 16 subnets 0,16,32,48 etc second is 16
    broadcast is 172.16.31.255

    /26 = 255.255.255.192 256-192 = 64 => subnets 0,64,128,192 second is 64
    broadcast is 172.16.0.63

    Simple when you know how,if you dont understand use the search engine! This has been explained over and over again.


    Tricon7,
    I believe he meant broadcast is 172.16.0.127 for the secound subnet of /26.

    Also, ip subnet zero is enabled by default, so the broadcast for the second subnet for /20 is x.x.31.255. icon_cool.gif
    WGU BS: Business - Information Technology Management
    Start Date: 01 October 2012
    QFT1,PFIT in progress.
    TRANSFERRED/COMPLETED: AGC1,BBC1,LAE1,QBT1,LUT1,QLC1,QMC1,QLT1,IWC1,INC1,INT1,BVC1,CLC1,MGC1, CWV1 BNC1, LIT1,LWC1,QAT1,WFV1,EST1,EGC1,EGT1,IWT1,MKC1,MKT1,RWT1,FNT1,FNC1, BDC1,TPV1 REQUIRED:
  • Options
    Tricon7Tricon7 Inactive Imported Users Posts: 238
    james_ wrote:
    172.16.0.0 /20 (255.255.240.0)

    172.16.0.0 - 172.16.15.255 is the first subnet
    172.16.16.0 - 172.16.31.255 is the second subnet

    Providing Subnet Zero is allowed, 31.255 is the second subnet's broadcast address.

    Hope this helps,
    James.

    Thanks. I think I understand now. But I thought that - in this case - 31.255 would actually be the next subnet (32.0) and that the broadcast should be 31.254 instead?

    Man, I hate class B.
  • Options
    remyforbes777remyforbes777 Member Posts: 499
    In order for it to be a broadcast the IP host address has to consist of all contigous (spelling) 1's. so 31.254 would not be all ones. It would end with a 0.
  • Options
    james_james_ Member Posts: 97 ■■□□□□□□□□
    Hi Tricon,

    172.16.31.254 would be the last "usable" ip address by a host on that subnet, but 172.16.31.255 would be the broadcast. The next IP address would be 172.16.32.0, which falls into the next subnet.

    We are working with a 255.255.240.0 subnet. I don't know how much you understand about subnetting, but the way I do it is to subtract the interesting Octet from 256 (in this case subtracting 240 from 256 gives us 16). This gives us the block number.

    Now apply the block sizes to the IP address 172.16.0.0, we are looking at subnets of:

    1: 172.16.0.0
    2: 172.16.16.0
    3: 172.16.32.0 etc

    The broadcast in each case is 1 IP address before the next subnet begins, ie

    1: 172.16.15.255
    2: 172.16.31.255
    3: 172.16.47.255 etc

    Remember the interesting octet is the third octet, so we need to subnet the ip address on the third octet if this makes sense?

    Good luck onthe CCNA!
  • Options
    paige1paige1 Member Posts: 117
    The Mask 192 produces 2 Subnets 64 ( 01000000) and 128 (10000000)

    Working with Class C would look like this:


    Subnet 64
    01 00000000 = 64 (Subnet Address) all host bits off
    01 00000001 = 65 (First Host) first host bit on
    01 11111110 = 126 (Last Host) first host bit off
    01 11111111 = 127 (Broadcast Address) all host bits on


    Subnet 128
    1 0000000 = 128 (Subnet Address) all host bits off
    1 0000001 = 129 (First Host) First host bit on
    1 1111110 = 254 (Last Host) First host bit off
    1 1111111 = 255 (Broadcast Address) All host bits on


    Working with a Class B would look like this:


    Subnet 64.0
    01 000000.00000000 = 64.0
    01 000000.00000001 = 64.1
    01 111111.11111110 = 127.254
    01 111111.11111111 = 127.255


    Subnet 128.0
    1 0000000.00000000 = 128.0 (Subnet Address) all host bits off
    1 0000000.00000001 = 128.1 (First Host) First host bit on
    1 1111111.11111110 = 255.254 (Last Host) First host bit off
    1 1111111.11111111 = 255.255 (Broadcast Address) All host bits on

    If you study this you will see the bit pattern (Off, On, Off, On,...) When working with Class B subnets you work on both sides of the period (decimal place) Once the bit pattern is done, just do the math.
    Self-confidence is the first requisite to great undertakings.

    Samuel Johnson
  • Options
    georgemcgeorgemc Member Posts: 429
    paige1 wrote:
    The Mask 192 produces 2 Subnets 64 ( 01000000) and 128 (10000000)

    Working with Class C would look like this:


    Subnet 64
    01 00000000 = 64 (Subnet Address) all host bits off
    01 00000001 = 65 (First Host) first host bit on
    01 11111110 = 126 (Last Host) first host bit off
    01 11111111 = 127 (Broadcast Address) all host bits on


    Subnet 128
    1 0000000 = 128 (Subnet Address) all host bits off
    1 0000001 = 129 (First Host) First host bit on
    1 1111110 = 254 (Last Host) First host bit off
    1 1111111 = 255 (Broadcast Address) All host bits on


    Working with a Class B would look like this:


    Subnet 64.0
    01 000000.00000000 = 64.0
    01 000000.00000001 = 64.1
    01 111111.11111110 = 127.254
    01 111111.11111111 = 127.255


    Subnet 128.0
    1 0000000.00000000 = 128.0 (Subnet Address) all host bits off
    1 0000000.00000001 = 128.1 (First Host) First host bit on
    1 1111111.11111110 = 255.254 (Last Host) First host bit off
    1 1111111.11111111 = 255.255 (Broadcast Address) All host bits on

    If you study this you will see the bit pattern (Off, On, Off, On,...) When working with Class B subnets you work on both sides of the period (decimal place) Once the bit pattern is done, just do the math.

    Paige1,
    You might want to look at your math again. You have a single mask (255.255.255.192 or /26) but are showing 2 subnets of different sizes. You would actually have 4 subnets of equal size (.0, .64, .128, and .192). This is because you have 2 bits available for subnets and we're assuming that subnet zero is enabled.

    With subnet zero enabled 2^2=4
    Without subnet zero enable 2^2 - 2 =2 (you lose the first and last subnet)

    Subnet 0 (Boldface = subnet bits, Normal = host bits) binary 00000000=0
    00000000 = 0 (Subnet Address) all host bits off
    00000001 = 1 (First Host) first host bit on
    00111110 = 62 (Last Host) first host bit off
    00111111 = 63 (Broadcast Address) all host bits on

    Subnet 64 (Boldface = subnet bits, Normal = host bits) binary 01000000=64
    01000000 = 64 (Subnet Address) all host bits off
    01000001 = 65 (First Host) first host bit on
    01111110 = 126 (Last Host) first host bit off
    01111111 = 127 (Broadcast Address) all host bits on

    Subnet 128 (Boldface = subnet bits, Normal = host bits) binary 10000000=128
    10000000 = 128 (Subnet Address) all host bits off
    10000001 = 129 (First Host) first host bit on
    10111110 = 190 (Last Host) first host bit off
    10111111 = 191 (Broadcast Address) all host bits on

    Subnet 192 (Boldface = subnet bits, Normal = host bits) binary 11000000=192
    11000000 = 192 (Subnet Address) all host bits off
    11000001 = 193 (First Host) first host bit on
    11111110 = 254 (Last Host) first host bit off
    11111111 = 255 (Broadcast Address) all host bits on

    I hope this helps clarify things for someone.

    Georgemc :)
    WGU BS: Business - Information Technology Management
    Start Date: 01 October 2012
    QFT1,PFIT in progress.
    TRANSFERRED/COMPLETED: AGC1,BBC1,LAE1,QBT1,LUT1,QLC1,QMC1,QLT1,IWC1,INC1,INT1,BVC1,CLC1,MGC1, CWV1 BNC1, LIT1,LWC1,QAT1,WFV1,EST1,EGC1,EGT1,IWT1,MKC1,MKT1,RWT1,FNT1,FNC1, BDC1,TPV1 REQUIRED:
  • Options
    paige1paige1 Member Posts: 117
    It took me a minute, but yes, I have some bits in the wrong place (Subnet 12icon_cool.gif and no, I did not enable subnet zero. If anyone is confused, I apologize. A lesson to me to double check my work.
    Self-confidence is the first requisite to great undertakings.

    Samuel Johnson
Sign In or Register to comment.