Subnetting Help Please!!!
m1chael
Member Posts: 58 ■■□□□□□□□□
in CCNA & CCENT
All-
I am a relative newbie when it comes to the CCNA objectives (currently studying so I can one day pass the exam and earn my cert) and I am just stuck on subnetting and really always have been. Seems like no matter what or who I study (Lammle, various online videos, youtube, etc), I just can't GET IT! I hear people say all the time that finally the light went off and now they understand...but not for me...starting to really doubt my ability at this point.
Let's get to the point....I understand the "fundamentals" if you will: SNM are used to identify which part of IP address is the Network and which part is the Host -
Class A: 33.0.0.0
Default SNM: 255.0.0.0
Class B: 172.155.0.0
Default SNM: 255.255.0.0
Class C: 192.168.0.1
Default SNM: 255.255.255.0
I also understand that subnetting means to actually steal a bit from the host until you've reached the necessary "physically" segments needed. The part where I really start getting lost is when you are figuring out SN-ID's and # of Hosts Per SN-ID.
Are there certain formula's or chart / graph that would make this easier that I should try to remember at all times? I just don't comprehend the calculation involved?
Any other feedback / advice you can provide for a struggling newbie?
Thanks,
Michael
I am a relative newbie when it comes to the CCNA objectives (currently studying so I can one day pass the exam and earn my cert) and I am just stuck on subnetting and really always have been. Seems like no matter what or who I study (Lammle, various online videos, youtube, etc), I just can't GET IT! I hear people say all the time that finally the light went off and now they understand...but not for me...starting to really doubt my ability at this point.
Let's get to the point....I understand the "fundamentals" if you will: SNM are used to identify which part of IP address is the Network and which part is the Host -
Class A: 33.0.0.0
Default SNM: 255.0.0.0
Class B: 172.155.0.0
Default SNM: 255.255.0.0
Class C: 192.168.0.1
Default SNM: 255.255.255.0
I also understand that subnetting means to actually steal a bit from the host until you've reached the necessary "physically" segments needed. The part where I really start getting lost is when you are figuring out SN-ID's and # of Hosts Per SN-ID.
Are there certain formula's or chart / graph that would make this easier that I should try to remember at all times? I just don't comprehend the calculation involved?
Any other feedback / advice you can provide for a struggling newbie?
Thanks,
Michael
Comments
-
elderkai Member Posts: 279Don't fret or doubt your abilities, my man. Lots of people struggle with subnetting.
There is a formula for finding out hosts and networks per subnet. You have to look at the subnet in binary.
Let's take the subnet 255.255.255.0. In binary it would read 11111111.11111111.11111111.00000000. To find how many hosts per subnet, count the number of zeros and put that as a power over 2. So 2^number. In this case we have 8 zeros, so we do 2^8 = 256. To find usable hosts, you just subtract two because one is the network number and another the broadcast. So 254 usable hosts!
To find how many networks you have, you count the number of ones and do the same thing you did for hosts only this time the ones have to be in the octet you're subnetting in. For the example above, there are ones in the third octet but it's all ones so you go to the next one, however that one has zero ones. 2^0 = 1. So you just have one big network. -
NotHackingYou Member Posts: 1,460 ■■■■■■■■□□Example 1:
33.0.0.0 / 255.0.0.0
255.0.0.0 = 11111111.00000000.00000000.00000000 because 128+64+32+16+8+4+2+1 so think of it as this: nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
where n = network and h = host.
network address would be 33.0.0.0 and the range of usable addresses would be 33.0.0.1 - 33.255.255.254 (33.0.0.0 is the network and 33.255.255.255 is the broadcast)
example 2
172.155.0.0 / 255.255.0.0
255.255.0.0
11111111.11111111.00000000.00000000
nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
network address would be 172.155.0.0 and the range of usable addresses would be 172.155.0.1 - 172.155.255.254 (192.155.0.0 is the network address and 172.155.255.255 is the broadcast)
example 3
192.168.0.1
255.255.255.0
11111111.11111111.11111111.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
network address would be 192.168.0.0 and the range of usable addresses would be 192.168.0.1 - 192.168.0.254 (192.168.0.0 is the network address and 192.168.0.255 is the broadcast)
where it gets tricky is with subnet masks like this:
10.5.10.0 255.255.240.0
but you can easily overcome this by simply counting up the bits it took to make this.
11111111.11111111.11110000.00000000
nnnnnnnn.nnnnnnnn.nnnnhhhh.hhhhhhhh
we get 240 because we have 4 bits turned on. 128+64+32+16 = 240. This tells us to use the first four bits for network and the last four for host.
So in this example we have split our third octet in half. The range for this ip address would be 10.5.0.1 - 10.5.15.254. 10.5.16.1 - 10.5.31.254 would be in the next network and separate from this one.
I just memorized each of the eight options 128, 192, 224, 240, 248, 252, 254, 255 and it served me well.
Hope this helps.When you go the extra mile, there's no traffic. -
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□I'd +1 the advice above, that they key to understanding subnetting, is to look at the questions in binary. You don't need binary to solve many questions, but imho that's the best place to begin. Knowing binary will be helpful in many other situations so it's time well spent.
-
FloOz Member Posts: 1,614 ■■■■□□□□□□post number 2 and 3 really helped me out. thanks guys. hope they help you out just as much as they did me op
-
m1chael Member Posts: 58 ■■□□□□□□□□Thank you everyone for all your help, I really really appreciate it. Ok, so I now understand that if your confused go ahead and break down the # into binary: so 255.255.255.240 (so for 240 that would be 11000000) Got that part
I also understand why we are using 128, 64, 32, 16, 8, 4, 2, 1 (powers of 2 and you read the binary # from right to left...correct?)
From the examples above I am having a little difficulty with post # 2 Carlsaiyed and how to determine that 10.5.10.0 255.255.240.0 would give you the following: 10.5.0.1 - 10.5.15.254. 10.5.16.1 - 10.5.31.254 would be in the next network and separate from this one? I don't understand this? What am I missing? -
Ltat42a Member Posts: 587 ■■■□□□□□□□Keep the attached handy when studying subnetting. When you subnet a network, you will work in ranges (or block sizes). Each network and subnet will have a network address and a broadcast address. Everything in between is usable to assign to hosts.
hth -
NotHackingYou Member Posts: 1,460 ■■■■■■■■□□Thank you everyone for all your help, I really really appreciate it. Ok, so I now understand that if your confused go ahead and break down the # into binary: so 255.255.255.240 (so for 240 that would be 11000000) Got that part
I also understand why we are using 128, 64, 32, 16, 8, 4, 2, 1 (powers of 2 and you read the binary # from right to left...correct?)
From the examples above I am having a little difficulty with post # 2 Carlsaiyed and how to determine that 10.5.10.0 255.255.240.0 would give you the following: 10.5.0.1 - 10.5.15.254. 10.5.16.1 - 10.5.31.254 would be in the next network and separate from this one? I don't understand this? What am I missing?
255.255.255.240 would be 11111111.11111111.11111111.11110000
When we do that, we say that we are not using the entire octet for the network address and we will be using some as the host and some as the network. We will specify how we are breaking up our total possible number of addresses to make different networks.
For example if we have 10.0.0.0 255.0.0.0 our networks could be:
10.0.0.0
11.0.0.0
12.0.0.0
13.0.0.0
and so on. Because we are using all of the bits in the first octet as our network and the rest as host addresses.
When we do something like 10.0.0.0 255.255.240.0 we are saying to use the first two octets and some of the third for our networks. so our networks would be
10.0.0.0
10.0.16.0
10.0.32.0
10.0.48.0
10.0.64.0
10.0.80.0
10.0.96.0
We have decided that we will break the third octet up in to blocksof 16. Notice it goes up 16 every time? This is because our 240 masks says 'break this octet into blocks of 16'. We know it is 16 because 256-240 = 16. Thus, 16 is the block size for a 240 mask. This works with any of the mask numbers available, try it.
10000000 = 128. 256-128 = 128
11000000 = 192. 256-192 = 64
11100000 = 224. 256-224 = 32
11110000 = 240. 256-240 = 16
11111000 = 248. 256-248 = 8
11111100 = 252. 256-252 = 4
11111110 = 254. 256-254 = 2
11111111 = 255. 256-255= 1
If you can commit this table to memory and really know this, subnetting questions become easy. So the first thing you do is take your mask and figure out your block size. Here's an example.
192.168.55.68 255.255.255.192. What network is this in? What is the broadcast address? What is the range of available addresses?
We know that because the mask is 255.255.255.192, the first three octets will be part of the network address.
256-192 = 64. So we know that we are breaking up the fourth octet into chunks of 64. Now we count in blocks of 64. 0,64,128,192. We have divided our network address of 192.168.55.0 into four networks, which are 192.168.55.0, 192.168.55.64, 192.168.55.128, 192.168.55.192.
In our example 192.168.55.68 falls within the second network which is 192.168.55.64. The broadcast address is always the last address in the range. We know that 192.168.55.128 is the next address, so the broadcast is 192.168.55.127. This leaves us with the available host addresses of 192.168.65-126. Your range is always block size - 2. (One for network, one for broadcast).
Once you have this down you can learn how to calculate # of host addresses (easy, just know the powers of 2)When you go the extra mile, there's no traffic. -
m1chael Member Posts: 58 ■■□□□□□□□□Carlsaiyed-
First thanks for taking the time to assist me...I appreciate it...Second thanks for your lengthy examples in an attempt to break this down for me...sorry you have to "dumb" it down so much....
Your examples are helping but I am perplexed by a real world example:
If I have a Class B IP address / 172.16.15.20 and a SNM of 255.255.255.192 how is this possible...I thought Class B IP addresses had to be associated with a Default SNM of 255.255.0.0? I don't understand....I thought it would be 255.255.192.0?
Where am I going wrong with my train of thought....
Thanks... -
FloOz Member Posts: 1,614 ■■■■□□□□□□there is both classful and classless address.
class a - [FONT=Verdana, Geneva, Arial, Helvetica, sans-serif]0 - 126 snm-[/FONT]255.0.0.0
class b - 128-191 snm-255.255.0.0
class c - 192-223 snm-255.255.255.0
class d - 224-239 (multicast) dont worry about this
class e - 240+ (reserved) dont worry about this
then there is classless addressing which disregards the old classfull address scheme (we still refer to address as clas a,b,c tho). so the example you gave 172.16.15.20 255.255.255.192 is a classless address. -
elderkai Member Posts: 279It'd still be called a Class B address because of where the first number lies. It's just not using the default classful mask because it has been subnetted and is considered a Class B Classless address, like pruspeter explained.
-
NotHackingYou Member Posts: 1,460 ■■■■■■■■□□Carlsaiyed-
First thanks for taking the time to assist me...I appreciate it...Second thanks for your lengthy examples in an attempt to break this down for me...sorry you have to "dumb" it down so much....
Your examples are helping but I am perplexed by a real world example:
If I have a Class B IP address / 172.16.15.20 and a SNM of 255.255.255.192 how is this possible...I thought Class B IP addresses had to be associated with a Default SNM of 255.255.0.0? I don't understand....I thought it would be 255.255.192.0?
Where am I going wrong with my train of thought....
Thanks...
You are welcome! I struggled with this concept at first and it took me a while to get it. You just have to keep at it until you really get it. It can be frustrating, but do as much work as is needed to make sure you fully understand the concept forward, backward, inside and out. You will need this skill for a lot of other things you will learn.
You can use any subnet mask that is larger than the standard classful subnet mask.
Standard classful masks :
A: 255.0.0.0
B: 255.255.0.0
C: 255.255.255.0
You can subnet a classful address down as far as you want.
For a class A you could do anywhere between 255.0.0.0 to 255.255.255.252
For a class B you could do anywhere between 255.255.0.0 to 255.255.255.252.
For a class C you could go anywhere between 255.255.255.0 to 255.255.255.252
However, you can't go backwards. You may not apply a subnet mask of 255.0.0.0 to a class B address.
So with your example of 172.16.15.20 255.255.255.192 - they have taken the standard classful subnet of 172.16.0.0 and divided it up, so apply your block size to the fourth octect in your subnet mask. 256-192 = 64. You will have four subnets.
172.16.15.0, 172.16.15.64, 12.16.15.128, 172.16.15.192.
The ranges would be:
172.16.15.0 - 172.16.15.63
172.16.15.64 - 172.16.15.127
172.16.15.128 - 172.16.15.191
172.16.15.192 - 172.16.15.255
If you did your example as 172.16.15.0 255.255.192.0 you would have different subnets. You would have 172.16.0.0, 172.16.64.0, 172.16.128.0 and 172.16.192.0.
The ranges would be:
172.16.0.0 - 172.16.63.255
172.16.64.0 - 172.16.127.255
172.16.128.0 - 172.16.191.255
172.16.192.0 - 172.16.255.255
The mask you apply is based on how many subnets you need and how many hosts per subnet you need. You can apply many different masks to a given IP in order to divide it up how you need.When you go the extra mile, there's no traffic. -
m1chael Member Posts: 58 ■■□□□□□□□□CarlSaiyed wrote: »
10000000 = 128. 256-128 = 128
11000000 = 192. 256-192 = 64
11100000 = 224. 256-224 = 32
11110000 = 240. 256-240 = 16
11111000 = 248. 256-248 = 8
11111100 = 252. 256-252 = 4
11111110 = 254. 256-254 = 2
11111111 = 255. 256-255= 1
If you can commit this table to memory and really know this, subnetting questions become easy. So the first thing you do is take your mask and figure out your block size. Here's an example.
192.168.55.68 255.255.255.192. What network is this in? What is the broadcast address? What is the range of available addresses?
We know that because the mask is 255.255.255.192, the first three octets will be part of the network address.
256-192 = 64. So we know that we are breaking up the fourth octet into chunks of 64. Now we count in blocks of 64. 0,64,128,192. We have divided our network address of 192.168.55.0 into four networks, which are 192.168.55.0, 192.168.55.64, 192.168.55.128, 192.168.55.192.
In our example 192.168.55.68 falls within the second network which is 192.168.55.64. The broadcast address is always the last address in the range. We know that 192.168.55.128 is the next address, so the broadcast is 192.168.55.127. This leaves us with the available host addresses of 192.168.65-126. Your range is always block size - 2. (One for network, one for broadcast).
Once you have this down you can learn how to calculate # of host addresses (easy, just know the powers of 2)
Carlsaiyed / elderkai-
Thanks for everyone's help...I took the weekend off just to give my brain a rest (especially after going home on Friday and watching Lammle again)...I think he is kind of confusing me even more....really I think with his info and the info I am getting off of here my mind is going a million miles a minute. Anyway...I decided to jump back on it this morning to see if anything sunk in....so I tried the following example:
192.168.55.24 / 255.255.255.240
So first...
Block size of 16 (256-240)
How many networks?
16
What network is this in?
192.168.55.16
Broadcast address?
192.168.55.31
Range of addresses available?
192.168.55.17 thru 192.168.55.30
# of host addresses?
16
This is where the powers of 2 come into play....so 240 is 11110000 (count of the # of zero's which is 4) so its 2 to the 4th power which is 16.
Am I on the right track so far?
Thanks.... -
MrXpert Member Posts: 586 ■■■□□□□□□□Carlsaiyed / elderkai-
Thanks for everyone's help...I took the weekend off just to give my brain a rest (especially after going home on Friday and watching Lammle again)...I think he is kind of confusing me even more....really I think with his info and the info I am getting off of here my mind is going a million miles a minute. Anyway...I decided to jump back on it this morning to see if anything sunk in....so I tried the following example:
192.168.55.24 / 255.255.255.240
So first...
Block size of 16 (256-240)
How many networks?
16
What network is this in?
192.168.55.16
Broadcast address?
192.168.55.31
Range of addresses available?
192.168.55.17 thru 192.168.55.30
# of host addresses?
16
This is where the powers of 2 come into play....so 240 is 11110000 (count of the # of zero's which is 4) so its 2 to the 4th power which is 16.
Am I on the right track so far?
Thanks....
:DYou are indeed on the right track. I will point out that the number of valid hosts would be 2^4-2=14.I'm an Xpert at nothing apart from remembering useless information that nobody else cares about. -
lantech Member Posts: 329m1cheal,
You are on the right track. But I would suggest trying to do it in binary first. That way you'll have a better understanding of how the router is doing. Then look for other ways that are faster for you to do it. Course if you want to eat, breath and sleep binary you will eventually be able to do it in your head pretty fast.2012 Certification Goals
CCENT: 04/16/2012
CCNA: TBD -
DarthVader Member Posts: 71 ■■□□□□□□□□1 2 3 4 5 6 7 8
128 192 224 240 248 252 254 255
128 64 32 16 8 4 2 1
If you can understand these numbers and keep them in the back of your mind, you should never have a problem subnetting, think about it.... -
m1chael Member Posts: 58 ■■□□□□□□□□:DYou are indeed on the right track. I will point out that the number of valid hosts would be 2^4-2=14.
Thanks for the feedback...I am still a little confused on why it would be 16 hosts though? Valid hosts are from 17 thru 30 which is 14? What am I missing? -
m1chael Member Posts: 58 ■■□□□□□□□□m1cheal,
You are on the right track. But I would suggest trying to do it in binary first. That way you'll have a better understanding of how the router is doing. Then look for other ways that are faster for you to do it. Course if you want to eat, breath and sleep binary you will eventually be able to do it in your head pretty fast.
Not 100% positive on what you mean by doing it in binary first...thought that was what I was doing? Can you elaborate...I think I am having a brain slide.....Thx -
m1chael Member Posts: 58 ■■□□□□□□□□DarthVader wrote: »1 2 3 4 5 6 7 8
128 192 224 240 248 252 254 255
128 64 32 16 8 4 2 1
If you can understand these numbers and keep them in the back of your mind, you should never have a problem subnetting, think about it....
Thanks for the suggestion...I have been laying awake at night while in bed thinking about those #'s.....I find myself counting 128, 192, 224, 240, etc etc instead of sleeping sometimes.....
I understand what you are saying with remembering the default SNM and the block sizes but not sure about 1 2 3 4 5 6 7 8 ? -
m1chael Member Posts: 58 ■■□□□□□□□□I understand what you are saying with remembering the default SNM and the block sizes but not sure about 1 2 3 4 5 6 7 8 ?
Disregard, I understand the 1 thru 8....just had a weak moment...LoL
Basically 1-8 of the bits in the octet:
1 / 10000000 / 128 / Block size 128
2 / 11000000 / 192 / Block size 64
3 / 11100000 / 224 / Block size 32
4 / 11110000 / 240 / Block size 16
Etc etc..... -
m1chael Member Posts: 58 ■■□□□□□□□□All...been curious about something over the last few days hoping someone can shed some light on the subject?
Anyway, its about classful IPaddresses. I understand depending on what the first octet is basically determines what class the IP address is part of:
33.0.0.0 / Class A
172.16.15.1 / Class B
192.168.0.1 / Class C
So my question is about the second octet (second and third for class c)....is there usually a default number people use or a standard or can you address this any way you like?
So like for class B = 172.16.15.1 how do you determine the second octet?
For class C = 192.168.0.1 how do you determin the second and third octet?
Just curious....? Thanks.... -
sratakhin Member Posts: 818For a class C network, the second octet has to be 168. You can use any number in the third and fourth octet though.
-
m1chael Member Posts: 58 ■■□□□□□□□□For a class C network, the second octet has to be 168. You can use any number in the third and fourth octet though.
Thank you very much:) And what about class B? I assume you don't have to use 16 as the second octet....so basically you could have 172.20 or 172.10 or 172.15 if you wanted?
Sorry for so many questions....my mind just starts to wonder out of control sometimes...LoL -
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□So my question is about the second octet (second and third for class c)....is there usually a default number people use or a standard or can you address this any way you like?
172.16.15.1 is part of a range of private IP addresses (172.16.0.0 - 172.31.255.255). Use any you like. I suppose the norm would be to begin assigning addresses from the beginning of that range.
Similarly, 192.168.0.1 is part of a range of private IP addresses (192.168.0.0 - 192.168.255.255). Again, the norm would probably be to begin assigning addresses from the beginning of that range. -
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□For a class C network, the second octet has to be 168. You can use any number in the third and fourth octet though.
See my above post. I hope this helps. -
m1chael Member Posts: 58 ■■□□□□□□□□NetworkVeteran- Yes both responses help big time...thx
If you don't mind, I would like to "run" with this topic just for a hot sec.....for example, most people have a home class C network typically 192.168.1.1 or 192.168.0.1 depending on router company.
My thinking is that if you wanted to change this setting (just for the hell of it let's say) to 192.165.5.1 you could do that?
My other question is this....say if you wanted to set up two totally separate networks at home (two routers for example) you could have one network on 192.168.0.1 and the other on 192.168.10.1? -
m1chael Member Posts: 58 ■■□□□□□□□□Edit: I guess you can't use the 192.165.5.1 because it is not in the "private" range.....but I guess you could use 192.168.20.1 if you wanted?
-
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□Edit: I guess you can't use the 192.165.5.1 because it is not in the "private" range.....but I guess you could use 192.168.20.1 if you wanted?
srathakin, I realized you probably did. I just wanted to clarify for his sake.