You are on page 1of 51

REDES DE COMPUTADORES

Tema 8.
Direccionamiento IPv6
Alberto Arellano A. Ing. Msc.
aarellano@espoch.edu.ec
CCNA – CCNP - CCSP
1
IPv4 - 1981

IPv4
IPv4 was standardized in 1981,
provisioning 4.29 billion (232) IP
addresses for a world population
of 4.41 billion people. *

Images courtesy of Computer History Museum


= 100,000,000
= 100,000,000
*www.census.gov
IPv4 Addresses World Population 1980

• 4.29 billion addresses, about a 1:1 ratio with the world’s


population.
• What was the Internet like in 1981?
• No WWW, no mobile devices, and most people never heard of
the Internet
• Mostly mainframe and minicomputers
• The IBM PC was introduced trying to overtake the Apple II
The Internet Begins to Take Off

• 1990s introduced the World Wide Web.


• Everyone was getting on the Internet.
• Internet routing tables growing rapidly – 20,000 routes in
1994.
• IETF realized that it would soon run out of IPv4 address
space.
IPv4 Address Exhaustion

 The final IPv4 addresses were allocated by IANA to


the five RIRs on February 3, 2011, and since then the
RIRs have been running out of IPv4 addresses.

4
CNT Ecuador Leader 2017
IPv4: Running Out of Addresses

Private Address
Space
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16

• Short term solutions included:


• NAT (Network Address Translation)
• Private address space(RFC 1918) IPv4
• CIDR (Classless Inter-Domain Routing)
• Long-term solution: IPv6
IPv6 Adoption Statistics

https://www.google.com/intl/es/ipv6/statistics.html
IPv6 Adoption Statistics

https://www.akamai.com/uk/en/our-thinking/state-of-
the-internet-report/state-of-the-internet-ipv6-
adoption-visualization.jsp
Introducing IPv6

• Developed mid to late


1990s.
• Much learned from IPv4.
• 128-bit address space,
written in hexadecimal. 128 bits
• This gives us 340 undecillion
addresses!

2001:DB8:CAFE:0001::100 128 bits

340 undecillion
= 340,282,366,920,938,463,463,374,607,431,768,211,456
IPv6 Introduction
• How many is 340 undecillion?
• 340 undecillion addresses is 10
nonillion addresses per person!
• Internet is a much different place
and will continue to evolve:
• Mobile devices
• Video on demand
• Internet of Everything
• A critical part in how we “live,
work, play, and learn”.

10 nonillion
= 10,000,000,000,000,000,000,000,000,000,000
IPv6 Features

• IPv6 is not just about more addresses:


• Stateless autoconfiguration
• End-to-end reachability without private addresses and
NAT
• Better support for mobility
• Services such as VoIP and Quality of Service (QoS)
become more robust.
IPv6: A Brief History

• 1993, IETF announced a call for white papers with RFC


1550 IP: Next Generation (IPng) White Paper Solicitation.
• IETF chose Simple Internet Protocol Plus (SIPP) written
by Steve Deering, Paul Francis, and Bob Hinden but
changed the address size from 64 bits to 128 bits.
• 1995, IETF published RFC 1883 Internet Protocol,
Version 6 (IPv6) Specification - later obsoleted by RFC
2460 in 1998.
Transitioning to IPv6?
Transitioning to IPv6?
Dual Stack
What is it?
Dual stack means that devices are able to run IPv4 and IPv6
in parallel. It allows hosts to simultaneously reach IPv4 and
IPv6 content, so it offers a very flexible coexistence strategy.

Benefits
• Native dual stack does not require any tunneling
mechanisms on internal networks
• Both IPv4 and IPv6 run independent of each other
• Dual stack supports gradual migration of endpoints,
networks, and applications
TCP/IP Model with IPv4
TCP/IP Model with IPv6
IPv4 vs IPv6 Header
Let’s Begin with the IPv6 Header

• Understanding IPv6 begins with the IPv4


IPv6 header.
• IPv6 takes advantage of 64-bit
CPUs.
• Several differences between IPv4
IPv6
and IPv6 headers. 64-bit memory word

• Simpler IPv6
header.
• Fixed 40 byte
IPv6 header.
• Lets look at
the
differences…
IPv6 Version

