Вы находитесь на странице: 1из 42

Internet Protocol v6

Dept. of Computer Science and Information Management


Providence University, Taiwan

Yung-Chang Wong
ycwong@pu.edu.tw

Page 1

Contents

– Overview of Functionality
ƒ IPv6 Header Structure
ƒ Extension Headers
– IPv6 Addressing
– ICMPv6
– Stateless Address Auto-configuration
– Neighbor Discovery
ƒ Conceptual sending algorithm
ƒ Address Resolution
– Routing
– Interoperability

Page 2

1
Overview of Functionality

Page 3

Reference

– S. Hagen, “IPv6 Essentials”, O’Reilly, 2002.

Page 4

2
Main changes from IPv4 to IPv6

– Expanded addressing capability


– Auto-configuration mechanisms
– Simplification of the header format (efficiency)
– Improved support for extensions and options (flexibility)
– Flow labeling capability (better QoS support)
– Extensions for authentication and privacy
(better security support)

Page 5

IPv4 Header Structure

0 16 31
Ver=4 IHL TOS Total length
Identification Flags Fragment offset
TTL Protocol Header checksum
Source address
Destination address
IP options

Payload

Page 6

3
IPv6 Header Structure

Payload
IPv6 header Extension header
(Upper layer protocol
(1) (*)
header and data)

• The IPv4 header can be extended from 20-40 bytes to specify options
such as Security Options, Source Routing, or Timestamping.
• This capacity are rarely been used because it causes a performance hit.
ƒ IPv4 hardware forwarding implementations have to pass the packet
containing options to the CPU (software handling)
• The current IPv6 specification (RFC 2460) defines 6 extension headers
ƒ Hop-by-Hop Options header
ƒ Routing header
ƒ Fragment header
ƒ Destination Options header
ƒ Authentication header (RFC 2402)
ƒ Encrypted Security Payload header (RFC 2406)
Page 7

IPv6 Header Structure

– Fixed 40 bytes in length

0 4 12 16 24 31
Ver Traffic Class Flow Label
Payload Length Next Header Hop Limit
Source address Header checksum
Source address (ctn.)
Source address (ctn.)
Source address (ctn.)
Destination address
Destination address (ctn.)
Destination address (ctn.)
Destination address (ctn.)

Page 8

4
IPv6 Header Structure
0 4 12 16 24 31
Ver Traffic Class Flow Label
Payload Length Next Header Hop Limit • This field can be used
to identify and distinguish
Source address Header checksum between different classes
Source address (ctn.) or priorities of IPv6
packets.
Source address (ctn.)
• See RFC 2474 for
Source address (ctn.) details
Destination address
Destination address (ctn.)
Destination address (ctn.)
Destination address (ctn.)

Page 9

IPv6 Header Structure


0 4 12 16 24 31
Ver Traffic Class Flow Label
Payload Length Next Header Hop Limit
Source address Header checksum
Source address (ctn.)
Source address (ctn.)
Source address (ctn.)
Destination address
Destination address (ctn.)
Destination address (ctn.)
Destination address (ctn.)

• A flow is unique identified by the flow label and the address of source node
• Routers keep track of flows and can process packets belonging to the same
flow more efficiently because they do not have to process each packet’s
header Page 10

5
IPv6 Header Structure
0 4 12 16 24 31
Ver Traffic Class Flow Label
Payload Length Next Header Hop Limit • The Length filed in IPv4
includes the length of
Source address Header checksum IPv4 header
Source address (ctn.) • The Payload Length
field in IPv6 contains
Source address (ctn.)
only the data following
Source address (ctn.) the IPv6 header.
Destination address
Destination address (ctn.)
Destination address (ctn.)
Destination address (ctn.)

X 9 9
IPv6 header Extension header Payload
(1) (*) (TCP header and data)
Page 11

IPv6 Header Structure


