said by HELLFIRE:You HAVE to know binary
I dont think you do, I think a lot of it can come down to simply remembering numbers. Eventually once youve done this enough its just a matter of recognising patterns.
e.g. to work out the answer I didnt use any binary at all, but I am working from years of experience here, so bear with me as I *try* explain this (I hope it makes sense, it is 2am here right now...)
The first set of numbers to remember are the number of hosts you can find in any subnet from /24 to /32, the number of /24's there are in any subnet from /16 to /23, and the number of /16's there are in any subnet from /8 to /15.
So this leaves us with:
256, 128, 64, 32, 16, 8, 4, 2, and 1.
And the second set of numbers are the subnet mask equivalents:
0, 128, 192, 224, 240, 248, 252, 254, and 255.
So we then need to try and turn a list of arbitrary subnets into a supernet address, and the way we do this is by using the this set of numbers to work out the smallest figure that will cover all of our subnet addresses.
In the OPs case, we are trying to work out the smallest number that will cover:
10.1.1.0/30
10.1.1.4/30
10.1.1.8/30
10.1.2.0/23
10.1.4.0/24
10.1.5.0/25
As the first and second octets are not changing, we know that we are working in the /16 to /23 range of subnets (the first octet covers /0 through /7, second octet /8 through /15, and 4th octet /24 through /32). Immediately we can start building a subnet mask, so we'll start with "255.255".
Now work out the smallest figure that will cover our list of subnets using the first set of numbers. We all know that 4 is going to be too small, as 10.1.5.0 falls outside of the 10.1.0.0 to 10.1.3.255 range, so we try 8.
10.1.0.0 through 10.1.7.255 covers all of our subnets just fine, so we add the subnet mask equivalent of 8 to our subnet mask, and we are left with "255.255.248".
Then we pad it out with zeroes till we get "255.255.248.0".
So this is our supernet mask, and were half way there. We now need to find the supernet address, and this only uses a little math. Since we know we are working in blocks of 8, we simply need to find the lowest multiple of 8 that covers all of our subnets.
In our case it happens to be quite simple, but what if we had a set of subnets like the following:
10.1.169.0/30
10.1.169.4/30
10.1.169.8/30
10.1.170.0/23
10.1.172.0/24
10.1.173.0/25
Looks pretty hairy...
But use some basic math like "8 x 20 = 160", well 160 is pretty close to 169. 160 + 8 = 168, and 169-173 falls nicely within 168 + 8, so the 3rd octet of our supernet address would be 168, giving us 10.1.168.0.
Converting the subnet mask above to a CIDR slash is relatively easily, its just counting backwards. Theres 1 x /24 in a /24, 2 x /24s in a /23, 4 x /24's in a /22 ... 8 x /24's in a /21. Bingo
10.1.168.0/21, or as in the OPs case, 10.1.0.0/21.
Granted, the above doesnt use any binary, and in a test situation they may want to see you use binary to work it out, so its probably worth knowing binary anyway.
Im sure absolutely none of the above makes sense (again it is 2am), but whatever I was trying to explain works for me and I can do this pretty quickly in my head - no pen, no paper, no binary.
There are many ways to do this, some things work for some people, others work for the rest. Its just a matter of finding the one that works for you. I use much of the above to also do subnetting in my head. Again its just counting and perhaps a little math.