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

Ipv 6

Uploaded by

Hirak Debnath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Ipv 6

Uploaded by

Hirak Debnath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

23.

IP version 6

IPv6 features, packet format & differences w/ IPv4


IPv6 transition issues (& status)

Roch Guerin
(with adaptations from Jon Turner and John DeHart, and
material from Kurose and Ross)
IPv6
 IPv4 address size limits growth of global internet
» 32 bit address supports only about 4 billion addresses
 Key features of IPv6 (& differences with IPv4)
» expands address size from 32 to 128 bits
» allows senders to mark packets as belonging to common “flow”
» Changes for efficient routing/forwarding:
• no support for fragmentation/reassembly by routers
• no header checksum
• options replaced with more general “extension headers”
» integrated support for mobile IP and Ipsec
 Getting from here to there
» IPv4 address exhaustion is imminent
• last large block of IPv4 addresses was assigned in February 2011
• transition is now essential
» all host operating systems and routers now support both
» but large installed base of IPv4 inhibits transition
2
IPv6 Packet Format
 Traffic class similar to TOS field
4 8 20 bits  Flow label used by source to label stream of
traffic related packets
ver flow label
class » no defined use, as yet
payload next hop » Related RFCs:6436/7/8,6294,7098
length header limit
» Flow label, Saddr, Daddr uniquely identify flow
source address (128)  Payload Length in bytes
destination address (128)  Next header specifies type of next header in
packet
» may specify extension header, or upper level
protocol (e.g. TCP or UDP)

transport segment
 Hop limit similar to TTL in IPv4
 Address fields
» first 64 bits are hierarchically structured, similar to
IPv4 addresses
» last 64 bits form an interface identifier
• typically based on MAC address

3
IPv6 Addresses
 Addresses are associated with interfaces (like IPv4)
 Text representation – 8 groups of 4 hex digits
» e.g. 2345:0056:0000:0000:abcd:0000:0000:ef01
 RFC 5952 proposes text formatting of IPv6 addresses
» Leading zeroes in each 16-bit field are dropped
• 2345:0056:0000:0000:abcd:0000:0000:ef01
• Becomes: 2345:56:0:0:abcd:0:0:ef01
» A single sequence of 0 fields shortened to “::”
• “::” is NOT used to shorten a single 0 field only sequences of 0
fields longer than one.
– 2345:56:0:1:abcd:4:0:ef01 would NOT be shortened further.
• ONLY ONE such sequence is shortened in an address
• The longest sequence is chosen, if multiple longest exist, the
leftmost longest is chosen for shortening.
– 2345:56:0:0:abcd:0:0:ef01 becomes 2345:56::abcd:0:0:ef01
4
IPv6 Address Format
2001:0DA8:E800:0000:0260:3EFF:FE47:0001

Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F

Bin 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

Dec 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

 Hex notation (0xFF1111 1111255) to represent bit pattern


» Case-independent, i.e., FF  ff
» Actually, RFC5952 recommends that lowercase be used.
• These slides need to be update!
 8 groups of 4 hexadecimal digits (instead of 4 groups of
digits from 0 to 255 as done in IPv4)
» Each group represents 16 bits (instead of 8 bits used in IPv4)
» Separator is “:” (instead of “.” used in IPv4)
5
IPv6 Address Representation

2001:0DA8:E800:0000:0260:3EFF:FE47:0001

2001:DA8:E800:0:260:3EFF:FE47:1

2001:0DA8:E800:0000:0000:0000:0000:0001

2001:DA8:E800::1
6
IPv6 Prefix Representation
Prefix length = 48 bits

2001:0DA8:E800:0000:0260:3EFF:FE47:0001/48

Address length = 128 bits

Similarly
805B:2D9D:DC28:0:0:0:0:0/48

805B:2D9D:DC28::/48
7
IPv6 Addresses (continued)
 Global unicast address
» first 64 bits divided between global routing prefix and subnet id
• first hex digit of prefix in range [2,e]
• boundary between prefix and subnet id may vary
» last 64 bits are interface identifier (based on MAC address)
 Link local addresses
» every interface has link-local address which is used only within
its direct subnet – first 3 hex digits in {fe8,fe9,fea,feb}
 Multicast address range – first 2 hex digits are ff

8
IPv6 Address Types and Scope
 Unicast address: Packet delivery to a given interface or host
 Anycast address: Packet delivery to the “nearest” of a group of interfaces or hosts (not
distinguishable from unicast)
 Multicast address (start with FF00::/8 – 1 st byte of 1’s): Packet delivery to a group of
