Different scenario in subnetting

Alhaji265Alhaji265 Member Posts: 205 ■■■□□□□□□□
How does these type of subnetting questions are answered:

You need to divide the 172.24.0.0 network into 600 subnets with 50 hosts per subnet. What subnet mask should you use?

How many subnets and hosts per subnet can you get from the network 172.23.0.0 255.255.255.240?

Detailed breakdown would be extremely grateful, thanks.

Comments

  • theodoxatheodoxa Member Posts: 1,340 ■■■■□□□□□□
    There are 32 bits in an IPv4 Address.

    Class A: 8 bits Network, 24 bits Host (First Octet: 1 - 126)
    Class B: 16 bits Network, 16 bits Host (First Octet: 128 - 191)
    Class C: 24 bits Network, 8 bits Host (First Octet: 192 - 223)
    Class D: Multicasting (First Octet: 224 - 239)
    Class E: Unused "Experimental" (First Octet: 240 - 247)

    NOTE: The entire 127 Network is reserved for loopback, not just 127.0.0.1. You can use any valid host address in that network for loopback testing.

    To subnet a classful address, you would "borrow" bits from the Host portion of the address. In this case, you have a class B address. The Network portion is 16 bits and the Host portion 16 bits. If you need 600 subnets, you would say:

    2^x >= 600, where x is the number of bits you need to borrow

    This is not as difficult as it appears. Memorizing some of the major powers of 2 will speed things up. For example, I happen to know that 2^10 = 1024, which mean 2^9 = 512. Since, you need 600 subnets, borrowing 9 bits would not provide enough subnets. You need to borrow 10 bits. For CIDR Notation, you can simply add 10 to the number of Network bits - 16, to arrive at a prefix-length of /26. Since /24 is the default class C (255.255.255.0), we can work from there to calculate the subnet mask.

    /24 = 255.255.255.0
    /25 = 255.255.255.128
    /26 = 255.255.255.192
    /27 = 255.255.255.224
    /28 = 255.255.255.240
    /29 = 255.255.255.248
    /30 = 255.255.255.252

    The subnet mask would be 255.255.255.192.

    Since we are using 26 bits for the Network and Subnet, we can simply subtract 26 from 32, which leaves us 6 bits for hosts. That is 2^6 or 64 addresses. The first and last address are unusable, so we subtract those leaving us 62 usable host addresses per subnet.

    For the second question, we have a subnet mask of 255.255.255.240, which if you look at the list above would be a /28. That means we have borrowed 28 - 16 = 12 bits from the host portion.

    2^12 = 4096, giving you 4096 subnets.
    32 - 28 = 4 bits left for the host portion. 2^4 = 16, subtracting 2 for the unusable addresses, leaves us with 14 hosts per subnet.
    R&S: CCENT CCNA CCNP CCIE [ ]
    Security: CCNA [ ]
    Virtualization: VCA-DCV [ ]
  • Alhaji265Alhaji265 Member Posts: 205 ■■■□□□□□□□
    Thank you, this is much need information for my studying.
  • Alhaji265Alhaji265 Member Posts: 205 ■■■□□□□□□□
    theodoxa wrote: »
    Since we are using 26 bits for the Network and Subnet, we can simply subtract 26 from 32, which leaves us 6 bits for hosts. That is 2^6 or 64 addresses. The first and last address are unusable, so we subtract those leaving us 62 usable host addresses per subnet.

    I don't mean to bump this thread, where did you come up with 32? I'm currently going over for the ICND1.
  • bbarrickbbarrick Member Posts: 242 ■■■□□□□□□□
    IPv4 address can't be more or less than 32 bits. By default a class a address has 8 network bits and 24 host bits. For a total of 32 bits.

    Class B has 16 network/16 host.

    Class C has 24 network/8 host.

    The process of subnetting involved taking host bits and creating a subnet with them, the subnet is still bound by the 32 bit rule but no longer bound by the Class A,B, or C rules.
Sign In or Register to comment.