0 4 12 16 24 31
Value Description
Ver Traffic Class Flow Label 0 Hop-by-hop opt.
Payload Length Next Header Hop Limit header
1 ICMPv4
Source address Header checksum 2 IGMPv4
Source address (ctn.) 4 IP in IP
6 TCP
Source address (ctn.) 17 UDP
Source address (ctn.) 43 Routing header
44 Fragmentation header
Destination address 50 Encrypted Security
Payload header
Destination address (ctn.)
51 Authentication header
Destination address (ctn.) 58 ICMPv6
59 No Next Header
Destination address (ctn.)
60 Destination Options
header
• In IPv4, this field is the Protocol Type field. 134-254 Unassigned
• For the most current list, go to 255 Reserved
http://www.iana.org/assignments/protocol-numbers
Page 12

6
IPv6 Header Structure
0 4 12 16 24 31
Ver Traffic Class Flow Label
Payload Length Next Header Hop Limit
Source address Header checksum
Source address (ctn.)
Source address (ctn.)
Source address (ctn.)
Destination address
Destination address (ctn.)
Destination address (ctn.)
Destination address (ctn.)

• The value in this field expresses a number of hops (and not


a number of seconds).
• Every forwarding node decrements the number by one.
Page 13

Extension Headers

IPv6 header Routing header Fragment header TCP header


Next header=43 Next header=44 Next header=6 and data

• Each extension header is identified by the Next Header field in the


preceding header
• The extension headers are examined or processed only by the node
identified in the Destination Address field of the IPv6 header (the Hop-
by-Hop Options is an exception)
• Extension header must be processed in the order they appear in the
packet header

Page 14

7
Extension Headers

– The following header order should be used (RFC 2460)


• IPv6 header
• Hop-by-Hop Options header
• Destination Options header
ƒ for options to be processed by the 1st destination that
appears in the IPv6 Dest. Address field, plus subsequent
destinations listed in the Routing header
• Routing header
• Fragment header
• Authentication (AH) header
• Encrypted Security Payload (ESP) header
• Destination Options header
ƒ to be processed only by the final destination of the packet
• Upper-layer header
Page 15

Extension Headers

– Hop-by-Hop Options header


• Carries optional information that must be examined
by every node along the path of the packet
• Indicated by a Next Header value of zero
• In the absent of a H-b-H header, a router can
route the packet immediately to the destination

Next Header • Identified type of following


(1 byte) header

Header Ext.
• In unit of 8-byte, excluding
Length (1 byte)
the first 8 bytes
Options
Type Len Data
(variable)
• Contain one or more options
TLV-format

Page 16

8
Extension Headers

– Routing header
• Give a list of intermediate nodes that should be visited
on the packet’s path to its destination
Next Header
(1 byte)
• Identified type of routing header
Header Ext. • Currently type zero defined (RFC 2460)
Length (1 byte)
Routing type
• Number of listed nodes left
(1 byte)
until final destination
Segments left
(1 byte)
Type specific For type zero:
Type Len Data Reserved
Data (variable)
(4 bytes)

Address 1 (16 bytes)


Address n (16 bytes) … Page 17

Extension Headers

– Routing header (ctn.)


• An example: S Æ I1 Æ I2 Æ I3 Æ D

IPv6 header routing header


IPv6 header routing header
SIP= S Segment left=0
SIP= S Segment left=3 DIP= D Address(1) = I1
DIP= I1 Address(1) = I2 Address(2) = I2
Address(2) = I3 Address(3) = I3
Address(3) = D

IPv6 header routing header


IPv6 header routing header
SIP= S Segment left=1
SIP= S Segment left=2 DIP= I3 Address(1) = I1
DIP= I2 Address(1) = I1 Address(2) = I2
Address(2) = I3 Address(3) = D
Address(3) = D
Page 18

9
Extension Headers

– Destination Options header


• Carries optional information that is examined by the
destination node only
• E.g., A MN’s home address in the home address
option

Next Header
(1 byte)
Header Ext.
Length (1 byte)
Options
Type Len Data
(variable)

Page 19

IPv6 Addressing

