74
7/23/2019 ComputerCommunicationNetwork 6 Network Layer http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 1/74 Logical addressing NETWORK LAYER NEHA SHANKAR, ASSISTANT PROFESSOR, VVCE,MYSORE 

ComputerCommunicationNetwork 6 Network Layer

Embed Size (px)

Citation preview

Page 1: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 1/74

Logicaladdressing

N ETW OR K LAYER 

N E H A S H A N K A R ,

A S S I S TA N T P R O F E S SO R ,

V V C E , M Y S O R E  

Page 2: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 2/74

Ipv4 addresses

Ipv6 addresses

Ipv4 and Ipv6 Transit ion f rom Ipv4 to Ipv6.

Page 3: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 3/74

An IPv4 address is 32 bi ts long.

IPv4 addresses are unique. They are unique in the sense thateach address def ines one, and only one, connecti on to theInternet.

Two devices on the Internet can never have the same address atthe same time.

By using some strategies, an address may be assigned to adevice for a t ime period and then taken away and assigned toanother device.

On the other hand, if a device operati ng at t he network l ayer hasm connecti ons to the Int ernet, i t needs to have m addresses.

I P V4 A D D R ES S ES

Page 4: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 4/74

A protocol such as IPv4 that defines addresses has an address space.

An address space is t he tot al num ber of addresses used by theprotocol.

If a protocol uses N bit s to defi ne an address, t he address space is2 ^N .

IPv4 uses 32-bit addresses, which means that the address space is2^ 32 or 4,294 ,967,29 6 (more than 4 bil l ion).

This means that, more than 4 billion devices could be connected to theInternet.

The actual number is much less because of the restrictions imposed onthe addresses.

ADDRESS SPACE

Page 5: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 5/74

There are two notations to show an IPv4 address:

Binary notat ion and dott ed decimal notat ion.

Binary Nota t i on 

In binary notat ion, the IPv4 address is displayed as 32 bi t s.

Each octet i s oft en referred to as a byte.

IPv4 address referred to as a 32-bit address or a 4 -byte

address.

The foll owing is an example of an IPv4 address in binarynotation

01110101 10010101 00011101 00000010

NOTATIONS

Page 6: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 6/74

Dot ted-Dec im a l Nota t ion 

To make the IPv4 address more compact and easier to read,

Internet addresses are usually writt en in decimal form with adecimal point (dot) separating the bytes.

The following is the dotted decimal notation of the aboveaddress

117.149.29.2

Page 7: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 7/74

 DOTTED-DECIMAL NOTAT ION AND BINARY

 NOTATION FOR AN IPV4 ADDRESS 

Note that because each byte (octet) is 8 bits, each number in dotted-decimal notation isa value ranging from 0 to 255.

Page 8: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 8/74

Change the foll owing IPv4 addresses from binary notat ion todotted-decimal notati on.

a. 10000001 0 0001011 00001011 11101111

b. 11000001 10000011 0 0011011 111111 11

a. 129.11.11.239

b. 193 .131.27.255

Page 9: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 9/74

Change the fol lowing IPv4 addresses from dott ed-decimalnotati on to binary notati on.

a. 111.56.45.78

b. 221 .34.7.82

a.01101111 00111000 00101101 01001110

b. 11011101 0010 0010 000 00111 01010010

Page 10: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 10/74

Find t he error, if any, in the foll owing IPv4 addresses.

a. 111.56.045.78

b. 221 .34.7.8.20

c. 75.45 .301.14

d. 11100010.23.14.67

a. There must be no leading zero (045).

b. There can be no more than four numbers in an IPv4address.

c. Each number needs to be less than or equal to 25 5 (301 isoutside this range).

d. A mixture of binary notat ion and dotted-decimal notati on isnot al lowed

Page 11: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 11/74

CLASSFULL ADDRESSING

CLASSLESS ADDRESSING

Page 12: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 12/74

In classful addressing, the address space is divided into fiveclasses: A, B, C, D, and E.

Each class occupies some part of the address space.

If the address is given in binary notation, the first few bits can tell

us the class of the address.

If the address is given in decimal-dotted notation, the first byte

defines the class.

CLASSFUL ADDRESSING

Page 13: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 13/74

Page 14: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 14/74

Find the class of each address.

a. 00000001 00 001011 00001011 11101111

b. 11000001 10000011 0 0011011 11111111

c. 14.23 .120.8

d. 252 .5.15 .111

