IPv6 Essentials PDF
IPv6 Essentials PDF
IPv6 Essentials
Overview
• An overview of IPv6
• APNIC IPv6 Policies
• IPv4 to IPv6 Transition
IPv6 Architecture Overview
INTRODUCTION
What is IPv6?
• IPv6 is a new version of the Internet layer
protocol (IP) in the TCP/IP suite of
protocols.
• It replaces the current Internet protocol
layer commonly referred to as IPv4.
• RFC2460
IPv6: The ‘new’ tech!
• IPv6 is not new!
• RFC 2460 (IPv6) was released in
December 1998.
• It has been more than a decade, so where
are we with IPv6?
5
IPv6 current deployment status
• Not widely deployed
• Not many cases of production networks
– Not many business cases
– Quite a few research and experimental
network
• Routing infrastructure not “native” enough
– too many tunnels, but, it works
• Not enough content
– Must parallel IPv4 to be viable
Issues
• Obviously not many production networks
deployed
– Gap in understanding between front line
network engineers and decision makers
• CEOs and CIOs may not be aware or understand
the implications.
• Concerned about making investments without
tangible profit
10
Main IPv6 benefits
12
Address Space: IPv4 vs IPv6
17
IPv4/IPv6 Header Changes
IPv4 Header IPv6 Header
Version IHL Type of Service Total Length Version Traffic Class Flow Label
4 bits 4bits 8bits 16bits 4bits 8 bits 20 bits
Identification Flags Fragment Offset Payload Length Next Header Hop Limit
16 bits 4 bits 12 bits 16 bits 8 bits 8 bits
Source Address
L
32 bits IH
Destination Address
32 bits
IP options
0 or more bits
Destination Address
128 bits
IHL=IP Header Length
TTL=Time to Live = Eliminated in IPv6
Enhanced in IPv6
Enhanced in IPv6
Enhanced in IPv6
IPv4/IPv6 Header Changes
• Streamlined
– Fragmentation fields moved out of base
header
– IP options moved out of base header
– Header Checksum eliminated
– Header Length field eliminated
– Length field excludes IPv6 header
19
IPv4/IPv6 Header Changes
• Revised
– Time to Live = Hop Limit
– Protocol = Next Header
– Precedence & TOS = Traffic Class
– Addresses increased from 32 bits to 128 bits
• Extended
– Flow Label field added
20
IMPROVED SUPPORT FOR
OPTIONS / EXTENSIONS
21
The IPv6 Packet
IPv6 Packet
IPv6 Header
22
IPv6 Extension Headers
• Carry the additional options and padding
features that are part of the base IPv4
header
• Extension headers are optional and
placed after the base header
• There can be zero, one, or more
Extension Headers between the IPv6
header and the upper-layer protocol
header
• Ordering is important
23
IPv6 Extension Headers
24
Extension headers
• Next header field
IPv6 Header
Next Header = TCP Header DATA
TCP (Value = 6)
– Anycast
• An identifier for a set of interfaces
– Multicast
• An identifier for a group of nodes
RFC 4291
IPv6 addressing structure
32 16 16 64
ISP
/32
Customer
Site /48
EUI-64 Address 34 56 78 9A BC DE
0 0 1 1 0 1 0 0 FF FE
U/L bit
0 0 1 1 0 1 1 0
Interface Identifier 36 56 78 FF FE 9A BC DE
IPV6 SUBNETTING
IPv6: Think Binary!
• When you do IPv6 subnetting, you need to
think in binary values not in hexadecimal
value
• 2001:1::/32
– 2001:0001::/32
– Hex 2001 = Binary 0010 0000 0000 0001
– Hex 0001 = Binary 0000 0000 0000 0001
• 2001:2:3::/48
– 2001:0002:0003::/48
– Hex 2001 = Binary 0010 0000 0000 0001
– Hex 0002 = Binary 0000 0000 0000 0010
– Hex 0003 = Binary 0000 0000 0000 0011
IPv6 address prefix
• /64s in 2001:2:3::/48 are
– 2001:0002:0003:0001::/64
– 2001:0002:0003:0002::/64
– 2001:0002:0003:0003::/64
– Etc.
– 16 bits of address space
• You can have 65536 /64s in one /48 IPv6 address
• Note:: indicates the remaining 64 bits are all
zeros and can then be used to identify hosts::
IPv6 Address Subnetting
• How about /47s in 2001:1::/32?
– Hex 2001 = Binary 0010 0000 0000 0001 =
16 bits
– Hex 0001 = Binary 0000 0000 0000 0001 =
32
– Hex 0000 = Binary 0000 0000 0000 0000 =
47 (32 bits in prefix –”fixed”, 15 bits in
subnet)
– So the 15 subnet bits (red) are used to
identify the /47s: Subnets numbered using
these bits
IPv6 Address Subnetting
• Binary 0000 0000 0000 0000 = Hex 0000
– The first /47 is 2001:0001:0000::/47
• Binary 0000 0000 0000 0010 = Hex 0002
– So the second /47 is 2001:0001:0002::/47
• Binary 0000 0000 0000 0100 = Hex 0004
– So the third /47 is 2001:0001:0004::/47
• Binary 0000 0000 0000 0110 = Hex 0006
– So the fourth /47 is 2001:0001:0006::/47
Exercise 1: IPv6 Subnetting
• Identify the first four /64 address blocks
out of 2001:AA:2000::/48
1. _____________________
2. _____________________
3. _____________________
4. _____________________
Exercise 1: IPv6 Subnetting
• Identify the first four /64 address blocks
out of 2001:AA:2000:: /64
1. 2001:AA:2000:0000:: /64
2. 2001:AA:2000:0001:: /64
3. 2001:AA:2000:0002:: /64
4. 2001:AA:2000:0003:: /64
42
Exercise 2: IPv6 Subnetting
• Identify the first four /36 address blocks
out of 2001:ABC::/32
1. _____________________
2. _____________________
3. _____________________
4. _____________________
Exercise 2: IPv6 Subnetting
• Identify the first four /36 address blocks
out of 2001:ABC::/32
1. 2001:ABC:0000:: /36
2. 2001:ABC:1000:: /36
3. 2001:ABC:2000:: /36
4. 2001:ABC:3000:: /36
44
Exercise 3: IPv6 Subnetting
• Identify the first four /37 address blocks
out of 2001:AA::/32
1. _____________________
2. _____________________
3. _____________________
4. _____________________
Exercise 3: IPv6 Subnetting
• Identify the first six /37 address blocks out
of 2001:AA::/32
1. 2001:AA:0000:: /37
2. 2001:AA:0800:: /37
3. 2001:AA:1000:: /37
4. 2001:AA:1800:: /37
5. 2001:AA:2000:: /37
6. 2001:AA:2800:: /37
46
Exercise 4: IPv6 Subnetting
• Identify the first six /54 address blocks out
of 2001:AA::/32
1. _____________________
2. _____________________
3. _____________________
4. _____________________
Exercise 3: IPv6 Subnetting
• Identify the first six /54 address blocks out
of 2001:AA::/32
1. 2001:00AA:0000:0000::/54
2. 2001:00AA:0000:0400::/54
3. 2001:00AA:0000:0800::/54
4. 2001:00AA:0000:0C00::/54
5. 2001:00AA:0000:1000::/54
6. 2001:00AA:0000:1400::/54
48
AUTOCONFIGURATION
Interface ID
• The lowest-order 64-bit field
addresses may be assigned in
several different ways:
– auto-configured from a 48-bit MAC address
expanded into a 64-bit EUI-64
– assigned via DHCP
– manually configured
– auto-generated pseudo-random number
– possibly other methods in the future
EUI-64
Mac Address 34 56 78 9A BC DE
EUI-64 Address 34 56 78 9A BC DE
0 0 1 1 0 1 0 0 FF FE
U/L bit
0 0 1 1 0 1 1 0
Interface Identifier 36 56 78 FF FE 9A BC DE
IPv6 autoconfiguration
• Stateless mechanism
– For a site not concerned with the exact
addresses
– No manual configuration required
– Minimal configuration of routers
– No additional servers
• Stateful mechanism
– For a site that requires tighter control over
exact address assignments
– Needs a DHCP server
• DHCPv6
RFC 2462
IPv6 autoconfiguration
Is this
address
unique?
Assign
FE80::310:BAFF:FE64:1D
2001:1234:1:1/64 network
Tentative address (link-local address)
Well-known link local prefix +Interface ID (EUI-64)
Ex: FE80::310:BAFF:FE64:1D
FE80::310:BAFF:FE64:1D
1. The new host will send Router Solicitation (RS) request to the all-routers
multicast group (FE02::2).
2. The router will reply Routing Advertisement (RA).
3. The new host will learn the network prefix. E.g, 2001:1234:1:1/64
4. The new host will assigned a new address Network prefix+Interface ID
E.g, 2001:1234:1:1:310:BAFF:FE64:1D
IPV6 POLICIES AND
PROCEDURES
55
IPv6 address management hierarchy
IPv6 address policy goals
• Efficient address usage
– Avoid wasteful practices
• Aggregation
– Hierarchical distribution
– Aggregation of routing information
– Limiting number of routing entries advertised
• Minimise overhead
– Associated with obtaining address space
• Registration, Uniqueness, Fairness &
consistency
57
IPv6 initial allocation
• To qualify for an initial allocation of IPv6 address
space, an organization must:
a. Be an ISP
b. Not be an end site
c. Plan to provide IPv6 connectivity to organizations to
which it will make assignments, by advertising that
connectivity through its single aggregated address
allocation
d. Meet one of the two following criteria:
• Have a plan for making at least 200 assignments to other organizations
within two years OR
• Be an existing ISP with IPv4 allocations from an APNIC or an NIR, which
will make IPv6 assignments or sub-allocations to other organizations and
announce the allocation in the inter-domain routing system within two years
58
IPv6 initial allocation
• Private networks (those not connected to
the public Internet) may also be eligible
for an IPv6 address space allocation
provided they meet equivalent criteria to
those listed above.
• Initial allocation size is /32
– Default allocation (“slow start”)
59
End Sites
• An end site is defined as "an end user
(subscriber) who has a business
relationship with a service provider”
• End sites do not re-assign any of their IP
addresses to other organisations
60
Typical IPv6 Applicants
• An ISP providing IPv6 connectivity to the
global Internet.
• An ISP providing IPv6 services to end sites
and restricting connectivity to its own closed
network.
• An ISP providing IPv6 services to end sites
and restricting connectivity to peering
partners.
• A large organisation providing IPv6
connectivity to its group companies or
subsidiaries and restricting connectivity to its
own network.
61
IPv6 initial allocation
• Initial allocations larger than /32 may be
justified if:
a. The organization provides comprehensive
documentation of planned IPv6 infrastructure
which would require a larger allocation; or
b. The organization provides comprehensive
documentation of all of the following:
• its existing IPv4 infrastructure and customer base,
• its intention to provide its existing IPv4 services via
IPv6, and
• its intention to move some of its existing IPv4
customers to IPv6 within two years.
62
End site assignment
• End-users are assigned an end site
assignment from their LIR or ISP.
• The exact size of the assignment is a
local decision for the LIR or ISP to make:
– using a minimum value of a /64
– up to the normal maximum of /48
63
IPv6 utilisation
• Utilisation determined from end site
assignments
– ISP responsible for registration of all /48
assignments
– Intermediate allocation hierarchy not
considered
• Utilisation of IPv6 address space is
measured differently from IPv4
– Use HD ratio to measure
• Subsequent allocation may be requested
when IPv6 utilisation requirement is met
64
Subsequent allocation
• Must meet HD = 0.94 utilisation requirement
of previous allocation (subject to change)
• Other criteria to be met
– Correct registrations (all /48s registered)
– Correct assignment practices etc
• Subsequent allocation results in a doubling
of the address space allocated to it
– Resulting in total IPv6 prefix is 1 bit shorter
– Or sufficient for 2 years requirement
65
HD Ratio
• The HD ratio threshold is
– HD=log(/56 units assigned) / log (16,777,216)
– 0.94 = 6,183,533 x /56 units
• Calculation of the HD ratio
– Convert the assignment size into equivalent /
56 units
• Each /48 end site = 256 x /56 units
• Each /52 end site = 16 x /56 units
• Each /56 end site = 1 x /56 units
• Each /60 end site = 1/16 x /56 units
66
• Each /64 end site = 1/256 x /56 units
IPv6 utilisation (HD = 0.94)
• Percentage utilisation calculation
RFC 3194
“In a hierarchical address plan, as the size of the allocation increases, the density of
67 assignments will decrease.”
IPv6 portable assignment for
multihoming
• An organization is eligible to receive a
portable assignment from APNIC if it is
currently multihomed or plans to be
multihomed within three months.
• An organization is considered to be
multihomed if its network receives full-
time connectivity from more than one ISP
and has one or more routing prefixes
announced by at least two of its ISPs.
68
IPv6 portable assignment for
multihoming
• The minimum assignment made under
these terms is /48.
69
Internet Exchange Points
• Internet Exchange Points (IXP) are
eligible to receive a portable assignment
from APNIC to be used exclusively to
connect the IXP participant devices to the
Exchange Point.
• Criteria
– Demonstrate ‘open peering policy’
– 3 or more peers
• Portable assignment size: /48
70
APNIC IPv6 delegation by economy
Questions:
email: [email protected]
Helpdesk chat: http://www.apnic.net/helpdesk
APNIC Helpdesk chat
Discuss IPv6 Transition – IPv6 Wiki
74
IPv6 policy – have your say!
• Limited experience of policy in action
– Your feedback very important
– Policy always subject to change and refinement
• Open discussion list
– [email protected] (all regions)
– SIG Policy mailing list (APNIC region)
• Documentation
– FAQ information and more!
• http://www.apnic.net/services/ipv6_guide.html
– Guidelines document under development
• To assist new requestors with policy
75
IPV4 TO IPV6 TRANSITION
Transition overview
• How to get connectivity from an IPv6 host
to the global IPv6 Internet?
– Via an native connectivity
– Via IPv6-in-IPv4 tunnelling techniques
• IPv6-only deployments are rare
• Practical reality
– Sites deploying IPv6 will not transit to IPv6-
only, but transit to a state where they support
both IPv4 and IPv6 (dual-stack)
http://www.6net.org/book/deployment-guide.pdf p59
IPv4 to IPv6 transition
• Implementation rather than transition
– No fixed day to convert
• The key to successful IPv6 transition
– Maintaining compatibility with IPv4 hosts and
routers while deploying IPv6
• Millions of IPv4 nodes already exist
• Upgrading every IPv4 nodes to IPv6 is not feasible
– No need to convert all at once
• Transition process will be gradual
Transition overview
• Transition approaches
– Dual stack
– Deploying IPv6 and then implementing IPv6-
in-IPv4 tunnelling
– IPv6 only networking
• Different demands of hosts and networks
to be connected to IPv6 networks will
determine the best way of transition
Transition overview
• Dual stack
– Allow IPv4 and IPv6 to coexist in the same
devices and networks
• Translation
– Allow IPv6 only nodes to communicate with
IPv4 only nodes
• Tunnelling
– Allow the transport of IPv6 traffic over the
existing IPv4 infrastructure
IPv4 IPv6
simultaneously IPv4
Dual Stack
IPv6
both
• Useful at the early
phase of transition
RFC 4213
Dual stack
• A host or a router runs both IPv4 and IPv6
in the protocol TCP/IP stack.
• Each dual stack node is configured with
both IPv4 and IPv6 addresses
• Therefore it can both send and receive
datagrams belonging to both protocols
• The simplest and the most desirable way
for IPv4 and IPv6 to coexist
http://www.6net.org/book/deployment-guide.pdf p60
Dual stack network
• Is an infrastructure in which both IPv4 and
Ipv6 forwarding is enabled on routers
http://www.6net.org/book/deployment-guide.pdf p60
Dual stack Challenges
• Compatible software
– Eg. If you use OSPFv2 for your IPv4 network
you need to run OSPFv3 in addition to
OPSFv2
• Transparent availability of services
– Deployment of servers and services
– Content provision
– Business processes
– Traffic monitoring
– End user deployment
Dual stack and DNS
• DNS is used with both protocol versions
to resolve names and IP addresses
– An dual stack node needs a DNS resolver
that is capable of resolving both types of DNS
address records
• DSN A record to resolve IPv4 addresses
• DNS AAAA record to resolve IPv6 addresses
86
Translation
• Stateless Internet Protocol/Internet
Control Messaging Protocol Translation
(SIIT)
• NAT-Protocol Translation (Deprecated)
• Transport Relay Translator
87
Tunnels
• Part of a network is IPv6 enabled
– Tunnelling techniques are used on top of an
existing IPv4 infrastructure and uses IPv4 to
route the IPv6 packets between IPv6 networks by
transporting these encapsulated in IPv4
– Tunnelling is used by networks not yet capable of
offering native IPv6 functionality
– It is the main mechanism currently being
deployed to create global IPv6 connectivity
• Static, semi-automatic & automatic
configured tunnels are available
Tunneling – general concept
• Tunneling can be used by routers and
hosts
– Tunneling is a technique by which one
transport protocol is encapsulated as the
payload of another.
Tunnelling – general concept
• A tunnel can be configured in four
different ways:
Spans one hop of the end-to-end
Router to Router path between two hosts
Probably the most common method
Spans the first hop of the end-to-end
Host to Router path between two hosts
Found in the tunnel broker model
Spans the entire end-to-end path
Host to Host
between two hosts
Spans the last hop of the end-to-end
Router to Host
path between two hosts
Tunneling – general concept
• Two stepped process
1. Encapsulation of IPv6 packets to IPv4 packets
2. Decapsulation of IPv4 packets to IPv6 packets
Encapsulation Decapsulation
Tunnel encapsulation
• The steps for the encapsulation of the
IPv6 packet
– The entry point of the tunnel decrements the
IPv6 hop limit by one
– Encapsulates the packet in an IPv4 header
– Transmits the encapsulated packet through
the tunnel
User
Dual stack
4. Configure tunnel router
Interface and establish
the tunnel 3. TB configures the tunnel
On the dual stack router
RFC RFC
Automatic tunneling – 6to4 3056 3068
IPv6 header IPv6 data IPv4 header IPv6 header IPv6 data IPv6 header IPv6 data
105