interfaces or hosts
 Scoping of unicast and anycast addresses
» Unicast loopback address: 0:0:0:0:0:0:0:1 (::1/128) – Similar to 127.0.0.1
» Link-local (FE80::/10): Addressing within a link – Similar to auto-config 169.254.0.0/16
» Unique Local Unicast (FC00::/7): Addressing within an organization – Similar to private addresses
• Replaces old, deprecated site-local addresses
» Global (2000::/3): as the name indicates: the IPv6 Internet
» IPv4 mapped address: ::FFFF:0:0/96 (For transition)
 Scoping of multicast addresses (4 least significant bits of 2 nd byte)
» 0x1: Node-local
» 0x2: Link-local
» 0x4: Admin-local
» 0x5: Site-local
» 0x8: Organization-local
» 0xE: Global

Least significant 112 bits are Group ID (usually only 48 bits are used – Ethernet mapping) 9
IPv6 Address Space Overview
IPv6 [1] The "unspecified address", the "loopback address",
Allocation Reference Note and the IPv6 Addresses with Embedded IPv4 Addresses
Prefix
are assigned out of the 0000::/8 address block.
0000::/8 Reserved by IETF [RFC4291] [1][5][6]
0100::/8 Reserved by IETF [RFC4291]
0200::/7 Reserved by IETF [RFC4048] [2] [2] 0200::/7 was previously defined as an OSI NSAP-
mapped prefix set [RFC4548]. This definition has been
0400::/6 Reserved by IETF [RFC4291] deprecated as of December 2004 [RFC4048].
0800::/5 Reserved by IETF [RFC4291]
[3] The IPv6 Unicast space encompasses the entire IPv6
1000::/4 Reserved by IETF [RFC4291] address range with the exception of FF00::/8. [
2000::/3 Global Unicast [RFC4291] [3] RFC4291] IANA unicast address assignments are
4000::/3 Reserved by IETF [RFC4291] currently limited to the IPv6 unicast address range of
2000::/3. IANA assignments from this block are
6000::/3 Reserved by IETF [RFC4291] registered in the IANA registry: [IANA registry
8000::/3 Reserved by IETF [RFC4291] ipv6-unicast-address-assignments].
A000::/3 Reserved by IETF [RFC4291]
C000::/3 Reserved by IETF [RFC4291] [4] FEC0::/10 was previously defined as a Site-Local
scoped address prefix. This definition has been
E000::/4 Reserved by IETF [RFC4291] deprecated as of September 2004 [RFC3879].
F000::/5 Reserved by IETF [RFC4291]
F800::/6 Reserved by IETF [RFC4291] [5] 0000::/96 was previously defined as the "IPv4-
FC00::/7 Unique Local [RFC4193] compatible IPv6 address" prefix. This definition has
been deprecated by [RFC4291].
Unicast
FE00::/9 Reserved by IETF [RFC4291] [6] The "Well Known Prefix" 64:ff9b::/96 used in an
FE80::/10 Link Local Unicast [RFC4291] algorithmic mapping between IPv4 to IPv6 addresses is
defined out of the 0000::/8 address block, per [
FEC0::/10 Reserved by IETF [RFC3879] [4] RFC6052].
FF00::/8 Multicast [RFC4291]
10
“Initial” IPv6 Unicast address
Structure

Field Description
001 Identifies the address as an IPv6 global unicast
address
Top Level Aggregation Identifies the
Removed byhighest
RFC3587level in the routing
Identifier (TLA ID) hierarchy. TLA IDs are administered by IANA
and allocated to local Internet registries, which Today, left to
allocate them to ISPs individual
registries to
Res Reserved for future use decide how
to allocate
Next Level Aggregation To be allocated to customer sites of each TLA
Identifier (NLA ID)
Site Level Aggregation Allows up to 65,536 (216) subnets within site.
Identifier (SLA ID) Assigned within a site without ISP involvement
Interface ID Identifies an interface on a specific subnet

11
IPv6 Unicast Address
/0 /64 /128

Topological Interface

/0 /64 /128

Global Routing Prefix 128


Subnet ID bits Interface
N bits M bits

12
IPv6 Address Allocation Overview
/0 /64 /128

Topological 128 bits Interface

Infrastructure Site
/0 /48 /64

Up to 248 site addresses (across all ISPs)


≤ 281,474,976,710,656

