[Isis-wg] Indication of presence or absence of subTLVs in Router Capability TLV and SR binding TLV

Imtiyaz Mohammad <technotaz2004@gmail.com> Thu, 13 August 2015 10:58 UTC

Return-Path: <technotaz2004@gmail.com>
X-Original-To: isis-wg@ietfa.amsl.com
Delivered-To: isis-wg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CEB6A1B3811; Thu, 13 Aug 2015 03:58:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.748
X-Spam-Level:
X-Spam-Status: No, score=-1.748 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, NORMAL_HTTP_TO_IP=0.001, SPF_PASS=-0.001] autolearn=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 RY8Pza1ieCdO; Thu, 13 Aug 2015 03:58:47 -0700 (PDT)
Received: from mail-qg0-x229.google.com (mail-qg0-x229.google.com [IPv6:2607:f8b0:400d:c04::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5B7D31B2CBA; Thu, 13 Aug 2015 03:58:47 -0700 (PDT)
Received: by qged69 with SMTP id d69so28148109qge.0; Thu, 13 Aug 2015 03:58:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=EMKZCZHuem11htt5gxzJWLvPf52FWRoaIAic5K2i0r0=; b=PRVEiSW1W9HZnWHzKj1Oes4OpgUNrdbZi1Zdv3WoFyTX23doe/XTlR9he00sTOWBL9 rsPT8eGBn2vPC2oHLoYtqZe5HRS+W8qd+fBHWjVK3xzS10USjtgp6ZqIq53IqxDNqnyd EnsiH7rLs1eJbPP65mkEtV0GYd04/04jNSGjdBstLTI7Ox/2ktt3NWpWnkikDjYc3U1N NjuttCib6xHGgenJJLvxpRuclO4fiUX0Ffr6EpaV0rIZehcIKdvLXTP35DwfasGa8DvF 1pEg2zjalqKAMe7T+KATZ476ebafhJiZFLL7/rESCrvtwITXptNzBOBm5bIIwJW12Ylh xHnQ==
MIME-Version: 1.0
X-Received: by 10.140.145.16 with SMTP id 16mr70448293qhr.34.1439463526589; Thu, 13 Aug 2015 03:58:46 -0700 (PDT)
Received: by 10.140.41.19 with HTTP; Thu, 13 Aug 2015 03:58:46 -0700 (PDT)
Date: Thu, 13 Aug 2015 16:28:46 +0530
Message-ID: <CANk4F3Ofs+NT4TCMKecg8UEHGJ4j=H3q5L5V6ue=p7kL5NK2tw@mail.gmail.com>
From: Imtiyaz Mohammad <technotaz2004@gmail.com>
To: spring@ietf.org, "isis-wg@ietf.org list" <isis-wg@ietf.org>
Content-Type: multipart/alternative; boundary="001a1135639c2b6a86051d2f3861"
Archived-At: <http://mailarchive.ietf.org/arch/msg/isis-wg/kPPZG5Qikl9i12ubR2ivvIj29x0>
X-Mailman-Approved-At: Fri, 14 Aug 2015 06:57:46 -0700
Subject: [Isis-wg] Indication of presence or absence of subTLVs in Router Capability TLV and SR binding TLV
X-BeenThere: isis-wg@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF IS-IS working group <isis-wg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/isis-wg>, <mailto:isis-wg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/isis-wg/>
List-Post: <mailto:isis-wg@ietf.org>
List-Help: <mailto:isis-wg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/isis-wg>, <mailto:isis-wg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Aug 2015 10:58:50 -0000

Hello experts !

I am perplexed looking at the different ways present or nor present in a
bunch of ISIS TLVs I have came across recently. Wish to get my questions
clarified here.

I have seen that implementations put multiple VALUES of the same TYPE
within one single block. In other words, if we were to advertise Extended
IPv4 reachability (type 135) for prefix 99.1.1.1/32 ( with prefix SID
subTLV), 5.5.5.0/24 ( no subTLV ), 3.3.3.0/24 (no subTLV ), we would do so
as follows ( fabricated tcpdump o/p ):

TLV FORMAT:
===========
   4 octets of metric information
   1 octet of control information, consisting of
      1 bit of up/down information
      1 bit indicating the presence of sub-TLVs
      6 bits of prefix length
   0-4 octets of IPv4 prefix
   0-250 optional octets of sub-TLVs, if present consisting of
      1 octet of length of sub-TLVs
      0-249 octets of sub-TLVs, where each sub-TLV consists of a
      sequence of
         1 octet of sub-type
         1 octet of length of the Value field of the sub-TLV
         0-247 octets of value

EXAMPLE:
========
            Extended IPv4 Reachability TLV #135, length: 34
                  IPv4 prefix:        99.1.1.1/32, Distribution: up,
Metric: 10, sub-TLVs present (8)
                       Segment Routing Prefix Segment subTLV #3, length: 6,
Flags: N Algorithm: SPF, Index: 1
                 IPv4 prefix:        5.5.5.0/24, Distribution: up, Metric:
10
 IPv4 prefix:        3.3.3.0/24, Distribution: up, Metric: 10

As could be observed, We have encompassed the three prefixes and other
associated information within one single block that could be represented as:

-----------------------------------------
Type
Length
Value1(metric, control, prefix, subTLV)
Value2(metric, control, prefix)
Value3(metric, control, prefix)
-----------------------------------------

Instead of separate instances of the same TLV, as shown below:

-----------------------------------------
Type
Length
Value1(metric, control, prefix, subTLV)
-----------------------------------------
Type
Length
Value2(metric, control, prefix)
-----------------------------------------
Type
Length
Value3(metric, control, prefix)
-----------------------------------------

When parsing the LSP buffer, when we are at value1, we know whether or not
value1 contains subTLVs based on subTLV present bit in the control octet of
extended IP reachability TLV. This way, we know that we have a Value1,
subTLV, Value2 in the buffer instead of Value1\
, Value2.

Let's consider Extended IS Reachability ( type 22 ) now.

FORMAT:
========
      7 octets of system ID and pseudonode number
      3 octets of default metric
      1 octet of length of sub-TLVs
      0-244 octets of sub-TLVs, where each sub-TLV consists of a
      sequence of
         1 octet of sub-type
         1 octet of length of the Value field of the sub-TLV
         0-242 octets of value

EXAMPLE:
========
            Extended IS Reachability TLV #22, length: 22
                  IS Neighbor: 1111.1111.0003.00, Metric: 10, no sub-TLVs
present
                        IS Neighbor: 1111.1111.0002.0d, Metric: 10, no
sub-TLVs present

Again, we have Type, Length, Value1( data associated to 1111.1111.0003.00 )
and Value2 ( data related to 1111.1111.0002.0d )

-----------------------------------------
Type
Length
Value1
Value2
-----------------------------------------

To summarize, the presence of subTLV present bit in Extended IP
Reachability TLV subTLV length field in Extended IS reachability TLV helps
us parse a representation where multiple VALUE blocks can be encompassed
within one Type/Length block.

For implementing Segment Routing using IS-IS as IGP one would need to
support Router Capability TLV (Type #242) and SR Label Binding TLV (Type
#149)

We noticed that these two TLVs neither have a subTLV present bit in any
flag in the VALUE part of the TLV nor do they have a subTLV field. Without
knowing whether the VALUE block has a sub-TLV or not, we would not be able
to support the following way of encoding.

-----------------------------------------
Type
Length
Value1
Value2
-----------------------------------------

When we are at Value1, we would not know if the information in the next
byte is meant to represent another instance of VALUE (Value12) or subTLV of
Value1. The only model that makes sense then is:

-----------------------------------------
Type
Length
Value1
-----------------------------------------
Type
Length
Value2
-----------------------------------------

Summarizing my questions:
=========================
1) Why do we have such an non-uniform way of denoting or not denoting
whether sub-TLVs are present or not ? A bit and sub-TLV len field in type
135, just a subTLV len field in type 22 and no indicators in type 242 and
type 149.

2) Is it agreed and understood by all implementations that type 242 and
type 149 would be present in an LSP as multiple instances of T,L,V tuples
instead of T,L,V,V,V blocks ?

Thanks,

Imtiyaz