ietf-routing

This YANG module defines essential components for the management of a routing subsystem. Copyright (c) 2014 IETF Trust and the ...

  • Version: 2015-05-25

    ietf-routing@2015-05-25


    
      module ietf-routing {
    
        yang-version 1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-routing";
    
        prefix rt;
    
        import ietf-yang-types {
          prefix yang;
        }
        import ietf-interfaces {
          prefix if;
        }
    
        organization
          "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
    
        contact
          "WG Web:   <http://tools.ietf.org/wg/netmod/>
    WG List:  <mailto:netmod@ietf.org>
    
    WG Chair: Thomas Nadeau
    	  <mailto:tnadeau@lucidvision.com>
    
    WG Chair: Juergen Schoenwaelder
    	  <mailto:j.schoenwaelder@jacobs-university.de>
    
    Editor:   Ladislav Lhotka
    	  <mailto:lhotka@nic.cz>";
    
        description
          "This YANG module defines essential components for the management
    of a routing subsystem.
    
    Copyright (c) 2014 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
    (http://trustee.ietf.org/license-info).
    
    The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
    NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
    'OPTIONAL' in the module text are to be interpreted as described
    in RFC 2119 (http://tools.ietf.org/html/rfc2119).
    
    This version of this YANG module is part of RFC XXXX
    (http://tools.ietf.org/html/rfcXXXX); see the RFC itself for
    full legal notices.";
    
        revision "2015-05-25" {
          description "Initial revision.";
          reference
            "RFC XXXX: A YANG Data Model for Routing Management";
    
        }
    
    
        feature multiple-ribs {
          description
            "This feature indicates that the server supports user-defined
    RIBs.
    
    Servers that do not advertise this feature SHOULD provide
    exactly one system-controlled RIB per routing-instance and
    supported address family and make them also the default RIBs.
    These RIBs then appear as entries of the list
    /routing-state/routing-instance/ribs/rib.";
        }
    
        feature router-id {
          description
            "This feature indicates that the server supports configuration
    of an explicit 32-bit router ID that is used by some routing
    protocols.
    
    Servers that do not advertise this feature set a router ID
    algorithmically, usually to one of configured IPv4 addresses.
    However, this algorithm is implementation-specific.";
        }
    
        identity address-family {
          description
            "Base identity from which identities describing address
    families are derived.";
        }
    
        identity ipv4 {
          base address-family;
          description
            "This identity represents IPv4 address family.";
        }
    
        identity ipv6 {
          base address-family;
          description
            "This identity represents IPv6 address family.";
        }
    
        identity routing-instance {
          description
            "Base identity from which identities describing routing
    instance types are derived.";
        }
    
        identity default-routing-instance {
          base routing-instance;
          description
            "This identity represents either a default routing instance, or
    the only routing instance on systems that do not support
    multiple instances.";
        }
    
        identity vrf-routing-instance {
          base routing-instance;
          description
            "This identity represents a VRF routing instance. The type is
    distinct from the default-routing-instance. There may be
    multiple vrf-routing-interfaces.";
        }
    
        identity routing-protocol {
          description
            "Base identity from which routing protocol identities are
    derived.";
        }
    
        identity direct {
          base routing-protocol;
          description
            "Routing pseudo-protocol that provides routes to directly
    connected networks.";
        }
    
        identity static {
          base routing-protocol;
          description
            "Static routing pseudo-protocol.";
        }
    
        typedef routing-instance-ref {
          type leafref {
            path "/rt:routing/rt:routing-instance/rt:name";
          }
          description
            "This type is used for leafs that reference a routing instance
    configuration.";
        }
    
        typedef routing-instance-state-ref {
          type leafref {
            path "/rt:routing-state/rt:routing-instance/rt:name";
          }
          description
            "This type is used for leafs that reference state data of a
    routing instance.";
        }
    
        typedef route-preference {
          type uint32;
          description
            "This type is used for route preferences.";
        }
    
        container routing-state {
          config false;
          description
            "State data of the routing subsystem.";
          list routing-instance {
            key "name";
            min-elements 1;
            description
              "Each list entry is a container for state data of a routing
    instance.
    
    An implementation MUST support routing instance(s) of the
    type 'rt:default-routing-instance', and MAY support other
    types. An implementation MAY restrict the number of routing
    instances of each supported type.
    
    An implementation SHOULD create at least one
    system-controlled instance, and MAY allow the clients to
    create user-controlled routing instances in
    configuration.";
            leaf name {
              type string;
              description
                "The name of the routing instance.
    
    For system-controlled instances the name is persistent,
    i.e., it SHOULD NOT change across reboots.";
            }
    
            leaf type {
              type identityref {
                base routing-instance;
              }
              description
                "The routing instance type.";
            }
    
            leaf router-id {
              type yang:dotted-quad;
              description
                "A 32-bit number in the form of a dotted quad that is used by
    some routing protocols identifying a router.";
              reference
                "RFC 2328: OSPF Version 2.";
    
            }
    
            container interfaces {
              description
                "Network layer interfaces belonging to the routing
    instance.";
              leaf-list interface {
                type if:interface-state-ref;
                description
                  "Each entry is a reference to the name of a configured
    network layer interface.";
              }
            }  // container interfaces
    
            container routing-protocols {
              description
                "Container for the list of routing protocol instances.";
              list routing-protocol {
                key "type name";
                description
                  "State data of a routing protocol instance.
    
    An implementation MUST provide exactly one
    system-controlled instance of the type 'direct'. Other
    instances MAY be created by configuration.";
                leaf type {
                  type identityref {
                    base routing-protocol;
                  }
                  description
                    "Type of the routing protocol.";
                }
    
                leaf name {
                  type string;
                  description
                    "The name of the routing protocol instance.
    
    For system-controlled instances this name is
    persistent, i.e., it SHOULD NOT change across
    reboots.";
                }
    
                container ospf {
                  description "OSPF";
                  leaf operation-mode {
                    type identityref {
                      base operation-mode;
                    }
                    description
                      "OSPF operation mode.";
                  }
    
                  list instance {
                    key "af";
                    description
                      "An OSPF routing protocol instance.";
                    leaf af {
                      type identityref {
                        base rt:address-family;
                      }
                      description
                        "Address-family of the instance.";
                    }
    
                    leaf router-id {
                      type yang:dotted-quad;
                      description
                        "Defined in RFC 2328. A 32-bit number
    that uniquely identifies the router.";
                    }
    
                    list area {
                      key "area-id";
                      description
                        "List of OSPF areas";
                      leaf area-id {
                        type area-id-type;
                        description "Area ID.";
                      }
    
                      list interfaces {
                        key "interface";
                        description
                          "List of OSPF interfaces.";
                        leaf interface {
                          type string;
                          description
                            "Interface.";
                        }
    
                        leaf network-type {
                          type enumeration {
                            enum "broadcast" {
                              value 0;
                              description
                                "Specify OSPF broadcast multi-access network.";
                            }
                            enum "non-broadcast" {
                              value 1;
                              description
                                "Specify OSPF Non-Broadcast Multi-Access
    (NBMA) network.";
                            }
                            enum
                              "point-to-multipoint" {
                              value 2;
                              description
                                "Specify OSPF point-to-multipoint network.";
                            }
                            enum
                              "point-to-point" {
                              value 3;
                              description
                                "Specify OSPF point-to-point network.";
                            }
                          }
                          description
                            "Network type.";
                        }
    
                        leaf passive {
                          type boolean;
                          description
                            "Enable/Disable passive.";
                        }
    
                        leaf demand-circuit {
                          if-feature demand-circuit;
                          type boolean;
                          description
                            "Enable/Disable demand circuit.";
                        }
    
                        container multi-area {
                          if-feature multi-area-adj;
                          description
                            "Configure ospf multi-area.";
                          leaf multi-area-id {
                            type area-id-type;
                            description
                              "Multi-area ID";
                          }
    
                          leaf cost {
                            type uint16;
                            description
                              "Interface cost for multi-area.";
                          }
                        }  // container multi-area
    
                        container static-neighbors {
                          description
                            "Static configured neighbors.";
                          list neighbor {
                            key "address";
                            description
                              "Specify a neighbor router.";
                            leaf address {
                              type inet:ip-address;
                              description
                                "Neighbor IP address.";
                            }
    
                            leaf cost {
                              type uint16 {
                                range "1..65535";
                              }
                              description
                                "Neighbor cost.";
                            }
    
                            leaf poll-interval {
                              type uint16 {
                                range "1..65535";
                              }
                              units "seconds";
                              description
                                "Neighbor poll interval.";
                            }
    
                            leaf priority {
                              type uint8 {
                                range "1..255";
                              }
                              description
                                "Neighbor priority for DR election.";
                            }
                          }  // list neighbor
                        }  // container static-neighbors
    
                        leaf node-flag {
                          if-feature node-flag;
                          type boolean;
                          default "false";
                          description
                            "Set prefix as a node representative prefix.";
                        }
    
                        container fast-reroute {
                          if-feature fast-reroute;
                          description
                            "Fast-reroute configuration.";
                          container lfa {
                            if-feature lfa;
                            description
                              "LFA configuration.";
                            leaf candidate-disabled {
                              type boolean;
                              description
                                "Prevent the interface to be used as backup.";
                            }
    
                            leaf enabled {
                              type boolean;
                              description
                                "Activates LFA.
    This model assumes activation of per-prefix LFA.";
                            }
    
                            container remote-lfa {
                              if-feature remote-lfa;
                              description
                                "Remote LFA configuration.";
                              leaf enabled {
                                type boolean;
                                description
                                  "Activates remote LFA.";
                              }
                            }  // container remote-lfa
                          }  // container lfa
                        }  // container fast-reroute
    
                        leaf cost {
                          type uint16 {
                            range "1..65535";
                          }
                          description
                            "Interface cost.";
                        }
    
                        leaf hello-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Time between hello packets.";
                        }
    
                        leaf dead-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          must
                            "../dead-interval > ../hello-interval" {
                            error-message
                              "The dead interval must be larger than the hello interval";
                            description
                              "The value MUST be greater than 'hello-internval'.";
                          }
                          description
                            "Interval after which a neighbor is declared dead.";
                        }
    
                        leaf retransmit-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Time between retransmitting unacknowledged Link State
    Advertisements (LSAs).";
                        }
    
                        leaf transmit-delay {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Estimated time needed to send link-state update.";
                        }
    
                        leaf mtu-ignore {
                          if-feature mtu-ignore;
                          type boolean;
                          description
                            "Enable/Disable ignoring of MTU in DBD packets.";
                        }
    
                        leaf lls {
                          if-feature lls;
                          type boolean;
                          description
                            "Enable/Disable link-local signaling (LLS) support.";
                        }
    
                        leaf prefix-suppression {
                          if-feature prefix-suppression;
                          type boolean;
                          description
                            "Suppress advertisement of the prefixes.";
                        }
    
                        leaf bfd {
                          if-feature bfd;
                          type boolean;
                          description
                            "Enable/disable bfd.";
                        }
    
                        container ttl-security {
                          if-feature ttl-security;
                          description
                            "TTL security check.";
                          leaf enable {
                            type boolean;
                            description
                              "Enable/Disable TTL security check.";
                          }
    
                          leaf hops {
                            type uint8 {
                              range "1..254";
                            }
                            description
                              "Maximum number of hops that a OSPF packet may
    have traveled.";
                          }
                        }  // container ttl-security
    
                        leaf enable {
                          if-feature admin-control;
                          type boolean;
                          default "true";
                          description
                            "Enable/disable protocol on the interface.";
                        }
    
                        container authentication {
                          description
                            "Authentication configuration.";
                          choice auth-type-selection {
                            description
                              "Options for expressing authentication setting";
                            case auth-ipsec {
                              when
                                "../../../../../rt:type = 'ospfv3'" {
                                description
                                  "Applied to OSPFv3 only";
                              }
                              if-feature ospfv3-authentication-ipsec;
                              leaf sa {
                                type string;
                                description
                                  "SA name";
                              }
                            }  // case auth-ipsec
                            leaf key-chain {
                              type key-chain:key-chain-ref;
                              description
                                "key-chain name";
                            }
    
                            case auth-trailer-key {
                              leaf key {
                                type string;
                                description
                                  "Key string in ASCII format.";
                              }
    
                              container crypto-algorithm {
                                description
                                  "Cryptographic algorithm associated with key.";
                                choice algorithm {
                                  description
                                    "Options for crytographic algorithm specification.";
                                  leaf hmac-sha1-12 {
                                    type empty;
                                    description
                                      "The HMAC-SHA1-12 algorithm.";
                                  }
                                  leaf hmac-sha1-20 {
                                    type empty;
                                    description
                                      "The HMAC-SHA1-20 algorithm.";
                                  }
                                  leaf md5 {
                                    type empty;
                                    description
                                      "The MD5 algorithm.";
                                  }
                                  leaf sha-1 {
                                    type empty;
                                    description
                                      "The SHA-1 algorithm.";
                                  }
                                  leaf hmac-sha-1 {
                                    type empty;
                                    description
                                      "HMAC-SHA-1 authentication algorithm.";
                                  }
                                  leaf hmac-sha-256 {
                                    type empty;
                                    description
                                      "HMAC-SHA-256 authentication algorithm.";
                                  }
                                  leaf hmac-sha-384 {
                                    type empty;
                                    description
                                      "HMAC-SHA-384 authentication algorithm.";
                                  }
                                  leaf hmac-sha-512 {
                                    type empty;
                                    description
                                      "HMAC-SHA-512 authentication algorithm.";
                                  }
                                }  // choice algorithm
                              }  // container crypto-algorithm
                            }  // case auth-trailer-key
                          }  // choice auth-type-selection
                        }  // container authentication
    
                        leaf state {
                          type string;
                          description
                            "Interface state.";
                        }
    
                        leaf hello-timer {
                          type uint32;
                          units "milliseconds";
                          description
                            "Hello timer.";
                        }
    
                        leaf wait-timer {
                          type uint32;
                          units "milliseconds";
                          description
                            "Wait timer.";
                        }
    
                        leaf dr {
                          type inet:ipv4-address;
                          description "DR.";
                        }
    
                        leaf bdr {
                          type inet:ipv4-address;
                          description "BDR.";
                        }
    
                        list neighbor {
                          key "neighbor-id";
                          description
                            "List of OSPF neighbors.";
                          leaf neighbor-id {
                            type inet:ipv4-address;
                            description
                              "Neighbor ID.";
                          }
    
                          leaf address {
                            type inet:ip-address;
                            description
                              "Neighbor address.";
                          }
    
                          leaf dr {
                            type inet:ipv4-address;
                            description
                              "Designated Router.";
                          }
    
                          leaf bdr {
                            type inet:ipv4-address;
                            description
                              "Backup Designated Router.";
                          }
    
                          leaf state {
                            type nbr-state-type;
                            description
                              "OSPF neighbor state.";
                          }
                        }  // list neighbor
    
                        list link-scope-lsas {
                          when
                            "../../../../../rt:type = 'ospfv3'" {
                            description
                              "Link scope LSA only exists in OSPFv3.";
                          }
                          key "lsa-type";
                          description
                            "List OSPF link scope LSA databases";
                          leaf lsa-type {
                            type uint8;
                            description
                              "OSPF link scope LSA type.";
                          }
    
                          list link-scope-lsa {
                            key "lsa-id adv-router";
                            description
                              "List of OSPF link scope LSAs";
                            leaf lsa-id {
                              type union {
                                type inet:ipv4-address;
                                type uint32;
                              }
                              description
                                "LSA ID.";
                            }
    
                            leaf adv-router {
                              type inet:ipv4-address;
                              description
                                "Advertising router.";
                            }
    
                            leaf decoded-completed {
                              type boolean;
                              description
                                "The OSPF LSA body is fully decoded.";
                            }
    
                            leaf raw-data {
                              type yang:hex-string;
                              description
                                "The complete LSA in network byte
    order as received/sent over the wire.";
                            }
    
                            choice version {
                              description
                                "OSPFv2 or OSPFv3 LSA body.";
                              container ospfv2 {
                                must
                                  "../../../../../../../rt:type = 'ospfv2'" {
                                  description
                                    "OSPFv2 LSA";
                                }
                                description
                                  "OSPFv2 LSA";
                                container header {
                                  description
                                    "Decoded OSPFv2 LSA header data.";
                                  leaf options {
                                    type bits {
                                      bit DC {
                                        position
                                          0;
                                        description
                                          "When set, the router support demand circuits.";
                                      }
                                      bit P {
                                        position
                                          1;
                                        description
                                          "Only used in type-7 LSA. When set, the NSSA
    border router should translate the type-7 LSA
    to type-5 LSA.";
                                      }
                                      bit MC {
                                        position
                                          2;
                                        description
                                          "When set, the router support MOSPF.";
                                      }
                                      bit E {
                                        position
                                          3;
                                        description
                                          "This bit describes the way AS-external-LSAs
    are flooded";
                                      }
                                      bit
                                        Upward {
                                        position
                                          4;
                                      }
                                      bit MT {
                                        position
                                          5;
                                      }
                                      bit R {
                                        position
                                          6;
                                      }
                                      bit AF {
                                        position
                                          7;
                                      }
                                    }
                                    mandatory
                                      true;
                                    description
                                      "LSA option.";
                                  }
    
                                  leaf lsa-id {
                                    type inet:ipv4-address;
                                    mandatory
                                      true;
                                    description
                                      "LSA ID.";
                                  }
    
                                  leaf opaque-type {
                                    when
                                      "../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11" {
                                      description
                                        "Only apply to opaque LSA.";
                                    }
                                    type uint8;
                                    mandatory
                                      true;
                                    description
                                      "Opaque type.";
                                  }
    
                                  leaf opaque-id {
                                    when
                                      "../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11" {
                                      description
                                        "Only apply to opaque LSA.";
                                    }
                                    type uint24;
                                    mandatory
                                      true;
                                    description
                                      "Opaque id.";
                                  }
    
                                  leaf age {
                                    type uint16;
                                    mandatory
                                      true;
                                    description
                                      "LSA age.";
                                  }
    
                                  leaf type {
                                    type uint16;
                                    mandatory
                                      true;
                                    description
                                      "LSA type.";
                                  }
    
                                  leaf adv-router {
                                    type yang:dotted-quad;
                                    mandatory
                                      true;
                                    description
                                      "LSA advertising router.";
                                  }
    
                                  leaf seq-num {
                                    type string;
                                    mandatory
                                      true;
                                    description
                                      "LSA sequence number.";
                                  }
    
                                  leaf checksum {
                                    type string;
                                    mandatory
                                      true;
                                    description
                                      "LSA checksum.";
                                  }
    
                                  leaf length {
                                    type uint16;
                                    mandatory
                                      true;
                                    description
                                      "LSA length.";
                                  }
                                }  // container header
    
                                container body {
                                  description
                                    "Decoded OSPFv2 LSA body data.";
                                  container router {
                                    when
                                      "../../header/type = 1" {
                                      description
                                        "Only apply to Router-LSA.";
                                    }
                                    description
                                      "Router LSA.";
                                    leaf flags {
                                      type bits {
                                        bit V {
                                          position
                                            0;
                                          description
                                            "When set, the router is an endpoint of one or
    more virtual links.";
                                        }
                                        bit E {
                                          position
                                            1;
                                          description
                                            "When set, the router is an AS Boundary Router
    (ASBR).";
                                        }
                                        bit B {
                                          position
                                            2;
                                          description
                                            "When set, the router is an Area Border
    Router (ABR).";
                                        }
                                      }
                                      description
                                        "Flags";
                                    }
    
                                    leaf num-of-links {
                                      type uint16;
                                      description
                                        "Number of links.";
                                    }
    
                                    list link {
                                      key "link-id link-data";
                                      description
                                        "Router LSA link.";
                                      leaf link-id {
                                        type union {
                                          type inet:ipv4-address;
                                          type yang:dotted-quad;
                                        }
                                        description
                                          "Link ID";
                                      }
    
                                      leaf link-data {
                                        type union {
                                          type inet:ipv4-address;
                                          type uint32;
                                        }
                                        description
                                          "Link data.";
                                      }
    
                                      leaf type {
                                        type uint8;
                                        description
                                          "Link type.";
                                      }
    
                                      list topology {
                                        key "mt-id";
                                        description
                                          "Topology specific information.";
                                        leaf mt-id {
                                          type uint8;
                                          description
                                            "The MT-ID for topology enabled on the link.";
                                        }
    
                                        leaf metric {
                                          type uint16;
                                          description
                                            "Metric for the topology.";
                                        }
                                      }  // list topology
                                    }  // list link
                                  }  // container router
    
                                  container network {
                                    when
                                      "../../header/type = 2" {
                                      description
                                        "Only apply to network LSA.";
                                    }
                                    description
                                      "Network LSA.";
                                    leaf network-mask {
                                      type inet:ipv4-address;
                                      description
                                        "The IP address mask for the network";
                                    }
    
                                    leaf-list attached-router {
                                      type yang:dotted-quad;
                                      description
                                        "List of the routers attached to the network.";
                                    }
                                  }  // container network
    
                                  container summary {
                                    when
                                      "../../header/type = 3 or ../../header/type = 4" {
                                      description
                                        "Only apply to Summary-LSA.";
                                    }
                                    description
                                      "Summary LSA.";
                                    leaf network-mask {
                                      type inet:ipv4-address;
                                      description
                                        "The IP address mask for the network";
                                    }
    
                                    list topology {
                                      key "mt-id";
                                      description
                                        "Topology specific information.";
                                      leaf mt-id {
                                        type uint8;
                                        description
                                          "The MT-ID for topology enabled on the link.";
                                      }
    
                                      leaf metric {
                                        type uint24;
                                        description
                                          "Metric for the topology.";
                                      }
                                    }  // list topology
                                  }  // container summary
    
                                  container external {
                                    when
                                      "../../header/type = 5 or ../../header/type = 7" {
                                      description
                                        "Only apply to AS-external-LSA and NSSA-LSA.";
                                    }
                                    description
                                      "External LSA.";
                                    leaf network-mask {
                                      type inet:ipv4-address;
                                      description
                                        "The IP address mask for the network";
                                    }
    
                                    list topology {
                                      key "mt-id";
                                      description
                                        "Topology specific information.";
                                      leaf mt-id {
                                        type uint8;
                                        description
                                          "The MT-ID for topology enabled on the link.";
                                      }
    
                                      leaf flags {
                                        type bits {
                                          bit
                                            E {
                                            position
                                              0;
                                            description
                                              "When set, the metric specified is a Type 2
    external metric.";
                                          }
                                        }
                                        description
                                          "Flags.";
                                      }
    
                                      leaf metric {
                                        type uint24;
                                        description
                                          "Metric for the topology.";
                                      }
    
                                      leaf forwarding-address {
                                        type inet:ipv4-address;
                                        description
                                          "Forwarding address.";
                                      }
    
                                      leaf external-route-tag {
                                        type uint32;
                                        description
                                          "Route tag.";
                                      }
                                    }  // list topology
                                  }  // container external
    
                                  container opaque {
                                    when
                                      "../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11" {
                                      description
                                        "Only apply to opaque LSA.";
                                    }
                                    description
                                      "Opaque LSA.";
                                    list unknown-tlv {
                                      key "type";
                                      description
                                        "Unknown TLV.";
                                      leaf type {
                                        type uint16;
                                        description
                                          "TLV type.";
                                      }
    
                                      leaf length {
                                        type uint16;
                                        description
                                          "TLV length.";
                                      }
    
                                      leaf value {
                                        type yang:hex-string;
                                        description
                                          "TLV value.";
                                      }
                                    }  // list unknown-tlv
    
                                    container router-address-tlv {
                                      description
                                        "Router address TLV.";
                                      leaf router-address {
                                        type inet:ipv4-address;
                                        description
                                          "Router address.";
                                      }
                                    }  // container router-address-tlv
    
                                    container link-tlv {
                                      description
                                        "Link TLV.";
                                      leaf link-type {
                                        type uint8;
                                        mandatory
                                          true;
                                        description
                                          "Link type.";
                                      }
    
                                      leaf link-id {
                                        type union {
                                          type inet:ipv4-address;
                                          type yang:dotted-quad;
                                        }
                                        mandatory
                                          true;
                                        description
                                          "Link ID.";
                                      }
    
                                      leaf-list local-if-ipv4-addr {
                                        type inet:ipv4-address;
                                        description
                                          "List of local interface IPv4 addresses.";
                                      }
    
                                      leaf-list local-remote-ipv4-addr {
                                        type inet:ipv4-address;
                                        description
                                          "List of remote interface IPv4 addresses.";
                                      }
    
                                      leaf te-metric {
                                        type uint32;
                                        description
                                          "TE metric.";
                                      }
    
                                      leaf max-bandwidth {
                                        type decimal64 {
                                          fraction-digits
                                            2;
                                        }
                                        description
                                          "Maximum bandwidth.";
                                      }
    
                                      leaf max-reservable-bandwidth {
                                        type decimal64 {
                                          fraction-digits
                                            2;
                                        }
                                        description
                                          "Maximum reservable bandwidth.";
                                      }
    
                                      leaf unreserved-bandwidth {
                                        type decimal64 {
                                          fraction-digits
                                            2;
                                        }
                                        description
                                          "Unreserved bandwidth.";
                                      }
    
                                      leaf admin-group {
                                        type uint32;
                                        description
                                          "Administrative group/Resource class/Color.";
                                      }
    
                                      list unknown-subtlv {
                                        key "type";
                                        description
                                          "Unknown sub-TLV.";
                                        leaf type {
                                          type uint16;
                                          description
                                            "TLV type.";
                                        }
    
                                        leaf length {
                                          type uint16;
                                          description
                                            "TLV length.";
                                        }
    
                                        leaf value {
                                          type yang:hex-string;
                                          description
                                            "TLV value.";
                                        }
                                      }  // list unknown-subtlv
                                    }  // container link-tlv
                                  }  // container opaque
                                }  // container body
                              }  // container ospfv2
                              container ospfv3 {
                                must
                                  "../../../../../../../rt:type = 'ospfv3'" {
                                  description
                                    "OSPFv3 LSA";
                                }
                                description
                                  "OSPFv3 LSA";
                                container header {
                                  description
                                    "Decoded OSPFv3 LSA header data.";
                                  leaf lsa-id {
                                    type uint32;
                                    mandatory
                                      true;
                                    description
                                      "LSA ID.";
                                  }
    
                                  leaf age {
                                    type uint16;
                                    mandatory
                                      true;
                                    description
                                      "LSA age.";
                                  }
    
                                  leaf type {
                                    type uint16;
                                    mandatory
                                      true;
                                    description
                                      "LSA type.";
                                  }
    
                                  leaf adv-router {
                                    type yang:dotted-quad;
                                    mandatory
                                      true;
                                    description
                                      "LSA advertising router.";
                                  }
    
                                  leaf seq-num {
                                    type string;
                                    mandatory
                                      true;
                                    description
                                      "LSA sequence number.";
                                  }
    
                                  leaf checksum {
                                    type string;
                                    mandatory
                                      true;
                                    description
                                      "LSA checksum.";
                                  }
    
                                  leaf length {
                                    type uint16;
                                    mandatory
                                      true;
                                    description
                                      "LSA length.";
                                  }
    
                                  leaf options {
                                    type bits {
                                      bit DC {
                                        position
                                          0;
                                        description
                                          "When set, the router support demand circuits.";
                                      }
                                      bit R {
                                        position
                                          1;
                                        description
                                          "When set, the originator is an active router.";
                                      }
                                      bit N {
                                        position
                                          2;
                                        description
                                          "If set, the router is attached to an NSSA";
                                      }
                                      bit E {
                                        position
                                          3;
                                        description
                                          "This bit describes the way AS-external-LSAs
    are flooded";
                                      }
                                      bit V6 {
                                        position
                                          4;
                                        description
                                          "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                      }
                                      bit AF {
                                        position
                                          5;
                                      }
                                    }
                                    mandatory
                                      true;
                                    description
                                      "OSPFv3 LSA options.";
                                  }
                                }  // container header
    
                                container body {
                                  description
                                    "Decoded OSPF LSA body data.";
                                  container router {
                                    when
                                      "../../header/type = 8193" {
                                      description
                                        "Only apply to Router-LSA.";
                                    }
                                    description
                                      "Router LSA.";
                                    leaf flags {
                                      type bits {
                                        bit V {
                                          position
                                            0;
                                          description
                                            "When set, the router is an endpoint of one or
    more virtual links.";
                                        }
                                        bit E {
                                          position
                                            1;
                                          description
                                            "When set, the router is an AS Boundary Router
    (ASBR).";
                                        }
                                        bit B {
                                          position
                                            2;
                                          description
                                            "When set, the router is an Area Border
    Router (ABR).";
                                        }
                                        bit Nt {
                                          position
                                            3;
                                          description
                                            "When set, the router is an NSSA border router
    that is unconditionally translating NSSA-LSAs
    into AS-external-LSAs.";
                                        }
                                      }
                                      mandatory
                                        true;
                                      description
                                        "LSA option.";
                                    }
    
                                    leaf options {
                                      type bits {
                                        bit DC {
                                          position
                                            0;
                                          description
                                            "When set, the router support demand circuits.";
                                        }
                                        bit R {
                                          position
                                            1;
                                          description
                                            "When set, the originator is an active router.";
                                        }
                                        bit N {
                                          position
                                            2;
                                          description
                                            "If set, the router is attached to an NSSA";
                                        }
                                        bit E {
                                          position
                                            3;
                                          description
                                            "This bit describes the way AS-external-LSAs
    are flooded";
                                        }
                                        bit V6 {
                                          position
                                            4;
                                          description
                                            "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                        }
                                        bit AF {
                                          position
                                            5;
                                        }
                                      }
                                      mandatory
                                        true;
                                      description
                                        "OSPFv3 LSA options.";
                                    }
    
                                    list link {
                                      key "interface-id neighbor-interface-id neighbor-router-id";
                                      description
                                        "Router LSA link.";
                                      leaf interface-id {
                                        type uint32;
                                        description
                                          "Interface ID.";
                                      }
    
                                      leaf neighbor-interface-id {
                                        type uint32;
                                        description
                                          "Neighbor Interface ID.";
                                      }
    
                                      leaf neighbor-router-id {
                                        type yang:dotted-quad;
                                        description
                                          "Neighbor Router ID";
                                      }
    
                                      leaf type {
                                        type uint8;
                                        description
                                          "Link type.";
                                      }
    
                                      leaf metric {
                                        type uint16;
                                        description
                                          "Metric.";
                                      }
                                    }  // list link
                                  }  // container router
    
                                  container network {
                                    when
                                      "../../header/type = 8194" {
                                      description
                                        "Only apply to network LSA.";
                                    }
                                    description
                                      "Network LSA.";
                                    leaf options {
                                      type bits {
                                        bit DC {
                                          position
                                            0;
                                          description
                                            "When set, the router support demand circuits.";
                                        }
                                        bit R {
                                          position
                                            1;
                                          description
                                            "When set, the originator is an active router.";
                                        }
                                        bit N {
                                          position
                                            2;
                                          description
                                            "If set, the router is attached to an NSSA";
                                        }
                                        bit E {
                                          position
                                            3;
                                          description
                                            "This bit describes the way AS-external-LSAs
    are flooded";
                                        }
                                        bit V6 {
                                          position
                                            4;
                                          description
                                            "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                        }
                                        bit AF {
                                          position
                                            5;
                                        }
                                      }
                                      mandatory
                                        true;
                                      description
                                        "OSPFv3 LSA options.";
                                    }
    
                                    leaf-list attached-router {
                                      type yang:dotted-quad;
                                      description
                                        "List of the routers attached to the network.";
                                    }
                                  }  // container network
    
                                  container inter-area-prefix {
                                    when
                                      "../../header/type = 8195" {
                                      description
                                        "Only apply to inter-area-prefix LSA.";
                                    }
                                    description
                                      "Inter-Area-Prefix LSA.";
                                    leaf metric {
                                      type uint24;
                                      description
                                        "Metric";
                                    }
    
                                    leaf prefix {
                                      type string;
                                      description
                                        "Prefix";
                                    }
    
                                    leaf prefix-options {
                                      type string;
                                      mandatory
                                        true;
                                      description
                                        "Prefix options.";
                                    }
                                  }  // container inter-area-prefix
    
                                  container inter-area-router {
                                    when
                                      "../../header/type = 8196" {
                                      description
                                        "Only apply to inter-area-router LSA.";
                                    }
                                    description
                                      "Inter-Area-Router LSA.";
                                    leaf options {
                                      type bits {
                                        bit DC {
                                          position
                                            0;
                                          description
                                            "When set, the router support demand circuits.";
                                        }
                                        bit R {
                                          position
                                            1;
                                          description
                                            "When set, the originator is an active router.";
                                        }
                                        bit N {
                                          position
                                            2;
                                          description
                                            "If set, the router is attached to an NSSA";
                                        }
                                        bit E {
                                          position
                                            3;
                                          description
                                            "This bit describes the way AS-external-LSAs
    are flooded";
                                        }
                                        bit V6 {
                                          position
                                            4;
                                          description
                                            "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                        }
                                        bit AF {
                                          position
                                            5;
                                        }
                                      }
                                      mandatory
                                        true;
                                      description
                                        "OSPFv3 LSA options.";
                                    }
    
                                    leaf metric {
                                      type uint24;
                                      description
                                        "Metric";
                                    }
    
                                    leaf destination-router-id {
                                      type yang:dotted-quad;
                                      description
                                        "The Router ID of the router being described by the LSA.";
                                    }
                                  }  // container inter-area-router
    
                                  container as-external {
                                    when
                                      "../../header/type = 16389" {
                                      description
                                        "Only apply to as-external LSA.";
                                    }
                                    description
                                      "AS-External LSA.";
                                    leaf metric {
                                      type uint24;
                                      description
                                        "Metric";
                                    }
    
                                    leaf flags {
                                      type bits {
                                        bit E {
                                          position
                                            0;
                                          description
                                            "When set, the metric specified is a Type 2
    external metric.";
                                        }
                                      }
                                      description
                                        "Flags.";
                                    }
    
                                    leaf referenced-ls-type {
                                      type uint16;
                                      description
                                        "Referenced Link State type.";
                                    }
    
                                    leaf prefix {
                                      type string;
                                      description
                                        "Prefix";
                                    }
    
                                    leaf prefix-options {
                                      type string;
                                      mandatory
                                        true;
                                      description
                                        "Prefix options.";
                                    }
    
                                    leaf forwarding-address {
                                      type inet:ipv6-address;
                                      description
                                        "Forwarding address.";
                                    }
    
                                    leaf external-route-tag {
                                      type uint32;
                                      description
                                        "Route tag.";
                                    }
    
                                    leaf referenced-link-state-id {
                                      type uint32;
                                      description
                                        "Referenced Link State ID.";
                                    }
                                  }  // container as-external
    
                                  container nssa {
                                    when
                                      "../../header/type = 8199" {
                                      description
                                        "Only apply to nssa LSA.";
                                    }
                                    description
                                      "NSSA LSA.";
                                    leaf metric {
                                      type uint24;
                                      description
                                        "Metric";
                                    }
    
                                    leaf flags {
                                      type bits {
                                        bit E {
                                          position
                                            0;
                                          description
                                            "When set, the metric specified is a Type 2
    external metric.";
                                        }
                                      }
                                      description
                                        "Flags.";
                                    }
    
                                    leaf referenced-ls-type {
                                      type uint16;
                                      description
                                        "Referenced Link State type.";
                                    }
    
                                    leaf prefix {
                                      type string;
                                      description
                                        "Prefix";
                                    }
    
                                    leaf prefix-options {
                                      type string;
                                      mandatory
                                        true;
                                      description
                                        "Prefix options.";
                                    }
    
                                    leaf forwarding-address {
                                      type inet:ipv6-address;
                                      description
                                        "Forwarding address.";
                                    }
    
                                    leaf external-route-tag {
                                      type uint32;
                                      description
                                        "Route tag.";
                                    }
    
                                    leaf referenced-link-state-id {
                                      type uint32;
                                      description
                                        "Referenced Link State ID.";
                                    }
                                  }  // container nssa
    
                                  container link {
                                    when
                                      "../../header/type = 8" {
                                      description
                                        "Only apply to link LSA.";
                                    }
                                    description
                                      "Link LSA.";
                                    leaf rtr-priority {
                                      type uint8;
                                      description
                                        "Router Priority of the interface.";
                                    }
    
                                    leaf options {
                                      type bits {
                                        bit DC {
                                          position
                                            0;
                                          description
                                            "When set, the router support demand circuits.";
                                        }
                                        bit R {
                                          position
                                            1;
                                          description
                                            "When set, the originator is an active router.";
                                        }
                                        bit N {
                                          position
                                            2;
                                          description
                                            "If set, the router is attached to an NSSA";
                                        }
                                        bit E {
                                          position
                                            3;
                                          description
                                            "This bit describes the way AS-external-LSAs
    are flooded";
                                        }
                                        bit V6 {
                                          position
                                            4;
                                          description
                                            "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                        }
                                        bit AF {
                                          position
                                            5;
                                        }
                                      }
                                      mandatory
                                        true;
                                      description
                                        "OSPFv3 LSA options.";
                                    }
    
                                    leaf link-local-interface-address {
                                      type inet:ip-address;
                                      description
                                        "The originating router's link-local
    interface address on the link.";
                                    }
    
                                    leaf num-of-prefixes {
                                      type uint32;
                                      description
                                        "Number of prefixes.";
                                    }
    
                                    list prefix-list {
                                      key "prefix";
                                      description
                                        "List of prefixes associated with the link.";
                                      leaf prefix {
                                        type string;
                                        description
                                          "Prefix";
                                      }
    
                                      leaf prefix-options {
                                        type string;
                                        mandatory
                                          true;
                                        description
                                          "Prefix options.";
                                      }
                                    }  // list prefix-list
                                  }  // container link
    
                                  container intra-area-prefix {
                                    when
                                      "../../header/type = 8201" {
                                      description
                                        "Only apply to intra-area-prefix LSA.";
                                    }
                                    description
                                      "Intra-Area-Prefix LSA.";
                                    leaf referenced-ls-type {
                                      type uint16;
                                      description
                                        "Referenced Link State type.";
                                    }
    
                                    leaf referenced-link-state-id {
                                      type uint32;
                                      description
                                        "Referenced Link State ID.";
                                    }
    
                                    leaf referenced-adv-router {
                                      type inet:ipv4-address;
                                      description
                                        "Referenced Advertising Router.";
                                    }
    
                                    leaf num-of-prefixes {
                                      type uint16;
                                      description
                                        "Number of prefixes.";
                                    }
    
                                    list prefix-list {
                                      key "prefix";
                                      description
                                        "List of prefixes associated with the link.";
                                      leaf prefix {
                                        type string;
                                        description
                                          "Prefix";
                                      }
    
                                      leaf prefix-options {
                                        type string;
                                        mandatory
                                          true;
                                        description
                                          "Prefix options.";
                                      }
    
                                      leaf metric {
                                        type uint24;
                                        description
                                          "Metric";
                                      }
                                    }  // list prefix-list
                                  }  // container intra-area-prefix
                                }  // container body
                              }  // container ospfv3
                            }  // choice version
                          }  // list link-scope-lsa
                        }  // list link-scope-lsas
    
                        list topology {
                          key "name";
                          description
                            "OSPF interface topology.";
                          leaf name {
                            type rib-ref;
                            description
                              "One of the topology enabled on this interface";
                          }
                        }  // list topology
                      }  // list interfaces
    
                      list area-scope-lsas {
                        key "lsa-type";
                        description
                          "List OSPF area scope LSA databases";
                        leaf lsa-type {
                          type uint8;
                          description
                            "OSPF area scope LSA type.";
                        }
    
                        list area-scope-lsa {
                          key "lsa-id adv-router";
                          description
                            "List of OSPF area scope LSAs";
                          leaf lsa-id {
                            type union {
                              type inet:ipv4-address;
                              type uint32;
                            }
                            description
                              "LSA ID.";
                          }
    
                          leaf adv-router {
                            type inet:ipv4-address;
                            description
                              "Advertising router.";
                          }
    
                          leaf decoded-completed {
                            type boolean;
                            description
                              "The OSPF LSA body is fully decoded.";
                          }
    
                          leaf raw-data {
                            type yang:hex-string;
                            description
                              "The complete LSA in network byte
    order as received/sent over the wire.";
                          }
    
                          choice version {
                            description
                              "OSPFv2 or OSPFv3 LSA body.";
                            container ospfv2 {
                              must
                                "../../../../../../rt:type = 'ospfv2'" {
                                description
                                  "OSPFv2 LSA";
                              }
                              description
                                "OSPFv2 LSA";
                              container header {
                                description
                                  "Decoded OSPFv2 LSA header data.";
                                leaf options {
                                  type bits {
                                    bit DC {
                                      position
                                        0;
                                      description
                                        "When set, the router support demand circuits.";
                                    }
                                    bit P {
                                      position
                                        1;
                                      description
                                        "Only used in type-7 LSA. When set, the NSSA
    border router should translate the type-7 LSA
    to type-5 LSA.";
                                    }
                                    bit MC {
                                      position
                                        2;
                                      description
                                        "When set, the router support MOSPF.";
                                    }
                                    bit E {
                                      position
                                        3;
                                      description
                                        "This bit describes the way AS-external-LSAs
    are flooded";
                                    }
                                    bit Upward {
                                      position
                                        4;
                                    }
                                    bit MT {
                                      position
                                        5;
                                    }
                                    bit R {
                                      position
                                        6;
                                    }
                                    bit AF {
                                      position
                                        7;
                                    }
                                  }
                                  mandatory
                                    true;
                                  description
                                    "LSA option.";
                                }
    
                                leaf lsa-id {
                                  type inet:ipv4-address;
                                  mandatory
                                    true;
                                  description
                                    "LSA ID.";
                                }
    
                                leaf opaque-type {
                                  when
                                    "../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11" {
                                    description
                                      "Only apply to opaque LSA.";
                                  }
                                  type uint8;
                                  mandatory
                                    true;
                                  description
                                    "Opaque type.";
                                }
    
                                leaf opaque-id {
                                  when
                                    "../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11" {
                                    description
                                      "Only apply to opaque LSA.";
                                  }
                                  type uint24;
                                  mandatory
                                    true;
                                  description
                                    "Opaque id.";
                                }
    
                                leaf age {
                                  type uint16;
                                  mandatory
                                    true;
                                  description
                                    "LSA age.";
                                }
    
                                leaf type {
                                  type uint16;
                                  mandatory
                                    true;
                                  description
                                    "LSA type.";
                                }
    
                                leaf adv-router {
                                  type yang:dotted-quad;
                                  mandatory
                                    true;
                                  description
                                    "LSA advertising router.";
                                }
    
                                leaf seq-num {
                                  type string;
                                  mandatory
                                    true;
                                  description
                                    "LSA sequence number.";
                                }
    
                                leaf checksum {
                                  type string;
                                  mandatory
                                    true;
                                  description
                                    "LSA checksum.";
                                }
    
                                leaf length {
                                  type uint16;
                                  mandatory
                                    true;
                                  description
                                    "LSA length.";
                                }
                              }  // container header
    
                              container body {
                                description
                                  "Decoded OSPFv2 LSA body data.";
                                container router {
                                  when
                                    "../../header/type = 1" {
                                    description
                                      "Only apply to Router-LSA.";
                                  }
                                  description
                                    "Router LSA.";
                                  leaf flags {
                                    type bits {
                                      bit V {
                                        position
                                          0;
                                        description
                                          "When set, the router is an endpoint of one or
    more virtual links.";
                                      }
                                      bit E {
                                        position
                                          1;
                                        description
                                          "When set, the router is an AS Boundary Router
    (ASBR).";
                                      }
                                      bit B {
                                        position
                                          2;
                                        description
                                          "When set, the router is an Area Border
    Router (ABR).";
                                      }
                                    }
                                    description
                                      "Flags";
                                  }
    
                                  leaf num-of-links {
                                    type uint16;
                                    description
                                      "Number of links.";
                                  }
    
                                  list link {
                                    key "link-id link-data";
                                    description
                                      "Router LSA link.";
                                    leaf link-id {
                                      type union {
                                        type inet:ipv4-address;
                                        type yang:dotted-quad;
                                      }
                                      description
                                        "Link ID";
                                    }
    
                                    leaf link-data {
                                      type union {
                                        type inet:ipv4-address;
                                        type uint32;
                                      }
                                      description
                                        "Link data.";
                                    }
    
                                    leaf type {
                                      type uint8;
                                      description
                                        "Link type.";
                                    }
    
                                    list topology {
                                      key "mt-id";
                                      description
                                        "Topology specific information.";
                                      leaf mt-id {
                                        type uint8;
                                        description
                                          "The MT-ID for topology enabled on the link.";
                                      }
    
                                      leaf metric {
                                        type uint16;
                                        description
                                          "Metric for the topology.";
                                      }
                                    }  // list topology
                                  }  // list link
                                }  // container router
    
                                container network {
                                  when
                                    "../../header/type = 2" {
                                    description
                                      "Only apply to network LSA.";
                                  }
                                  description
                                    "Network LSA.";
                                  leaf network-mask {
                                    type inet:ipv4-address;
                                    description
                                      "The IP address mask for the network";
                                  }
    
                                  leaf-list attached-router {
                                    type yang:dotted-quad;
                                    description
                                      "List of the routers attached to the network.";
                                  }
                                }  // container network
    
                                container summary {
                                  when
                                    "../../header/type = 3 or ../../header/type = 4" {
                                    description
                                      "Only apply to Summary-LSA.";
                                  }
                                  description
                                    "Summary LSA.";
                                  leaf network-mask {
                                    type inet:ipv4-address;
                                    description
                                      "The IP address mask for the network";
                                  }
    
                                  list topology {
                                    key "mt-id";
                                    description
                                      "Topology specific information.";
                                    leaf mt-id {
                                      type uint8;
                                      description
                                        "The MT-ID for topology enabled on the link.";
                                    }
    
                                    leaf metric {
                                      type uint24;
                                      description
                                        "Metric for the topology.";
                                    }
                                  }  // list topology
                                }  // container summary
    
                                container external {
                                  when
                                    "../../header/type = 5 or ../../header/type = 7" {
                                    description
                                      "Only apply to AS-external-LSA and NSSA-LSA.";
                                  }
                                  description
                                    "External LSA.";
                                  leaf network-mask {
                                    type inet:ipv4-address;
                                    description
                                      "The IP address mask for the network";
                                  }
    
                                  list topology {
                                    key "mt-id";
                                    description
                                      "Topology specific information.";
                                    leaf mt-id {
                                      type uint8;
                                      description
                                        "The MT-ID for topology enabled on the link.";
                                    }
    
                                    leaf flags {
                                      type bits {
                                        bit E {
                                          position
                                            0;
                                          description
                                            "When set, the metric specified is a Type 2
    external metric.";
                                        }
                                      }
                                      description
                                        "Flags.";
                                    }
    
                                    leaf metric {
                                      type uint24;
                                      description
                                        "Metric for the topology.";
                                    }
    
                                    leaf forwarding-address {
                                      type inet:ipv4-address;
                                      description
                                        "Forwarding address.";
                                    }
    
                                    leaf external-route-tag {
                                      type uint32;
                                      description
                                        "Route tag.";
                                    }
                                  }  // list topology
                                }  // container external
    
                                container opaque {
                                  when
                                    "../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11" {
                                    description
                                      "Only apply to opaque LSA.";
                                  }
                                  description
                                    "Opaque LSA.";
                                  list unknown-tlv {
                                    key "type";
                                    description
                                      "Unknown TLV.";
                                    leaf type {
                                      type uint16;
                                      description
                                        "TLV type.";
                                    }
    
                                    leaf length {
                                      type uint16;
                                      description
                                        "TLV length.";
                                    }
    
                                    leaf value {
                                      type yang:hex-string;
                                      description
                                        "TLV value.";
                                    }
                                  }  // list unknown-tlv
    
                                  container router-address-tlv {
                                    description
                                      "Router address TLV.";
                                    leaf router-address {
                                      type inet:ipv4-address;
                                      description
                                        "Router address.";
                                    }
                                  }  // container router-address-tlv
    
                                  container link-tlv {
                                    description
                                      "Link TLV.";
                                    leaf link-type {
                                      type uint8;
                                      mandatory
                                        true;
                                      description
                                        "Link type.";
                                    }
    
                                    leaf link-id {
                                      type union {
                                        type inet:ipv4-address;
                                        type yang:dotted-quad;
                                      }
                                      mandatory
                                        true;
                                      description
                                        "Link ID.";
                                    }
    
                                    leaf-list local-if-ipv4-addr {
                                      type inet:ipv4-address;
                                      description
                                        "List of local interface IPv4 addresses.";
                                    }
    
                                    leaf-list local-remote-ipv4-addr {
                                      type inet:ipv4-address;
                                      description
                                        "List of remote interface IPv4 addresses.";
                                    }
    
                                    leaf te-metric {
                                      type uint32;
                                      description
                                        "TE metric.";
                                    }
    
                                    leaf max-bandwidth {
                                      type decimal64 {
                                        fraction-digits
                                          2;
                                      }
                                      description
                                        "Maximum bandwidth.";
                                    }
    
                                    leaf max-reservable-bandwidth {
                                      type decimal64 {
                                        fraction-digits
                                          2;
                                      }
                                      description
                                        "Maximum reservable bandwidth.";
                                    }
    
                                    leaf unreserved-bandwidth {
                                      type decimal64 {
                                        fraction-digits
                                          2;
                                      }
                                      description
                                        "Unreserved bandwidth.";
                                    }
    
                                    leaf admin-group {
                                      type uint32;
                                      description
                                        "Administrative group/Resource class/Color.";
                                    }
    
                                    list unknown-subtlv {
                                      key "type";
                                      description
                                        "Unknown sub-TLV.";
                                      leaf type {
                                        type uint16;
                                        description
                                          "TLV type.";
                                      }
    
                                      leaf length {
                                        type uint16;
                                        description
                                          "TLV length.";
                                      }
    
                                      leaf value {
                                        type yang:hex-string;
                                        description
                                          "TLV value.";
                                      }
                                    }  // list unknown-subtlv
                                  }  // container link-tlv
                                }  // container opaque
                              }  // container body
                            }  // container ospfv2
                            container ospfv3 {
                              must
                                "../../../../../../rt:type = 'ospfv3'" {
                                description
                                  "OSPFv3 LSA";
                              }
                              description
                                "OSPFv3 LSA";
                              container header {
                                description
                                  "Decoded OSPFv3 LSA header data.";
                                leaf lsa-id {
                                  type uint32;
                                  mandatory
                                    true;
                                  description
                                    "LSA ID.";
                                }
    
                                leaf age {
                                  type uint16;
                                  mandatory
                                    true;
                                  description
                                    "LSA age.";
                                }
    
                                leaf type {
                                  type uint16;
                                  mandatory
                                    true;
                                  description
                                    "LSA type.";
                                }
    
                                leaf adv-router {
                                  type yang:dotted-quad;
                                  mandatory
                                    true;
                                  description
                                    "LSA advertising router.";
                                }
    
                                leaf seq-num {
                                  type string;
                                  mandatory
                                    true;
                                  description
                                    "LSA sequence number.";
                                }
    
                                leaf checksum {
                                  type string;
                                  mandatory
                                    true;
                                  description
                                    "LSA checksum.";
                                }
    
                                leaf length {
                                  type uint16;
                                  mandatory
                                    true;
                                  description
                                    "LSA length.";
                                }
    
                                leaf options {
                                  type bits {
                                    bit DC {
                                      position
                                        0;
                                      description
                                        "When set, the router support demand circuits.";
                                    }
                                    bit R {
                                      position
                                        1;
                                      description
                                        "When set, the originator is an active router.";
                                    }
                                    bit N {
                                      position
                                        2;
                                      description
                                        "If set, the router is attached to an NSSA";
                                    }
                                    bit E {
                                      position
                                        3;
                                      description
                                        "This bit describes the way AS-external-LSAs
    are flooded";
                                    }
                                    bit V6 {
                                      position
                                        4;
                                      description
                                        "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                    }
                                    bit AF {
                                      position
                                        5;
                                    }
                                  }
                                  mandatory
                                    true;
                                  description
                                    "OSPFv3 LSA options.";
                                }
                              }  // container header
    
                              container body {
                                description
                                  "Decoded OSPF LSA body data.";
                                container router {
                                  when
                                    "../../header/type = 8193" {
                                    description
                                      "Only apply to Router-LSA.";
                                  }
                                  description
                                    "Router LSA.";
                                  leaf flags {
                                    type bits {
                                      bit V {
                                        position
                                          0;
                                        description
                                          "When set, the router is an endpoint of one or
    more virtual links.";
                                      }
                                      bit E {
                                        position
                                          1;
                                        description
                                          "When set, the router is an AS Boundary Router
    (ASBR).";
                                      }
                                      bit B {
                                        position
                                          2;
                                        description
                                          "When set, the router is an Area Border
    Router (ABR).";
                                      }
                                      bit Nt {
                                        position
                                          3;
                                        description
                                          "When set, the router is an NSSA border router
    that is unconditionally translating NSSA-LSAs
    into AS-external-LSAs.";
                                      }
                                    }
                                    mandatory
                                      true;
                                    description
                                      "LSA option.";
                                  }
    
                                  leaf options {
                                    type bits {
                                      bit DC {
                                        position
                                          0;
                                        description
                                          "When set, the router support demand circuits.";
                                      }
                                      bit R {
                                        position
                                          1;
                                        description
                                          "When set, the originator is an active router.";
                                      }
                                      bit N {
                                        position
                                          2;
                                        description
                                          "If set, the router is attached to an NSSA";
                                      }
                                      bit E {
                                        position
                                          3;
                                        description
                                          "This bit describes the way AS-external-LSAs
    are flooded";
                                      }
                                      bit V6 {
                                        position
                                          4;
                                        description
                                          "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                      }
                                      bit AF {
                                        position
                                          5;
                                      }
                                    }
                                    mandatory
                                      true;
                                    description
                                      "OSPFv3 LSA options.";
                                  }
    
                                  list link {
                                    key "interface-id neighbor-interface-id neighbor-router-id";
                                    description
                                      "Router LSA link.";
                                    leaf interface-id {
                                      type uint32;
                                      description
                                        "Interface ID.";
                                    }
    
                                    leaf neighbor-interface-id {
                                      type uint32;
                                      description
                                        "Neighbor Interface ID.";
                                    }
    
                                    leaf neighbor-router-id {
                                      type yang:dotted-quad;
                                      description
                                        "Neighbor Router ID";
                                    }
    
                                    leaf type {
                                      type uint8;
                                      description
                                        "Link type.";
                                    }
    
                                    leaf metric {
                                      type uint16;
                                      description
                                        "Metric.";
                                    }
                                  }  // list link
                                }  // container router
    
                                container network {
                                  when
                                    "../../header/type = 8194" {
                                    description
                                      "Only apply to network LSA.";
                                  }
                                  description
                                    "Network LSA.";
                                  leaf options {
                                    type bits {
                                      bit DC {
                                        position
                                          0;
                                        description
                                          "When set, the router support demand circuits.";
                                      }
                                      bit R {
                                        position
                                          1;
                                        description
                                          "When set, the originator is an active router.";
                                      }
                                      bit N {
                                        position
                                          2;
                                        description
                                          "If set, the router is attached to an NSSA";
                                      }
                                      bit E {
                                        position
                                          3;
                                        description
                                          "This bit describes the way AS-external-LSAs
    are flooded";
                                      }
                                      bit V6 {
                                        position
                                          4;
                                        description
                                          "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                      }
                                      bit AF {
                                        position
                                          5;
                                      }
                                    }
                                    mandatory
                                      true;
                                    description
                                      "OSPFv3 LSA options.";
                                  }
    
                                  leaf-list attached-router {
                                    type yang:dotted-quad;
                                    description
                                      "List of the routers attached to the network.";
                                  }
                                }  // container network
    
                                container inter-area-prefix {
                                  when
                                    "../../header/type = 8195" {
                                    description
                                      "Only apply to inter-area-prefix LSA.";
                                  }
                                  description
                                    "Inter-Area-Prefix LSA.";
                                  leaf metric {
                                    type uint24;
                                    description
                                      "Metric";
                                  }
    
                                  leaf prefix {
                                    type string;
                                    description
                                      "Prefix";
                                  }
    
                                  leaf prefix-options {
                                    type string;
                                    mandatory
                                      true;
                                    description
                                      "Prefix options.";
                                  }
                                }  // container inter-area-prefix
    
                                container inter-area-router {
                                  when
                                    "../../header/type = 8196" {
                                    description
                                      "Only apply to inter-area-router LSA.";
                                  }
                                  description
                                    "Inter-Area-Router LSA.";
                                  leaf options {
                                    type bits {
                                      bit DC {
                                        position
                                          0;
                                        description
                                          "When set, the router support demand circuits.";
                                      }
                                      bit R {
                                        position
                                          1;
                                        description
                                          "When set, the originator is an active router.";
                                      }
                                      bit N {
                                        position
                                          2;
                                        description
                                          "If set, the router is attached to an NSSA";
                                      }
                                      bit E {
                                        position
                                          3;
                                        description
                                          "This bit describes the way AS-external-LSAs
    are flooded";
                                      }
                                      bit V6 {
                                        position
                                          4;
                                        description
                                          "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                      }
                                      bit AF {
                                        position
                                          5;
                                      }
                                    }
                                    mandatory
                                      true;
                                    description
                                      "OSPFv3 LSA options.";
                                  }
    
                                  leaf metric {
                                    type uint24;
                                    description
                                      "Metric";
                                  }
    
                                  leaf destination-router-id {
                                    type yang:dotted-quad;
                                    description
                                      "The Router ID of the router being described by the LSA.";
                                  }
                                }  // container inter-area-router
    
                                container as-external {
                                  when
                                    "../../header/type = 16389" {
                                    description
                                      "Only apply to as-external LSA.";
                                  }
                                  description
                                    "AS-External LSA.";
                                  leaf metric {
                                    type uint24;
                                    description
                                      "Metric";
                                  }
    
                                  leaf flags {
                                    type bits {
                                      bit E {
                                        position
                                          0;
                                        description
                                          "When set, the metric specified is a Type 2
    external metric.";
                                      }
                                    }
                                    description
                                      "Flags.";
                                  }
    
                                  leaf referenced-ls-type {
                                    type uint16;
                                    description
                                      "Referenced Link State type.";
                                  }
    
                                  leaf prefix {
                                    type string;
                                    description
                                      "Prefix";
                                  }
    
                                  leaf prefix-options {
                                    type string;
                                    mandatory
                                      true;
                                    description
                                      "Prefix options.";
                                  }
    
                                  leaf forwarding-address {
                                    type inet:ipv6-address;
                                    description
                                      "Forwarding address.";
                                  }
    
                                  leaf external-route-tag {
                                    type uint32;
                                    description
                                      "Route tag.";
                                  }
    
                                  leaf referenced-link-state-id {
                                    type uint32;
                                    description
                                      "Referenced Link State ID.";
                                  }
                                }  // container as-external
    
                                container nssa {
                                  when
                                    "../../header/type = 8199" {
                                    description
                                      "Only apply to nssa LSA.";
                                  }
                                  description
                                    "NSSA LSA.";
                                  leaf metric {
                                    type uint24;
                                    description
                                      "Metric";
                                  }
    
                                  leaf flags {
                                    type bits {
                                      bit E {
                                        position
                                          0;
                                        description
                                          "When set, the metric specified is a Type 2
    external metric.";
                                      }
                                    }
                                    description
                                      "Flags.";
                                  }
    
                                  leaf referenced-ls-type {
                                    type uint16;
                                    description
                                      "Referenced Link State type.";
                                  }
    
                                  leaf prefix {
                                    type string;
                                    description
                                      "Prefix";
                                  }
    
                                  leaf prefix-options {
                                    type string;
                                    mandatory
                                      true;
                                    description
                                      "Prefix options.";
                                  }
    
                                  leaf forwarding-address {
                                    type inet:ipv6-address;
                                    description
                                      "Forwarding address.";
                                  }
    
                                  leaf external-route-tag {
                                    type uint32;
                                    description
                                      "Route tag.";
                                  }
    
                                  leaf referenced-link-state-id {
                                    type uint32;
                                    description
                                      "Referenced Link State ID.";
                                  }
                                }  // container nssa
    
                                container link {
                                  when
                                    "../../header/type = 8" {
                                    description
                                      "Only apply to link LSA.";
                                  }
                                  description
                                    "Link LSA.";
                                  leaf rtr-priority {
                                    type uint8;
                                    description
                                      "Router Priority of the interface.";
                                  }
    
                                  leaf options {
                                    type bits {
                                      bit DC {
                                        position
                                          0;
                                        description
                                          "When set, the router support demand circuits.";
                                      }
                                      bit R {
                                        position
                                          1;
                                        description
                                          "When set, the originator is an active router.";
                                      }
                                      bit N {
                                        position
                                          2;
                                        description
                                          "If set, the router is attached to an NSSA";
                                      }
                                      bit E {
                                        position
                                          3;
                                        description
                                          "This bit describes the way AS-external-LSAs
    are flooded";
                                      }
                                      bit V6 {
                                        position
                                          4;
                                        description
                                          "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                      }
                                      bit AF {
                                        position
                                          5;
                                      }
                                    }
                                    mandatory
                                      true;
                                    description
                                      "OSPFv3 LSA options.";
                                  }
    
                                  leaf link-local-interface-address {
                                    type inet:ip-address;
                                    description
                                      "The originating router's link-local
    interface address on the link.";
                                  }
    
                                  leaf num-of-prefixes {
                                    type uint32;
                                    description
                                      "Number of prefixes.";
                                  }
    
                                  list prefix-list {
                                    key "prefix";
                                    description
                                      "List of prefixes associated with the link.";
                                    leaf prefix {
                                      type string;
                                      description
                                        "Prefix";
                                    }
    
                                    leaf prefix-options {
                                      type string;
                                      mandatory
                                        true;
                                      description
                                        "Prefix options.";
                                    }
                                  }  // list prefix-list
                                }  // container link
    
                                container intra-area-prefix {
                                  when
                                    "../../header/type = 8201" {
                                    description
                                      "Only apply to intra-area-prefix LSA.";
                                  }
                                  description
                                    "Intra-Area-Prefix LSA.";
                                  leaf referenced-ls-type {
                                    type uint16;
                                    description
                                      "Referenced Link State type.";
                                  }
    
                                  leaf referenced-link-state-id {
                                    type uint32;
                                    description
                                      "Referenced Link State ID.";
                                  }
    
                                  leaf referenced-adv-router {
                                    type inet:ipv4-address;
                                    description
                                      "Referenced Advertising Router.";
                                  }
    
                                  leaf num-of-prefixes {
                                    type uint16;
                                    description
                                      "Number of prefixes.";
                                  }
    
                                  list prefix-list {
                                    key "prefix";
                                    description
                                      "List of prefixes associated with the link.";
                                    leaf prefix {
                                      type string;
                                      description
                                        "Prefix";
                                    }
    
                                    leaf prefix-options {
                                      type string;
                                      mandatory
                                        true;
                                      description
                                        "Prefix options.";
                                    }
    
                                    leaf metric {
                                      type uint24;
                                      description
                                        "Metric";
                                    }
                                  }  // list prefix-list
                                }  // container intra-area-prefix
                              }  // container body
                            }  // container ospfv3
                          }  // choice version
                        }  // list area-scope-lsa
                      }  // list area-scope-lsas
                    }  // list area
    
                    list as-scope-lsas {
                      key "lsa-type";
                      description
                        "List OSPF AS scope LSA databases";
                      leaf lsa-type {
                        type uint8;
                        description
                          "OSPF AS scope LSA type.";
                      }
    
                      list as-scope-lsa {
                        key "lsa-id adv-router";
                        description
                          "List of OSPF AS scope LSAs";
                        leaf lsa-id {
                          type union {
                            type inet:ipv4-address;
                            type uint32;
                          }
                          description "LSA ID.";
                        }
    
                        leaf adv-router {
                          type inet:ipv4-address;
                          description
                            "Advertising router.";
                        }
    
                        leaf decoded-completed {
                          type boolean;
                          description
                            "The OSPF LSA body is fully decoded.";
                        }
    
                        leaf raw-data {
                          type yang:hex-string;
                          description
                            "The complete LSA in network byte
    order as received/sent over the wire.";
                        }
    
                        choice version {
                          description
                            "OSPFv2 or OSPFv3 LSA body.";
                          container ospfv2 {
                            must
                              "../../../../../rt:type = 'ospfv2'" {
                              description
                                "OSPFv2 LSA";
                            }
                            description
                              "OSPFv2 LSA";
                            container header {
                              description
                                "Decoded OSPFv2 LSA header data.";
                              leaf options {
                                type bits {
                                  bit DC {
                                    position 0;
                                    description
                                      "When set, the router support demand circuits.";
                                  }
                                  bit P {
                                    position 1;
                                    description
                                      "Only used in type-7 LSA. When set, the NSSA
    border router should translate the type-7 LSA
    to type-5 LSA.";
                                  }
                                  bit MC {
                                    position 2;
                                    description
                                      "When set, the router support MOSPF.";
                                  }
                                  bit E {
                                    position 3;
                                    description
                                      "This bit describes the way AS-external-LSAs
    are flooded";
                                  }
                                  bit Upward {
                                    position 4;
                                  }
                                  bit MT {
                                    position 5;
                                  }
                                  bit R {
                                    position 6;
                                  }
                                  bit AF {
                                    position 7;
                                  }
                                }
                                mandatory true;
                                description
                                  "LSA option.";
                              }
    
                              leaf lsa-id {
                                type inet:ipv4-address;
                                mandatory true;
                                description
                                  "LSA ID.";
                              }
    
                              leaf opaque-type {
                                when
                                  "../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11" {
                                  description
                                    "Only apply to opaque LSA.";
                                }
                                type uint8;
                                mandatory true;
                                description
                                  "Opaque type.";
                              }
    
                              leaf opaque-id {
                                when
                                  "../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11" {
                                  description
                                    "Only apply to opaque LSA.";
                                }
                                type uint24;
                                mandatory true;
                                description
                                  "Opaque id.";
                              }
    
                              leaf age {
                                type uint16;
                                mandatory true;
                                description
                                  "LSA age.";
                              }
    
                              leaf type {
                                type uint16;
                                mandatory true;
                                description
                                  "LSA type.";
                              }
    
                              leaf adv-router {
                                type yang:dotted-quad;
                                mandatory true;
                                description
                                  "LSA advertising router.";
                              }
    
                              leaf seq-num {
                                type string;
                                mandatory true;
                                description
                                  "LSA sequence number.";
                              }
    
                              leaf checksum {
                                type string;
                                mandatory true;
                                description
                                  "LSA checksum.";
                              }
    
                              leaf length {
                                type uint16;
                                mandatory true;
                                description
                                  "LSA length.";
                              }
                            }  // container header
    
                            container body {
                              description
                                "Decoded OSPFv2 LSA body data.";
                              container router {
                                when
                                  "../../header/type = 1" {
                                  description
                                    "Only apply to Router-LSA.";
                                }
                                description
                                  "Router LSA.";
                                leaf flags {
                                  type bits {
                                    bit V {
                                      position
                                        0;
                                      description
                                        "When set, the router is an endpoint of one or
    more virtual links.";
                                    }
                                    bit E {
                                      position
                                        1;
                                      description
                                        "When set, the router is an AS Boundary Router
    (ASBR).";
                                    }
                                    bit B {
                                      position
                                        2;
                                      description
                                        "When set, the router is an Area Border
    Router (ABR).";
                                    }
                                  }
                                  description
                                    "Flags";
                                }
    
                                leaf num-of-links {
                                  type uint16;
                                  description
                                    "Number of links.";
                                }
    
                                list link {
                                  key "link-id link-data";
                                  description
                                    "Router LSA link.";
                                  leaf link-id {
                                    type union {
                                      type inet:ipv4-address;
                                      type yang:dotted-quad;
                                    }
                                    description
                                      "Link ID";
                                  }
    
                                  leaf link-data {
                                    type union {
                                      type inet:ipv4-address;
                                      type uint32;
                                    }
                                    description
                                      "Link data.";
                                  }
    
                                  leaf type {
                                    type uint8;
                                    description
                                      "Link type.";
                                  }
    
                                  list topology {
                                    key "mt-id";
                                    description
                                      "Topology specific information.";
                                    leaf mt-id {
                                      type uint8;
                                      description
                                        "The MT-ID for topology enabled on the link.";
                                    }
    
                                    leaf metric {
                                      type uint16;
                                      description
                                        "Metric for the topology.";
                                    }
                                  }  // list topology
                                }  // list link
                              }  // container router
    
                              container network {
                                when
                                  "../../header/type = 2" {
                                  description
                                    "Only apply to network LSA.";
                                }
                                description
                                  "Network LSA.";
                                leaf network-mask {
                                  type inet:ipv4-address;
                                  description
                                    "The IP address mask for the network";
                                }
    
                                leaf-list attached-router {
                                  type yang:dotted-quad;
                                  description
                                    "List of the routers attached to the network.";
                                }
                              }  // container network
    
                              container summary {
                                when
                                  "../../header/type = 3 or ../../header/type = 4" {
                                  description
                                    "Only apply to Summary-LSA.";
                                }
                                description
                                  "Summary LSA.";
                                leaf network-mask {
                                  type inet:ipv4-address;
                                  description
                                    "The IP address mask for the network";
                                }
    
                                list topology {
                                  key "mt-id";
                                  description
                                    "Topology specific information.";
                                  leaf mt-id {
                                    type uint8;
                                    description
                                      "The MT-ID for topology enabled on the link.";
                                  }
    
                                  leaf metric {
                                    type uint24;
                                    description
                                      "Metric for the topology.";
                                  }
                                }  // list topology
                              }  // container summary
    
                              container external {
                                when
                                  "../../header/type = 5 or ../../header/type = 7" {
                                  description
                                    "Only apply to AS-external-LSA and NSSA-LSA.";
                                }
                                description
                                  "External LSA.";
                                leaf network-mask {
                                  type inet:ipv4-address;
                                  description
                                    "The IP address mask for the network";
                                }
    
                                list topology {
                                  key "mt-id";
                                  description
                                    "Topology specific information.";
                                  leaf mt-id {
                                    type uint8;
                                    description
                                      "The MT-ID for topology enabled on the link.";
                                  }
    
                                  leaf flags {
                                    type bits {
                                      bit E {
                                        position
                                          0;
                                        description
                                          "When set, the metric specified is a Type 2
    external metric.";
                                      }
                                    }
                                    description
                                      "Flags.";
                                  }
    
                                  leaf metric {
                                    type uint24;
                                    description
                                      "Metric for the topology.";
                                  }
    
                                  leaf forwarding-address {
                                    type inet:ipv4-address;
                                    description
                                      "Forwarding address.";
                                  }
    
                                  leaf external-route-tag {
                                    type uint32;
                                    description
                                      "Route tag.";
                                  }
                                }  // list topology
                              }  // container external
    
                              container opaque {
                                when
                                  "../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11" {
                                  description
                                    "Only apply to opaque LSA.";
                                }
                                description
                                  "Opaque LSA.";
                                list unknown-tlv {
                                  key "type";
                                  description
                                    "Unknown TLV.";
                                  leaf type {
                                    type uint16;
                                    description
                                      "TLV type.";
                                  }
    
                                  leaf length {
                                    type uint16;
                                    description
                                      "TLV length.";
                                  }
    
                                  leaf value {
                                    type yang:hex-string;
                                    description
                                      "TLV value.";
                                  }
                                }  // list unknown-tlv
    
                                container router-address-tlv {
                                  description
                                    "Router address TLV.";
                                  leaf router-address {
                                    type inet:ipv4-address;
                                    description
                                      "Router address.";
                                  }
                                }  // container router-address-tlv
    
                                container link-tlv {
                                  description
                                    "Link TLV.";
                                  leaf link-type {
                                    type uint8;
                                    mandatory
                                      true;
                                    description
                                      "Link type.";
                                  }
    
                                  leaf link-id {
                                    type union {
                                      type inet:ipv4-address;
                                      type yang:dotted-quad;
                                    }
                                    mandatory
                                      true;
                                    description
                                      "Link ID.";
                                  }
    
                                  leaf-list local-if-ipv4-addr {
                                    type inet:ipv4-address;
                                    description
                                      "List of local interface IPv4 addresses.";
                                  }
    
                                  leaf-list local-remote-ipv4-addr {
                                    type inet:ipv4-address;
                                    description
                                      "List of remote interface IPv4 addresses.";
                                  }
    
                                  leaf te-metric {
                                    type uint32;
                                    description
                                      "TE metric.";
                                  }
    
                                  leaf max-bandwidth {
                                    type decimal64 {
                                      fraction-digits
                                        2;
                                    }
                                    description
                                      "Maximum bandwidth.";
                                  }
    
                                  leaf max-reservable-bandwidth {
                                    type decimal64 {
                                      fraction-digits
                                        2;
                                    }
                                    description
                                      "Maximum reservable bandwidth.";
                                  }
    
                                  leaf unreserved-bandwidth {
                                    type decimal64 {
                                      fraction-digits
                                        2;
                                    }
                                    description
                                      "Unreserved bandwidth.";
                                  }
    
                                  leaf admin-group {
                                    type uint32;
                                    description
                                      "Administrative group/Resource class/Color.";
                                  }
    
                                  list unknown-subtlv {
                                    key "type";
                                    description
                                      "Unknown sub-TLV.";
                                    leaf type {
                                      type uint16;
                                      description
                                        "TLV type.";
                                    }
    
                                    leaf length {
                                      type uint16;
                                      description
                                        "TLV length.";
                                    }
    
                                    leaf value {
                                      type yang:hex-string;
                                      description
                                        "TLV value.";
                                    }
                                  }  // list unknown-subtlv
                                }  // container link-tlv
                              }  // container opaque
                            }  // container body
                          }  // container ospfv2
                          container ospfv3 {
                            must
                              "../../../../../rt:type = 'ospfv3'" {
                              description
                                "OSPFv3 LSA";
                            }
                            description
                              "OSPFv3 LSA";
                            container header {
                              description
                                "Decoded OSPFv3 LSA header data.";
                              leaf lsa-id {
                                type uint32;
                                mandatory true;
                                description
                                  "LSA ID.";
                              }
    
                              leaf age {
                                type uint16;
                                mandatory true;
                                description
                                  "LSA age.";
                              }
    
                              leaf type {
                                type uint16;
                                mandatory true;
                                description
                                  "LSA type.";
                              }
    
                              leaf adv-router {
                                type yang:dotted-quad;
                                mandatory true;
                                description
                                  "LSA advertising router.";
                              }
    
                              leaf seq-num {
                                type string;
                                mandatory true;
                                description
                                  "LSA sequence number.";
                              }
    
                              leaf checksum {
                                type string;
                                mandatory true;
                                description
                                  "LSA checksum.";
                              }
    
                              leaf length {
                                type uint16;
                                mandatory true;
                                description
                                  "LSA length.";
                              }
    
                              leaf options {
                                type bits {
                                  bit DC {
                                    position 0;
                                    description
                                      "When set, the router support demand circuits.";
                                  }
                                  bit R {
                                    position 1;
                                    description
                                      "When set, the originator is an active router.";
                                  }
                                  bit N {
                                    position 2;
                                    description
                                      "If set, the router is attached to an NSSA";
                                  }
                                  bit E {
                                    position 3;
                                    description
                                      "This bit describes the way AS-external-LSAs
    are flooded";
                                  }
                                  bit V6 {
                                    position 4;
                                    description
                                      "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                  }
                                  bit AF {
                                    position 5;
                                  }
                                }
                                mandatory true;
                                description
                                  "OSPFv3 LSA options.";
                              }
                            }  // container header
    
                            container body {
                              description
                                "Decoded OSPF LSA body data.";
                              container router {
                                when
                                  "../../header/type = 8193" {
                                  description
                                    "Only apply to Router-LSA.";
                                }
                                description
                                  "Router LSA.";
                                leaf flags {
                                  type bits {
                                    bit V {
                                      position
                                        0;
                                      description
                                        "When set, the router is an endpoint of one or
    more virtual links.";
                                    }
                                    bit E {
                                      position
                                        1;
                                      description
                                        "When set, the router is an AS Boundary Router
    (ASBR).";
                                    }
                                    bit B {
                                      position
                                        2;
                                      description
                                        "When set, the router is an Area Border
    Router (ABR).";
                                    }
                                    bit Nt {
                                      position
                                        3;
                                      description
                                        "When set, the router is an NSSA border router
    that is unconditionally translating NSSA-LSAs
    into AS-external-LSAs.";
                                    }
                                  }
                                  mandatory
                                    true;
                                  description
                                    "LSA option.";
                                }
    
                                leaf options {
                                  type bits {
                                    bit DC {
                                      position
                                        0;
                                      description
                                        "When set, the router support demand circuits.";
                                    }
                                    bit R {
                                      position
                                        1;
                                      description
                                        "When set, the originator is an active router.";
                                    }
                                    bit N {
                                      position
                                        2;
                                      description
                                        "If set, the router is attached to an NSSA";
                                    }
                                    bit E {
                                      position
                                        3;
                                      description
                                        "This bit describes the way AS-external-LSAs
    are flooded";
                                    }
                                    bit V6 {
                                      position
                                        4;
                                      description
                                        "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                    }
                                    bit AF {
                                      position
                                        5;
                                    }
                                  }
                                  mandatory
                                    true;
                                  description
                                    "OSPFv3 LSA options.";
                                }
    
                                list link {
                                  key "interface-id neighbor-interface-id neighbor-router-id";
                                  description
                                    "Router LSA link.";
                                  leaf interface-id {
                                    type uint32;
                                    description
                                      "Interface ID.";
                                  }
    
                                  leaf neighbor-interface-id {
                                    type uint32;
                                    description
                                      "Neighbor Interface ID.";
                                  }
    
                                  leaf neighbor-router-id {
                                    type yang:dotted-quad;
                                    description
                                      "Neighbor Router ID";
                                  }
    
                                  leaf type {
                                    type uint8;
                                    description
                                      "Link type.";
                                  }
    
                                  leaf metric {
                                    type uint16;
                                    description
                                      "Metric.";
                                  }
                                }  // list link
                              }  // container router
    
                              container network {
                                when
                                  "../../header/type = 8194" {
                                  description
                                    "Only apply to network LSA.";
                                }
                                description
                                  "Network LSA.";
                                leaf options {
                                  type bits {
                                    bit DC {
                                      position
                                        0;
                                      description
                                        "When set, the router support demand circuits.";
                                    }
                                    bit R {
                                      position
                                        1;
                                      description
                                        "When set, the originator is an active router.";
                                    }
                                    bit N {
                                      position
                                        2;
                                      description
                                        "If set, the router is attached to an NSSA";
                                    }
                                    bit E {
                                      position
                                        3;
                                      description
                                        "This bit describes the way AS-external-LSAs
    are flooded";
                                    }
                                    bit V6 {
                                      position
                                        4;
                                      description
                                        "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                    }
                                    bit AF {
                                      position
                                        5;
                                    }
                                  }
                                  mandatory
                                    true;
                                  description
                                    "OSPFv3 LSA options.";
                                }
    
                                leaf-list attached-router {
                                  type yang:dotted-quad;
                                  description
                                    "List of the routers attached to the network.";
                                }
                              }  // container network
    
                              container inter-area-prefix {
                                when
                                  "../../header/type = 8195" {
                                  description
                                    "Only apply to inter-area-prefix LSA.";
                                }
                                description
                                  "Inter-Area-Prefix LSA.";
                                leaf metric {
                                  type uint24;
                                  description
                                    "Metric";
                                }
    
                                leaf prefix {
                                  type string;
                                  description
                                    "Prefix";
                                }
    
                                leaf prefix-options {
                                  type string;
                                  mandatory
                                    true;
                                  description
                                    "Prefix options.";
                                }
                              }  // container inter-area-prefix
    
                              container inter-area-router {
                                when
                                  "../../header/type = 8196" {
                                  description
                                    "Only apply to inter-area-router LSA.";
                                }
                                description
                                  "Inter-Area-Router LSA.";
                                leaf options {
                                  type bits {
                                    bit DC {
                                      position
                                        0;
                                      description
                                        "When set, the router support demand circuits.";
                                    }
                                    bit R {
                                      position
                                        1;
                                      description
                                        "When set, the originator is an active router.";
                                    }
                                    bit N {
                                      position
                                        2;
                                      description
                                        "If set, the router is attached to an NSSA";
                                    }
                                    bit E {
                                      position
                                        3;
                                      description
                                        "This bit describes the way AS-external-LSAs
    are flooded";
                                    }
                                    bit V6 {
                                      position
                                        4;
                                      description
                                        "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                    }
                                    bit AF {
                                      position
                                        5;
                                    }
                                  }
                                  mandatory
                                    true;
                                  description
                                    "OSPFv3 LSA options.";
                                }
    
                                leaf metric {
                                  type uint24;
                                  description
                                    "Metric";
                                }
    
                                leaf destination-router-id {
                                  type yang:dotted-quad;
                                  description
                                    "The Router ID of the router being described by the LSA.";
                                }
                              }  // container inter-area-router
    
                              container as-external {
                                when
                                  "../../header/type = 16389" {
                                  description
                                    "Only apply to as-external LSA.";
                                }
                                description
                                  "AS-External LSA.";
                                leaf metric {
                                  type uint24;
                                  description
                                    "Metric";
                                }
    
                                leaf flags {
                                  type bits {
                                    bit E {
                                      position
                                        0;
                                      description
                                        "When set, the metric specified is a Type 2
    external metric.";
                                    }
                                  }
                                  description
                                    "Flags.";
                                }
    
                                leaf referenced-ls-type {
                                  type uint16;
                                  description
                                    "Referenced Link State type.";
                                }
    
                                leaf prefix {
                                  type string;
                                  description
                                    "Prefix";
                                }
    
                                leaf prefix-options {
                                  type string;
                                  mandatory
                                    true;
                                  description
                                    "Prefix options.";
                                }
    
                                leaf forwarding-address {
                                  type inet:ipv6-address;
                                  description
                                    "Forwarding address.";
                                }
    
                                leaf external-route-tag {
                                  type uint32;
                                  description
                                    "Route tag.";
                                }
    
                                leaf referenced-link-state-id {
                                  type uint32;
                                  description
                                    "Referenced Link State ID.";
                                }
                              }  // container as-external
    
                              container nssa {
                                when
                                  "../../header/type = 8199" {
                                  description
                                    "Only apply to nssa LSA.";
                                }
                                description
                                  "NSSA LSA.";
                                leaf metric {
                                  type uint24;
                                  description
                                    "Metric";
                                }
    
                                leaf flags {
                                  type bits {
                                    bit E {
                                      position
                                        0;
                                      description
                                        "When set, the metric specified is a Type 2
    external metric.";
                                    }
                                  }
                                  description
                                    "Flags.";
                                }
    
                                leaf referenced-ls-type {
                                  type uint16;
                                  description
                                    "Referenced Link State type.";
                                }
    
                                leaf prefix {
                                  type string;
                                  description
                                    "Prefix";
                                }
    
                                leaf prefix-options {
                                  type string;
                                  mandatory
                                    true;
                                  description
                                    "Prefix options.";
                                }
    
                                leaf forwarding-address {
                                  type inet:ipv6-address;
                                  description
                                    "Forwarding address.";
                                }
    
                                leaf external-route-tag {
                                  type uint32;
                                  description
                                    "Route tag.";
                                }
    
                                leaf referenced-link-state-id {
                                  type uint32;
                                  description
                                    "Referenced Link State ID.";
                                }
                              }  // container nssa
    
                              container link {
                                when
                                  "../../header/type = 8" {
                                  description
                                    "Only apply to link LSA.";
                                }
                                description
                                  "Link LSA.";
                                leaf rtr-priority {
                                  type uint8;
                                  description
                                    "Router Priority of the interface.";
                                }
    
                                leaf options {
                                  type bits {
                                    bit DC {
                                      position
                                        0;
                                      description
                                        "When set, the router support demand circuits.";
                                    }
                                    bit R {
                                      position
                                        1;
                                      description
                                        "When set, the originator is an active router.";
                                    }
                                    bit N {
                                      position
                                        2;
                                      description
                                        "If set, the router is attached to an NSSA";
                                    }
                                    bit E {
                                      position
                                        3;
                                      description
                                        "This bit describes the way AS-external-LSAs
    are flooded";
                                    }
                                    bit V6 {
                                      position
                                        4;
                                      description
                                        "If clear, the router/link should be excluded
    from IPv6 routing calculaton";
                                    }
                                    bit AF {
                                      position
                                        5;
                                    }
                                  }
                                  mandatory
                                    true;
                                  description
                                    "OSPFv3 LSA options.";
                                }
    
                                leaf link-local-interface-address {
                                  type inet:ip-address;
                                  description
                                    "The originating router's link-local
    interface address on the link.";
                                }
    
                                leaf num-of-prefixes {
                                  type uint32;
                                  description
                                    "Number of prefixes.";
                                }
    
                                list prefix-list {
                                  key "prefix";
                                  description
                                    "List of prefixes associated with the link.";
                                  leaf prefix {
                                    type string;
                                    description
                                      "Prefix";
                                  }
    
                                  leaf prefix-options {
                                    type string;
                                    mandatory
                                      true;
                                    description
                                      "Prefix options.";
                                  }
                                }  // list prefix-list
                              }  // container link
    
                              container intra-area-prefix {
                                when
                                  "../../header/type = 8201" {
                                  description
                                    "Only apply to intra-area-prefix LSA.";
                                }
                                description
                                  "Intra-Area-Prefix LSA.";
                                leaf referenced-ls-type {
                                  type uint16;
                                  description
                                    "Referenced Link State type.";
                                }
    
                                leaf referenced-link-state-id {
                                  type uint32;
                                  description
                                    "Referenced Link State ID.";
                                }
    
                                leaf referenced-adv-router {
                                  type inet:ipv4-address;
                                  description
                                    "Referenced Advertising Router.";
                                }
    
                                leaf num-of-prefixes {
                                  type uint16;
                                  description
                                    "Number of prefixes.";
                                }
    
                                list prefix-list {
                                  key "prefix";
                                  description
                                    "List of prefixes associated with the link.";
                                  leaf prefix {
                                    type string;
                                    description
                                      "Prefix";
                                  }
    
                                  leaf prefix-options {
                                    type string;
                                    mandatory
                                      true;
                                    description
                                      "Prefix options.";
                                  }
    
                                  leaf metric {
                                    type uint24;
                                    description
                                      "Metric";
                                  }
                                }  // list prefix-list
                              }  // container intra-area-prefix
                            }  // container body
                          }  // container ospfv3
                        }  // choice version
                      }  // list as-scope-lsa
                    }  // list as-scope-lsas
    
                    list topology {
                      key "name";
                      description
                        "OSPF topology.";
                      leaf name {
                        type rib-ref;
                        description "RIB";
                      }
    
                      list area {
                        key "area-id";
                        description
                          "List of ospf areas";
                        leaf area-id {
                          type area-id-type;
                          description "Area ID.";
                        }
                      }  // list area
                    }  // list topology
                  }  // list instance
                }  // container ospf
              }  // list routing-protocol
            }  // container routing-protocols
    
            container ribs {
              description "Container for RIBs.";
              list rib {
                key "name";
                min-elements 1;
                description
                  "Each entry represents a RIB identified by the 'name'
    key. All routes in a RIB MUST belong to the same address
    family.
    
    For each routing instance, an implementation SHOULD
    provide one system-controlled default RIB for each
    supported address family.";
                leaf name {
                  type string;
                  description
                    "The name of the RIB.";
                }
    
                leaf address-family {
                  type identityref {
                    base address-family;
                  }
                  mandatory true;
                  description "Address family.";
                }
    
                leaf default-rib {
                  if-feature multiple-ribs;
                  type boolean;
                  default "true";
                  description
                    "This flag has the value of 'true' if and only if the
    RIB is the default RIB for the given address family.
    
    A default RIB always receives direct routes. By
    default it also receives routes from all routing
    protocols.";
                }
    
                container routes {
                  description
                    "Current content of the RIB.";
                  list route {
                    key "destination-prefix";
                    description
                      "A RIB route entry. This data node MUST be augmented
    with information specific for routes of each address
    family.";
                    leaf route-preference {
                      type route-preference;
                      description
                        "This route attribute, also known as administrative
    distance, allows for selecting the preferred route
    among routes with the same destination prefix. A
    smaller value means a more preferred route.";
                    }
    
                    leaf destination-prefix {
                      type string;
                      description
                        "Destination IP address with prefix";
                    }
    
                    leaf metric {
                      type uint32;
                      description
                        "Route metric.";
                    }
    
                    container next-hop {
                      description
                        "Route's next-hop attribute.";
                      choice next-hop-options {
                        mandatory true;
                        description
                          "Options for next-hops in state data.
    
    It is expected that other cases will be added through
    augments from other modules, e.g., for ECMP or recursive
    next-hops.";
                        case simple-next-hop {
                          description
                            "Simple next-hop is specified as an outgoing interface,
    next-hop address or both.
    
    Address-family-specific modules are expected to provide
    'next-hop-address' leaf via augmentation.";
                          leaf outgoing-interface {
                            type string;
                            description
                              "Name of the outgoing interface.";
                          }
    
                          leaf next-hop-address {
                            type string;
                            description
                              "IP address.";
                          }
                        }  // case simple-next-hop
                        leaf special-next-hop {
                          type enumeration {
                            enum "blackhole" {
                              value 0;
                              description
                                "Silently discard the packet.";
                            }
                            enum "unreachable" {
                              value 1;
                              description
                                "Discard the packet and notify the sender with an error
    message indicating that the destination host is
    unreachable.";
                            }
                            enum "prohibit" {
                              value 2;
                              description
                                "Discard the packet and notify the sender with an error
    message indicating that the communication is
    administratively prohibited.";
                            }
                            enum "receive" {
                              value 3;
                              description
                                "The packet will be received by the local system.";
                            }
                          }
                          description
                            "Special next-hop options.";
                        }
                      }  // choice next-hop-options
                    }  // container next-hop
    
                    leaf source-protocol {
                      type identityref {
                        base routing-protocol;
                      }
                      mandatory true;
                      description
                        "Type of the routing protocol from which the route
    originated.";
                    }
    
                    leaf active {
                      type empty;
                      description
                        "Presence of this leaf indicates that the route is preferred
    among all routes in the same RIB that have the same
    destination prefix.";
                    }
    
                    leaf last-updated {
                      type yang:date-and-time;
                      description
                        "Time stamp of the last modification of the route. If the
    route was never modified, it is the time when the route was
    inserted into the RIB.";
                    }
    
                    leaf update-source {
                      type string;
                      description
                        "Update source for the route.";
                    }
    
                    leaf tag {
                      type uint32;
                      default "0";
                      description
                        "OSPF route tag.";
                    }
    
                    leaf route-type {
                      type enumeration {
                        enum "intra-area" {
                          value 0;
                          description
                            "OSPF intra-area route";
                        }
                        enum "inter-area" {
                          value 1;
                          description
                            "OSPF inter-area route";
                        }
                        enum "external-1" {
                          value 2;
                          description
                            "OSPF external route type 1";
                        }
                        enum "external-2" {
                          value 3;
                          description
                            "OSPF External route type 2";
                        }
                        enum "nssa-1" {
                          value 4;
                          description
                            "OSPF NSSA external route type 1";
                        }
                        enum "nssa-2" {
                          value 5;
                          description
                            "OSPF NSSA external route type 2";
                        }
                      }
                      description
                        "OSPF route type";
                    }
                  }  // list route
                }  // container routes
              }  // list rib
            }  // container ribs
          }  // list routing-instance
        }  // container routing-state
    
        container routing {
          description
            "Configuration parameters for the routing subsystem.";
          list routing-instance {
            key "name";
            description
              "Configuration of a routing instance.";
            leaf name {
              type string;
              description
                "The name of the routing instance.
    
    For system-controlled entries, the value of this leaf must
    be the same as the name of the corresponding entry in
    state data.
    
    For user-controlled entries, an arbitrary name can be
    used.";
            }
    
            leaf type {
              type identityref {
                base routing-instance;
              }
              default
                "rt:default-routing-instance";
              description
                "The type of the routing instance.";
            }
    
            leaf enabled {
              type boolean;
              default "true";
              description
                "Enable/disable the routing instance.
    
    If this parameter is false, the parent routing instance is
    disabled and does not appear in state data, despite any
    other configuration that might be present.";
            }
    
            leaf router-id {
              type yang:dotted-quad;
              description
                "A 32-bit number in the form of a dotted quad that is used by
    some routing protocols identifying a router.";
              reference
                "RFC 2328: OSPF Version 2.";
    
            }
    
            leaf description {
              type string;
              description
                "Textual description of the routing instance.";
            }
    
            container interfaces {
              description
                "Assignment of the routing instance's interfaces.";
              leaf-list interface {
                type if:interface-ref;
                description
                  "The name of a configured network layer interface to be
    assigned to the routing-instance.";
              }
            }  // container interfaces
    
            container routing-protocols {
              description
                "Configuration of routing protocol instances.";
              list routing-protocol {
                key "type name";
                description
                  "Each entry contains configuration of a routing protocol
    instance.";
                leaf type {
                  type identityref {
                    base routing-protocol;
                  }
                  description
                    "Type of the routing protocol - an identity derived
    from the 'routing-protocol' base identity.";
                }
    
                leaf name {
                  type string;
                  description
                    "An arbitrary name of the routing protocol instance.";
                }
    
                leaf description {
                  type string;
                  description
                    "Textual description of the routing protocol
    instance.";
                }
    
                container static-routes {
                  when "../type='rt:static'" {
                    description
                      "This container is only valid for the 'static'
    routing protocol.";
                  }
                  description
                    "Configuration of the 'static' pseudo-protocol.
    
    Address-family-specific modules augment this node with
    their lists of routes.";
                  container ipv4 {
                    description
                      "Configuration of a 'static' pseudo-protocol instance
    consists of a list of routes.";
                    list route {
                      key "destination-prefix";
                      ordered-by user;
                      description
                        "A user-ordered list of static routes.";
                      leaf destination-prefix {
                        type inet:ipv4-prefix;
                        mandatory true;
                        description
                          "IPv4 destination prefix.";
                      }
    
                      leaf description {
                        type string;
                        description
                          "Textual description of the route.";
                      }
    
                      container next-hop {
                        description
                          "Configuration of next-hop.";
                        choice next-hop-options {
                          mandatory true;
                          description
                            "Options for next-hops in static routes.
    
    It is expected that other cases will be added through
    augments from other modules, e.g., for Equal-Cost Multipath
    routing (ECMP).";
                          case simple-next-hop {
                            description
                              "Simple next-hop is specified as an outgoing interface,
    next-hop address or both.
    
    Address-family-specific modules are expected to provide
    'next-hop-address' leaf via augmentation.";
                            leaf outgoing-interface {
                              type string;
                              description
                                "Name of the outgoing interface.";
                            }
                          }  // case simple-next-hop
                          leaf special-next-hop {
                            type enumeration {
                              enum "blackhole" {
                                value 0;
                                description
                                  "Silently discard the packet.";
                              }
                              enum "unreachable" {
                                value 1;
                                description
                                  "Discard the packet and notify the sender with an error
    message indicating that the destination host is
    unreachable.";
                              }
                              enum "prohibit" {
                                value 2;
                                description
                                  "Discard the packet and notify the sender with an error
    message indicating that the communication is
    administratively prohibited.";
                              }
                              enum "receive" {
                                value 3;
                                description
                                  "The packet will be received by the local system.";
                              }
                            }
                            description
                              "Special next-hop options.";
                          }
                          leaf next-hop-address {
                            type inet:ipv4-address;
                            description
                              "IPv4 address of the next-hop.";
                          }
                        }  // choice next-hop-options
                      }  // container next-hop
                    }  // list route
                  }  // container ipv4
    
                  container ipv6 {
                    description
                      "Configuration of a 'static' pseudo-protocol instance
    consists of a list of routes.";
                    list route {
                      key "destination-prefix";
                      ordered-by user;
                      description
                        "A user-ordered list of static routes.";
                      leaf destination-prefix {
                        type inet:ipv6-prefix;
                        mandatory true;
                        description
                          "IPv6 destination prefix.";
                      }
    
                      leaf description {
                        type string;
                        description
                          "Textual description of the route.";
                      }
    
                      container next-hop {
                        description
                          "Configuration of next-hop.";
                        choice next-hop-options {
                          mandatory true;
                          description
                            "Options for next-hops in static routes.
    
    It is expected that other cases will be added through
    augments from other modules, e.g., for Equal-Cost Multipath
    routing (ECMP).";
                          case simple-next-hop {
                            description
                              "Simple next-hop is specified as an outgoing interface,
    next-hop address or both.
    
    Address-family-specific modules are expected to provide
    'next-hop-address' leaf via augmentation.";
                            leaf outgoing-interface {
                              type string;
                              description
                                "Name of the outgoing interface.";
                            }
                          }  // case simple-next-hop
                          leaf special-next-hop {
                            type enumeration {
                              enum "blackhole" {
                                value 0;
                                description
                                  "Silently discard the packet.";
                              }
                              enum "unreachable" {
                                value 1;
                                description
                                  "Discard the packet and notify the sender with an error
    message indicating that the destination host is
    unreachable.";
                              }
                              enum "prohibit" {
                                value 2;
                                description
                                  "Discard the packet and notify the sender with an error
    message indicating that the communication is
    administratively prohibited.";
                              }
                              enum "receive" {
                                value 3;
                                description
                                  "The packet will be received by the local system.";
                              }
                            }
                            description
                              "Special next-hop options.";
                          }
                          leaf next-hop-address {
                            type inet:ipv6-address;
                            description
                              "IPv6 address of the next-hop.";
                          }
                        }  // choice next-hop-options
                      }  // container next-hop
                    }  // list route
                  }  // container ipv6
                }  // container static-routes
    
                container ospf {
                  description "OSPF.";
                  container all-instances-inherit {
                    if-feature instance-inheritance;
                    description
                      "Inheritance support to all instances.";
                    container area {
                      description
                        "Area config to be inherited by all areas in
    all instances.";
                    }  // container area
    
                    container interface {
                      description
                        "Interface config to be inherited by all interfaces
    in all instances.";
                    }  // container interface
                  }  // container all-instances-inherit
    
                  leaf operation-mode {
                    type identityref {
                      base operation-mode;
                    }
                    default
                      "ospf:ships-in-the-night";
                    description
                      "OSPF operation mode.";
                  }
    
                  list instance {
                    key "af";
                    description
                      "An OSPF routing protocol instance.";
                    leaf af {
                      type identityref {
                        base rt:address-family;
                      }
                      description
                        "Address-family of the instance.";
                    }
    
                    leaf router-id {
                      if-feature router-id;
                      type yang:dotted-quad;
                      description
                        "Defined in RFC 2328. A 32-bit number
    that uniquely identifies the router.";
                    }
    
                    container admin-distance {
                      description
                        "Admin distance config state.";
                      choice granularity {
                        description
                          "Options for expressing admin distance
    for intra-area and inter-area route";
                        case detail {
                          leaf intra-area {
                            type uint8;
                            description
                              "Admin distance for intra-area route.";
                          }
    
                          leaf inter-area {
                            type uint8;
                            description
                              "Admin distance for inter-area route.";
                          }
                        }  // case detail
                        leaf internal {
                          type uint8;
                          description
                            "Admin distance for both intra-area and
    inter-area route.";
                        }
                      }  // choice granularity
    
                      leaf external {
                        type uint8;
                        description
                          "Admin distance for both external route.";
                      }
    
                      container ospf-distance {
                        description
                          "configuration of Admin Distance";
                        leaf distance {
                          type uint32 {
                            range "1 .. 255";
                          }
                          description
                            "<1-255>;;OSPF Administrative distance";
                        }
    
                        leaf ip {
                          type inet:ipv4-address;
                          description
                            "A.B.C.D;;IP source address";
                        }
    
                        leaf wildcard {
                          type inet:ipv4-address;
                          description
                            "A.B.C.D;;Wildcard bits";
                        }
    
                        leaf acl-name {
                          type access-list-standard-id-type;
                          description
                            "standard acl";
                        }
                      }  // container ospf-distance
                    }  // container admin-distance
    
                    container nsr {
                      if-feature nsr;
                      description
                        "NSR config state.";
                      leaf enable {
                        type boolean;
                        description
                          "Enable/Disable NSR.";
                      }
                    }  // container nsr
    
                    container graceful-restart {
                      if-feature graceful-restart;
                      description
                        "Graceful restart config state.";
                      leaf enable {
                        type boolean;
                        description
                          "Enable/Disable graceful restart as defined in RFC 3623.";
                      }
    
                      leaf helper-enable {
                        type boolean;
                        description
                          "Enable RestartHelperSupport in RFC 3623 Section B.2.";
                      }
    
                      leaf restart-interval {
                        type uint16 {
                          range "1..1800";
                        }
                        units "seconds";
                        default "120";
                        description
                          "RestartInterval option in RFC 3623 Section B.1.";
                      }
    
                      leaf helper-strict-lsa-checking {
                        type boolean;
                        description
                          "RestartHelperStrictLSAChecking option in RFC 3623
    Section B.2.";
                      }
                    }  // container graceful-restart
    
                    leaf enable {
                      if-feature admin-control;
                      type boolean;
                      default "true";
                      description
                        "Enable/Disable the protocol.";
                    }
    
                    container auto-cost {
                      if-feature auto-cost;
                      description
                        "Auto cost config state.";
                      leaf enable {
                        type boolean;
                        description
                          "Enable/Disable auto cost.";
                      }
    
                      leaf reference-bandwidth {
                        type uint32 {
                          range "1..4294967";
                        }
                        units "Mbits";
                        description
                          "Configure reference bandwidth in term of Mbits";
                      }
                    }  // container auto-cost
    
                    container spf-control {
                      description
                        "SPF calculation control.";
                      leaf paths {
                        if-feature max-ecmp;
                        type uint16 {
                          range "1..32";
                        }
                        description
                          "Maximum number of ECMP paths.";
                      }
    
                      container throttle-timers {
                        description
                          "timers value";
                        leaf init-delay {
                          type delay_range;
                          units "millisecond";
                          description
                            "Delay between receiving a change to SPF or LSA
     calculation in milliseconds";
                        }
    
                        leaf min-delay {
                          type delay_range;
                          units "millisecond";
                          description
                            "Delay between first and second SPF or LSA
     calculation in milliseconds";
                        }
    
                        leaf max-delay {
                          type delay_range;
                          units "millisecond";
                          description
                            "Maximum wait time in milliseconds
     for SPF or LSA calculations";
                        }
                      }  // container throttle-timers
                    }  // container spf-control
    
                    container database-control {
                      description
                        "Database maintenance control.";
                      leaf max-lsa {
                        if-feature max-lsa;
                        type uint32 {
                          range "1..4294967294";
                        }
                        description
                          "Maximum number of LSAs OSPF will receive.";
                      }
    
                      container max-lsa-options {
                        description
                          "Option of Max-LSA";
                        leaf threshold-value {
                          type uint32 {
                            range "1 .. 100";
                          }
                          description
                            "<1-100> Threshold value (%) at which
    to generate a warning msg";
                        }
    
                        leaf ignore-count {
                          type uint32 {
                            range "1 .. 65534";
                          }
                          description
                            "<1-65534> count on how many times
    adjacencies can be suppressed";
                        }
    
                        leaf ignore-time {
                          type uint32 {
                            range "1 .. 17895";
                          }
                          description
                            "<1-17895> number of minutes during which
    all adjacencies are suppressed";
                        }
    
                        leaf reset-time {
                          type uint32 {
                            range "2 .. 35791";
                          }
                          description
                            "<2-35791> number of minutes after which
    ignore-count is reset to zero";
                        }
    
                        leaf warning-only {
                          type empty;
                          description
                            "Only give warning message when
    limit is exceeded";
                        }
                      }  // container max-lsa-options
    
                      container database-filter {
                        if-feature database-filter;
                        description
                          "Filter OSPF LSA during synchronization and flooding";
                        leaf all-out {
                          type boolean;
                          default "false";
                          description
                            "Filter all Outgoing LSA";
                        }
                      }  // container database-filter
    
                      container flood-reduction {
                        description
                          "OSPF Flood Reduction";
                        leaf flood-reduction {
                          if-feature flood-reduction;
                          type boolean;
                          default "false";
                          description
                            "Enable OSPF flood reduction";
                        }
                      }  // container flood-reduction
    
                      container ignore-lsa {
                        description
                          "Do not complain upon receiving LSA of the
    specified type";
                        leaf mospf {
                          type empty;
                          description
                            "Ignore Type 6 LSAs";
                        }
                      }  // container ignore-lsa
    
                      container lsa {
                        description
                          "OSPF LSA timers";
                        container throttle-timers {
                          description
                            "timers value";
                          leaf init-delay {
                            type delay_range;
                            units "millisecond";
                            description
                              "Delay between receiving a change to SPF or LSA
     calculation in milliseconds";
                          }
    
                          leaf min-delay {
                            type delay_range;
                            units "millisecond";
                            description
                              "Delay between first and second SPF or LSA
     calculation in milliseconds";
                          }
    
                          leaf max-delay {
                            type delay_range;
                            units "millisecond";
                            description
                              "Maximum wait time in milliseconds
     for SPF or LSA calculations";
                          }
                        }  // container throttle-timers
    
                        leaf arrival {
                          type delay_range;
                          units "millisecond";
                          default "1000";
                          description
                            "The minimum interval in milliseconds
    between accepting the same LSA arrival timer";
                        }
    
                        leaf group-pacing {
                          type uint32 {
                            range "10 .. 1800";
                          }
                          units "seconds";
                          default "240";
                          description
                            "OSPF LSA group pacing timer";
                        }
    
                        leaf refresh {
                          type uint32 {
                            range "1800 .. 2700";
                          }
                          units "seconds";
                          default "1800";
                          description
                            "How often self-originated LSAs should
    be refreshed, in seconds";
                        }
    
                        leaf flood {
                          type uint32 {
                            range "5 .. 100";
                          }
                          units "millisecond";
                          default "33";
                          description
                            "OSPF flood pacing timer";
                        }
    
                        leaf retransmission {
                          type uint32 {
                            range "5 .. 200";
                          }
                          units "millisecond";
                          default "66";
                          description
                            "OSPF retransmission pacing timer";
                        }
                      }  // container lsa
                    }  // container database-control
    
                    container reload-control {
                      description
                        "Protocol reload control.";
                      container max-metric {
                        description
                          "Set maximum metric configuration";
                        container on-proc-restart {
                          description
                            "Set maximum metric on-proc-restart configuration";
                          choice lsa-grouping {
                            description
                              " Options of LSA";
                            leaf wait-for-bgp {
                              type boolean;
                              description
                                "Till BGP converge originate router-LSA
    with max metric";
                            }
                            leaf time {
                              type uint32 {
                                range "5..86400";
                              }
                              units "second";
                              description
                                "Till how much time originate router-LSA
    with max-metric";
                            }
                          }  // choice lsa-grouping
    
                          container max-metric-options {
                            description
                              "max metric options";
                            leaf include-stub {
                              type boolean;
                              description
                                "Set maximum metric for stub links in router-LSAs";
                            }
    
                            leaf summary-lsa {
                              type boolean;
                              description
                                "Override summary-lsa metric with max-metric value";
                            }
    
                            leaf summary-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in summary-LSAs (default 16711680)";
                            }
    
                            leaf external-lsa {
                              type boolean;
                              description
                                "Override external-lsa metric with max-metric value";
                            }
    
                            leaf external-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in external-LSAs (default 16711680)";
                            }
                          }  // container max-metric-options
                        }  // container on-proc-restart
    
                        container on-startup {
                          description
                            "Set maximum metric on-startup configuration";
                          choice lsa-grouping {
                            description
                              " Options of LSA";
                            leaf wait-for-bgp {
                              type boolean;
                              description
                                "Till BGP converge originate router-LSA
    with max metric";
                            }
                            leaf time {
                              type uint32 {
                                range "5..86400";
                              }
                              units "second";
                              description
                                "Till how much time originate router-LSA
    with max-metric";
                            }
                          }  // choice lsa-grouping
    
                          container max-metric-options {
                            description
                              "max metric options";
                            leaf include-stub {
                              type boolean;
                              description
                                "Set maximum metric for stub links in router-LSAs";
                            }
    
                            leaf summary-lsa {
                              type boolean;
                              description
                                "Override summary-lsa metric with max-metric value";
                            }
    
                            leaf summary-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in summary-LSAs (default 16711680)";
                            }
    
                            leaf external-lsa {
                              type boolean;
                              description
                                "Override external-lsa metric with max-metric value";
                            }
    
                            leaf external-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in external-LSAs (default 16711680)";
                            }
                          }  // container max-metric-options
                        }  // container on-startup
    
                        container on-proc-migration {
                          description
                            "Set maximum metric on-proc-migration configuration";
                          choice lsa-grouping {
                            description
                              " Options of LSA";
                            leaf wait-for-bgp {
                              type boolean;
                              description
                                "Till BGP converge originate router-LSA
    with max metric";
                            }
                            leaf time {
                              type uint32 {
                                range "5..86400";
                              }
                              units "second";
                              description
                                "Till how much time originate router-LSA
    with max-metric";
                            }
                          }  // choice lsa-grouping
    
                          container max-metric-options {
                            description
                              "max metric options";
                            leaf include-stub {
                              type boolean;
                              description
                                "Set maximum metric for stub links in router-LSAs";
                            }
    
                            leaf summary-lsa {
                              type boolean;
                              description
                                "Override summary-lsa metric with max-metric value";
                            }
    
                            leaf summary-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in summary-LSAs (default 16711680)";
                            }
    
                            leaf external-lsa {
                              type boolean;
                              description
                                "Override external-lsa metric with max-metric value";
                            }
    
                            leaf external-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in external-LSAs (default 16711680)";
                            }
                          }  // container max-metric-options
                        }  // container on-proc-migration
    
                        container always {
                          description
                            "Set maximum metric always configuration";
                          container max-metric-options {
                            description
                              "max metric options";
                            leaf include-stub {
                              type boolean;
                              description
                                "Set maximum metric for stub links in router-LSAs";
                            }
    
                            leaf summary-lsa {
                              type boolean;
                              description
                                "Override summary-lsa metric with max-metric value";
                            }
    
                            leaf summary-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in summary-LSAs (default 16711680)";
                            }
    
                            leaf external-lsa {
                              type boolean;
                              description
                                "Override external-lsa metric with max-metric value";
                            }
    
                            leaf external-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in external-LSAs (default 16711680)";
                            }
                          }  // container max-metric-options
                        }  // container always
    
                        container on-switchover {
                          description
                            "Set maximum metric on-switchover configuration";
                          choice lsa-grouping {
                            description
                              " Options of LSA";
                            leaf wait-for-bgp {
                              type boolean;
                              description
                                "Till BGP converge originate router-LSA
    with max metric";
                            }
                            leaf time {
                              type uint32 {
                                range "5..86400";
                              }
                              units "second";
                              description
                                "Till how much time originate router-LSA
    with max-metric";
                            }
                          }  // choice lsa-grouping
    
                          container max-metric-options {
                            description
                              "max metric options";
                            leaf include-stub {
                              type boolean;
                              description
                                "Set maximum metric for stub links in router-LSAs";
                            }
    
                            leaf summary-lsa {
                              type boolean;
                              description
                                "Override summary-lsa metric with max-metric value";
                            }
    
                            leaf summary-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in summary-LSAs (default 16711680)";
                            }
    
                            leaf external-lsa {
                              type boolean;
                              description
                                "Override external-lsa metric with max-metric value";
                            }
    
                            leaf external-lsa-metric {
                              type ospf:uint24;
                              description
                                "Overriding metric in external-LSAs (default 16711680)";
                            }
                          }  // container max-metric-options
                        }  // container on-switchover
                      }  // container max-metric
                    }  // container reload-control
    
                    container mpls {
                      description
                        "OSPF MPLS config state.";
                      container te-rid {
                        if-feature te-rid;
                        description
                          "Traffic Engineering stable IP address for system.";
                        choice source {
                          description
                            "Different options for specifying TE router ID.";
                          leaf interface {
                            type if:interface-ref;
                            description
                              "Take the interface's IPv4 address as TE
    router ID.";
                          }
                          leaf router-id {
                            type inet:ipv4-address;
                            description
                              "Explicitly configure the TE router ID.";
                          }
                        }  // choice source
                      }  // container te-rid
    
                      container ldp {
                        description
                          "OSPF MPLS LDP config state.";
                        leaf igp-sync {
                          if-feature ldp-igp-sync;
                          type boolean;
                          description
                            "Enable LDP IGP synchronization.";
                        }
    
                        leaf autoconfig {
                          if-feature ldp-igp-autoconfig;
                          type boolean;
                          description
                            "Enable LDP IGP interface auto-configuration.";
                        }
                      }  // container ldp
                    }  // container mpls
    
                    container fast-reroute {
                      if-feature fast-reroute;
                      description
                        "This container may be augmented with global
    parameters for IPFRR.";
                      container lfa {
                        if-feature lfa;
                        description
                          "This container may be augmented with
    global parameters for LFA.
    Creating the container has no effect on
    LFA activation.";
                      }  // container lfa
                    }  // container fast-reroute
    
                    container all-areas-inherit {
                      if-feature area-inheritance;
                      description
                        "Inheritance for all areas.";
                      container area {
                        description
                          "Area config to be inherited by all areas.";
                      }  // container area
    
                      container interface {
                        description
                          "Interface config to be inherited by all interfaces
    in all areas.";
                      }  // container interface
                    }  // container all-areas-inherit
    
                    list area {
                      key "area-id";
                      description
                        "List of ospf areas";
                      leaf area-id {
                        type area-id-type;
                        description "Area ID.";
                      }
    
                      leaf area-type {
                        type identityref {
                          base area-type;
                        }
                        default "normal";
                        description "Area type.";
                      }
    
                      leaf summary {
                        type boolean;
                        description
                          "Enable/Disable summary generation to the stub or
    NSSA area.";
                      }
    
                      leaf default-cost {
                        type uint32 {
                          range "1..16777215";
                        }
                        description
                          "Set the summary default-cost for a stub or NSSA area.";
                      }
    
                      list range {
                        key "prefix";
                        description
                          "Summarize routes matching address/mask (border
    routers only)";
                        leaf prefix {
                          type string;
                          description
                            "IPv4 or IPv6 prefix";
                        }
    
                        leaf advertise {
                          type boolean;
                          description
                            "Advertise or hide.";
                        }
    
                        leaf cost {
                          type uint24 {
                            range "0..16777214";
                          }
                          description
                            "Cost of summary route.";
                        }
                      }  // list range
    
                      container all-interfaces-inherit {
                        if-feature interface-inheritance;
                        description
                          "Inheritance for all interfaces";
                        container interface {
                          description
                            "Interface config to be inherited by all
    interfaces.";
                        }  // container interface
                      }  // container all-interfaces-inherit
    
                      list virtual-link {
                        key "router-id";
                        description
                          "OSPF virtual link";
                        leaf router-id {
                          type yang:dotted-quad;
                          description
                            "Virtual link router ID.";
                        }
    
                        leaf cost {
                          type uint16 {
                            range "1..65535";
                          }
                          description
                            "Interface cost.";
                        }
    
                        leaf hello-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Time between hello packets.";
                        }
    
                        leaf dead-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          must
                            "../dead-interval > ../hello-interval" {
                            error-message
                              "The dead interval must be larger than the hello interval";
                            description
                              "The value MUST be greater than 'hello-internval'.";
                          }
                          description
                            "Interval after which a neighbor is declared dead.";
                        }
    
                        leaf retransmit-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Time between retransmitting unacknowledged Link State
    Advertisements (LSAs).";
                        }
    
                        leaf transmit-delay {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Estimated time needed to send link-state update.";
                        }
    
                        leaf mtu-ignore {
                          if-feature mtu-ignore;
                          type boolean;
                          description
                            "Enable/Disable ignoring of MTU in DBD packets.";
                        }
    
                        leaf lls {
                          if-feature lls;
                          type boolean;
                          description
                            "Enable/Disable link-local signaling (LLS) support.";
                        }
    
                        leaf prefix-suppression {
                          if-feature prefix-suppression;
                          type boolean;
                          description
                            "Suppress advertisement of the prefixes.";
                        }
    
                        leaf bfd {
                          if-feature bfd;
                          type boolean;
                          description
                            "Enable/disable bfd.";
                        }
    
                        container ttl-security {
                          if-feature ttl-security;
                          description
                            "TTL security check.";
                          leaf enable {
                            type boolean;
                            description
                              "Enable/Disable TTL security check.";
                          }
    
                          leaf hops {
                            type uint8 {
                              range "1..254";
                            }
                            description
                              "Maximum number of hops that a OSPF packet may
    have traveled.";
                          }
                        }  // container ttl-security
    
                        leaf enable {
                          if-feature admin-control;
                          type boolean;
                          default "true";
                          description
                            "Enable/disable protocol on the interface.";
                        }
    
                        container authentication {
                          description
                            "Authentication configuration.";
                          choice auth-type-selection {
                            description
                              "Options for expressing authentication setting";
                            case auth-ipsec {
                              when
                                "../../../../../rt:type = 'ospfv3'" {
                                description
                                  "Applied to OSPFv3 only";
                              }
                              if-feature ospfv3-authentication-ipsec;
                              leaf sa {
                                type string;
                                description
                                  "SA name";
                              }
                            }  // case auth-ipsec
                            leaf key-chain {
                              type key-chain:key-chain-ref;
                              description
                                "key-chain name";
                            }
    
                            case auth-trailer-key {
                              leaf key {
                                type string;
                                description
                                  "Key string in ASCII format.";
                              }
    
                              container crypto-algorithm {
                                description
                                  "Cryptographic algorithm associated with key.";
                                choice algorithm {
                                  description
                                    "Options for crytographic algorithm specification.";
                                  leaf hmac-sha1-12 {
                                    type empty;
                                    description
                                      "The HMAC-SHA1-12 algorithm.";
                                  }
                                  leaf hmac-sha1-20 {
                                    type empty;
                                    description
                                      "The HMAC-SHA1-20 algorithm.";
                                  }
                                  leaf md5 {
                                    type empty;
                                    description
                                      "The MD5 algorithm.";
                                  }
                                  leaf sha-1 {
                                    type empty;
                                    description
                                      "The SHA-1 algorithm.";
                                  }
                                  leaf hmac-sha-1 {
                                    type empty;
                                    description
                                      "HMAC-SHA-1 authentication algorithm.";
                                  }
                                  leaf hmac-sha-256 {
                                    type empty;
                                    description
                                      "HMAC-SHA-256 authentication algorithm.";
                                  }
                                  leaf hmac-sha-384 {
                                    type empty;
                                    description
                                      "HMAC-SHA-384 authentication algorithm.";
                                  }
                                  leaf hmac-sha-512 {
                                    type empty;
                                    description
                                      "HMAC-SHA-512 authentication algorithm.";
                                  }
                                }  // choice algorithm
                              }  // container crypto-algorithm
                            }  // case auth-trailer-key
                          }  // choice auth-type-selection
                        }  // container authentication
                      }  // list virtual-link
    
                      list sham-link {
                        key "local-id remote-id";
                        description
                          "OSPF sham link";
                        leaf local-id {
                          type inet:ip-address;
                          description
                            "Address of the local end-point.";
                        }
    
                        leaf remote-id {
                          type inet:ip-address;
                          description
                            "Address of the remote end-point.";
                        }
    
                        leaf cost {
                          type uint16 {
                            range "1..65535";
                          }
                          description
                            "Interface cost.";
                        }
    
                        leaf hello-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Time between hello packets.";
                        }
    
                        leaf dead-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          must
                            "../dead-interval > ../hello-interval" {
                            error-message
                              "The dead interval must be larger than the hello interval";
                            description
                              "The value MUST be greater than 'hello-internval'.";
                          }
                          description
                            "Interval after which a neighbor is declared dead.";
                        }
    
                        leaf retransmit-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Time between retransmitting unacknowledged Link State
    Advertisements (LSAs).";
                        }
    
                        leaf transmit-delay {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Estimated time needed to send link-state update.";
                        }
    
                        leaf mtu-ignore {
                          if-feature mtu-ignore;
                          type boolean;
                          description
                            "Enable/Disable ignoring of MTU in DBD packets.";
                        }
    
                        leaf lls {
                          if-feature lls;
                          type boolean;
                          description
                            "Enable/Disable link-local signaling (LLS) support.";
                        }
    
                        leaf prefix-suppression {
                          if-feature prefix-suppression;
                          type boolean;
                          description
                            "Suppress advertisement of the prefixes.";
                        }
    
                        leaf bfd {
                          if-feature bfd;
                          type boolean;
                          description
                            "Enable/disable bfd.";
                        }
    
                        container ttl-security {
                          if-feature ttl-security;
                          description
                            "TTL security check.";
                          leaf enable {
                            type boolean;
                            description
                              "Enable/Disable TTL security check.";
                          }
    
                          leaf hops {
                            type uint8 {
                              range "1..254";
                            }
                            description
                              "Maximum number of hops that a OSPF packet may
    have traveled.";
                          }
                        }  // container ttl-security
    
                        leaf enable {
                          if-feature admin-control;
                          type boolean;
                          default "true";
                          description
                            "Enable/disable protocol on the interface.";
                        }
    
                        container authentication {
                          description
                            "Authentication configuration.";
                          choice auth-type-selection {
                            description
                              "Options for expressing authentication setting";
                            case auth-ipsec {
                              when
                                "../../../../../rt:type = 'ospfv3'" {
                                description
                                  "Applied to OSPFv3 only";
                              }
                              if-feature ospfv3-authentication-ipsec;
                              leaf sa {
                                type string;
                                description
                                  "SA name";
                              }
                            }  // case auth-ipsec
                            leaf key-chain {
                              type key-chain:key-chain-ref;
                              description
                                "key-chain name";
                            }
    
                            case auth-trailer-key {
                              leaf key {
                                type string;
                                description
                                  "Key string in ASCII format.";
                              }
    
                              container crypto-algorithm {
                                description
                                  "Cryptographic algorithm associated with key.";
                                choice algorithm {
                                  description
                                    "Options for crytographic algorithm specification.";
                                  leaf hmac-sha1-12 {
                                    type empty;
                                    description
                                      "The HMAC-SHA1-12 algorithm.";
                                  }
                                  leaf hmac-sha1-20 {
                                    type empty;
                                    description
                                      "The HMAC-SHA1-20 algorithm.";
                                  }
                                  leaf md5 {
                                    type empty;
                                    description
                                      "The MD5 algorithm.";
                                  }
                                  leaf sha-1 {
                                    type empty;
                                    description
                                      "The SHA-1 algorithm.";
                                  }
                                  leaf hmac-sha-1 {
                                    type empty;
                                    description
                                      "HMAC-SHA-1 authentication algorithm.";
                                  }
                                  leaf hmac-sha-256 {
                                    type empty;
                                    description
                                      "HMAC-SHA-256 authentication algorithm.";
                                  }
                                  leaf hmac-sha-384 {
                                    type empty;
                                    description
                                      "HMAC-SHA-384 authentication algorithm.";
                                  }
                                  leaf hmac-sha-512 {
                                    type empty;
                                    description
                                      "HMAC-SHA-512 authentication algorithm.";
                                  }
                                }  // choice algorithm
                              }  // container crypto-algorithm
                            }  // case auth-trailer-key
                          }  // choice auth-type-selection
                        }  // container authentication
                      }  // list sham-link
    
                      list interface {
                        key "interface";
                        description
                          "List of OSPF interfaces.";
                        leaf interface {
                          type if:interface-ref;
                          description
                            "Interface.";
                        }
    
                        leaf network-type {
                          type enumeration {
                            enum "broadcast" {
                              value 0;
                              description
                                "Specify OSPF broadcast multi-access network.";
                            }
                            enum "non-broadcast" {
                              value 1;
                              description
                                "Specify OSPF Non-Broadcast Multi-Access
    (NBMA) network.";
                            }
                            enum
                              "point-to-multipoint" {
                              value 2;
                              description
                                "Specify OSPF point-to-multipoint network.";
                            }
                            enum
                              "point-to-point" {
                              value 3;
                              description
                                "Specify OSPF point-to-point network.";
                            }
                          }
                          description
                            "Network type.";
                        }
    
                        leaf passive {
                          type boolean;
                          description
                            "Enable/Disable passive.";
                        }
    
                        leaf demand-circuit {
                          if-feature demand-circuit;
                          type boolean;
                          description
                            "Enable/Disable demand circuit.";
                        }
    
                        container multi-area {
                          if-feature multi-area-adj;
                          description
                            "Configure ospf multi-area.";
                          leaf multi-area-id {
                            type area-id-type;
                            description
                              "Multi-area ID";
                          }
    
                          leaf cost {
                            type uint16;
                            description
                              "Interface cost for multi-area.";
                          }
                        }  // container multi-area
    
                        container static-neighbors {
                          description
                            "Static configured neighbors.";
                          list neighbor {
                            key "address";
                            description
                              "Specify a neighbor router.";
                            leaf address {
                              type inet:ip-address;
                              description
                                "Neighbor IP address.";
                            }
    
                            leaf cost {
                              type uint16 {
                                range "1..65535";
                              }
                              description
                                "Neighbor cost.";
                            }
    
                            leaf poll-interval {
                              type uint16 {
                                range "1..65535";
                              }
                              units "seconds";
                              description
                                "Neighbor poll interval.";
                            }
    
                            leaf priority {
                              type uint8 {
                                range "1..255";
                              }
                              description
                                "Neighbor priority for DR election.";
                            }
                          }  // list neighbor
                        }  // container static-neighbors
    
                        leaf node-flag {
                          if-feature node-flag;
                          type boolean;
                          default "false";
                          description
                            "Set prefix as a node representative prefix.";
                        }
    
                        container fast-reroute {
                          if-feature fast-reroute;
                          description
                            "Fast-reroute configuration.";
                          container lfa {
                            if-feature lfa;
                            description
                              "LFA configuration.";
                            leaf candidate-disabled {
                              type boolean;
                              description
                                "Prevent the interface to be used as backup.";
                            }
    
                            leaf enabled {
                              type boolean;
                              description
                                "Activates LFA.
    This model assumes activation of per-prefix LFA.";
                            }
    
                            container remote-lfa {
                              if-feature remote-lfa;
                              description
                                "Remote LFA configuration.";
                              leaf enabled {
                                type boolean;
                                description
                                  "Activates remote LFA.";
                              }
                            }  // container remote-lfa
                          }  // container lfa
                        }  // container fast-reroute
    
                        leaf cost {
                          type uint16 {
                            range "1..65535";
                          }
                          description
                            "Interface cost.";
                        }
    
                        leaf hello-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Time between hello packets.";
                        }
    
                        leaf dead-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          must
                            "../dead-interval > ../hello-interval" {
                            error-message
                              "The dead interval must be larger than the hello interval";
                            description
                              "The value MUST be greater than 'hello-internval'.";
                          }
                          description
                            "Interval after which a neighbor is declared dead.";
                        }
    
                        leaf retransmit-interval {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Time between retransmitting unacknowledged Link State
    Advertisements (LSAs).";
                        }
    
                        leaf transmit-delay {
                          type uint16 {
                            range "1..65535";
                          }
                          units "seconds";
                          description
                            "Estimated time needed to send link-state update.";
                        }
    
                        leaf mtu-ignore {
                          if-feature mtu-ignore;
                          type boolean;
                          description
                            "Enable/Disable ignoring of MTU in DBD packets.";
                        }
    
                        leaf lls {
                          if-feature lls;
                          type boolean;
                          description
                            "Enable/Disable link-local signaling (LLS) support.";
                        }
    
                        leaf prefix-suppression {
                          if-feature prefix-suppression;
                          type boolean;
                          description
                            "Suppress advertisement of the prefixes.";
                        }
    
                        leaf bfd {
                          if-feature bfd;
                          type boolean;
                          description
                            "Enable/disable bfd.";
                        }
    
                        container ttl-security {
                          if-feature ttl-security;
                          description
                            "TTL security check.";
                          leaf enable {
                            type boolean;
                            description
                              "Enable/Disable TTL security check.";
                          }
    
                          leaf hops {
                            type uint8 {
                              range "1..254";
                            }
                            description
                              "Maximum number of hops that a OSPF packet may
    have traveled.";
                          }
                        }  // container ttl-security
    
                        leaf enable {
                          if-feature admin-control;
                          type boolean;
                          default "true";
                          description
                            "Enable/disable protocol on the interface.";
                        }
    
                        container authentication {
                          description
                            "Authentication configuration.";
                          choice auth-type-selection {
                            description
                              "Options for expressing authentication setting";
                            case auth-ipsec {
                              when
                                "../../../../../rt:type = 'ospfv3'" {
                                description
                                  "Applied to OSPFv3 only";
                              }
                              if-feature ospfv3-authentication-ipsec;
                              leaf sa {
                                type string;
                                description
                                  "SA name";
                              }
                            }  // case auth-ipsec
                            leaf key-chain {
                              type key-chain:key-chain-ref;
                              description
                                "key-chain name";
                            }
    
                            case auth-trailer-key {
                              leaf key {
                                type string;
                                description
                                  "Key string in ASCII format.";
                              }
    
                              container crypto-algorithm {
                                description
                                  "Cryptographic algorithm associated with key.";
                                choice algorithm {
                                  description
                                    "Options for crytographic algorithm specification.";
                                  leaf hmac-sha1-12 {
                                    type empty;
                                    description
                                      "The HMAC-SHA1-12 algorithm.";
                                  }
                                  leaf hmac-sha1-20 {
                                    type empty;
                                    description
                                      "The HMAC-SHA1-20 algorithm.";
                                  }
                                  leaf md5 {
                                    type empty;
                                    description
                                      "The MD5 algorithm.";
                                  }
                                  leaf sha-1 {
                                    type empty;
                                    description
                                      "The SHA-1 algorithm.";
                                  }
                                  leaf hmac-sha-1 {
                                    type empty;
                                    description
                                      "HMAC-SHA-1 authentication algorithm.";
                                  }
                                  leaf hmac-sha-256 {
                                    type empty;
                                    description
                                      "HMAC-SHA-256 authentication algorithm.";
                                  }
                                  leaf hmac-sha-384 {
                                    type empty;
                                    description
                                      "HMAC-SHA-384 authentication algorithm.";
                                  }
                                  leaf hmac-sha-512 {
                                    type empty;
                                    description
                                      "HMAC-SHA-512 authentication algorithm.";
                                  }
                                }  // choice algorithm
                              }  // container crypto-algorithm
                            }  // case auth-trailer-key
                          }  // choice auth-type-selection
                        }  // container authentication
    
                        list topology {
                          key "name";
                          description
                            "OSPF interface topology.";
                          leaf name {
                            type rib-ref;
                            description
                              "One of the topology enabled on this interface";
                          }
    
                          leaf cost {
                            type uint32;
                            description
                              "Interface cost for this topology";
                          }
                        }  // list topology
    
                        container database-filter {
                          if-feature database-filter;
                          description
                            "Filter OSPF LSA during synchronization and flooding";
                          leaf all-out {
                            type boolean;
                            default "false";
                            description
                              "Filter all Outgoing LSA";
                          }
                        }  // container database-filter
    
                        container flood-reduction {
                          description
                            "OSPF Flood Reduction";
                          leaf flood-reduction {
                            if-feature flood-reduction;
                            type boolean;
                            default "false";
                            description
                              "Enable OSPF flood reduction";
                          }
                        }  // container flood-reduction
                      }  // list interface
                    }  // list area
    
                    list topology {
                      key "name";
                      description
                        "OSPF topology.";
                      leaf name {
                        type rib-ref;
                        description "RIB";
                      }
    
                      list area {
                        key "area-id";
                        description
                          "List of ospf areas";
                        leaf area-id {
                          type area-id-type;
                          description "Area ID.";
                        }
    
                        leaf area-type {
                          type identityref {
                            base area-type;
                          }
                          default "normal";
                          description
                            "Area type.";
                        }
    
                        leaf summary {
                          type boolean;
                          description
                            "Enable/Disable summary generation to the stub or
    NSSA area.";
                        }
    
                        leaf default-cost {
                          type uint32 {
                            range "1..16777215";
                          }
                          description
                            "Set the summary default-cost for a stub or NSSA area.";
                        }
    
                        list range {
                          key "prefix";
                          description
                            "Summarize routes matching address/mask (border
    routers only)";
                          leaf prefix {
                            type string;
                            description
                              "IPv4 or IPv6 prefix";
                          }
    
                          leaf advertise {
                            type boolean;
                            description
                              "Advertise or hide.";
                          }
    
                          leaf cost {
                            type uint24 {
                              range
                                "0..16777214";
                            }
                            description
                              "Cost of summary route.";
                          }
                        }  // list range
                      }  // list area
                    }  // list topology
    
                    container default-information {
                      description
                        "Control distribution of default information";
                      container originate {
                        presence
                          "Originate a default route";
                        description
                          "Distribute a default route";
                        leaf always-advertise {
                          type boolean;
                          default "false";
                          description
                            "Always advertise default route";
                        }
    
                        leaf metric {
                          type ospf:uint24;
                          default "1";
                          description
                            "OSPF metric";
                        }
    
                        leaf metric-type {
                          type ospf-external-type;
                          default "2";
                          description
                            "OSPF External metric type";
                        }
    
                        leaf route-map {
                          type string;
                          description
                            "Routing policy or route-map  name";
                        }
                      }  // container originate
                    }  // container default-information
    
                    container default-metric {
                      description
                        "OSPF default metric";
                      leaf default-metric {
                        type ospf:uint24;
                        default "1";
                        description
                          "Default metric of redistributed routes";
                      }
                    }  // container default-metric
    
                    container log-adjacency-changes {
                      description
                        "Log adjacency changes";
                      leaf adjacency-changes {
                        type ospf-log-adj;
                        description
                          "Log adjacecny state changes";
                      }
                    }  // container log-adjacency-changes
    
                    container summary-prefixes {
                      description
                        "Configure IP address summaries";
                      list summary-prefix {
                        key "prefix";
                        description
                          "Summarize redistributed routes
    matching prefix/length";
                        leaf prefix {
                          type inet:ip-prefix;
                          description
                            "IPv4 or IPv6 prefix";
                        }
    
                        choice not-advertise-or-tag {
                          description
                            "Either NSSA or tag id";
                          case tag-nssa-only {
                            leaf nssa-only {
                              type empty;
                              description
                                "Limit summary to NSSA areas";
                            }
    
                            leaf tag {
                              type uint32_max;
                              description
                                "32-bit tag value";
                            }
                          }  // case tag-nssa-only
                          leaf not-advertise {
                            type boolean;
                            description
                              "Do not advertise when translating
    OSPF type-7 LSA";
                          }
                        }  // choice not-advertise-or-tag
                      }  // list summary-prefix
                    }  // container summary-prefixes
    
                    container graceful-shutdown {
                      if-feature graceful-shutdown;
                      description
                        "Timers for graceful shutdown";
                      leaf initial-delay {
                        type uint32 {
                          range "0 .. 90";
                        }
                        units "seconds";
                        default "5";
                        description
                          "OSPF Delay before starting graceful shutdown";
                      }
    
                      leaf retain-routes {
                        type uint32 {
                          range "0 .. 90";
                        }
                        units "seconds";
                        default "5";
                        description
                          "Time to keep routes active after graceful shutdown";
                      }
                    }  // container graceful-shutdown
    
                    container redistribution {
                      description
                        "redistribute other routing protocols inside ospf";
                      container maximum-prefix {
                        presence
                          "Maximum prefix to redistribute";
                        description
                          "Maximum number of prefixes redistributed to protocol";
                        leaf IP-prefixes {
                          type uint32_max;
                          description
                            "Maximum number of IP prefixes redistributed";
                        }
    
                        leaf Threshold-value {
                          type uint32 {
                            range "1..100";
                          }
                          description
                            "Threshold value (%) at which
    to generate a warning msg";
                        }
    
                        leaf warning-only {
                          type empty;
                          description
                            "Only give warning message when limit is exceeded";
                        }
                      }  // container maximum-prefix
    
                      container bgp {
                        description
                          "Border Gateway Protocol (BGP)";
                        list bgp-protocol {
                          key "as-number";
                          description
                            "Border Gateway Protocol (BGP)";
                          leaf as-number {
                            type uint32_max;
                            description
                              "Autonomous system number";
                          }
    
                          container redist-option {
                            description
                              "Redist options";
                            leaf metric {
                              type ospf:uint24;
                              description
                                "Default metric";
                            }
    
                            leaf metric-type {
                              type uint32 {
                                range "1..2";
                              }
                              description
                                "Set OSPF External Type metrics";
                            }
    
                            leaf tag {
                              type uint32_max;
                              description
                                " Set tag for routes redistributed into OSPF";
                            }
    
                            leaf nssa-only {
                              type empty;
                              description
                                "Limit redistributed routes to NSSA areas";
                            }
    
                            leaf route-map {
                              type string;
                              description
                                "Routing policy or route-map  name";
                            }
                          }  // container redist-option
                        }  // list bgp-protocol
                      }  // container bgp
    
                      container eigrp {
                        description
                          "Enhanced Interior Gateway Routing Protocol
    (EIGRP)";
                        list eigrp-protocol {
                          key "as-number";
                          description
                            "Enhanced Interior Gateway
    Routing Protocol (EIGRP)";
                          leaf as-number {
                            type uint16_max;
                            description
                              "Autonomous system number";
                          }
    
                          container redist-option {
                            description
                              "Redist options";
                            leaf metric {
                              type ospf:uint24;
                              description
                                "Default metric";
                            }
    
                            leaf metric-type {
                              type uint32 {
                                range "1..2";
                              }
                              description
                                "Set OSPF External Type metrics";
                            }
    
                            leaf tag {
                              type uint32_max;
                              description
                                " Set tag for routes redistributed into OSPF";
                            }
    
                            leaf nssa-only {
                              type empty;
                              description
                                "Limit redistributed routes to NSSA areas";
                            }
    
                            leaf route-map {
                              type string;
                              description
                                "Routing policy or route-map  name";
                            }
                          }  // container redist-option
                        }  // list eigrp-protocol
                      }  // container eigrp
    
                      container isis {
                        description "ISO IS-IS";
                        list isis-protocol {
                          key "process-name";
                          description
                            "Intermediate system intermediate system (ISIS)";
                          leaf process-name {
                            type string;
                            description
                              "instance name";
                          }
    
                          choice isis-levels {
                            description
                              "Options for IS-IS routes";
                            leaf level-1 {
                              type empty;
                              description
                                "IS-IS level-1 routes only";
                            }
                            leaf level-2 {
                              type empty;
                              description
                                "IS-IS level-2 routes only";
                            }
                            leaf level-1-2 {
                              type empty;
                              description
                                "IS-IS level-1 and level-2 routes";
                            }
                          }  // choice isis-levels
    
                          container redist-option {
                            description
                              "Redist options";
                            leaf metric {
                              type ospf:uint24;
                              description
                                "Default metric";
                            }
    
                            leaf metric-type {
                              type uint32 {
                                range "1..2";
                              }
                              description
                                "Set OSPF External Type metrics";
                            }
    
                            leaf tag {
                              type uint32_max;
                              description
                                " Set tag for routes redistributed into OSPF";
                            }
    
                            leaf nssa-only {
                              type empty;
                              description
                                "Limit redistributed routes to NSSA areas";
                            }
    
                            leaf route-map {
                              type string;
                              description
                                "Routing policy or route-map  name";
                            }
                          }  // container redist-option
                        }  // list isis-protocol
                      }  // container isis
    
                      container applications {
                        description
                          "Application";
                        list application {
                          key "application-name";
                          description
                            "Application routes";
                          leaf application-name {
                            type string;
                            description
                              "application name";
                          }
    
                          container redist-option {
                            description
                              "Redist options";
                            leaf metric {
                              type ospf:uint24;
                              description
                                "Default metric";
                            }
    
                            leaf metric-type {
                              type uint32 {
                                range "1..2";
                              }
                              description
                                "Set OSPF External Type metrics";
                            }
    
                            leaf tag {
                              type uint32_max;
                              description
                                " Set tag for routes redistributed into OSPF";
                            }
    
                            leaf nssa-only {
                              type empty;
                              description
                                "Limit redistributed routes to NSSA areas";
                            }
    
                            leaf route-map {
                              type string;
                              description
                                "Routing policy or route-map  name";
                            }
                          }  // container redist-option
                        }  // list application
                      }  // container applications
    
                      container ospf {
                        description
                          "Open Shortest Path First (OSPF)";
                        list ospf {
                          key "id-or-name";
                          description
                            "Open Shortest Path First (OSPF)";
                          leaf id-or-name {
                            type process-id-or-name;
                            description
                              "Process id or Name";
                          }
    
                          container match {
                            description
                              "Redistribution of OSPF routes";
                            leaf internal {
                              type empty;
                              description
                                "Redistribute OSPF internal routes";
                            }
    
                            container external {
                              presence
                                "Redistribute OSPF external routes";
                              description
                                "Redistribute OSPF external routes";
                              leaf external-routes {
                                type ospf-external-type;
                                description
                                  "Redistribute OSPF external routes";
                              }
                            }  // container external
    
                            container nssa-external {
                              presence
                                "Redistribute OSPF NSSA external routes";
                              description
                                "Redistribute OSPF NSSA external routes";
                              leaf nssa-external-routes {
                                type ospf-external-type;
                                description
                                  "NSSA external routes";
                              }
                            }  // container nssa-external
                          }  // container match
    
                          container redist-option {
                            description
                              "Redist options";
                            leaf metric {
                              type ospf:uint24;
                              description
                                "Default metric";
                            }
    
                            leaf metric-type {
                              type uint32 {
                                range "1..2";
                              }
                              description
                                "Set OSPF External Type metrics";
                            }
    
                            leaf tag {
                              type uint32_max;
                              description
                                " Set tag for routes redistributed into OSPF";
                            }
    
                            leaf nssa-only {
                              type empty;
                              description
                                "Limit redistributed routes to NSSA areas";
                            }
    
                            leaf route-map {
                              type string;
                              description
                                "Routing policy or route-map  name";
                            }
                          }  // container redist-option
                        }  // list ospf
                      }  // container ospf
    
                      container rip {
                        presence "rip routes";
                        description "rip routes";
                        container redist-option {
                          description
                            "Redist options";
                          leaf metric {
                            type ospf:uint24;
                            description
                              "Default metric";
                          }
    
                          leaf metric-type {
                            type uint32 {
                              range "1..2";
                            }
                            description
                              "Set OSPF External Type metrics";
                          }
    
                          leaf tag {
                            type uint32_max;
                            description
                              " Set tag for routes redistributed into OSPF";
                          }
    
                          leaf nssa-only {
                            type empty;
                            description
                              "Limit redistributed routes to NSSA areas";
                          }
    
                          leaf route-map {
                            type string;
                            description
                              "Routing policy or route-map  name";
                          }
                        }  // container redist-option
                      }  // container rip
    
                      container static {
                        presence "Static routes";
                        description
                          "Static routes";
                        container redist-option {
                          description
                            "Redist options";
                          leaf metric {
                            type ospf:uint24;
                            description
                              "Default metric";
                          }
    
                          leaf metric-type {
                            type uint32 {
                              range "1..2";
                            }
                            description
                              "Set OSPF External Type metrics";
                          }
    
                          leaf tag {
                            type uint32_max;
                            description
                              " Set tag for routes redistributed into OSPF";
                          }
    
                          leaf nssa-only {
                            type empty;
                            description
                              "Limit redistributed routes to NSSA areas";
                          }
    
                          leaf route-map {
                            type string;
                            description
                              "Routing policy or route-map  name";
                          }
                        }  // container redist-option
                      }  // container static
    
                      container subscriber {
                        presence
                          "Subscriber routes";
                        description
                          "Subscriber routes";
                        container redist-option {
                          description
                            "Redist options";
                          leaf metric {
                            type ospf:uint24;
                            description
                              "Default metric";
                          }
    
                          leaf metric-type {
                            type uint32 {
                              range "1..2";
                            }
                            description
                              "Set OSPF External Type metrics";
                          }
    
                          leaf tag {
                            type uint32_max;
                            description
                              " Set tag for routes redistributed into OSPF";
                          }
    
                          leaf nssa-only {
                            type empty;
                            description
                              "Limit redistributed routes to NSSA areas";
                          }
    
                          leaf route-map {
                            type string;
                            description
                              "Routing policy or route-map  name";
                          }
                        }  // container redist-option
                      }  // container subscriber
    
                      container connected {
                        presence
                          "connected routes";
                        description
                          "Connected routes";
                        container redist-option {
                          description
                            "Redist options";
                          leaf metric {
                            type ospf:uint24;
                            description
                              "Default metric";
                          }
    
                          leaf metric-type {
                            type uint32 {
                              range "1..2";
                            }
                            description
                              "Set OSPF External Type metrics";
                          }
    
                          leaf tag {
                            type uint32_max;
                            description
                              " Set tag for routes redistributed into OSPF";
                          }
    
                          leaf nssa-only {
                            type empty;
                            description
                              "Limit redistributed routes to NSSA areas";
                          }
    
                          leaf route-map {
                            type string;
                            description
                              "Routing policy or route-map  name";
                          }
                        }  // container redist-option
                      }  // container connected
                    }  // container redistribution
    
                    container discard-route {
                      presence
                        "Enable or disable discard-route installation";
                      description
                        "Enable or disable discard-route installation";
                      leaf external {
                        type empty;
                        description
                          "Discard route for redistributed summarised routes";
                      }
    
                      leaf external-admin-distance {
                        type uint8_max;
                        default "254";
                        description
                          "admin distance value for external routes";
                      }
    
                      leaf internal {
                        type empty;
                        description
                          "Discard route for summarised internal routes";
                      }
    
                      leaf internal-admin-distance {
                        type uint8_max;
                        default "110";
                        description
                          "admin distance value for internal routes";
                      }
                    }  // container discard-route
    
                    container microloop-avoidance {
                      description
                        "Microloop avoidance configuration";
                      leaf enable {
                        type prefix-applicability;
                        default "all";
                        description
                          "Type of prefixes for which to avoid microloops";
                      }
    
                      leaf disable {
                        type empty;
                        description
                          "disable microloop avoidance";
                      }
    
                      leaf rib-update-delay {
                        type ospf:uint24;
                        units "millisecond";
                        default "5000";
                        description
                          "Delay to introduce between SPF and RIB update in msecs";
                      }
                    }  // container microloop-avoidance
                  }  // list instance
                }  // container ospf
              }  // list routing-protocol
            }  // container routing-protocols
    
            container ribs {
              description
                "Configuration of RIBs.";
              list rib {
                key "name";
                description
                  "Each entry contains configuration for a RIB identified
    by the 'name' key.
    
    Entries having the same key as a system-controlled entry
    of the list /routing-state/routing-instance/ribs/rib are
    used for configuring parameters of that entry. Other
    entries define additional user-controlled RIBs.";
                leaf name {
                  type string;
                  description
                    "The name of the RIB.
    
    For system-controlled entries, the value of this leaf
    must be the same as the name of the corresponding
    entry in state data.
    
    For user-controlled entries, an arbitrary name can be
    used.";
                }
    
                leaf address-family {
                  type identityref {
                    base address-family;
                  }
                  description "Address family.";
                }
    
                leaf description {
                  type string;
                  description
                    "Textual description of the RIB.";
                }
              }  // list rib
            }  // container ribs
          }  // list routing-instance
        }  // container routing
    
        rpc fib-route {
          description
            "Return the active FIB route that a routing-instance uses for
    sending packets to a destination address.";
          input {
            leaf routing-instance-name {
              type string;
              mandatory true;
              description
                "Name of the routing instance whose forwarding information
    base is being queried.
    
    If the routing instance with name equal to the value of
    this parameter doesn't exist, then this operation SHALL
    fail with error-tag 'data-missing' and error-app-tag
    'routing-instance-not-found'.";
            }
    
            container destination-address {
              description
                "Network layer destination address.
    
    Address family specific modules MUST augment this
    container with a leaf named 'address'.";
              leaf address-family {
                type identityref {
                  base address-family;
                }
                mandatory true;
                description "Address family.";
              }
    
              leaf address {
                type inet:ipv4-address;
                description
                  "IPv4 destination address.";
              }
    
              leaf address {
                type inet:ipv6-address;
                description
                  "IPv6 destination address.";
              }
            }  // container destination-address
          }
    
          output {
            container route {
              description
                "The active FIB route for the specified destination.
    
    If the routing instance has no active FIB route for the
    destination address, no output is returned - the server
    SHALL send an <rpc-reply> containing a single element
    <ok>.
    
    Address family specific modules MUST augment this list
    with appropriate route contents.";
              leaf address-family {
                type identityref {
                  base address-family;
                }
                mandatory true;
                description "Address family.";
              }
    
              container next-hop {
                description
                  "Route's next-hop attribute.";
                choice next-hop-options {
                  mandatory true;
                  description
                    "Options for next-hops in state data.
    
    It is expected that other cases will be added through
    augments from other modules, e.g., for ECMP or recursive
    next-hops.";
                  case simple-next-hop {
                    description
                      "Simple next-hop is specified as an outgoing interface,
    next-hop address or both.
    
    Address-family-specific modules are expected to provide
    'next-hop-address' leaf via augmentation.";
                    leaf outgoing-interface {
                      type string;
                      description
                        "Name of the outgoing interface.";
                    }
    
                    leaf next-hop-address {
                      type string;
                      description "IP address.";
                    }
    
                    leaf next-hop-address {
                      type inet:ipv4-address;
                      description
                        "IPv4 address of the next-hop.";
                    }
    
                    leaf next-hop-address {
                      type inet:ipv6-address;
                      description
                        "IPv6 address of the next-hop.";
                    }
                  }  // case simple-next-hop
                  leaf special-next-hop {
                    type enumeration {
                      enum "blackhole" {
                        value 0;
                        description
                          "Silently discard the packet.";
                      }
                      enum "unreachable" {
                        value 1;
                        description
                          "Discard the packet and notify the sender with an error
    message indicating that the destination host is
    unreachable.";
                      }
                      enum "prohibit" {
                        value 2;
                        description
                          "Discard the packet and notify the sender with an error
    message indicating that the communication is
    administratively prohibited.";
                      }
                      enum "receive" {
                        value 3;
                        description
                          "The packet will be received by the local system.";
                      }
                    }
                    description
                      "Special next-hop options.";
                  }
                }  // choice next-hop-options
              }  // container next-hop
    
              leaf source-protocol {
                type identityref {
                  base routing-protocol;
                }
                mandatory true;
                description
                  "Type of the routing protocol from which the route
    originated.";
              }
    
              leaf active {
                type empty;
                description
                  "Presence of this leaf indicates that the route is preferred
    among all routes in the same RIB that have the same
    destination prefix.";
              }
    
              leaf last-updated {
                type yang:date-and-time;
                description
                  "Time stamp of the last modification of the route. If the
    route was never modified, it is the time when the route was
    inserted into the RIB.";
              }
    
              leaf destination-prefix {
                type inet:ipv4-prefix;
                description
                  "IPv4 destination prefix.";
              }
    
              leaf destination-prefix {
                type inet:ipv6-prefix;
                description
                  "IPv6 destination prefix.";
              }
            }  // container route
          }
        }  // rpc fib-route
      }  // module ietf-routing
    

© 2023 YumaWorks, Inc. All rights reserved.