Page 20

10
Reference

– S. Hagen, “IPv6 Essentials”, O’Reilly, 2002.


– T. Narten, “Neighbor Discovery and Stateless Auto-
configuration in IPv6”,Internet Computing, July-Aug 1999.

Page 21

Contents

– Types of address
– Interface initialization

Page 22

11
Type of Addresses

– Unicast addresses
– Multicast addresses
– Anycast addresses

– Global-scope addresses
– Link-local addresses
– Site-local addresses (NAT-like)
– Interface (or node)-local addresses

Page 23

Multicast Addresses (1)

1111 1111 flag scope group ID

Flags: bit 0-2 reserved (must be zero)


bit 3 0 = this is a well-known MC address
1 = this is a temporary MC address

Scope value:
1 interface-local
2 link-local scope
3,4 unassigned
5 site-local scope
E global scope
F reserved

Page 24

12
Multicast Addresses (2)

Link-local, well-known:

FF02:0:0:0:0:0:0:1 All-nodes address


FF02:0:0:0:0:0:0:2 All-routers address
FF02:0:0:0:0:1:FFxx:xxxx Solicited-node address

Notes.
(1) xx:xxxx is the low-order 24 bits of the IPv6 address

Page 25

Interface Initialization

– When a MC-capable interface enabled, a node must


• join the all-nodes MC address on that interface
• join the SN MC address corresponding to each of
the (unicast and anycast) IP address assigned to the
interface

Page 26

13
ICMPv6

Page 27

Reference

– S., “”, RFC 2463, Dec. 1998.

Page 28

14
Contents

– (ICMP) Message Format


– Option Format

Page 29

ICMPv6

– ICMP for IPv4


• Reports errors (Error message)
• Performs diagnostic functions (Information message)
– ICMPv6 (RFC 2463) is more powerful than ICMPv4
• (skip)

Page 30

15
General Message Format

IPv6 header Ext. header 1 Ext. header n ICMP


Next header=i Next header=j Next header=58 header

Type
(1 byte)
Code
(1 byte)
Checksum
(2 byte)
Message body
Type Len Data
(variable)

Page 31

General Message Format

– ICMPv6 error messages and code types


Message # Message Type Code field
11 Dest.
Dest.Unreachable
Unreachable 0=
0=
1=
1=
2=
2=
22 Packet
Packettoo
toobig
big
33 Time Exceeded
Time Exceeded
44 Parameter
ParameterProblem
Problem
……
127
127

Page 32

16
General Message Format

– ICMPv6 information messages


Message # Message Type Description
128 Echo Request
129 Echo Reply
130 Multicast Listener Query
131 Multicast Listener Report
132 Multicast Listener Done
133 Router Solicitation
134 Router Advertisement
135 Neighbor Solicitation
136 Neighbor Advertisement
137 Redirect
138 Router Renumbering
139 ICMP Node Information
Query
140 ICMP Node Information
Response Page 33

General Message Format

– ICMPv6 information messages (ctn.)


Message # Message Type Description
141 Inverse ND Solicitation
142 Inverse ND Adv.

Page 34

17
Message Format: Router Solicitation

– Trigger routers to issue RA immediately, outside of the regular interval

IPv6 header
Type SIP= Source IP address, or the
133
(1 byte) unspecified address
Code DIP= FF02::2 (all-router MC address)
0 Hop limit= 255
(1 byte)
Checksum
(2 byte) Valid option:
• Source link-layer address. MUST
Reserved
NOT be included if the Source
Address is the unspecified
Message body
Type Len Data address
(variable)

Page 35

Message Format: Router Advertisement (1)

IPv6 header
SIP= Link-local source address
DIP= Source address of an invoking
Type
134 RS or FF02::1 (all-node MC address)
(1 byte)
Hop limit= 255
Code
0
(1 byte) Default value for hop count field
of the IP header for outgoing packets.
Checksum
A value of zero means unspecified.
(2 byte)
Current Hop Limit
M= Managed address configuration flag
(1 byte)
• Set: hosts use the stateful protocol
(1 byte) for address auto-configuration
MO
O= Other stateful configuration flag
• Set: hosts use the stateful protocol
for auto-configuration of other
information
Page 36

