Ip Address 1
Ip Address 1
IPv4 ADDRESSES
An IPv4 address is a 32-bit address that uniquely and universally defines
the connection of a device (for example, a computer or a router) to the
Internet.
An IPv4 address is 32 bits long.
IPv4 addresses are unique. They are unique in the sense that each
address defines one, and only one, connection to the Internet. Two devices
on the Internet can never have the same address at the same time.
The IPv4 addresses are universal in the sense that the addressing system
must be accepted by any host that wants to be connected to the Internet.
Address Space
A protocol such as IPv4 that defines addresses has an address space. An
address space is the total number of addresses used by the protocol. If a
protocol uses N bits to define an address, the address space is 2N because
each bit can have two different values (0 or 1) and N bits can have
2N values.
IPv4 uses 32-bit addresses, which means that the address space is 232 or
4,294,967,296 (more than 4 billion). This means that, theoretically, if there
were no restrictions, more than 4 billion devices could be connected to the
Internet. We will see shortly that the actual number is much less because of
the restrictions imposed on the addresses.
The address space of IPv4 is 232 or 4,294,967,296.
Page 1 sur 8
Binary Notation:- In binary notation, the IPv4 address is displayed as 32
bits. Each octet is often referred to as a byte. So it is common to hear an
IPv4 address referred to as a 32-bit address or a 4-byte address. The
following is an example of an IPv4 address in binary notation:
Classful Addressing
IPv4 addressing, at its inception, used the concept of classes. This
architecture is called classful addressing. Although this scheme is
becoming obsolete, we briefly discuss it here to show the rationale behind
classless addressing.
In classful addressing, the address space is divided into five classes: A, B,
C, D, and E. Each class occupies some part of the address space.
We can find the class of an address when given the address in binary
notation or dotted-decimal notation. If the address is given in binary
notation, the first few bits can immediately tell us the class of the address. If
the address is given in decimal-dotted notation, the first byte defines the
class. Both methods are shown in Figure 2.
Page 2 sur 8
Figure 2: Finding the classes in binary and dotted-decimal notation
b.
11000001 10000011 00011011 11111111
C. 14.23.120.8
D. 252.5.15.111
2) Change the following IPv4 addresses from dotted-decimal notation to binary notation.
3) Change the following IPv4 addresses from binary notation to dotted-decimal notation.
Page 3 sur 8
Internet Classes
Page 4 sur 8
attached hosts or routers.
We can see the flaw in this design. A block in class A address is too large
for almost any organization. This means most of the addresses in class A
were wasted and were not used. A block in class B is also very large,
probably too large for many of the organizations that received a class B
block. A block in class C is probably too small for many organizations.
Class D addresses were designed for multicasting as we will see in a later
chapter. Each address in this class is used to define one group of hosts on
the Internet. The Internet authorities wrongly predicted a need for
268,435,456 groups. This never happened and many addresses were
wasted here too. And lastly, the class E addresses were reserved for future
use; only a few were used, resulting in another waste of addresses.
In classfull addressing, a large part of the available addresses were
wasted.
Mask
Although the length of the network address and host address (in bits) is
predetermined in classful addressing, we can also use a mask (also called
the default mask), a 32-bit number made of contiguous Is followed by
contiguous as. The masks for classes A, B, and C are shown in Table 2.
The concept does not apply to classes D and E.
Page 5 sur 8
The mask can help us to find the network address and the host address.
For example, the mask for a class A address has eight 1s, which means
the first 8 bits of any address in class A define the network address; the
next 24 bits define the host address.
Subnetting
During the era of classful addressing, subnetting was introduced. If an
organization was granted a large block in class A or B, it could divide the
addresses into several contiguous groups and assign each group to
smaller networks (called subnets) or, in rare cases, share part of the
addresses with neighbors. Subnetting increases the number of Is in the
mask, as we will see later when we discuss classless addressing.
Address Depletion
The flaws in classful addressing scheme combined with the fast growth of
the Internet led to the near depletion of the available addresses. Yet the
number of devices on the Internet is much less than the 232 address
space. We have run out of class A and B addresses, and a class C block is
too small for most midsize organizations. One solution that has alleviated
the problem is the idea of classless addressing.
Classful addressing, which is almost obsolete, is replaced with classless
addressing.
Classless Addressing
To overcome address depletion and give more organizations access to the
Internet, classless addressing was designed and implemented. In this
scheme, there are no classes, but the addresses are still granted in blocks.
Address Blocks
In classless addressing, when an entity, small or large, needs to be
connected to the Internet, it is granted a block (range) of addresses. The
size of the block (the number of addresses) varies based on the nature and
size of the entity. For example, a household may be given only two
addresses; a large organization may be given thousands of addresses. An
Page 6 sur 8
ISP, as the Internet service provider, may be given thousands or hundreds
of thousands based on the number of customers it may serve.
Restriction To simplify the handling of addresses, the Internet authorities
impose three restrictions on classless address blocks:
The addresses in a block must be contiguous, one after another.
The number of addresses in a block must be a power of 2 (I, 2, 4, 8, ... ).
The first address must be evenly divisible by the number of addresses.
Example
Figure 3 shows a block of addresses, in both binary and dotted-decimal
notation, granted to a small business that needs 16 addresses.
Address Allocation
Page 7 sur 8
The next issue in classless addressing is address allocation. How are the blocks allocated? The
ultimate responsibility of address allocation is given to a global authority called the Internet
Corporation for Assigned Names and Addresses (ICANN). However, ICANN does not normally
allocate addresses to individual organizations. It assigns a large block of addresses to an ISP. Each
ISP, in turn, divides its assigned block into smaller subblocks and grants the subblocks to its
customers. In other words, an ISP receives one large block to be distributed to its Internet users. This
is called address aggregation: many blocks of addresses are aggregated in one block and granted to
one ISP
Page 8 sur 8