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

Unit - 4 - Network Layer and Addressing

The network layer provides services to allow devices to exchange data using protocols like IPv4 and IPv6. The network layer performs addressing, encapsulation, routing, and de-encapsulation. IP encapsulates higher layer segments and can use either IPv4 or IPv6 packets without impacting the higher layer segment. IP is connectionless, best effort, and media independent. IPv4 addresses are 32-bit addresses that uniquely identify devices on the internet. Address classes include A, B, C, D, and E and determine the number of network and host bits in an IP address.

Uploaded by

patilamrutak2003
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Unit - 4 - Network Layer and Addressing

The network layer provides services to allow devices to exchange data using protocols like IPv4 and IPv6. The network layer performs addressing, encapsulation, routing, and de-encapsulation. IP encapsulates higher layer segments and can use either IPv4 or IPv6 packets without impacting the higher layer segment. IP is connectionless, best effort, and media independent. IPv4 addresses are 32-bit addresses that uniquely identify devices on the internet. Address classes include A, B, C, D, and E and determine the number of network and host bits in an IP address.

Uploaded by

patilamrutak2003
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 109

Unit 4

Network Layer and addressing


8.1 Network Layer
Characteristics

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
Network Layer Characteristics

The Network Layer


• Provides services to allow end devices to
exchange data
• IP version 4 (IPv4) and IP version 6
(IPv6) are the principle network layer
communication protocols.
• The network layer performs four basic
operations:
• Addressing end devices
• Encapsulation
• Routing
• De-encapsulation
Network Layer Characteristics

IP Encapsulation
• IP encapsulates the transport
layer segment.
• IP can use either an IPv4 or
IPv6 packet and not impact the
layer 4 segment.
• IP packet will be examined by
all layer 3 devices as it traverses
the network.
• The IP addressing does not
change from source to
destination.
Note: NAT will change addressing,
but will be discussed in a later
module.
Network Layer Characteristics

Characteristics of IP
IP is meant to have low overhead and may be described as:
– Connectionless
– Best Effort
– Media Independent
Network Layer Characteristics

IP is Connectionless
Connectionless
• IP does not establish a connection with the destination before sending
the packet.
• There is no control information needed (synchronizations,
acknowledgments, etc.).
• The destination will receive the packet when it arrives, but no pre-
notifications are sent by IP.
• If there is a need for connection-oriented traffic, then another protocol will
handle this (typically TCP at the transport layer).
Network Layer Characteristics

IP is Best Effort
Best Effort
• IP will not guarantee
delivery of the packet.
• IP has reduced overhead
since there is no mechanism
to resend data that is not
received.
• IP does not expect
acknowledgments.
• IP does not know if the other
device is operational or if it
received the packet.
Network Layer Characteristics

Media Independent
IP is unreliable:
– It cannot manage or fix
undelivered or corrupt packets.
– IP cannot retransmit after an
error.
– IP cannot realign out of sequence
packets.
– IP must rely on other protocols for
these functions.

IP is media Independent:
– IP does not concern itself with
the type of frame required at
the data link layer or the media
type at the physical layer.
– IP can be sent over any media
type: copper, fiber, or wireless.
5-1 INTRODUCTION

The identifier used in the IP layer of the TCP/IP protocol


suite to identify each device connected to the Internet is
called the Internet address or IP address. An IPv4 address
is a 32-bit address that uniquely and universally defines
the connection of a host or a router to the Internet; an IP
address is the address of the interface.

TCP/IP Protocol Suite 9


Note

An IPv4 address is 32 bits long.

Note

The IPv4 addresses are unique


and universal.

TCP/IP Protocol Suite 10


Note

The address space of IPv4 is


232 or 4,294,967,296.

Note

Numbers in base 2, 16, and 256 are


discussed in Appendix B.

TCP/IP Protocol Suite 11


Figure 5.1 Dotted-decimal notation

TCP/IP Protocol Suite 12


Example 5.1
Change the following IPv4 addresses from binary notation to dotted-
decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 11100111 11011011 10001011 01101111
d. 11111001 10011011 11111011 00001111