a. The f ir st bit is O. This is a class A address.

b. The fi rst 2 bi ts are 1; t he third bit is O. This is a class C

address.

c. The fi rst byte i s 14 (between 0 and 127); the class is A.

d. The fi rst byte i s 252 (between 240 and 255 ); the class is E.

Page 15: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 15/74

Problem wit h classful addressing is that each class is dividedinto a fixed number of blocks with each block having a fixed

size as shown in Table

CLASSES AND BLOCKS 

Page 16: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 16/74

Class A addresses were designed for large organizations The most of the addresses were wasted and were not used.

Class B addresses were designed for midsize organizations Class B is also too large for many organizations.

Class C addresses were designed for small organizations Class C is too small for many organizations.

Class D addresses were designed for multicasting Each addresses in this class is used to define one group of

hosts on the Internet.

Class E addresses were reserved for future use. Only a few used, resulting in another waste of addresses.

In classfull addressing, a large part of the available addresses were wasted.

CLASSFULL ADDRESSING

Page 17: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 17/74

I n c l a s s f u l a d d r e s si n g , a n I P a d d r e s s in c l a s s A , B , o r C is d i v id e d i n t o n e t i da n d h o s t i d .

T h e s e p a r t s a r e o f v a r y i n g le n g t h s , d e p e n d i n g o n t h e c l a s s o f t h e a d d r e s s .

net ID def ines a Network , and host ID def ines a host i n the networks .

NETID AND HOSTID 

Page 18: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 18/74

The length of t he netid and hosti d (in bit s) is predeterminedin classful addressing, we can also use a mask (also called

the default mask)

It is a 32-bit number made of contiguous 1s followed by

contiguous 0s.

The masks for classes A, B, and C are shown in Table. The

concept does not apply to classes D and E.

MASK 

Page 19: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 19/74

The mask can help us to fi nd the netid and the hostid.

For example, the mask for a class A address has eight 1s,which means the fir st 8 bit s of any address in class A definethe neti d, the next 24 bits define the hosti d.

The last column shows the mask in the form / n where n canbe 8, 16 , or 24 in classful addressing.

This notat ion is also called slash notat ion or ClasslessInterdomain Routing (CIDR) notat ion.

The notation is used in classless addressing.

Page 20: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 20/74

During the era of classful addressing, subnetti ng wasintroduced.

If an organizat ion was granted a large block in class A or B, itcould divide the addresses into several contiguous groups and

assign each group to smaller networks (called subnets)

SUBNETTING 

Page 21: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 21/74

The t ime came when most of t he class A and class Baddresses were depleted.

Even a midsize organizat ion needed more addresses. Onesolution was supernetting.

In supernetting, an organization can combine several class Cblocks to create a larger range of addresses.

In other words, several networks are combined t o create a

supernetwork or a supemet.

SUPERNETTING 

Page 22: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 22/74

To overcome address depletion and give more organizations access tothe Internet, classless addressing was designed and implemented.

In t his scheme, t here are no classes, but t he addresses are st il lgranted in blocks.

In classless addressing, when an enti t y, smal l or l arge, needs to beconnected to the Internet, it is granted a block (range) of addresses.

The size of t he block (the num ber of addresses) varies based on thenature and size of the entity.

For example, a household may be given only two addresses; a large

organization may be given thousands of addresses. An ISP, as theInternet service provider, may be given t housands of addresses to servemany number of customers.

CLASSLESS ADDRESSING

Page 23: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 23/74

To simplify the handling of addresses, the Internet authoritiesimpose three rest rict ions on classless address blocks:

1 . The addresses in a block must be contiguous, one aft eranother.

2. The number of addresses in a block must be a power of 2 (I,2, 4 , 8, ... ).

3. The fi rst address must be evenly divisible by the number of

addresses.

Page 24: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 24/74

 Figure 19.3 shows a b lock o f addresses , in both b inary and dotted-

decimal notation, granted to a small business that needs 16 addresses.

 We can see that the restrictions are applied to this block. The addresses

are contiguous. The number of addresses is a power of 2 (16 = 2 4), and 

the first address is divisible by 16. The first address, when converted toa decimal number, is 3,440,387,360, which when divided by 16 results

in 215,024,210.

Page 25: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 25/74

A bett er way to def ine a block of addresses is to select anyaddress in the block and the mask.

A mask is a 32 -bit number in which the n left most bits are 1sand the 32 - n rightmost bit s are Os.

