Network Layer:
Internet Protocol Version 4
20.2
Internet Protocol Version 4
The network layer in the Internet has
The network layer in the Internet has
gone through several versions, but only
gone through several versions, but only
two versions have survived:
two versions have survived:
IP Version 4 (IPv4) and
IP Version 4 (IPv4) and
IP Version 6 (IPv6).
IP Version 6 (IPv6).
Although
Although IPv4 is almost depleted
IPv4 is almost depleted, we
, we
discuss it because there are
discuss it because there are still some
still some
areas that use this version
areas that use this version and also
and also
because it is
because it is the foundation for IPv6.
the foundation for IPv6.
20.3
IPv4 Addressing
The
The identifier used in the IP layer of the TCP/IP
identifier used in the IP layer of the TCP/IP
protocol suite
protocol suite to identify the connection of each
to identify the connection of each
device to the Internet is called the Internet address
device to the Internet is called the Internet address
or IP address.
or IP address.
An
An IPv4 address is a 32-bit address that uniquely
IPv4 address is a 32-bit address that uniquely
and universally defines the
and universally defines the connection of a host or
connection of a host or
a router to the Internet.
a router to the Internet.
The
The IP address is the address of the connection
IP address is the address of the connection,
,
not the host or the router, because
not the host or the router, because if the device is
if the device is
moved to another network, the IP address may be
moved to another network, the IP address may be
changed.
changed.
20.4
IPv4 Addressing
 IPv4 addresses are unique
IPv4 addresses are unique in the sense
in the sense
that each address defines one, and only one,
that each address defines one, and only one,
connection to the Internet.
connection to the Internet.
If a device has two connections
If a device has two connections to the
to the
Internet, via two networks,
Internet, via two networks, it has two IPv4
it has two IPv4
addresses.
addresses.
IPv4 addresses are universal
IPv4 addresses are universal in the sense
in the sense
that the addressing system must be accepted
that the addressing system must be accepted
by any host that wants to be connected to
by any host that wants to be connected to
the Internet
the Internet
Address space
 A protocol like IPv4 that defines addresses has an
