Sie sind auf Seite 1von 4

A Step by Step Guide to Subnetting

Address 172.16.0.0/16

default subnet 255.255.0.0

ie Class B address

16 network bits

IP Address
Mask

Network
Host
10101100.00010000.00000000.00000000
11111111.11111111.00000000.00000000

You may be asked to supply 500 useable subnets ; using the formula Subnets = 2n 2
Where n = number of bits to be borrowed

Step 1

Step 2

From the table on the right; to


obtain 500 useable subnets.
We need to borrow 9 host bits as
subnet bits.
This will give us ;
512 2 = 510 useable subnets
(Remember you may end up with
unused subnets)

n
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

2n
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536

To determine the number of usable


hosts per subnet we subtract the
borrowed bits (9) from the total
number of host bits (16) which gives
us 7 remaining host bits. Using the
formulae
Hosts = 2n 2 = 27 2 . From the
table 27 = 128. Thus usable hosts =
128 2 =126
(Remember the first and last
addresses are for network and
broadcast, hence the minus 2 in the
formula)

Step 3
Mark the borrowed bits as subnet bits
IP Address
Mask
dgooch

Network
Subnet
Host
10101100.00010000.00000000.00000000
11111111.11111111.11111111.10000000
Remember the borrowed bits in the mask7 change
Jan
from 0 (zero) to 1 (one)
2005

Step 4
Define the subnetted network;
Address 172.16.0.0/25

subnet mask 255.255.255.128


The first 3 octets (24 bits) are network
bits, hence each octet = 255. The final
octet has only the MSB (Most
Significant Bit) as a network bit, hence
128.

There are now 25 network bits.


(16 original + 9 borrowed)

We are now in a position to calculate the subnet addresses and usable hosts for each
subnet.

Step 5
IP Address
Mask

Network
Subnet
Host
10101100.00010000.00000000.00000000
11111111.11111111.11111111.10000000

We are only interested in this


part of the address when
calculating the subnets

00000000.00000000
For each subnet, the binary value of
the subnet bits will increment by 1,
so the first 5 subnets and last 2 are;
*See appendix
First usable network

Last usable network

00000000.0
00000000.1
00000001.0
00000001.1
00000010.0
etc.
11111111.0
11111111.1

First subnetwork not used

Last subnetwork not used


(Broadcast)

Thus first usable subnet (Subnet 1) = 10101100.00010000.00000000.10000000


=
172 . 16
.
0
.
128
the first usable host (Subnet 1) = 10101100.00010000.00000000.10000001
172 . 16
.
0
.
129
dgooch

7 Jan
2005

the last usable host (Subnet 1) = 10101100.00010000.00000000.11111110


172 . 16
.
0
.
254
the broadcast address (Subnet 1) = 10101100.00010000.00000000.11111111
172 . 16
.
0
.
255
Thus host range (Subnet 1) =
10101100.00010000.00000000.10000001
172 . 16
.
0
.
129

to 10101100.00010000.00000000.11111110
172 . 16
.
0
.
254

Thus 2nd usable subnet (Subnet 2) = 10101100.00010000.00000001.00000000


=
172 . 16
.
1 .
0
the first usable host (Subnet 2) = 10101100.00010000.00000001.00000001
172 . 16
.
1
.
1
the last usable host (Subnet 2) = 10101100.00010000.00000001.01111110
172 . 16
.
1
.
126
the broadcast address (Subnet 2) = 10101100.00010000.00000001.01111111
172 . 16
.
1
. 127
Thus host range (Subnet 2) =
10101100.00010000.00000001.00000001
172 . 16
.
1
.
1

to 10101100.00010000.00000001.01111110
172 . 16
.
1
.
126

the host range (Subnet 3) =


10101100.00010000.00000001.10000001
172 . 16
.
1
. 129

to 10101100.00010000.00000001.11111110
172 . 16
.
1
.
254

and the host range (Subnet 4) =


10101100.00010000.00000010.00000001
172 . 16
.
1
. 129

to 10101100.00010000.00000010.01111110
172 . 16
.
1
.
126

and so on
Good Luck with your subnetting
dgooch

7 Jan
2005

Appendix
IP Value
Subnet Number
Subnet 0( Not Used)
Subnet 1 Address
Subnet 1 Host 1
Subnet 1 Host 126
Subnet 1 Broadcast
Subnet 2 Address
Subnet 2 Host 1
Subnet 2 Host 126
Subnet 2 Broadcast
Subnet 3 Address
Subnet 3 Host 1
Subnet 3 Host 126
Subnet 3 Broadcast
Subnet 510 Address
Subnet 510 Host 1
Subnet 510 Host 126
Subnet 510 Broadcast
Subnet 511(Not Used)

128
256
0
0
0
0
0
0
0
0
0
0
0
0
0

64
128
0
0
0
0
0
0
0
0
0
0
0
0
0

32
64
0
0
0
0
0
0
0
0
0
0
0
0
0

16
32
0
0
0
0
0
0
0
0
0
0
0
0
0

8
16
0
0
0
0
0
0
0
0
0
0
0
0
0

4
8
0
0
0
0
0
0
0
0
0
0
0
0
0

2
4
0
0
0
0
0
0
0
0
0
0
0
0
0

1
1
1
1
1

1
1
1
1
1

1
1
1
1
1

1
1
1
1
1

1
1
1
1
1

1
1
1
1
1

1
1
1
1
1

1
128
2
1
0
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
0
1
1
1
1
1
1
1
1
etc.
1
0
1
0
1
0
1
0
1
1

64

32

16

0
0
0
1
1
0
0
1
1
0
0
1
1

0
0
0
1
1
0
0
1
1
0
0
1
1

0
0
0
1
1
0
0
1
1
0
0
1
1

0
0
0
1
1
0
0
1
1
0
0
1
1

0
0
0
1
1
0
0
1
1
0
0
1
1

0
0
0
1
1
0
0
1
1
0
0
1
1

0
0
1
0
1
0
1
0
1
0
1
0
1

0
0
1
1
0

0
0
1
1
0

0
0
1
1
0

0
0
1
1
0

0
0
1
1
0

0
0
1
1
0

0
1
0
1
0

Note: Only the final two octets are shown for clarity.

dgooch

7 Jan 2005

Das könnte Ihnen auch gefallen