TCPIP Subnetting
TCPIP Subnetting
Introduction to TCP/IP
The more host bits that are used, the more subnets (subnetted
network IDs) you can have — but with fewer hosts. Using too
many host bits allows for growth in the number of subnets but
limits the growth in the number of hosts. Using too few hosts
allows for growth in the number of hosts but limits the growth in
the number of subnets.
1. Determine how many subnets you need now and will need
in the future. Each physical network is a subnet. WAN
connections can also count as subnets depending on whether
your routers support unnumbered connections.
2. Use additional bits for the subnet mask if:
You will never require as many hosts per subnet
as allowed by the remaining bits.
The number of subnets will increase in the future,
requiring additional host bits.
Required Number of
Number of Number of Hosts per
Subnets Subnet Bits Subnet Mask Subnet
131,073-262,144 18 255.255.255.192 62
or /26
262,145-524,288 19 255.255.255.224 30
or /27
524,289- 20 255.255.255.240 14
1,048,576 or /28
1,048,577- 21 255.255.255.248 6
2,097,152 or /29
2,097,153- 22 255.255.255.252 2
4,194,304 or /30
Required Number of
Number of Number of Hosts per
Subnets Subnet Bits Subnet Mask Subnet
513-1,024 10 255.255.255.192 62
or /26
1,025-2,048 11 255.255.255.224 30
or /27
2,049-4,096 12 255.255.255.240 14
or /28
4,097-8,192 13 255.255.255.248 6
or /29
8,193-16,384 14 255.255.255.252 2
or /30
Required Number of
Number of Number of Hosts
Subnets Subnet Bits Subnet Mask per Subnet
3-4 2 255.255.255.192 or 62
/26
5-8 3 255.255.255.224 or 30
/27
9-16 4 255.255.255.240 or 14
/28
17-32 5 255.255.255.248 or 6
/29
33-64 6 255.255.255.252 or 2
/30
Based on the number of host bits you use for your subnetting,
you must list the new subnetted network IDs. There are two
main approaches:
Note
2. In the first table entry, set the subnet bits to all 0's and
convert to dotted decimal notation. The original network ID is
subnetted with its new subnet mask.
3. In the next table entry, increase the value within the
subnet bits.
4. Convert the binary result to dotted decimal notation.
5. Repeat steps 3 and 4 until the table is complete.
Subnetted
Subnet Binary Representation Network ID
1 11000000.10101000.00000000.00000000 192.168.0.0/19
2 11000000.10101000.00100000.00000000 192.168.32.0/19
3 11000000.10101000.01000000.00000000 192.168.64.0/19
4 11000000.10101000.01100000.00000000 192.168.96.0/19
5 11000000.10101000.10000000.00000000 192.168.128.0/19
6 11000000.10101000.10100000.00000000 192.168.160.0/19
7 11000000.10101000.11000000.00000000 192.168.192.0/19
8 11000000.10101000.11100000.00000000 192.168.224.0/19
I = 2h
W = INT(s/16777216)
X = INT((s mod(16777216))/65536)
Y = INT((s mod(65536))/256)
Z = s mod(256)
1 3232235520 192.168.0.0/19
2 3232243712 192.168.32.0/19
3 3232251904 192.168.64.0/19
4 3232260096 192.168.96.0/19
5 3232268288 192.168.128.0/19
6 3232276480 192.168.160.0/19
7 3232284672 192.168.192.0/19
8 3232292864 192.168.224.0/19
Note
RFC 950 forbade the use of the subnetted network IDs where
the bits being used for subnetting are set to all 0's (the all-zeros
subnet) and all 1's (the all-ones subnet). The all-zeros subnet
caused problems for early routing protocols and the all-ones
subnet conflicts with a special broadcast address called the all-
subnets directed broadcast address.
However, RFC 1812 now permits the use of the all-zeros and all-
ones subnets in a CIDR-compliant environment. CIDR-compliant
environments use modern routing protocols that do not have a
problem with the all-zeros subnet and the all-subnets directed
broadcast is no longer relevant.
Range of IP
Subnet Binary Representation Addresses
1 11000000.10101000.00000000.00000001 192.168.0.1 -
- 192.168.31.254
11000000.10101000.00011111.11111110
2 11000000.10101000.00100000.00000001 192.168.32.1 -
- 192.168.63.254
11000000.10101000.00111111.11111110
3 11000000.10101000.01000000.00000001 192.168.64.1 -
- 192.168.95.254
11000000.10101000.01011111.11111110
4 11000000.10101000.01100000.00000001 192.168.96.1 -
- 192.168.127.254
11000000.10101000.01111111.11111110
5 11000000.10101000.10000000.00000001 192.168.128.1 -
- 192.168.159.254
11000000.10101000.10011111.11111110
6 11000000.10101000.10100000.00000001 192.168.160.1 -
- 192.168.191.254
11000000.10101000.10111111.11111110
7 11000000.10101000.11000000.00000001 192.168.192.1 -
- 192.168.223.254
11000000.10101000.11011111.11111110
8 11000000.10101000.11100000.00000001 192.168.224.1 -
- 192.168.255.254
11000000.10101000.11111111.11111110
J = 2h - 2
W = INT(s/16777216)
X = INT((s mod(16777216))/65536)
Y = INT((s mod(65536))/256)
Z = s mod(256)
INT( ) denotes integer division, mod( ) denotes the modulus,
the remainder upon division.