In classless addressing the mask for a block can take anyvalue from 0 to 32 .

It is very convenient to give just t he value of n preceded by a

slash (CIDR notat ion).

MASK 

Page 26: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 26/74

Page 27: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 27/74

19.27

In IPv4 addressing, a block of

addresses can be defined asx.y.z.t /n

in which x.y.z.t defines one of the

addresses and the /n defines the mask.

 Note

Page 28: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 28/74

19.28

The first address in the block can be

found by setting the rightmost32 − n bits to 0s.

 Note

Page 29: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 29/74

19.29

 A block of addresses is granted to a small organization.We know that one of the addresses is 205.16.37.39/28.

What is the first address in the block?

Solution

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 0010000

 or 205.16.37.32.

 Example 19.6 

Page 30: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 30/74

19.30

The last address in the block can be

found by setting the rightmost32 − n bits to 1s.

 Note

Page 31: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 31/74

19.31

 Find the last address for the block in Example 19.6.

Solution

The binary representation of the given address is

11001101 00010000 00100101 00100111

 If we set 32 − 28 rightmost bits to 1, we get11001101 00010000 00100101 00101111

 or

 205.16.37.47 

 Example 19.7 

Page 32: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 32/74

19.32

The number of addresses in the block

can be found by using the formula232−n.

 Note

Page 33: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 33/74

19.33

 Find the number of addresses in Example 19.6.

 Example 19.8

Solution

The value of n is 28, which means that number

 of addresses is 2 32− 28 or 16.

Page 34: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 34/74

19.34

 Another way to find the first address, the last address, and 

 the number of addresses is to represent the mask as a 32- bit binary (or 8-digit hexadecimal) number. This is

 particularly useful when we are writing a program to find 

 these pieces of information. In Example 19.5 the /28 can

 be represented as11111111 11111111 11111111 11110000

(twenty-eight 1s and four 0s).

 Find 

 a. The first address b. The last address

 c. The number of addresses.

 Example 19.9

Page 35: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 35/74

19.35

Solution a. The first address can be found by ANDing the given

 addresses with the mask. ANDing here is done bit by

 bit. The result of ANDing 2 bits is 1 if both bits are 1s;

 the result is 0 otherwise.

 Example 19.9 (continued)

Page 36: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 36/74

19.36

 b.  The last address can be found by ORing the given

 addresses with the complement of the mask. ORing

 here is done bit by bit. The result of ORing 2 bits is 0 if 

 both bits are 0s; the result is 1 otherwise. The

 complement of a number is found by changing each 1

 to 0 and each 0 to 1.

 Example 19.9 (continued)

Page 37: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 37/74

19.37

 c.   The number of addresses can be found by complementing the mask, interpreting it as a decimal 

 number, and adding 1 to it.

 Example 19.9 (continued)

Page 38: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 38/74

When an organizat ion i s given a block of addresses, the organization i sfree to allocate the addresses to the devices that need to be connected tothe Internet.

The organization net work i s connected t o the Int ernet via a rout er. Therouter has two addresses.

One belongs to the granted block; the other belongs to the network that is at t he other side of t he router.

We call the second address x .y.z. t / n because we do not k now anyt hingabout the network it is connected t o at t he other side.

All messages destined for addresses in the organization block(205 .16.37.32 to 20 5.16.37.47) are sent, directl y or indirectl y, to x .y.z. t / n .

We say directly or indirectly because we do not know the structure of thenetwork t o which the other side of t he router is connected.

NETWORK ADDRESSES 

Page 39: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 39/74

Page 40: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 40/74

The first address in a block is

normally not assigned to any device;it is used as the network address

that represents the organization tothe rest of the world.

Page 41: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 41/74

The n lef tm ost bit s of t he address x.y.z. t / n define the network(organization network);

The 32 – n rightmost bit s define the part icular host (computer orrouter) to t he network.

The two common terms are prefix and suffix.

The part of the address that defines the network is called theprefix.

The part t hat defi nes the host is called the suff ix.

The prefix is common to all addresses in the network; the suffixchanges from one device t o another.

TWO-LEVEL HIERARCHY 

Page 42: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 42/74

THREE-LEVELS OFHIERARCHY 

An organization that is granted a large block of addresses may want tocreate clusters of network s (call ed subnets) and divide t he addressesbetween t he dif ferent subnets.

The rest of the world st il l sees the organization as one entit y, butinternally there are several subnets.

All messages are sent to the router address that connects theorganizat ion t o the rest of t he Internet.

