netconfcentral logo

ietf-mvpn@2017-09-15



  module ietf-mvpn {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-mvpn";

    prefix mvpn;

    import ietf-network-instance {
      prefix ni;
    }
    import ietf-inet-types {
      prefix inet;
    }

    organization
      "IETF BESS(BGP Enabled Services) Working Group";

    contact
      "
     Yisong Liu
     <mailto:liuyisong@huawei.com>
     Feng Guo
     <mailto:guofeng@huawei.com>
     Xufeng Liu
     <mailto:Xufeng_Liu@jabil.com>
     Robert Kebler
     <mailto:rkebler@juniper.net>
     Mahesh Sivakumar
     <mailto:masivaku@cisco.com>";

    description
      "This YANG module defines the generic configuration
      and operational state data for mvpn, which is common across
      all of the vendor implementations of the protocol. It is
      intended that the module will be extended by vendors to
      define vendor-specific mvpn parameters.";

    revision "2017-09-15" {
      description
        "Update for NMDA version and errata.";
      reference
        "RFC XXXX: A YANG Data Model for MVPN";

    }

    revision "2017-07-03" {
      description
        "Update S-PMSI configuration and errata.";
      reference
        "RFC XXXX: A YANG Data Model for MVPN";

    }

    revision "2016-10-28" {
      description "Initial revision.";
      reference
        "RFC XXXX: A YANG Data Model for MVPN";

    }


    grouping mvpn-instance-config {
      description
        "Mvpn basic configuration per instance.";
      leaf signaling-mode {
        type enumeration {
          enum "invalid" {
            value 0;
            description "invalid";
          }
          enum "bgp" {
            value 1;
            description "bgp";
          }
          enum "pim" {
            value 2;
            description "pim";
          }
          enum "mldp" {
            value 3;
            description "mldp";
          }
        }
        default "invalid";
        description
          "Signaling mode for C-multicast route.";
      }

      leaf auto-discovery-mode {
        type enumeration {
          enum "none" {
            value 0;
            description "none";
          }
          enum "ad" {
            value 1;
            description
              "auto-discovery by BGP";
          }
        }
        default "none";
        description "Auto discovery mode.";
      }

      leaf config-type {
        type enumeration {
          enum "md" {
            value 0;
            description "md(rosen)";
          }
          enum "ng" {
            value 1;
            description "ng";
          }
        }
        default "md";
        description
          "Mvpn type, which can be md(rosen) mvpn or ng mvpn.";
      }

      leaf is-sender-site {
        type boolean;
        default "false";
        description
          "Configure the current PE as a sender PE.";
      }

      leaf rpt-spt-mode {
        type enumeration {
          enum "spt-only" {
            value 0;
            description
              "Only spt mode for crossing public net.";
          }
          enum "rpt-spt" {
            value 1;
            description
              "Both rpt and spt mode for corssing public net.";
          }
        }
        default "spt-only";
        description
          "ASM mode in multicast private net for crossing public net.";
      }
    }  // grouping mvpn-instance-config

    grouping mvpn-vpn-targets {
      description
        "May be different from l3vpn unicast route-targets";
      container mvpn-route-targets {
        description
          "Multicast vpn route-targets";
        list mvpn-route-target {
          key "rt-type rt-value";
          description
            "List of multicast route-targets";
          leaf rt-type {
            type enumeration {
              enum "export-extcommunity" {
                value 0;
                description
                  "export-extcommunity";
              }
              enum "import-extcommunity" {
                value 1;
                description
                  "import-extcommunity";
              }
            }
            mandatory true;
            description
              "rt types are as follows:
               export-extcommunity: specifies the value of
               the extended community attribute of the
               route from an outbound interface to the
               destination vpn.
               import-extcommunity: receives routes that
               carry the specified extended community
               attribute";
          }

          leaf rt-value {
            type string {
              length "3..21";
            }
            description
              "the available mvpn target formats are as
               follows:
               - 16-bit as number:32-bit user-defined
               number, for example, 1:3. an as number
               ranges from 0 to 65535, and a user-defined
               number ranges from 0 to 4294967295. The as
               number and user-defined number cannot be
               both 0s. That is, a vpn target cannot be 0:0.
               - 32-bit ip address:16-bit user-defined
               number, for example, 192.168.122.15:1.
               The ip address ranges from 0.0.0.0 to
               255.255.255.255, and the user-defined
               number ranges from 0 to 65535.";
          }
        }  // list mvpn-route-target
      }  // container mvpn-route-targets
    }  // grouping mvpn-vpn-targets

    grouping mvpn-ipmsi-tunnel-config {
      description
        "Default mdt for rosen mvpn and I-PMSI for ng mvpn";
      container mvpn-ipmsi-tunnel {
        description
          "I-PMSI tunnel configuraton";
        leaf tunnel-type {
          type enumeration {
            enum "invalid" {
              value 0;
              description "invalid";
            }
            enum "p2mp-te" {
              value 1;
              description "p2mp-te";
            }
            enum "p2mp-mldp" {
              value 2;
              description "p2mp-mldp";
            }
            enum "pim-ssm" {
              value 3;
              description "pim-ssm";
            }
            enum "pim-sm" {
              value 4;
              description "pim-sm";
            }
            enum "bidir-pim" {
              value 5;
              description "bidir-pim";
            }
            enum "ingress-replication" {
              value 6;
              description
                "ingress-replication";
            }
            enum "mp2mp-mldp" {
              value 7;
              description "mp2mp-mldp";
            }
          }
          description "I-PMSI tunnel type.";
        }

        choice ipmsi-tunnel-attribute {
          description
            "I-PMSI tunnel attributes configuration";
          case p2mp-te {
            description "P2mp TE tunnel";
            leaf te-p2mp-template {
              type string {
                length "1..31";
              }
              description
                "P2mp te tunnel template";
            }
          }  // case p2mp-te

          case p2mp-mldp {
            description "Mldp tunnel";
          }  // case p2mp-mldp

          case pim-ssm {
            description "Pim ssm tunnel";
            leaf ssm-default-group-addr {
              type inet:ip-address;
              description
                "Default mdt or I-PMSI group address.";
            }
          }  // case pim-ssm

          case pim-sm {
            description "Pim sm tunnel";
            leaf sm-default-group-addr {
              type inet:ip-address;
              description
                "Default mdt or I-PMSI group address.";
            }
          }  // case pim-sm

          case bidir-pim {
            description "Bidir pim tunnel";
            leaf bidir-default-group-addr {
              type inet:ip-address;
              description
                "Default mdt or I-PMSI group address.";
            }
          }  // case bidir-pim

          case ingress-replication {
            description
              "Ingress replication p2p tunnel";
          }  // case ingress-replication

          case mp2mp-mldp {
            description "Mp2mp mldp tunnel";
          }  // case mp2mp-mldp
        }  // choice ipmsi-tunnel-attribute
      }  // container mvpn-ipmsi-tunnel
    }  // grouping mvpn-ipmsi-tunnel-config

    grouping mvpn-spmsi-tunnel-basic-config {
      description
        "S-PMSI tunnel basic configuration";
      leaf tunnel-type {
        type enumeration {
          enum "invalid" {
            value 0;
            description "invalid";
          }
          enum "p2mp-te" {
            value 1;
            description "p2mp-te";
          }
          enum "p2mp-mldp" {
            value 2;
            description "p2mp-mldp";
          }
          enum "pim-ssm" {
            value 3;
            description "pim-ssm";
          }
          enum "pim-sm" {
            value 4;
            description "pim-sm";
          }
          enum "bidir-pim" {
            value 5;
            description "bidir-pim";
          }
          enum "ingress-replication" {
            value 6;
            description
              "ingress-replication";
          }
          enum "mp2mp-mldp" {
            value 7;
            description "mp2mp-mldp";
          }
        }
        description "S-PMSI tunnel type.";
      }

      choice spmsi-tunnel-attribute {
        description
          "S-PMSI tunnel attributes configuration";
        case p2mp-te {
          description "P2mp te tunnel";
          leaf te-p2mp-template {
            type string {
              length "1..31";
            }
            description
              "P2mp te tunnel template";
          }
        }  // case p2mp-te

        case p2mp-mldp {
          description "Mldp tunnel";
        }  // case p2mp-mldp

        case pim-ssm {
          description "Pim ssm tunnel";
          leaf ssm-group-pool-addr {
            type inet:ip-address;
            description
              "Group pool address for data mdt or pim s-pmsi.";
          }

          leaf ssm-group-pool-masklength {
            type uint8 {
              range "8..128";
            }
            description
              "Group pool mask for data mdt or pim s-pmsi";
          }
        }  // case pim-ssm

        case pim-sm {
          description "Pim sm tunnel";
          leaf sm-group-pool-addr {
            type inet:ip-address;
            description
              "Group pool address for data mdt or pim s-pmsi.";
          }

          leaf sm-group-pool-masklength {
            type uint8 {
              range "8..128";
            }
            description
              "Group pool mask for data mdt or pim s-pmsi";
          }
        }  // case pim-sm

        case bidir-pim {
          description "Bidir pim tunnel";
          leaf bidir-group-pool-addr {
            type inet:ip-address;
            description
              "Group pool address for data mdt or pim s-pmsi.";
          }

          leaf bidir-group-pool-masklength {
            type uint8 {
              range "8..128";
            }
            description
              "Group pool mask for data mdt or pim s-pmsi";
          }
        }  // case bidir-pim

        case ingress-replication {
          description
            "Ingress replication p2p tunnel";
        }  // case ingress-replication

        case mp2mp-mldp {
          description "Mp2mp mldp tunnel";
        }  // case mp2mp-mldp
      }  // choice spmsi-tunnel-attribute

      leaf switch-threshold {
        type uint32 {
          range "0..4194304";
        }
        default "0";
        description
          "Multicast packet rate threshold for
          triggering the switching from the
          I-PMSI to the S-PMSI. The value is
          an integer ranging from 0 to 4194304, in
          kbit/s. The default value is 0.";
      }

      leaf switch-wildcard-mode {
        type enumeration {
          enum "source-group" {
            value 0;
            description
              "Wildcard neither for source or group address.";
          }
          enum "star-star" {
            value 1;
            description
              "Wildcard for both source and group address.";
          }
          enum "star-group" {
            value 2;
            description
              "Wildcard only for source address.";
          }
          enum "source-star" {
            value 3;
            description
              "Wildcard only for group address.";
          }
        }
        default "source-group";
        description
          "I-PMSI switching to S-PMSI mode for private net
         wildcard mode, which including (*,*), (*,G), (S,*),
         (S,G) four modes.";
      }
    }  // grouping mvpn-spmsi-tunnel-basic-config

    grouping mvpn-spmsi-tunnel-config-ipv4 {
      description
        "Data mdt for rosen mvpn or S-PMSI for ng mvpn in
        IPv4 private network";
      container mvpn-spmsi-tunnels {
        description
          "S-PMSI tunnel configuration";
        leaf switch-delay-time {
          type uint8 {
            range "3..60";
          }
          units "seconds";
          default "5";
          description
            "Delay for switching from the I-PMSI to
          the S-PMSI. The value is an integer
          ranging from 3 to 60, in seconds. ";
        }

        leaf switch-back-holddown-time {
          type uint16 {
            range "0..512";
          }
          units "seconds";
          default "60";
          description
            "Delay for switching back from the S-PMSI
            to the I-PMSI. The value is an integer
            ranging from 0 to 512, in seconds. ";
        }

        leaf tunnel-limit {
          type uint16 {
            range "1..1024";
          }
          description
            "Maximum number of s-pmsi tunnels allowed.";
        }

        list mvpn-spmsi-tunnel {
          key "tunnel-type";
          description
            "S-PMSI tunnel attributes configuration";
          uses mvpn-spmsi-tunnel-basic-config;

          choice address-mask-or-acl {
            description
              "Type of definition of private net multicast address range";
            case address-mask {
              description
                "Use the type of address and mask";
              leaf ipv4-group-addr {
                type inet:ipv4-address;
                description
                  "Start and end ipv4 addresses of the group
                  address in private net. ";
              }

              leaf ipv4-group-masklength {
                type uint8 {
                  range "4..32";
                }
                description
                  "Group mask length for ipv4 addresses in
                  the group address pool in private net.";
              }

              leaf ipv4-source-addr {
                type inet:ipv4-address;
                description
                  "Start and end ipv4 addresses of the source
                  address in private net.";
              }

              leaf ipv4-source-masklength {
                type uint8 {
                  range "0..32";
                }
                description
                  "Source mask length for ipv4 addresses in
                  the group address pool in private net.";
              }
            }  // case address-mask

            case acl {
              description
                "Use the type of acl";
              leaf group-acl-ipv4 {
                type string {
                  length "1..32";
                }
                description
                  "Specify the (s, g) entry on which the
                  S-PMSI tunnel takes effect.
                  The value is an integer ranging from 3000
                  to 3999 or a string of 32 case-sensitive
                  characters. If no value is specified, the
                  switch-group address pool takes effect on
                  all (s, g).";
              }
            }  // case acl
          }  // choice address-mask-or-acl
        }  // list mvpn-spmsi-tunnel
      }  // container mvpn-spmsi-tunnels
    }  // grouping mvpn-spmsi-tunnel-config-ipv4

    grouping mvpn-spmsi-tunnel-config-ipv6 {
      description
        "Data mdt for rosen mvpn or S-PMSI for ng mvpn in
        IPv6 private network";
      container mvpn-spmsi-tunnels {
        description
          "S-PMSI tunnel configuration";
        leaf switch-delay-time {
          type uint8 {
            range "3..60";
          }
          units "seconds";
          default "5";
          description
            "Delay for switching from the I-PMSI to
          the S-PMSI. The value is an integer
          ranging from 3 to 60, in seconds. ";
        }

        leaf switch-back-holddown-time {
          type uint16 {
            range "0..512";
          }
          units "seconds";
          default "60";
          description
            "Delay for switching back from the S-PMSI
            to the I-PMSI. The value is an integer
            ranging from 0 to 512, in seconds. ";
        }

        leaf tunnel-limit {
          type uint16 {
            range "1..1024";
          }
          description
            "Maximum number of s-pmsi tunnels allowed.";
        }

        list mvpn-spmsi-tunnel {
          key "tunnel-type";
          description
            "S-PMSI tunnel parameter configuration";
          uses mvpn-spmsi-tunnel-basic-config;

          choice address-mask-or-acl {
            description
              "Type of definition of private net multicast address range";
            case address-mask {
              description
                "Use the type of address and mask";
              leaf ipv6-group-addr {
                type inet:ipv6-address;
                description
                  "Start and end ipv6 addresses of the group
                  address in private net.";
              }

              leaf ipv6-groupmasklength {
                type uint8 {
                  range "8..128";
                }
                description
                  "Group mask length for ipv6 addresses in
                  the group address pool in private net.";
              }

              leaf ipv6-source-addr {
                type inet:ipv6-address;
                description
                  "Start and end ipv6 addresses of the source
                  address in private net.";
              }

              leaf ipv6-source-masklength {
                type uint8 {
                  range "0..128";
                }
                description
                  "Source mask length for ipv6 addresses in
                  the group address pool in private net.";
              }
            }  // case address-mask

            case acl {
              description
                "Use the type of acl";
              leaf group-acl-ipv6 {
                type string {
                  length "1..32";
                }
                description
                  "Specify the (s, g) entry on which the
                  S-PMSI tunnel takes effect.
                  The value is an integer ranging from 3000
                  to 3999 or a string of 32 case-sensitive
                  characters. If no value is specified, the
                  switch-group address pool takes effect on
                  all (s, g).";
              }
            }  // case acl
          }  // choice address-mask-or-acl
        }  // list mvpn-spmsi-tunnel
      }  // container mvpn-spmsi-tunnels
    }  // grouping mvpn-spmsi-tunnel-config-ipv6

    grouping mvpn-pmsi-state {
      description
        "PMSI tunnel operational state information";
      leaf tunnel-type {
        type enumeration {
          enum "invalid" {
            value 0;
            description "invalid";
          }
          enum "p2mp-te" {
            value 1;
            description "p2mp-te";
          }
          enum "p2mp-mldp" {
            value 2;
            description "p2mp-mldp";
          }
          enum "pim-ssm" {
            value 3;
            description "pim-ssm";
          }
          enum "pim-sm" {
            value 4;
            description "pim-sm";
          }
          enum "bidir-pim" {
            value 5;
            description "bidir-pim";
          }
          enum "ingress-replication" {
            value 6;
            description
              "ingress-replication";
          }
          enum "mp2mp-mldp" {
            value 7;
            description "mp2mp-mldp";
          }
        }
        description "PMSI tunnel type.";
      }

      choice pmsi-tunnel-attribute {
        description
          "PMSI tunnel operational state information for each type";
        case p2mp-te {
          description "P2mp te tunnel";
          leaf te-p2mp-id {
            type uint16 {
              range "0..65535";
            }
            default "0";
            description
              "P2mp id of the p2mp tunnel.";
          }

          leaf te-tunnel-id {
            type uint16 {
              range "1..65535";
            }
            description
              "Id of the p2mp tunnel.";
          }

          leaf te-extend-tunnel-id {
            type uint16 {
              range "1..65535";
            }
            description
              "P2mp extended tunnel interface id.";
          }
        }  // case p2mp-te

        case p2mp-mldp {
          description "P2mp mldp tunnel";
          leaf mldp-root-addr {
            type inet:ip-address;
            description
              "Ip address of the root of a p2mp ldp lsp.";
          }

          leaf mldp-lsp-id {
            type string {
              length "1..256";
            }
            description "P2mp ldp lsp id.";
          }
        }  // case p2mp-mldp

        case pim-ssm {
          description "Pim ssm tunnel";
          leaf ssm-group-addr {
            type inet:ip-address;
            description
              "Group address for pim ssm";
          }
        }  // case pim-ssm

        case pim-sm {
          description "Pim sm tunnel";
          leaf sm-group-addr {
            type inet:ip-address;
            description
              "Group address for pim sm";
          }
        }  // case pim-sm

        case bidir-pim {
          description "Bidir pim tunnel";
          leaf bidir-group-addr {
            type inet:ip-address;
            description
              "Group address for bidir-pim";
          }
        }  // case bidir-pim

        case ingress-replication {
          description
            "Ingress replication p2p tunnel";
        }  // case ingress-replication

        case mp2mp-mldp {
          description "mp2mp mldp tunnel";
        }  // case mp2mp-mldp
      }  // choice pmsi-tunnel-attribute

      leaf tunnel-role {
        type enumeration {
          enum "none" {
            value 0;
            description "none";
          }
          enum "root" {
            value 1;
            description "root";
          }
          enum "leaf" {
            value 2;
            description "leaf";
          }
          enum "root-and-leaf" {
            value 3;
            description "root-and-leaf";
          }
        }
        description "Role of a tunnel node.";
      }
    }  // grouping mvpn-pmsi-state

    grouping mvpn-pmsi-ipv4-entry {
      description
        "Multicast entries in ipv4 mvpn referenced the pmsi tunnel";
      container mvpn-pmsi-ipv4-ref-sg-entries {
        description
          "Multicast entries in ipv4 mvpn referenced the pmsi tunnel";
        list mvpn-pmsi-ipv4-ref-sg-entries {
          key "ipv4-source-address ipv4-group-address";
          description
            "IPv4 source and group address of private network entry";
          leaf ipv4-source-address {
            type inet:ipv4-address;
            description
              "IPv4 source address of private network entry
              in I-PMSI or S-PMSI.";
          }

          leaf ipv4-group-address {
            type inet:ipv4-address;
            description
              "IPv4 group address of private network entry
              in I-PMSI or S-PMSI.";
          }
        }  // list mvpn-pmsi-ipv4-ref-sg-entries
      }  // container mvpn-pmsi-ipv4-ref-sg-entries
    }  // grouping mvpn-pmsi-ipv4-entry

    grouping mvpn-pmsi-ipv6-entry {
      description
        "Multicast entries in ipv6 mvpn referenced the pmsi tunnel";
      container mvpn-pmsi-ipv6-ref-sg-entries {
        description
          "Multicast entries in ipv6 mvpn referenced the pmsi tunnel";
        list mvpn-pmsi-ipv6-ref-sg-entries {
          key "ipv6-source-address ipv6-group-address";
          description
            "IPv6 source and group address of private network entry";
          leaf ipv6-source-address {
            type inet:ipv6-address;
            description
              "IPv6 source address of private network entry
              in I-PMSI or S-PMSI.";
          }

          leaf ipv6-group-address {
            type inet:ipv6-address;
            description
              "IPv6 group address of private network entry
              in I-PMSI or S-PMSI.";
          }
        }  // list mvpn-pmsi-ipv6-ref-sg-entries
      }  // container mvpn-pmsi-ipv6-ref-sg-entries
    }  // grouping mvpn-pmsi-ipv6-entry

    grouping mvpn-ipmsi-tunnel-state-ipv4 {
      description
        "Default mdt or I-PMSI operational state information";
      container mvpn-ipmsi-tunnel-info {
        config false;
        description
          "Default mdt or I-PMSI operational state information";
        uses mvpn-pmsi-state;

        uses mvpn-pmsi-ipv4-entry;
      }  // container mvpn-ipmsi-tunnel-info
    }  // grouping mvpn-ipmsi-tunnel-state-ipv4

    grouping mvpn-ipmsi-tunnel-state-ipv6 {
      description
        "Default mdt or I-PMSI operational state information";
      container mvpn-ipmsi-tunnel-info {
        config false;
        description
          "Default mdt or I-PMSI operational state information";
        uses mvpn-pmsi-state;

        uses mvpn-pmsi-ipv6-entry;
      }  // container mvpn-ipmsi-tunnel-info
    }  // grouping mvpn-ipmsi-tunnel-state-ipv6

    grouping mvpn-spmsi-tunnel-state-ipv4 {
      description
        "Data mdt or S-PMSI operational state information";
      container mvpn-spmsi-tunnel-ipv4-info {
        config false;
        description
          "Data mdt or S-PMSI operational state information";
        list mvpn-spmsi-tunnel-ipv4-info {
          key "tunnel-type";
          description
            "Data mdt or S-PMSI operational state information";
          uses mvpn-pmsi-state;

          uses mvpn-pmsi-ipv4-entry;
        }  // list mvpn-spmsi-tunnel-ipv4-info
      }  // container mvpn-spmsi-tunnel-ipv4-info
    }  // grouping mvpn-spmsi-tunnel-state-ipv4

    grouping mvpn-spmsi-tunnel-state-ipv6 {
      description
        "Data mdt or S-PMSI operational state information";
      container mvpn-spmsi-tunnel-ipv6-info {
        config false;
        description
          "Data mdt or S-PMSI operational state information";
        list mvpn-spmsi-tunnel-ipv6-info {
          key "tunnel-type";
          description
            "Data mdt or S-PMSI operational state information";
          uses mvpn-pmsi-state;

          uses mvpn-pmsi-ipv6-entry;
        }  // list mvpn-spmsi-tunnel-ipv6-info
      }  // container mvpn-spmsi-tunnel-ipv6-info
    }  // grouping mvpn-spmsi-tunnel-state-ipv6

    augment /ni:network-instances/ni:network-instance {
      description
        "Augment network instance container for per multicast VRF
        configuration and operational state.";
      container mvpn {
        description
          "Mvpn configuration and operational state information.";
        container mvpnv4 {
          description
            "Configuration of multicast IPv4 vpn specific parameters and
            operational state of multicast IPv4 vpn specific parameters";
          uses mvpn-instance-config;

          uses mvpn-vpn-targets;

          uses mvpn-ipmsi-tunnel-config;

          uses mvpn-spmsi-tunnel-config-ipv4;

          uses mvpn-ipmsi-tunnel-state-ipv4;

          uses mvpn-spmsi-tunnel-state-ipv4;
        }  // container mvpnv4

        container mvpnv6 {
          description
            "Configuration of multicast IPv6 vpn specific parameters and
            operational state of multicast IPv6 vpn specific parameters";
          uses mvpn-instance-config;

          uses mvpn-vpn-targets;

          uses mvpn-ipmsi-tunnel-config;

          uses mvpn-spmsi-tunnel-config-ipv6;

          uses mvpn-ipmsi-tunnel-state-ipv6;

          uses mvpn-spmsi-tunnel-state-ipv6;
        }  // container mvpnv6
      }  // container mvpn
    }
  }  // module ietf-mvpn