netconfcentral logo

ietf-keyed-v6-tunnel@2016-10-24



  module ietf-keyed-v6-tunnel {

    yang-version 1.1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-keyed-v6-tunnel";

    prefix k6tun;

    import ietf-interfaces {
      prefix if;
    }
    import ietf-inet-types {
      prefix inet;
    }
    import ietf-yang-types {
      prefix yang;
    }

    organization
      "IETF l2tpext Working Group";

    contact
      "sunqi_ietf@163.com
     ian.farrer@telekom.de
     leo.liubing@huawei.com
     giheron@cisco.com
    ";

    description "Keyed IPv6 L2TPv3 Tunnel";

    revision "2016-10-24" {
      description "Update of model for -03";
      reference
        "draft-ietf-lwtpext-keyed-v6-tunnel-yang-03";

    }

    revision "2016-03-21" {
      description "Added sequencing feature";
      reference
        "draft-ietf-l2tpext-keyed-v6-tunnel-yang-02";

    }

    revision "2015-07-06" {
      description "General clean-up";
      reference
        "draft-sun-l2tpext-keyed-v6-tunnel-yang-01";

    }

    revision "2015-03-09" {
      description
        "Initial version.
      ";
      reference
        "draft-sun-l2tpext-keyed-v6-tunnel-yang-00";

    }


    feature fcs-retention {
      description
        "Device supports the retention of frame check sequence (FCS)
      as per Section 4.7 of RFC4720";
    }

    feature vccv {
      description
        "Device supports the Pseudowire Virtual Circuit Connectivity
      Verification (VCCV) as per RFC5085";
    }

    feature bfd {
      description
        "Device supports multihop BFD between tunnel endpoints as per RFC5883";
    }

    feature vccv-bfd {
      description
        "Device supports BFD over VCCV as per RFC5885";
    }

    feature l2tpv3-fragmentation {
      description
        "Device supports L2TPv3 fragmentation as per RFC4623";
    }

    feature l2tpv3-sequencing {
      description
        "Device supports frame sequencing as per section 4.6.1 of
      RFC3931";
    }

    container tunnel-configurations {
      description
        "Container for list of keyed-v6-tunnel entries";
      list tunnel-configuration {
        key "tunnel-name";
        unique "src-interface remote-ipv6";
        unique "local-ipv6 remote-ipv6";
        description
          "A keyed-v6-tunnel typically supports one l2tpv3 session
        per tunnel. The src-interface and local-ipv6 both uniquely
        identify a tunnel endpoint. If a virtual interface
        is used, the local-ipv6 and remote-ipv6 as a pair MUST
        also be unique.";
        leaf tunnel-name {
          type string;
          description
            "Name for this keyed tunnel.";
        }

        leaf src-interface {
          type if:interface-ref;
          mandatory true;
          description
            "Source interface that identifies the L2 circuit
          endpoint.";
        }

        leaf local-ipv6 {
          type inet:ipv6-address;
          mandatory true;
          description
            "IPv6 address for local end of keyed tunnel.";
        }

        leaf remote-ipv6 {
          type inet:ipv6-address;
          mandatory true;
          description
            "IPv6 address for remote end of keyed tunnel.";
        }

        leaf local-session-id {
          type uint32;
          default "4294967295";
          description
            "As the IPv6 address is used to determine the tunnel
          and there is a single session per tunnel, the Session ID
          can be ignored upon receipt. For compatibility with
          other tunnel termination platforms supporting two-stage
          resolution (IPv6 address + Session ID), the Session ID
          is configured with a random value other than all zeros.
          If both ends support one-stage (IPv6 address), then
          the Session ID is recommended to be set to all ones.";
        }

        leaf remote-session-id {
          type uint32;
          default "4294967295";
          description
            "Since IPv6 address is used to determine the tunnel
          and there is one session per tunnel, the Session ID
          can be ignored upon receipt. For compatibility with
          other tunnel termination platforms supporting two-stage
          resolution (IPv6 address + Session ID) the Session ID
          is configured with a random value other than all zeros.
          If both ends support one-stage (IPv6 address), then
          the Session ID is recommended to be set to all ones.";
        }

        container local-cookies {
          description
            "The length of cookie MUST be 64-bit. It MUST be
          possible to change the cookie value at any time
          in a manner that does not drop any legitimate
          tunneled packets - i.e. the receiver
          must accept a received cookie matching either
          value during a change of cookie value.";
          list local-cookie {
            key "cookie-name";
            min-elements 2;
            max-elements 2;
            description
              "List of local cookies - to allow for cookie rollover
            without traffic loss, must be configured with two
            entries.";
            leaf cookie-name {
              type string;
              description
                "Name identifying this cookie.";
            }

            leaf cookie-value {
              type uint64;
              mandatory true;
              description
                "value of this cookie";
            }
          }  // list local-cookie
        }  // container local-cookies

        leaf remote-cookie {
          type uint64;
          mandatory true;
          description
            "The length of cookie MUST be 64-bit. A single
          remote cookie is used for sending packets.";
        }

        leaf retain-fcs {
          if-feature fcs-retention;
          type empty;
          description
            "If this parameter is present, the router is configued
           to retain the Frame Check Sequence (FCS). Any such router MUST
           retain the FCS for all frames sent over that tunnel.";
        }

        container enable-vccv {
          if-feature vccv;
          presence "Enable VCCV [RFC5085]";
          description
            "Enable VCCV [RFC5085].";
          leaf enable-bfd {
            if-feature vccv-bfd;
            type empty;
            description
              "Enable VCCV-BFD [RFC5885].";
          }
        }  // container enable-vccv

        leaf enable-bfd {
          if-feature bfd;
          type empty;
          description
            "Enable BFD between the tunnel endpoints[RFC5883].";
        }

        leaf disable-pmtu {
          type empty;
          description
            "Disable IPv6 PMTU discovery [RFC1981].";
        }

        container enable-fragmentation {
          if-feature l2tpv3-fragmentation;
          presence
            "Enable L2TPv3 fragmentation [RFC4623]";
          description
            "Default is to fragment to PMTU (or 1500 if PMTU is
          disabled) minus 52 octets for the encapsulation
          overhead.";
          leaf fragment-mru {
            type uint16;
            description
              "Explicit override for fragmentation MRU.";
          }
        }  // container enable-fragmentation

        leaf enable-sequencing {
          if-feature l2tpv3-sequencing;
          type empty;
          description
            "Enable L2TPv3 sequencing [RFC3931 section 4.6.1].";
        }
      }  // list tunnel-configuration
    }  // container tunnel-configurations

    container tunnel-states {
      config false;
      description
        "Container for list of tunnel statistics.";
      list tunnel-state {
        key "tunnel-name";
        description "Per-tunnel statistics.";
        leaf tunnel-name {
          type string;
          description
            "Name of this keyed tunnel.";
        }

        leaf sent-packet {
          type yang:zero-based-counter64;
          description
            "Counter for the number of packets sent over tunnel.";
        }

        leaf sent-byte {
          type yang:zero-based-counter64;
          description
            "Counter for total sent bytes (of inner packets).";
        }

        leaf received-packet {
          type yang:zero-based-counter64;
          description
            "Counter for the number of valid packets received from the
          tunnel.";
        }

        leaf received-byte {
          type yang:zero-based-counter64;
          description
            "Counter for total received bytes (of inner packets).";
        }

        leaf dropped-packet {
          type yang:zero-based-counter64;
          description
            "Counter for number of dropped packets matching this
          tunnel (e.g. due to invalid received cookie,
          insufficient resources to process).";
        }

        leaf dropped-byte {
          type yang:zero-based-counter64;
          description
            "Counter for total dropped bytes (of inner packets).";
        }

        leaf fragment-counter {
          type yang:zero-based-counter64;
          description
            "Counter for number of received fragments.";
        }
      }  // list tunnel-state
    }  // container tunnel-states
  }  // module ietf-keyed-v6-tunnel