I had the luxury of taking a work-paid-for course. One of the recommendations for subnetting; before actually starting the exam (ie, hitting "GO" or whatever the start-of-time button is on the computer), write-out on the glossy paper a braindump of subnetting.
The course gave us a model that is liked, but I've adapted it in a way that suits me.
I organize from bottom to top and from right to left. This may seem counterintuitive, but since the number of digits on the leftmost column gets rather large, this ensures that if I start at the bottom corner of my test-site-issued sheet that I won't run out of room.
First label for eight columns.
from the right, the column headings are subnet mask, nets in class, Class-C spanning two columns with subcolumns for CIDR and Hosts+2, Class-B spanning two columns for CIDR and Hosts+2, and then Class-A spanning two columns for CIDR and Hosts+2. Then right, from the bottom up, the possible values of a subnetmask octet, starting with 255 and working toward 128. Then add 256 above 128, as a placeholder.
As so:
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
| | | 256
| | |
| | | 128
| | | 192
| | | 224
| | | 240
| | | 248
| | | 252
| | | 254
| | | 255
Then, from the bottom up, fill in the number of networks for a given subnet mask:
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
| | | 256
| | |
| | | 128
| | | 192
| | | . 224
| | | /|\ 240
| | | | 248
| | | 252
| | | 128 254
| | | 256 255
which will leave you with this;
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
| | | 1 256
| | |
| | | 2 128
| | | 4 192
| | | 8 224
| | | 16 240
| | | 32 248
| | | 64 252
| | | 128 254
| | | 256 255
With the "1" next to the 256, you see why I include the 256 in the subnet mask, but with a gap to indicate that it's special.
Continuing, start filling-in the Class-C columns. Start with the easy one, the CIDR notation, with 32 at the bottom, working up:
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
| | | 1 256
| | |
| | | 2 128
| | . | 4 192
| | /|\ | 8 224
| | | | 16 240
| | | 32 248
| | 30 | 64 252
| | 31 | 128 254
| | 32 | 256 255
Until you reach the top:
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
| | 24 | 1 256
| | |
| | 25 | 2 128
| | 26 | 4 192
| | 27 | 8 224
| | 28 | 16 240
| | 29 | 32 248
| | 30 | 64 252
| | 31 | 128 254
| | 32 | 256 255
Then start on the number of addresses, including the network address and broadcast address, in a given network. That's why I labelled it Hosts+2, because you need to remember that this is the size of the network and the
increment, not the number of usable addresses:
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
| | 24 | 1 256
| | |
| | 25 | 2 128
| | . 26 | 4 192
| | /|\ 27 | 8 224
| | | 28 | 16 240
| | 29 | 32 248
| | 4 30 | 64 252
| | 2 31 | 128 254
| | 1 32 | 256 255
The best way to remember the values is that they are powers of two. 2 to the zero is 1. 2 to the 1 is 2. 2 to the 2 is 4. You multiply the existing number by 2 to get the next number. If you are up to 4, 2x4 is 8, 8x2 is 16, 16x2 is 32, etc.
A fully-completed column will look like this:
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
| | 256 24 | 1 256
| | |
| | 128 25 | 2 128
| | 64 26 | 4 192
| | 32 27 | 8 224
| | 16 28 | 16 240
| | 8 29 | 32 248
| | 4 30 | 64 252
| | 2 31 | 128 254
| | 1 32 | 256 255
Now, the cool thing about this is that the top row of numbers above the gap you have the size of a network for a given class, and the CIDR mask for that class.
Continue filling out the Class-B columns. Do the CIDR column first. You grab the top number (ie, 256 and 24) and put that at the bottom of the new class, and remember, 256, 512, 1024, 2048, 4096, etc for the size of a given network:
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
| 65,536 16 | 256 24 | 1 256
| | |
| 32,768 17 | 128 25 | 2 128
| 16,384 18 | 64 26 | 4 192
| 8,192 19 | 32 27 | 8 224
| 4,096 20 | 16 28 | 16 240
| 2,048 21 | 8 29 | 32 248
| 1,024 22 | 4 30 | 64 252
| 512 23 | 2 31 | 128 254
| 256 24 | 1 32 | 256 255
Finally, you come to the Class-A network. For me, up until this column I have all of the sizes memorized, as computers use powers of two for memory as well, and I've had computers with 8MB (8192k), 16MB (16384k), 32MB (32768k), and 64MB (65536k) memory, and seeing the POST screen memory test has made remembering these easy. Unfortunately for me and probably for a lot of other people, we eventually reach a point where we haven't had to use the biggest powers of two.
Fortunately, the previous-times-two still applies. Fill out the CIDR values, then take the top number from the Class-B column and put it at the bottom of the Class-C column...
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
8 | 65,536 16 | 256 24 | 1 256
| | |
9 | 32,768 17 | 128 25 | 2 128
10 | 16,384 18 | 64 26 | 4 192
11 | 8,192 19 | 32 27 | 8 224
12 | 4,096 20 | 16 28 | 16 240
13 | 2,048 21 | 8 29 | 32 248
14 | 1,024 22 | 4 30 | 64 252
15 | 512 23 | 2 31 | 128 254
65,536 16 | 256 24 | 1 32 | 256 255
...and start doubling. 131072, 262144, 524288, 1048576, etc, util you get the following completed chart:
Class A | Class B | Class C | nets sub
| | | in net
H+2 CIDR | H+2 CIDR | H+2 CIDR | class mask
| | |
16,777,216 8 | 65,536 16 | 256 24 | 1 256
| | |
8,388,608 9 | 32,768 17 | 128 25 | 2 128
4,194,304 10 | 16,384 18 | 64 26 | 4 192
2,097,152 11 | 8,192 19 | 32 27 | 8 224
1,048,576 12 | 4,096 20 | 16 28 | 16 240
524,288 13 | 2,048 21 | 8 29 | 32 248
262,144 14 | 1,024 22 | 4 30 | 64 252
131,072 15 | 512 23 | 2 31 | 128 254
65,536 16 | 256 24 | 1 32 | 256 255
So, from this chart, you can see that there are 16,777,216 addresses in a Class-A. You have a visual cue to reduce by two for the number of usable addresses in a single block to 16,777,214. You know it's a /8.
The extra part that I added is the "nets in class". So, you want to take a Class-B, and cut it in half. Find the 2 in the nets-in-class column, and scroll right to find the Class-B column. You end up with 32768 addresses, /17. The interesting octet for a Class-B is 128 for this split. Or, you need 50 hosts. You find the where Hosts + 2 is just greater than 50. So, 64 is the next number bigger than 52 (hosts +2) and is a Class-C. You find out that the interesting octet of the subnet mask is 192, or 255.255.255.192. You see that there can be four networks in a Class-C this large.
I played with this on a whiteboard before I ever typed it up. The picture is as follows:

The little ticks above some of the numbers in the Class-A column are where I was carrying the one as I was multiplying the previous number by two.
Hopefully this'll help you out. It's perfectly acceptable to chart your subnetting before you start the clock on the test, so whatever method you choose, make sure to write it down.