Internet Protocol, Version 6 (IPv6)

Internet Protocol, Version 6 (IPv6)
Outline
Internet Protocol, Version 6
(IPv6)
•
•
•
•
•
•
•
Introduction to IPv6
IPv6 Header Format
IPv6 Addressing Model
ICMPv6
Neighbor Discovery
Transition from IPv4 to IPv6
IPv6 vs. IPv4
Taken from:Chun-Chuan Yang
Basics: TCP/IPv4 Protocol Suite
Internet Protocol (IP)
• Features:
– Layer 3 (Network layer)
– Unreliable, Connectionless, Datagram
– Best-effort delivery
• Popular version: IPv4
• Major functions
– Global addressing
– Datagram lifetime
– Fragmentation & Reassembly
IPv4 companion protocols (1)
IPv4 Header
• ARP: Address Resolution Protocol
– Mapping from IP address to MAC address
• ICMP: Internet Control Message Protocol
– Error reporting & Query
• IGMP: Internet Group Management
Protocol
– Multicast member join/leave
• Unicast Routing Protocols (Intra-AS)
– Maintaining Unicast Routing Table
– E.g. RIP, OSPF (Open Shortest Path
First)
IPv4 companion protocols (2)
• Multicast Routing Protocols
– Maintaining Multicast Routing Table
– E.g. DVMRP, MOSPF, CBT, PIM
• Exterior Routing Protocols (InterAS)
– E.g. BGP (Border Gateway Protocol)
• Quality-of-Service Frameworks
– Integrated Service (ISA, IntServ)
– Differentiated Service (DiffServ)
Why IPv6?
• Address space exhaustion
• New types of service
–
–
–
–
Multicast
Quality of Service
Security
Mobility (MIPv6)
• Header and format limitations
Advantages of IPv6 over IPv4
•
•
•
•
•
•
•
Header: from IPv4 to IPv6
Changed
Larger address space
Better header format
New options
Allowance for extension
Support for resource allocation
Support for more security
Support for mobility
IPv6 Header Format
Removed
Traffic Class
• The 8-bit field in the IPv6 header is available for
use by originating nodes and/or forwarding
routers to identify and distinguish between
different classes or priorities of IPv6 packets.
– E.g., used as the codepoint in DiffServ
• General requirements
– Service interface must provide means for upper-layer
protocol to supply the value of traffic class
– Value of traffic class can be changed by source,
forwarder, receiver
– An upper-layer protocol should not assume the value of
traffic class in a packet has not been changed.
IPv6 Flow Label
•
•
•
•
Related sequence of packets
Needing special handling
Identified by src & dest addr + flow label
Router treats flow as sharing attributes
– E.g. path, resource allocation, discard
requirements, accounting, security
Payload Length
• 16-bit unsigned integer. Length of the IPv6
payload, i.e., the rest of the packet following
this IPv6 header, in octets.
• Note that any extension headers present are
considered part of the payload, i.e., included
in the length count.
• May treat flows differently
– Buffer sizes, different forwarding precedence,
different quality of service
• Alternative to including all info. in every
header
Extension Header Order
IPv6 Packet (PDU) Structure
Order
Header Type
Next Header Code
1
Basic IPv6 Header
2
Hop-by-Hop Options
0
4
Routing header
43
5
Fragment header
44
6
Authentication header
51
7
Encapsulation Security Payload header
50
8
Destination Options
60
9
Mobility header
135
No Next header (Null)
59
Upper layer: TCP, UDP, ICMP
6, 17, 58
Hop-by-Hop Options
• Must be examined by every router
– Specifies discard/forward handling
• Options
– Pad
– Jumbo payload
– Router alert (can be used for RSVP)
Source Routing Example
Routing Header
• List of one or more intermediate nodes to
visit
• Header includes
–
–
–
–
Next Header
Header extension length
Routing type (e.g. type 0 = Source Routing)
Segments left
Fragment Header (1)
• Fragment Offset
– The offset, in 8-octet units, of the data following this
header, relative to the start of the Fragmentable Part of
the original packet
– Unfragmentable part: IPv6 header + any extension headers
that must be processed by nodes en route
Fragment Header (2)
• M flag: 1=more fragments, 0=last fragment
• Identification: combined with the src & dest
addr uniquely identifies the original packet
Text Representation of
Address
• Colon-Hex
– 3ffe:3600:2000:0800:0248:54ff:fe5c:8868
• Compressed Format:
– 3ffe:0b00:0c18:0001:0000:0000:0000:0010
– becomes 3ffe:b00:c18:1::10
Address Type Prefixes
Global Unicast Address
• Global routing prefix
– A (typically hierarchically-structured) value
assigned to a site (a cluster of subnets/links)
• Subnet ID
– An identifier of a subnet within the site
• Interface ID
– Constructed in Modified EUI -64 format
• EUI - Extended Unique Identifiers
IEEE 802
IPv6 Interface ID
Site-Local Address
• Meaningful only in a single site zone, and may be reused in other sites
• Equivalent to the IPv4 private address space
• Address are not automatically configured and must
be assigned
• Prefix= FEC0::/48
• Now Deprecated!
Unique-Local Addresses
Link-Local Address
• Meaningful only in a single link zone, and may be reused on other links
• Link-local addresses for use during autoconfiguration and when no routers are present
• Required for Neighbor Discovery process, always
automatically configuration
• An IPv6 router never forwards link-local traffic
beyond the link
• Prefix= FE80::/64
• Unique Local Addresses Used for:
–
–
–
–
Local Communications
Inter-site VPN
Non Internet Routable
Prefix=FC00::/7
27
Special IPv6 Address
• Loopback address (0:0:0:0:0:0:0:1 or ::1)
– Identify a loopback interface
• IPv4-compatible address (0:0:0:0:0:0:w.c.x.z or
::w.c.x.z)
– Used by dual-stack nodes
– IPv6 traffic is automatically encapsulated with an IPv4
header and send to the destination using the IPv4
infrastructure
• IPv4 mapped address (0:0:0:0:0:FFFF:w.c.x.z or
::FFFF:w.c.x.z)
– Represent an IPv4-only node to an IPv6 node
– Never used as a source or destination address of IPv6 packet
– Rarely implemented
Address Autoconfiguration (2)
• Stateful:
– Problem w/ stateless: Anyone can connect
– Routers ask the new system to go DHCP server (by
setting managed configuration bit)
– System multicasts to "All DHCP servers"
– DHCP server assigns an address
Address Autoconfiguration (1)
•
•
•
•
•
Allow plug and play
BOOTP and DHCP are used in IPv4
DHCPng will be used with IPv6
Two Methods: Stateless and Stateful
Stateless:
– A system uses link-local address as source and
multicasts to "All routers on this link"
– Router replies and provides all the needed prefix
info
– All prefixes have a associated lifetime
Network Layer in v4 & v6
ICMPv6
ICMPv6 Messages
• An integral part of IPv6 and MUST be fully
implement by every IPv6 node (RFC 2463)
• Next Header value= 58
• Report delivery or forwarding errors
• Provide simple echo service for troubleshooting
• Neighbor Discovery (ND): 5 ICMP messages
• Multicast Listener Discovery (MLD): 3 ICMP
messages
Neighbor Discovery (ND)
• Node (Hosts and Routers) use ND to determine the
link-layer addresses for neighbors known to reside
on attached links and quick purge cached valued that
become invalid
• Hosts also use ND to find neighboring router that
willing to forward packets on their behalf
• Replace ARP, ICMP Router Discovery, …
IPv6 ND Mechanisms (1)
• Router discovery
– Equivalent to ICMPv4 Router Discovery
• Prefix discovery
– Equivalent to ICMPv4 Address Mask
Request/Reply
• Parameter discovery
– Discovery additional parameter (ex. link MTU,
default hop limit for outgoing packet)
• Address auto-configuration
– Configure IP address for interfaces
• Address resolution: Equivalent to ARP in IPv4
IPv6 ND Mechanisms (2)
• Neighbor unreachable detection (NUD)
• Duplicate address detection (DAD)
– Determine that an address considered for use is
not already in use by a neighboring node
• First-hop Redirect function
– Inform a host of a better first-hop IPv6 address
to reach a destination,
– Equivalent to ICMPv4 Redirect
Advantages of IPv6 over IPv4
(1)
Feature
IPv4
IPv6
32 bits
128 bits
Optional
required
No identification
Using Flow label field
Both router and the
sending hosts
Only supported at the
sending hosts
included
Not included
broadcast ARP
request
Multicast Neighbor
Solicitation message
Source and
destination address
IPSec
Payload ID for QoS in
the header
Fragmentation
Header checksum
Resolve IP address to
a link layer address
Advantages of IPv6 over IPv4
(2)
Feature
IPv4
IPv6
Determine the
address of the best
default gateway
ICMP Router
Discovery(optional)
ICMPv6 Router
Solicitation and
Router Advertisement
(required)
Send traffic to all
nodes on a subnet
Broadcast
Link-local scope allnodes multicast
address
Configure address
Manually or DHCP
Autoconfiguration
(IGMP)
Multicast Listener
Discovery (MLD)
Manage local subnet
group membership
IPv6 References
• RFC 2460: IPv6
• RFC 2461: Neighbor Discovery
• RFC 2462: Stateless Address
Autoconfiguration
• RFC 3513: Addressing Architecture
• RFC 3679: Flow Label Specification
• RFC 4443: ICMPv6
• RFC 3810: Multicast Listener Discovery
(MLDv2)
Transition from IPv4 to IPv6
Ingredients for Transition
• Dual Stack
– hosts
– application layer gateways
– routers
• Tunneling
– Configured
• 6to4 addresses
• 6to4 relay routers
42
Dual Stack Host
Dual Stack Router
• A dual stack host implement both IPv4 and IPv6; it is
configured with both an IPv4 address and an IPv6 address
• A dual stack router implements both IPv4 and IPv6
• It becomes a “multiprotocol router”
– One routing table for IPv4, one for IPv6
B HTTP
TCP
IPv6
Web browser
Application
TCP TCP
IPv6 IPv4
MAC
Dual Stack
Local router
IPv6 IPv4
MAC
B HTTP
TCP
IPv6
Web browser
A HTTP
TCP
IPv4
Application
TCP TCP
IPv6 IPv4
MAC
Dual Stack
Local router
IPv6 IPv4
MAC
A HTTP
TCP
IPv4
• Uses DNS to know whether to use IPv4 or IPv6 send
packets
– hostname2addr(AF_INET6, hostName) returns IPv6 address
(read from AAAA record) if available, else IPv4 mapped
address read from A record
43
44
Tunneling
•
6to4 Addresses
Definition: carry an IP packet as payload inside an IP packet
– IPv6 in IPv4 packets (and vice –versa)
– In an IPV4 packet, Protocol = 41 means the payload is an IPv6 packet
•
•
•
In principle, a tunnel needs to be configured,
– To any valid IPv4 address n we associate the IPv6 prefix
2002:n / 48
– the encapsulator must be configured with the IPv4 address of the decapsulator
– Works only for isolated cases
IP4/6
Router
IPv6
Island
Introduced to support automatic tunnels, i.e. without configuration
of encapsulator/decapsulator pairs
Definition: 6to4 address
IP4/6
Router
A
IPv4
Network
1.2.
3.4
example: the 6to4 address prefix that corresponds to
B
128.178.156.38
is
2002: 80b2:9c26
IPv6
Island
– An IPv6 address that starts with 2002:… is called a 6to4 address
– The bits 17 to 48 of a 6to4 address are the corresponding IPv4
address
IPv4 Header
da = 1.2.3.4
– 2002::/16 is the prefix reserved for 6to4 addresses
IPv6 Header
IPv6 Header
IPv6 Header
Payload
Payload
Payload
•
•
A 6to4 host or router is one that is dual stack and uses 6to4 as
IPv6 address
In addition, the IPv4 address 192.88.99.1 is reserved for use in the
context of 6to4 addresses (see next slides)
45
6to4 Addresses Simplify IPv6 Address
Allocation
Example of Use: Isolated
6to4 Hosts
6to4
6to4 host A
Relay router
R
1
1.2.3.4
IPv4
Network
3
2
4
IPv6
Network
• Normally, an IPv6 address is
5
IPv6 host C
FEDC:BA98::7654:3210
9.8.7.6
6to4 host B
back
• A’s IPv4 address is 1.2.3.4; its IPv6 address is
2002:0102:0304:0:EUIA where EUI is A’s 64-bit MAC address
• B’s IPv4 address is 9.8.7.6; its IPv6 address is
2002:0908:0706:0:EUIB where EUI is B’s 64-bit MAC address
A sends packet to B’s 6to4 address
• Dest addr is 6to4, therefore A encapsulates, with decapsulator’s IPv4
address = that of B
• Packet sent at 1 has
IPv4 source = 1.2.3.4; IPv4 dest = 9.8.7.6; protocol = IPv6
IPv6 source = 2002:0102:0304:0:EUIA IPv6 dest =2002:0908:0706:0:EUIB
– Provider allocated prefix + subnet + host part
• If your network is connected to the IPv6 Internet, you
receive a provider allocated prefix
• Else, you use the 6to4 address of an IPv4 address given to
you by your IPv4 provider
IPv6 host A
6to4
Relay router
R
2002:0102:0304:
00AB:EUIS12
1.2.3.4
11
12
1
IPv6
Local Network
2002:0102:0304:
ABCD:EUIA
6to4
router S
IPv4
Internet
3
2
9.8.7.6
6to4 host B
4
IPv6
Internet
5
IPv6 host C
2001:BA98::7654:3210
6to4 Relay Router and the 192.88.99.1
Anycast Address
• R is a “6to4 relay router”: has 6to4 interfaces and is both on
the IPv4 and IPv6 internets
• All of R’s interfaces on the IPv4 internet have an IPv4
address plus the address 192.88.99.1
• This is a reserved anycast address.
– It is a normal IPv4 address, but there can be several machines
with this same address, as there are several relay routers on
the Internet.
IPv6 host A
1.2.3.4
11
12
IPv4
Internet
1
IPv6
Local Network
2002:0102:0304:
ABCD:EUIA
6to4
router S
3
5
2002:0102:0304 : 6to4
:ABCD:EUIA router
4
IPv6
Internet
2
5
IPv6 host C
2001:BA98::7654:3210
9.8.7.6
6to4 host B
IPv6 host C
IPv6 Reference
6to4
Relay router
R
192.88.99.1
3
2
S
3
6to4 host B
IPv4
Internet
1
IPv4
Internet
9.8.7.6
1.2.3.4
IPv6
Local Network
1
1.2.3.4
2001:BA98::7654:3210
2
2002:0102:0304:
:00AB:EUIS12
12
IPv6
Internet
IPv6 Local Network
IPv6 host A
11
4
6to4
Relay router
R
192.88.99.1
6to4 host A
A sends IPv6 packet to C
• C’s IPv6 address does not have same IPv6 prefix as A (“destination not on
link”), so A sends to a router
• R is a “6to4” relay router
• A’s default IPv6 router entry is R; more precisely, it is 2002:c058:6301::0,
which is a 6to4 address corresponding to 192.88.99.1
• A builds an automatic tunnel with decapsulator = R
6to4
Relay router
R
192.88.99.1
2002:0102:0304:
00AB:EUIS12
Example
4
IPv6
Internet
5
IPv6 host C
2001:0620:0:
:00AB:EUIS12
9.8.7.6
6to4 host B
• A has packet to send to C
– Destination not on link, send to router in local IPv6 router
– Default IPv6 route inside local IPv6 network is 2002:0102:0304::,
i.e. the 6to4 address of interface 1 of router S
– S builds a tunnel with decapsulator = relay router R
Rest as before, i.e.
– S’s default IPv6 router entry is R; more precisely, it is
2002:c058:6301::0, which is a 6to4 address corresponding to
192.88.99.1
L. Hugues
The Second Internet – Reinventing Computer
Networking with IPv6
http://www.ipv6forum.com/dl/books/the_sec
ond_internet.pdf
52
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement