[go: up one dir, main page]

0% found this document useful (0 votes)
24 views52 pages

IP Addressing

Internet Protocol Addressing Version 4

Uploaded by

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

IP Addressing

Internet Protocol Addressing Version 4

Uploaded by

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

Network Layer:

Internet Protocol Version 4


Internet Protocol Version 4

The network layer in the Internet has


gone through several versions, but only
two versions have survived:
IP Version 4 (IPv4) and
IP Version 6 (IPv6).
Although IPv4 is almost depleted, we
discuss it because there are still some
areas that use this version and also
because it is the foundation for IPv6.
20.2
IPv4 Addressing

The identifier used in the IP layer of the TCP/IP


protocol suite to identify the connection of each
device to the Internet is called the Internet address
or IP address.
An IPv4 address is a 32-bit address that uniquely
and universally defines the connection of a host or
a router to the Internet.
The IP address is the address of the connection,
not the host or the router, because if the device is
moved to another network, the IP address may be
changed.
20.3
IPv4 Addressing

 IPv4 addresses are unique in the sense


that each address defines one, and only one,
connection to the Internet.
If a device has two connections to the
Internet, via two networks, it has two IPv4
addresses.
IPv4 addresses are universal in the sense
that the addressing system must be accepted
by any host that wants to be connected to
20.4the Internet
Address space

 A protocol like 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).
IPv4 uses 32-bit addresses, which means that the
address space is 232 or 4,294,967,296 (more than 4
billion). If there were no restrictions, more than 4
billion devices could be connected to the internet .
Notations

There are three common notations to show an IPv4


address:
1. Binary notation (base 2),
2. Dotted-decimal notation (base 256), and
3. Hexadecimal notation (base 16).
In binary notation, an IPv4 address is displayed as 32 bits.
To make the IPv4 address more compact and easier to
read, it is usually written in decimal form with a decimal
point (dot) separating the bytes. This format is referred to as
dotted-decimal notation. Note that because each byte (octet)
is only 8 bits, each number in the dotted-decimal notation is
between 0 and 255.
Notations

There are three common notations to show an IPv4


address:
1. Binary notation (base 2),
2. Dotted-decimal notation (base 256), and
3. Hexadecimal notation (base 16).
In binary notation, an IPv4 address is displayed as 32 bits.
To make the IPv4 address more compact and easier to
read, it is usually written in decimal form with a decimal
point (dot) separating the bytes. This format is referred to as
dotted-decimal notation. Note that because each byte (octet)
is only 8 bits, each number in the dotted-decimal notation is
between 0 and 255.
20.8
Hierarchy in Addressing

In any communication network that involves


delivery, such as a telephone network or a postal
network, the addressing system is hierarchical.
In a postal network, the postal address
(mailing address) includes the country, state,
city, street, house number, and the name of the
mail recipient.
Similarly, a telephone number is divided into
the country code, area code, local exchange, and
the connection.
Hierarchy in Addressing

A 32-bit IPv4 address is also hierarchical but


is 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 7.5 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.
Hierarchy in Addressing

A prefix can be fixed length or variable length.


The network identifier in the IPv4 was first
designed as a fixed-length prefix. This scheme,
which is now obsolete, is referred to as classful
addressing.
The new scheme, which is referred to as
classless addressing, uses a variable-length
network prefix. First, we briefly discuss classful
addressing; then we concentrate on classless
addressing
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 (classes A, B, C, D, and E ), as
shown in Figure 7.6.
This scheme is referred to as classful
addressing.
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 (classes A, B, C, D, and E ), as
shown in Figure 7.6.
This scheme is referred to as classful
addressing.
Classless Addressing
With the growth of the Internet, it was clear that a
larger address space was needed as a long-term solution.
The larger address space, however, requires that the
length of IP addresses also be increased, which means
the format of the IP packets needs to be changed.
The long-range solution has already been devised
and is called IPv6, a short-term solution was also devised
to use the same address space but to change the
distribution of addresses to provide a fair share to each
organization.
The short-term solution still uses IPv4 addresses,
but it is called classless addressing.
Classless Addressing

In 1996, the Internet authorities announced a new


architecture called classless addressing.
In classless addressing, variable-length blocks are
used that belong to no classes. We can have a block of 1
address, 2 addresses, 4 addresses, 128 addresses, and so
on.
In classless addressing, the whole address space is
divided into variable-length blocks. The prefix in an
address defines the block (network); the suffix defines
the node (device).
One of the restrictions is that the number of
addresses in a block needs to be a power of 2
Variable-length blocks in classless addressing

20.18
Prefix Length: Slash Notation

The first question that we need to answer in