IPv4
• IPv4 Version contains 4.
• IPv6 Version contains 6.
• Version 5?- Internet Stream Protocol
(ST2)

IPv6
IPv4 Internet Header Length
IPv4
• IPv4 Internet Header Length (IHL) 1
• Length of IPv4 header in 32-bit 2
words including any Options or 3
Padding. 4
• IPv6 5
• IHL for IPv6 is not needed. ?
• IPv6 header is fixed at 40 bytes.

IPv6
8 bytes
8 bytes

40 bytes = 8 bytes
8 bytes
8 bytes
IPv6 Traffic Class

• IPv4 Type of Service


IPv4
• IPv6 Traffic Class
• Not mandated by any IPv6 RFCs.
• Same functionality as IPv4.
• Uses same Differentiated Services
technique (RFC 2474) as IPv4.

IPv6

7 6 5 4 3 2 1 0
IP Precedence Unsused
DiffServ Code Point (DSCP) IP ECN
IPv6 Flow Label

• New field in IPv6 – not part of IPv4.


IPv4
• Flow label is used to identify the packets in a common stream or flow.
• Traffic from source to destination share a common flow label.
• RFC 6437 IPv6 Flow Label Specification

11001011000101100

10110010111000111

IPv6
IPv6 Payload Length
IPv4 Header Data (Payload)
• IPv4 Total Length – Number of bytes
of the IPv4 header (options) + data. IPv4
• IPv6 Payload Length – Number of
bytes of the payload.
• Does not include the main IPv6
header.
• Includes extension headers + data
IPv6

Payload
IPv6 Extension
IPv6 Header Header (Optional) Data
IPv6 Next Header

• IPv4 Protocol IPv4


• IPv6 Next Header
• For both protocols, the field indicates the
type of header following the IP header.

• Common values:
• 6 = TCP IPv6
• 17 = UDP
• 58 = ICMPv6
• 88 = EIGRP IPv6 Next Data
• 89 = OSPF Header Header (Protocol: TCP, UDP, ICMPv6, etc.)
IPv6 Hop Limit

• IPv4 TTL (Time to Live) IPv4


• IPv6 Hop Limit
• Renamed to more accurately reflect
process.
• Set by source, every router in path
decrements hop limit by 1.
IPv6
• When 0,
drop packet.
IPv6 Source and Destination
Addresses
• IPv6 Source and Destination
IPv4
addresses have the same basic
functionality as IPv4.
• IPv4 – 32-bit addresses.
• IPv6 – 128-bit addresses.
• Some significant changes in IPv6.

IPv6
IPv4 Header Checksum

• IPv4 Header Checksum IPv4


• Not used in IPv6.
• Upper-layer protocols generally have a
checksum (UDP and TCP).
• So, in IPv4 the UDP checksum is
optional.

• Because it’s
not in IPv6, IPv6
the UDP
checksum is
now
mandatory.
IPv6 Address Format
IPv6 Address Notation

2001:0DB8:AAAA:1111:0000:0000:0000:0100

2001 : 0DB8 : AAAA : 1111 : 0000 : 0000 : 0000 : 0100

16 bits 16 bits 16 bits 16 bits 16 bits 16 bits 16 bits 16 bits


1 2 3 4 5 6 7 8

IPv6 addresses are 128-bit addresses represented in:


• Hexadecimal: 1 hex digit = 4 bits
• Eight 16-bit segments or “hextets” (not a formal term)
between 0000 and FFFF
• Separated by colons
• Reading and subnetting IPv6 is easier than IPv4…. Really!
Rules for Compressing IPv6
Addresses
• Two rules for reducing the size of written IPv6 addresses.
• First rule: Leading zeroes in any 16-bit segment do not
have to be written.
2001 : 0DB8 : 0001 : 1000 : 0000 : 0000 : 0ef0 : bc00
2001 : DB8 : 1 : 1000 : 0 : 0 : ef0 : bc00

2001 : 0DB8 : 010d : 000a : 00dd : c000 : e000 : 0001


2001 : DB8 : 10d : a : dd : c000 : e000 : 1

2001 : 0DB8 : 0000 : 0000 : 0000 : 0000 : 0000 : 0500


