0% found this document useful (0 votes)
20 views8 pages

Ip Address 1

The network layer is responsible for the delivery of packets from the source to the destination, utilizing logical addressing to distinguish between sender and receiver. IPv4 addresses, which are 32-bit unique identifiers for devices on the Internet, have a total address space of over 4 billion, but classful addressing has led to significant address wastage. Classless addressing was introduced to alleviate address depletion by allowing flexible allocation of address blocks without the constraints of predefined classes.

Uploaded by

ioriyag0101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views8 pages

Ip Address 1

The network layer is responsible for the delivery of packets from the source to the destination, utilizing logical addressing to distinguish between sender and receiver. IPv4 addresses, which are 32-bit unique identifiers for devices on the Internet, have a total address space of over 4 billion, but classful addressing has led to significant address wastage. Classless addressing was introduced to alleviate address depletion by allowing flexible allocation of address blocks without the constraints of predefined classes.

Uploaded by

ioriyag0101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Network Layer

The network layer is responsible for the source-to-destination delivery of a


packet, possibly across multiple networks (links). Whereas the data link
layer oversees the delivery of the packet between two systems on the
same network (links), the network layer ensures that each packet gets from
its point of origin to its final destination.
The network layer is responsible for the delivery of individual packets from
the source to the destination host.
The network layer adds a header that includes the logical addresses of the
sender and receiver to the packet corning from the upper layer. If a packet
travels through the Internet, we need this addressing system to help
distinguish the source and destination.

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.

Notations:- There are two prevalent notations to show an IPv4 address:


binary notation and dotted-decimal notation.

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:

01110101 10010101 00011101 00000010

Dotted-Decimal Notation:- To make the IPv4 address more compact and


easier to read, Internet addresses are usually written in decimal form with a
decimal point (dot) separating the bytes. The following is the Dotted-
Decimal Notation of the above address: 117.149.29.2
Figure 1 shows an IPv4 address in both binary and dotted-decimal
notation. Note that because each byte (octet) is 8 bits, each number in
dotted-decimal notation is a value ranging from 0 to 255.

Figure 1 Dotted-decimal notation and binary notation for an IPv4 address

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

Exercises:- 1) Find the class of each address.


a.
00000001 00001011 00001011 11101111

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.

4) Find the error, if any, in the following IPv4 addresses.

Page 3 sur 8
Internet Classes

Classes and Blocks


One problem with classful addressing is that each class is divided into a
fixed number of blocks with each block having a fixed size as shown in
Table 1.
Table 1 Number of blocks and block size in classfulIPv4 addressing.
Table 1 Number of blocks and block size in classful IPv4 addressing

Let us examine the table. Previously, when an organization requested a


block of addresses, it was granted one in class A, B, or C. Class A
addresses were designed for large organizations with a large number of
attached hosts or routers. Class B addresses were designed for midsize
organizations with tens of thousands of attached hosts or routers. Class C
addresses were designed for small organizations with a small number of

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.

Network Address and Host Address


In classful addressing, an IP address in class A, B, or C is divided into
network address and host address. These parts are of varying lengths,
depending on the class of the address. Figure 2 shows some network
address and host address bytes. The network address is in color, the host
address is in white. Note that the concept does not apply to classes D and
E.
In class A, one byte defines the network address and three bytes define the
host address. In class B, two bytes define the network address and two
bytes define the host address. In class C, three bytes define the network
address and one byte defines the host address.

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.

Table 2 Default masks for classful addressing

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.

Figure 3 A block of 16 addresses granted to a small organization


We can see that the restrictions are applied to this block. The addresses
are contiguous. The number of addresses is a power of 2 (16 = 24), and
the first address is divisible by 16. The first address, when converted to a
decimal number, is 3,440,387,360, which when divided by 16 results in
215,024,210.

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

You might also like