Sie sind auf Seite 1von 5

# How subnetting works

## Lets start with some closer look at the decimal system.

Which digits do we have in the decimal system?
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
How does the addition of 1 works in the decimal system?
For the digits except for the 9 its pretty simple. We only have to choose the next
higher digit. The 9 requires us to do the addition one position higher in the number
and set the original position to 0.
For example:
Addition in the same position: 7 + 1 = 8
Addition with extra addition in higher position: 19 + 1 = 20
Addition with extra addition in more than one higher position: 8999 + 1 =
9000
How does subtraction works in the decimal system?
For the digits except the 0 it is like the addition just the other way round. We only
have to choose the next lower digit. The 0 requires us to do the subtraction one
position higher in the number and set the original position to 9.
For example:
Subtraction in the same position: 8 1 = 7
Subtraction with extra subtraction in higher position: 20 1 = 19
Subtraction with extra subtraction in more than one higher position: 9000 1 = 8999
How many more alternatives give us a position?
As any position could hold 10 different values, adding one position will multiply our
number of possibilities with 10. Continuous multiplying with 10 is also known as
power of 10. When we want to know how many possibilities we get with ten
positions in our decimal number, we only have to know the tenth power of 10 (e.g.
10^10 = 10000000000).
I already know this, why should I bother with these?
Because we now move on to the binary system!

## Which digits do we have in the binary system?

Just 0 and 1!
How does addition works in the binary system?
Adding 1 to the 0 will end in a 1; adding 1 to the 1 is like adding 1 to the 9 in the
decimal system. We have to go one position higher, add our 1 there and set the
original position to 0. If adding the 1 a position higher will also end in adding a 1 to
1, than we have to go even to a higher position.
For Example:
Addition in the same position: 0 + 1 = 1
Addition with extra addition in higher position: 1 + 1 = 10
Addition with extra addition in more than one higher position: 111 + 1 =
1000
By the way you learned that leading zeros can be omitted except the number
consists only of the digit 0.
How does subtraction works in the binary system?
Subtracting a 1 from the 1 will end in a 0; subtracting a 1 from the 0 is the same as
in the decimal system, except from setting the original position to 1.
For example:
Subtraction in the same position: 1 1 = 0
Subtraction with extra subtraction in higher position: 10 1 = 1
Subtraction with extra subtraction in more than one higher position: 1000 1 = 111
How many more alternatives give us a position?
As any position could hold 2 different values, adding one position will multiply our
number of possibilities with 2. Continuous multiplying with 2 is also known as power
of 2. When we want to know how many possibilities we get with ten positions in our
binary number, we only have to know the tenth power of 2 (e.g. 2^10 = 1024).
Lets start doing something with this knowledge.
You are given an IP-Subnet (10.0.0.0) with a subnet mask of 255.0.0.0. You were
assigned a task to divide it into 10 smaller networks of same size.
You have to consider, which power of 2 is just big enough to hold your number of
subnets.
2^0 = 1 (to small)
2^1 = 2

2^2 = 4
2^3 = 8 (still to small)
2^4 = 16 (its the first power of 2, that is bigger ore even the same as your need
amount of subnets)
Because it's the fourth power of two, you have to reserve 4 more Bits in the subnet
mask. Your originally Mask was 255.0.0.0 or 1111 1111.0000 0000.0000 0000.0000
0000.
So with 4 new reserved Bits, your subnet mask look like 1111 1111.1111
0000.0000 0000.0000 0000.
To convert it back to decimal, you look again at the powers of 2.
How many host bits are left over in the octet with host and network bits?
1111 1111.1111 0000.0000 0000.0000 0000, so there are 4 host bits left.
2^4 is 16, so subtract 16 from 256 (it is always 256; it's the number of possible
alternatives in one Byte). 256 - 16 = 240. Your new subnet mask is 255.240.0.0.
Where do start your network ranges?
Recycle your knowledge about the power of 2 we have used for converting our
subnet mask back to decimal! Add this in the Octet, that holds both network bits
and host bits. The lowest network starts always with your original Subnet.
10.0.0.0 10.16.0.0 10.32.0.0 10.48.0.0 and so on until you reach 256! If you count your nets, you will find out, that you get
17! The network 10.256.0.0 isnt usable, discard this network. We only need this for
the next step.
We use the chart from "Where start your network ranges?" and subtract 1.
10.0.0.0 - 10.15.255.255
10.16.0.0 - 10.31.255.255
10.32.0.0 - 10.47.255.255
10.48.0.0 - 10.63.255.255
and so on!
Subnetting for a given number of hosts.
You are given an IP-network (192.168.0.0) with a subnet mask of 255.255.255.0.
You were assigned a task to divide it into smaller networks which can accommodate
90 hosts each.
At first, we have to add 2 hosts to the given number, because we need a network

address and a broadcast address. So we have to look for nets which can
accommodate 92 hosts each.
Again we are looking for a power of 2, that is a little bit bigger then our given
problem. In this case we are looking for something bigger then 92.
2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 =64 (still to small)
2^7 = 128
Because its the 7th power of 2, we have to reserve 7 positions in our subnet mask
for hosts, resulting in filling up anything except the last 7 bits with 1. So our new
subnet mask looks like:
1111 1111. 1111 1111. 1111 1111.1000 0000.
To convert this number back in decimal, we already have what we need. There are
7 host bits left; the 7th power of 2 is 128. We subtract this 128 from 256 (as
mentioned before). Our new subnet mask is 255.255.255.128.
Where do start your network ranges?
Recycle your knowledge about the power of 2 we have used for converting our
subnet mask back to decimal! Add this in the Octet, that holds both network bits
and host bits. The lowest network starts always with your original Subnet.
192.168.0.0
192.168.0.128
192.168.0.256 (Done, we reached 256)