You are on page 1of 99

CONMUTACION Y RUTEO I

Tema 3. IPv6 Addressing


Alberto Arellano A. Ing. Msc.
aarellano@espoch.edu.ec
CCNA – CCNP - CCSP
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
What is happening with the ISPs

• ISPs are running out or have run out of


IPv4
• Major carrier transit traffic (IPv4 and IPv6)
is being carried over IPv6 (2017
estimated 70%)
• Large ISPs looking to go to IPv6 only
• Over 50% of Internet content available on
IPv6
• Parts of Internet going IPv6 only
• ISPs, mobile feeling the wave now,
Homes.
And then there’s mobile…

• Facebook sees 20-40% (1-2 seconds) better


performance because no NAT, CGN, etc.
• Facebook, LinkedIn and Microsoft internally
are IPv6 only
Comcast X1 is IPv6 Only
Comcast Voice is going IPv6 only

Comcast Corporation is a set of


media that offers cable television,
Internet and Telephony services
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
Tunneling – 6to4

6to4 is an IPv4 tunnel-based transition mechanism defined


in RFC-3056. It was designed to allow different IPv6 domains
communicate with other IPv6 domains through IPv4 clouds
without explicit IPv4 tunnels. (http://www.ipv6tf.org/)
IPv6 over IPv4 GRE Tunnels

GRE provides a way to encapsulate packets inside of


a transport protocol and transmit them from one
tunnel endpoint to another.
TEREDO Tunneling

Teredo is a transition technology that gives


full IPv6 connectivity for IPv6-capable hosts that are
on the IPv4 Internet but have no native connection to
an IPv6 network
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 No Fragmentation

MTU of outgoing link smaller


Packet received.
than packet size. Drop packet.
No reassembly
I will use MTU of the Send ICMPv6 Packet Too Big
required.
interface. message, use MTU 1350.

MTU = 1500 MTU = 1500 MTU = 1350 MTU = 1500


PCA PCB
R1 R2 Link with R3
smaller MTU
Source Destination
1
• IPv6 requires that every link have a minimum
IPv6 Packet – MTU 1500 MTU of 1280 bytes, with a recommended
MTU of 1500 bytes.
2 • Path MTU Discovery uses this same process.
ICMPv6 Packet Too Big • Because intermediate devices do not
Use MTU 1350 fragment packets, Path MTU Discovery is
used when their links are greater than 1280.
3
IPv6 Packet
MTU 1350
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 Extension Header

• Next Header identifies:


• The protocol carried in the
data portion of the packet.
• The presence of an extension header.
• Extension headers are optional and follow the main IPv6
header.
• Provide flexibility and features to the main IPv6 header for future
enhancements without having to redesign the entire protocol.
• Allows the main IPv6 header to have a fixed size for more
efficient processing.

IPv6 Main Next Extension Next Data


Header Header Header Header (Protocol: TCP, UDP, ICMPv6, etc.)
IPv6 Extension Header
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

Only leading 0s can be excluded, trailing 0s must be included.


Or leads to ambiguity…
?
2001 : 0DB8 : ab : 1234 : 5678: 9abcd: ef12: 3456

2001 : 0DB8 : 00ab : 1234 : 5678: 9abcd: ef12: 3456


2001 : 0DB8 : ab00 : 1234 : 5678: 9abcd: ef12: 3456
2001 : 0DB8 : 0ab0 : 1234 : 5678: 9abcd: ef12: 3456
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.
Maximum reduction of the address is known as the “compressed” format.
Rule 2: Double Colon :: Only Once

Using the double colon more than once in an IPv6 address can create ambiguity
because of the ambiguity in the number of 0s.

2001:DB8::1234::5678

2001:DB8:0000:0000:0000:1234:0000:5678
2001:DB8:0000:0000:1234:0000:0000:5678
2001:DB8:0000:1234:0000:0000:0000:5678
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
• IPv4, the prefix, the network 32 11111111 11111111 11000000
bits 00000000 /18 255.255.192.0
11111111 11111111 11100000 00000000 /19 255.255.224.0
portion of the address, can 11111111 11111111 11110000 00000000 /20 255.255.240.0
be identified by: 11111111 11111111 11111000 00000000 /21 255.255.248.0
11111111 11111111 11111100 00000000 /22 255.255.252.0
• Dotted decimal subnet 11111111 11111111 11111110 00000000 /23 255.255.254.0
mask 11111111 11111111 11111111 00000000 /24 255.255.255.0
11111111 11111111 11111111 10000000 /25
• Prefix length 255.255.255.128
• The number of bits in the 11111111 11111111 11111111 11000000 /26
255.255.255.192
prefix or network portion of 11111111 11111111 11111111 11100000 /27
the address. 255.255.255.224
11111111 11111111 11111111 11110000 /28
255.255.255.240
11111111 11111111 11111111 11111000 /29
255.255.255.248
11111111 11111111 11111111 11111100 /30
255.255.255.252
11111111 11111111 11111111 11111110 /31
255.255.255.254
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
Global Unicast Address
GUA

Global Routing Prefix Subnet ID Interface ID

Range:
001
2000::/64 thru 3fff:fff:fff:fff::/64

• Except under very specific circumstances, all end users will have
a global unicast address.
• Note: A host (an interface) can potentially have multiple IPv6
addresses on the same or different networks.
• Terminology:
• Prefix equivalent to the network address of an IPv4
address
• Prefix length equivalent to subnet mask in IPv4
• Interface ID equivalent to host portion of an IPv4 address
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) : 4
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

