1 Logical Addressing
-
Upload
hasan-ahmad -
Category
Documents
-
view
221 -
download
1
Transcript of 1 Logical Addressing
Data Communications and
Networking II
Higher Institute for Applied Sciences and Technology
Telecommunication department
Fifth year
2013-2014 HIAST
Networking II
Prepared by Dr. Khaldoun KHORZOM1
Network Layer
Design issues:
• Logical addressing: Host-to-Host communication service.
• Internetworking Routing: Maintaining a routing table for
each possible destination network.
• Protocol Data Unit (PDU) lifetime: Preventing a PDU to • Protocol Data Unit (PDU) lifetime: Preventing a PDU to
loop indefinitely through the Internet.
• Fragmentation and Re-assembly
• Error control
• Flow control
2
Address Space
Notations
Classful Addressing
Logical Addressing
Classful Addressing
Classless Addressing
Network Address Translation (NAT)
3
An IPv4 address is 32 bits long.
The IPv4 addresses are unique
and universal.and universal.
The address space of IPv4 is
or 4,294,967,296.322
4
Dotted-decimal notation and binary notation
for an IPv4 address
Rules of notation: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.5
The classes in binary and dotted-decimal notation
In classful addressing, the address space is divided into five classes:A, B, C, D, and E.
Number of blocks
and block size in
classful IPv4
addressing6
Default masks for classfull addressing
NetID, HostID
� Length of NetId and HostId is predetermined in classfull
addressing,
•Mask is also used (32 bit number made of contiguous 1’s
followed by a contiguous 0’s)
Default masks for classfull addressing
/n: The Mask in form slash notation, or Classless InterDomain Routing notation
7
Address depletion; Class A too big; Class C too small.
Classful addressing, which is almost obsolete, is replaced with
classless addressing.
Ex: A block of 16 addresses granted to a small organization
Classless Addressing
Restrictions:The addresses are contiguous. The number of addresses is a power of 2 .The first address must be evenly divisible by the number of addresses8
In IPv4 addressing, a block of addresses can be defined as
x.y.z.t /n in which x.y.z.t defines one of the addresses and
the /n defines the mask.
The first address in the block can be found by setting the
rightmost 32 − n bits to 0s.
An addresses is 205.16.37.39/28. What is the first address in theblock?block?
The binary representation of the given address is11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, we get 11001101 00010000 00100101 00100000
(ANDing the address with the Mask)or
205.16.37.32. 9
The last address in the block can be found by setting the rightmost 32 − n bits to 1s.
An addresses is 205.16.37.39/28. What is the last address inthe block?
The binary representation of the given address is11001101 00010000 00100101 0010011111001101 00010000 00100101 00100111
If we set 32 − 28 rightmost bits to 1, we get 11001101 00010000 00100101 00101111
(ORing the address with the complement of the Mask)or
205.16.37.47
Number of addresses equals 1622 283232==
−−Mask
10
A network configuration for the block 205.116.37.32/28
11
Three-levels of hierarchy: subnetting
Example: Configuration and addresses in a subnetted network
An organization is given the
block 17.12.14.0/26, which
contains 64 addresses.
The organization has three The organization has three
offices and needs to divide the
addresses into three subblocks
of 32, 16, and 16 addresses.
Suppose the mask of the first
subnet is n1, then must
be 32, which means that:
n1=27
…
1322 n−
12
Three-levels of hierarchy: subnetting
Example cont.: Configuration and addresses in a subnetted network
More levels of hierarchy
Classless addressing doesn’t restrict the number of hierarchical
levels.
Example: A National ISP can divide a granted large block into a
smaller blocks and assign each of them to a regional ISP; A
Regional ISP … local ISP; A local ISP … organization; An
organization … subnets. 13
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.
Example: Address allocation and distribution by an ISP
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.
14
Group 1:
For this group, each customer needs 256 addresses. This means that 8
bits are needed to define each host.
The prefix length is then 32 − 8 = 24.
Example (continued):
The addresses are:
15
Group 2:
For this group, each customer needs 128 addresses. This means that 7
bits are needed to define each host.
The prefix length is then 32 − 7 = 25.
The addresses are:
Example (continued) :
The addresses are:
16
Group 3:For this group, each customer needs 64 addresses. This means that 6
bits are needed to each host.
The prefix length is then 32 − 6 = 26.
The addresses are:
Example (continued) :
Number of granted addresses to the ISP: 65,536
Number of allocated addresses by the ISP: 40,960
Number of available addresses: 24,576 17
Example (continued) :
18
NAT: Network Address Translation
Addresses for private networks
With the shortage of addresses, a quick solution to this problem is
called: Network Address Translation (NAT). It enables a user to
have a large set of addresses internally, and one address, or a
small set of addresses , externally.
A NAT implementation
networks
19
Addresses in a NAT
NAT: Translation Table?
20