0% found this document useful (0 votes)
1 views

Lesson 4.1 Logical Addressing

Chapter 4 discusses the network layer and logical addressing, focusing on IPv4 and IPv6 addresses. It covers topics such as address space, classful and classless addressing, and Network Address Translation (NAT). The chapter emphasizes the transition from classful to classless addressing due to inefficiencies and introduces the structure of IPv6 addresses as a solution to address depletion.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Lesson 4.1 Logical Addressing

Chapter 4 discusses the network layer and logical addressing, focusing on IPv4 and IPv6 addresses. It covers topics such as address space, classful and classless addressing, and Network Address Translation (NAT). The chapter emphasizes the transition from classful to classless addressing due to inefficiencies and introduces the structure of IPv6 addresses as a solution to address depletion.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 36

Chapter 4

4.1 Network Layer:


Logical Addressing

4.1.1
4.1-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.

Topics discussed in this section:


Address Space
Notations
Classful Addressing
Classless Addressing
Network Address Translation (NAT)

4.1.2
The address space of IPv4 is
232 or 4,294,967,296.

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

4.1.3
Example 4.1.1

Change the following IPv4 addresses from binary


notation to dotted-decimal notation.

Solution

4.1.4
Example 4.1.2

Change the following IPv4 addresses from dotted-decimal


notation to binary notation.

Solution
We replace each decimal number with its binary
equivalent .

4.1.5
Example 4.1.3

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

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.
4.1.6
Classful addressing
In classful addressing, the address space is
divided into five classes:
A, B, C, D, and E.
Figure 4.1.2 Finding the classes in binary and dotted-decimal notation

4.1.7
Example 4.1.4

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

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.
4.1.8
Table 4.1 Number of blocks and block size in classful IPv4 addressing

In classful addressing, a large part of


the available addresses were wasted.

4.1.9
Table 4.1.2 Default masks for classful addressing

CIDR = Classless Inter-Domain Routing

Classful addressing, which is almost


obsolete, is replaced with classless
addressing.

4.1.10
Figure 4.1.3 A block of 16 addresses granted to a small organization

4.1.11
Classless Addressing

Figure 4.1.4 A network configuration for the block 205.16.37.32/28

4.1.12
Note

The first address in a block is


normally not assigned to any device;
it is used as the network address that
represents the organization
to the rest of the world.

4.1.13
Figure 4.1.5 Two levels of hierarchy in an IPv4 address

4.1.14
Figure 4.1.6 A frame in a character-oriented protocol

4.1.15
Note

Each address in the block can be


considered as a two-level
hierarchical structure:
the leftmost n bits (prefix) define
the network;
the rightmost 32 − n bits define
the host.

4.1.16
Figure 4.1.7 Configuration and addresses in a subnetted network

4.1.17
Figure 4.1.8 Three-level hierarchy in an IPv4 address

4.1.18
Example 4.10

An ISP is granted a block of addresses starting with


190.100.0.0/16 (65,536 addresses). The ISP needs to
distribute these addresses to three groups of customers as
follows:
a. The first group has 64 customers; each needs 256
addresses.
b. The second group has 128 customers; each needs 128
addresses.
c. The third group has 128 customers; each needs 64
addresses.
Design the subblocks and find out how many addresses
are still available after these allocations.
4.1.19
Figure 4.1.9 An example of address allocation and distribution by an ISP

4.1.20
Table 4.1.3 Addresses for private networks

4.1.21
Network Address Translation (NAT)

Figure 4.1.10 A NAT implementation

4.1.22
Figure 4.1.11 Addresses in a NAT

4.1.23
Figure 4.1.12 NAT address translation

4.1.24
Table 4.1.4 Five-column translation table

4.1.25
Figure 4.1.13 An ISP and NAT

4.1.26
4.1-2 IPv6 ADDRESSES

Despite all short-term solutions, address depletion is


still a long-term problem for the Internet. This and
other problems in the IP protocol itself have been the
motivation for IPv6.

Topics discussed in this section:


Structure
Address Space

4.1.27
Figure 4.1.14 IPv6 address in binary and hexadecimal colon notation

An IPv6 address is 128 bits long.

4.1.28
Figure 4.1.15 Abbreviated IPv6 addresses

4.1.29
Example 4.1.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.

4.1.30
Table 4.1.5 Type prefixes for IPv6 addresses

4.1.31
Table 4.1.5 Type prefixes for IPv6 addresses (continued)

4.1.32
Figure 4.1.16 Prefixes for provider-based unicast address

4.1.33
Figure 4.1.17 Multicast address in IPv6

4.1.34
Figure 4.1.18 Reserved addresses in IPv6

4.1.35
Figure 4.1.19 Local addresses in IPv6

4.1.36

You might also like