* This is a minimum allocation. The prefix-length may be shorter if it


can be justified.
Global Routing Prefix determines
number of /64 subnets *

/64
2001:DB8:0000:0000:0000:0000:0000:0000
64-bit Interface ID
/60 = 16 /64’s
/56 = 256 /64’s
/52 = 4,096 /64’s
/32 = 65,536 /48’s /48 = 65,536 /64’s (Many sites will get this prefix length)

/44 = 1,048,576 /64’s


/40 = 16,777,216 /64’s
/36 = 268,435,456 /64’s
/32 = 4,294,967,296 /64’s
EUI-64 PROCESS
One of IPv6's key benefits over IPv4 is its capability for automatic
interface addressing. By implementing the IEEE's 64-bit Extended
Unique Identifier (EUI-64) format, a host can automatically assign
itself a unique 64-bit IPv6 interface identifier without the need for
manual configuration or DHCP. This is accomplished on Ethernet
interfaces by referencing the already unique 48-bit MAC address,
and reformatting that value to match the EUI-64 specification
EUI-64 PROCESS
OUI Device Identifier
24 bits 24 bits

Hexadecimal 00 03 6B E9 D4 80
Step 1: Split the MAC address

Binary 0000 0000 0000 0011 0110 1011 1110 1001 1101 0100 1000 0000

Step 2: Insert FFFE F F F E


Binary 0000 0000 0000 0011 0110 1011 1111 1111 1111 1110 1110 1001 1101 0100 1000 0000

Step 3: Flip the U/L bit

Binary 0000 0010 0000 0011 0110 1011 1111 1111 1111 1110 1110 1001 1101 0100 1000 0000

Modified EUI-64 Interface ID in Hexadecimal Notation

Binary 02 03 6B FF FE E9 D4 80
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

• IPv6 Source – Always a unicast IPv4


• IPv6 Destination – Unicast, multicast, or
anycast.
• Unicast, including a link-local address

IPv6
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.
• Windows XP and Windows Server 2003 Generates the local link address through the
process EUI-64.
• Windows Vista® or Windows Server® 2008 by default generate random interface IDs
for non-temporary autoconfigured IPv6 addresses, including public and link-local
addresses, rather than EUI-64-based interface IDs
• Can communicate with other devices on the link, including the router.
An Important Role in IPv6

