The key thing with subnetting is using the shortcut methods. Also practice, practice, practice!
Try subnettingquestions.com once you are able to answer the questions using the shortcuts it comes to you a lot easier. Practice converting to binary to decimal and over and over.
To find the range or increment number use 1 or both of the following:
If you have a subnet mask of 255.255.255.192 convert the "interesting octet" this case 192 to binary 1100 0000
The last 1 in binary from LEFT to RIGHT is the increment, which is 64.
Or the second shortcut is subtracting 256 from the interesting octet: 256 - 192 = 64
Now that you have the range you can start from 0 then increment by the "increment" number. 0
255 (broadcast for 192 subnet)
Note: "Never go above the 255"
Finding the range is easy once you have the increments.
Start with the subnet number and add 1
Then go to the next subnet number and subtract 2 for your last usable: 62
Your broadcast is 63, and your range is 1-62 usable.
If your IP's on your interfaces fall within this range you know that it is a usable IP, otherwise it is a broadcast or a subnet id.
Sometimes with IP's in the high number range it is easier to convert the "interesting octet" to binary and do the AND operation against its mask. This way you find the subnet ID faster if you are working with several subnets.
You have an ip of 192.168.200.2
mask of 255.255.252.0
If you did the shortcut you would come up with an increment of 4 in the third octet. Note always be mindful of what octet you are working in.
but instead of figuring out all the increments it's easier (imo) to convert to binary and do the AND equation. We are working in the interesting octet, 3rd octet.
200 = 1100 1000
Mask = 1111 1100
subnet id = 192.168.200.0
We know our increment of 4
First usable 192.168.200.1
Last usable = 192.168.203.254
Broadcast = 192.168.203.255
Next subnet 192.168.204.0
Routers today have this turned on by default but if it is not turned on the question will reflect this on the exam. As a rule this is turned on by default unless otherwise stated in the question. What does it mean if it is not turned on?
That the 0 subnet and the last broadcast subnet cannot be used. For example, 192.168.200.0 and 192.168.200.255
Our equation for the amount of subnets equals 2^S-2=Subnets
If it is turned on then it is 2^S=Subnets
S=amount of bits that are turned 1 or "on".
Variable Length Subnet Mask
This is used to subnet into multiple smaller networks to allow for efficient use of IP addresses, increments will be different depending on the number of hosts needed per network.
For example, you are assigned network 192.168.1.0/24 but you need a certain amount of hosts with different networks.
Given the above assigned network provide sufficient addresses for the proposed scenario without waisting IP's.
2 leased lines connecting 3 routers. Router A with direct link to Router B and Router C (router's b and c do not connect to each other) network with 10 hosts
network with 25 hosts
network with 50 hosts
With the above we know that we have 2 point-to-point links between Router A and Router B and Router A and Router C. We start with network 192.168.1.0/24
We need 2 ip addresses for RouterA and RouterB
We need to identify how many bits in this address we need:
our mask is 255.255.255.0
for 2 addresses we need 2 bits
2^2-2 = 2
or in binary 0000 00 00 last 2 bits are needed for the hosts Now we can turn the rest of the bits into 1's to give us our mask (last octet shown in binary) 1111 1100
What are our usable IP's? Well let's look at our "increment". 256-252 = 4
Network starts with 0 and our next network...