Solution
We replace each group of 8 bits with its equivalent decimal number
(see Appendix B) and add dots for separation:
a. 129.11.11.239
b. 193.131.27.255
c. 231.219.139.111
d. 249.155.251.15

TCP/IP Protocol Suite 13


Example 5.2
Change the following IPv4 addresses from dotted-decimal notation to
binary notation.
a. 111.56.45.78
b. 221.34.7.82
c. 241.8.56.12
d. 75.45.34.78

Solution
We replace each decimal number with its binary equivalent:
a. 01101111 00111000 00101101 01001110
b. 11011101 00100010 00000111 01010010
c. 11110001 00001000 00111000 00001100
d. 01001011 00101101 00100010 01001110

TCP/IP Protocol Suite 14


Example 5.3
Find the error, if any, in the following IPv4 addresses:
a. 111.56.045.78
b. 221.34.7.8.20
c. 75.45.301.14
d. 11100010.23.14.67

Solution
a. There should be no leading zeroes (045).
b. We may not have more than 4 bytes in an IPv4 address.
c. Each byte should be less than or equal to 255.
d. A mixture of binary notation and dotted-decimal notation.

TCP/IP Protocol Suite 15


Example 5.4
Change the following IPv4 addresses from binary notation to
hexadecimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111

Solution
We replace each group of 4 bits with its hexadecimal equivalent. Note
that 0X (or 0x) is added at the beginning or the subscript 16 at the
end.
a. 0X810B0BEF or 810B0BEF16
b. 0XC1831BFF or C1831BFF16
TCP/IP Protocol Suite 16
Example 5.5
Find the number of addresses in a range if the first address is
146.102.29.0 and the last address is 146.102.32.255.

Solution
We can subtract the first address from the last address in base 256 (see
Appendix B). The result is 0.0.3.255 in this base. To find the number
of addresses in the range (in decimal), we convert this number to base
10 and add 1 to the result..

TCP/IP Protocol Suite 17


5-2 CLASSFUL ADDRESSING

IP addresses, when started a few decades ago, used the


concept of classes. This architecture is called classful
addressing. In the mid-1990s, a new architecture, called
classless addressing, was introduced that supersedes the
original architecture. In this section, we introduce classful
addressing because it paves the way for understanding
classless addressing and justifies the rationale for moving
to the new architecture. Classless addressing is discussed
in the next section.

TCP/IP Protocol Suite 18


Topics Discussed in the Section
Classes
Classes and Blocks
Two-Level Addressing
 Three-Level Addressing: Subnetting
 Supernetting

TCP/IP Protocol Suite 19


Figure 5.5 Occupation of address space

TCP/IP Protocol Suite 20


Figure 5.6 Finding the class of address

TCP/IP Protocol Suite 21


Figure 5.7 Finding the class of an address using continuous checking

1 1 1 1
Start
0 0 0 0

Class: A Class: B Class: C Class: D Class: E

TCP/IP Protocol Suite 22


Example 5.10
Find the class of each address:
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 10100111 11011011 10001011 01101111
d. 11110011 10011011 11111011 00001111

Solution
See the procedure in Figure 5.7.
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 bit is 1; the second bit is 0. This is a class B address.
d. The first 4 bits are 1s. This is a class E address.

TCP/IP Protocol Suite 23


Example 5.11
Find the class of each address:
a. 227.12.14.87
b. 193.14.56.22
c. 14.23.120.8
d. 252.5.15.111
Solution
a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 193 (between 192 and 223); the class is C.
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.

TCP/IP Protocol Suite 24


Figure 5.8 Netid and hostid

TCP/IP Protocol Suite 25


Figure 5.9 Blocks in Class A

TCP/IP Protocol Suite 26


Note

Millions of class A addresses


are wasted.

TCP/IP Protocol Suite 27


Figure 5.10 Blocks in Class B

TCP/IP Protocol Suite 28


Note

Many class B addresses are wasted.

TCP/IP Protocol Suite 29


Figure 5.11 Blocks in Class C

TCP/IP Protocol Suite 30


Note

Not so many organizations are so small to


have a class C block.

TCP/IP Protocol Suite 31


