I took a cisco networking class. IP addresses are broken into octets. In the ip address 192.168.0.1 there are 4 octets, all seperates by periods.
If you only need 20 users it is extremely easy. You basically can pick any numbers you want for each of the first three octets, but not the last. For example, the default IP address for your computer's router is what i put above, 192.168.0.1. If you wanted to use this, the IP addresses would be.....
192.168.0.1
192.168.0.2
192.168.0.3
see a pattern here?
counting this way is the same way as counting in decimal.
1,2,3,4 etc all the way up to 9, then you add another digit. you get to 99, you add another.
ip addresses work the same. if your ip address is 0.0.0.0 the next one is
0.0.0.1
0.0.0.2
0.0.0.3 etc.
only thing is with IP addresses you can only go up to 255 per octet, so when you get to the end it goes...
0.0.0.254
0.0.0.255
0.0.1.0
0.0.1.1
notice how after you reach 255 the last octet resets to zero, just like in decimal, and you add 1 to the octet to the left. BANG! you just learned how IP addresses work.
a class A network means only the last octet changes, class B means the last two change, class C means the last three change.
basically answers your question sorry it's so long! if you need to know about subnet masking you can message me or something i'll be happy to explain.
_______________________________
Someone rated my question bad so here's your direct answer. For 20 hosts and 1 server you will need a range of 23 ip addresses. The first usable is the broadcast, the last usable is the network, 20 hosts, 1 server, 23 ip addresses total.
For this, you will need a class A, the smallest. If you look at the last octet in binary (ones and zeros) it starts like this.
00000000= 1 octet, or set of 8 bits (1s and 0s)
These 1s and 0s are seperated into network and host portion, network on the left and host on the right. The network portion of an IP address never changes. To figure out how many bits you will need for 23 hosts you will count from right to left in binary, starting with 2.
0000000|0 = 2 usable ip addresses
000000|00 = 4
00000|000 = 8
0000|0000 = 16, almost enough
000|00000 = 32, now you have enough, more than enough actually but you can't help that
All this means is that the first three octets in an ip address and be any numbers (1-255) and the last octet changes.
Now you turn the network portion of that octet on, which looks like this.
11100000 (remember, we're looking at the last octet of the ip address)
the bit values for these in binary are as follows
1
2 6 3 1
8 4 2 6 8 4 2 1
--------------------------------------
1 1 1 0 0 0 0 0
since the first three bits are turned on, or turned to 1, you add their values in binary.
128+
64
32
-------------
224
So lastly, your range of ip addresses would be
xxx.xxx.xxx.224 - xxx.xxx.xxx.-255
remember the xxx can be any number 1-255
and yes the network administrator does do a calculation, one that is very hard to translate over the internet! much easier on paper!!! sorry i wrote a whole IP addressing lesson on here lol it just let me keep going