05-IP Addressing
05-IP Addressing
IP Addresses
2
IPv4 ADDRESSES
3
Example
Solution
We replace each decimal number with its binary
equivalent.
4
Example
Solution
We replace each decimal number with its binary
equivalent.
5
Example
Solution
We replace each group of 8 bits with its equivalent
decimal number and add dots for separation.
6
Example
Solution
a.
7
Example
Solution
a. There must be no leading zero (045).
b. There can be no more than four numbers.
c. Each number needs to be less than or equal to 255.
d. A mixture of binary notation and dotted-decimal
notation is not allowed.
8
Hierarchy in Addressing
A 32-bit IPv4 address is hierarchical, but divided only into two parts. The first
part of the address, called the prefix, defines the network; the second part of
the address, called the suffix, defines the node (connection of a device to the
Internet). Figure shows the prefix and suffix of a 32-bit IPv4 address. The
prefix length is n bits and the suffix length is (32 - n) bits.
18.9
Classful Addressing
When the Internet started, an IPv4 address was designed with a fixed-length
prefix, but to accommodate both small and large networks, three fixed-
length prefixes were designed instead of one (n = 8, n = 16, and n = 24).
The whole address space was divided into five classes (class A, B, C, D,
and E), as shown in Figure below. This scheme is referred to as classful
addressing. Although classful addressing belongs to the past, it helps us to
understand classless addressing, discussed later.
18.10
Classful Addressing
18.11
Example
Solution
a.
12
Example
Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
13