Figure 5.12 The single block in Class D

TCP/IP Protocol Suite 32


Note

Class D addresses are made of one block,


used for multicasting.

TCP/IP Protocol Suite 33


Figure 5.13 The single block in Class E

TCP/IP Protocol Suite 34


Note

The only block of class E addresses was


reserved for future purposes.

TCP/IP Protocol Suite 35


Note

The range of addresses allocated to an


organization in classful addressing
was a block of addresses in
Class A, B, or C.

TCP/IP Protocol Suite 36


Figure 5.14 Two-level addressing in classful addressing

TCP/IP Protocol Suite 37


11.2 IPv4 Unicast, Broadcast,
and Multicast

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 38
IPv4 Unicast, Broadcast, and Multicast
Unicast

• Unicast transmission is sending a packet to one destination IP address.

• For example, the PC at 172.16.4.1 sends a unicast packet to the printer at 172.16.4.253.
IPv4 Unicast, Broadcast, and Multicast
Broadcast

• Broadcast transmission is sending a packet to all other destination IP addresses.

• For example, the PC at 172.16.4.1 sends a broadcast packet to all IPv4 hosts.
IPv4 Unicast, Broadcast, and Multicast
Multicast

• Multicast transmission is sending a packet to a multicast address group.

• For example, the PC at 172.16.4.1 sends a multicast packet to the multicast group address
224.10.10.5.
11.3 Types of IPv4 Addresses

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 42
Types of IPv4 Addresses
Public and Private IPv4 Addresses

• As defined in in RFC 1918, public IPv4 addresses are globally routed between internet service
provider (ISP) routers.

• Private addresses are common blocks of Network


addresses used by most organizations to Address and RFC 1918 Private Address
Range
assign IPv4 addresses to internal hosts. Prefix

10.0.0.0/8 10.0.0.0 - 10.255.255.255


• Private IPv4 addresses are not unique and
can be used internally within any network. 172.16.0.0/12 172.16.0.0 - 172.31.255.255
• However, private addresses are not globally routable.192.168.0.0/1 192.168.0.0 -
6 192.168.255.255
Types of IPv4 Addresses
Routing to the Internet

• Network Address Translation (NAT) translates private IPv4 addresses to public IPv4 addresses.

• NAT is typically enabled on


the edge router connecting
to the internet.

• It translates the internal


private address to a public
global IP address.
Types of IPv4 Addresses
Special Use IPv4 Addresses

Loopback addresses
• 127.0.0.0 /8 (127.0.0.1 to 127.255.255.254)
• Commonly identified as only 127.0.0.1
• Used on a host to test if TCP/IP is operational.

Link-Local addresses
• 169.254.0.0 /16 (169.254.0.1 to 169.254.255.254)
• Commonly known as the Automatic Private IP Addressing (APIPA) addresses or self-assigned
addresses.
• Used by Windows DHCP clients to self-configure when no DHCP servers are available.
Types of IPv4 Addresses
Legacy Classful Addressing
RFC 790 (1981) allocated IPv4 addresses in
classes
• Class A (0.0.0.0/8 to 127.0.0.0/8)
• Class B (128.0.0.0 /16 – 191.255.0.0 /16)
• Class C (192.0.0.0 /24 – 223.255.255.0 /24)
• Class D (224.0.0.0 to 239.0.0.0)
• Class E (240.0.0.0 – 255.0.0.0)

• Classful addressing wasted many IPv4 addresses.

Classful address allocation was replaced with classless


addressing which ignores the rules of classes (A, B, C).
Types of IPv4 Addresses
Assignment of IP Addresses

• The Internet Assigned Numbers Authority (IANA) manages and allocates blocks of IPv4 and
IPv6 addresses to five Regional Internet Registries (RIRs).

• RIRs are responsible for allocating


IP addresses to ISPs who provide
IPv4 address blocks to smaller
ISPs and organizations.
5-1

Chapter 5

Subnetting/Supernetting
and
Classless Addressing

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
5-2

A network with two levels of hierarchy (not


subnetted)

The network above (network 141.14.0.0) uses class B addressing, it has


