netconfcentral logo

openconfig-local-routing

HTML

openconfig-local-routing@2020-03-24



  module openconfig-local-routing {

    yang-version 1;

    namespace
      "http://openconfig.net/yang/local-routing";

    prefix oc-loc-rt;

    import openconfig-inet-types {
      prefix inet;
    }
    import openconfig-policy-types {
      prefix oc-pt;
    }
    import openconfig-extensions {
      prefix oc-ext;
    }
    import openconfig-interfaces {
      prefix oc-if;
    }

    organization "OpenConfig working group";

    contact
      "OpenConfig working group
www.openconfig.net";

    description
      "This module describes configuration and operational state data
for routes that are locally generated, i.e., not created by
dynamic routing protocols.  These include static routes, locally
created aggregate routes for reducing the number of constituent
routes that must be advertised, summary routes for IGPs, etc.

This model expresses locally generated routes as generically as
possible, avoiding configuration of protocol-specific attributes
at the time of route creation.  This is primarily to avoid
assumptions about how underlying router implementations handle
route attributes in various routing table data structures they
maintain.  Hence, the definition of locally generated routes
essentially creates 'bare' routes that do not have any protocol-
specific attributes.

When protocol-specific attributes must be attached to a route
(e.g., communities on a locally defined route meant to be
advertised via BGP), the attributes should be attached via a
protocol-specific policy after importing the route into the
protocol for distribution (again via routing policy).";

    revision "2020-03-24" {
      description
        "Add a description statement to static routes.";
      reference
        "1.1.0";

    }

    revision "2018-11-21" {
      description
        "Add OpenConfig module metadata extensions.";
      reference
        "1.0.2";

    }

    revision "2017-05-15" {
      description
        "Update to resolve style guide non-compliance.";
      reference
        "1.0.1";

    }

    revision "2016-05-11" {
      description
        "OpenConfig public release";
      reference
        "1.0.0";

    }

    oc-ext:openconfig-version "1.1.0";
    oc-ext:regexp-posix;
    oc-ext:catalog-organization "openconfig";
    oc-ext:origin "openconfig";

    identity LOCAL_DEFINED_NEXT_HOP {
      base 
      description
        "A base identity type of local defined next-hops";
    }

    identity DROP {
      base LOCAL_DEFINED_NEXT_HOP;
      description
        "Discard traffic for the corresponding destination";
    }

    identity LOCAL_LINK {
      base LOCAL_DEFINED_NEXT_HOP;
      description
        "Treat traffic towards addresses within the specified
next-hop prefix as though they are connected to a local
link. When the LOCAL_LINK next-hop type is specified,
an interface must also be specified such that
the local system can determine which link to trigger
link-layer address discovery against";
    }

    typedef local-defined-next-hop {
      type identityref {
        base LOCAL_DEFINED_NEXT_HOP;
      }
      description
        "Pre-defined next-hop designation for locally generated
routes";
    }

    grouping local-generic-settings {
      description
        "Generic options that can be set on local routes When
they are defined";
      leaf set-tag {
        type oc-pt:tag-type;
        description
          "Set a generic tag value on the route. This tag can be
used for filtering routes that are distributed to other
routing protocols.";
      }

      leaf description {
        type string;
        description
          "An optional textual description for the route.";
      }
    }  // grouping local-generic-settings

    grouping local-static-config {
      description
        "Configuration data for static routes.";
      leaf prefix {
        type inet:ip-prefix;
        description
          "Destination prefix for the static route, either IPv4 or
IPv6.";
      }

      uses local-generic-settings;
    }  // grouping local-static-config

    grouping local-static-state {
      description
        "Operational state data for static routes";
    }  // grouping local-static-state

    grouping local-static-nexthop-config {
      description
        "Configuration parameters related to each next-hop entry
specified for a static route";
      leaf index {
        type string;
        description
          "An user-specified identifier utilised to uniquely reference
the next-hop entry in the next-hop list. The value of this
index has no semantic meaning other than for referencing
the entry.";
      }

      leaf next-hop {
        type union {
          type inet:ip-address;
          type local-defined-next-hop;
        }
        description
          "The next-hop that is to be used for the static route
- this may be specified as an IP address, an interface
or a pre-defined next-hop type - for instance, DROP or
LOCAL_LINK. When this leaf is not set, and the interface-ref
value is specified for the next-hop, then the system should
treat the prefix as though it is directly connected to the
interface.";
      }

      leaf metric {
        type uint32;
        description
          "A metric which is utilised to specify the preference of
the next-hop entry when it is injected into the RIB. The
lower the metric, the more preferable the prefix is. When
this value is not specified the metric is inherited from
the default metric utilised for static routes within the
network instance that the static routes are being
instantiated. When multiple next-hops are specified for a
static route, the metric is utilised to determine which of
the next-hops is to be installed in the RIB. When multiple
next-hops have the same metric (be it specified, or simply
the default) then these next-hops should all be installed
in the RIB";
      }

      leaf recurse {
        type boolean;
        default "false";
        description
          "Determines whether the next-hop should be allowed to
be looked up recursively - i.e., via a RIB entry which has
been installed by a routing protocol, or another static route
- rather than needing to be connected directly to an
interface of the local system within the current network
instance. When the interface reference specified within the
next-hop entry is set (i.e., is not null) then forwarding is
restricted to being via the interface specified - and
recursion is hence disabled.";
      }
    }  // grouping local-static-nexthop-config

    grouping local-static-nexthop-state {
      description
        "Operational state parameters relating to a next-hop entry
for a static route";
    }  // grouping local-static-nexthop-state

    grouping local-static-top {
      description
        "Top-level grouping for the list of static route definitions";
      container static-routes {
        description
          "Enclosing container for the list of static routes";
        list static {
          key "prefix";
          description
            "List of locally configured static routes";
          leaf prefix {
            type leafref {
              path "../config/prefix";
            }
            description
              "Reference to the destination prefix list key.";
          }

          container config {
            description
              "Configuration data for static routes";
            uses local-static-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data for static routes";
            uses local-static-config;

            uses local-static-state;
          }  // container state

          container next-hops {
            description
              "Configuration and state parameters relating to the
next-hops that are to be utilised for the static
route being specified";
            list next-hop {
              key "index";
              description
                "A list of next-hops to be utilised for the static
route being specified.";
              leaf index {
                type leafref {
                  path "../config/index";
                }
                description
                  "A reference to the index of the current next-hop.
The index is intended to be a user-specified value
which can be used to reference the next-hop in
question, without any other semantics being
assigned to it.";
              }

              container config {
                description
                  "Configuration parameters relating to the next-hop
entry";
                uses local-static-nexthop-config;
              }  // container config

              container state {
                config false;
                description
                  "Operational state parameters relating to the
next-hop entry";
                uses local-static-nexthop-config;

                uses local-static-nexthop-state;
              }  // container state

              uses oc-if:interface-ref;
            }  // list next-hop
          }  // container next-hops
        }  // list static
      }  // container static-routes
    }  // grouping local-static-top

    grouping local-aggregate-config {
      description
        "Configuration data for aggregate routes";
      leaf prefix {
        type inet:ip-prefix;
        description
          "Aggregate prefix to be advertised";
      }

      leaf discard {
        type boolean;
        default "false";
        description
          "When true, install the aggregate route with a discard
next-hop -- traffic destined to the aggregate will be
discarded with no ICMP message generated.  When false,
traffic destined to an aggregate address when no
constituent routes are present will generate an ICMP
unreachable message.";
      }

      uses local-generic-settings;
    }  // grouping local-aggregate-config

    grouping local-aggregate-state {
      description
        "Operational state data for local aggregate advertisement
definitions";
    }  // grouping local-aggregate-state

    grouping local-aggregate-top {
      description
        "Top-level grouping for local aggregates";
      container local-aggregates {
        description
          "Enclosing container for locally-defined aggregate
routes";
        list aggregate {
          key "prefix";
          description "List of aggregates";
          leaf prefix {
            type leafref {
              path "../config/prefix";
            }
            description
              "Reference to the configured prefix for this aggregate";
          }

          container config {
            description
              "Configuration data for aggregate advertisements";
            uses local-aggregate-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data for aggregate
advertisements";
            uses local-aggregate-config;

            uses local-aggregate-state;
          }  // container state
        }  // list aggregate
      }  // container local-aggregates
    }  // grouping local-aggregate-top

    grouping local-routes-config {
      description
        "Configuration data for locally defined routes";
    }  // grouping local-routes-config

    grouping local-routes-state {
      description
        "Operational state data for locally defined routes";
    }  // grouping local-routes-state

    grouping local-routes-top {
      description
        "Top-level grouping for local routes";
      container local-routes {
        description
          "Top-level container for local routes";
        container config {
          description
            "Configuration data for locally defined routes";
          uses local-routes-config;
        }  // container config

        container state {
          config false;
          description
            "Operational state data for locally defined routes";
          uses local-routes-config;

          uses local-routes-state;
        }  // container state

        uses local-static-top;

        uses local-aggregate-top;
      }  // container local-routes
    }  // grouping local-routes-top

    uses local-routes-top;
  }  // module openconfig-local-routing

