Subnetting
goldorak
Member Posts: 23 ■□□□□□□□□□
in CCNA & CCENT
Something i want to make sure i understand:
1. 172.16.0.0 subnet mask 255.255.0.0 or /16
That should gives me:
14 or 16 possible subnets :2^4 (-2 if not using all ones and all zeros)
2. 192.168.0.0 sub mask 255.255.255.0 or /24
= 254 possible subnets with 254 hosts / subnet
If you guys say yes to both the above, that makes subnetting snap into place nicely.
Then just a matter of learning sequences by heart.
Thank you
1. 172.16.0.0 subnet mask 255.255.0.0 or /16
That should gives me:
14 or 16 possible subnets :2^4 (-2 if not using all ones and all zeros)
2. 192.168.0.0 sub mask 255.255.255.0 or /24
= 254 possible subnets with 254 hosts / subnet
If you guys say yes to both the above, that makes subnetting snap into place nicely.
Then just a matter of learning sequences by heart.
Thank you
Goldorak
~~~~~~~~~~~~~~~~~~~~~
A little knowledge is dangerous...
~~~~~~~~~~~~~~~~~~~~~
A little knowledge is dangerous...
Comments
-
Webmaster Admin Posts: 10,292 AdminThe examples you mentioned are not examples of subnetting, in both cases there is only 1 possible 'subnet' (the entire network range, hence not a subnet).
Your second example would be correct if it would use a class B network addres, ie. 172.16.0.0. -
halflife78 Member Posts: 122I'm not a good explainer so bear with me but I think you are slightly confused on the above.
Let's look at this first:
1. 172.16.0.0 subnet mask 255.255.0.0 or /16
That should gives me:
14 or 16 possible subnets :2^4 (-2 if not using all ones and all zeros)
The first important piece of information here is the actual IP address. We can determine from the information given that this is an un subnetted class B address. I can determine this by the subnet mask and the /16. IP addresses are divided into 2 parts, network bits and host bits. The /16 or the / portion is telling you how many network bits you have. The above IP address is basically 1 subnet or range with 65534 host available (65534 came from 2^16 - 2 which is 16 bits on the host portion minus the network and broadcast ).
Ok...say you needed 14 useable subnets with 4000 avialable IP's per subnet. You are borrowing bits from the host portion which has 16 available. You follow the format of 2x2x2x2 - 2 or 2^4 -2=14. So borrowing 4 bits will give you your 14 subnets. Well, you need to check and make sure you have 4000 avialable IP's per each subnet so you go 2x2x2x2x2x2x2x2x2x2x2x2 -2 or 2^12 - 2 gives you 4094 per subnet (a quick trick here, you borrowed 4 bits remember, you have 4 bits left in the 3rd octet and 8 left in the 4 after borrowing, so you can take and shorten the above by going 2x2x2x2x256....256 being the unused last
octet, so you can quickly go 16x256-2=4094 to get a quicker answer).
Ok...remember you borrowed 4 bits, how does that fit into the / or subnet mask then. Well, before you had 16 bits on both sides of the IP, 16 for network (left side) and 16 for the host side (right side). You borrowed 4 bits from the host side, so you have to take those 4 bits and add them to the network side. So now your subnet mask will be 255.255.240.0 or /20 (/20 because you have 4 extra bits on the network portion and 255.255.240.0 because you have to add the 11110000.00000000 or 4 bits you borrowed into the subnet mask)
Quick second class B example, you have the same setup:
1. 172.16.0.0 subnet mask 255.255.0.0 or /16:
You need 250 subnets with 250 host per subnet, you borrow 8 bits (2^8-2=254 for both the subnets and host) which gives you a subnet mask of 255.255.255.0 or /24.
Let's do a Class C real quick, let's use this IP below and an example:
200.5.5.0 /24 or subnet mask of 255.255.255.0
Your Designing a network that needs 14 subnets and 14 host per subnet. you need to borrow 4 bits (2^4 - 2=14) which leaves you with 4 host bits (2^4 - 2=14). So Tis would meet your requirement. As for your subnet mask you borrowed 4 into the last octet so you end up with a subnet mask of 255.255.255.240 (11110000 <---the 4 1's being your borrowed bits on the last octet) or 200.5.5.0 /28.
Sorry that this is wordy, I am not a good person for explaining stuff, webmaster if you see anything wrong in this correct me, I may have some wording wrong. Let me know if this confuses you more or if you have anymore quesitons. -
goldorak Member Posts: 23 ■□□□□□□□□□OK,
That's what i feared:
Let's start at the beginning.
Private class B address
172.16.00 /12 that means 172.16.0.0 to 172.31.255.255
When i make the above /16, i am borowing 4 bits - right?
Private class C address
192.168.0.0 /16
When i make the above /24, i am borrowing 8 bits - right?
Tell me if that is correct
Thank youGoldorak
~~~~~~~~~~~~~~~~~~~~~
A little knowledge is dangerous... -
halflife78 Member Posts: 122BTW, if you are asking this for Network+ this is way too in detail for what you need to know for Network+. Network+ wants you to mainly know which IP address is for which class if I remember correctly, not how to subnet.
To remember which class is what an easy way is to do this:
And IP address has 8 bits per octet. I am sure you know that each bits has a numerical value, 128,64,32,16,8,4,2,1 so:
Class A addresses begin with 0xxx, or 1 to 126 decimal.
Class B addresses begin with 10xx, or 128 to 191 decimal.
Class C addresses begin with 110x, or 192 to 223 decimal.
Class D addresses begin with 1110, or 224 to 239 decimal.
Class E addresses begin with 1111, or 240 to 254 decimal. -
2lazybutsmart Member Posts: 1,119goldorak wrote:OK,
That's what i feared:
Let's start at the beginning.
Private class B address
172.16.00 /12 that means 172.16.0.0 to 172.31.255.255
When i make the above /16, i am borowing 4 bits - right?
A /12 isn't possible on a Class B network is it? Remember, you're "borrowing" from the "host bits" ok, not the network bits.
By default, you would have 16 bits to play with when using a class B network. Now, when you "subnet" those 16 bits, you're cutting the hosts bits down into groups of subnetworks or subnets.
So the first valid subnet mask for a class B network would start from stealing one bit for the network portion, thus having 17 bits for the network portion. Now the only way you would be borrowing 4 bits from the host portion is to use the origional 16 bits plus the 4 you borrowed which gives you 20 bits. So a /20 subnet mask would mean you were borrowing 4 bits from the network portion of the IP address.Private class C address
192.168.0.0 /16
When i make the above /24, i am borrowing 8 bits - right?
Tell me if that is correct
Thank you
Likewise, a /16 isn't possible on a Class C network either. You only have 8 bits to use for hosts in a Class C network, so that would mean starting from 24 bits.
And, you can't borrow 8 bits when you're subnetting a Class C network. You need at least 2 bits to define hosts, so that would leave you 6 bits for subnetting. So a subnet mask larger than a /30 is a no no in class C.
Don't forget the default masks for the different classes.
Class A. 255.0.0.0 (24 bits available for hosts, and no more).
Class B. 255.255.0.0 (16 bits available for hosts, and no more).
Class C. 255.255.255.0 (8 bits available for hosts, and no more).
HTH
2lbs.Exquisite as a lily, illustrious as a full moon,
Magnanimous as the ocean, persistent as time.