Understanding Subnetting

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
Morning guys,

I have a problem with subnetting and since I got such great help understanding Binary maths I though I'll give this a go on here again.

I have the following problem:

Let's say I have an IP address: 192.16.128.16 (example) does this mean, the hub will be using the IP address which I then need to subnet to accomodate more PC's on the same IP address?

I'm having trouble understanding what Subnetting is used for. I can understand that it's being used to make an IP address bigger so to speak where you can connect more PC's on a single IP but with a subnet of it's own. I understand it as being a street address.

Let's say there is a complex at 1 Clive street (IP address) however at that address there is 30 different units with their own unit number.

Or am I sitting the pot miss :D
 

Drake2007

Expert Member
Joined
Oct 23, 2008
Messages
4,413
Let's say I have an IP address: 192.16.128.16 (example) does this mean, the hub will be using the IP address which I then need to subnet to accomodate more PC's on the same IP address?

You're sitting the pot miss.

Short answer:
IP's consist of the network address and the node address depending on the Class ( A, B, C), we're subnetting not subnode'ing.
The only way PC's can use the same external IP address (WAN) is with NAT, commonly comes with routers and ICS also does this.

Hub using the IP address? :confused:
 
Last edited:

Kroks

Well-Known Member
Joined
May 27, 2009
Messages
158
Simple terms

