Categories
SysAdmin Technology

Subnetting and CIDR, a Pain in the Ass Worth Knowing

When it comes to networking, CIDR and subnetting are not something I’m particularly good or fast at because I haven’t bothered to memorize the most popular subnets – things like /22, 255.255.248.0 and blah. I was taught to work it out in binary, which is a pain in the ass, but correct. So because I tend to not memorize things I can work out, it fell into that category in my head, and has just never stuck. I do absolutely understand the concepts though.

I had a telephone interview with Google years ago where they asked me how many usable IP addresses there were in a certain subnet. I think I looked at the ceiling for a second, gave a hmmm, and just guessed an answer – it felt like the pressure was on providing a fast answer off the top of my head rather than a worked-out one, which was the wrong approach and a mistake. I was ill-prepared for that whole interview anyway and at the very least I should have had a pen and paper with me so I could walk through the process, which I do know. Or perhaps I only know it now because of that experience.

Either way, the point is subnetting is methodical and whether you can spit subnet ranges off the top of your head or do it with a binary calculator it doesn’t matter. Just be right. Or know how to find it on the Internet. And be sure to know how it works so you can prove you’re right when people say you’re wrong – I regularly bump heads with network engineers who’ve never managed to comprehend the underlying composition of subnets, hosts and subnet masks and then I have to try to very diplomatically teach them one of the basics of their profession. The Wikipedia page is most of what you need.