A protocol like IPv4 that defines addresses has an
address space.
address space.
An address space
An address space is the total number of addresses
is the total number of addresses
used by the protocol.
used by the protocol.
If a protocol
If a protocol uses n bits to define an address
uses n bits to define an address, the
, the
address space is
address space is 2
2n
n
because each bit can have two
because each bit can have two
different values (0 or 1).
different values (0 or 1).
IPv4 uses 32-bit addresses
IPv4 uses 32-bit addresses, which means that the
, which means that the
address space is
address space is 2
232
32
or 4,294,967,296
or 4,294,967,296 (more than 4
(more than 4
billion). If there were no restrictions,
billion). If there were no restrictions, more than 4
more than 4
billion devices could be connected to the internet
billion devices could be connected to the internet.
.
Notations
There are
There are three common notations
three common notations to show an IPv4
to show an IPv4
address:
address:
1.
1. Binary notation (base 2),
Binary notation (base 2),
2.
2. Dotted-decimal notation (base 256), and
Dotted-decimal notation (base 256), and
3.
3. Hexadecimal notation (base
Hexadecimal notation (base 16).
In binary notation, an IPv4 address is displayed as 32 bits.
In binary notation, an IPv4 address is displayed as 32 bits.
To make the
To make the IPv4 address more compact and easier to
IPv4 address more compact and easier to
read, it is usually written in decimal form with a decimal
read, it is usually written in decimal form with a decimal
point (dot) separating the bytes
point (dot) separating the bytes. This format is referred to as
. This format is referred to as
dotted-decimal notation
dotted-decimal notation. Note that because each byte (octet)
. Note that because each byte (octet)
is only 8 bits, each number in the dotted-decimal notation is
is only 8 bits, each number in the dotted-decimal notation is
between 0 and 255.
between 0 and 255.
Notations
There are
There are three common notations
three common notations to show an IPv4
to show an IPv4
address:
address:
1.
1. Binary notation (base 2),
Binary notation (base 2),
2.
2. Dotted-decimal notation (base 256), and
Dotted-decimal notation (base 256), and
3.
3. Hexadecimal notation (base
Hexadecimal notation (base 16).
In binary notation, an IPv4 address is displayed as 32 bits.
In binary notation, an IPv4 address is displayed as 32 bits.
To make the
To make the IPv4 address more compact and easier to
IPv4 address more compact and easier to
read, it is usually written in decimal form with a decimal
read, it is usually written in decimal form with a decimal
point (dot) separating the bytes
point (dot) separating the bytes. This format is referred to as
. This format is referred to as
dotted-decimal notation
dotted-decimal notation. Note that because each byte (octet)
. Note that because each byte (octet)
is only 8 bits, each number in the dotted-decimal notation is
is only 8 bits, each number in the dotted-decimal notation is
between 0 and 255.
between 0 and 255.
20.8
Hierarchy in Addressing
In any communication network that involves
In any communication network that involves
delivery
delivery, such as a telephone network or a postal
, such as a telephone network or a postal
network
network, the addressing system is hierarchical
, the addressing system is hierarchical.
.
In a postal network
In a postal network, the postal address
, the postal address
(mailing address) includes the country, state,
(mailing address) includes the country, state,
city, street, house number, and the name of the
city, street, house number, and the name of the
mail recipient.
mail recipient.
Similarly, a telephone number
Similarly, a telephone number is divided into
is divided into
the country code, area code, local exchange, and
the country code, area code, local exchange, and
the connection.
the connection.
Hierarchy in Addressing
A
A 32-bit IPv4 address is also hierarchical
32-bit IPv4 address is also hierarchical but
but
is divided only into two parts.
is divided only into two parts.
The first part of the address,
The first part of the address, called the prefix
called the prefix,
,
defines the network;
defines the network;
the second part of the address,
the second part of the address, called the
called the
suffix,
suffix, defines the node (connection of a device
defines the node (connection of a device
to the Internet).
to the Internet).
Figure 7.5 shows the prefix and suffix of a 32-
Figure 7.5 shows the prefix and suffix of a 32-
bit IPv4 address
bit IPv4 address. The prefix length is n bits, and
. The prefix length is n bits, and
the suffix length is (32 − n) bits.
the suffix length is (32 − n) bits.
Hierarchy in Addressing
A prefix can be fixed length or variable length.
A prefix can be fixed length or variable length.
The network identifier in the IPv4 was first
The network identifier in the IPv4 was first
designed as a fixed-length prefix.
designed as a fixed-length prefix. This scheme,
This scheme,
which is now obsolete, is referred to as
which is now obsolete, is referred to as classful
classful
addressing.
addressing.
The new scheme, which is referred to as
The new scheme, which is referred to as
classless addressing,
classless addressing, uses a
uses a variable-length
variable-length
network prefix. F
network prefix. First, we briefly discuss classful
irst, we briefly discuss classful
addressing; then we concentrate on classless
addressing; then we concentrate on classless
addressing
addressing
Classful Addressing
When the Internet started, an IPv4 address
When the Internet started, an IPv4 address
was designed with
was designed with a fixed-length prefix,
a fixed-length prefix, but to
but to
accommodate both small and large networks,
accommodate both small and large networks,
three fixed-length prefixes were designed
three fixed-length prefixes were designed
instead of one (n = 8, n = 16, and n = 24).
instead of one (n = 8, n = 16, and n = 24).
The whole
The whole address space was divided into
address space was divided into
five classes (classes A, B, C, D, and E
five classes (classes A, B, C, D, and E), as
), as
shown in Figure 7.6.
shown in Figure 7.6.
This scheme is referred to as
This scheme is referred to as classful
classful
addressing
addressing.
.
Classful Addressing
When the Internet started, an IPv4 address
When the Internet started, an IPv4 address
was designed with
was designed with a fixed-length prefix,
a fixed-length prefix, but to
but to
accommodate both small and large networks,
accommodate both small and large networks,
three fixed-length prefixes were designed
three fixed-length prefixes were designed
instead of one (n = 8, n = 16, and n = 24).
instead of one (n = 8, n = 16, and n = 24).
The whole
The whole address space was divided into
address space was divided into
five classes (classes A, B, C, D, and E
five classes (classes A, B, C, D, and E), as
), as
shown in Figure 7.6.
shown in Figure 7.6.
This scheme is referred to as
This scheme is referred to as classful
classful
addressing
addressing.
.
Classless Addressing
With the growth of the Internet,
With the growth of the Internet, it was clear that a
it was clear that a
larger address space was needed as a long-term solution
larger address space was needed as a long-term solution.
.
The larger address space, however, requires that the
The larger address space, however, requires that the
length of IP addresses also be increased, which means
length of IP addresses also be increased, which means
the format of the IP packets needs to be changed.
the format of the IP packets needs to be changed.
The
The long-range solution has already been devised
long-range solution has already been devised
and is called IPv6
and is called IPv6, a short-term solution was also devised
, a short-term solution was also devised
to use the same address space but to change the
to use the same address space but to change the
distribution of addresses to provide a fair share
distribution of addresses to provide a fair share to each
to each
organization.
organization.
The short-term solution still uses IPv4 addresses,
The short-term solution still uses IPv4 addresses,
but it is called
but it is called classless addressing
classless addressing.
.
Classless Addressing
In 1996
In 1996, the Internet authorities announced a new
, the Internet authorities announced a new
architecture called
architecture called classless addressing
classless addressing.
.
In classless addressing,
In classless addressing, variable-length blocks are
variable-length blocks are
used that belong to no classes. We can have a block of 1
used that belong to no classes. We can have a block of 1
address, 2 addresses, 4 addresses, 128 addresses, and so
address, 2 addresses, 4 addresses, 128 addresses, and so
on.
on.
In classless addressing,
In classless addressing, the whole address space is
the whole address space is
divided into variable-length blocks. The prefix in an
divided into variable-length blocks. The prefix in an
address defines the block (network); the suffix defines
address defines the block (network); the suffix defines
the node (device).
the node (device).
One of the restrictions
One of the restrictions is that the number of
is that the number of
addresses in a block needs to be a power of 2
addresses in a block needs to be a power of 2
20.18
Variable-length blocks in classless addressing
Prefix Length: Slash Notation
The first question that we need to answer in
The first question that we need to answer in
classless addressing is how to find the prefix length
classless addressing is how to find the prefix length if
if
an address is given. Because the prefix length is not
an address is given. Because the prefix length is not
inherent in the address, we need to separately give the
inherent in the address, we need to separately give the
length of the prefix.
length of the prefix.
In this case, the prefix length
In this case, the prefix length, n, is added to the
, n, is added to the
address, separated by a slash. The notation is
address, separated by a slash. The notation is
informally referred to as slash notation and formally as
informally referred to as slash notation and formally as
classless interdomain routing (CIDR, pronounced
classless interdomain routing (CIDR, pronounced
cider) strategy
cider) strategy.
.
An address in classless addressing can then be
An address in classless addressing can then be
represented as shown in Figure 7.8.
represented as shown in Figure 7.8.
Slash Notation (CIDR)
Address Calculation using CIDR
Address Mask
Subnetting
More levels of hierarchy can be created
More levels of hierarchy can be created
using subnetting
using subnetting.
.
An organization (or an ISP) that is granted a
An organization (or an ISP) that is granted a
range of addresses
range of addresses may divide the range into
may divide the range into
several subranges and assign each subrange to a
several subranges and assign each subrange to a
subnetwork (or subnet).
subnetwork (or subnet).
Note that
Note that nothing stops the organization
nothing stops the organization
from creating more levels
from creating more levels.
. A subnetwork can be
A subnetwork can be
divided into several sub-subnetworks. A sub-
divided into several sub-subnetworks. A sub-
subnetwork can be divided into several sub-sub-
subnetwork can be divided into several sub-sub-
subnetworks, and so on.
subnetworks, and so on.
Designing Subnets
The subnetworks in a network should be
The subnetworks in a network should be
carefully designed to
carefully designed to enable the routing of
enable the routing of
packets.
packets.
We assume the
We assume the total number of addresses
total number of addresses
granted to the organization is N, the prefix length
granted to the organization is N, the prefix length
is n
is n, the assigned number of addresses to each
, the assigned number of addresses to each
subnetwork is
subnetwork is Nsub, and the prefix length for
Nsub, and the prefix length for
each subnetwork is nsub.
each subnetwork is nsub.
Then the following steps need to be carefully
Then the following steps need to be carefully
followed to
followed to guarantee the proper operation of the
guarantee the proper operation of the
subnetworks
subnetworks.
.
Steps need to be carefully followed to guarantee
the proper operation of the sub networks..
1.
1.The number of addresses in each
The number of addresses in each
subnetwork should be a power of 2.
subnetwork should be a power of 2.
2.
2.The prefix length for each subnetwork
The prefix length for each subnetwork
should be found using the following formula:
should be found using the following formula:
nsub = 32 − log2 Nsub
nsub = 32 − log2 Nsub
3.
3.The starting address in each subnetwork
The starting address in each subnetwork
should be divisible by the number of addresses
should be divisible by the number of addresses
in that subnetwork. This can be achieved if we
in that subnetwork. This can be achieved if we
first assign addresses to larger subnetworks.
first assign addresses to larger subnetworks.
NEXT GENERATION IP (IPV6)
The
The address depletion of IPv4 and other shortcomings of this protocol
address depletion of IPv4 and other shortcomings of this protocol
prompted a new version of IP protocol in the early 1990s
prompted a new version of IP protocol in the early 1990s. The new
. The new
version, which is called Internet Protocol version 6 (IPv6) or IP new
version, which is called Internet Protocol version 6 (IPv6) or IP new
generation (IPng),
generation (IPng),
(IPv6) was a proposal to augment the address space of IPv4 and at the
(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
same time redesign the format of the IP packet and revise some
auxiliary protocols such as ICMP.
auxiliary protocols such as ICMP.
It is interesting to know that IPv5 was a proposal, based on the OSI
It is interesting to know that IPv5 was a proposal, based on the OSI
model, that never materialized.
model, that never materialized.
The
The main changes needed in the new protocol
main changes needed in the new protocol were as follows:
were as follows:
larger address space,
larger address space,
better header format,
better header format,
new options,
new options,
allowance for extension,
allowance for extension,
support for resource allocation, and
support for resource allocation, and
support for more security
support for more security
IPv6 Addressing
The main reason for migration from IPv4 to IPv6
The main reason for migration from IPv4 to IPv6
is the small size of the address space in IPv4. In
is the small size of the address space in IPv4. In
this section, we show how the huge address space
this section, we show how the huge address space
of IPv6 prevents address depletion in the future.
of IPv6 prevents address depletion in the future.
We also discuss how the new addressing responds
We also discuss how the new addressing responds
to some problems in the IPv4 addressing
to some problems in the IPv4 addressing
mechanism. An IPv6 address is 128 bits or 16
mechanism. An IPv6 address is 128 bits or 16
bytes (octets) long, 4 times the address length in
bytes (octets) long, 4 times the address length in
IPv4.
IPv4.
19.28
An IPv6 address is 128 bits long.
Note
19.29
Figure 19.14 IPv6 address in binary and hexadecimal colon notation
19.30
Figure 19.15 Abbreviated IPv6 addresses
19.31
Expand the address 0:15::1:12:1213 to its original.
Example 19.11
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.32
Table 19.5 Type prefixes for IPv6 addresses
19.33
Table 19.5 Type prefixes for IPv6 addresses (continued)
19.34
Figure 19.16 Prefixes for provider-based unicast address
19.35
Figure 19.17 Multicast address in IPv6
19.36
Figure 19.18 Reserved addresses in IPv6
19.37
Figure 19.19 Local addresses in IPv6
20.38
20-3 IPv6
20-3 IPv6
The network layer protocol in the TCP/IP protocol
The network layer protocol in the TCP/IP protocol
suite is currently IPv4. Although IPv4 is well designed,
suite is currently IPv4. Although IPv4 is well designed,
data communication has evolved since the inception of
data communication has evolved since the inception of
IPv4 in the 1970s. IPv4 has some deficiencies that
IPv4 in the 1970s. IPv4 has some deficiencies that
make it unsuitable for the fast-growing Internet.
make it unsuitable for the fast-growing Internet.
Advantages
Packet Format
Extension Headers
Topics discussed in this section:
Topics discussed in this section:
20.39
Figure 20.15 IPv6 datagram header and payload
20.40
Figure 20.16 Format of an IPv6 datagram
20.41
Table 20.6 Next header codes for IPv6
20.42
Table 20.7 Priorities for congestion-controlled traffic
20.43
Table 20.8 Priorities for noncongestion-controlled traffic
20.44
Table 20.9 Comparison between IPv4 and IPv6 packet headers
20.45
Figure 20.17 Extension header types
20.46
Table 20.10 Comparison between IPv4 options and IPv6 extension headers
20.47
20-4 TRANSITION FROM IPv4 TO IPv6
20-4 TRANSITION FROM IPv4 TO IPv6
Because of the huge number of systems on the
Because of the huge number of systems on the
Internet, the transition from IPv4 to IPv6 cannot
Internet, the transition from IPv4 to IPv6 cannot
happen suddenly. It takes a considerable amount of
happen suddenly. It takes a considerable amount of
time before every system in the Internet can move from
time before every system in the Internet can move from
IPv4 to IPv6. The transition must be smooth to prevent
IPv4 to IPv6. The transition must be smooth to prevent
any problems between IPv4 and IPv6 systems.
any problems between IPv4 and IPv6 systems.
Dual Stack
Tunneling
Header Translation
Topics discussed in this section:
Topics discussed in this section:
20.48
Figure 20.18 Three transition strategies
20.49
Figure 20.19 Dual stack
20.50
Figure 20.20 Tunneling strategy
20.51
Figure 20.21 Header translation strategy
20.52
Table 20.11 Header translation

Internet Protocol Version-4 Addressing.ppt

  • 1.
  • 2.
    20.2 Internet Protocol Version4 The network layer in the Internet has The network layer in the Internet has gone through several versions, but only gone through several versions, but only two versions have survived: two versions have survived: IP Version 4 (IPv4) and IP Version 4 (IPv4) and IP Version 6 (IPv6). IP Version 6 (IPv6). Although Although IPv4 is almost depleted IPv4 is almost depleted, we , we discuss it because there are discuss it because there are still some still some areas that use this version areas that use this version and also and also because it is because it is the foundation for IPv6. the foundation for IPv6.
  • 3.
    20.3 IPv4 Addressing The The identifierused in the IP layer of the TCP/IP identifier used in the IP layer of the TCP/IP protocol suite protocol suite to identify the connection of each to identify the connection of each device to the Internet is called the Internet address device to the Internet is called the Internet address or IP address. or IP address. An An IPv4 address is a 32-bit address that uniquely IPv4 address is a 32-bit address that uniquely and universally defines the and universally defines the connection of a host or connection of a host or a router to the Internet. a router to the Internet. The The IP address is the address of the connection IP address is the address of the connection, , not the host or the router, because not the host or the router, because if the device is if the device is moved to another network, the IP address may be moved to another network, the IP address may be changed. changed.
  • 4.
    20.4 IPv4 Addressing  IPv4addresses are unique IPv4 addresses are unique in the sense in the sense that each address defines one, and only one, that each address defines one, and only one, connection to the Internet. connection to the Internet. If a device has two connections If a device has two connections to the to the Internet, via two networks, Internet, via two networks, it has two IPv4 it has two IPv4 addresses. addresses. IPv4 addresses are universal IPv4 addresses are universal in the sense in the sense that the addressing system must be accepted that the addressing system must be accepted by any host that wants to be connected to by any host that wants to be connected to the Internet the Internet
  • 5.
    Address space  Aprotocol like IPv4 that defines addresses has an A protocol like IPv4 that defines addresses has an address space. address space. An address space An address space is the total number of addresses is the total number of addresses used by the protocol. used by the protocol. If a protocol If a protocol uses n bits to define an address uses n bits to define an address, the , the address space is address space is 2 2n n because each bit can have two because each bit can have two different values (0 or 1). different values (0 or 1). IPv4 uses 32-bit addresses IPv4 uses 32-bit addresses, which means that the , which means that the address space is address space is 2 232 32 or 4,294,967,296 or 4,294,967,296 (more than 4 (more than 4 billion). If there were no restrictions, billion). If there were no restrictions, more than 4 more than 4 billion devices could be connected to the internet billion devices could be connected to the internet. .
  • 6.
    Notations There are There arethree common notations three common notations to show an IPv4 to show an IPv4 address: address: 1. 1. Binary notation (base 2), Binary notation (base 2), 2. 2. Dotted-decimal notation (base 256), and Dotted-decimal notation (base 256), and 3. 3. Hexadecimal notation (base Hexadecimal notation (base 16). In binary notation, an IPv4 address is displayed as 32 bits. In binary notation, an IPv4 address is displayed as 32 bits. To make the To make the IPv4 address more compact and easier to IPv4 address more compact and easier to read, it is usually written in decimal form with a decimal read, it is usually written in decimal form with a decimal point (dot) separating the bytes point (dot) separating the bytes. This format is referred to as . This format is referred to as dotted-decimal notation dotted-decimal notation. Note that because each byte (octet) . Note that because each byte (octet) is only 8 bits, each number in the dotted-decimal notation is is only 8 bits, each number in the dotted-decimal notation is between 0 and 255. between 0 and 255.
  • 7.
    Notations There are There arethree common notations three common notations to show an IPv4 to show an IPv4 address: address: 1. 1. Binary notation (base 2), Binary notation (base 2), 2. 2. Dotted-decimal notation (base 256), and Dotted-decimal notation (base 256), and 3. 3. Hexadecimal notation (base Hexadecimal notation (base 16). In binary notation, an IPv4 address is displayed as 32 bits. In binary notation, an IPv4 address is displayed as 32 bits. To make the To make the IPv4 address more compact and easier to IPv4 address more compact and easier to read, it is usually written in decimal form with a decimal read, it is usually written in decimal form with a decimal point (dot) separating the bytes point (dot) separating the bytes. This format is referred to as . This format is referred to as dotted-decimal notation dotted-decimal notation. Note that because each byte (octet) . Note that because each byte (octet) is only 8 bits, each number in the dotted-decimal notation is is only 8 bits, each number in the dotted-decimal notation is between 0 and 255. between 0 and 255.
  • 8.
  • 9.
    Hierarchy in Addressing Inany communication network that involves In any communication network that involves delivery delivery, such as a telephone network or a postal , such as a telephone network or a postal network network, the addressing system is hierarchical , the addressing system is hierarchical. . In a postal network In a postal network, the postal address , the postal address (mailing address) includes the country, state, (mailing address) includes the country, state, city, street, house number, and the name of the city, street, house number, and the name of the mail recipient. mail recipient. Similarly, a telephone number Similarly, a telephone number is divided into is divided into the country code, area code, local exchange, and the country code, area code, local exchange, and the connection. the connection.
  • 10.
    Hierarchy in Addressing A A32-bit IPv4 address is also hierarchical 32-bit IPv4 address is also hierarchical but but is divided only into two parts. is divided only into two parts. The first part of the address, The first part of the address, called the prefix called the prefix, , defines the network; defines the network; the second part of the address, the second part of the address, called the called the suffix, suffix, defines the node (connection of a device defines the node (connection of a device to the Internet). to the Internet). Figure 7.5 shows the prefix and suffix of a 32- Figure 7.5 shows the prefix and suffix of a 32- bit IPv4 address bit IPv4 address. The prefix length is n bits, and . The prefix length is n bits, and the suffix length is (32 − n) bits. the suffix length is (32 − n) bits.
  • 12.
    Hierarchy in Addressing Aprefix can be fixed length or variable length. A prefix can be fixed length or variable length. The network identifier in the IPv4 was first The network identifier in the IPv4 was first designed as a fixed-length prefix. designed as a fixed-length prefix. This scheme, This scheme, which is now obsolete, is referred to as which is now obsolete, is referred to as classful classful addressing. addressing. The new scheme, which is referred to as The new scheme, which is referred to as classless addressing, classless addressing, uses a uses a variable-length variable-length network prefix. F network prefix. First, we briefly discuss classful irst, we briefly discuss classful addressing; then we concentrate on classless addressing; then we concentrate on classless addressing addressing
  • 13.
    Classful Addressing When theInternet started, an IPv4 address When the Internet started, an IPv4 address was designed with was designed with a fixed-length prefix, a fixed-length prefix, but to but to accommodate both small and large networks, accommodate both small and large networks, three fixed-length prefixes were designed three fixed-length prefixes were designed instead of one (n = 8, n = 16, and n = 24). instead of one (n = 8, n = 16, and n = 24). The whole The whole address space was divided into address space was divided into five classes (classes A, B, C, D, and E five classes (classes A, B, C, D, and E), as ), as shown in Figure 7.6. shown in Figure 7.6. This scheme is referred to as This scheme is referred to as classful classful addressing addressing. .
  • 14.
    Classful Addressing When theInternet started, an IPv4 address When the Internet started, an IPv4 address was designed with was designed with a fixed-length prefix, a fixed-length prefix, but to but to accommodate both small and large networks, accommodate both small and large networks, three fixed-length prefixes were designed three fixed-length prefixes were designed instead of one (n = 8, n = 16, and n = 24). instead of one (n = 8, n = 16, and n = 24). The whole The whole address space was divided into address space was divided into five classes (classes A, B, C, D, and E five classes (classes A, B, C, D, and E), as ), as shown in Figure 7.6. shown in Figure 7.6. This scheme is referred to as This scheme is referred to as classful classful addressing addressing. .
  • 16.
    Classless Addressing With thegrowth of the Internet, With the growth of the Internet, it was clear that a it was clear that a larger address space was needed as a long-term solution larger address space was needed as a long-term solution. . The larger address space, however, requires that the The larger address space, however, requires that the length of IP addresses also be increased, which means length of IP addresses also be increased, which means the format of the IP packets needs to be changed. the format of the IP packets needs to be changed. The The long-range solution has already been devised long-range solution has already been devised and is called IPv6 and is called IPv6, a short-term solution was also devised , a short-term solution was also devised to use the same address space but to change the to use the same address space but to change the distribution of addresses to provide a fair share distribution of addresses to provide a fair share to each to each organization. organization. The short-term solution still uses IPv4 addresses, The short-term solution still uses IPv4 addresses, but it is called but it is called classless addressing classless addressing. .
  • 17.
    Classless Addressing In 1996 In1996, the Internet authorities announced a new , the Internet authorities announced a new architecture called architecture called classless addressing classless addressing. . In classless addressing, In classless addressing, variable-length blocks are variable-length blocks are used that belong to no classes. We can have a block of 1 used that belong to no classes. We can have a block of 1 address, 2 addresses, 4 addresses, 128 addresses, and so address, 2 addresses, 4 addresses, 128 addresses, and so on. on. In classless addressing, In classless addressing, the whole address space is the whole address space is divided into variable-length blocks. The prefix in an divided into variable-length blocks. The prefix in an address defines the block (network); the suffix defines address defines the block (network); the suffix defines the node (device). the node (device). One of the restrictions One of the restrictions is that the number of is that the number of addresses in a block needs to be a power of 2 addresses in a block needs to be a power of 2
  • 18.
    20.18 Variable-length blocks inclassless addressing
  • 19.
    Prefix Length: SlashNotation The first question that we need to answer in The first question that we need to answer in classless addressing is how to find the prefix length classless addressing is how to find the prefix length if if an address is given. Because the prefix length is not an address is given. Because the prefix length is not inherent in the address, we need to separately give the inherent in the address, we need to separately give the length of the prefix. length of the prefix. In this case, the prefix length In this case, the prefix length, n, is added to the , n, is added to the address, separated by a slash. The notation is address, separated by a slash. The notation is informally referred to as slash notation and formally as informally referred to as slash notation and formally as classless interdomain routing (CIDR, pronounced classless interdomain routing (CIDR, pronounced cider) strategy cider) strategy. . An address in classless addressing can then be An address in classless addressing can then be represented as shown in Figure 7.8. represented as shown in Figure 7.8.
  • 20.
  • 21.
  • 22.
  • 23.
    Subnetting More levels ofhierarchy can be created More levels of hierarchy can be created using subnetting using subnetting. . An organization (or an ISP) that is granted a An organization (or an ISP) that is granted a range of addresses range of addresses may divide the range into may divide the range into several subranges and assign each subrange to a several subranges and assign each subrange to a subnetwork (or subnet). subnetwork (or subnet). Note that Note that nothing stops the organization nothing stops the organization from creating more levels from creating more levels. . A subnetwork can be A subnetwork can be divided into several sub-subnetworks. A sub- divided into several sub-subnetworks. A sub- subnetwork can be divided into several sub-sub- subnetwork can be divided into several sub-sub- subnetworks, and so on. subnetworks, and so on.
  • 24.
    Designing Subnets The subnetworksin a network should be The subnetworks in a network should be carefully designed to carefully designed to enable the routing of enable the routing of packets. packets. We assume the We assume the total number of addresses total number of addresses granted to the organization is N, the prefix length granted to the organization is N, the prefix length is n is n, the assigned number of addresses to each , the assigned number of addresses to each subnetwork is subnetwork is Nsub, and the prefix length for Nsub, and the prefix length for each subnetwork is nsub. each subnetwork is nsub. Then the following steps need to be carefully Then the following steps need to be carefully followed to followed to guarantee the proper operation of the guarantee the proper operation of the subnetworks subnetworks. .
  • 25.
    Steps need tobe carefully followed to guarantee the proper operation of the sub networks.. 1. 1.The number of addresses in each The number of addresses in each subnetwork should be a power of 2. subnetwork should be a power of 2. 2. 2.The prefix length for each subnetwork The prefix length for each subnetwork should be found using the following formula: should be found using the following formula: nsub = 32 − log2 Nsub nsub = 32 − log2 Nsub 3. 3.The starting address in each subnetwork The starting address in each subnetwork should be divisible by the number of addresses should be divisible by the number of addresses in that subnetwork. This can be achieved if we in that subnetwork. This can be achieved if we first assign addresses to larger subnetworks. first assign addresses to larger subnetworks.
  • 26.
    NEXT GENERATION IP(IPV6) The The address depletion of IPv4 and other shortcomings of this protocol address depletion of IPv4 and other shortcomings of this protocol prompted a new version of IP protocol in the early 1990s prompted a new version of IP protocol in the early 1990s. The new . The new version, which is called Internet Protocol version 6 (IPv6) or IP new version, which is called Internet Protocol version 6 (IPv6) or IP new generation (IPng), generation (IPng), (IPv6) was a proposal to augment the address space of IPv4 and at the (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 same time redesign the format of the IP packet and revise some auxiliary protocols such as ICMP. auxiliary protocols such as ICMP. It is interesting to know that IPv5 was a proposal, based on the OSI It is interesting to know that IPv5 was a proposal, based on the OSI model, that never materialized. model, that never materialized. The The main changes needed in the new protocol main changes needed in the new protocol were as follows: were as follows: larger address space, larger address space, better header format, better header format, new options, new options, allowance for extension, allowance for extension, support for resource allocation, and support for resource allocation, and support for more security support for more security
  • 27.
    IPv6 Addressing The mainreason for migration from IPv4 to IPv6 The main reason for migration from IPv4 to IPv6 is the small size of the address space in IPv4. In is the small size of the address space in IPv4. In this section, we show how the huge address space this section, we show how the huge address space of IPv6 prevents address depletion in the future. of IPv6 prevents address depletion in the future. We also discuss how the new addressing responds We also discuss how the new addressing responds to some problems in the IPv4 addressing to some problems in the IPv4 addressing mechanism. An IPv6 address is 128 bits or 16 mechanism. An IPv6 address is 128 bits or 16 bytes (octets) long, 4 times the address length in bytes (octets) long, 4 times the address length in IPv4. IPv4.
  • 28.
    19.28 An IPv6 addressis 128 bits long. Note
  • 29.
    19.29 Figure 19.14 IPv6address in binary and hexadecimal colon notation
  • 30.
  • 31.
    19.31 Expand the address0:15::1:12:1213 to its original. Example 19.11 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.
  • 32.
    19.32 Table 19.5 Typeprefixes for IPv6 addresses
  • 33.
    19.33 Table 19.5 Typeprefixes for IPv6 addresses (continued)
  • 34.
    19.34 Figure 19.16 Prefixesfor provider-based unicast address
  • 35.
  • 36.
    19.36 Figure 19.18 Reservedaddresses in IPv6
  • 37.
    19.37 Figure 19.19 Localaddresses in IPv6
  • 38.
    20.38 20-3 IPv6 20-3 IPv6 Thenetwork layer protocol in the TCP/IP protocol The network layer protocol in the TCP/IP protocol suite is currently IPv4. Although IPv4 is well designed, suite is currently IPv4. Although IPv4 is well designed, data communication has evolved since the inception of data communication has evolved since the inception of IPv4 in the 1970s. IPv4 has some deficiencies that IPv4 in the 1970s. IPv4 has some deficiencies that make it unsuitable for the fast-growing Internet. make it unsuitable for the fast-growing Internet. Advantages Packet Format Extension Headers Topics discussed in this section: Topics discussed in this section:
  • 39.
    20.39 Figure 20.15 IPv6datagram header and payload
  • 40.
    20.40 Figure 20.16 Formatof an IPv6 datagram
  • 41.
    20.41 Table 20.6 Nextheader codes for IPv6
  • 42.
    20.42 Table 20.7 Prioritiesfor congestion-controlled traffic
  • 43.
    20.43 Table 20.8 Prioritiesfor noncongestion-controlled traffic
  • 44.
    20.44 Table 20.9 Comparisonbetween IPv4 and IPv6 packet headers
  • 45.
  • 46.
    20.46 Table 20.10 Comparisonbetween IPv4 options and IPv6 extension headers
  • 47.
    20.47 20-4 TRANSITION FROMIPv4 TO IPv6 20-4 TRANSITION FROM IPv4 TO IPv6 Because of the huge number of systems on the Because of the huge number of systems on the Internet, the transition from IPv4 to IPv6 cannot Internet, the transition from IPv4 to IPv6 cannot happen suddenly. It takes a considerable amount of happen suddenly. It takes a considerable amount of time before every system in the Internet can move from time before every system in the Internet can move from IPv4 to IPv6. The transition must be smooth to prevent IPv4 to IPv6. The transition must be smooth to prevent any problems between IPv4 and IPv6 systems. any problems between IPv4 and IPv6 systems. Dual Stack Tunneling Header Translation Topics discussed in this section: Topics discussed in this section:
  • 48.
    20.48 Figure 20.18 Threetransition strategies
  • 49.
  • 50.
  • 51.
    20.51 Figure 20.21 Headertranslation strategy
  • 52.

Editor's Notes