To put subnetting in simple terms, (verry simplistic, so don't complain too much)
The IP Address is the "phone number" of the computer.
The subnet states where in what "area" that "phone number" exists, and who is it's neighbours.

Example.

a p.c. has the IP address if 192.168.0.10 and subnet of 255.255.255.0
What this means is that any computer with the IP range if 192.168.0.1 to 192.168.0.254 will be local. So to get to it means it is directly connected to the same network (assuming it was setup correctly).
If the computer wants to go to IP Address 192.168.1.1 then it will have to go to the gateway. The gateway will know how to connect to 192.168.1.1 (assuming again that the setup was done correctly)
By chainging the subnet of the computer, the possible abount of neighbours increase, according to what it is changes to.
Example, if the subnet is changes to 255.255.0.0 then the possible neigbours will be in the range of 192.168.0.0 to 192.168.255.255, thus only if the destination falls outside of that range will the computer go to the Gateway to go to that IP Address.

This is a verry simplistic view of IP Addressing, it will be enough info for a "user" to understand the concept, but IP Addressing is a lot more complex than stated above.
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
You're sitting the pot miss.

Short answer:
IP's consist of the network address and the node address depending on the Class ( A, B, C), we're subnetting not subnode'ing.
The only way PC's can use the same external IP address (WAN) is with NAT, commonly comes with routers and ICS also does this.

Hub using the IP address? :confused:

That came out wrong :eek:

Where the street would be a network 192.16.128. the router would be the interchange between streets.

What I understand from subnetting is the following:

Lets say the IP address for a network is 192.16.128.64 this is a class C network meaning the default mask is 255.255.255.0 or /24.

11000000.00010000.10000000.01000000
11111111.11111111.11111111.00000000

That part I got.

Now the part that is confusing me is where they break it up into Network/Mask/Hosts

The network I see as the first 3 octets 196.16.128.XXX the subnet mask has open in the last octet right?

Meaning 196.16.128.1 - 254 is available to the same network.
My problem is that there seems to be a way indicating the increments and number of hosts, but I can't put my finger on it......
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
lol,

nvm I was confusing myself now :D

This is what I have and it seems to be getting pretty easy and clear now.....

192.16.128.64 - Class C - 255.255.255.000

Now if I go past the default mask then I am subnetting (Correct?)

The above is all on one network and all is perfect, however when I do:

192.16.128.64 255.255.255.192

Then I am subnetting:

11000000.00010000.10000000.01000000
11111111.11111111.11111111.11000000

Bit possition in the last octet is 64 (The last 1 in the binary for the mask) meaning I will have subnets in increments of 64

[0 - 63] [64 - 127] [128 - 191] [192 - 255]

This means there is 4 subnets through the range 0 - 255

Now the only thing that is still messing me around is the number of hosts available on the network within that ranges. Now if I use 2^H-2 where H is the amount of zeros in the last octet in the mask it will be 2^6-2 = 34

Does that mean I can only create 34 hosts per Subnet?

EDIT: nvm, got the calculation from 2^6-2 is 2x2x2x2x2x2 = 64 - 2 = 62 per subnet, and this is because the first and last ID can't be assigned as it's broadcasting and NetID's :D

I think I've got it now :p
 
Last edited:

Drake2007

Expert Member
Joined
Oct 23, 2008
Messages
4,413
Now if I go past the default mask then I am subnetting (Correct?)
nvm, got the calculation from 2^6-2 is 2x2x2x2x2x2 = 64 - 2 = 62 per subnet, and this is because the first and last ID can't be assigned as it's broadcasting and NetID's :D

I think I've got it now :p

Yes, if you go past the default mask then you're subnetting. It really only makes any sense when you work it out in binary, but I think you've got it now :p

An easier analogy is to think in telephone numbers and exchanges, also DNS is covered with Telkoms Phone book.
 
Last edited:

Conradl

Expert Member
Joined
Dec 10, 2008
Messages
2,629
You getting there! I used to be an N+ trainer and the guys always struggled with subnetting....
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
One thing I missed during subnetting was the "interresting" octet

I assumed that the default mask per class would just be extended and the last octet would change as per the intervals set out in the subnet mask.

Wish I knew this earlier :p

So if I understand it correctly now, you work with the octet in which the last 1 is at.

As an example:

10.0.0.0 - 255.0.0.0

so if the mask was then created to be 255.224.0.0
The subnet increments would apply to the second octet being 10.0.0.0 (increment is 32)
so 10.0. - 10.31. would be one subnet and 10.32. - 10.63. would be the second. Not taking hosts into account now.

Am I right so far?

Same applies if I was to break it down smaller then I would just extend the mask to lets say 255.255.255.128 thus making the subnet smaller and the increments would apply to the 4th octet.

Damn I hope I have it right now, because that would make my understanding of subnetting soooooo much easier :D

Pls note, the above is just pure simple examples. Forget about reserved IP's and so on :p
 

syntax

Executive Member
Joined
May 16, 2008
Messages
8,655
correct, the subnet mask just separates the ip address into network and host. Just to complete your example properly, the 10.0.0.0 with mask of 255.255.0.0 (sometimes written as /11) would then have hosts from
10.0.0.0 to 10.31.255.255
get used to using / notation as well. The /notation refers to number of bits used in the subnet, ie 255.0.0.0 would be /8
 

Pitbull

Verboten
Joined
Apr 8, 2006
Messages
64,307
correct, the subnet mask just separates the ip address into network and host. Just to complete your example properly, the 10.0.0.0 with mask of 255.255.0.0 (sometimes written as /11) would then have hosts from
10.0.0.0 to 10.31.255.255
get used to using / notation as well. The /notation refers to number of bits used in the subnet, ie 255.0.0.0 would be /8

Yea, been learning it in the dash notation just tried to write in out in full to try and clarify my understanding of it :)

I feel like going out and celebrating now tbh :D It didn't make sense to me seeing the different subnet masks and I was killing myself trying to figure out what I'm missing, and then it was like a light just went on in my head and I've got it now :)
 

ponder

Honorary Master
Joined
Jan 22, 2005
Messages
92,823
It didn't make sense to me seeing the different subnet masks and I was killing myself trying to figure out what I'm missing, and then it was like a light just went on in my head and I've got it now :)

Priceless expression and you can see it in a persons face. Used to see this while lecturing, initially there is this dull/dof look in the eyes but when they catch on you can almost see the light shining in their eyes :D
 
Top