18
Message Format: Router Advertisement (2)

Lifetime associated with default router in


units of seconds. (Max. 18.2 hrs)
Router Lifetime Zero means not a default router.
(2 byte)
Reachable Time The time, in ms., that a node
(4 byte) assumes a neighbor is reachable
Retrans. Timer after having received a
(4 byte) reachability confirmation

Options
(variable)
The time, in ms., between
Valid options: Neighbor Solicitation messages.
• Source link-layer address Used by address resolution and
• MTU NUD.
• Prefix Information for auto-cfg Page 37

Message Format: Neighbor Solicitation (1)

– Nodes send NS to request the link-layer address of a


target node while also providing its own link-layer
address to the target
– NS is multicast when the node needs to resolve an
address and unicast when the node seeks to verify
the reachability of a neighbor

Page 38

19
Message Format: Neighbor Solicitation (2)

IPv6 header
SIP= Source IP address, or ( if DAD
Type is in progress) the unspecified address
135 0:0:0:0:0:0:0:0
(1 byte)
DIP= solicited-node MC address corresponding
Code to the target, or the target address
0
(1 byte) Hop limit= 255
Checksum
(2 bytes) Valid option:
Reserved • Source link-layer address. MUST
(4 bytes) NOT be included when the Source
IP Address is the unspecified
Target IP address
address
(16 bytes)
Message body
Type Len Data
(variable)

Page 39

Message Format: Neighbor Advertisement (1)

IPv6 header
SIP
Type DIP= solicited-node IP address, or
136 FF02::1 (all-node MC address)
(1 byte)
Hop limit= 255
Code
0
(1 byte)
• R (router flag): when set, the R-bit
Checksum
indicates the sender is a router
(2 bytes)
• S (solicited flag): when set, the S-bit
Reserved indicates that the ad. was sent in
R SO
(4 bytes) response to a NS from the Dest. Add.
• O (override flag): when set, O-bit indicates
that the ad. should override an existing
cache entry and update the cached
link-layer address

Page 40

20
Message Format: Neighbor Advertisement (2)

• For solicited ad.: the Target Address field in the NS


message that prompted this
• For an un-solicited ad.: the address whose link-layer
address changed

Target IP address
(16 bytes)
Valid option:
Message body • Target link-layer address. The
Type Len Data
(variable) link-layer address for the sender
of the advertisement

Page 41

Message Format: Redirect (1)

– (skip)

Page 42

21
Option Format

– Types of options (RFC 2461)


• source link-layer address
• target link-layer address
• prefix information
• re-directed header
• MTU

Page 43

Option Format: Prefix (1)

The value ranges from 0 -128


Type
3
(1 byte)
Length • L (on-link flag): when set, indicates that
4
(1 byte) this prefix can be used for on-link
determination
Prefix length • A (autonomous address-configuration flag):
(1 byte) when set, indicates that this prefix can
be used for AAC
(1 byte) L A

Valid lifetime
(4 bytes)
Length of time in seconds that the prefix
Is valid for on-link determination

Page 44

22
Option Format: Prefix (2)

Preferred
Lifetime (4 bytes)
Reserved2
(4 bytes)
Prefix
(16 bytes) Length of time in seconds that the address
generated from the prefix via stateless
AAC remain preferred

Page 45

Option Format: Source/Target LLA

Type
1/2
(1 byte)
In
Inunit
unitof
of88octets.
octets.For
Forexample,
example,the
the
Length
4 length
length for IEEE 802 addressesisis1.1.
for IEEE 802 addresses
(1 byte)
Link-layer
address

• Source LLA contains the link-layer address of the sender of the packet.
It is used in the NS, RS, and RA packets.
• Target LLA contains the link-layer address of the target. It is used in
NA and Redirect packets.

