[6tisch] SeqNum definition in RFC8480 (6P)

Yasuyuki Tanaka <yasuyuki.tanaka@inria.fr> Fri, 19 April 2019 16:05 UTC

Return-Path: <yasuyuki.tanaka@inria.fr>
X-Original-To: 6tisch@ietfa.amsl.com
Delivered-To: 6tisch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ED4FF120302 for <6tisch@ietfa.amsl.com>; Fri, 19 Apr 2019 09:05:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f2dYVddEFgqy for <6tisch@ietfa.amsl.com>; Fri, 19 Apr 2019 09:05:50 -0700 (PDT)
Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4D1DB1202FF for <6tisch@ietf.org>; Fri, 19 Apr 2019 09:05:50 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="5.60,370,1549926000"; d="scan'208";a="303439228"
Received: from poi92-3-88-190-144-98.fbxo.proxad.net (HELO [192.168.1.14]) ([88.190.144.98]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2019 18:05:48 +0200
From: Yasuyuki Tanaka <yasuyuki.tanaka@inria.fr>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\))
Message-Id: <03CD9F4A-D6CD-44D2-AFF4-9F005ED409E8@inria.fr>
Date: Fri, 19 Apr 2019 18:05:47 +0200
Cc: Yasuyuki Tanaka <yasuyuki.tanaka@inria.fr>
To: 6tisch@ietf.org
X-Mailer: Apple Mail (2.3445.104.8)
Archived-At: <https://mailarchive.ietf.org/arch/msg/6tisch/Lu2CSFqxpESUNCZ6baomSW5LIJE>
Subject: [6tisch] SeqNum definition in RFC8480 (6P)
X-BeenThere: 6tisch@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discuss link layer model for Deterministic IPv6 over the TSCH mode of IEEE 802.15.4e, and impacts on RPL and 6LoWPAN such as resource allocation" <6tisch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/6tisch>, <mailto:6tisch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/6tisch/>
List-Post: <mailto:6tisch@ietf.org>
List-Help: <mailto:6tisch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6tisch>, <mailto:6tisch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Apr 2019 16:05:53 -0000

Hi,

I came across a question in RFC8480 (6P), which looks like an error to
me... Can anybody help? This is about the SeqNum field of the 6P header.

Section 3.2.2 defines SeqNum like this:

[https://tools.ietf.org/html/rfc8480#section-3.2.2]
>   SeqNum:  The sequence number associated with the 6P Transaction.
>         Used to match the 6P Request, 6P Response, and 6P Confirmation
>         of the same 6P Transaction.

So, basically, a response and a confirmation have the same SeqNum
value as the corresponding request. This is very normal.

However, Section 3.4.6.2 says, if a node detect schedule inconsistency
with a received request, the node does a different thing. A response
in this case has a different SeqNum value from the corresponding
request. This is strange...

[https://tools.ietf.org/html/rfc8480#section-3.4.6.2]
>   If the inconsistency is detected during a 6P Transaction (Figure 31),
>   the node that has detected it MUST send back a 6P Response or 6P
>   Confirmation with an error code of RC_ERR_SEQNUM.  In this 6P
>   Response or 6P Confirmation, the SeqNum field MUST be set to the
>   value of the sender of the message (0 in the example in Figure 31).

In Figure 31, Node A receives 6P Response (SeqNum=0, RC_ERR_SEQNUM) in
the last part of the message sequence. But, according to the
definition by Section 3.2.2, Node A doesn't consider the response to
be part of the transaction initiated by 6P Request (SeqNum=88),

[https://tools.ietf.org/html/rfc8480#section-3.4.6.2]
>           +----------+                           +----------+
>           |  Node A  |                           |  Node B  |
>           +----+-----+                           +-----+----+
>      SeqNum=87 |                                       | SeqNum=87
>                |                                       |
>                | 6P Request  (SeqNum=87)               |
>                |-------------------------------------->|
>                |                                L2 ACK |
>                |<- - - - - - - - - - - - - - - - - - - |
>                |                                       |
>                | 6P Response  (SeqNum=87)              |
>                |<--------------------------------------|
>                | L2 ACK                                |
>                | - - - - - - - - - - - - - - - - - - ->|
>                |                                     ==== power-cycle
>                |                                       |
>      SeqNum=88 |                                       | SeqNum=0
>                |                                       |
>                | 6P Request (SeqNum=88)                |
>                |-------------------------------------->| Inconsistency
>                |                                L2 ACK | detected
>                |<- - - - - - - - - - - - - - - - - - - |
>                |                                       |
>                | 6P Response (SeqNum=0, RC_ERR_SEQNUM) |
>                |<--------------------------------------|
>                | L2 ACK                                |
>                | - - - - - - - - - - - - - - - - - - ->|
>
>         Figure 31: Example of Inconsistency Because Node B Resets
>                           (Detected by Node B)

If this is an error, I'm going to file an errata entry. Otherwise, I'd
like to know why Node B in Figure 31 MUST set 0 to SeqNum for the 6P
Response having RC_ERR_SEQNUM. Node A becomes aware of schedule
inconsistency anyway, seeing RC_ERR_SEQNUM in the response.

By the way, the 5th paragraph in Section 3.4.6 supports Section
3.2.2. The response in an example of the paragraph has the same SeqNum
value as the response, which is 0. This is the same case as explained
with Figure 32.

[https://tools.ietf.org/html/rfc8480#section-3.4.6]
>   When node B receives a 6P Request from node A with SeqNum equal to 0,
>   it checks the stored SeqNum for A.  If A is a new neighbor, the
>   stored SeqNum in B will be 0.  The transaction can continue.  If the
>   stored SeqNum for A in B is different than 0, a potential
>   inconsistency is detected.  In this case, B MUST return RC_ERR_SEQNUM
>   with SeqNum=0.  The SF of node A MAY decide what to do next, as
>   described in Section 3.4.6.2.

Or, am I just confused...?

Best,
Yatch