ietf-pim-rp

This YANG module defines a PIM (Protocol Independent Multicast) RP (Rendezvous Point) model. Copyright (c) 2022 IETF Trust and ...

  • Version: 2022-10-19

    ietf-pim-rp@2022-10-19


    
      module ietf-pim-rp {
    
        yang-version 1.1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-pim-rp";
    
        prefix pim-rp;
    
        import ietf-inet-types {
          prefix inet;
          reference
            "RFC 6991: Common YANG Data Types";
    
    
        }
        import ietf-routing-types {
          prefix rt-types;
          reference
            "RFC 8294: Common YANG Data Types for the Routing Area";
    
    
        }
        import ietf-interfaces {
          prefix if;
          reference
            "RFC 8343: A YANG Data Model for Interface Management";
    
    
        }
        import ietf-routing {
          prefix rt;
          reference
            "RFC 8349: A YANG Data Model for Routing Management (NMDA
            Version)";
    
    
        }
        import ietf-pim-base {
          prefix pim-base;
          reference
            "RFC 9128: A YANG Data Model for Protocol Independent
            Multicast (PIM)";
    
    
        }
    
        organization "IETF PIM Working Group";
    
        contact
          "WG Web:   <https://datatracker.ietf.org/wg/pim/>
    WG List:  <mailto:pim@ietf.org>
    
    Editor:   Xufeng Liu
    	  <mailto:xufeng.liu.ietf@gmail.com>
    
    Editor:   Pete McAllister
    	  <mailto:pete.mcallister@metaswitch.com>
    
    Editor:   Anish Peter
    	  <mailto:anish.ietf@gmail.com>
    
    Editor:   Mahesh Sivakumar
    	  <mailto:sivakumar.mahesh@gmail.com>
    
    Editor:   Yisong Liu
    	  <mailto:liuyisong@chinamobile.com>
    
    Editor:   Fangwei Hu
    	  <mailto:hufwei@gmail.com>";
    
        description
          "This YANG module defines a PIM (Protocol Independent Multicast)
    RP (Rendezvous Point) model.
    
    Copyright (c) 2022 IETF Trust and the persons identified as
    authors of the code.  All rights reserved.
    
    Redistribution and use in source and binary forms, with or
    without modification, is permitted pursuant to, and subject to
    the license terms contained in, the Revised BSD License set
    forth in Section 4.c of the IETF Trust's Legal Provisions
    Relating to IETF Documents
    (https://trustee.ietf.org/license-info).
    
    This version of this YANG module is part of RFC 9128; see the
    RFC itself for full legal notices.";
    
        revision "2022-10-19" {
          description "Initial revision.";
          reference
            "RFC 9128: A YANG Data Model for Protocol Independent
            Multicast (PIM)";
    
        }
    
    
        feature bsr {
          description
            "This feature indicates that the system supports BSRs
    (Bootstrap Routers).";
          reference
            "RFC 5059: Bootstrap Router (BSR) Mechanism for Protocol
            Independent Multicast (PIM)";
    
        }
    
        feature bsr-election-state {
          if-feature bsr;
          description
            "This feature indicates that the system supports providing
    BSR election state.";
          reference
            "RFC 5059: Bootstrap Router (BSR) Mechanism for Protocol
            Independent Multicast (PIM)";
    
        }
    
        feature static-rp-override {
          description
            "This feature indicates that the system supports configuration
    of the static RP (Rendezvous Point) that overrides the RP
    discoveries from other mechanisms.";
          reference
            "RFC 7761: Protocol Independent Multicast - Sparse Mode
            (PIM-SM): Protocol Specification (Revised), Section 3.7";
    
        }
    
        feature candidate-interface {
          description
            "This feature indicates that the system supports using
    an interface to configure a BSR or RP candidate.";
        }
    
        feature candidate-ipv4 {
          description
            "This feature indicates that the system supports using
    an IPv4 address to configure a BSR or RP candidate.";
        }
    
        feature candidate-ipv6 {
          description
            "This feature indicates that the system supports using
    an IPv6 address to configure a BSR or RP candidate.";
        }
    
        typedef rp-event-type {
          type enumeration {
            enum "invalid-jp" {
              value 0;
              description
                "An invalid Join/Prune message has been received.";
            }
            enum "invalid-register" {
              value 1;
              description
                "An invalid Register message has been received.";
            }
            enum "mapping-created" {
              value 2;
              description
                "A new mapping has been created.";
            }
            enum "mapping-deleted" {
              value 3;
              description
                "A mapping has been deleted.";
            }
          }
          description
            "Operational status event type for notifications.";
        }
    
        identity rp-mode {
          description
            "The mode of an RP, which can be SM (Sparse Mode) or
    BIDIR (Bidirectional).";
        }
    
        identity rp-info-source-type {
          description
            "The information source of an RP.";
        }
    
        identity static {
          base rp-info-source-type;
          description
            "The RP is statically configured.";
        }
    
        identity bootstrap {
          base rp-info-source-type;
          description
            "The RP is learned from a Bootstrap.";
        }
    
        grouping rp-mapping-state-attributes {
          description
            "Grouping of RP mapping attributes.";
          leaf up-time {
            type rt-types:timeticks64;
            description
              "The number of time ticks (hundredths of a second) since
    the RP mapping or the RP became actively available.";
          }
    
          leaf expiration {
            type rt-types:timer-value-seconds16;
            description "Expiration time.";
          }
        }  // grouping rp-mapping-state-attributes
    
        grouping rp-state-attributes {
          description
            "Grouping of RP state attributes.";
          leaf info-source-type {
            type identityref {
              base rp-info-source-type;
            }
            description
              "The information source of an RP.";
          }
    
          leaf up-time {
            type rt-types:timeticks64;
            description
              "The number of time ticks (hundredths of a second) since
    the RP became actively available.";
          }
    
          leaf expiration {
            type rt-types:timer-value-seconds16;
            description "Expiration time.";
          }
        }  // grouping rp-state-attributes
    
        grouping static-rp-attributes {
          description
            "Grouping of static RP attributes, used in augmenting
    modules.";
          leaf policy-name {
            type string;
            description
              "The string value is the name to uniquely identify a
    policy that contains one or more policy rules used to
    determine which multicast group addresses are mapped
    to this statically configured RP address.
    If a policy is not specified, the entire multicast address
    space is mapped.
    The definition of such a policy is outside the scope
    of this document.";
          }
    
          leaf override {
            if-feature static-rp-override;
            type boolean;
            default "false";
            description
              "When there is a conflict between static RPs and dynamic RPs,
    setting this attribute to 'true' will ask the system to use
    static RPs.";
          }
        }  // grouping static-rp-attributes
    
        grouping rp-candidate-attributes {
          description
            "Grouping of RP candidate attributes.";
          leaf policy-name {
            type string;
            description
              "The string value is the name to uniquely identify a
    policy that contains one or more policy rules used to
    accept or reject certain multicast groups.
    If a policy is not specified, the entire multicast address
    space is accepted.
    The definition of such a policy is outside the scope
    of this document.";
          }
    
          leaf mode {
            type identityref {
              base rp-mode;
            }
            description
              "The mode of an RP, which can be SM (Sparse Mode) or BIDIR
    (Bidirectional).  Each of these modes is defined in a
    separate YANG module.  If a system supports an RP mode,
    the corresponding YANG module is implemented.
    When the value of this leaf is not specified, the default
    value is the supported mode if only one mode is implemented,
    or the default value is SM if both SM and BIDIR are
    implemented.";
          }
        }  // grouping rp-candidate-attributes
    
        augment /rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:address-family {
          description "PIM RP augmentation.";
          container rp {
            description
              "PIM RP configuration data.";
            container static-rp {
              description
                "Contains static RP attributes.";
              list ipv4-rp {
                when
                  "../../../pim-base:address-family = 'rt:ipv4'" {
                  description
                    "Only applicable to an IPv4 address family.";
                }
                key "rp-address";
                description
                  "A list of IPv4 RP addresses.";
                leaf rp-address {
                  type inet:ipv4-address;
                  description
                    "Specifies a static RP address.";
                }
              }  // list ipv4-rp
    
              list ipv6-rp {
                when
                  "../../../pim-base:address-family = 'rt:ipv6'" {
                  description
                    "Only applicable to an IPv6 address family.";
                }
                key "rp-address";
                description
                  "A list of IPv6 RP addresses.";
                leaf rp-address {
                  type inet:ipv6-address;
                  description
                    "Specifies a static RP address.";
                }
              }  // list ipv6-rp
            }  // container static-rp
    
            container bsr {
              if-feature bsr;
              description
                "Contains BSR (Bootstrap Router) attributes.";
              container bsr-candidate {
                presence
                  "Present to serve as a BSR candidate.";
                description
                  "BSR candidate attributes.";
                choice interface-or-address {
                  description
                    "Use either an interface or an IP address.";
                  case interface {
                    if-feature candidate-interface;
                    leaf interface {
                      type if:interface-ref;
                      mandatory true;
                      description
                        "Interface to be used by a BSR.";
                    }
                  }  // case interface
    
                  case ipv4-address {
                    when
                      "../../../pim-base:address-family = 'rt:ipv4'" {
                      description
                        "Only applicable to an IPv4 address family.";
                    }
                    if-feature candidate-ipv4;
                    leaf ipv4-address {
                      type inet:ipv4-address;
                      mandatory true;
                      description
                        "IP address to be used by a BSR.";
                    }
                  }  // case ipv4-address
    
                  case ipv6-address {
                    when
                      "../../../pim-base:address-family = 'rt:ipv6'" {
                      description
                        "Only applicable to an IPv6 address family.";
                    }
                    if-feature candidate-ipv6;
                    leaf ipv6-address {
                      type inet:ipv6-address;
                      mandatory true;
                      description
                        "IP address to be used by a BSR.";
                    }
                  }  // case ipv6-address
                }  // choice interface-or-address
    
                leaf hash-mask-length {
                  type uint8 {
                    range "0..128";
                  }
                  mandatory true;
                  description
                    "Value contained in BSR messages used by all routers to
    hash (map) to an RP.";
                }
    
                leaf priority {
                  type uint8 {
                    range "0..255";
                  }
                  default "64";
                  description
                    "BSR election priority among different candidate BSRs.
    A larger value has a higher priority over a smaller
    value.";
                }
              }  // container bsr-candidate
    
              container rp-candidate {
                description
                  "Contains RP candidate attributes.";
                list interface {
                  if-feature candidate-interface;
                  key "name";
                  description
                    "A list of RP candidates.";
                  leaf name {
                    type if:interface-ref;
                    description
                      "Interface that the RP candidate uses.";
                  }
    
                  uses rp-candidate-attributes;
                }  // list interface
    
                list ipv4-address {
                  when
                    "../../../../pim-base:address-family = 'rt:ipv4'" {
                    description
                      "Only applicable to an IPv4 address family.";
                  }
                  if-feature candidate-ipv4;
                  key "address";
                  description
                    "A list of RP candidate addresses.";
                  leaf address {
                    type inet:ipv4-address;
                    description
                      "IPv4 address that the RP candidate uses.";
                  }
    
                  uses rp-candidate-attributes;
                }  // list ipv4-address
    
                list ipv6-address {
                  when
                    "../../../../pim-base:address-family = 'rt:ipv6'" {
                    description
                      "Only applicable to an IPv6 address family.";
                  }
                  if-feature candidate-ipv6;
                  key "address";
                  description
                    "A list of RP candidate addresses.";
                  leaf address {
                    type inet:ipv6-address;
                    description
                      "IPv6 address that the RP candidate uses.";
                  }
    
                  uses rp-candidate-attributes;
                }  // list ipv6-address
              }  // container rp-candidate
    
              container bsr {
                config false;
                description "BSR information.";
                leaf address {
                  type inet:ip-address;
                  description "BSR address.";
                }
    
                leaf hash-mask-length {
                  type uint8 {
                    range "0..128";
                  }
                  description
                    "Hash mask length.";
                }
    
                leaf priority {
                  type uint8 {
                    range "0..255";
                  }
                  description "Priority.";
                }
    
                leaf up-time {
                  type rt-types:timeticks64;
                  description
                    "The number of time ticks (hundredths of a second)
    since the BSR came up.";
                }
              }  // container bsr
    
              choice election-state {
                if-feature bsr-election-state;
                description
                  "BSR election state.";
                leaf candidate-bsr-state {
                  type enumeration {
                    enum "candidate" {
                      value 0;
                      description
                        "The router is a candidate to be the BSR for the
    scope zone, but currently another router is the
    preferred BSR.";
                    }
                    enum "pending" {
                      value 1;
                      description
                        "The router is a candidate to be the BSR for the
    scope zone.  Currently, no other router is the
    preferred BSR, but this router is not yet the
    elected BSR.  This is a temporary state that
    prevents rapid thrashing of the choice of BSR
    during BSR election.";
                    }
                    enum "elected" {
                      value 2;
                      description
                        "The router is the elected BSR for the
    scope zone, and it must perform all of the
    BSR functions.";
                    }
                  }
                  description
                    "Candidate-BSR (C-BSR) state.";
                  reference
                    "RFC 5059: Bootstrap Router (BSR) Mechanism for
                    Protocol Independent Multicast (PIM),
                    Section 3.1.1";
    
                }
                leaf non-candidate-bsr-state {
                  type enumeration {
                    enum "no-info" {
                      value 0;
                      description
                        "The router has no information about this scope
    zone.";
                    }
                    enum "accept-any" {
                      value 1;
                      description
                        "The router does not know of an active BSR and
    will accept the first Bootstrap message it sees
    that provides the new BSR's identity and the
    RP-Set.";
                    }
                    enum "accept" {
                      value 2;
                      description
                        "The router knows the identity of the current
    BSR and is using the RP-Set provided by that
    BSR.  Only Bootstrap messages from that BSR or
    from a Candidate-BSR (C-BSR) with higher weight
    than the current BSR will be accepted.";
                    }
                  }
                  description
                    "Non-Candidate-BSR state.";
                  reference
                    "RFC 5059: Bootstrap Router (BSR) Mechanism for
                    Protocol Independent Multicast (PIM),
                    Section 3.1.2";
    
                }
              }  // choice election-state
    
              leaf bsr-next-bootstrap {
                type uint16;
                units "seconds";
                config false;
                description
                  "The remaining time interval in seconds until the next
    Bootstrap will be sent.";
              }
    
              container rp {
                config false;
                description
                  "State information of the RP.";
                leaf rp-address {
                  type inet:ip-address;
                  description "RP address.";
                }
    
                leaf policy-name {
                  type string;
                  description
                    "The string value is the name to uniquely identify a
    policy that contains one or more policy rules used to
    accept or reject certain multicast groups.
    If a policy is not specified, the entire multicast
    address space is accepted.
    The definition of such a policy is outside the scope
    of this document.";
                }
    
                leaf up-time {
                  type rt-types:timeticks64;
                  description
                    "The number of time ticks (hundredths of a second)
    since the RP became actively available.";
                }
              }  // container rp
    
              leaf rp-candidate-next-advertisement {
                type uint16;
                units "seconds";
                config false;
                description
                  "The remaining time interval in seconds until the next
    RP candidate advertisement will be sent.";
              }
            }  // container bsr
    
            container rp-list {
              config false;
              description
                "Contains a list of RPs.";
              list ipv4-rp {
                when
                  "../../../pim-base:address-family = 'rt:ipv4'" {
                  description
                    "Only applicable to an IPv4 address family.";
                }
                key "rp-address mode";
                description
                  "A list of IPv4 RP addresses.";
                leaf rp-address {
                  type inet:ipv4-address;
                  description "RP address.";
                }
    
                leaf mode {
                  type identityref {
                    base rp-mode;
                  }
                  description "RP mode.";
                }
    
                leaf info-source-address {
                  type inet:ipv4-address;
                  description
                    "The address where RP information is learned.";
                }
    
                uses rp-state-attributes;
              }  // list ipv4-rp
    
              list ipv6-rp {
                when
                  "../../../pim-base:address-family = 'rt:ipv6'" {
                  description
                    "Only applicable to an IPv6 address family.";
                }
                key "rp-address mode";
                description
                  "A list of IPv6 RP addresses.";
                leaf rp-address {
                  type inet:ipv6-address;
                  description "RP address.";
                }
    
                leaf mode {
                  type identityref {
                    base rp-mode;
                  }
                  description "RP mode.";
                }
    
                leaf info-source-address {
                  type inet:ipv6-address;
                  description
                    "The address where RP information is learned.";
                }
    
                uses rp-state-attributes;
              }  // list ipv6-rp
            }  // container rp-list
    
            container rp-mappings {
              config false;
              description
                "Contains a list of group-to-RP mappings.";
              list ipv4-rp {
                when
                  "../../../pim-base:address-family = 'rt:ipv4'" {
                  description
                    "Only applicable to an IPv4 address family.";
                }
                key "group-range rp-address";
                description
                  "A list of group-to-RP mappings.";
                leaf group-range {
                  type inet:ipv4-prefix;
                  description
                    "Group range presented in the format of a prefix.";
                }
    
                leaf rp-address {
                  type inet:ipv4-address;
                  description "RP address.";
                }
    
                uses rp-mapping-state-attributes;
              }  // list ipv4-rp
    
              list ipv6-rp {
                when
                  "../../../pim-base:address-family = 'rt:ipv6'" {
                  description
                    "Only applicable to an IPv6 address family.";
                }
                key "group-range rp-address";
                description
                  "A list of IPv6 RP addresses.";
                leaf group-range {
                  type inet:ipv6-prefix;
                  description
                    "Group range presented in the format of a prefix.";
                }
    
                leaf rp-address {
                  type inet:ipv6-address;
                  description "RP address.";
                }
    
                uses rp-mapping-state-attributes;
              }  // list ipv6-rp
            }  // container rp-mappings
          }  // container rp
        }
    
        notification pim-rp-event {
          description
            "Notification event for an RP.";
          leaf event-type {
            type rp-event-type;
            description "Event type.";
          }
    
          uses pim-base:pim-instance-af-state-ref;
    
          leaf group {
            type rt-types:ip-multicast-group-address;
            description "Group address.";
          }
    
          leaf rp-address {
            type inet:ip-address;
            description "RP address.";
          }
    
          leaf is-rpt {
            type boolean;
            description
              "'true' if the tree is an RPT (Rendezvous Point Tree).";
          }
    
          leaf mode {
            type identityref {
              base pim-base:pim-mode;
            }
            description "PIM mode.";
          }
    
          leaf message-origin {
            type inet:ip-address;
            description
              "Where the message originated.";
          }
        }  // notification pim-rp-event
      }  // module ietf-pim-rp
    

© 2023 YumaWorks, Inc. All rights reserved.