therefore 254x254 = 64516 hosts.
A LAN with 64516 hosts is too big. An additional level of hierarchy is
required in order to brake the large number of hosts into several smaller
groups. For example, we can brake the hosts into four groups (subnets):
Subnet 141.14.0.0 has hosts 141.14.0.1 … 141.14.63.254
Subnet 141.14.64.0 has hosts 141.14.64.1 … 141.14.127.254
Subnet 141.14.128.0 has hosts 141.14.128.1 … 141.14.191.254
Subnet 141.14.192.0 has hosts 141.14.192.1 … 141.14.255.254
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
5-3
A network with three levels of
hierarchy (subnetted)

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
5-4

Addresses in a network with and


without subnetting
Two-level

hierarchy

Three-level 2
hierarchy

Net address: 141.14.0.0


Subnet address: 141.14.192.0
Host address: 141.14.192.2
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Hierarchy concept in a
5-5

telephone number

Equivalent to a Equivalent to a
Net ID Host ID
Equivalent to a
Subnet ID

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Exampl 5-6

e1
IP address: 130.45.34.56
Mask: 255.255.240.0 What is the subnet
address?

IP = 10000010 00101101 00100010 00111000


M= 11111111 11111111 11110000 00000000
&& = 10000010 00101101 00100000 00000000
130 45 32 0

The subnetwork address is 130.45.32.0.


©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Default mask and 5-7

subnet mask

IP address: nnnnnnnn.nnnnnnnn.sshhhhhh.hhhhhhhh
Mask (binary): 11111111.11111111.11000000.00000000
Mask (dec): 255.255.192.0
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Finding the subnetwork address
5-8

Straight Method
Convert IP address into binary form,
AND with the mask,
convert to dot-decimal form

Short-Cut Method:
If the byte in the mask is 255, copy the byte in the
address.
If the byte in the mask is 0, replace the byte in the
address with 0.
If the byte in the mask is neither 255 nor 0, write the
mask and the address in binary and apply the AND
operation (as above).

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Exampl 5-9

e2
IP = 19.30.80.5
M = 255.255.192.0 What is the subnet address?

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
5-10

Comparison of a default mask and a


subnet mask

8, 16 or 24 bits (class A, B or C)

Number of subnets =

23 = 8
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
5-11

Example 3
A company is granted the site address 201.70.64.0
The company needs six subnets. Design the subnets.
Solution:
Company can have 8 subnets (not six)
The given IP is class C, therefore we consider only
the last byte. Subnets:
.00000000 € 201.70.64.0
.00100000 € 2
3
.
4
6
0
7
1
.01000000 € 4
6
.
0
7
1
2
.01100000 € 201.70.64.96
. . . . . . . . . . . . . . .
.11000000 € 2
9
1
.
4
6
0
7
.11100000 € 4
2
.
6
0
7
1

Subnet mask = 255.255.255.224


©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
5-12

Range of the host


addresses in 1st
subnet.

Example 3 (cont.)

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
5-13
Example 4
A company is granted the site address 181.56.0.0.
The company needs 1000 subnets. Design the subnets.

Solution:
Company can have 1024 = 210 subnets (not 1000)
The given IP is class B, therefore we consider only the
last two bytes. The company will have the subnets:
.00000000.00000000 € 181.56.0.0
.00000000.01000000 € 181.56.0.64
.00000000.10000000 € 181.56.0.128
. . . . . . . . . . . . . . . . . .
.11111111.11000000 € 2
9
1
.
5
6
8
Subnet mask = 255.255.255.192
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
5-14

Supernetting
Classes A and B are almost depleted.
Class C addresses are still available.

What if a company needs a network


larger than 254 hosts?

€ Give the company several


consecutive blocks
of C addresses and treat these as
a single supernetwork

(Supernetting applies only to the class C addresses)


5-15

supernetwo
rk

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000


5-16
Supernetting (cont.)
Suppose we use 2m consecutive blocks

Class C address:
Net ID

Host ID

m zero bits
Supernet address:
xxxxxxxx.xxxxxxxx.xxx00000.00000000
This byte is
divisible by 2m
Default mask: 255.255.255.0
Supernet mask: 255.255.(28-m-1)*2m.0 = 255.255.252.0
5-17