Page 46

23
Stateless Address
Autoconfiguration

Page 47

Reference

– S. Thomson and T. Narten, “IPv6 Stateless Address


Autoconfiguration”, RFC 2462, Dec. 1998.

Page 48

24
Contents

– Terminology
– Procedure Overview
– Creation of Link-local Addresses
– Creation of Global-scope Addresses
– Duplicate Address Detection (DAD)
– Addresses Lifetime Expiry
– Configuration Consistency

Page 49

Terminology

– Off-link: An address that is not assigned to any


interfaces on the specified link (i.e., behind the router)
– Node: a device that implements IP
– Host: any node that is not a router
– Link: a communication medium over which nodes can
communicate at the link layer. Examples are Ethernets.

Page 50

25
Procedure Overview

– In the stateful auto-configuration model,


• hosts obtain interface addresses from a server
• server maintain a database that keeps track of which
addresses have been assigned to which hosts
– Both stateful and stateless models may be used
simultaneously. For example,
• stateless model to configure the address
• stateful model to obtain other information
– IPv6 addresses are leased to an interface for a fixed
length of time

Page 51

Procedure Overview

Create the link-local address (without the help of a router)

Perform Duplicated-address-detection (DAD) tentative

Assign the address to the interface

Create the global-scope address (with the help of a router)

Perform DAD (optional) tentative

Assign the address to the interface


preferred
valid
deprecated

invalid
Page 52

26
Procedure Overview

– DAD must take place on all unicast addresses, regardless


of whether they are obtained through stateful, stateless,
or manual configuration, with the exception of
• anycast addresses
• additional address derived from the same interface ID
– The procedure for DAD uses NS and NA messages
– A tentative address is not considered “assigned to an
interface. The interface must
• accept NS and NA messages containing the tentative
address in the Target Address field
• discard other packets addressed to the tentative
address

Page 53

Procedure Overview

– The use of DAD can be disabled by administrator


– To speedup the auto-configuration process, a host may
generate its link-local address in parallel with waiting
for a RA

Page 54

27
Creation of Link-local Address (1)

– Extended Unique Identifier (EUI64) format


• Ethernet MAC address (48-bit)
00-02-b3-1e-83-29
• IPv6 interface identifier (64-bit) (see RFC 2464)
00-02-b3-ff-fe-1e-83-29
02-02-b3-ff-fe-1e-83-29

The 2nd lower bit of the 1st


byte is complemented

Page 55

Creation of Link-local Address (2)

– A node’s (both host and router) multicast-capable


interface becomes enabled
– Generate a link-local address for the interface
link-local prefix fe80::0 + interface ID
– Perform DAD
• Succeed: assign the address to the interface
• Fail: auto-configuration stop and manual configuration
is required

Notes
– Link-local addresses are sufficient for allowing comm.
among nodes attached to the same link
– An interface ID should be less than 118 bits in length
– A link-local address is never timed out
Page 56

28
Creation of Global-scope Address (1)

host router
RS
RA

Valid combination:

M-bit T F F
– ManagedFlag Å M bit O-bit T T F
OtherConfigFlag Å O bit
• value changed from F to T: start the stateful AC protocol
• value changed from T to F: the change has no effect
Page 57

Creation of Global-scope Address (2)

– For each prefix-information option in RA,


• If the A-flag is not set, silently ignore the prefix option
• If the prefix is the link-local prefix, ignore the option
• If the preferred lifetime > the valid lifetime, ignore
the option
• If the prefix ad. does not match the prefix of an address
already in the list, and valid LT≠0,
9 form an address by
prefix + link-local address
9 add it to the list of address assigned to the Interface
9 Initialize its preferred and valid timers

Page 58

29
Creation of Global-scope Address (3)

Notes
– A link-local has no routers if no RAs are received after
having sent a small number of RS as described in
RFC 2461
– In this case, stateful auto-configuration should be invoked

Page 59

Duplicated Address Detection