the router routes the message to the appropriate subnets.

The organizati on, however, needs to create small subblocks ofaddresses, each assigned to specific subnets.

The organization has it s own mask ; each subnet m ust also have it sown.

Page 43: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 43/74

As an example, suppose an organizati on is given the block 17.12 .40 .0/ 26 ,which cont ains 6 4 addresses. The organization has three of fi ces and needsto divide the addresses into t hree subblocks of 3 2, 16 , and 16 addresses.

We can find the new masks by using the following arguments:

Suppose the mask for the first subnet is n1, then 2^(32 - n1) must be 32

n1 = ?

Suppose the mask f or the second subnet i s n2, t hen 2^(32 - n2) must be 16

n2=?

Suppose the mask for the thi rd subnet is n3, then 2^(32 - n3) must be 16

n3 =?

This means that we have the masks 27, 2 8, 28 wit h the organization m ask

being 26.

Page 44: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 44/74

Page 45: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 45/74

Find t he subnet addresses from one of the addresses in t hesubnet.

17.12.14.29/ 27

17.12.14.45/ 28

17.12.14.50/ 28

17.12.14.0

17.12.14.32

17.12.14.48

Page 46: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 46/74

Page 47: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 47/74

The struct ure of classless addressing does not r estri ct t he number ofhierarchical levels.

An organization can divide the granted block of addresses into subblocks.

Each subblock can in t urn be divided int o smaller subblocks. And so on.

One exampl e of t his is seen in t he ISPs. A nati onal ISP can divide a grant edlarge block int o small er blocks and assign each of t hem t o a regional ISP.

A regional ISP can divide t he block r eceived fr om t he nati onal ISP int osmall er bl ocks and assign each one to a l ocal ISP.

A local ISP can divide t he block received from t he regional ISP into small erblocks and assign each one to a different organization.

Final ly, an organizati on can divide t he received block and make severalsubnets out of i t.

MORE LEVELS OFHIERARCHY 

Page 48: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 48/74

The ultimate responsibility of address allocation is given to aglobal authorit y called t he In te rne t Corpora t i on f o r Assigned

Names and Addresses (ICANN)

ICANN does not normal ly al locate addresses to i ndividualorganizations. It assigns a large block of addresses to an ISP.

Each ISP, in t urn, divides it s assigned block into smal lersubblocks and grants the subblocks to its customers

This is called Address Aggregation.

Many blocks of addresses are aggregated in one block andgranted to one ISP.

ADDRESS ALLOCATION 

Page 49: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 49/74

An ISP is granted a block of addresses start ing wit h19 0.100 .0.0/ 16 (65,536 addresses). The ISP needs to

dist ribut e these addresses to t hree groups of customers asfollows:

a. The fi rst group has 64 customers; each needs 256

addresses. b. The second group has 128 customers; each needs 128

addresses.

c. The thi rd group has 128 customers; each needs 64

addresses.

Design the subblocks and find out how many addresses are

stil l available af ter t hese allocat ions. (10 marks quest ion)

Page 50: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 50/74

Page 51: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 51/74

Page 52: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 52/74

Page 53: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 53/74

An IPv6 address consists of 16 bytes (Octets); it is 128 bits

long.

Hexadeximal Colon Notation

In this notation, 128 bits is divided into eight sections, each 2bytes in length.

Therefore, the address consists of 32 hexadecimal digits, with

every four digits separated by a colon.

IPV6 ADDRESSES

Page 54: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 54/74

Although the IP address, even in hexadecimal format, is very

long, many of the digits are zeros.

The leading zeros of a section (four digits between two colons)

can be omitted.

Only the leading zeros can be dropped, not the trailing zeros.

ABBREVIATION

Page 55: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 55/74

Expand the address 0:15::1:12:1213 to i ts original .

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 now many Os we need to

replace the double colon.

Page 56: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 56/74

IPv6 has a much larger address space; 2^128 addresses are

available.

The designers of IPv6 divided the address into several categories.

A few leftmost bits, called the type prefix, in each address define

its category.

The type prefix is variable in length, but it is designed such that

no code is identical to the first part of any other code

ADDRESS SPACE

Page 57: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 57/74

Page 58: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 58/74

Page 59: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 59/74

Unicast Address

Multicast Address

Anycast Address

Reserved Address

Local Address

Page 60: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 60/74

A unicast address defines a single computer.

The packet sent to a unicast address must be delivered to that

