IPv6 Tutorial - Public
IPv6 Tutorial - Public
Agenda
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
Agenda
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
IPv6 Features
BUT…
Home Network
Correspondent
Home Normal routing
Node
Agent to home network
Mobile
Node
Foreign
Router
Foreign Network
IPv6 Drivers:
Mobile IP
Mobile IP Model
1. Packets sent to home address
Home Network
Correspondent
Home Node
Agent
3. Return packets routed
2. Packets tunneled to directly to correspondent
“care of” address
via foreign router
Foreign
Router
Foreign Network
Mobile
Node
IPv6 Drivers:
Mobile IP
1600
Mobile
1400 Subscriber
s
1200
1000
Millions
800 PCs
Connected
to Web
600
Mobile
400
Internet
Users
200
0
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004
*Source: ISP-Planet.com
IPv6 Drivers:
Peer-to-Peer Networking
Content sharing
Napster was a wake-up call
Kazaa
Morpheus, FreeNet, Grokster, Gnutella, many more…
Distributed applications
Black-hat hackers already appreciate this (DDoS)
IPv6 Drivers:
Peer-to-Peer Networking
Barriers
• Asymmetric Internet
– Blame Tim Berners-Lee
– Cable modems, ADSL
– Modern ISPs sometimes designed with
client/server assumptions
• “Dumb” firewalls
– Port 80 exploits
– These must become smarter
• NAT and dynamic IP addresses
– Peer-to-Peer needs reachable hosts
IPv6 Drivers:
Internet-Enabled Devices
Internet-enabled appliances
Electrolux Screenfridge
Samsung Digital Network Refrigerator
Internet-enabled automobiles
Already available in many luxury cars
Interesting research being conducted in Japan
IPv6 Drivers:
Internet-Enabled Devices
Internet-enabled ATMs
Fujitsu Series 8000
Infonox, Western Union conducting pilot program
Smart sensors
Bioelectronics
IPv6 Drivers:
Conclusion
• The common factor in all cases is:
MORE IP ADDRESSES
– For billions of new users
– For billions of new devices
– For always-on access
– For transparent Internet connectivity the way
it was meant to be
IPv6 Around the World:
Address Allocation by Authority
29
62
APNI C
RI PE-NCC
ARI N
63
1
1 J apan
1 3 11 Korea
2 Taiwan
China
Australia
13 Singapore
39 Hong Kong
Malaysia
Thailand
3 2 2 2 11 11
11
3 11
3
4
14
4
8
DE GB SE FI NL IT FR RU PL AT PT
NO LT IE HU GR EU ES
IPv6 Around the World:
Global Advanced Research Networks
CA*net 2
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
IPv6 Address Representation
• 128 bits
• Represented by 8 colon-separated
segments
• Each 16-bit segment written in
hexadecimal
Example:
3ffe:3700:1100:0001:d9e6:0b9d:14c6:45ee
IPv6 Address Compaction
• Leading zeroes in a 16-bit segment can be
compacted
Example:
fe80:0210:1100:0006:0030:a4ff:000c:0
097
Becomes:
fe80:210:1100:6:30:a4ff:c:97
IPv6 Address Compaction
• All zeroes in one or more contiguous 16-
bit segments can be represented with a
double colon (::)
Example:
ff02:0000:0000:0000:0000:0000:0000:0
001
Becomes:
ff02::1
BUT…
IPv6 Address Compaction
• Double colons can only be used once
Example:
2001:0000:0000:0013:0000:0000:0b0c:3
701
Can be:
2001::13:0:0:b0c:3701
Or:
2001:0:0:13::b0c:3701
But not:
2001::13::b0c:3701
Imbedded IPv4 Addresses
• Some transition mechanisms imbed IPv4
addresses in IPv6 addresses
• Imbedded IPv4 addresses are represented
with dotted decimal
Examples:
::13.1.68.3
::ffff:129.144.52.38
fe08::5efe:172.24.240.30
IPv6 Prefix Representation
• CIDR-like notation used to specify prefix
length
Examples:
3ffe:0:0:2300:ce21:233:fea0:bc94/60
201:468:1102:1::1/64
IPv6 Prefix Compaction
2002:0000:0000:18d0:0000:0000:0000:0000/60
2002::18d0:0:0:0:0/60
2002:0:0:18d0::/60
IPv6 Address Types
• Unicast
– Identifies a single interface
– Packet sent to a unicast address is delivered to the interface
identified by that address
• Anycast
– Identifies a set of interfaces
– Packet sent to an anycast address is delivered to the nearest
interface identified by that address (as defined by the routing
protocol)
• Multicast
– Identifies a set of interfaces
– Packet sent to a multicast address is delivered to all interfaces
identified by that address
• IPv6 has no broadcast addresses
– IPv6 uses "all-nodes" multicast instead
IPv6 Address Scope
• Link-Local
– Used on a single link
– Packets with link-local source or destination addresses are not
forwarded to other links
• Site-Local
– Used for a single site
– Packets with site-local source or destination addresses are not
forwarded to other sites
– Applications similar to RFC 1918
• Global
– A globally unique address
– Packets with global addresses can be forwarded to any part of
the global network
Identifying Address Types
Unspecified ::/128
Loopback ::1/128
Multicast ff00::/8
Link-Local Unicast
fe80::/10
Site-Local Unicast
fec0::/10
128 bits
≥3 ≤13 8 24 16 64
Site
Public Topology Topology Interface Identifier
128 bits
3 45 16 64
Site
Public Topology Topology Interface Identifier
8 4 4 112
[edit]
lab@Juniper5# show interfaces fe-0/1/1
unit 0 {
family inet {
address 206.196.180.113/28;
}
family inet6 {
address 3FFE:3700:1102:1::1/64;
address 201:468:1102:1::1/64;
}
}
Configuration Example:
IOS Router Interface
interface Ethernet2
ip address 206.196.180.113 255.255.255.240
ipv6 address 3FFE:3700:1102:1::1/64
ipv6 address 201:468:1102:1::1/64
IPv6 Addresses
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
IPv4 vs. IPv6 Header Formats
32 bits 32 bits
Ver.
Ver. HL Ver.
Ver. Traffic
Traffic class
class Flow
Flow label
label
HL TOS Datagram
Datagram Length
Length
44 6
6 8
8 bits
bits 20
20 bits
bits
Payload
Payload Length
Length Next
Next Hdr.
Hdr. Hop
Hop Limit
Limit
Datagram-ID
Datagram-ID Flags
Flags Flag
Flag Offset
Offset 16
16 bits
bits 88 bits
bits 88 bits
bits
TTL
TTL Protocol
Protocol Header
Header Checksum
Checksum
Source
Source IP
IP Address
Address Source
Source Address
Address
128
128 bits
bits
Destination
Destination IP
IP Address
Address
IP
IP Options
Options (with
(with padding
padding if
if necessary)
necessary)
Destination
Destination Address
Address
128 bits
128 bits
IPv4 header
IPv6 header
IPv4 vs. IPv6 Header Formats
32 bits 32 bits
Ver.
Ver. HL Ver.
Ver. Traffic
Traffic class
class Flow
Flow label
label
HL TOS Datagram
Datagram Length
Length
44 6
6 8
8 bits
bits 20
20 bits
bits
Payload
Payload Length
Length Next
Next Hdr.
Hdr. Hop
Hop Limit
Limit
Datagram-ID
Datagram-ID Flags
Flags Flag
Flag Offset
Offset 16
16 bits
bits 88 bits
bits 88 bits
bits
TTL
TTL Protocol
Protocol Header
Header Checksum
Checksum
Source
Source IP
IP Address
Address Source
Source Address
Address
128
128 bits
bits
Destination
Destination IP
IP Address
Address
IP
IP Options
Options (with
(with padding
padding if
if necessary)
necessary)
Destination
Destination Address
Address
128 bits
128 bits
IPv4 header
IPv6 header
IPv4 vs. IPv6 Header Formats
32 bits 32 bits
Ver.
Ver. HL Ver.
Ver. Traffic
Traffic class
class Flow
Flow label
label
HL TOS Datagram
Datagram Length
Length
44 6
6 8
8 bits
bits 20
20 bits
bits
Payload
Payload Length
Length Next
Next Hdr.
Hdr. Hop
Hop Limit
Limit
Datagram-ID
Datagram-ID Flags
Flags Flag
Flag Offset
Offset 16
16 bits
bits 88 bits
bits 88 bits
bits
TTL
TTL Protocol
Protocol Header
Header Checksum
Checksum
Source
Source IP
IP Address
Address Source
Source Address
Address
128
128 bits
bits
Destination
Destination IP
IP Address
Address
IP
IP Options
Options (with
(with padding
padding if
if necessary)
necessary)
Destination
Destination Address
Address
128 bits
128 bits
IPv4 header
IPv6 header
IPv6 Header Format
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
IPv6 extension headers
Previous
Header header‘s NH-
value
Hop-by-hop options 0
Destination options 60
Routing 43
Fragment 44
Authentication 51
Encapsulating Security Payload 50
(ESP)
Destination options 60
OSPF for IPv6 89
IPv6 extension header processing
Type-specific data
Fragment header
Identification
Authentication
Authentication data
Encapsulating Security Payload (ESP)
Sequence Number
Payload data
Authentication data
Agenda
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
ICMPv6
• Many of the same functions as ICMPv4
– ICMPv4 Protocol Number = 1
– ICMPv6 Next Header Number = 58
• Adds new messages and functions
– Neighbor discovery
– Stateless autoconfiguration
– Mobile IPv6
ICMPv6 Message Types
1 Destination
Unreachable
3 Time Exceeded
4 Parameter Problem
Type Message
136 Neighbor
Advertisement (NA)
137 Redirect
Agenda
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
IPv6 Neighbor Discovery
• RFC 2461
• Neighbor can be router or host
• Performs several functions
– Link-layer address resolution
– Router discovery
– Local prefix discovery
– Address autoconfiguration
– Parameter discovery
– Next-hop determination
– Tracks neighbor and router reachability
– Duplicate address detection
– Redirects
Comparison to IPv4 Functions
Default GW- E
List
A
B
C
C A
B F G
RA
Solicited Router Advertisement
Default GW- E
List
A
B
C
C A
RS B F G
RA
Choosing a Default Gateway
Default GW-
List
A
B
C
Default GW- E
List ICMP Redirect
A to Router B
B
C
D
Sent data to Host 3
using Default GW
"A" C A
Host 3
Neighbor Cache
Example:
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
Address Autoconfiguration
• Stateless autoconfiguration
– Requires only a router
– Key advantage for applications such as Mobile IP
• Stateful autoconfiguration
– When more control is desired
– DHCPv6
• Stateless and stateful can be combined
– “M” and “O” flags in RA
• M flag: Stateless Address Autoconfiguration Y/N
• O flag: Stateless Autoconfigure Other Parameters Y/N
Stateless Autoconfiguration
EUI-64 Address:
200:bff:fe0a:2d51
Link-Local Address:
fe80::200:bff:fe0a:2d51
• RFC 3041
• A new Interface ID is randomly generated
– Whenever a new public address is
autoconfigured
– Periodically (period is configurable)
• Both autoconfigured public and private
addresses are used
– Public for incoming connections (DNS registered)
– Private for outgoing connections
Stateful Autoconfiguration:
DHCPv6
• Currently in Internet-draft
• Many changes from DHCPv4:
– Configuration of dynamic updates to DNS
– Address deprecation for dynamic renumbering
– Authentication
– Clients can ask for multiple IP addresses
– Addresses can be reclaimed
– Integration between stateful and stateless autoconfiguration
• Uses multicasting
– All_DHCP_Agents: ff02::1:2
– All_DHCP_Servers: ff05::1:3
Duplicate Address Detection
Must be performed by all nodes
Performed with both stateless and stateful
autoconfiguration
Performed before assigning a unicast address to an
interface
Performed on interface initialization
Not performed for anycast addresses
Link must be multicast capable
New address is called "tentative" as long as duplicate
address detection takes place
Duplicate Address Detection
[edit]
lab@Juniper5# show interfaces fe-2/1/0
unit 0 {
family inet6 {
address 2001:468:1100:1::1/64;
address 3ffe:3700:1100:1::1/64;
}
}
[edit]
lab@Juniper5# show protocols router-advertisement
interface fe-2/1/0.0 {
other-stateful-configuration;
prefix 3ffe:3700:1100:1::/64;
prefix 2001:468:1100:1::/64;
}
Configuration Example:
Windows XP Host
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
MTU path discovery
• IPv6 routers do not fragment packets
• Minimum MTU for IPv6: 1280 bytes
• Recommended MTU: 1500 bytes
• Nodes should implement MTU PD
• Otherwise they must use minimum MTU
• MTU path discovery works for unicast &
multicast
• MTU path discovery uses ICMP "packet
too big" error messages
Configuration Example:
Static Route
[edit routing-options]
ps@R1# show
rib inet6.0 {
static {
route abcd::/48 next-hop 8:3::1;
}
}
RIPng
• RFC 2080 describes RIPngv1, not to be confused with
RIPv1
• Based on RIP Version 2 (RIPv2)
• Uses UDP port 521
• Operational procedures, timers and stability functions
remain unchanged
• RIPng is not backward compatible to RIPv2
• Message format changed to carry larger IPv6 addresses
Configuration Example:
RIPng
[edit protocols]
lab@Juniper5# show
ripng {
group external_neighbors {
export default_route;
neighbor ge-0/0/0.0;
neighbor ge-0/0/1.0;
neighbor ge-0/0/2.0;
}
group internal_neighbors {
export external_routes;
neighbor ge-1/0/0.0;
}
}
IS-IS
• draft-ietf-isis-ipv6-02.txt, Routing IPv6 with
IS-IS
• 2 new TLVs are defined:
– IPv6 Reachability (TLV type 236)
– IPv6 Interface Address (TLV type 232)
• IPv6 NLPID = 142
Configuration Example:
IS-IS for IPv6 Only
lab@Juniper5# show
isis {
no-ipv4-routing;
interface ge-0/0/1.0;
interface ge-0/0/2.0;
}
OSPFv3
Type Description
0x2001 Router-LSA
0x2002 Network-LSA
0x2003 Inter-Area-Prefix-LSA
0x2004 Inter-Area-Router-LSA
0x2005 AS-External-LSA
0x2006 Group-Membership-LSA
0x2007 Type-7-LSA (NSSA)
0x2008 Link-LSA
0x2009 Intra-Area-Prefix-LSA
Configuration Example:
OSPFv3
[edit protocols]
lab@Juniper5# show
ospf3 {
area 0.0.0.0 {
interface ge-1/1/0.0;
}
area 192.168.1.2 {
interface ge-0/0/1.0;
interface ge-0/0/2.0;
}
}
Multiprocotol BGP-4
Two new attributes support multiprotocol BGP-4 (aka BGP+)
– Multiprotocol reachable NLRI (MP_REACH_NLRI)
– Multiprotocol unreachable NLRI (MP_UNREACH_NLRI)
• MBGP extensions use for IPv6 is described in RFC 2545
• MP_REACH_NLRI attribute describes reachable destinations
• Attribute contains information about
– Network layer protocol (i.e. IPv6)
– Prefixes
– Next-hop to reach prefixes
• MP_REACH_NLRI updates include
– One next-hop address
– List of associated NLRI‘s
• Follows BGP-4 rules for next-hop attribute
• IPv6 BGP routers advertise global address of NH-router
Example Configuration:
BGP
[edit protocols]
lab@Juniper5# show
bgp {
group IPv6_external {
type external;
import v6_externals;
family inet6 {
unicast;
}
export v6_routes;
peer-as 65502;
neighbor 3ffe:1100:1::b5;
}
group IPv6_internal {
type internal;
local-interface lo0.0;
family inet6 {
unicast;
}
neighbor 2001:88:ac3::51;
neighbor 2001:88:ac3::75;
}
}
The Multihoming Problem
207.17/16
207.17.137/24 207.17.137/24
SP 1
207.17/16
Customer
207.17.137/24 198.133/16
207.17.137/24
207.17.137/24
SP 2
198.133/16
“The World”
• ISP1 must “punch a hole” in its CIDR block
• ISP2 must advertise additional prefix
• Contributes to routing table explosion
• Contributes to Internet instability
– Due to increased convergence time
• Same problem applies to provider-independent (PI)
addresses
Possible IPv6 Multihoming Solutions
• IPv6 provides opportunities to fix multihoming problem
– Multiple unicast addresses per interface
• How does DNS work in this environment?
• How is source address chosen?
– Exchange-based addressing
• One TLA assigned to multiple metro ISPs
• How do ISPs negotiate and manage interconnects?
– Router Renumbering Protocol
– Globally unique node IDs
• Work has only begun in this area
– IETF multi6 WG
– Various R&D bodies
– LIN6 (Location-Independent Networking for IPv6)
Agenda
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
Transition Assumptions
• No “Flag Day”
– Last Internet transition was 1983 (NCP TCP)
• Transition will be incremental
– Possibly over several years
• No IPv4/IPv6 barriers at any time
• No transition dependencies
– No requirement of node X before node Y
• Must be easy for end user
– Transition from IPv4 to dual stack must not break anything
• Transition will be from edge inward
– Driven by customer demand
– Except for new networks
• IPv6 is designed with transition in mind
– Assumption of IPv4/IPv6 coexistence
• Many different transition technologies are A Good Thing™
– “Transition toolbox” to apply to myriad unique situations
Types of Transition Mechanisms
• Dual Stacks
– IPv4/IPv6 coexistence on one device
• Tunnels
– For tunneling IPv6 across IPv4 clouds
– Later, for tunneling IPv4 across IPv6 clouds
– IPv6 <-> IPv6 and IPv4 <-> IPv4
• Translators
– IPv6 <-> IPv4
Dual Stacks
• Usually just “dual layer,” not entire stack
Applications
TCP/UDP TCP/UDP
IPv6 IPv4
0x0800 0x86dd
Physical/Data Link
Tunnel Applications
Router to Router
IPv6
IPv4
Host to Host
IPv6 IPv6
IPv4
Host to Router
Router to Host
Tunnel Types
• Configured tunnels
– Router to router
• Automatic tunnels
– Tunnel Brokers (RFC 3053)
• Server-based automatic tunneling
– 6to4 (RFC 3056)
• Router to router
– ISATAP (Intra-Site Automatic Tunnel Addressing Protocol)
• Host to host, host to router, router to host
– 6over4 (RFC 2529)
• Host to host, host to router, router to router
• Requires IPv4 multicast network
– Teredo
• aka Shipworm
• For tunneling through IPv4 NAT
• Uses UDP
– DSTM (Dual Stack Transition Mechanism)
• aka 4over6
• IPv4 in IPv6 tunnels
– IPv64
Configuration Example:
Configured GRE Tunnel
gr-0/0/0 { gr-1/0/0 {
unit 0 { unit 0 {
tunnel { tunnel {
source 172.16.1.1; source 192.168.2.3;
destination 192.168.2.3; destination 172.16.1.1;
} }
family inet6 { family inet6 {
address 2001:240:13::1/126; address 2001:240:13::2/126;
} }
} }
} }
Configuration Example:
Configured MPLS Tunnel
PE Router: IPv6
mpls { CE
ipv6-tunneling;
label-switched-path v6-tunnel1 {
to 192.168.2.3;
PE
no-cspf;
}
IPv6 LSP
} PE IPv4
bgp {
group IPv6-neighbors { MPLS
type internal; CE
family inet6 {
labeled-unicast {
explicit-null;
} IPv6
}
neighbor 192.168.2.3;
}
}
6to4
Example:
IPv6
Public Internet
IPv4 address: 65.114.168.91
IPv4 address: 138.14.85.210
6to4 prefix: 2002:4172:a85b::/48
6to4 prefix: 2002:8a0e:55d2::/48
6to4
relay router
6to4 router
6 IPv4
IPv 6to4 router
IPv6 IPv6
IPv6 site
site
6to4 Prefix
= 65.114.168.91
ISATAP
IPv6
IPv6
IPv4
IPv4 6to4 router
Configuration Example:
Windows XP ISATAP Interface
• Namespace fragmentation
– Some names on IPv4 DNS, others on IPv6 DNS
– How does an IPv4-only host resolve a name in the IPv6
namespace, and vice versa?
– How does a dual-stack host know which server to query?
– How do root servers share records?
• MX records
– How does an IPv4 user send mail to an IPv6 user and vice versa?
• Solutions:
– Dual stacked resolvers
– Every zone must be served by at least one IPv4 DNS server
– Use translators (NAT-PT does not work for this)
DNS AAAA Records
• RFC 1886
• BIND 4.9.4 and up; BIND 8 is recommended
• Simple extension of A records
• ipv6.int analogous to in-addr.arpa for reverse mapping
• Difficult network renumbering
– New TLA, NLA, or SLA means changing all AAAA records in zone
AAAA record:
omer IN AAAA 2001:4210:3:ce7:8:0:abcd:1234
PTR record:
4.3.2.1.d.c.b.a.0.0.0.0.8.0.0.0.7.e.c.0.3.0.0.0.0.1.2.4.1.0.0.2.ip6.int IN PTR
homer.simpson.net
DNS A6 Records and DNAME
Address: 2001:4210:3:ce7:8:0:abcd:1234
$ORIGIN simpson.net
homer IN A6 64 ::8:0:abcd.1234 sla5.subnets.simpson.net
$ORIGIN subnets.simpson.net
sla5 IN A6 48 0:0:0:ce7:: site3.sites.net
$ORIGIN sites.net
site3 IN A6 32 0:0:3:: area10.areas.net
$ORIGIN areas.net
area10 IN A6 24 0:10:: tla1.tlas.net
$ORIGIN tlas.net
Tla1 IN A6 0 2001:4200::
Transition Issues:
Security
• IPv6 Overview
• Addressing
• Header format
• Header extensions
• ICMPv6
• Neighbor discovery
• Autoconfiguration
• Routing IPv6
• Transition to IPv6
• Juniper Networks IPv6 Support
IPv6 Available Features
Now
147
IPv6 Support
Packet filtering
DoS attack prevention
Comprehensive security
Packet Forwarding
E.g. Source Address 120 %
Filters 100 %
80 %
Policing 60 %
Interface-level rate 40 %
limiting 20 %
http://www.juniper.net