Subject: Question on RFC 4861, Appendix C

From: Nicolas Ojeda Bar <[email-masked]>
Date: Wed, 8 Oct 2014 14:51:36 +0100

Hello,

I am currently implementing ND as specified in RFC 4861. I have a question
on the state machine specified in Appendix C. There it says that on receipt
of a RA message for which there is no entry in the NC the node should
create a new entry for the router in the NC with state STALE.

I don't know how to interpret this because it implies that the RA message
comes with a 'Source link-layer address' option because that is needed to
have a STALE entry in the NC, but the 'Source link-layer address' option in
the RA message is optional (as stated in 4.2, 'Possible options'). What is
one supposed to do if there is no such option ?

Thank you very much,
Nicolas

---

From: Karl Auer <[email-masked]>
Date: Thu, 09 Oct 2014 01:36:21 +1100

> one supposed to do if there is no such option ?

I don't think the state machine is prescriptive. Looking at section
6.3.4, it's pretty clear that you SHOULD (not MUST) create an NC entry
from an RA, and in fact one of the reasons given for NOT doing so is if
there is no link-layer address in the RA.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer                                          tel  +61-2-64957435
[email-masked]                                 mob  +61-428-957160
                                         
Into6 - IPv6 design, support, training                www.into6.com.au

GPG fingerprint: C66C AF82 E0A2 155A 5444 7897 C370 D706 3EC0 C413
Old fingerprint: D8A4 A65A EE32 286F 1E36 55A4 0901 EEAF A785 1684

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer                                          tel  +61-2-64957435
[email-masked]                                 mob  +61-428-957160
                                         
Into6 - IPv6 design, support, training                www.into6.com.au

GPG fingerprint: C66C AF82 E0A2 155A 5444 7897 C370 D706 3EC0 C413
Old fingerprint: D8A4 A65A EE32 286F 1E36 55A4 0901 EEAF A785 1684

---

From: Erik Nordmark <[email-masked]>
Date: Wed, 08 Oct 2014 15:20:41 -0700

On 10/8/14 6:51 AM, Nicolas Ojeda Bar wrote:
> Hello,
>
> I am currently implementing ND as specified in RFC 4861. I have a 
> question on the state machine specified in Appendix C. There it says 
> that on receipt of a RA message for which there is no entry in the NC 
> the node should create a new entry for the router in the NC with state 
> STALE.

I assume this is the rule at the top of the "table" on page 91 which 
also has NS etc:
    -               NS, RS, RA, Redirect    Create entry. STALE

    INCOMPLETE      NS, RS, RA, Redirect    Record link-layer STALE
                                            address. Send queued
                                            packets.

Note that the link-layer address is merely a SHOULD for unicast NS messages.
Thus the same question applies for a NS as for a RA.

And in the INCOMPLETE case one can only record a lla of the message 
contains one; the queued packets can only be sent (on link-layers which 
has addresses) once the entry has a recorded lla.

>
> I don't know how to interpret this because it implies that the RA 
> message comes with a 'Source link-layer address' option because that 
> is needed to have a STALE entry in the NC, but the 'Source link-layer 
> address' option in the RA message is optional (as stated in 4.2, 
> 'Possible options'). What is one supposed to do if there is no such 
> option ?
>
>

There is more detail in section 6.3.4:
    After extracting information from the fixed part of the Router
    Advertisement message, the advertisement is scanned for valid
    options.  If the advertisement contains a Source Link-Layer Address
    option, the link-layer address SHOULD be recorded in the Neighbor
    Cache entry for the router (creating an entry if necessary) and the
    IsRouter flag in the Neighbor Cache entry MUST be set to TRUE. If no
    Source Link-Layer Address is included, but a corresponding Neighbor
    Cache entry exists, its IsRouter flag MUST be set to TRUE.  The
    IsRouter flag is used by Neighbor Unreachability Detection to
    determine when a router changes to being a host (i.e., no longer
    capable of forwarding packets).  If a Neighbor Cache entry is created
    for the router, its reachability state MUST be set to STALE as
    specified in Section 7.3.3.  If a cache entry already exists and is
    updated with a different link-layer address, the reachability state
    MUST also be set to STALE.

Does that make it clear?

Regards,
    Erik

---

From: Nicolas Ojeda Bar <[email-masked]>
Date: Thu, 9 Oct 2014 00:30:33 +0100

Thanks very much for all the answers! They have been very helpful.

Best wishes,
Nicolas

On Wed, Oct 8, 2014 at 11:20 PM, Erik Nordmark <[email-masked]> wrote:

>> question on the state machine specified in Appendix C. There it says that
>> on receipt of a RA message for which there is no entry in the NC the node
>> should create a new entry for the router in the NC with state STALE.
>>
>
> I assume this is the rule at the top of the "table" on page 91 which also
> has NS etc:
> contains one; the queued packets can only be sent (on link-layers which has
> addresses) once the entry has a recorded lla.
>
>