Академический Документы
Профессиональный Документы
Культура Документы
Tutorial • Addressing
• Flow Label
• Extension Headers
• Packet Size Issues
Bob Hinden
• Routing
(as told by Charles E. Perkins)
• ICMP / Neighbor Discovery
{bob.hinden,charles.perkins}@nokia.com
1 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 2 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
WHY IPv6
• The Internet has been a great Success!
– Success creates problems
• IPv4 is running out of Global IP Addresses
– Addresses are currently being rationed
• Network Address Translation (NAT) has extended the life of
IPv4, but: IPv6 PROTOCOL
– Breaks Internet End-to-End model
– Inhibits new applications
– Doesn’t create any new global addresses
• Or fix inequities in current allocation systems
3 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 4 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
IPv6 & IPv4 HEADERS
IPv6 HEADER FORMAT
Ver. Traffic
Class Flow Label Hdr Type of
Ver. Len Service Total Length
40 Options...
bytes
32 bits
5 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 6 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
HEADER CHANGES
• Revised
– Addresses increased 32 bits -> 128 bits
– Time to Live -> Hop Limit
– Protocol -> Next Header
– Type of Service -> Traffic Class
• Streamlined
– Fragmentation fields moved out of base header
– IP options moved out of base header
– Header Checksum eliminated
ADDRESSING
– Header Length field eliminated
– Length field excludes IPv6 header
– Alignment changed from 32 to 64 bits
• Extended
– Flow Label field added
7 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 8 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
WHY 128-bit ADDRESSES? TEXT REPRESENTATION
• Some wanted fixed-length, 64-bit addresses OF ADDRESSES
– Easily good for 1012 sites, 1015 nodes, at .0001 allocation
efficiency (3 orders of mag. more than IPng requirement) “Preferred” form: 1080:0:FF:0:8:800:200C:417A
– Minimizes growth of per-packet header overhead
– Efficient for software processing
Compressed form: FF01:0:0:0:0:0:0:43
• Some wanted variable-length, up to 160 bits
becomes FF01::43
– Compatible with OSI NSAP addressing plans
– Big enough for auto-configuration using IEEE 802 addresses
– Could start with addresses shorter than 64 bits & grow later IPv4-embedded: 0:0:0:0:0:FFFF:13.1.68.3
• Settled on fixed-length, 128-bit addresses or ::FFFF:13.1.68.3
– (340,282,366,920,938,463,463,374,607,431,768,211,456)
9 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 10 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
TEXT REPRESENTATION OF
BASIC ADDRESS TYPES
ADDRESSES (cont.)
Unicast:
Address prefix: 2002:43c:476b::/48 for one-to-one U
(note: no masks in IPv6!) communication
M
11 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 12 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
ADDRESS TYPE PREFIXES IPv6 ADDRESS SPACE
• An Address’s type is determined by its leading bits: LAYOUT
type binary prefix Global
Reserved* Reserved
Unspecified 0000…….0000 (128 bits) Unicast
Link-Local
Reserved Multicast
• The unspecified address indicates the absence of an address Unicast
1024ths
• The loopback address is a special-case unicast address
* Part of the first reserved 8th of space is allocated to various special-purpose
• Anycast addresses are indistinguishable from unicast addresses, currently including the Unspecified, Loopback, and ,
IPv4-embedded; altogether consuming ~128th of total space.
– (but, see RFC 2526)
13 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 14 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
15 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 16 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
CONFIGURING INTERFACE IDs GLOBAL UNICAST ADDRESSES
• There are several choices for configuring the interface ID
001 Global Routing Prefix Subnet Interface ID
of an address:
– Manual configuration (of interface ID or whole addr) public site interface
– DHCPv6 (configures whole address) [RFC 3315] topology topology identifier
(45 bits) (16 bits) (64 bits)
– Automatic derivation from 48-bit IEEE 802 address
or 64-bit IEEE EUI-64 address [RFC 2462]
• Only 1/8th of total space (binary 001 prefix) used initially
– Pseudo-random generation (for client privacy) [RFC 3041]
• Global routing prefix is hierarchically structured, using
• Latter two choices enable “serverless” or “stateless”
CIDR-type allocation and routing
autoconfiguration, when combined with high-order part of the
address learned via Router Advertisements • Current agreed default Registry policy is for every
subscriber site (e.g., corporate site, campus, residence, etc.)
to be assigned a 48-bit prefix
=> 16 bits of subnet space
17 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 18 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
• Is remaining 45 bits enough to address all subscribers?? • Note: The exact HD value used is under discussion.
Currently 0.80 used in RIR allocations, might be changed
to higher value (e.g., 0.87).
19 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 20 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
HD RATIO APPLIED TO 45-bit
ADDRESS SPACE TLA / NLA TERMINOLOGY
• 45-bit space for sites holds 35 trillion numbers
– 35 trillion /48 prefixes (not total addresses)
001 TLA NLA* subnet interface ID
• Achievable utilization, according to HD ratio:
HD = 0.80 manageable = 70 billion public site interface
topology topology identifier
HD = 0.85 painful = 330 billion (45 bits) (16 bits) (64 bits)
HD = 0.87 practical limit = 610 billion
• TLA = Top-Level Aggregator
• Current world population is 6.1 billion, projected to peak at 9 to
NLA* = Next-Level Aggregator(s)
12 billion in about 2070
• This structure is defined in earlier IPv6 Address
• This is still using only 1/8th of total IPv6 address space;
Architecture RFCs and registry policy documents,
majority of space is being kept in reserve in case these
but has been dropped in more recent revisions
projections miss the mark
• Regional internet registries (RIRs) are responsible for
structure/allocation of the 45-bit global routing part
21 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 22 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
Link •••
• IPv6 includes non-global addresses, similar to IPv4 private
Link Site •••
addresses (“net 10”, etc.)
Link •••
• A topological region within which such non-global addresses Link •••
are used is called a zone
Link Site The Global Internet
• Zones come in different sizes, called scopes Link •••
(e.g., link-local, site-local,…) Link •••
• Unlike in IPv4, a non-global address zone is also part of the Link Site •••
global addressable region (the “global zone”) Link •••
=> an interface may have both global and non-global
addresses Each oval is a different zone; different colors indicate different scopes
23 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 24 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
PROPERTIES OF ZONES AND PROPERTIES OF ZONES AND
SCOPES SCOPES (cont.)
• The scope of an address is encoded in the address itself, but the
zone of an address is not
• Zones of the same scope do not overlap, e.g., two sites – That’s why the “%zone-id” qualifier is needed, in the text
cannot overlap (i.e., cannot have any links in common) representation of addresses
• Zones of smaller scope nest completely within zones of – For a non-global address received in a packet, its zone is
larger scope determined based on what interface it arrived on
• Zones of same scope can reuse addresses of that scope • Packets with a source or destination address of a given scope
(e.g., the same link-local address can occur in more than are kept within a zone of that scope
one link) – (enforced by zone-boundary routers)
• Zone boundaries always cut through nodes,
not links or interfaces
25 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 26 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
NON-GLOBAL UNICAST
ZONE BOUNDARIES
ADDRESSES
• Link-local unicast addresses are meaningful only in a
single link zone, and may be re-used on other links
1111111010 0 Interface ID
27 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 28 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
SITE-LOCAL ADDRESS
UNIQUE LOCAL ADDRESSES (ULA)
DEPRECATION
• IPv6 Site-Local addresses have two serious of problems: Prefix L Global ID Subnet ID Interface ID
– Ambiguous prefix (like IPv4 Net 10.)
– Site scope boundary not well defined and hard to enforce 7 bits 1 40 bits 16 bits 64 bits
• The problems add considerable complexity to
– Routers enforcing site boundaries • Prefix FC00::/7
– Multi-home hosts (with interfaces in different sites)
• L Set to 1 to indicate locally assigned
– Applications that need to select and exchange addresses Set to 0 for future definition
• IETF decided to Deprecate Site-Local addresses • Global ID 40-bit Global identifier computed locally using
– RFC3879 “Deprecating Site Local Addresses” pseudo-random algorithm
• Unique Local IPv6 Unicast Addresses developed to replace Site- • Subnet ID 16-bit Subnet identifier
Local Addresses (approved by IESG)
• Interface ID 64-bit Subnet identifier
– <draft-ietf-ipv6-unique-local-addr-09.txt>
29 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 30 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
31 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 32 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
MULTICAST ADDRESSES IPv6 NODES WILL USUALLY
11111111 Flags Scope Group ID HAVE MANY ADDRESSES PER
8 4 4 112 bits INTERFACE
• Low-order flag indicates permanent / transient group; three • Link-Local
other flags reserved
• Unique Local Addresses
• Scope field:
1 - interface-local (for multicast loopback) • Auto-configured 6to4 (if IPv4 public is address available)
2 - link-local (same as unicast link-local)
3 - subnet-local • Solicited-Node Multicast
4 - admin-local
5 - site-local • All-Nodes Multicast
8 - organization-local • Global anonymous
B - community-local
E - global (same as unicast global) • Global published
(all other values reserved)
33 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 34 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
35 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 36 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
FLOW LABEL DEFINITION
• A flow is a sequence of packets sent from a particular source to a
particular unicast, anycast, or multicast destination that the source
desires to label as a flow
• Packet in a specific flow identified by
– Flow Label
– Source Address EXTENSION
HEADERS
– Destination Address
• Flow Label set by source node must be delivered unchanged to
the destination node
• Flow label field values
– Zero indicates packet not part of a flow
– Non-zero indicates packet has been labeled
• RFC3697 “IPv6 Flow label Specification” defines rules and usage
37 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 38 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
39 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 40 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
HOP-BY-HOP OPTIONS HEADER & OPTION TYPE ENCODING
DESTINATION OPTIONS HEADER
AIU C Option ID
• Are containers for variable-length options:
41 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 42 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
PadN 1 N-2 N-2 Zero octets… – If this action not OK, must use an option
• Used to align options so multi-octet data fields fall on – If this action OK, have choice of option or separate
natural boundaries extension header (may depend on alignment, ease of
parsing, # octets required,…)
• Used to pad out containing header to an integer multiple of
8 octets
43 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 44 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
MINIMUM MTU
• Definitions:
– Link MTU A link’s maximum transmission unit,
i.e., the max IP packet size that can be
transmitted over the link
PACKET SIZE – Path MTU The minimum MTU of all the links in a
path between a source and a destination
45 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 46 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
47 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 48 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
MAXIMUM PACKET SIZE
49 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 50 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
51 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 52 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
ICMP ERROR MESSAGES
[RFC 2463]
• Common format
53 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 54 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
• Parameter problem
– Erroneous header field
– Unrecognized next header type
– Unrecognized option
55 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 56 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
NEIGHBOR DISCOVERY ROUTER ADVERTISEMENTS
• ICMP message types:
– Router solicitation • Periodically multicast by router to all-nodes multicast address
– Router advertisement (link scope)
– Neighbor solicitation • Contents:
– Neighbor advertisement – “I am a router” (implied) – list of:
– Redirect – Lifetime as default (1 sec – 18 hr) »prefix
• Functions performed: – “Get addresses from DHCP” flag » prefix length
– Router discovery – “Get other stuff from DHCP” flag » valid lifetime
– Prefix discovery – Router’s link-layer address » preferred lifetime
– Autoconfiguration of address & other Parameters – Link MTU » on-link flag
– Duplicate address detection (DAD) – Suggested hop limit » autoconfig OK flag
– Neighbor unreachability detection (NUD) • Not sent frequently enough for unreachability detection
– Link-layer address resolution
– First-hop redirect
57 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 58 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
• Neighbor Solicitations • New subnet prefixes can be added, and old ones deleted, to
– For address resolution: sent to “solicited node” multicast address
cause automatic renumbering
– For unreachability detection: sent to neighbor’s unicast address • Automatic address construction can be overridden by DHCP
• Neighbor Advertisements service, for more local control
– For address resolution: sent to unicast address of solicitor
– For link-layer address change: sent to all-nodes multicast address
– Usable for proxy responses (detectable)
– includes router/host flag
59 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden 60 © 2005 IPv6 Protocol Tutorial – China Summit 2005 / Bob Hinden
SUMMARY