1 Logical Addressing
1 Logical Addressing
HIAST
Network Layer
Design issues: Logical addressing: Host-to-Host communication service. Internetworking Routing: Maintaining a routing table for
each possible destination network.
Logical Addressing
Address Space Notations Classful Addressing Classless Addressing Network Address Translation (NAT)
The IPv4 addresses are unique and universal. The address space of IPv4 is 32 2 or 4,294,967,296.
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
NetID, HostID
Length of NetId and HostId is predetermined in classfull addressing, Mask is also used (32 bit number made of contiguous 1s followed by a contiguous 0s)
/n: The Mask in form slash notation, or Classless InterDomain Routing notation
7
Classless Addressing
Address depletion; Class A too big; Class C too small. Classful addressing, which is almost obsolete, is replaced with classless addressing.
Restrictions: The addresses are contiguous. The number of addresses is a power of 2 . 8 The first address must be evenly divisible by the number of addresses
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 the block? The binary representation of the given address is 11001101 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.
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 in the block? The binary representation of the given address is 11001101 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 2 32 Mask = 2 32 28 = 16
10
11
12
Three-levels of hierarchy: subnetting Example cont.: Configuration and addresses in a subnetted network
14
15
16
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
A NAT implementation
19
Addresses in a NAT