[mpls] Review of draft-ietf-mpls-ldp-yang-09

Renato Westphal <renato@opensourcerouting.org> Thu, 20 January 2022 15:41 UTC

Return-Path: <renato@opensourcerouting.org>
X-Original-To: mpls@ietfa.amsl.com
Delivered-To: mpls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8E3DA3A166D for <mpls@ietfa.amsl.com>; Thu, 20 Jan 2022 07:41:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=opensourcerouting-org.20210112.gappssmtp.com
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 zbPR_Gm5-hmb for <mpls@ietfa.amsl.com>; Thu, 20 Jan 2022 07:41:03 -0800 (PST)
Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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 5B9AF3A166F for <mpls@ietf.org>; Thu, 20 Jan 2022 07:41:02 -0800 (PST)
Received: by mail-ed1-x533.google.com with SMTP id cx27so30603734edb.1 for <mpls@ietf.org>; Thu, 20 Jan 2022 07:41:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=opensourcerouting-org.20210112.gappssmtp.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=K3755F97xd+kPKczjQsLzuW8WQcdccfvxprravLc70c=; b=YozNMJFYATts/7cHErHfbN5Z3r9xD6YNbWjjGXruez4qwmuH4fFNpXZn5IToROTk9e +S/I3XAHlFVEIJQjaET6n7z6dqt9TWJC1sF8u9jtFznZwY4yISUyqhGrR6dpxYDepxIE itCM9ug1DQB1BP5u5AoXngqa9Ydc1g7sD4V52y9PNA75Ljy5y/ZuBDCsmpWwGbnv1B7n WIRsCa4oimv8eUU1R/La9UxUUTm8rbchsczm2YMS93Qxf7NOb9ayHYyWEq1fnJ7Ar++M M3DSz3xPe53TvK25+hbSikYy1uks7KEXVLUX2/hp5FoZOyFPzy/zKL9hfIZqE5fbFtsQ IfUg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=K3755F97xd+kPKczjQsLzuW8WQcdccfvxprravLc70c=; b=hvGKTfihRbbimydyP3xaA67gj9CKWUPL08VelQ4fCUGYixhoAoLHEm/EfQecetFlGf L0or4RRAWqRwDfLqEpEfZPj3uRUZ3SkxyYycD24jMQoNJjpDk+miEXoQR4WQ7LjZkrdh fFJPMY24u/px5QUwbt3dFJ/BNILhri9jofSLqW6yv+4QjuyOgnIEmgG+FyN4mWr6QS+z dp8tSnHQxX1frZke+/7Pz2XpB5dKbMWp5qrNSvaxz0WM0VYMsMdSq9ubz2QCNQy1Xtia i7iIQgzgO0kQ8nvzz894wIgYKW0Es0WCRJQ54i5jRK+U7oDNZmeNep1+GXSNLfGXGtaF DChw==
X-Gm-Message-State: AOAM532+KpiVkYQACV3ScQ6F9E3I5TMKNkR+b1Zal3G8xLhFbs12oKhx LdG2mV4Tveb4+Wlwt6oXRcV/RlOXKjQNaZO3QUrIwCQUofVOFCGq
X-Google-Smtp-Source: ABdhPJxbC1Hwe4/h1SyCKqCiicd7FJQkWndimL0nWet808xapnwswtaLMGnZqMKUo9eF4RPid/cFB5bJlAoHPTmgNFA=
X-Received: by 2002:a05:6402:5291:: with SMTP id en17mr11897437edb.256.1642693259712; Thu, 20 Jan 2022 07:40:59 -0800 (PST)
MIME-Version: 1.0
From: Renato Westphal <renato@opensourcerouting.org>
Date: Thu, 20 Jan 2022 12:40:48 -0300
Message-ID: <CAB6ZmXEzijShLEHkNQuhFchvpZ8GRTuzf=76WMxF-PqRX5xQeQ@mail.gmail.com>
To: draft-ietf-mpls-ldp-yang.all@ietf.org, mpls@ietf.org
Content-Type: multipart/alternative; boundary="00000000000038730f05d605543d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/mpls/FI6PxgoAyRX8XsWKNHSWex5nILA>
Subject: [mpls] Review of draft-ietf-mpls-ldp-yang-09
X-BeenThere: mpls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Multi-Protocol Label Switching WG <mpls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mpls>, <mailto:mpls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mpls/>
List-Post: <mailto:mpls@ietf.org>
List-Help: <mailto:mpls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mpls>, <mailto:mpls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Jan 2022 15:41:08 -0000

Hi all,

I've implemented the ietf-mpls-ldp YANG module recently and I thought it
would be a good idea to provide some feedback to the module authors.