Host A Nodes
NS (DAD)

IPv6 header
SIP= the unspecified address 0:0:0:0:0:0:0:0
Type 135 DIP= solicited-node MC address corresponding
to the target address
Code 0 Hop limit= 255

Target IP address A’s link-local / global address

Notes. Before sending NS, an interface MUST join the all-nodes MC address
and the solicited-node MC address of the tentative address. Page 60

30
DAD: on receipt of a Response (1)

– Case 1: the target address is not tentative (it is assigned


to B’s receiving interface)

Node A Node B IPv6 header


DIP= All-nodes MC
NS
Type 136
NA (solicited)
Reserved R SO

• R (router flag): when set, the R-bit


indicates the sender is a router
• S (solicited flag) = 0

Page 61

DAD: on receipt of a Response (2)


– Case 2.1: the target address is tentative to B, and the
source address is a unspecified address
• the NS is from a node performing DAD
• Hosts A and B attempt to use the same address
simultaneously
• the tentative address is a duplicate and should not
be used (by either node)
• How do node A know the duplicate occur?

Host A Host B
NS
NS

Page 62

31
DAD: on receipt of a Response (3)

– Case 2.2: the target address is tentative, and the source


address is a unicast address
• the NS’s sender is performing address resolution on
the target
• the NS should be silently ignored

Host A Host B
NS
NS (resolution)

Page 63

DAD: on receipt of a Response (4)

– Case 3: the target address is tentative (not assigned to


the receiving interface)
• the tentative address is duplicated

Host A Host B
NS
NA (un-solicited)

Page 64

32
Address Lifetime Expiry

– A deprecated address
• SHOULD continue to be used as a source address in
existing comm.
• SHOULD NOT be used in new comm. if an alternate
address is available
• IP and higher layers MUST continue to accepted
packets destined to the address
– An invalid address
• MUST NOT be used as a source/target address

Page 65

Configuration Consistency

– It is possible for hosts to obtain address information


using both stateful and stateless protocols
– Hosts accept the union of all information received
– If inconsistent information is learned different sources,
the most recently obtained values have precedence over
information learned earlier

Page 66

33
Neighbor Discovery

Page 67

Reference

– T. Narten, E. Nordmark, and W. Simpson, “Neighbor


Discovery for IP Version 6 (IPv6)”, RFC 2461, Dec. 1998.
– T. Narten, “Neighbor Discovery and Stateless Auto-
configuration in IPv6”,Internet Computing, July-Aug 1999.

Page 68

34
Contents

– Conceptual Data Structure


– Conceptual Sending Algorithm
– Router and Prefix Discovery
– Address Resolution
– Neighbor Unreachable Detection
– Redirect Function

Page 69

Conceptual Data Structure

– Neighbor cache: a set of entries about neighbors to


which traffics has been sent recently

• unicast IP address (key)


• link-layer address
• IsRouter flag
• reachability state (the following are for NUD)
• number of unanswered probes
• time to perform the next NUD event

Page 70

35
Conceptual Data Structure

Neighbor’s reachability states:

• Incomplete: link-layer address of the Neighbor has not yet


been determined since address resolution is in progress
• Reachable
• Stale: More than ReachableTime milliseconds have
elapsed since the last positive confirmation was received.
No action takes place until a packet is sent.

Page 71

Conceptual Data Structure

Neighbor’s reachability states (ctn.):

• Delay: More than ReachableTime milliseconds have


elapsed since the last positive confirmation was received,
and a packet was sent within the last DELAY_FIRST_
PROBE_TIME seconds.
DELAY_FIRST_PROBE_TIME seconds

time
enter DELAY enter PROBE
state state & send a NS

• Probe: A reachability confirmation is sought by


retransmitting NS.
Page 72

36
Conceptual Data Structure

State transition diagram for a N-cache entry

newly
created INCOMPLETE

resolution State transition???

ReachableTime
expire REACHABLE PROBE

DELAY_FIRST_PROBE_TIME
Receipt of a
expire
Unsolicited NA

