1 Logical Addressing

20
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 KHORZOM 1

Transcript of 1 Logical Addressing

Page 1: 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

Page 2: 1 Logical Addressing

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

Page 3: 1 Logical Addressing

Address Space

Notations

Classful Addressing

Logical Addressing

Classful Addressing

Classless Addressing

Network Address Translation (NAT)

3

Page 4: 1 Logical Addressing

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

Page 5: 1 Logical Addressing

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

Page 6: 1 Logical Addressing

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

Page 7: 1 Logical Addressing

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

Page 8: 1 Logical Addressing

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

Page 9: 1 Logical Addressing

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

Page 10: 1 Logical Addressing

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

Page 11: 1 Logical Addressing

A network configuration for the block 205.116.37.32/28

11

Page 12: 1 Logical Addressing

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

Page 13: 1 Logical Addressing

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

Page 14: 1 Logical Addressing

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

Page 15: 1 Logical Addressing

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

Page 16: 1 Logical Addressing

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

Page 17: 1 Logical Addressing

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

Page 18: 1 Logical Addressing

Example (continued) :

18

Page 19: 1 Logical Addressing

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

Page 20: 1 Logical Addressing

Addresses in a NAT

NAT: Translation Table?

20