Supernetting (cont.)

Rules:
The number of blocks must be a power of 2
The blocks must be contiguous in the address
space (no gaps between the blocks).
The third byte of the first address in the
superblock must be evenly divisible by the
number of blocks.

In other words, the 3rd byte must have m zeroes to the left
(2m is number of blocks)
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Exampl 5-18

e5
A company needs 1000 addresses. Which of the
following set of class C blocks can be used to form a
supernet for this company?

  


   
   
   

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Example 5-19

5 Need 4 blocks
198.47.32.0 198.47.33.0 198.47.34.0

Must be
consecutive

198.47.32.0 198.47.42.0 198.47.52.0 198.47.62.0


3rd byte of the
first block must
be divisible by 4
198.47.31.0 198.47.32.0 198.47.33.0 198.47.52.0

OK

198.47.32.0 198.47.33.0
©The McGraw-Hill Companies,
198.47.34.0 198.47.35.0
McGraw-Hill
Inc., 2000
5-20

NNo
ottee
In order to define the range of IP addresses we need the
following:

In subnetting:
The first address of the subnet + subnet mask

In supernetting:
The first address of the supernet + supernet mask

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
5-21

Subnet/supernet address from IP address:


SA = IP AND SM SM – supernet/subnet mask

Number of hosts in the range:


h = 2z z = zeroes(SM)

Range of IP addresses:
IP1,…,IP2 = SA+1,…,SA+h -1
Number of blocks:
b = 2m, m = ones(DM XOR SM) DM – Default mask

m = |ones(DM)-ones(SM)|
5-22

Comparison of subnet, default,


and supernet masks

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Example 5-23

We 6
need to make a supernetwork out of 16 class C
blocks. What is the supernet mask?

Solution
We need 16 blocks. For 16 blocks we need to
change four 1s to 0s in the default mask. So the
mask is
11111111 11111111 11110000
00000000
or

©The McGraw-Hill Companies,


255.255.240.0
McGraw-Hill
Inc., 2000
Example 5-24

7
A supernet has a first address of 205.16.32.0 and a supernet
mask of 255.255.248.0. A router receives three packets with
the following destination addresses:

205.16.37.44
205.16.42.56
205.17.33.76

Which packet belongs to the supernet?

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
5-25
SA =205.16.32.0
Solution
205.16.37.44 AND 255.255.248.0 € 205.16.32.0
205.16.42.56 AND 255.255.248.0 € 205.16.40.0
205.17.33.76 AND 255.255.248.0 € 205.17.32.0
Only the first address belongs to this supernet.

00100101 (37) 00101010 (42)


11111000 (248) 11111000 (248)
00100000 (32) 00101000 (40)

00100001 (33) The third byte of the third IP address


11111000 (248) even doesn’t have to be AND-ed since
00100000 (32) the second byte is not 16.
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Example 5-26

8 has a first address of 205.16.32.0 and a supernet


A supernet
mask of 255.255.248.0. How many blocks are in this
supernet and what is the range of addresses?

Solution

The supernet has 21 1s. The default mask has 24 1s. Since
the difference is 3, there are 23 or 8 blocks in this supernet.
The blocks are 205.16.32.0 to 205.16.39.0. The first address
is 205.16.32.0. The last address is 205.16.39.255.

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
5-27

Classless Addressing
In classfull addressing only blocks of sizes nx256 (class C), 256x256
(Class B) or 256x256x256 (class A) can be given to an organization or
service provider. What if some organizations/households need
networks of size 2, 4, 16, 32, 64 or 128?

This brings us to variable-length blocks in IP address space:

The beginning
The size of a address must
block must be be divisible
power of 2 by the block
©The McGraw-Hill Companies,
Inc., 2000
McGraw-Hill size
5-28

Suppose an IP space of only 16 addresses and six organizations


with blocks of sizes 2 or 4.

0000 IP=0 Org 1 0000 IP=0 Org 1


