The UK Hyundai Coupe Site Forum
http://forums.hyundaicoupe.info/

Subnetting Explanation
http://forums.hyundaicoupe.info/viewtopic.php?f=22&t=22278
Page 1 of 1

Author:  Hig [ Thu Feb 04, 2010 9:48 pm ]
Post subject:  Subnetting Explanation

Right, so I fully understand that subnetting is basically splitting up a network into smaller segments etc. etc. what I really can't get my head around is the figuring out of the different subnetsm the formulas involved etc, such as:

IP Network - 172.16.0.0
Subnet Mask - 255.255.0.0 ---- You want 60 subnets

So you use - 2s > # of subnets --- So, 2s > 60 --- 64 is the next highest to 60, so that works out as s being 6 as 2(6) (why again stuck lol!) = 64

So 2(6) > 60

So, 128 + 64 + 32 + 16 + 8 + 4 = 252 ... So the subnet mask is 255.255.252.0

So does anyone fancy putting all of that into English for me please lol? I do kind of get it, but if someone could like explain each step that would be really appreciated, as the book I'm going from aint helpin (I tok the above out of it)

Edit* Actually if someone could do the same with the stuff below that would be so so useful to me:

IP Network - 172.16.0.0
Subnet Mask - 255.255.0.0 ---- You want 30 subnets

Author:  Hig [ Thu Feb 04, 2010 9:57 pm ]
Post subject:  Re: Subnetting Explanation

To add to the end of my last bit of the above ... Does this work out anyone know?

172.16.0.0
255.255.0.0 – 30 subnets (It has to be 16 subnets, haha, me a muppet lol!)

2(s) > #

2(4) > 30

So, 128 + 64 + 32 + 16 = 240

So the subnet here would be 255.255.240.0 ?

Author:  Hig [ Thu Feb 04, 2010 11:15 pm ]
Post subject:  Re: Subnetting Explanation

Just to add, I' startin to get the hang of it I think lol, all I don't get is how the IP address range is calculated and the Mask bits, oh, and how you calculate the number of available hosts I'm lost on aswell lol!)

192.168.0.0
255.255.255.0 --- 8 segments
2s > #
2(3) > 8
128 + 64 + 32 = 224
225.255.255.224
(3 Subnet Bits. 224 Max. Subnets, 27 Mask Bits, 30 Available Hosts)
192.168.0.0 – 192.168.0.31

172.16.0.0
255.255.0.0 (256 Subnets)
2s > #
2(8) > 256
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
(8 Subnet Bits, 256 Max. Subnets, 24 Mask Bits, 254 Available Hosts)
172.16.0.1 – 172.16.0.254

10.0.0.1
255.0.0.0 (64 Subnets)
2s > #
2(6) > #
128 + 64 + 32 + 16 + 8 + 4 = 252
255.252.0.0
(6 Subnet Bits, 252 Max Subnets, 14 Mask Bits, 262,142 Available Hosts)
10.0.0.1 – 10.3.255.254

Author:  mjnewton [ Fri Feb 05, 2010 3:05 pm ]
Post subject:  Re: Subnetting Explanation

Hi Hig,

Subnetting eh... I feel your pain mate.

Let me start from the beginning as, like many things, there's more than one way to skin a cat and subnetting is definitely no exception.

Let's get some binary maths out of the way - here are all the powers of 2 for upto 8 bits (we won't cover subnetting across octet boundaries just yet!):

2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128
2^8 = 256

So, let's say we start with your your 172.16.0.0 network which, being a Class B network, has the default subnet mask 255.255.0.0.

If we want to split it into 8 subnets we need to borrow 3 bits from the host portion as per the table above. If we wanted 9 subnets we'd have to go up to the next bit boundary, i.e. 4 bits (giving us 16 subnets).

The require mask is worked out by setting the first 3 bits to 1, and setting the rest to 0:

128 64 32 16 8 4 2 1
1 1 1 0 0 0 0 0 = 128 + 64 + 32 = 224
(forgive the non-fixed-width font)

Hence our mask is 255.255.224.0

To work out what subnets that gives us we need to work out the 'block size'. The easiest way to do that is simply to do 256-mask i.e. 256-224 = 32 hence our subnets, starting from 0 (the so-called 'subnet zero' is generally allowable nowadays), are:

172.16.0.0 255.255.224.0 (or 172.16.0.0/27)
172.16.32.0/27
172.16.64.0/27
172.16.96.0/27
172.16.128.0/27
172.16.160.0/27
172.16.192.0/27
172.16.224.0/27

Taking any one subnet, say 172.16.64.0/27, we can work out how many addresses this subnet has in it, and the range...

Remember we started off with 16 host bits, but borrowed 3 leaving 13 host bits for us to use. 2^13 = 8192 addresses. The range is 172.16.64.0 - 172.16.95.255 (one less than the next subnet) but we cannot use the first one as this refers to the network, nor the last as this is the broadcast address. The true number is therefore (2^13) - 2 = 8190 and the range 172.16.64.1 - 172.16.95.254.

Make any sense?!

Mathew

Author:  Hig [ Fri Feb 05, 2010 3:15 pm ]
Post subject:  Re: Subnetting Explanation

haha, you make so much more sense then my book does!

i asked my IT Tutor today and he couldn't help because he didn't bother learning subnetting :rollin He said it has always been given to him so he never had to sort it lol!

When it comes to 2^9 would you have like 255.255.255.128 as the subnet? So you basically start again for the next range? (Thats on a class B address btw)

Thanks for that bud, that explanation is being printed off and stuck over the explanation in that silly book lol!

Can you explain the IP addresses a bit more? Just that I can't get my head round which IP address to use lol

