8 IPv6
8 IPv6
Olivier Bonaventure
http://inl.info.ucl.ac.be/
These slides are licensed under the creative commons attribution share-alike license 3.0. You can obtain detailed
information
about this license at http://creativecommons.org/licenses/by-sa/3.0/
IP version 6
Outline
• Motivations for IP version 6
• IPv6 packets
• ICMP v6
• Mobile IP v6
• IPv6 Multicast
CNPP/2008.8. © O. Bonaventure 2008
An interesting book, but written in French, is G. Cizault, IPv6 Théorie et Pratique, O Reilly
The new versions of this book are available online : http://livre.point6.net/index.php/Accueil
A more practically oriented book is
I. van Beijnum, Running IPv6, APress, 2006
IPv6 standardisation is carried out within the IETF, http://www.ietf.org
http://www.6journal.org/
http://www.ist-ipv6.org/
Late 1980s
• Exponential growth of Internet
• 1990
• Other network protocols exist
• Governments push for CLNP
• 1992
• Most class B networks have been assigned
• Class based routing failure
• Networking experts warn that IPv4 address
space could become exhausted
4
Issues with IPv4 (3)
5
Main motivation today
IPv4 address exhaustion
This figure shows the number of IPv4 prefixes used on the global Internet. In addition, some networks, e.g. large cable networks, have had
difficulties in using IPv4 due to the limited number of available addresses. For example, comcast is planning to use IPv6 to manage its cable
modems mainly because IPv4 does not allow them to have enough addresses to identify all their potential cable modems in a scalable manner,
see http://www.nanog.org/mtg-0606/durand.html
IPv6 usage
advertised prefixes
7
Current IPv6 usage
ASes using IPv6
In contrast, the number of ASes using IPv4 is much larger. In March 2008, more than 27000 ASes were advertising IPv4 addresses, see http://
bgp.potaroo.net/bgprpts/rva-index.html
Can we avoid deploying
IPv6 by using NAT ?
• Network address translation
• Benefits
• Reduces consumption of public IPv4 addresses
• “Hides” internal IPv4 addresses inside homes
and corporate networks
• Drawbacks
• Breaks the end-to-end principle
• Intermediate nodes may modify packet content
• IP addresses
• TCP/UDP port information
• Some protocols encode IP addresses inside payload
• ftp
• ...
Outline
• Motivations for IP version 6
• IPv6 packets
• ICMP v6
• Mobile IP v6
• IPv6 Multicast
CNPP/2008.8. © O. Bonaventure 2008
10
IPv6 addresses
IPv4
IP version 6
• Each IPv6 address is encoded in 128 bits
• 3.4 x 10^38 possible addressable devices
• 340,282,366,920,938,463,463,374,607,431,768,211,456
• ∼ 5 x 10^28 addresses per person on the earth
• 6.65 x 10^23 addresses per square meter
• Looks unlimited.... today
• Why 128 bits ?
• Some wanted variable size addresses
• to support IPv4 and 160 bits OSI NSAP
• Some wanted 64 bits
• Efficient for software, large enough for most needs
• Hardware implementers preferred fixed size
CNPP/2008.8. © O. Bonaventure 2008
11
IP version 4 supports 4,294,967,296 distinct addresses, but some are reserved for :
private addresses (RFC1918)
loopback (127.0.0.1)
multicast
...
The IPv6 addressing architecture
Anycast addresses
An identifier for a set of interfaces. A packet sent to an
anycast address is delivered to the “nearest” one of the
interfaces identified by that address
Multicast addresses
An identifier for a set of interfaces. A packet sent to a
multicast address is delivered to all interfaces identified
by that address.
12
13
The IPv6 unicast addresses
Special addresses
Unspecified address : 0:0:0:0:0:0:0:0
Loopback address : 0:0:0:0:0:0:0:1
14
15
See http://www.ripe.net/ripe/docs/ripe-388.html for the policy used by RIPE to allocate IP prefixes in Europe
The IPv6 link-local addresses
16
Site-local addresses were defined in the first IPv6 specifications, but they are now deprecated and should not be used.
Recently “private” addresses have been defined as Unique Local IPv6 Addresses as a way to allow entreprise to obtain IPv6 addresses without
being forced to request them from providers or RIRs.
R. Hinden, B. Haberman, Unique Local IPv6 Unicast Addresses, RFC4193, October 2005
Recently, the case for a registration of such addresses has been proposed, see :
R. Hinden, G. Huston, T. Narten, Centrally Assigned Unique Local IPv6 Unicast Addresses, internet draft, <draft-ietf-ipv6-ula-central-02.txt>,
work in progress, June 2007
See also
http://www.ripe.net/ripe/policies/proposals/2007-05.html -
The IPv6 multicast addresses
Node local-scope
Permanent Address Link-local scope
Temporary Address Subnet local-scope
Site local-scope
Organisation local-scope
Global scope
17
The full list of well known IPv6 multicast groups is available from http://www.iana.org/assignments/ipv6-multicast-addresses
Examples include
Node-Local Scope
----------------
Link-Local Scope
----------------
• Definition
• An IPv6 anycast address is an address that is assigned
to more than one interface (typically belonging to
different nodes), with the property that a packet sent to
an anycast address is routed to the "nearest" interface
having that address, according to the routing protocols'
measure of distance.
• Usage
• Multiple redundant servers using same address
• Example DNS resolvers and DNS servers
• Representation
• IPv6 anycast addresses are unicast addresses
• Required subnet anycast address
n bits 128-n bits
18
Outline
• Motivations for IP version 6
• IPv6 packets
• ICMP v6
• Mobile IP v6
• IPv6 Multicast
CNPP/2008.8. © O. Bonaventure 2008
19
The IPv6 packet format
Simplified packet format
Fields aligned on 32 bits boundaries to ease
implementation
Unclear utilisation
32 bits
Size of packet
content in bytes Source IPv6 address
(128 bits) Used to identify the type
of the next header found
in the packet payload
More functionality than
Protocol field in IPv4
Destination IPv6 address
(128 bits)
20
Several documents have been written about the usage of the Flow label. The last one is
J. Rajahalme, A. Conta, B. Carpenter, S. Deering, IPv6 Flow Label Specification, RFC3697, 2004
However, this proposal is far from being widely used and deployed.
Sample IPv6 packets
32 bits
21
IPv6 does not require changes to TCP and UDP for IPv4. The only modification is the computation of the checksum field of the UDP and TCP
headers since this checksum is computed by concerning a pseudo header that contains the source and destination IP addresses.
The IPv6 extension headers
22
Address N
23
Two other types of routing headers have been defined. Type 1 is experimental and never used. Type 2 is specific for Mobile IPv6 that will be
covered later.
Type 0 routing header
example
2001:6a8:3080:1::B 2001:6a8:3080:1::a 2001:6a8:3080:3::FF 2001:6a8:3080:4::d
R1 R R R3 R
SRC: 2001:6A8:3080:1::B
001:6A8:3080:1::A
NxtHdr HLen RType 2 SRC: 2001:6A8:3080:1::B SRC: 2001:6A8:3080:1::B
Reserved
2001:6A8:3080:3::FF 2001:6A8:3080:4::D
2001:6A8:3080:1::A
NxtHdr HLen RType 1 NxtHdr HLen RType 0
2001:6A8:3080:3::FF Reserved Reserved
2001:6A8:3080:4::D 2001:6A8:3080:1::A 2001:6A8:3080:1::A
2001:6A8:3080:3::FF 2001:6A8:3080:3::FF
2001:6A8:3080:4::D DST: 2001:6A8:3080:4::D
CNPP/2008.8. © O. Bonaventure 2008
24
Issues with Type 0 Routing
header
• Type 0 RH is a generalisation of IPv4 source
routing
• The IPv6 specification is unclear about the
processing of Type 0 RH
• Node = a device that implements IPv6
• Router = a node that forwards IPv6 packets not
explicitly addressed to itself
• Host = any node that is not a router
25
For more information about the security issues with this header, see
Biondi, P. and A. Ebalard, "IPv6 Routing Header Security", CanSecWest Security Conference 2007,
April 2007. http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
Other usage of Type 0 RH
• Improved topology discovery with traceroute
2001:6a8:3080:1::B 2001:6a8:3080:1::a 2001:6a8:3080:3::FF 2001:6a8:3080:4::d
R1 R R R3 R
2001:6a8:3080:22::CC
R2 R R
SRC: 2001:6A8:3080:1::B
2001:6A8:3080:4::D 2001:6A8:3080:22::C
26
Problems with Type 0 RH
FW R
2001:6A8:3080:4::D 2001:6A8:3080:4::D
27
More serious problem with
Type 0 RH
• Increases impact of DoS attacks
2001:6a8:3080:1::B 2001:6a8:3080:1::a 2001:6a8:3080:3::FF 2001:6a8:3080:4::d
R1 R R R3 R
SRC: 2001:6A8:3080:1::B
R2 R R
2001:6A8:3080:22::CC
2001:6a8:3080:22::CC SRC: 2001:6A8:3080:1::B
NxtHdr HLen RType 20
Reserved 2001:6A8:3080:1::A
NxtHdr HLen RType 19
2001:6A8:3080:22::CC
Reserved
2001:6A8:3080:1::A
2001:6A8:3080:22::CC
2001:6A8:3080:1::A
2001:6A8:3080:22::CC
2001:6A8:3080:1::A 2001:6A8:3080:22::CC
2001:6A8:3080:4::D
2001:6A8:3080:1::A
CNPP/2008.8. © O. Bonaventure 2008
2001:6A8:3080:4::D
28
Hop-by-hop and destination
option headers
• TLV format of these options
NxtHdr HLen Type Len
Data (var. length)
Two leftmost bits
How to deal with unknown option ?
00 ignore and continue processing
01 silently discard packet
10 discard packet and send ICMP
parameter problem back to source
11 discard packet and send ICMP
parameter problem to source if destination
isnʼt multicast
Third bit
Can option content be changed en-route
Five rightmost bits
CNPP/2008.8.
Type assigned by IANA © O. Bonaventure 2008
29
The Len field encodes the size of the data field in bytes. Furthermore, special options have been defined to allow hosts using the options to
pad the size of vairable length options to multiples of 64 bits.
+-+-+-+-+-+-+-+-+
| 0 |
+-+-+-+-+-+-+-+-+
The Pad1 option is used to insert one octet of padding into the
Options area of a header. If more than one octet of padding is
required, the PadN option, described next, should be used, rather
than multiple Pad1 options.
IPv6 jumbograms
• IPv6 packet format only supports 64 KBytes
packets
• packet size is encoded in 16 bits field
• on most hosts throughput increases with
packet size
• Hop-by-hop jumbogram option
• Increases packet size to 32 bits
• when used, packet size in IPv6 header should be set to
zero
C2 : 11 0 00020
NxtHdr HLen C2 Len:4 11 -> ICMP must be sent
Packet size if option is unrecognised
0 -> content of option
does not change en-route
CNPP/2008.8. © O. Bonaventure 2008
30
As of today, it is unclear whether the jumbogram option has been implemented in practice. Using it requires link layer technologies that are able
to support frames larger than 64 KBytes.
The Kame (http://www.kame.net) implementation on FreeBSD supports this option, but there is no link-layer that supports large frames.
Packet fragmentation
• IPv4 used packet fragmentation on routers
• All hosts must handle 576+ bytes packets
• experience showed fragmentation is costly for
routers and difficult to implement in hardware
• PathMTU discovery is now widely implemented
• IPv6
• IPv6 requires that every link in the internet have
an MTU of 1280 octets or more
• otherwise link-specific fragmentation and reassembly
must be provided at a layer below IPv6
• Routers do not perform fragmentation
• Only end hosts perform fragmentation and reassembly
by using the fragmentation header
• But PathMTU discovery should avoid fragmentation
most of the time
CNPP/2008.8. © O. Bonaventure 2008
31
32
In IPv6, the fragment identification field is much larger than in IPv4. Furthermore, it is only used in packets that really need fragmentation.
IPv6 header does not contain a fragmentation information for each unfragmented packet unlike IPv4.
IP version 6
Outline
• Motivations for IP version 6
• IPv6 packets
• ICMP v6
• Mobile IP v6
• IPv6 Multicast
CNPP/2008.8. © O. Bonaventure 2008
33
ICMPv6
34
ICMPv6 is defined in :
A. Conta, S. Deering, M. Gupta, Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification,
RFC4443, March 2006
ICMPv6 packet format
Ver Tclass Flow Label
Payload Length NxtHdr Hop Limit
Source IPv6 address
58 for ICMPv6
(128 bits)
Covers ICMPv6 message and part of IPv6 header
Destination IPv6 address • Type
(128 bits) • ICMPv6 error messages (0<type<127)
• 1 Destination Unreachable
Type Code Checksum • 3 Time Exceeded
• 2 Packet Too Big
Message body
• 4 Parameter Problem
• 100 Private experimentation
• 101 Private experimentation
• 127 Reserved for expansion
• ICMPv6 informational messages:
• 128 Echo Request
• 129 Echo Reply
• 200 Private experimentation
• 201 Private experimentation
• 255 Reserved for expansion
CNPP/2008.8.
of ICMPv6 informational © O. Bonaventure 2008
35
36
The Unused field is used to align the content of the ICMPv6 message to a 64 bits boundary.
Note that for security reasons, it is recommended that implementations should allow sending of ICMP destination unreachable messages to be
disabled, preferably on a per-interface basis.
Ingress and egress policies
• For security reasons, a provider should only
accept packets from sources belonging to
allocated prefixes
Provider1 Provider2
2001:AAA 2001:EEEE
R1 R R R2
R R
2001:EEEE:456::EDC
2001:AAA:123::ABC
2001:AAA:123::DEF
CNPP/2008.8. © O. Bonaventure 2008
2001:EEEE:456::DEF
37
F. Baker, P. Savola, Ingress Filtering for Multihomed Networks, RFC3704, March 2004
ICMPv6
echo request and reply
Echo request Echo reply
Ver Tclass Flow Label Ver Tclass Flow Label
Payload Length NxtHdr Hop Limit Payload Length NxtHdr Hop Limit
Source IPv6 address Source IPv6 address
(128 bits) (128 bits)
38
ICMPv6 Neighbour Discovery
• Replacement for IPv4ʼs ARP
• Neighbour solicitation
• Sent to
Type : 135 Code:0 Checksum
The IPv6 address for which the link-layer Reserved
(e.g. Ethernet) address is needed. Target IPv6 Address
May also contain an optional field with the link-layer
(e.g. Ethernet) address of the sender.
• Neighbour advertisement
R : true if node is a router
S : true if answers to a neighbour solicitation Type : 136 Code:0 Checksum
RSO Reserved
39
2
IPv6: 1080:0:0:0:8:A IPv6: 1080:0:0:0:8:E Ipv6: 1080:0:0:0:8:C
Eth : A Eth : E Eth : C
3 IPv6: 1080:0:0:0:8:E
IPv6: 1080:0:0:0:8:A
Eth : A Eth : E Ipv6: 1080:0:0:0:8:C
Eth : C
40
Note that in contrast with ARP used by IPv4, ICMPv6 neighbour solicitation messages are sent to a multicast ethernet address and not to the
broadcast ethernet address. This implies that only the IPv6 enabled hosts on the LAN will receive the ICMPv6 message.
IPv6 autoconfiguration
Ethernet : 0800:200C:417A
CNPP/2008.8. © O. Bonaventure 2008
41
M64(800:200C:417A) is a function that converts a 48 bits MAC address into a 64 bits Interface Identifier. This function is
defined in :
R. Hinden, S. Deering, IP Version 6 Addressing Architecture, RFC4291, February 2006
Router IPv6 address The lifetime associated with the default router in
(link local) units of seconds. 0 is the router sending the
advertisement is not a default router.
FF02::1
(all nodes)
The time, in milliseconds, that a node assumes a
Type:134 Code : 0 Checksum neighbour is reachable after having received a
CurHLim M O Res Router lifetime reachability confirmation.
Reachable Time
Retrans Timer The time, in milliseconds, between retransmitted
Neighbor Solicitation messages.
Options
MTU to be used on the LAN
Prefixes to be used on the LAN
42
When the M bit is set to true, this indicates that IPv6 addresses should be obtained from DHCPv6
When the O bit is set to true, this indicates that the hosts can obtain additional information (e.g. address of DNS resolver) from DHCPv6
The router advertisements messages can also be sent in unicast in response to solicitations from hosts. A host can obtain a router
advertisement by sending a router solicitation which is an ICMPv6 message containing only the router solicitation message (type 133).
Router advertisements options
• Format of the options Type Length Options
Options (cont.)
43
Other options have been defined for the router advertisements. For example, the RDNSS option defined in
J. Jeong, S. Park, L. Beloeil, S. Madanapalli, IPv6 Router Advertisement Option for DNS Configuration, RFC 5006, Sept. 2007
IPv6 autoconfiguration (2)
44
This utilisation of ICMPv6 Neighbour solicitation is called Duplicate Address Detection. It is used everytime a host obtains a new IPv6 address
and is required to ensure that a host
is not using the same IPv6 address as another host on the same LAN.
IPv6 autoconfiguration (2)
45
IPv6 autoconfiguration (3)
46
IPv6 is supposed to easily support renumbering and IPv6 router advertisements are one of the ways to perform this renumbering by allowing
hosts to update their IPv6 addresses upon
reception of new router advertisement messages. However, in practice renumbering an IPv6 network is not easily because IPv6 addresses are
manually encoded in too many
configuration files, see e.g. :
F. Baker, E. Lear, R. Droms, Procedures for Renumbering an IPv6 Network without a Flag Day, RFC4192, 2005
Privacy issues with IPv6
address autoconfiguration
• Issue
• Autoconfigured IPv6 addresses contain the MAC
address of the hosts
• MAC addresses are fixed and unique
• A laptop/user could be identified by tracking the lower
64 bits of its IPv6 addresses
47
T. Narten, R. Draves, S. Krishnan, Privacy Extensions for Stateless Address Autoconfiguration in IPv6, RFC4941, Sept. 2007
Security risks
48
P. Nikander, J. Kempf, E. Nordmark, IPv6 Neighbor Discovery (ND) Trust Models and Threats, RFC3756, May 2004
Security risks (2)
• What happens if an attacker sends fake
ICMPv6 neighbour advertisements ?
ICMPv6 : Neighbour solicitation
IPv6 Src: FE80::M64(800:CCCC:CCCC)
IPv6 Dest: FF02::1
IPv6 Target = FE08::M64(800:AAAA:AAAA)
Ethernet : 0800:CCCC:CCCC Ethernet : 0800:AAAA:AAAA
FE80::M (800:CCCC:CCCC) FE80::M64(800:AAAA:AAAA)
64
49
Securing ICMPv6
• Issues
• How to exchange theses proofs and
authorisations ?
• Is IPSec a solution ?
50
Cryptographical building blocks
Hash functions
Hash functions
key key
m m,H(m,key) H m valid ?
H
insecure channel
Alice Bob
Properties
Easy to compute H(Msg,key)
Very difficult to find Msg2 : H(Msg,k)=H(Msg2,k)
51
Cryptographical building blocks
Secret-key cryptography
Secret-key cryptography
key key
m E(m,key) D m
E
insecure channel
Alice Bob
Advantages
Efficient algorithms exist
Security is f(implementation and key size)
Drawbacks
Key must be distributed securely
Does not provide any authentication scheme
Examples : DES, AES, RC-4, IDEA,...
CNPP/2008.8. © O. Bonaventure 2008
52
C. Kaufman, R. Perlman and M. Speciner, Network Security : Private Communications in a public world, Prentice Hall, second
edition, 2002
Cryptographical building blocks
Public-key cryptography
Public-key cryptography
Each user maintains two keys
A public key (PublicKey) which can be made public and
can be used by any user to send him/her encrypted
messages
A private key (PrivateKey) which is kept secret and can
be used to decrypt information encrypted with the
public
PubBob PrivBob
m E(m,PubBob) D m
E
unsecure channel
Alice Bob
53
Cryptographical building blocks
Public-key cryptography (2)
Advantages
Users do not need to share a secret key to be
able to encrypt messages
Public-key cryptography allows signatures
PrivAlice PubAlice
m S(m,PrivAlice) yes
S V
no
insecure channel
Alice Bob
Security is f(implementation and key size)
Drawbacks
Public-key cryptography is 10 or 100 times
slower than secret-key cryptography
Examples : RSA, DSS
CNPP/2008.8. © O. Bonaventure 2008
54
First solution : certificates
• Principle
• Each router has a public/private keypair
• A certificate is generated for each router to
confirm :
• that the keypair belongs to the router
• that the owner of the keypair is a valid router
• Protocol issues
• Need to extend ICMPv6 to support signatures
and certificates
CNPP/2008.8. © O. Bonaventure 2008
55
Additional information about the utilisation of X.509 certificates to represent IP prefixes and AS resources, see :
Lynn, C., Kent, S. and K. Seo, "X.509 Extensions for IP Addresses and AS Identifiers", RFC 3779, June 2004.
The development of these certificates is being performed within the SIDR working group of the IETF.
Cryptographically Generated Addresses
• Placing certificates on all hosts is too difficult
• We usually donʼt need to prove that a host is
a host
• Can we verify the validity of signed
messages without relying on a PKI ?
• Principle of the solution
• Assume that IPv6 addresses are variable-length
• Generate IPv6 addresses as follows
Global prefix + subnet id (64bits) Hostʼs public key
56
Principles of Secure
Neighbour Discovery
ICMPv6 : Neighbour solicitation
IPv6 Src: FE80:: KeyC
IPv6 Dest: FF02::1
IPv6 Target = FE80::KeyA
Nonce=1234
Timestamp : April14,2008, 10.00:01
Ethernet : 0800:CCCC:CCCC
Public key : KeyC Ethernet : 0800:AAAA:AAAA
IPv6 : FE80::KeyC Public key : KeyA
IPv6 : FE80::KeyA
57
Cryptographically Generated Addresses
• Solution
• To secure a binding between a MAC address and
an IPv6 address, each host
• generates its (public key,private key) key pair
• uses a special HostId = Hash62(public key)
• Signs the Neighbour advertisement by using its
privatekey
58
The utilisation of a 62 bits hash instead of a 64 bits hash is necessary because some bits of the host id part of the IPv6 address are reserved.
When using CGAs, the two high order bits of the hostid must be set to 0 to indicate that this host id is not globally unique
Cryptographically Generated Addresses (2)
Issue with CGA
A 62 bits hash is not very secure
an attacker could use brute-force to find a public-key
whose hash is equal to a given value
59
This is a simplified description of the computation of a cryptographically generated address. For more details, see :
J. Arkko et al. Securing IPv6 Neighbor and Router Discovery, WiSe 02, September 2002
Lynn, C., Kent, S. and K. Seo, "X.509 Extensions for IP Addresses and AS Identifiers", RFC 3779, June 2004.
Solution
CGA depends on several parameters
Modifier
16 octets random value
Subnet prefix
8 octets
Collision Count
Incremented each time a duplicate address is found
Public key
60
The structure described above will be send by the endsystem in the neighbor advertisement and will be used by the recipient of the message to
check the validity of the signature.
The utilization of CGA by the Neighbor Discovery protocol for IPv6 is defined in :
J. Arkko, J. Kempf, B. Sommerfeld, B. Zill, P. Nikander, Secure Neighbor Discovery (SEND), Internet draft, draft-ietf-send-ndopt-06.txt, July
2004, work in progress
Extensions to ICMPv6
• Signature option
Type : 12 Length Reserved
Key Hash
SHA-1 hash (most significant 128 bits)
of the public key used to compute signature.
Digital signature
The signature is computed over the following
information :
- random message tag Padding
- 128 bits source address of IPv6 header
- 128 bits destination address of IPv6 header
- Type, Code and Checksum of ICMPv6 header
- NDP message header and options Type : 13 Length
Reserved
• Timestamp option
• used to avoid replay attacks Timestamp (64 bits)
• Nonce option
Type : 14 Length
Nonce
61
See Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure Neighbor Discovery (SEND)", RFC 3971, March 2005.
The random message tag is (0x086F CA5E 10B2 00C9 9C8C E001 6427 7C08.) This value was chosen at random by the editor of the above
document.
A nonce option is also defined. This option is used to secure the replies sent by routers to neighbour solicitations.
Extensions to ICMPv6 (2)
Padding
• CGA Parameters
Modifier (16 bytes)
Random value, used to add randomness in the
generation of the CGA to improve privacy
Subnet prefix (8 bytes)
The subnet prefix where the address resides
Coll Count
Number of collision in CGA
Public key
generation
RSA public key, at least 384 bits
Extension field
CNPP/2008.8. © O. Bonaventure 2008
62
Ethernet : 0800:CCCC:CCCC
Public key : KeyC Ethernet : 0800:AAAA:AAAA
IPv6 : FE80::KeyC Public key : KeyA
IPv6 : FE80::KeyA
63
IP version 6
Outline
• Motivations for IP version 6
• IPv6 packets
• ICMP v6
• Mobile IP v6
• IPv6 Multicast
CNPP/2008.8. © O. Bonaventure 2008
64
DNSv6
65
DNSv6
66
S. Thomson,C. Huitema, V. Ksinant, M. Souissi, DNS Extensions to Support IP Version 6 , RFC3596 , October 2003
Supporting reverse DNS
• b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.
1.0.0.0.0.0.0.0.1.2.3.4.IP6.INT.
• Example
• 4321:0:1:2:3:4:567:89ab
• b.a.9.8.7.6.5.0.4.0.0.0.3.0.0.0.2.0.0.0.
CNPP/2008.8. 1.0.0.0.0.0.0.0.1.2.3.4.IP6.ARPA. © O. Bonaventure 2008
67
Adding IPv6 addresses to the DNS root
• February 2008
• 6 root DNS servers now support IPv6
• IPv6-only hosts can at last use the DNS
68
http://arstechnica.com/news.ars/post/20080205-icann-flips-switch-on-ipv6-dns-root-servers.html
http://www.root-servers.org/
IP version 6
Outline
• Motivations for IP version 6
• IPv6 packets
• ICMP v6
• Mobile IP v6
• IPv6 Multicast
CNPP/2008.8. © O. Bonaventure 2008
69
Mobile IPv6
R3 R2 R1
70
71
A simple example
4: Home Agent forwards 3: Mobile node replies via
reply to correspondent Home Agent
1: Correspondent sends packets
towards mobile
Prefix:2001:6a8:1100::3/64
Home R
Agent Correspondent
R1
Home network Internet
Prefix:2001:6a8:1100::99/64
2: Mobile is away
Visited network
Home Agent intercepts packet
and forwards it to mobile
72
The Mobile IPv6 addresses
Prefix:2001:6a8:1100::99/64 Prefix:2001:6a8:1100::3/64
Home R
Agent Correspondent
R1
Internet
CoA:2001:6a8:1100::3:xyz
HA:2001:6a8:1100::99:xyz HA :2001:6a8:1100::99:xyz
Home network
Visited network
CNPP/2008.8. © O. Bonaventure 2008
73
Mobile IPv6 packets
• Binding acknowledgement
• Sent to confirm the reception of a Binding Update
message
74
Binding example
Binding UPDATE
-> HA :2001:6a8:1100::99:xyz
New CoA:2001:6a8:1100::3:xyz Visited network
Lifetime
Sequence # Prefix:2001:6a8:1100::3/64
Home network
Home R1
R
Agent
Binding ACK
CoA:2001:6a8:1100::3:xyz
Sequence#
HA :2001:6a8:1100::99:xyz
75
The Binding messages
• Binding update
Type of mobility header (5 for BU) Sequence number. Incremented each
time a BU is sent by mobile.
Covers mobility and IPv6 headers
Alternate care-of-address
Flags
A : An Acknowledgement is expected for this BU
H : BU is sent to a HomeAgent
Indicates, in units of 4 seconds how long
the update is valid. 0 means infinite
76
The L flag is used to deal with link local addresses. The K flag is used to deal with security issues. These flags are outside the scope of this
presentation.
The Binding messages (2)
• Binding Acknowledgement
Status
128 : The Binding Update with the provided
sequence number was correctly installed
Other values indicate a failure
77
The K bit flag is used for security reasons but is outside the scope of this presentation.
How can the Home Agent capture packets ?
Principle
When the Mobile Node is not in its home
network, the Home Agent should behave as if it
were the Mobile Node
HomeAgent will receive Neighbor solicitations
requesting the MAC address corresponding to the
Home Address of the Mobile Node
HomeAgent will send Neighbor Advertisements instead
of the Mobile Node
Home R
Agent
Home network
CNPP/2008.8. © O. Bonaventure 2008
78
How to send packets to mobile node ?
Default solution
Correspondent node sends to Home Address
Home Agent captures packet and sends it to CoA
Packet
Src:Correspondent Prefix:2001:6a8:1100::3/64
Dest:2001:6a8:1100::99:xyz Correspondent
Internet R1
Home R
Agent
Packet CoA:2001:6a8:1100::3:xyz
Src:Home Agent
Dest:2001:6a8:1100::3:xyz HA :2001:6a8:1100::99:xyz
Home network Src:Correspondent
Dest:2001:6a8:1100::99:xyz
Visited network
Prefix:2001:6a8:1100::99/64
79
Issue with this tunnel
• Mobile node may be far from Home Agent
but topologically close to correspondent
Correspondent
HA R R R3 R
R2 R R
Mobile
80
How to send packets to mobile node (2)?
Route Optimisation
Mobile Node sends BU directly to Correspondent
MN will need to informs the Correspondent when it moves
Correspondent can send packets directly to MN
But correspondent needs to maintain a binding cache
Binding UPDATE
HA :2001:6a8:1100::99:xyz
New CoA:2001:6a8:1100::3:xyz Visited network
Lifetime Prefix:2001:6a8:1100::3/64
Sequence #
Correspondent
R1
Internet Binding ACK
Sequence#
CoA:2001:6a8:1100::3:xyz
HA :2001:6a8:1100::99:xyz
81
How can the mobile node send packets ?
Packet
Src: 2001:6a8:1100::99:M64(LAN) Prefix:2001:6a8:1100::3/64
Correspondent
Dest:Correspondent
Internet R1
Home R
Agent Packet
Src:2001:6a8:1100::3:xyz CoA:2001:6a8:1100::3:xyz
Dest:Home Agent HA :2001:6a8:1100::99:xyz
Home network
Src:2001:6a8:1100::99:xyz
Prefix:2001:6a8:1100::99/64 Dest:Correspondent Visited network
CNPP/2008.8. © O. Bonaventure 2008
82
How can the mobile node send packets (2)?
Prefix:2001:6a8:1100::3/64
Packet
Correspondent Src:2001:6a8:1100::3:xyz
Dest:Correspondent
Destination Option
HA=2001:6a8:1100::99:xyz R1
Internet
CoA:2001:6a8:1100::3:xyz
HA :2001:6a8:1100::99:xyz
CNPP/2008.8. © O. Bonaventure 2008
83
Security issues with Mobile IPv6
Prefix:2001:6a8:1100::3/64
Correspondent
Opened TCP flow
R1
Internet
CoA:2001:6a8:1100::3:xyz
HA :2001:6a8:1100::99:xyz
CNPP/2008.8. © O. Bonaventure 2008
84
By sending Binding Updates, it is also possible for the attacker to create a Man in the Middle Attack by putting itself in the middle between the
mobile and the correspondent. It is also possible to send Binding Updates pointing to a non-existent address to cause a Denial of Service
Attack to make the mobile host unreachable.
Reflection/flooding attack
TCP flow :
SRC: 2001:BAD:1234::17:abc
Streaming server Dst : 2001:ABC::def
2001:ABC::def
R1
Streaming data from
2001:ABC::def to
2001:6a8:1100:3:xyz CoA:2001:6a8:1100::3:xyz
HA :2001:6a8:1100::99:xyz
CNPP/2008.8. © O. Bonaventure 2008
85
IP version 6
Outline
• Motivations for IP version 6
• IPv6 packets
• ICMP v6
• Mobile IP v6
• IPv6 Multicast
CNPP/2008.8. © O. Bonaventure 2008
86
IPv6 multicast
87
When transmitting IPv6 multicast packets over Ethernet, the low order 32 bits of the IPv6 multicast address are used to build the Ethernet
multicast destination address composed of 33-33 (hexa) as the first two bytes, the low order 4 bytes of the IPv6 multicast destination address
See M. Crawford, Transmission of IPv6 Packets over Ethernet Networks, RFC2464, 1998
IPv6 multicast addressing
architecture
• Unicast-Prefix-based IPv6 Multicast
Addresses
128 bits
• Motivation
• Pragmatic method to allow each prefix to have unique
CNPP/2008.8.
IPv6 multicast addresses © O. Bonaventure 2008
88
See B. Haberman, D. Thaler, Unicast-Prefix-based IPv6 Multicast Addresses, RFC3306, August 2002
Multicast Listener Discovery
89
See
S. Deering, W. Fenner, B. Haberman, Multicast Listener Discovery (MLD) for IPv6, RFC2710, October 1999
R. Vida, Ed., L. Costa, Ed., Multicast Listener Discovery Version 2 (MLDv2) for IPv6, RFC3810, June 2004
IPv6 multicast addressing
architecture
• Embedding RP addresses inside IPv6
multicast addresses
128 bits
90
See P. Savola, B. Haberman, Embedding the Rendezvous Point (RP) Address in an IPv6 Multicast Address, RFC3956, November 2004