specific computer.

IPv6 defines two types of unicast addresses: geographically

based and provider-based.

We discuss the second type here; the first type is left for future

definition.

The provider-based address is generally used by a normal host as

a unicast address.

UNICAST ADDRESSES

Page 61: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 61/74

Type identifier. This 3-bit field defines the address as a provider-basedaddress.

Registry identifier. This 5-bit field indicates the agency that hasregistered the address.

Cur rent ly three regist r y cent ers have been def ined. INTERNIC (code11000) is the center for North America; RIPNIC (code 01000) is thecenter for European registration; and APNIC (code 10100) is for Asianand Pacific countries.

Provider identifier. Thi s vari able-length f ield i dent i f ies the provider forI nternet access (such as an I SP).

A 16-bit length is recommended for this field.

Page 62: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 62/74

o Subscriber identifier . When an organization subscribes to the

Internet through a provider, it is assigned a subscriber

identification. A 24-bit length is recommended for this field.

Subnet identifier. Each subscriber can have many different

subnetworks, and each subnetwork can have an identifier. A 32-

bit length is recommended for this field.

Node identifier . The last field defines the identity of the node

connected to a subnet. A length of 48 bits is recommended for

this field.

Page 63: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 63/74

Multicast addresses are used to define a group of hosts instead of

 just one.

A packet sent to a multicast address must be delivered to each

member of the group.

MULTICAST ADDRESSES

Page 64: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 64/74

The second f ield is a f lag that defines the group address as ei ther permanent ort ransient .

A permanent group address is defined by the Internet authorit ies and can beaccessed at al l t imes.

A transient group address, on the other hand, is used only temporarily.

Systems engaged in a teleconference, for example, can use a t ransient groupaddress .

The thi rd f ield defines the scope of the group address .

Page 65: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 65/74

An anycast address is similar to a multicast address, also defines

a group of nodes.

However, a packet destined for an anycast address is delivered to

only one of the members of the anycast group.

ANYCAST ADDRESSES

Page 66: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 66/74

Another category in the address space is the reserved address.

These addresses start with eight Os (type prefix is 00000000).

RESERVED ADDRESSES

Page 67: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 67/74

An unspecified address is used when a ho st does not know its own address

and sends an inquiry to find its address.

A loopback address is used by a host to test i tself without going into the

network.

The loopback interface has no hardware associated with it , and it is not

physically conn ected to a network.it is a software loopback interface of a

machine to test IP software

Page 68: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 68/74

A compatible address is used during the transition from IPv4 to

IPv6. It is used when a computer using IPv6 wants to send a

message to another computer using IPv6, but the message needs

to pass through a part of the network that still operates in IPv4.

A mapped address is also used during transition. However, it is

used when a computer that has migrated to IPv6 wants to send apacket to a computer still using IPv4.

Page 69: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 69/74

These addresses are used when an organization wants to use IPv6 protocolwithout being connected to the global Internet.

In other words, they provide addressing for private networks.

Nobody outside the organization can send a message to the nodes using these

addresses.

A link local address is used in an isolated subnet;

A site local address is used in several subnets.

LOCAL ADDRESSES

Page 70: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 70/74

Transition from Ipv4 to Ipv6.

Page 71: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 71/74

Page 72: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 72/74

It is recommended that all hosts, before migrating completely to

version 6, have a dual stack of protocols.

In other words, a station must run IPv4 and Ipv6 simultaneously

until all the Internet uses IPv6.

DUAL STACK

Page 73: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 73/74

It is a strategy used when two computers using IPv6 want tocommunicate with each other and the packet must pass through aregion that uses IPv4.

To pass through this region, the packet must have an IPv4address.

So the IPv6 packet is encapsulated in an IPv4 packet when itenters the region, and it leaves its capsule when it exits theregion.

It seems as if the IPv6 packet goes through a tunnel at one endand emerges at the other end.

TUNNELING

Page 74: ComputerCommunicationNetwork 6 Network Layer

7/23/2019 ComputerCommunicationNetwork 6 Network Layer

http://slidepdf.com/reader/full/computercommunicationnetwork-6-network-layer 74/74

Header translation is necessary when the majority of the Internet

has moved to IPv6 but some systems still use IPv4.

The sender wants to use IPv6, but the receiver does not

understand IPv6.

In this case, the header format must be totally changed through

header translation. The header of the IPv6 packet is converted to

an IPv4 header

HEADER TRANSLATION