Overall I think the current module hierarchy is really good, it captures
exactly what one should expect from an LDP implementation. I couldn't think
of anything that is missing. I also liked the split between a base module
and an extended one.

I only have a few points/questions to make:

1) I find the "adjacency-flag-base" identity (and the ones derived from it)
to be confusing:

  identity adjacency-flag-base {
    description "Base type for adjacency flags.";
  }


  identity adjacency-flag-active {

    base adjacency-flag-base;

    description

      "This adjacency is configured and actively created.";

  }



  identity adjacency-flag-passive {

    base adjacency-flag-base;

    description

      "This adjacency is not configured and passively accepted.";

  }

The way I see it, no adjacency can be explicitly configured -- they are all
created dynamically upon receipt of hello packets.

Targeted neighbors, on the other hand, can be either configured explicitly
or created on demand (upon receipt of hello packets with the 'R' bit set --
"Request Send Targeted Hellos"). So wouldn't it be better to move the
active/passive attribute from adjacencies to targeted neighbors?

2) I think the following state leaf is problematic for targeted adjacencies:

  leaf interface {
    type if:interface-ref;
    description "Interface for this adjacency.";
   }

The reason being that it's theoretically possible for one adjacency to
receive hello packets from the same targeted neighbor on multiple different
interfaces.

3) In some parts of the module tree, there are adjacency lists indexed like
this:

  +--ro ldp:hello-adjacency* [local-address adjacent-address]
     +--ro ldp:local-address       inet:ipv4-address
     +--ro ldp:adjacent-address    inet:ipv4-address

One problem is that it's perfectly possible to have two different
adjacencies with the same local and adjacent addresses, one being a link
adjacency and the other an extended adjacency. Adding an "adjacency-type"
key would probably be necessary to guarantee disambiguation in such cases.

Also, it'd be good to clarify whether the local-address leaf refers to the
hello's source address or to the advertised transport address (when it's
present).

4) I wonder if the following leaf is necessary:

  leaf lsr-id {
    type rt-types:router-id;
    description
      "Specify the value to act as the LDP LSR ID.
       If this attribute is not specified, LDP uses the router
       ID as determined by the system.";
  }

Shouldn't the router-id leaf from the ietf-routing module be enough for
this purpose?

5) I'd like to know what's the rationale behind the following presence
container:

  container address-families {
    description
      "Per-vrf per-af params.";
    container ipv4 {
      presence
        "Present if IPv4 is enabled.";
      [...]
    }
  }

Since not having that container explicitly enabled in the configuration
won't prevent an LDPv4 neighborship to be formed, wouldn't a regular
non-presence container be enough here? The "presence" statement doesn't
seem to add any meaning to the existence of the container.

Also, the "per-vrf" comment in the description seems unnecessary.

6) I have one question about configuration precedence. Here's an example
configuration:

      "control-plane-protocol": [
        {
          "type": "ietf-mpls-ldp:mpls-ldp",
          "name": "main",
          "ietf-mpls-ldp:mpls-ldp": {
            "global": {
              [snip]
            },
            "discovery": {
              "interfaces": {
                [snip]
              },
              "targeted": {
                "hello-accept": {
                  "enabled": true
                },
                "address-families": {
                  "ipv4": {
                    "target": [
                      {
                        "adjacent-address": "1.1.1.1",
                        "enabled": false
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      ]

In that configuration, the "1.1.1.1" targeted neighbor is explicitly
configured and disabled. Also, the global "hello-accept" setting is enabled.

When a hello packet from "1.1.1.1" is received, should a dynamic targeted
neighbor be created for it? I think the answer boils down to whether the
targeted neighbor configuration applies to dynamic targeted neighbors as
well.

Also, having the ability to configure custom hello timers for targeted
neighbors could be useful for some operators.

7) I think some timer ranges are too restrictive. Example:

  leaf hello-holdtime {
    type uint16 {
      range 15..3600;
    }
    [snip]
  }
  leaf hello-interval {
    type uint16 {
      range 5..1200;
    }
    [snip]
  }

While a hello holdtime of 15 seconds is a sane default, I don't think we
should prohibit the operator from configuring smaller values.

The OSPF and IS-IS modules, for instance, use
rt-types:timer-value-seconds16 for leafs like these.

8) A couple of trivial typo fixes:
  * Page 30: s/On or more flags/One or more flags/
  * Page 30: s/extended discoveris/extended discoveries/
  * Page 42: s/since the the state/since the state/
  * Page 42: s/interface's counters/peer's counters/
  * Page 54: s/targettted adjacency/targeted adjacency/

Regards,
-- 
Renato Westphal