<p dir="ltr">I am so embarrassed, I crossed up my 1's and 0's in my original post. Let me correct it now.</p>
<p dir="ltr">0... Is Class A. This is designed for the largest network providers. The subnet mask is 255.0.0.0. IP addresses in this range will start with a first octet less than 128. RFC 1918 reserves the 10.x.x.x network as unusable on the public internet.</p>
<p dir="ltr">10... Is Class B. These were designed for large corps and ISPs. The subnet mask is 255.255.0.0. IP addresses in this range will start with a first octet between 128 and 191. RFC 1918 reserves addresses 172.[16-31].x.x for private only use.</p>
<p dir="ltr">110... Is Class C. These were designed for most corporations and have a subnet mask of 255.255.255.0. IP addresses in this range will have a first octet between 192 and 223. 192.168.x.x again is reserved by RFC 1918 for private use.</p>
<p dir="ltr">1110... Is Class D. This is for multi broadcast networks and there is never used as a primary interface. You will often see these addresses used for things like NTP (Network Time Protocol) in broadcast mode. Addresses will have a first octet between 224 and 240.</p>
<p dir="ltr">Finally, there is 1111... Which is the "for future use" Class E, which never got used.</p>
<p dir="ltr">The subnet mask originally had a spec that allowed "wholes" in it. So according to the original spec, 255.240.255.0 could be a legit subnet mask. But the practical use for such a config never materialized, and most routers to this day still won't support it. So... All the ones end up on the left side of the mask, and all the zeros end up on the right. So a shorthand notation emerged called CIDR. In CIDR notation, you simply use a slash and the number of ones.</p>
<p dir="ltr">So, 255.256.255.0 = 11111111.11111111.11111111.00000000 counting the ones and you get /24.</p>
<p dir="ltr">The idea of an address and subnet mask are simple. Take your IP address and write it in binary. Take your mask and write it in binary. Doing a binary AND on the values gives you the Network address. Not the mask and do a binary AND, and you have the host address. A binary OR on the same values gives you the broadcast address.</p>
<p dir="ltr">Now to use all this fun info...</p>
<p dir="ltr">If Machine-A (i.e. a desktop) wants to talk to Machine-B (i.e. a web server) the Network addresses are compared and it they are the same, an ARP broadcast is used to identify that MAC address of Machine-B if it is not already known, so the machines can communicate directly with each other. If they are on different networks, the request is forwarded to your default gateway to be forwarded (aka routed) to it destination.</p>
<p dir="ltr">Now, if we use the standard Class C address (let's say 192.168.0.x/24) we have 256 possible addresses. All 0's is reserved for the Network, and all 1's is reserved for the Broadcast. So 254 can be used for actual machines. But what if I need more than 254 addresses? Let's say I am supporting a network with 800 machines. Now what? Well, stealing one bit from the Network and giving it to the host would allow me 510 addresses, and 2 Bits would give me 1022. So how do I steal those bits? Simple, declare my mask as /22 or 255.255.252.0. With this example you can see why CIDR notation has become so popular... Easier math. But, at the end of the day... It all means the same thing... It's all about the binary notation.</p>
<p dir="ltr">Sorry for my gaff, should have tried to reply while loading the car with groceries, lol</p>
<p dir="ltr">Kevin</p>
<div class="gmail_quote">On Aug 31, 2015 9:22 PM, "David Demland" <<a href="mailto:demland@cox.net">demland@cox.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I wrote this paper to help with my students when I am teaching Subnetting I<br>
hope that you might find this a different way to look at networking.<br>
<br>
David<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:plug-discuss-bounces@lists.phxlinux.org">plug-discuss-bounces@lists.phxlinux.org</a><br>
[mailto:<a href="mailto:plug-discuss-bounces@lists.phxlinux.org">plug-discuss-bounces@lists.phxlinux.org</a>] On Behalf Of<br>
<a href="mailto:parabellum7@yahoo.com">parabellum7@yahoo.com</a><br>
Sent: Monday, August 31, 2015 3:25 PM<br>
To: <a href="mailto:plug-discuss@lists.phxlinux.org">plug-discuss@lists.phxlinux.org</a><br>
Subject: Re: Understanding IP class range.<br>
<br>
<br>
> Very nice Kenn!!<br>
<br>
Thanks! Good to revisit this stuff from time to time, rattle the old<br>
brain-box and make sure there's still something in there! :)<br>
<br>
<br>
> Ok so if I had <a href="http://192.168.1.0/25" rel="noreferrer" target="_blank">192.168.1.0/25</a> the range would be 192.168.1.0 -<br>
> 192.168.1.127<br>
<br>
Yes.<br>
<br>
<br>
<br>
> /26 would be 192.168.1.0 - 192.168.1.192 ? or is it 192.168.1.0 -<br>
192.168.1.64 ?<br>
<br>
/26 would yield 192.168.1.0 - 192.168.1.63<br>
<br>
<br>
<br>
> Not sure how to make a net mask out of <a href="http://192.168.1.0/25" rel="noreferrer" target="_blank">192.168.1.0/25</a> - would it be<br>
255.255.255.128?<br>
<br>
Yes<br>
<br>
<br>
<br>
The calculator Daniel provided is good:<br>
<br>
<a href="http://www.subnet-calculator.com/cidr.php" rel="noreferrer" target="_blank">http://www.subnet-calculator.com/cidr.php</a><br>
<br>
<br>
The one kitepilot provided is also nice because it illustrates the full<br>
binary.<br>
<br>
<a href="http://jodies.de/ipcalc" rel="noreferrer" target="_blank">http://jodies.de/ipcalc</a><br>
<br>
<br>
They're neet to play with and better than others I've seen. I've bookmarked<br>
both, thanks for sharing these resources.<br>
<br>
<br>
--Kenn<br>
<br>
<br>
---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a> To subscribe,<br>
unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br>
<br>
<br>
-----<br>
No virus found in this message.<br>
Checked by AVG - <a href="http://www.avg.com" rel="noreferrer" target="_blank">www.avg.com</a><br>
Version: 2015.0.6086 / Virus Database: 4409/10551 - Release Date: 08/31/15<br>
<br>
<br>---------------------------------------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br></blockquote></div>