ip addressing and subneting

Unanswered Question
May 15th, 2009
User Badges:

can any one provide a good method on how to subnet, find a range, identify to witch ip belong to witch range, basically anything that can help...


pst: None of those long explanation. Thanks


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (6 ratings)
Loading.
Jon Marshall Fri, 05/15/2009 - 14:46
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Always start by taking the octet that isn't 255 or 0 away from 256 eg.


192.168.5.30 255.255.255.240


256 - 240 = 16 so the network = 192.168.5.16


the subnets increment by 16 so the next subnet would be 192.168.5.32


so your range is 192.168.5.17 -> 192.168.5.30 with 192.168.5.31 being the broacast address.


172.16.7.10 255.255.252.0


256 - 252 = 4 so network = 172.16.4.0


range = 172.16.4.1 -> 172.16.7.254 with 172.16.7.255 being broadcast address.


Hope that wasn't too long an explanation as that is about as simple as i can make it :-)


Jon

cisco steps Sat, 05/16/2009 - 19:31
User Badges:

Jon as always Thanks a lot for you brief expalanation, I will leave this open for now and do some practice this week and if I have any question I wil repost.



cisco steps Sun, 05/17/2009 - 09:05
User Badges:

Jon , I just applied what you mentioned to this question and I did not get the correct answer


Question: What is the first valid host on the subnetwork that the node 172.27.205.91/21 belongs to?


Answer: 172.27.200.1


cisco steps Sun, 05/17/2009 - 09:47
User Badges:

172.27.205.91/21 -->255.255.248.0


256-248=8


172.27.8.0

firt valid ip is 172.27.8.1

last valid ip is 172.27.8.254

brdcst =172.27.8.255


am I missing something .. Thanks



Jon Marshall Sun, 05/17/2009 - 12:05
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

The figure you end up with after taking it from 256 is the increment of the networks.


So 256 - 248 = 8 means your networks go up in 8.


So you need to work out the nearest number to 205 that is divisible by 8 ie.


24 x 8 = 192

25 x 8 = 200

26 x 8 = 208


172.27.205.91 falls within the range 172.27.200.0 -> 172.27.207.255


the next network being 172.27.208.0. So


the network is 172.27.200.0/21. The range is 172.27.200.1 -> 172.27.207.254 with 172.27.207.255 being the broadcast.


If that's unclear what we are doing is -


256 - 248 = 8 so if you wrote out all the networks -


172.27.8.0

172.27.16.0

172.27.24.0

172.27.32.0

172.27.40.0

...

172.27.200.0


etc.. ie all the networks are incrementing by 8.


Does this make sense ?


Jon

cisco steps Sun, 05/17/2009 - 13:52
User Badges:

Jon,

Thanks for taking the time to explain the topic. I will practice and get back to ya, I think it just matter of practice..


Thanks again



JORGE RODRIGUEZ Sun, 05/17/2009 - 19:26
User Badges:
  • Green, 3000 points or more

Hi,


Jon gave most fastest way calculation done in your head to come up with answer of network ID , 1st host, last host-, hosts range , and broadcast address of specific host.


Would like to throw additional info that will definately help you understand the sequence involved in the process. First you have to understand few simple things things that may look hard at first glance in order to make this process seemless as well as done in your head, understanding it makes things easier than memorizing things I guess.


First thing is to understand the binary system involved in IPv4, which Im sure you already know that it is composed of 4 octets, each of 8 bit equaling a total of 32 bits.


so three basic components you need to know by heart and comprehend are these.


When you understand the esence of this you will be a pro in subneting any class network in your head.


The Rule number 1 is = State away from calculators, you may use it only to confirm your answer , but do the process in your head.


Second- = Understand IPv4 Class networks and their default classful mask - This will help you in indentifying what class network you are face with when presented with a host regardless of its mask, in the case of (supperneting).


1-126 Class A Default mask /8

128-191 Class B Default mask /16

192-223 Class C default mask /24

224-239 Class D Multicast reserved

240-255 Class E experimental



Third = Understand and know the binary value of a 32 bit address in IPv4.

You must understand and know the binary value of an octect which is:


128 64 32 16 8 4 2 1


