background image
72
Chapter 3
IP Addressing
So, in our case, instead of having one network (172.16.0.0) with 65,534
available hosts numbers, we have 254 networks (172.16.1.0­172.16.254.0)
with 254 available host numbers in each subnet.
We can calculate the number of hosts available on a subnet by using the
formula 2
n
­ 2 = number of available host IPs
, where n is the number
of hosts bits (in our example, 8). The minus 2 (­2) represents all host bits on
and all hosts bits off, which are reserved.
Similarly, the number of networks (or subnets) can be calculated with
nearly the same formula: 2
n
­ 2 = number of available networks
, where
n
is the number of subnet bits (in our example, 8). So, with subnetting we
have balanced our need for available network and host numbers. However,
there may be instances where we need fewer host numbers on a particular
subnet and more host numbers on another. The ­2 represents all subnet bits
on and all subnet bits off.
Let's extend our example to include a serial link between two routers, as
shown in Figure 3.1.
F I G U R E 3 . 1
IP address example
Since these are routers and not switches, each interface belongs to a dif-
ferent network. The interfaces need to share a network to talk. How many
IP numbers do we really need on the network interconnecting the two rout-
ers? We only need two IP numbers, one for each serial interface, as shown in
T A B L E 3 . 3
IP Address Example
Decimal
172
16
0
0
Binary
10101100
00010000
00000000
00000000
Decimal
255
255
255
0
Binary
11111111
11111111
11111111
00000000
172.16.10.1
Network 172.16.10.0/24
172.16.10.2
Copyright ©2001 SYBEX , Inc., Alameda, CA
www.sybex.com