2001 : DB8 : 0 : 0 : 0 : 0 : 0 : 500
Rules for Compressing IPv6
Addresses
• The second rule can reduce this address even further:
• Second rule: Any single, contiguous string of one or more
16-bit segments consisting of all zeroes can be represented
with a double colon (::).

First rule Second rule First rule


2001 : 0DB8 : 1000 : 0000 : 0000 : 0000 : 0000 : 0001
2001 : DB8 : 1000 : : 1

2001:DB8:1000::1
Rule 2: Double Colon :: Choices

Only a single contiguous string of all-zero segments can be represented


with a double colon.
Although the rule states that both of these are correct…

2001 : DB8 : 0000 : 0000 : 1234 : 0000 : 0000 : 5678

RFC 5952
2001 : DB8 :: 1234 : 0 : 0 : 5678
or

2001 : DB8 : 0 : 0 : 1234 :: 5678

• RFC 5952 states that the longest string of zeroes must


be replaced with the :: and if they are equal then the first
string of 0’s should use the :: representation.
IPv4: Subnet Mask
and Prefix Length
Prefix Subnet
Binary Mask Length Mask
11111111 00000000 00000000 00000000 /8 255.0.0.0
11111111 10000000 00000000 00000000 /9 255.128.0.0
11111111 11000000 00000000 00000000 /10 255.192.0.0
11111111 11100000 00000000 00000000 /11 255.224.0.0
11111111 11110000 00000000 00000000 /12 255.240.0.0
IPv4 Network portion
Host
11111111 portion
11111000 00000000 00000000 /13 255.248.0.0
Prefix 11111111 11111100 00000000 00000000 /14 255.252.0.0
11111111 11111110 00000000 00000000 /15 255.254.0.0
11111111 11111111 00000000 00000000 /16 255.255.0.0
11111111 11111111 10000000 00000000 /17 255.255.128.0
11111111 11111111 11000000 00000000 /18 255.255.192.0
32 bits
11111111 11111111 11100000 00000000 /19 255.255.224.0
• IPv4, the prefix, the 11111111 11111111 11110000
11111111 11111111 11111000
00000000
00000000
/20
/21
255.255.240.0
255.255.248.0
network portion of the 11111111 11111111 11111100 00000000 /22 255.255.252.0
11111111 11111111 11111110 00000000 /23 255.255.254.0
address, can be identified 11111111 11111111 11111111 00000000 /24 255.255.255.0
by: 11111111 11111111 11111111
11111111 11111111 11111111
10000000
11000000
/25 255.255.255.128
/26 255.255.255.192
• Dotted decimal subnet 11111111 11111111 11111111 11100000 /27 255.255.255.224
11111111 11111111 11111111 11110000 /28 255.255.255.240
mask 11111111 11111111 11111111 11111000 /29 255.255.255.248
• Prefix length 11111111 11111111 11111111
11111111 11111111 11111111
11111100
11111110
/30 255.255.255.252
/31 255.255.255.254
• The number of bits in the 11111111 11111111 11111111 11111111 /32 255.255.255.255

prefix or network portion of


the address.
IPv6 Prefix Length

• IPv6 prefixes are always identified by prefix length.


• Prefix length - The number of bits in the Prefix portion of the
address (equivalent to the network portion of the address).
• Separates the Prefix portion from the Interface ID (equivalent to
the host portion of the address).
• Written immediately following the IPv6 address, usually no space.

Prefix Interface ID
2001:0DB8:0000:0000:0000:0000:0000:0001
Prefix length /32 /48/52
/56 /64
/60
IPv6 Address Types…. Road Map

IPv6 Addresses

Unicast Multicast Anycast

Assigned Solicited Node


FF00::/8 FF02::1:FF00:0000/104

Global Unique Embedded


Link-Local Loopback Unspecified
Unicast Local IPv4
2000::/3 FE80::/10 ::1/128 ::/128 FC00::/7 ::/80

IPv6 does not have a “broadcast” address.


IPv6 Source and Destination
Addresses

• IPv6 Source – Always a unicast IPv4


• IPv6 Destination – Unicast,
multicast or anycast.

IPv6
IP Address Types
Global Unicast Address
GUA

IPv6 Internet

• Global Unicast Address (GUA)


• 2000::/3 (Range 2000::/64 thru 3fff:fff:fff:fff::/64)
• Globally unique, routable, similar to public IPv4 addresses
• 2001:DB8::/32 - RFC 2839 reserves this range of addresses for
documentation
• These are the addresses we will be referring to the most.
Global Unicast Address
GUA

