netconfcentral logo

ietf-pim-bidir@2017-12-08



  module ietf-pim-bidir {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-pim-bidir";

    prefix pim-bidir;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-interfaces {
      prefix if;
    }
    import ietf-routing {
      prefix rt;
    }
    import ietf-pim-base {
      prefix pim-base;
    }
    import ietf-pim-rp {
      prefix pim-rp;
    }

    organization "IETF PIM Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/pim/>
     WG List:  <mailto:pim@ietf.org>

     WG Chair: Stig Venaas
               <mailto:stig@venaas.com>

     WG Chair: Mike McBride
               <mailto:mmcbride7@gmail.com>

     Editor:   Xufeng Liu
               <mailto:Xufeng_Liu@jabil.com>

     Editor:   Pete McAllister
               <mailto:pete.mcallister@metaswitch.com>

     Editor:   Anish Peter
               <mailto:anish.ietf@gmail.com>

     Editor:   Mahesh Sivakumar
               <mailto:masivaku@cisco.com>

     Editor:   Yisong Liu
               <mailto:liuyisong@huawei.com>

     Editor:   Fangwei Hu
               <mailto:hu.fangwei@zte.com.cn>";

    description
      "The YANG module defines a PIM (Protocol Independent Multicast)
     BIDIR (Bidirectional) mode model.";

    revision "2017-12-08" {
      description "Initial revision.";
      reference
        "RFC XXXX: A YANG Data Model for PIM";

    }


    feature intf-df-election {
      description
        "Support configuration of interface DF election.";
    }

    identity bidir {
      base pim-rp:rp-mode;
      description
        "BIDIR (Bidirectional) mode.";
    }

    identity df-state {
      base 
      description
        "DF (Designated Forwarder) election state type.";
      reference
        "RFC5015: Bidirectional Protocol Independent Multicast
        (BIDIR-PIM).";

    }

    identity df-state-offer {
      base df-state;
      description
        "Initial election state. When in the Offer state, a router
       thinks it can eventually become the winner and periodically
       generates Offer messages.";
    }

    identity df-state-lose {
      base df-state;
      description
        "There either is a different election winner or that no
       router on the link has a path to the RPA (Rendezvous-Point
       Address).";
    }

    identity df-state-win {
      base df-state;
      description
        "The router is the acting DF without any contest.";
    }

    identity df-state-backoff {
      base df-state;
      description
        "The router is the acting DF but another router has made a
       bid to take over.";
    }

    grouping df-election-container {
      description
        "Grouping that contains DF (Designated Forwarder) election
       attributes.";
      container df-election {
        if-feature intf-df-election;
        description
          "DF election attributes.";
        leaf offer-interval {
          type pim-base:timer-value;
          description
            "Offer interval specifies the interval between repeated
           DF election messages.";
        }

        leaf backoff-interval {
          type pim-base:timer-value;
          description
            "This is the interval that the acting DF waits between
           receiving a better DF Offer and sending the Pass message
           to transfer DF responsibility";
        }

        leaf offer-multiplier {
          type uint8;
          description
            "This is number of transmission attempts for DF election
           messages.
           When a DF election Offer or Winner message fails to be
           received, the message is retransmitted.
           The offer-multiplier sets the minimum number of DF
           election messages that must fail to be received for DF
           election to fail.
           If a router receives from a neighbor a better offer than
           its own, the router stops participating in the election
           for a period of offer-multiplier * offer-interval.
           Eventually, all routers except the best candidate stop
           sending Offer messages.";
        }
      }  // container df-election
    }  // grouping df-election-container

    grouping static-rp-bidir-container {
      description
        "Grouping that contains BIDIR (Bidirectional) attributes for
       static RP (Rendezvous-Point).";
      container bidir {
        presence
          "Indicate the support of BIDIR mode.";
        description
          "PIM BIDIR configuration data.";
        uses pim-rp:static-rp-attributes;
      }  // container bidir
    }  // grouping static-rp-bidir-container

    augment /rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:address-family {
      description
        "PIM BIDIR (Bidirectional) augmentation.";
      container bidir {
        presence
          "Present to enable BIDIR mode.";
        description
          "PIM BIDIR configuration data.";
      }  // container bidir
    }

    augment /rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:interfaces/pim-base:interface/pim-base:address-family {
      description "PIM BIDIR augmentation.";
      container bidir {
        presence
          "Present to enable BIDIR mode.";
        description
          "PIM BIDIR configuration data.";
        uses df-election-container;
      }  // container bidir
    }

    augment /rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:address-family/pim-rp:rp/pim-rp:static-rp/pim-rp:ipv4-rp {
      description "PIM BIDIR augmentation.";
      uses static-rp-bidir-container;
    }

    augment /rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:address-family/pim-rp:rp/pim-rp:static-rp/pim-rp:ipv6-rp {
      description "PIM BIDIR augmentation.";
      uses static-rp-bidir-container;
    }

    augment /rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:address-family/pim-rp:rp {
      description "PIM BIDIR augmentation.";
      container bidir {
        config false;
        description "PIM BIDIR state data.";
        container df-election {
          description "DF election data.";
          list ipv4-rp {
            when
              "../../../../pim-base:address-family = 'rt:ipv4'" {
              description
                "Only applicable to IPv4 address family.";
            }
            key "ipv4-address";
            description
              "A list of IPv4 RP addresses.";
            leaf ipv4-address {
              type inet:ipv4-address;
              description
                "The address of the RP.";
            }
          }  // list ipv4-rp

          list ipv6-rp {
            when
              "../../../../pim-base:address-family = 'rt:ipv6'" {
              description
                "Only applicable to IPv6 address family.";
            }
            key "ipv6-address";
            description
              "A list of IPv6 RP addresses.";
            leaf ipv6-address {
              type inet:ipv6-address;
              description
                "The address of the RP.";
            }
          }  // list ipv6-rp
        }  // container df-election

        container interface-df-election {
          description
            "Interface DF election data.";
          list ipv4-rp {
            when
              "../../../../pim-base:address-family = 'rt:ipv4'" {
              description
                "Only applicable to IPv4 address family.";
            }
            key "ipv4-address interface-name";
            description
              "A list of IPv4 RP addresses.";
            leaf ipv4-address {
              type inet:ipv4-address;
              description
                "The address of the RP.";
            }

            leaf interface-name {
              type if:interface-ref;
              description
                "The address of the RP.";
            }

            leaf df-address {
              type inet:ipv4-address;
              description "DF address.";
            }

            leaf interface-state {
              type identityref {
                base df-state;
              }
              description "Interface state.";
            }
          }  // list ipv4-rp

          list ipv6-rp {
            when
              "../../../../pim-base:address-family = 'rt:ipv6'" {
              description
                "Only applicable to IPv6 address family.";
            }
            key "ipv6-address interface-name";
            description
              "A list of IPv6 RP addresses.";
            leaf ipv6-address {
              type inet:ipv6-address;
              description
                "The address of the RP.";
            }

            leaf interface-name {
              type if:interface-ref;
              description
                "The address of the RP.";
            }

            leaf df-address {
              type inet:ipv6-address;
              description "DF address.";
            }

            leaf interface-state {
              type identityref {
                base df-state;
              }
              description "Interface state.";
            }
          }  // list ipv6-rp
        }  // container interface-df-election
      }  // container bidir
    }
  }  // module ietf-pim-bidir