STALE DELAY
a packet was
sent
Page 73

Conceptual Data Structure

– Destination cache: a set of entries about destinations


to which traffics has been sent recently

• unicast IP address (for packet’s destinations)


• IP address of next-hop neighbor

Note. This cache is updated with information learned


from redirect message.

Page 74

37
Conceptual Data Structure

– Prefix list: a list of prefixes that define a set of


addresses that are on-link
• prefix
• invalidation timer (i-timer)

Note. The link-local prefix fe80::0 is on the list with ∞ i-timer


Regardless of whether routers are ad. A prefix for it.

Prefix information in RA

L A

• L (on-link flag): when set, indicates that


Valid lifetime
this prefix can be used for on-link
determination
Preferred Lifetime

Prefix
Page 75

Conceptual Data Structure

– Default router list

• router: this entry points to entries in the N-cache


• invalidation timer

IPv6 header
Router Advertisement SIP= Link-local source address

Type 134
Lifetime associated with default router in
Router Lifetime units of seconds. (Max. 18.2 hrs)
Zero means not a default router.

Page 76

38
Conceptual Sending algorithm

(For a given unicast destination)


– Phase I. Next-hop IP address determination

• Search Destination Cache for next hop


• If no entry exist for the destination, performing a
longest prefix match against the Prefix List
9 On-link: next-hop address = destination address
9 Off-link: select a router from the Default Router List
• Save the results of NHD in the Destination Cache

Internet
router

sender
Page 77

Conceptual Sending algorithm

– Phase II. Link-layer address resolution for a neighbor

• Examine the Neighbor Cache for information


• If no entry exist,
9 Create one, and set its state to INCOMPLETE
9 Initiate address resolution
9 Save the link-layer address in the N-Cache

Page 78

39
Address Resolution (1)

– Sending Neighbor Solicitations (NS)


Node A Node B (next-hop)
NS
NA (solicited)
IPv6 header
SIP= Source IP address
DIP= solicited-node MC address corresponding
Type 135 to the target

Target IP
B’s IP address
address

Type 1
Link-layer
A’s link-layer address
address
Page 79

Address Resolution (2)

– Response a solicited NA
• Create of update the Neighbor Cache entry for the
IP source address of the solicitation
IPv6 header
Node A Node B DIP= A’s IP address
NS Type 136
NA (solicited) Reserved R SO

Target IP
B’s IP address
address

Type 2
• R (router flag): when set, the R-bit
indicates the sender is a router Link-layer
Target’s (B’s) link-layer address
• S (solicited flag) = 1 address
• O (overriding) = 1
Page 80

40
Address Resolution (3)

– Receipt of NA
• Search N-cache for the target’s entry
• If no entry exists, the NA SHOULD be discarded
• Once entry e has been located,
9 If e.state = INCOMPLETE
Ž record the LLA in N-cache
Ž If NA.S = 1, e.state Å REACHABLE
else e.state Å STALE
Ž e.IsRouter Å NA.R
9 (skip)
Node A Node B
NS
NA (solicited)

Page 81

Un-solicited N-Advertisement (1)

– A node wish to inform its neighbors of the new link-layer


address
Node A All Nodes IPv6 header
DIP= FF02::1 (all-node MC address)
NA (un-solicited)
Type 136 •S=0
Reserved R SO
Note. A node has multiple IP addresses
assigned to an interface MAY MC a Target IP
separate NA for each address. A’s IP address
address
Note. The neighbor unreachable detection
ensures that all nodes obtain a reachable Type 2
LLA, though the delay may be slightly
long. Link-layer
Target’s (A’s) link-layer address
address

Page 82

41
Un-solicited N-Advertisement (2)

– Receipt of unsolicited NA
• Search N-cache for the target’s entry e
• e.state = STALL
• If NA.O=1, update e with Target link-layer address
• If NA.O=0, ignore the new LLA address

Node A Node B

NA (un-solicited)

Page 83

42