Sie sind auf Seite 1von 2

danielmiessler.

com | study | Understanding Subnetting

http://danielmiessler.com/study/subnetting/

Blog | W riting | Study | Projects | Arguments | About | Contact | Syndication

Understanding Subnetting

Top
. A tcpdump Tutorial . Tech Hiring Lessons Learned . A lsof Introduction . A git Primer . A Security-focused HTTP Primer . Vulnerability Assessment vs. Penetration Test . WebAppSec Testing Resources

Arguments
. Evolution is True . Free W ill: Two-lever Argument . more...

I would rather understand subnetting than simply remember the number of hosts in a /25 network. References that show you every combination are cool, and I'll include one below, but the focus of this page is to help you understand subnetting instead of showing you a cool chart. I'll give a hint: It's all about the binary.

Projects
. Conceptualizing the Classics . Ideas . Vocabulary . An Atheist Debate Reference . Concepts . more...

. Infosec Interview Questions

Popular
. >W hat You Learned in School About Airplane Flight Was Probably Wrong . 10 Things Everyone Should Know About the Middle East . The find Command . The lsof Command . Security and Obscurity Revisited

Collections
. Quotes

Information Security / Technology


. My Preferred Definition of Information Security . The Diffie-Hellman Protocol . Differences in SYN Packets . The Birthday Attack Explained . Mac vs. PC Security in One Sentence . A UNIX/Linux Permissions Refresher . Cross Site Scripting Explained . A tar Reference . A Security/Obscurity Experiment . Expect More Human-Based Infosec Attacks . CISSPs Do Need to be Technical . The Under-appreciated Danger of Password Reset Mechanisms . Encoding vs. Encryption . An lsof Tutorial . The Nmap/Dshield Trick . Using Splunk as a Syslog Server . Thinking Through Subnetting . Explaining Network Ports

. Jokes . Grammar . Movies

Twitter
. @securityninja @markofu @comerford Awesome, I look forward to reading your post, and potentially discussing any points we differ on. . @markofu @securityninja @comerford I agree that's too simplistic; that's why it was included in an entire article and not by itself. . @securityninja @markofu @comerford We don't only hire grads, nor do we advocate that practice. That wasn't what was said. . Vocal Fry Creeping Into the Speech of American Women | http://t.co/hIwcMGjF . A major advantage of using Google+ on OS X is that iChat's GTalk integration suddenly provides a significant IM client. . One of the best UFCs ever.

Politics
. Free W ill and Determinism as the Core of Political Disagreement . Conservatives are Leave it to Beaver, Liberals are Star Trek

What I'm Reading


. The Quotable Hitchens . Game of Thrones: Book 2 . How the Mind Works . Class: A Guide Through the American Status System . Web Application Hacker's Handbook, Second Edition . Arguably (Christopher Hitchens) . Lord of the Flies . Lying (Sam Harris)

[ Here's the link to the image itself. ] The chart isn't particularly special; there are many out there that are similar, but most of them are aimed at giving you instant results. The concept for my chart is to be able to understand how we arrive at the various numbers by thinking it through. The answer is startlingly simple: you just use the binary steps at the top as your guide for each lateral movement. For example: For a /25 you start in the 128 place (one extra bit to the right). That's your subnet. You have 2 networks, each with 126 hosts in them. If you want to go another bit to the right (/26), you're going to add the binary number for that column to 128, which is 64. So, 128 + 64 = 192. That's your subnet. And since you've gone to the right one -- and you were at 2 networks, you now have double that number of networks (remember, each slide is an exponent of two, i.e halving). So you now have 4 networks, each with half the number of hosts in them (64 - 2 = 62). So that's the secret. You slide back and forth on the binary scale; as you go to the left you go up one exponent of 2 in networks, while simultaneously going down one exponent of 2 in hosts. Another way to say that is that for each bit slide to one side you double either the number of networks or hosts while halving the other. So at one position your networks are 2 and your hosts are 128, and when you go to the right your networks are 4 and your hosts are 64 (-2). If you went to the right instead you'd be at the /24 mark, and guess what? Hosts go UP from 128 to 256 (doubled), while the network goes DOWN from 2 to 1 (halved). One network of 256 (-2) hosts, just like we would expect.

. Socialism and Anarchy . On CFR/NW O Conspiracies . The Worst Mistake People Make in Political Arguments . How to Debate an Idiot

Philosophy & Religion


. An Atheist Debate Reference . Meaning is an Illusion . The Best Response to "Atheists are arrogant". . The Only Class That Matters . Free W ill: Absolute vs. Practical . A Simplified Argument Against Free W ill . Happiness: Creation vs. Collection . Want: A Disease Based in Low Self-Esteem . How to See If Your Morality Comes from God . Outrageous Beliefs Are Not Equal to Claims They Are False . Was the Last Time Your Last? . How I Became an Atheist . A Letter to Religious Moderates . Philosophy, Science, and Religion: Three Ways of Learning About the World

Favorite Books and Essays


. The Ethics of Belief, W illiam Clifford . W hy The Future Doesn't Need Us, Bill Joy . W hat I Believe, Bertrand Russell . The Moral Landscape, Sam Harris . God is Not Great, Christopher Hitchens . 1984, George Orwell

Top Blog Categories


. Politics . Technology . Information Security . Philosophy

Technology & Science

1 sur 2

14/12/2011 19:51

danielmiessler.com | study | Understanding Subnetting

http://danielmiessler.com/study/subnetting/

. Programming . The Steam, Water, and Ice of . System Administration . Education . Culture . Atheism . Music . Writing . Geek . Health . Apple

My chart only covers the class C range, but here's my favorite full reference from layertwo.net. Try using the concept above on some class B or A ranges; it's all the same stuff. The key is that whether you're doing a class A, B, or C it's still just a matter of sliding back and forth along the binary scale.

Modern Communications . Social Media as a Personal API . Could You Prove Evolution? . How to Pronounce "Linux" . My Only Shot at Immortality . How to Pronounce "Ubuntu" . Does Acceleration Depend More on Horsepower or Torque? . The Craziest Thing You'll Ever Learn about Pi . How to Pronounce "OS X" . How to Pronounce "Rijndael"

Inputs
. Overcoming Bias . The Last Psychiatrist . The Big Questions . Less Wrong . Arts & Letters Daily . Scott Adams . Gene Expression . AZSpot . NPR's Intelligence 2 . Philosophy, et cetera . Meteuphoric . Roissy in DC . Freakonomics Blog . W ill W ilkinson . The Rational Optimist . Cosmic Variance . Practical Ethics . Barking Up the Wrong Tree . Reddit*

Culture & Society


. Lifecasting and Society . Please Submit Your Own Content to Social Media Sites . The Bimbo and the Caveman . Is it W rong to Have Children? . The Quality Of a Society . Socialism and Anarchy

Miscellaneous
. A Coffee Primer

So the next time you're having trouble with doing subnets in your head or on paper, try drawing my chart first (binary, bits, subnets, networks, hosts) and remember the binary sliding concept before looking at the full reference chart shown above. I think you'll find it enjoyable to grok it rather than look it up. And as always, if you have any questions or comments you can contact me here.

. Hacker News . Arts & Letters Daily

Daniel Miessler | 1999-2011 | Share Alike Powered by Linode

2 sur 2

14/12/2011 19:51

Das könnte Ihnen auch gefallen