Thank you again btw :) (God help me when I start supernetting :rollin)

Author:  mjnewton [ Fri Feb 05, 2010 4:18 pm ]
Post subject:  Re: Subnetting Explanation

Hig wrote:
When it comes to 2^9 would you have like 255.255.255.128 as the subnet? So you basically start again for the next range? (Thats on a class B address btw)

Spot on, although if you're just starting out I'd only worry about staying within the octet boundaries as exams would have to be rather mean not to do so at this level.

Quote:
Can you explain the IP addresses a bit more? Just that I can't get my head round which IP address to use lol

Sure. Which bit?

Quote:
Thank you again btw :) (God help me when I start supernetting :rollin)

You'll get there - you just need to practice and once you think you've got it practice some more. One day you'll find it just clicks, but I dare say most people give up before they get there so if you persist you'll be streets ahead than most (your tutor's example being a case in point!).

Mathew

Author:  Hig [ Fri Feb 05, 2010 4:58 pm ]
Post subject:  Re: Subnetting Explanation

I've already done my exams and that ... I'm just doing this as I want to get me head round it lol, this is for my own benefit mainly, figure I may need it at some point lol!

But I agree, you really do have to persist with it

All I'm a bit lost with is the "Mask Bits" and where you start with the IP addresses and that, such as the choice of such addresses:

172.16.0.0/27
172.16.32.0/27
172.16.64.0/27
172.16.96.0/27

oh hang on 32 is the number of subnets, so you go up in 32's ... erm, right I'm guna have to read over all the above, talkin it out is really helpin it make sense in me head :D Let me read thorugh it again lol :rollin

Author:  Hig [ Fri Feb 05, 2010 5:07 pm ]
Post subject:  Re: Subnetting Explanation

right few things I think:

how did you calculate the IP address range?

Quote:
The true number is therefore (2^13) - 2 = 8190 and the range 172.16.64.1 - 172.16.95.254.


just wondering what sum you used to add all that together lol!

Secondly, the mask bits thing as said above, where does that come from lol!

And you know the "172.16.32.0/27" address, well how du calculate the /27

Thanks again for all this help btw, I'm determined to get me head around subnetting lol, none of our exams went into this much detail though unfortunately :(

Author:  mjnewton [ Fri Feb 05, 2010 5:52 pm ]
Post subject:  Re: Subnetting Explanation

Hig wrote:
All I'm a bit lost with is the "Mask Bits" and where you start with the IP addresses and that, such as the choice of such addresses:

172.16.0.0/27
172.16.32.0/27
172.16.64.0/27
172.16.96.0/27

oh hang on 32 is the number of subnets, so you go up in 32's ...

No, the 32 is the block size i.e. if we're going to split the third octet into 8 sections then the block size is going to be 32 (there are 8 x 32's in 256). You calculate the block size with 256-mask, i.e. 256-224 = 32.

The address range for each subnet is just the first address going up to the one before the next subnet.. e.g. for subnet 172.16.32.0/27 above we've got...

172.16.32.0
172.16.32.1
172.16.32.2
.
...missing lots out...
.
172.16.32.255
172.16.33.0
172.16.33.1
.
...missing some more out...
.
172.16.63.254
172.16.63.255

Hence, 172.16.32.0 - 172.16.63.255.

However, in practice we cannot use the first or last addresses so it becomes 172.16.32.1 - 172.16.63.254.

The /27 notation is called CIDR-notation and is just an alternative way of representing the mask.

So, for 255.255.224.0, this is written in binary as:

11111111.1111111.11100000.00000000

The first 27 bits are 1's hence we have /27.

Mathew

Author:  Hig [ Fri Feb 05, 2010 7:21 pm ]
Post subject:  Re: Subnetting Explanation

of course lol! sorry, shouldo got that right really lol :rollin

I think now am guna have to go and research binary and get a better understanding of that lol!

Thank you so so much for explaining this to me, it has been so so helpful! :D

Author:  mjnewton [ Fri Feb 05, 2010 8:35 pm ]
Post subject:  Re: Subnetting Explanation

You're welcome - I'm more than happy to help as I know first hand how it can really make you pull your hair out trying to figure it out!

Mathew

Author:  Hig [ Fri Feb 05, 2010 9:11 pm ]
Post subject:  Re: Subnetting Explanation

haha, well am guna have a go at configuring the home network to see if I can get it to work, it probably wont on such a small network but who knows lol :rollin

Author:  Hig [ Fri Feb 05, 2010 9:39 pm ]
Post subject:  Re: Subnetting Explanation

right, seein as tho the forums bein disconnected I have copied all of this into a word document lol :)

Author:  Jrp210 [ Sat Feb 06, 2010 12:53 am ]
Post subject:  Re: Subnetting Explanation

You clever gits :lol I always wonderd what the subnet was and it still don't know after a reading that. Good luck with it hig.

Author:  StevieD [ Sat Feb 06, 2010 11:24 am ]
Post subject:  Re: Subnetting Explanation

It takes some getitng used to thats for sure. Trouble is these days people are using variable length subnet masking (VLSM) and IPv6...wait until you get into that it'll be a nightmare to get your head around (was for me anyway with good subnetting knowledge). It looks like mjnewton has given a good example there. If you want a copy of ICND1 CBT Nuggets which are instructional videos (allbeit american) and shows you VLSM to, chuck me your address and ill post you a copy on disk. I used it before taking the CCNA exam and was really useful as i had been out of the network acadamy for a year, and if you dont use it you forget

Author:  Hig [ Sat Feb 06, 2010 4:50 pm ]
Post subject:  Re: Subnetting Explanation

I think I shall get a PM sent, nice one bud :)

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/