Summary

  
  
Organization OpenConfig working group
  
Module openconfig-local-routing
Version 2020-03-24
File openconfig-local-routing.yang
  
Prefix oc-loc-rt
Namespace http://openconfig.net/yang/local-routing
  
Cooked /cookedmodules/openconfig-local-routing/2020-03-24
YANG /src/openconfig-local-routing@2020-03-24.yang
XSD /xsd/openconfig-local-routing@2020-03-24.xsd
  
Abstract This module describes configuration and operational state data for routes that are locally generated, i.e., not created by dynam...
  
Contact
OpenConfig working group
www.openconfig.net

Description

 
This module describes configuration and operational state data
for routes that are locally generated, i.e., not created by
dynamic routing protocols.  These include static routes, locally
created aggregate routes for reducing the number of constituent
routes that must be advertised, summary routes for IGPs, etc.

This model expresses locally generated routes as generically as
possible, avoiding configuration of protocol-specific attributes
at the time of route creation.  This is primarily to avoid
assumptions about how underlying router implementations handle
route attributes in various routing table data structures they
maintain.  Hence, the definition of locally generated routes
essentially creates 'bare' routes that do not have any protocol-
specific attributes.

When protocol-specific attributes must be attached to a route
(e.g., communities on a locally defined route meant to be
advertised via BGP), the attributes should be attached via a
protocol-specific policy after importing the route into the
protocol for distribution (again via routing policy).