Global Routing Prefix Subnet ID Interface ID

001 Range: 2000: 0010 0000 0000 0000 :


First hextet
3FFF: 0011 1111 1111 1111 :

• Global Unicast Address (GUA)


• 2000::/3
• Range 2000::/64 thru 3fff:fff:fff:fff::/64
• 1/8th of IPv6 address space
Parts of a Global Unicast Address

IPv4 Unicast Address /?

Network portion Subnet portion Host portion

32 bits

IPv6 Global Unicast Address


/48 /64
16-bit
Global Routing Prefix Interface ID
Subnet ID

128 bits

• 64-bit Interface ID = 18 quintillion


(18,446,744,073,709,551,616) devices/subnet
• 16-bit Subnet ID (initially recommended) = 65,536 subnets
/64 Global Unicast Address and the
3-1-4 Rule

/48 /64
16 bits 16 bits 16 bits 16 bits 16 bits 16 bits 16 bits 16 bits

Global Routing Prefix Subnet ID Interface ID


3 1 4

2001 : 0DB8 : CAFE : 0001 : 0000 : 0000 : 0000 : 0100

3 + 1 = 4 (/64)

2001:0DB8:CAFE:0001:0000:0000:0000:0100/64
2001:DB8:CAFE:1::100/64
Subnetting IPv6

Can you count in hex?


Just increment by 1 in Hexadecimal:
2001:0DB8:CAFE:0000::/64
2001:0DB8:CAFE:0001::/64
2001:0DB8:CAFE:0002::/64 ...
2001:0DB8:CAFE:0009::/64 3-1-4 Rule
2001:0DB8:CAFE:000A::/64

Valid abbreviation is to remove the leading 0s:


2001:DB8:CAFE:1::/64
IPv6 Address Allocation

Global Routing Prefix I am getting a /64 at home


/23 /32 /48 /56 /64
Subnet
Sub Interface ID
ID
*RIR
*ISP Prefix
*Site Prefix Internet Service
Possible Home Site Prefix
Provider
Subnet Prefix
IPv6 Address Types

IPv6 Addresses

Unicast Multicast Anycast

Assigned Solicited Node


FF00::/8 FF02::1:FF00:0000/104

Global Unique Embedded


Link-Local Loopback Unspecified
Unicast Local IPv4
2000::/3 FE80::/10 ::1/128 ::/128 FC00::/7 ::/80

IPv6 does not have a “broadcast” address.


Link-Local Unicast Range
First 10 bits
1111 1110 10xx xxxx Remaining 54 bits 64-bit Interface ID

Range: FE80: 1111 1110 1000 0000 :


First hextet
FEBF: 1111 1110 1011 1111 :

Link-local Unicast

• Link – Network segment


• Link-local means, local to
that link or network.
Link-Local Unicast Range

Link-Local Communications

• Used to communicate with other devices on the link.


• Are NOT routable off the link (network).
• Only have to be unique on the link.
• Not included in the IPv6 routing table.
• An IPv6 device must have at least a link-local address.
Most Networks Are Already Running
IPv6

I’m not running IPv6…


or am I?

PC> ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix :
Link-local IPv6 Address . . . . :
fe80::50a5:8a35:a5bb:66e1
IPv4 Address. . . . . . . . . . : 192.168.1.101
Subnet Mask . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . : 192.168.1.1

• IPv6 is automatically enabled with Windows, MAC and Linux


operating systems.
Loopback Addresses

• Loopback Address
• ::1/128
• Used by a node to send an IPv6 packet to itself, typically when
testing the TCP/IP stack
• Same functionality as IPv4 loopback 127.0.0.1
• Not routable.
• Unspecified Address
• :: (all-0s)
• Indicates the absence or anonymity of an IPv6 address
• Used as a source IPv6 address during duplicate address detection
process
Multicast
Addresses

• Multicast Addresses - Used to send a single packet to


multiple destinations simultaneously (one-to-many).
• Assigned Multicast Address –
• FF02::/8 – Multicast addresses with link-local scope
Anycast Addresses

• Anycast Address
• A unicast address that is assigned to more than one
interface.

You might also like