[question] subnetting doubt

indra26indra26 Member Posts: 10 ■□□□□□□□□□
hello folks,

i have following ip 192.168.3.0 255.255.252.0

Question :
1. I want to know whether this ip is broadcast or network or host address
2. how many total host ?

Thanks
~indra26

Comments

  • indra26indra26 Member Posts: 10 ■□□□□□□□□□
    please let me know how do you guys find whether ip is broadcast or network or host address
  • jibtechjibtech Member Posts: 424 ■■■■■□□□□□
    Follow the basics of subnetting. The third octet is the interesting one.

    256-252 = 4 addresses per "chunk". So you have the following subnets:

    192.168.0.0
    192.168.4.0
    192.168.8.0
    192.168.12.0
    ...and so on.

    192.168.3.0 falls between the first two, so it is part of the 192.168.0.0 subnet.

    The first address in the subnet would be the network address: 192.168.0.0
    The last address in the subnet would be the broadcast address: 192.168.3.255
    The first host address is the network address + 1: 192.168.0.1
    The last host address is the broadcast address - 1: 192.168.3.254

    Since 192.168.3.0 is in the range of host addresses, it is a host address.
  • jibtechjibtech Member Posts: 424 ■■■■■□□□□□
    To find the number of subnets and number of hosts...

    192.168.0.0 is a /16 network.

    Since there are 32 bits in the full address, there are 16 bits available for subnet and host ranges.

    The host bits are identified with the mask. Since a 255.255.252.0 mask is equal to a /22 subnet, 22-16 indicates 6 bits for the subnets.

    2^6 = 64, so there are 64 subnets available.

    Subtract the subnet bits from the available range. 16-6 = 10 bits.

    2^10 = 1024. But you have to subtract two for the network address and the broadcast address.

    1024 - 2 = 1022 host addresses.

    IP address: 192.168.3.0
    Network mask: 255.255.252.0
    Subnet: 192.168.0.0 /22
    Network address: 192.168.0.0
    Broadcast address: 192.168.3.255
    Subnet bits: 6
    Host bits: 10
    Number of subnets: 64
    Number of hosts: 1022
  • indra26indra26 Member Posts: 10 ■□□□□□□□□□
    Thanks for reply first problem resolved.
    192 series is in class c the default subnet is /24
    i do this way to find total host
    total bits is 32
    32
    - 24
    ____
    8

    2^8 = 256
    256-2 = 254 host


    if the subnet mask is /22
    32
    - 22
    ____
    10

    2^10 = 1024
    1024 - 2 = 1022 host
    Is this right way to do ??

    why did you minus 22-16 suppose if the subnet mask is 27, 27-24 indicates 3 bits for the subnets ?
    2^3 = 8 so there are 8 subnets available.
    24-3 = 21 bits
    2^21 ?
  • chopstickschopsticks Member Posts: 389
    indra26 wrote: »
    why did you minus 22-16 suppose if the subnet mask is 27, 27-24 indicates 3 bits for the subnets ?
    2^3 = 8 so there are 8 subnets available.
    24-3 = 21 bits
    2^21 ?


    Where N = Network Portion, H = Host Portion

    NNNNNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH (Classful Network)

    NNNNNNNN.NNNNNNNN.NNNNNNNN.NNNHHHHH (Classless Netnetwork, Subnetted the Classful network by borrow 3 bits from the Host Portion)

    2^3 = 8 subnets created
    2^5 - 2 = 30 hosts in each of the 3 subnets

    Hopefully this becomes clearer for you.
  • jibtechjibtech Member Posts: 424 ■■■■■□□□□□
    indra26 wrote: »
    Thanks for reply first problem resolved.
    192 series is in class c the default subnet is /24
    i do this way to find total host
    total bits is 32
    32
    - 24
    ____
    8

    2^8 = 256
    256-2 = 254 host

    Slight misconception here. The 192.168.x.x reserved address space is actually a /16 space. It includes all addresses from 192.168.0.0 to 192.168.255.255. The subnets typically created in this range are /24.
    192.168.0.0 /24
    192.168.1.0 /24
    192.168.2.0 /24
    ... and so on.
    if the subnet mask is /22
    32
    - 22
    ____
    10

    2^10 = 1024
    1024 - 2 = 1022 host
    Is this right way to do ??

    So far, so good.
    why did you minus 22-16 suppose if the subnet mask is 27, 27-24 indicates 3 bits for the subnets ?
    2^3 = 8 so there are 8 subnets available.
    24-3 = 21 bits
    2^21 ?

    This has to do with the "interesting octet" concept. This is the first octet, counting from the left, that does not have a value of 255. Each octet with a value of 255 consists of 8 bits. A mask of /22 is 255.255.252.0
    We know the first octet is 8 bits.
    We know the second octet is 8 bits.

    The third octet is the first octet that does not equal 255, or 8 bits, so it is the "interesting octet". Anything in that octet is a "borrowed bit".

    Since the first two octets equal 16 bits, we subtract 16 from the mask /22, to identify the number of borrowed bits. For /22 that is 6 borrowed bits.

    Now look at a /27, which is 255.255.255.224.
    First octet is 8 bits.
    Second octet is 8 bits.
    Third octet is 8 bits.
    Fourth octet is less than 255, so it is the "interesting octet". We subtract the known bits (8+8+icon_cool.gif from the mask (/27), to establish the number of borrowed bits. 27-24 = 3 borrowed bits. Therefore, there are 2^3 subnets available. 2^3 = 8 subnets.

    Since there are only 32 bits in an IPv4 address, we subtract the mask from 32, and we get 5 bits. 2^5 = 32 addresses. But, we have to subtract 2 for the network and broadcast addresses, so 32-2 = 30 available host addresses in each of those subnets.
  • jibtechjibtech Member Posts: 424 ■■■■■□□□□□
    chopsticks wrote: »
    Where N = Network Portion, H = Host Portion

    NNNNNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH (Classful Network)

    NNNNNNNN.NNNNNNNN.NNNNNNNN.NNNHHHHH (Classless Netnetwork, Subnetted the Classful network by borrow 3 bits from the Host Portion)

    2^3 = 8 subnets created
    2^5 - 2 = 30 hosts in each of the 3 subnets

    Hopefully this becomes clearer for you.

    Good diagram, chopsticks. This may make it a bit clearer.
  • TechGuru80TechGuru80 Member Posts: 1,539 ■■■■■■□□□□
    indra26 wrote: »
    i have following ip 192.168.3.0 255.255.252.0

    Question :
    1. I want to know whether this ip is broadcast or network or host address
    Am I missing something here? You will never have a host nor a broadcast having an IP of .0.
  • jibtechjibtech Member Posts: 424 ■■■■■□□□□□
    TechGuru80 wrote: »
    Am I missing something here? You will never have a host nor a broadcast having an IP of .0.

    I am pretty sure you can have a host with a .0, and this particular case is an example. With a network address of 192.168.0.0 /22, you would have 3 different host addresses that end in .0

    IP address: 192.168.3.0
    Network mask: 255.255.252.0
    Subnet: 192.168.0.0 /22
    Network address: 192.168.0.0
    Broadcast address: 192.168.3.255

    In this subnet, you would have the following host addresses that end in .0:
    192.168.1.0
    192.168.2.0
    192.168.3.0

    The range of host addresses is 192.168.0.1 to 192.168.3.254, and the three addresses above fall inside that range.

    As far as broadcast address, I agree. There is no binary math that allows for the broadcast address to end in .0
  • indra26indra26 Member Posts: 10 ■□□□□□□□□□
    Thanks chopsticks for the diagram and nice trick for beginner
    jibtech will be my sir nice explanation :)

Sign In or Register to comment.