ietf-vrrp

This YANG module defines a model for managing Virtual Router Redundancy Protocol (VRRP) versions 2 and 3. Copyright (c) 2018 IE...

  • Version: 2018-03-13

    ietf-vrrp@2018-03-13


    
      module ietf-vrrp {
    
        yang-version 1.1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-vrrp";
    
        prefix vrrp;
    
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import ietf-interfaces {
          prefix if;
        }
        import ietf-ip {
          prefix ip;
        }
    
        organization
          "IETF Routing Area Working Group (RTGWG)";
    
        contact
          "WG Web:   <https://datatracker.ietf.org/wg/rtgwg/>
         WG List:  <mailto:rtgwg@ietf.org>
    
         Editor:   Xufeng Liu
                   <mailto:xufeng.liu.ietf@gmail.com>
    
         Editor:   Athanasios Kyparlis
                   <mailto:Athanasios_Kyparlis@jabil.com>
         Editor:   Ravi Parikh
                   <mailto:parikhr@vmware.com>
    
         Editor:   Acee Lindem
                   <mailto:acee@cisco.com>
    
         Editor:   Mingui Zhang
                   <mailto:zhangmingui@huawei.com>";
    
        description
          "This YANG module defines a model for managing Virtual Router
         Redundancy Protocol (VRRP) versions 2 and 3.
    
         Copyright (c) 2018 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 Simplified 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 8347; see the
         RFC itself for full legal notices.";
    
        revision "2018-03-13" {
          description "Initial revision.";
          reference
            "RFC 8347: A YANG Data Model for the Virtual Router Redundancy
            	  Protocol (VRRP)
             RFC 2787: Definitions of Managed Objects for the Virtual
            	  Router Redundancy Protocol
             RFC 3768: Virtual Router Redundancy Protocol (VRRP)
             RFC 5798: Virtual Router Redundancy Protocol (VRRP)
            	  Version 3 for IPv4 and IPv6
             RFC 6527: Definitions of Managed Objects for the Virtual
            	  Router Redundancy Protocol Version 3 (VRRPv3)";
    
        }
    
    
        feature validate-interval-errors {
          description
            "This feature indicates that the system validates that the
           advertisement interval from advertisement packets received
           is the same as the interval configured for the local
           VRRP router.";
        }
    
        feature validate-address-list-errors {
          description
            "This feature indicates that the system validates that
           the address list from received packets matches the
           locally configured list for the VRRP router.";
        }
    
        typedef new-master-reason-type {
          type enumeration {
            enum "not-master" {
              value 0;
              description
                "The virtual router has never transitioned to master
               state.";
            }
            enum "priority" {
              value 1;
              description "Priority was higher.";
            }
            enum "preempted" {
              value 2;
              description
                "The master was preempted.";
            }
            enum "no-response" {
              value 3;
              description
                "Previous master did not respond.";
            }
          }
          description
            "Indicates why the virtual router has transitioned to
           master state.";
        }
    
        identity vrrp-event-type {
          description
            "Indicates the type of a VRRP protocol event.";
        }
    
        identity vrrp-event-none {
          base vrrp-event-type;
          description
            "Indicates a non-meaningful event.";
        }
    
        identity vrrp-event-startup {
          base vrrp-event-type;
          description
            "Indicates that a VRRP router has initiated the protocol.";
        }
    
        identity vrrp-event-shutdown {
          base vrrp-event-type;
          description
            "Indicates that a VRRP router has closed down the protocol.";
        }
    
        identity vrrp-event-higher-priority-backup {
          base vrrp-event-type;
          description
            "Indicates that a backup router has a higher priority than
           the current master.";
        }
    
        identity vrrp-event-master-timeout {
          base vrrp-event-type;
          description
            "Indicates that the current master has not sent an
           advertisement within the limit of master-down-interval.";
        }
    
        identity vrrp-event-interface-up {
          base vrrp-event-type;
          description
            "Indicates that the VRRP-enabled interface has become
           'operational up'.";
        }
    
        identity vrrp-event-interface-down {
          base vrrp-event-type;
          description
            "Indicates that the VRRP-enabled interface has become
           'operational down'.";
        }
    
        identity vrrp-event-no-primary-ip-address {
          base vrrp-event-type;
          description
            "Indicates that the primary IP address on the VRRP-enabled
           interface has become unavailable.";
        }
    
        identity vrrp-event-primary-ip-address {
          base vrrp-event-type;
          description
            "Indicates that the primary IP address on the VRRP-enabled
           interface has become available.";
        }
    
        identity vrrp-event-no-virtual-ip-addresses {
          base vrrp-event-type;
          description
            "Indicates that there are no virtual IP addresses on the
           virtual router.";
        }
    
        identity vrrp-event-virtual-ip-addresses {
          base vrrp-event-type;
          description
            "Indicates that there are virtual IP addresses on the
           virtual router.";
        }
    
        identity vrrp-event-preempt-hold-timeout {
          base vrrp-event-type;
          description
            "Indicates that the configured preemption hold time has
           passed.";
        }
    
        identity vrrp-event-lower-priority-master {
          base vrrp-event-type;
          description
            "Indicates that there is a lower-priority VRRP master.";
        }
    
        identity vrrp-event-owner-preempt {
          base vrrp-event-type;
          description
            "Indicates that the owner has preempted another router to
           become the master.";
        }
    
        identity vrrp-error-global {
          description
            "Indicates the type of a VRRP error that occurred
           for a packet before it reaches a VRRP router.";
        }
    
        identity checksum-error {
          base vrrp-error-global;
          description
            "A packet has been received with an invalid VRRP checksum
           value.";
        }
    
        identity ip-ttl-error {
          base vrrp-error-global;
          description
            "A packet has been received with IP TTL (Time-To-Live)
           not equal to 255.";
        }
    
        identity version-error {
          base vrrp-error-global;
          description
            "A packet has been received with an unknown or unsupported
           version number.";
        }
    
        identity vrid-error {
          base vrrp-error-global;
          description
            "A packet has been received with a Virtual Router Identifier
           (VRID) that is not valid for any virtual router on this
           router.";
        }
    
        identity vrrp-error-virtual-router {
          description
            "Indicates the type of a VRRP error that occurred
           after a packet reaches a VRRP router.";
        }
    
        identity address-list-error {
          base vrrp-error-virtual-router;
          description
            "A packet has been received with an address list that
           does not match the locally configured address list for
           the virtual router.";
        }
    
        identity interval-error {
          base vrrp-error-virtual-router;
          description
            "A packet has been received with an advertisement interval
           different than the interval configured for the local
           virtual router.";
        }
    
        identity packet-length-error {
          base vrrp-error-virtual-router;
          description
            "A packet has been received with a packet length less
           than the length of the VRRP header.";
        }
    
        identity vrrp-state-type {
          description
            "Indicates the state of a virtual router.";
        }
    
        identity initialize {
          base vrrp-state-type;
          description
            "Indicates that the virtual router is waiting
           for a startup event.";
        }
    
        identity backup {
          base vrrp-state-type;
          description
            "Indicates that the virtual router is monitoring the
           availability of the master router.";
        }
    
        identity master {
          base vrrp-state-type;
          description
            "Indicates that the virtual router is forwarding
           packets for IP addresses that are associated with
           this virtual router.";
        }
    
        identity vrrp-version {
          description "The version of VRRP.";
        }
    
        identity vrrp-v2 {
          base vrrp-version;
          description
            "Indicates version 2 of VRRP.";
        }
    
        identity vrrp-v3 {
          base vrrp-version;
          description
            "Indicates version 3 of VRRP.";
        }
    
        container vrrp {
          config false;
          description
            "VRRP data at the global level.";
          leaf virtual-routers {
            type uint32;
            description
              "Number of configured virtual routers.";
          }
    
          leaf interfaces {
            type uint32;
            description
              "Number of interfaces with VRRP configured.";
          }
    
          container statistics {
            description
              "VRRP global statistics.";
            leaf discontinuity-datetime {
              type yang:date-and-time;
              description
                "The time on the most recent occasion at which any
    one or more of checksum-errors, version-errors,
    vrid-errors, or ip-ttl-errors suffered a
    discontinuity.
    
    If no such discontinuities have occurred since the last
    re-initialization of the local management subsystem,
    then this node contains the time that the local management
    subsystem re-initialized itself.";
            }
    
            leaf checksum-errors {
              type yang:counter64;
              description
                "The total number of VRRP packets received with an invalid
    VRRP checksum value.";
              reference
                "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                	  Version 3 for IPv4 and IPv6.  Section 5.2.8";
    
            }
    
            leaf version-errors {
              type yang:counter64;
              description
                "The total number of VRRP packets received with an unknown
    or unsupported version number.";
              reference
                "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                	  Version 3 for IPv4 and IPv6.  Section 5.2.1";
    
            }
    
            leaf vrid-errors {
              type yang:counter64;
              description
                "The total number of VRRP packets received with a VRID that
    is not valid for any virtual router on this router.";
              reference
                "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                	  Version 3 for IPv4 and IPv6.  Section 5.2.3";
    
            }
    
            leaf ip-ttl-errors {
              type yang:counter64;
              description
                "The total number of VRRP packets received by the
    virtual router with IP TTL (IPv4) or Hop Limit (IPv6)
    not equal to 255.";
              reference
                "RFC 5798: Virtual Router Redundancy Protocol (VRRP)
                	  Version 3 for IPv4 and IPv6.
                	  Sections 5.1.1.3 and 5.1.2.3";
    
            }
          }  // container statistics
        }  // container vrrp
    
        notification vrrp-new-master-event {
          description
            "Notification event for the election of a new VRRP master.";
          leaf master-ip-address {
            type inet:ip-address;
            mandatory true;
            description
              "IPv4 or IPv6 address of the new master.";
          }
    
          leaf new-master-reason {
            type new-master-reason-type;
            mandatory true;
            description
              "Indicates why the virtual router has transitioned to
             master state.";
          }
        }  // notification vrrp-new-master-event
    
        notification vrrp-protocol-error-event {
          description
            "Notification event for a VRRP protocol error.";
          leaf protocol-error-reason {
            type identityref {
              base vrrp:vrrp-error-global;
            }
            mandatory true;
            description
              "Indicates the reason for the protocol error.";
          }
        }  // notification vrrp-protocol-error-event
    
        notification vrrp-virtual-router-error-event {
          description
            "Notification event for an error that happened on a
           virtual router.";
          leaf interface {
            type if:interface-ref;
            mandatory true;
            description
              "Indicates the interface on which the event has occurred.";
          }
    
          choice ip-version {
            mandatory true;
            description
              "The error may have happened on either an IPv4 virtual
             router or an IPv6 virtual router.  The information
             related to a specific IP version is provided by one of
             the following cases.";
            case ipv4 {
              description "IPv4.";
              container ipv4 {
                description
                  "Error information for IPv4.";
                leaf vrid {
                  type leafref {
                    path "/if:interfaces/if:interface[if:name = current()/../../vrrp:interface]/ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid";
                  }
                  mandatory true;
                  description
                    "Indicates the virtual router on which the event has
                   occurred.";
                }
              }  // container ipv4
            }  // case ipv4
    
            case ipv6 {
              description "IPv6.";
              container ipv6 {
                description
                  "Error information for IPv6.";
                leaf vrid {
                  type leafref {
                    path "/if:interfaces/if:interface[if:name = current()/../../vrrp:interface]/ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid";
                  }
                  mandatory true;
                  description
                    "Indicates the virtual router on which the event has
                   occurred.";
                }
              }  // container ipv6
            }  // case ipv6
          }  // choice ip-version
    
          leaf virtual-router-error-reason {
            type identityref {
              base vrrp:vrrp-error-virtual-router;
            }
            mandatory true;
            description
              "Indicates the reason for the virtual router error.";
          }
        }  // notification vrrp-virtual-router-error-event
      }  // module ietf-vrrp
    

© 2023 YumaWorks, Inc. All rights reserved.