Thursday, November 19, 2009

Networking/Subnetting/Masking?

I am in a Networking class right now and subnetting has fallen upon us. I am having some serious trouble with this so I am asking if I can receive some help on how to figure this stuff out, Out professor gave us a sample problem and told us to see if we could figure it out. Here it is:





We have: 200.100.50.38





What is the network and type of network?





What is the subnet?





What is the node?





What is the mask?





How many bits would need to be borrowed for 15 subnets?





I don't want just the answers. I want to know how to get this information. Can you help?

Networking/Subnetting/Masking?
The subnet mask is an indicator of what part of the whole 32-bit IP address identifies the network, and what part identifies the device ("host"). (The "dotted decimal notation" using addresses like "200.100.50.38" is actually shorthand for a string of 32 binary bits -- in this case 1100100 01100100 00110010 00100110. A "mask" is likewise a string of 32 bits, but it's always a bunch of 1's, followed by a bunch of 0's.) The bits in the IP Address which correspond to the 1's in the mask identify the network, while the bits which correspond to the 0's identify the host.





Actually figuring out the masks take a fair amount of binary arithmetic, but I'll try to explain your example.





Class A networks start with numbers from 0 to 127, class B from 128 to 191, class C from 192 to 223. Your network is a class C. The network is 200.100.50, and with a default class C network, that's also the subnet. The default subnet mask for a class C network is 255.255.255.0 (or 11111111 11111111 11111111 00000000 in binary.) The node is the address of the host (without the network address), that is, 38.





Now if you're going to split up that default network into sub-networks, you use a "subnet mask" which indicates how many more bits are going to be used for the network. If you borrow N bits, you get 2 to the Nth power possible subnets. If you want 15 subnets, you find the lowest power of 2 which is greater than the number of subnets you want -- this is 2 to the 4th, or 16. So you borrow 4 bits. This would make your subnet mask 11111111 11111111 11111111 11110000 in binary, or 255.255.255.240 in dotted decimal. (This would leave 4 bits, or 16 addresses, for each subnet.)





Now just to complicate things, it turns out that you can't use all of the bits for subnets or hosts -- two of the subnets and two of the hosts are not allowed, so your answer to this question really depends on whether the professor specified "legal" subnets or not. If you need 15 "legal" subnets, then 4 bits won't cover it -- 16 - 2 = 14, so you need 5 bits borrowed, a mask of 255.255.255.248, and only 6 hosts (2 to the 3rd minus 2) per subnetwork.
Reply:as based upon the first octet.





0-126 CLASS A


127-191 CLASS B


192-223 CLASS C


224 and on is CLASS D and E (disregard for now since that applies to Multicast).








BUT you are assuming classful boundaries on the first part of the question.





The NODE is the actual IP in use, so you already have that answer, the subnet is going to be the numbers that represent x.x.x since this is a class C IP.


the subnet mask would also apply to the x.x.x.





so 200.100.50.0/255.255.255.0 would be the subnet and mask.





given that's a /24 network (class c etc..see the subnet mask above) . You want to have 15 subnets, BUT, that is an odd number in the grand scheme of things. The number of subnets you can have w/in that class C will either be, 2, 4, 8, 16, 64, 128, 192, 224, 240, 248.





The best way to deal w/ subnetting is to learn/master the /bit masks etc..


ie..


/24 == 255.255.255.0 == 11111111.11111111.11111111.0000000


/25 == 255.255.255.128 == 1's.1's.1's.10000000


etc..





so then you would want to do a 28 bit based subnet mask, ie...16 hosts per subnet, (that'd be a /28, and have a .240 mask in the 4th octet).





I would read up on the page below:


http://en.wikipedia.org/wiki/Subnetting


the key is just learning to speak in classless (/24, /14, /29 bit masks) and understanding that /24 == 255 hosts


/25 == 128 hosts


/26 == 64 hosts etc..so and so forth cutting the number in half per each increment up to 32 (32 bit being all 1's)..
Reply:Once you learn how it's done you can use this.





http://www.subnetmask.info/


No comments:

Post a Comment