Routing Protocol
Messaging
From: Link-local
ICMPv6 Router From: Link-local or
To: Multicast
Solicitation unspecified address
To: Multicast
From: Link-local ICMPv6 Router I will use
To: Multicast Advertisement your link-
local as my
default
gateway,
• Used as a source IPv6 address before a device gets one
dynamically (SLAAC and DHCPv6).
• Router’s link-local address is used by devices as the default
gateway.
• Routers exchange routing messages.
• Router use the link-local address as the next-hop address in the
routing table: via link-local address.
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 (RS source
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
Multicast Addresses

• Solicited Node Multicast Address –


• FF02:0:0:0:0:1:FF00::/104 (FF02::1:FFxx:xxxx)
• Used during ICMPv6 neighbor discovery address resolution (ARP in
IPv4)
• Automatically created using a special mapping of the device’s unicast
address.
• Every global unicast and link-local unicast has an associated solicited
node multicast address.
Anycast Addresses

• Anycast Address
• A unicast address that is assigned to more than one interface (typically
different devices).
Summary: 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
ICMPv6
Internet Control Message Protocol for IPv6

• ICMPv6 is defined in RFC 4443.


• Similar to ICMPv4, describes two types of
messages:
• Informational
• Error
• ICMPv6 Neighbor Discovery is described in RFC
4861.
• Much more robust than ICMP for IPv4.
• Contains new functionality and improvements.

Next
All ICMPv6 IPv6 Main Header ICMPv6
Data
messages Header 58 Header
ICMPv6 Messages

• ICMPv6 error messages are:


• Destination Unreachable
• Packet Too Big Similar to IPv4
• Time Exceeded We will take a brief look at these
• Parameter Problem

• ICMPv6 informational messages used by the ping command:


• Echo Request
Similar to IPv4
• Echo Reply
We will see a packet analysis example
ICMPv6 Messages

ICMPv6 informational messages used for Multicast Listener Discovery


(RFC 2710 ):
• Multicast Listener Query Similar to IGMP for IPv4
• Multicast Listener Report (Internet Group Message Protocol)
• Multicast Listener Done

ICMPv6 informational messages used by Neighbor Discovery (RFC 4861):


• Router Solicitation Message New message types (except for
• Router Advertisement Message Redirect message).
• Neighbor Solicitation Message Brief overview.
• Neighbor Advertisement Message Details discussed in various
• Redirect Message lessons
ICMPv6 General Message Format

Next
IPv6 Header Header = ICMPv6 Message
58

0 8 16 24 31
Type Code Checksum

Message Body

• IPv6 Next Header Value: 58 decimal or 3A hexadecimal


• ICMPv6 General Message Format (similar to ICMP for IPv4)
Error Message:
Destination Unreachable Message

Code Values
0 - No route to destination
0 8 16 24 31 1 - Communication with destination
Type = 1 Code Checksum administratively prohibited
2 - Beyond scope of source
Unused address
3 - Address unreachable
As much of invoking packet as possible without the 4 - Port unreachable
ICMPv6 packet exceeding the minimum IPv6 MTU. 5 - Source address failed
ingress/egress policy
6 - Reject route to destination

• Sent when a packet cannot be delivered to its destination for


reasons other than congestion.
• A router (or a firewall) usually generates these messages.
• Type = 1
• Code values vary, giving more detail.
Error Message: Packet Too Big

0 8 16 24 31
Type = 2 Code = 0 Checksum
MTU of the next hop link

As much of invoking packet as possible without the


ICMPv6 packet exceeding the minimum IPv6 MTU.

• Important difference with IPv6…


• IPv4 routers fragment a packet when the MTU (Maximum
Transmission Unit) of the outgoing link is smaller than the size of
the packet.
• The destination device is responsible for reassembling the
fragmented packets.
• IPv6 routers do not fragment packets.
IPv6 No Fragmentation
MTU of outgoing link smaller
Packet received.
than packet size. Drop packet.
No reassembly
I will use MTU of the Send ICMPv6 Packet Too Big
required.
interface. message, use MTU 1350.

MTU = 1500 MTU = 1500 MTU = 1350 MTU = 1500


PCA PCB
R1 R2 Link with R3
smaller MTU
Source Destination
1
IPv6 Packet – MTU 1500

2
ICMPv6 Packet Too Big
Use MTU 1350

3
IPv6 Packet
MTU 1350
Error Message: Time Exceeded

IPv6

0 8 16 24 31
Type = 3 Code = 0 Checksum
Unused

As much of invoking packet as possible without the


ICMPv6 packet exceeding the minimum IPv6 MTU.

• If a router receives a packet with a Hop Limit of zero, or if a router


decrements a packet's Hop Limit to zero, it MUST:
• Discard the packet
• Send an ICMPv6 Time Exceeded message (Type = 3, Code 0)
to the source of the packet.
• This indicates either a routing loop or too small an initial Hop Limit
value.
Error Message: Parameter Problem

Code Extension Header Name


0 8 16 24 31 0 Erroneous header field
Type = 4 Code Checksum encountered
1 Unrecognized Next Header
Pointer type encountered
2 Unrecognized IPv6 option
As much of invoking packet as possible without the encountered
ICMPv6 packet exceeding the minimum IPv6 MTU.

?
Next Next
IPv6 Main Header Extension Header TCP
Header Data
Header 138 6 Header

• Type 4
• Generated when a receiving device finds a problem with a field
in the main IPv6 header such as the Next Header field – packet
is discarded.
ICMPv6
Echo Request and Echo Reply
Type 128 = Echo Request
Type 129 = Echo Reply
0 8 16 24 31
Type = 128/129 Code = 0 Checksum
Identifier Sequence Number

Data

Ping PCB ICMPv6 Echo Request


PCA PCB
ICMPv6 Echo Reply

• Similar to IPv4 Echo Request and Echo Reply messages are


used by the ping utility.
ICMPv6 Echo Request to GUA

Internet Protocol Version 6


0110 .... = Version: 6
<output omitted>
Payload length: 40
Next header: ICMPv6 (0x3a) ICMPv6 Echo Request
Hop limit: 128
Source: 2001:db8:cafe:1::100
Destination: 2001:db8:cafe:1::1

Internet Control Message Protocol v6


Type: 128 (Echo (ping) request)
Code: 0 (Should always be zero)
Checksum: 0x8f38 [correct]
ID: 0x0001
Sequence: 0 Next
Data (32 bytes) IPv6 Header Header = ICMPv6 Message
58
ICMPv6 Echo Reply from GUA

Internet Protocol Version 6


0110 .... = Version: 6
<output omitted>
Payload length: 40
ICMPv6 Echo Reply
Next header: ICMPv6 (0x3a)
Hop limit: 64
Source: 2001:db8:cafe:1::1
Destination: 2001:db8:cafe:1::100

Internet Control Message Protocol v6


Type: 129 (Echo (ping) reply)
Code: 0 (Should always be zero)
Checksum: 0x8e38 [correct]
ID: 0x0001
Sequence: 0
Data (32 bytes)
ICMPv6
Echo Request to Link-Local Address

Internet Protocol Version 6


0110 .... = Version: 6
<output omitted>
Payload length: 60
Next header: ICMPv6 (0x3a) ICMPv6 Echo Request
Hop limit: 64
Source: fe80::1 Source and destination
Destination: fe80::50a5:8a35:a5bb:66e1 link-local addresses.

Internet Control Message Protocol v6


Type: 128 (Echo (ping) request)
Code: 0 (Should always be zero)
Checksum: 0x0444 [correct]
ID: 0x0a24
Sequence: 0
Data (52 bytes)
ICMPv6
Echo Reply from Link-Local Address

Internet Protocol Version 6


0110 .... = Version: 6
<output omitted>
Payload length: 60
Next header: ICMPv6 (0x3a) ICMPv6 Echo Reply
Hop limit: 64
Source: fe80::50a5:8a35:a5bb:66e1 Source and destination
Destination: fe80::1 link-local addresses.
Internet Control Message Protocol v6
Type: 129 (Echo (ping) reply)
Code: 0 (Should always be zero)
Checksum: 0x0344 [correct]
ID: 0x0a24
Sequence: 0
Data (52 bytes)
ICMPv6
Neighbor Discover Protocol
(RFC4861)

ICMPv6 Neighbor Discovery defines 5 different packet types:


• Router Solicitation Message
• Router Advertisement Message Router-Device
Messaging
Used with dynamic address allocation

• Neighbor Solicitation Message


• Neighbor Advertisement Message Device-Device
• Used with address resolution (IPv4 ARP) Messaging

• Redirect Message
Similar to ICMPv4 redirect message
Router-to-Device messaging
Dynamic Address Allocation
in IPv4

DHCPv4 Server
1

I need IPv4
addressing
information.

Here is everything
you need.
Dynamic Address Allocation
in IPv6
To all IPv6 routers: I might not be
I need IPv6 address needed.
information.

ICMPv6 Router Solicitation

DHCPv6 Server
To all IPv6 devices: ICMPv6 Router Advertisement
Let me tell you how
to do this … 1. SLAAC

2. SLAAC with
Stateless DHCPv6
3. Stateful DHCPv6

SLAAC
(Stateless Address Autoconfiguration)
RA Message Options

ICMPv6 Router Advertisement


Option 1, 2, or 3
DHCPv6
Server

Option Other Configuration Managed Configuration


(“O”) Flag (“M”) Flag
Option 1: SLAAC – No DHCPv6 0 0
(Default on routers)
Option 2: SLAAC + Stateless 1 0
DHCPv6 for DNS address
Option 3: All addressing except 0 1
default gateway use DHCPv6
Router Solicitation /
Router Advertisement
2001:DB8:CAFE:1::/64
Link-local: FE80::1 Link-local: FE80::50A5:8A35:A5BB:66E1
R1 MAC: 00-03-6b-e9-d4-80 MAC: 00-21-9b-d9-c6-44
PC1
Router Solicitation
• Sent when device needs IPv6 1
addressing information. To: FF02::2 (All-IPv6 Routers)
Router Advertisement From: FE80::50A5:8A35:A5BB:66E1
RS
• Sent every 200 seconds or in
response to RS ICMPv6 Router Solicitation
2
To: FF02::1 (All-IPv6 devices)
From: FE80::1 (Link-local address) RA
ICMPv6 Router Advertisement
Analyzing the
Router Solicitation Message
Analyzing the
Router Solicitation Message
Ethernet II, Src: 00:21:9b:d9:c6:44, Dst: 33:33:00:00:00:02
Ethernet multicast MAC address – Maps to “all IPv6 routers”
Internet Protocol Version 6
0110 .... = Version: 6 [Traffic class and Flowlabel not shown]
Payload length: 16
Next header: ICMPv6 (0x3a) Next header is an ICMPv6 header
Hop limit: 255
Source: fe80::50a5:8a35:a5bb:66e1 Link-local address of PC1
Destination: ff02::2 All-IPv6-routers multicast address

Internet Control Message Protocol v6


Type: 133 (Router solicitation) Router Solicitation message
Code: 0
Checksum: 0x3277 [correct]
ICMPv6 Option (Source link-layer address)
Type: Source link-layer address (1)
Length: 8
MAC address of PC1 but RA
Link-layer address: 00:21:9b:d9:c6:44
is sent as all-IPv6-host multicast

Router Solicitation Message


Analyzing the
Router Advertisement Message
Analyzing the
Router Advertisement Message

Ethernet II, Src: 00:03:6b:e9:d4:80, Dst: 33:33:00:00:00:01


Ethernet multicast MAC address – Maps to “All-IPv6 devices”
Internet Protocol Version 6
0110 .... = Version: 6
.... 1110 0000 .... .... .... .... .... = Traffic class: 0x000000e0
.... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000
Payload length: 64
Next header: ICMPv6 (0x3a) Next Header is an ICMPv6 header
Hop limit: 255
Link-local address of R1. Added to hosts’ Default Router List
Source: fe80::1
and is the address they will use as their default gateway.
Destination: ff02::1

All-IPv6 devices multicast

Continued next slide


Analyzing the
Router Advertisement Message
Internet Control Message Protocol v6
Type: 134 (Router advertisement) Router Advertisement
Code: 0
Cur hop limit: 64 Recommended Hop Limit value for hosts
Flags: 0x00 M and O flags indicate that no information is available via DHCPv6
ICMPv6 Option (Source link-layer address)
Type: Source link-layer address (1)
Length: 8
Link-layer address: 00:03:6b:e9:d4:80 Router R1’s MAC address
ICMPv6 Option (MTU)
Type: MTU (5)
Length: 8
MTU: 1500 MTU of the link.
ICMPv6 Option (Prefix information)
Type: Prefix information (3)
Length: 32
Prefix-length (/64) to be used for autoconfiguration.
Prefix Length: 64
Prefix: 2001:db8:cafe:1:: Prefix of this network to be used for
autoconfiguration

Router Advertisement Message


Address Resolution: IPv4 and IPv6

ARP Request: Broadcast


IPv4: ARP over Ethernet Ethernet ARP Request/Reply
ARP
Cache Know
IPv4, what
My IPv4! 2 1
PC2 PC1 is the
Here is the ARP Reply ARP Request MAC?
MAC?

2 1 Neighbor
Know
My IPv6!
Neighbor Neighbor Cache IPv6, what
Here is the
Advertisement Solicitation is the
MAC?
MAC?

IPv6: ICMPv6 over IPv6 over Ethernet


NS: Multicast NS: Solicited Node Multicast
Ethernet IPv6 Header ICMPv6: Neighbor Solicitation/Advertisement
Neighbor Solicitation and
Neighbor Advertisement

2001:DB8:CAFE:1::200/64 2001:DB8:CAFE:1::100/64
FF02::1:FF00:200 (Solicited Node Multicast)
MAC Address MAC Address
PC2 00-1B-24-04-A2-1E 00-21-9B-D9-C6-44 PC1
1
PC1> ping 2001:DB8:CAFE:1::200
4 3 Neighbor Cache 2 5
Neighbor Neighbor <empty until step 5>
Advertisement Solicitation

NS: Multicast NS: Solicited Node Multicast


Ethernet IPv6 Header ICMPv6: Neighbor Solicitation/Advertisement
NA: Unicast NA: Unicast
ICMPv6 Duplicate Address
Detection (DAD)

Global Unicast - 2001:DB8:CAFE:1::200


PC2 Link-local - FE80::1111:2222:3333:4444

Neighbor Solicitation Hopefully no


Neighbor Advertisement

• Duplicate Address Detection (DAD) is used to guarantee that an IPv6 unicast


address is unique on the link.
• A device will send a Neighbor Solicitation for its own unicast address (static or
dynamic).
• After a period of time, if a NA is not received, then the address is deemed
unique.
• RFC was updated to where it is only recommended - /64 Interface ID makes
duplicates unlikely!
Neighbor Cache

Neighbor Solicitation Neighbor Advertisement

PC1
Neighbor Cache
IPv6 Address MAC Address
2001:DB8:ACAD:1::10 0021.9bd9.c644 IPv6 - 2001:DB8:ACAD:1::10
?
MAC - 0021.9bd9.c644
• Neighbor Cache – Maps IPv6 addresses with Ethernet MAC addresses
• Similar to ARP Cache for IPv4
• 5 States (2 noticeable and 3 transitory):
• Reachable: Packets have recently been received providing confirmation that
this device is reachable.
• Stale: A certain time period has elapsed since a packet has been received from
this address.
• Transitory States: INCOMPLETE, DELAY, PROBE
Neighbor Cache
Windows
C:\> netsh interface ipv6 show neighbor

You might also like