Question about subnetting

steve2012steve2012 Member Posts: 93 ■■□□□□□□□□
Below is the sample subnet;


IP Address. . . . . . . . . . . . : 172.18.243.144
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Default Gateway . . . . . . . . . : 172.18.240.1

the resident subnet is 172.18.240.0
the first host ip address is 172.18.240.1
the last host ip address is 172.18.243.254
the broadcast address is 172.18.243.255

The incement number is 4 - as the interesting octet is 252 - the third octet. I am assuming the math works out correctly, my question is, can ip address 172.18.243. 25,(for example if there was a host at that address), ping 172.18.242.31, (assuming there is a host at that address, if there is even a valid subnet at that address)?

Where I am getting confused is; there are suppossed to be 4 subnets yes? so from ip address range 172.18.240.1 up to 172.18.243.254, any ip address is valid? and can ip address 172.18.243.10 talk to 172.18.242.34 without a router? because they are in different subnet?

or can they communicate without a router?

Sorry is the question is confusing.

thanks,

Steve

Comments

  • CodeBloxCodeBlox Member Posts: 1,363 ■■■■□□□□□□
    Your range of addresses are correct and would not need a "router" to talk. If something isn't in a hosts subnet, it goes to the default gateway for routing. This is not a case of 4 subnets. Your special octet just increments by 4 and this gives you the boundary so to speak between subnets. In your case, the subnet in question is 172.18.240.0 /22 The next subnet would be 172.18.244.0, and the next subnet after that would be 172.18.248.0 and the final would be 172.18.252.0. If you start at 172.18.0.0 and increment by 4, that would give you your subnets for this prefix length. In your case, there are actually 2^6 = 64 subnets, not 4.
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • steve2012steve2012 Member Posts: 93 ■■□□□□□□□□
    CodeBlox wrote: »
    If you start at 172.18.0.0 and increment by 4, that would give you your subnets for this prefix length. In your case, there are actually 2^6 = 64 subnets, not 4.


    Thank you for the reply. I'm sorry I don't quite follow the above quote. the mask is 255.255.252.0. how does that give me 2^6 = 64

    Thanks
  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    Steve, he's basing that on 172.18.0.0/16 being the classful network address. A /16 is 255.255.0.0 a.k.a. 11111111 11111111 00000000 00000000 (binary). Now, your subnet mask is 255.255.252.0 a.k.a. 11111111 11111111 11111100 00000000 (binary). Notice, the subnet mask contains six extra ones. That's why there are 2^6 = 64 subnets. The subnet mask contains 10 zeroes. That's why there are 2^10 - 2 = 1022 hosts per subnet. Make sense now?

    The valid subnets are:

    172.18.0.0/22
    172.18.4.0/22
    172.18.8.0/22
    ...
    172.18.252.0/22
    Where I am getting confused is; there are suppossed to be 4 subnets yes?
    This comment is totally wrong. There are 64 subnets.
    so from ip address range 172.18.240.1 up to 172.18.243.254, any ip address is valid?
    Yep.
    And can ip address 172.18.243.10 talk to 172.18.242.34 without a router? because they are in different subnet?
    They are both on the same 172.18.240.0/22 subnet, so no router is required.
  • georgemcgeorgemc Member Posts: 429
    steve2012 wrote: »
    Below is the sample subnet;


    IP Address. . . . . . . . . . . . : 172.18.243.144
    Subnet Mask . . . . . . . . . . . : 255.255.252.0
    Default Gateway . . . . . . . . . : 172.18.240.1

    the resident subnet is 172.18.240.0
    the first host ip address is 172.18.240.1
    the last host ip address is 172.18.243.254
    the broadcast address is 172.18.243.255

    The incement number is 4 - as the interesting octet is 252 - the third octet. I am assuming the math works out correctly, my question is, can ip address 172.18.243. 25,(for example if there was a host at that address), ping 172.18.242.31, (assuming there is a host at that address, if there is even a valid subnet at that address)?

    Where I am getting confused is; there are suppossed to be 4 subnets yes? so from ip address range 172.18.240.1 up to 172.18.243.254, any ip address is valid? and can ip address 172.18.243.10 talk to 172.18.242.34 without a router? because they are in different subnet?

    or can they communicate without a router?

    Sorry is the question is confusing.

    thanks,

    Steve



    Your major network has 64 subnets with 1022 host in each subnets.

    Counting by 4's in the third octet you get 0-3, 4-7, 8-11.......236-239, 240-243, 244-247.....

    The range that you were given, 172.18.240.0 - 172.18.243.255 is ONE subnet.


    So the answer to your question is yes, 172.18.243. 25 can ping 172.18.242.31 without a router in between because they are in the same subnet.

    Remember, you started with a class B network(default 16 host bits) and borrowed 6 host bits for subnetting. 2^6=64

    You have 10 host bits which gives you 2^10-2=1022


    Hope this helps.


    George
    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:
  • steve2012steve2012 Member Posts: 93 ■■□□□□□□□□
Sign In or Register to comment.