0001 M =1110 0001 M =1110
0010 IP=2 Org 5 0010 IP=2
0011 Org 5
M =1110 0011 M =1000
Org 4 0100
0100 IP=4 0101 Org 4
0101 M =1100 0110 IP=6
0110 Org 2 0111 M =1110 Org 2
0111 1000 IP=8
1000 IP=8 Org 6 1001 M =1110
1001 M =1110 1010 IP=10 Org 6
1010 IP=10 1011 M =1000
1011 M =1110 Org 3 1100
1100 IP=12 1101 Org 3
1101 M =1100 1110 IP=12
1110 1111 M =1110
1111
Good Wrong
Example 5-29

9
Which of the following can be the beginning address
of a block that contains 16 addresses?
205.16.37.32
190.16.42.44
17.17.33.80
123.45.24.52
Solution
The address 205.16.37.32 is eligible because 32 is
divisible by 16. The address 17.17.33.80 is eligible
because 80 is divisible by 16.
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Example 5-30

10
Which of the following can be the beginning address
of a block that contains 1024 addresses?
205.16.37.32
190.16.42.0
17.17.32.0
123.45.24.52

Solution
To be divisible by 1024, the rightmost byte of an
address should be 0 and the second rightmost byte
must be divisible by 4. Only the address
17.17.32.0 meets this condition.
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
5-31

Slash notation

•A mask consists of z consecutive zeroes at the


right and 32-z ones at the left. Instead of using
long masks (like 255.255.224.0) it is more
convenient to use the number of ones in the
mask (like 19). If this number is attached to the
end of a (classless) IP address, we get the “slash”
notation, or CIDR (Classless Interdomain Routing)
The first n bits of the classless address is called
prefix, while the last 32-n bits is called suffix.
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Example 5-32

11
A small organization is given a block with the beginning
address and the prefix length 205.16.37.24/29 (in
slash notation). What is the range of the block?

Solution
The beginning address is 205.16.37.24. To find the last
address we keep the first 29 bits and change the last 3 bits to
1s.
Beginning:11001111 00010000 00100101 00011000
Ending : 11001111 00010000 00100101 00011111
There are only 8 addresses in this block.

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Example 5-33

12
We can find the range of addresses in Example 11 by
another method. We can argue that the length of the suffix is
32 - 29 or 3. So there are 23 = 8 addresses in this block. If
the first address is 205.16.37.24, the last address is
205.16.37.31 (24 + 7 = 31).

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Example 5-34

13
What is the network address if one of the addresses
is 167.199.170.82/27?

Solution
The prefix length is 27, which means that we must
keep the first 27 bits as is and change the remaining
bits (5) to 0s. The 5 bits affect only the last byte.
The last byte is 01010010. Changing the last 5 bits
to 0s, we get 01000000 or 64. The network address
is 167.199.170.64/27.

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Example 5-35

14
An organization is granted the block
130.34.12.64/26. The organization needs to have
four subnets. What are the subnet addresses
and the range of addresses for each subnet?

Solution
The suffix length is 6. This means the total number of
addresses in the block is 64 (26). If we create four
subnets, each subnet will have 16 addresses.

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Solution 5-36

(Continued)
Let us first find the subnet prefix (subnet mask). We need four
subnets, which means we need to add two more 1s to the
site prefix. The subnet prefix is then /28.

Subnet 1: 130.34.12.64/28 to 130.34.12.79/28.


Subnet 2 : 130.34.12.80/28 to 130.34.12.95/28.
Subnet 3: 130.34.12.96/28 to 130.34.12.111/28.
Subnet 4: 130.34.12.112/28 to 130.34.12.127/28.

See Figure 5.15


©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Example 5-37

14

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Example 5-38

15
An ISP is granted a block of addresses starting with
190.100.0.0/16. The ISP needs to distribute these addresses
to three groups of customers as follows:

1.The first group has 64 customers; each needs 256


addresses.
2.The second group has 128 customers; each needs 128
addresses.
3.The third group has 128 customers; each needs 64
addresses.

Design the subblocks and give the slash notation for each
subblock. Find out how many addresses are still
available
©The after these allocations.
McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Solutio 5-39