2(64-48) = 216 “subnet” addresses/site


= 65,536

264 “local” addresses per subnet


= 18,446,744,073,709,551,616
13
Sample - IPv6 Address Allocation
/0 /48 /64

Infrastructure Site

Infrastructure
ISP Customer
/0 /32 /48

Current ISP allocation (min) is /32


ISP allocation can be larger and can increase
Each site (ISP customer) address is
/48
Providing 2(64-48) = 216 = 65,536 site addresses 14
IPv6 – ISP addressing
 Every ISP receives a /32 (or more)
» Providing 65,536 /48 site addresses (2(48-32)=65,536)

/32

/32

/32 /48

/48
/48

15
IPv6 – Site addressing
 Every “site” receives a /48
» Providing 65,536 /64 (LAN) addresses (2(64-48)=65,536)

/32

/64
/48
/64
/64

16
IPv6 – LAN addressing
 Every LAN segment receives a /64
» Providing 264 interface addresses per LAN (2128-64)

/64 /128
/48

/64 /128

/128
/64

17
IPv6 – Device addressing
 Every device interface receives a /128
» May be EUI-64 (derived from interface MAC address),
random number (RFC 3041), auto-configuration, or
manual configuration

/128

/128 /128

/128

18
Neighbor Discovery Protocol (NDP)
 Offers ARP and (optionally ) DHCP functionality for IPv6
» Uses ICMPv6 with a next header field of 58 – includes a message
type and code similar to IPv4
 Five ICMPv6 message types are used to implement NDP
» router advertisement – sent periodically by routers; contain
configuration info including prefixes associated with subnet
» router solicitation – used by host to request an immediate router
advertisement
» neighbor advertisement – used to advertise a link layer address
» neighbor solicitation – used to request a neighbor advert
• uses multicast and not broadcast: Solicited-node multicast address is
specific to a given multicast address
– Last 3 bytes of unicast address pre-pended with FF02::1::FF00:0000/104
• Avoids bothering hosts that are not the target
» redirect – used by router to inform hosts of better first-hop router
for reaching desired destination 19
Acquiring an IPv6 Address
 Two generic/complementary options (routers messages indicate which
method to use for what)

 DHCPv6 (stateful – DHCP server tracks address assignments)


» Similar to DHCPv4 but with IPv6 addresses (RFC 3315)
» Extensions to allow prefix assignment (RFC 3633). Allows dynamic assignment
(by user device) of addresses to its IPv6 enabled interfaces
 Stateless address auto-configuration (RFC 2462) – uses NDP
» No manual configuration of hosts and no additional servers
» Hosts generate IP address based on local information and information advertised
by routers
• Routers advertise prefix information for each link, and hosts generate interface
identifier, e.g., from MAC address (transforms 48 bits MAC address to 64 bits EUI-64
by inserting FF:FE in the middle, and setting the MAC address “global” bit to 1)
 Duplicate address detection algorithm run by all hosts to detect