Typedefs

Typedef Base type Abstract
local-defined-next-hop identityref Pre-defined next-hop designation for locally generated routes

Groupings

Grouping Objects Abstract
local-aggregate-config prefix discard set-tag description Configuration data for aggregate routes
local-aggregate-state Operational state data for local aggregate advertisement definitions
local-aggregate-top local-aggregates Top-level grouping for local aggregates
local-generic-settings set-tag description Generic options that can be set on local routes When they are defined
local-routes-config Configuration data for locally defined routes
local-routes-state Operational state data for locally defined routes
local-routes-top local-routes Top-level grouping for local routes
local-static-config prefix set-tag description Configuration data for static routes.
local-static-nexthop-config index next-hop metric recurse Configuration parameters related to each next-hop entry specified for a static route
local-static-nexthop-state Operational state parameters relating to a next-hop entry for a static route
local-static-state Operational state data for static routes
local-static-top static-routes Top-level grouping for the list of static route definitions

Objects

Type Key
Mandatory config
Optional config
Not config
Object Type Abstract
local-routes container Top-level container for local routes
   config container Configuration data for locally defined routes
   local-aggregates container Enclosing container for locally-defined aggregate routes
      aggregate list List of aggregates
         config container Configuration data for aggregate advertisements
            description leaf An optional textual description for the route.
            discard leaf When true, install the aggregate route with a discard next-hop -- traffic destined to the aggregate will be discarded with no ICMP message generated. When false, traffic destined to an aggregate address when no constituent routes are present will generat...
            prefix leaf Aggregate prefix to be advertised
            set-tag leaf Set a generic tag value on the route. This tag can be used for filtering routes that are distributed to other routing protocols.
         prefix leaf Reference to the configured prefix for this aggregate
         state container Operational state data for aggregate advertisements
            description leaf An optional textual description for the route.
            discard leaf When true, install the aggregate route with a discard next-hop -- traffic destined to the aggregate will be discarded with no ICMP message generated. When false, traffic destined to an aggregate address when no constituent routes are present will generat...
            prefix leaf Aggregate prefix to be advertised
            set-tag leaf Set a generic tag value on the route. This tag can be used for filtering routes that are distributed to other routing protocols.
   state container Operational state data for locally defined routes
   static-routes container Enclosing container for the list of static routes
      static list List of locally configured static routes
         config container Configuration data for static routes
            description leaf An optional textual description for the route.
            prefix leaf Destination prefix for the static route, either IPv4 or IPv6.
            set-tag leaf Set a generic tag value on the route. This tag can be used for filtering routes that are distributed to other routing protocols.
         next-hops container Configuration and state parameters relating to the next-hops that are to be utilised for the static route being specified
            next-hop list A list of next-hops to be utilised for the static route being specified.
               config container Configuration parameters relating to the next-hop entry
                  index leaf An user-specified identifier utilised to uniquely reference the next-hop entry in the next-hop list. The value of this index has no semantic meaning other than for referencing the entry.
                  metric leaf A metric which is utilised to specify the preference of the next-hop entry when it is injected into the RIB. The lower the metric, the more preferable the prefix is. When this value is not specified the metric is inherited from the default metric utilised...
                  next-hop leaf The next-hop that is to be used for the static route - this may be specified as an IP address, an interface or a pre-defined next-hop type - for instance, DROP or LOCAL_LINK. When this leaf is not set, and the interface-ref value is specified for the next...
                  recurse leaf Determines whether the next-hop should be allowed to be looked up recursively - i.e., via a RIB entry which has been installed by a routing protocol, or another static route - rather than needing to be connected directly to an interface of the local syste...
               index leaf A reference to the index of the current next-hop. The index is intended to be a user-specified value which can be used to reference the next-hop in question, without any other semantics being assigned to it.
               interface-ref container Reference to an interface or subinterface
                  config container Configured reference to interface / subinterface
                     interface leaf Reference to a base interface. If a reference to a subinterface is required, this leaf must be specified to indicate the base interface.
                     subinterface leaf Reference to a subinterface -- this requires the base interface to be specified using the interface leaf in this container. If only a reference to a base interface is requuired, this leaf should not be set.
                  state container Operational state for interface-ref
                     interface leaf Reference to a base interface. If a reference to a subinterface is required, this leaf must be specified to indicate the base interface.
                     subinterface leaf Reference to a subinterface -- this requires the base interface to be specified using the interface leaf in this container. If only a reference to a base interface is requuired, this leaf should not be set.
               state container Operational state parameters relating to the next-hop entry
                  index leaf An user-specified identifier utilised to uniquely reference the next-hop entry in the next-hop list. The value of this index has no semantic meaning other than for referencing the entry.
                  metric leaf A metric which is utilised to specify the preference of the next-hop entry when it is injected into the RIB. The lower the metric, the more preferable the prefix is. When this value is not specified the metric is inherited from the default metric utilised...
                  next-hop leaf The next-hop that is to be used for the static route - this may be specified as an IP address, an interface or a pre-defined next-hop type - for instance, DROP or LOCAL_LINK. When this leaf is not set, and the interface-ref value is specified for the next...
                  recurse leaf Determines whether the next-hop should be allowed to be looked up recursively - i.e., via a RIB entry which has been installed by a routing protocol, or another static route - rather than needing to be connected directly to an interface of the local syste...
         prefix leaf Reference to the destination prefix list key.
         state container Operational state data for static routes
            description leaf An optional textual description for the route.
            prefix leaf Destination prefix for the static route, either IPv4 or IPv6.
            set-tag leaf Set a generic tag value on the route. This tag can be used for filtering routes that are distributed to other routing protocols.