classless addressing is how to find the prefix length if
an address is given. Because the prefix length is not
inherent in the address, we need to separately give the
length of the prefix.
In this case, the prefix length, n, is added to the
address, separated by a slash. The notation is
informally referred to as slash notation and formally as
classless interdomain routing (CIDR, pronounced
cider) strategy.
An address in classless addressing can then be
represented as shown in Figure 7.8.
Slash Notation (CIDR)
Address Calculation using CIDR
Address Mask
Subnetting

More levels of hierarchy can be created


using subnetting.
An organization (or an ISP) that is granted a
range of addresses may divide the range into
several subranges and assign each subrange to a
subnetwork (or subnet).
Note that nothing stops the organization
from creating more levels. A subnetwork can be
divided into several sub-subnetworks. A sub-
subnetwork can be divided into several sub-sub-
subnetworks, and so on.
Designing Subnets

The subnetworks in a network should be


carefully designed to enable the routing of
packets.
We assume the total number of addresses
granted to the organization is N, the prefix length
is n, the assigned number of addresses to each
subnetwork is Nsub, and the prefix length for
each subnetwork is nsub.
Then the following steps need to be carefully
followed to guarantee the proper operation of the
subnetworks.
Steps need to be carefully followed to guarantee
the proper operation of the sub networks..

1.The number of addresses in each


subnetwork should be a power of 2.
2.The prefix length for each subnetwork
should be found using the following formula:
nsub = 32 − log2 Nsub
3.The starting address in each subnetwork
should be divisible by the number of addresses
in that subnetwork. This can be achieved if we
first assign addresses to larger subnetworks.
NEXT GENERATION IP (IPV6)

The address depletion of IPv4 and other shortcomings of this protocol


prompted a new version of IP protocol in the early 1990s . The new
version, which is called Internet Protocol version 6 (IPv6) or IP new
generation (IPng),
(IPv6) was a proposal to augment the address space of IPv4 and at the
same time redesign the format of the IP packet and revise some
auxiliary protocols such as ICMP.
It is interesting to know that IPv5 was a proposal, based on the OSI
model, that never materialized.
The main changes needed in the new protocol were as follows:
larger address space,
better header format,
new options,
allowance for extension,
support for resource allocation, and
support for more security
IPv6 Addressing

The main reason for migration from IPv4 to IPv6


is the small size of the address space in IPv4. In
this section, we show how the huge address space
of IPv6 prevents address depletion in the future.
We also discuss how the new addressing responds
to some problems in the IPv4 addressing
mechanism. An IPv6 address is 128 bits or 16
bytes (octets) long, 4 times the address length in
IPv4.
Note

An IPv6 address is 128 bits long.

19.28
Figure 19.14 IPv6 address in binary and hexadecimal colon notation

19.29
Figure 19.15 Abbreviated IPv6 addresses

19.30
Example 19.11

Expand the address 0:15::1:12:1213 to its original.

Solution
We first need to align the left side of the double colon to
the left of the original pattern and the right side of the
double colon to the right of the original pattern to find
how many 0s we need to replace the double colon.

This means that the original address is.

19.31
Table 19.5 Type prefixes for IPv6 addresses

19.32
Table 19.5 Type prefixes for IPv6 addresses (continued)

19.33
Figure 19.16 Prefixes for provider-based unicast address

19.34
Figure 19.17 Multicast address in IPv6

19.35
Figure 19.18 Reserved addresses in IPv6

19.36
Figure 19.19 Local addresses in IPv6

19.37
20-3 IPv6

The network layer protocol in the TCP/IP protocol


suite is currently IPv4. Although IPv4 is well designed,
data communication has evolved since the inception of
IPv4 in the 1970s. IPv4 has some deficiencies that
make it unsuitable for the fast-growing Internet.

Topics discussed in this section:


Advantages
Packet Format
Extension Headers

20.38
Figure 20.15 IPv6 datagram header and payload

20.39
Figure 20.16 Format of an IPv6 datagram

20.40
Table 20.6 Next header codes for IPv6

20.41
Table 20.7 Priorities for congestion-controlled traffic

20.42
Table 20.8 Priorities for noncongestion-controlled traffic

20.43
Table 20.9 Comparison between IPv4 and IPv6 packet headers

20.44
Figure 20.17 Extension header types

20.45
Table 20.10 Comparison between IPv4 options and IPv6 extension headers

20.46
20-4 TRANSITION FROM IPv4 TO IPv6

Because of the huge number of systems on the


Internet, the transition from IPv4 to IPv6 cannot
happen suddenly. It takes a considerable amount of
time before every system in the Internet can move from
IPv4 to IPv6. The transition must be smooth to prevent
any problems between IPv4 and IPv6 systems.

Topics discussed in this section:


Dual Stack
Tunneling
Header Translation
20.47
Figure 20.18 Three transition strategies

20.48
Figure 20.19 Dual stack

20.49
Figure 20.20 Tunneling strategy

20.50
Figure 20.21 Header translation strategy

20.51
Table 20.11 Header translation

20.52

You might also like