n
Group 1
For this group, each customer needs 256 addresses.
This means the suffix length is 8 (28 = 256). The
prefix length is then 32 - 8 = 24.
01: 190.100.0.0/24 € 190.100.0.255/24
02: 190.100.1.0/24 € 190.100.1.255/24
…………………………………..
64: 190.100.63.0/24 € 190.100.63.255/24
Total = 64 x 256 = 16,384
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Solution 5-40

(Continued)
Group 2
For this group, each customer needs 128 addresses. This
means the suffix length is 7 (27 = 128). The prefix length is
then 32 - 7 = 25. The addresses are:

001: 190.100.64.0/25 € 190.100.64.127/25


002: 190.100.64.128/25 € 190.100.64.255/25
003: 190.100.127.128/25 € 190.100.127.255/25

Total = 128 x 128 =


16,384
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
Solution 5-41

(Continued)
Group 3
For this group, each customer needs 64 addresses. This
means the suffix length is 6 (26 = 64). The prefix length is then
32 - 6 = 26.

001:190.100.128.0/26 €190.100.128.63/26
002:190.100.128.64/26 € 2
1
62
7
1
0
8
/9
.
…………………………
128:190.100.159.192/26 € 26
1
50
9
/.

Total = 128 x 64 =
8,192
©The McGraw-Hill Companies,
McGraw-Hill
Inc., 2000
5-42
Solution (Continued)

Number of granted addresses: 65,536


Number of allocated addresses: 40,960
Number of available addresses:
24,576

©The McGraw-Hill Companies,


McGraw-Hill
Inc., 2000
Module 12: IPv6 Addressing

Introduction to Networks v7.0


(ITN)
12.1 IPv4 Issues

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 91
IPv4 Issues
Need for IPv6

• IPv4 is running out of addresses. IPv6


is the successor to IPv4. IPv6 has a
much larger 128-bit address space.
• The development of IPv6 also
included fixes for IPv4 limitations and
other enhancements.
• With an increasing internet population,
a limited IPv4 address space, issues
with NAT and the IoT, the time has
come to begin the transition to IPv6.
IPv4 Issues
IPv4 and IPv6 Coexistence

Both IPv4 and IPv6 will coexist in the near future and the transition will take several years.
The IETF has created various protocols and tools to help network administrators migrate their
networks to IPv6. These migration techniques can be divided into three categories:

• Dual stack -The devices run both IPv4 and IPv6


protocol stacks simultaneously.
• Tunneling – A method of transporting an IPv6
packet over an IPv4 network. The IPv6 packet is
encapsulated inside an IPv4 packet.
• Translation - Network Address Translation 64
(NAT64) allows IPv6-enabled devices to
communicate with IPv4-enabled devices using a
translation technique similar to NAT for IPv4.
12.2 IPv6 Address
Representation

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 94
IPv6 Address Representation
IPv6 Addressing Formats

• IPv6 addresses are 128 bits in length and written in hexadecimal.


• IPv6 addresses are not case-sensitive and can be written in
either lowercase or uppercase.
• The preferred format for writing an IPv6 address is x:x:x:x:x:x:x:x,
with each “x” consisting of four hexadecimal values.
• In IPv6, a hextet is the unofficial term used to refer to a segment
of 16 bits, or four hexadecimal values.
• Examples of IPv6 addresses in the preferred format:
2001:0db8:0000:1111:0000:0000:0000:0200
2001:0db8:0000:00a3:abcd:0000:0000:1234
IPv6 Address Representation
Rule 1 – Omit Leading Zero
The first rule to help reduce the notation of IPv6 addresses is to omit any
leading 0s (zeros).
Examples:
• 01ab can be represented as 1ab
• 09f0 can be represented as 9f0
• 0a00 can be represented as a00
• 00ab can be represented as ab

Note: This rule only applies to leading 0s, NOT to trailing 0s, otherwise the
address would be ambiguous.

Type Format
Preferred 2001 : 0db8 : 0000 : 1111 : 0000 : 0000 : 0000 : 0200
No leading zeros 2001 : db8 : 0 : 1111 : 0 : 0 : 0 : 200
IPv6 Address Representation
Rule 2 – Double Colon