so in your example of 172.27.205.91/21 you know that 172 falls under Class B network and a class B network uses default mask of /16 bit which is 255.255.0.0 but 172,27.205.91 uses a /21 bit mask, so knowing the binary value of an octet seen in 128 64 32 16 8 4 2 1, you count from left to right 5 positions from the 3rd octect of the mask, that is 255.255.0.0 is 16 bits which is default of class B then the 3rd octect binary value count 5 (128 64 32 16 8) 4 2 1, in the parenthesis you have 5 bits which will make a total of 21 bits mask, up to here the 5th position ends in 8, remembering that 8 will be the key number because that will be your increment figure of networks within 172.27.0.0. So far so good right?


Now, say that 172.27.205.91 had a /19 bit mask instead of /21, then you do the same principle as before , this is still a class B network, which you now know its default classful mask is 255.255.0.0,then on the 3rd octet of the mask you count from left to right in this case of /19 will be 3 bit positions from 3rd octect, 255.255.0.0 is 16 bit mask, 3rd octet binary value again is (128 64 32) 16 8 4 2 1, again, in

parenthesis you have counted 3 bit position from left to right which will come to a total of 19 bits including the (255.255 -16-bits), that will bring you to 255.255.224.0 , now a key to calculate the mask is easy, simply add 128 + 64 + 32 = 224


here you have /19 - in example above with binary value bit counting 3 positions it ends in (32), here the 32 will be the figure to increment to come up with networks incrementing by 32


172.27.0.0

172.27.32.0

172.27.64.0

172.27.96.0

172.27.128.0

172.27.160.0

172.27.192.0 -----> here you stop because 172.27.205.91 host falls here


172.27.224.0

etc..


so you have 172.27.192.0 as the network ID, 172.27.192.1 as the first host, for broadcast address simply substract one from the 3rd octect of the next network of 172.27.224.0 which is 172.27.223.255. So the broadcast address of 172.27.205.91/19 is 172.27.223.255, then substract one from the 255 broadcast address to come up with the last host address which is 172.27.223.254.


Hope this helps, again, Jon provided the most fastest way calculation.


Regards


cisco steps Mon, 05/18/2009 - 09:02
User Badges:

Yo Yo Jorge,


Thanks for taking time too to explain it. I think I can attack any Ip issue with both what Jon and you explained and like I said B4, its just matter of practice. Thanks

cisco steps Mon, 05/18/2009 - 09:28
User Badges:

Question: How many subnets and hosts per subnet can you get from the network 192.168.60.0/27?

I did 256-224=32

Or 3 bit (128.64.32)


The increment is 32


192.168.60.0

192.168.60.32

192.168.60.64

192.168.60.96

192.168.60.128

192.168.60.160

192.168.60.192

192.168.60.224


1- Got my 8 subnet

2- Now for question number 2 , I know that I have 5 bits let on the host do I need to apply 2 to the power of 5 -2= 30..


That is cool , Man :-)


is there any other way I can see the 8 subnets with writing all those subnet and then count them.


Thanks


Jon Marshall Mon, 05/18/2009 - 09:34
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Looks like you've got it :-)


2) Yes, shortest way is to remove 2 from the increment which takes care of the actual subnet and broadcast address.


"is there any other way I can see the 8 subnets with writing all those subnet and then count them"


Not sure what you mean by this. With practice you get used to working out in your head so if from your example you were given a host address of 192.168.60.173 and asked to work out subnet you would just keep multiplying 32 until you got to nearest figure eg.


4 x 32 = 128

5 x 32 = 160 <----

6 x 32 = 192


once you've done this often enough you will begin to see patterns and remember them.


Jon

cisco steps Mon, 05/18/2009 - 09:54
User Badges:

Sorry that keep asking,


I think I got it the more I explain it to myself the more I understand it


here is an other one:


Question: What valid host range is the IP address 172.24.129.5 255.255.254.0 a part of?



256-254=2

172.24.x.x

the closes number to 129 is


2x63=126

2x64=128<---that is 172.24.128.0 to 172.24.129.255

2x65=130


172.24.128.0 ntwk ID

172.24.129.255 brdcst

172.24.128.1 first valid

172.24.129.254. last vailid








Jon Marshall Mon, 05/18/2009 - 10:15
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Yep, you've got it. Easy when you know how :-)


Jon

Actions

This Discussion