possible duplicate assignments of IP addresses (precedes assignment
20
Transition Mechanisms
 Even if IPv6 eventually happens, it won’t happen
everywhere at once, i.e., transition mechanisms are
required
 There are many transition mechanisms that have been
defined, but they broadly fall in two categories
1. Allowing IPv6 connectivity over the IPv4 Internet
2. Allowing IPv6 (only) hosts to reach the IPv4 Internet

Teredo and 6to4 are examples from the first category


(you need an IPv4 address to use them)

DS-Lite and XLAT (RFC 6145) fall in the second (to


connect hosts that only have an IPv6 address)
- use special NAT mechanisms
21
Transitioning to IPv6
 To
use IPv6, sender and receiver must be IPv6-capable
and both must have access to an IPv6 router
» if a host has a globally connected IPv6 router on its local
network, it can use it to send and receive IPv6 packets
» if not, a host can use a “tunnel” to exchange packets with a
remote IPv6 router
• put IPv6 packet inside an IPv4 packet and send it to the IPv4
address of the desired IPv6 router
• the IPv6 router extracts the packet from its IPv4 “wrapper” and
then handles it like a normal IPv6 packet
» tunneling works but adds processing with no benefit to users

22
6to4 – A Sample Transition Mechanism
 RFC3056: “Connection of IPv6 Domains via IPv4
Clouds,” and RFC 3068 (anycast extension)
» Goal is to allow IPv6 connectivity over the IPv4 Internet with
minimum configuration
» 6to4 as a transition mechanism has been allocated the IPv6
prefix 2002::::
A 6to4 site/host needs a routable IPv4 address, e.g.,
158.130.22.11, from which it derives a 48 bit IPv6 prefix
of the form 2002:9E82:160B:: (9E=158, 82=130, 16=22,
0B=11)
» Within the site, the prefix can be used like a normal IPv6 prefix
for automated address assignment (these are the quad-A
addresses registered with DNS)
23
6to4 – A Sample Transition Mechanism
 IPv6 packets from a 6to4 site are encapsulated in IPv4
packets when they leave the site over the IPv4 Internet
» IPv4 protocol type is set to 41
» Source address of IPv4 packet contains 158.130.22.11
» IPv6 packet is the payload of the IPv4 packet
 Connectivity depends on whether destination is another
6to4 site or not
» Destination is in another 6to4 site
• packets are delivered using standard routing through the IPv4 Internet
(destination IPv4 address is extracted from 6to4 IPv6 destination
address, e.g., 2002:AC47:BB14:xxxx:xxxx:xxxx:xxxx:xxxx maps to
172.71.187.20)
» Destination is native IPv6 site
• 6to4 relay routers need to be used
• 6to4 Relay routers connect to both IPv4 and IPv6 Internet 24
When Will Transition Happen?
 Wireless providers are
pushing IPv6 for mobile
devices
» Both T-Mobile and Verizon are
assigning IPv6 addresses to
phones that use the latest
version of Android
 Google reports (Nov. 2014)
~4% of its users access it
using IPv6
» Now over 7%
» rate has doubled for several
years; could reach 50% in five
years
 Web content is slowly
becoming IPv6 accessible
» ~4.5% (2014) of sites in
Alexa’s top 1M sites are IPv6
accessible today (rapid growth
since end of 2012) 2015:
25
When Will Transition Happen?
https://www.google.com/intl/en/ipv6/statistics.html

26
Exercise
 Simplify the representations following IPv6 Addresses:
» 2001:0DA8:E800:0000:0260:3EFF:FE47:0001

» 2001:0000:0000:1234:0260:0000:0000:1000

 Expandto full length the following simplified IPv6


addresses:
» 2001::BCD:123

» 2001:ABC::1

27
Exercise
 Simplify the representations following IPv6 Addresses:
» 2001:0DA8:E800:0000:0260:3EFF:FE47:0001
» 2001:DA8:E800:0:260:3EFF:FE47:1

» 2001:0000:0000:1234:0260:0000:0000:1000
» 2001::1234:260:0:0:1000

 Expandto full length the following simplified IPv6


addresses:
» 2001::BCD:123
» 2001:0000:0000:0000:0000:0000:0BCD:0123
» 2001:ABC::1:0:2
» 2001:0ABC:0000:0000:0000:0001:0000:0002

28
Exercise
 What are the rules for getting an IPv6 Provider Independent (PI)
address prefix, and what are advantages over having a prefix
assigned to you by your provider? (You’ll need to go on the
Internet to find the answer)

29
Exercise
 What are the rules for getting an IPv6 Provider Independent (PI)
address prefix, and what are advantages over having a prefix
assigned to you by your provider? (You’ll need to go on the
Internet to find the answer)
As was the case with IPv4, IPv6 PI address blocks are assigned by
a Regional Internet Registry directly to an end-user organization
(as opposed to getting them from their ISP). Those address
blocks have a minimum size of /48 and are taken from the range
2001:0678::/29. An organization requesting a PI block must enter
into a contractual agreement with the RIR from which it receives
it, which specifies, among other things, that the addresses cannot
be re-assigned to other organizations and must be returned to
the RIR when not used anymore.
The main advantage of PI addresses is that they are portable so
that organizations can easily change providers. They also make
multi-homing much easier. 30
Exercise
 Assume that an ICMPv6 router advertisement contains
the prefix 2001:ABF6:564D:12E0::/64, what would the
IPv6 address of a host with MAC address
CC:17:A5:B2:47:0A be?

31
Exercise
 Assume that an ICMPv6 router advertisement contains
the prefix 2001:ABF6:564D:12E0::/64, what would the
IPv6 address of a host with MAC address
CC:17:A5:B2:47:0A be?
The host IP address would be of the form
2001:ABF6:564D:12E0:CE17:A5FF:FEB2:470A

CC = 1100 1100  CE = 1100 1110


Universal/local bit

32

You might also like