A double colon (::) can replace any single, contiguous string of one or
more 16-bit hextets consisting of all zeros.
Example:
• 2001:db8:cafe:1:0:0:0:1 (leading 0s omitted) could be represented as
2001:db8:cafe:1::1

Note: The double colon (::) can only be used once within an address,
otherwise there would be more than one possible resulting address.

Type Format

Preferred 2001 : 0db8 : 0000 : 1111 : 0000 : 0000 : 0000 : 0200

Compressed 2001:db8:0:1111::200
12.3 IPv6 Address Types

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 102
IPv6 Address Types
Unicast, Multicast, Anycast

There are three broad categories of IPv6 addresses:


• Unicast – Unicast uniquely identifies an interface on an IPv6-enabled
device.
• Multicast – Multicast is used to send a single IPv6 packet to multiple
destinations.
• Anycast – This is any IPv6 unicast address that can be assigned to multiple
devices. A packet sent to an anycast address is routed to the nearest device
having that address.

Note: Unlike IPv4, IPv6 does not have a broadcast address. However, there is
an IPv6 all-nodes multicast address that essentially gives the same result.
IPv6 Address Types
IPv6 Prefix Length

Prefix length is represented in slash notation and is used to indicate the network
portion of an IPv6 address.
The IPv6 prefix length can range from 0 to 128. The recommended IPv6 prefix length
for LANs and most other types of networks is /64.

Note: It is strongly recommended to use a 64-bit Interface ID for most networks. This is because stateless
address autoconfiguration (SLAAC) uses 64 bits for the Interface ID. It also makes subnetting easier to create
and manage.
IPv6 Address Types
Types of IPv6 Unicast Addresses

Unlike IPv4 devices that have only a single


address, IPv6 addresses typically have two
unicast addresses:

• Global Unicast Address (GUA) – This is


similar to a public IPv4 address. These
are globally unique, internet-routable
addresses.
• Link-local Address (LLA) - Required for
every IPv6-enabled device and used to
communicate with other devices on the
same local link. LLAs are not routable
and are confined to a single link.
IPv6 Address Types
A Note About the Unique Local Address

The IPv6 unique local addresses (range fc00::/7 to fdff::/7) have some similarity to
RFC 1918 private addresses for IPv4, but there are significant differences:
• Unique local addresses are used for local addressing within a site or between a limited
number of sites.
• Unique local addresses can be used for devices that will never need to access another
network.
• Unique local addresses are not globally routed or translated to a global IPv6 address.

Note: Many sites use the private nature of RFC 1918 addresses to attempt to secure or hide
their network from potential security risks. This was never the intended use of ULAs.
IPv6 Address Types
IPv6 GUA

IPv6 global unicast addresses (GUAs) are globally unique and routable on the IPv6 internet.
• Currently, only GUAs with the first three bits of 001 or 2000::/3 are being assigned.
• Currently available GUAs begins with a decimal 2 or a 3 (This is only 1/8th of the total available IPv6
address space).
IPv6 Address Types
IPv6 GUA Structure
Global Routing Prefix:
– The global routing prefix is the prefix, or network, portion of the address that is
assigned by the provider, such as an ISP, to a customer or site. The global routing
prefix will vary depending on ISP policies.
Subnet ID:
– The Subnet ID field is the area between the Global Routing Prefix and the Interface
ID. The Subnet ID is used by an organization to identify subnets within its site.
Interface ID:
– The IPv6 interface ID is equivalent to the host portion of an IPv4 address.

Note: IPv6 allows the all-0s and all-1s host addresses can be assigned to a device. The all-0s address is reserved as a
Subnet-Router anycast address, and should be assigned only to routers.
IPv6 Address Types
IPv6 LLA
An IPv6 link-local address (LLA) enables a device to communicate with other IPv6-enabled
devices on the same link and only on that link (subnet).
• Packets with a source or destination LLA cannot be routed.

• Every IPv6-enabled network interface must have an LLA.

• If an LLA is not configured manually on an interface, the device will automatically create one.

• IPv6 LLAs are in the fe80::/10 range.

• The /10 indicates that the first 10 bits are 1111 1110 10xx xxxx

You might also like