1112 lines
36 KiB
YANG
1112 lines
36 KiB
YANG
module ietf-routing {
|
|
|
|
namespace "urn:ietf:params:xml:ns:yang:ietf-routing";
|
|
|
|
prefix "rt";
|
|
|
|
import ietf-yang-types {
|
|
prefix "yang";
|
|
revision-date "2013-07-15";
|
|
}
|
|
|
|
import ietf-interfaces {
|
|
prefix "if";
|
|
revision-date "2014-05-08";
|
|
}
|
|
|
|
import ietf-inet-types {
|
|
prefix "inet";
|
|
revision-date "2013-07-15";
|
|
}
|
|
|
|
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).
|
|
|
|
This version of this YANG module is part of RFC XXXX; see the
|
|
RFC itself for full legal notices.";
|
|
|
|
revision 2014-10-26 {
|
|
description
|
|
"Initial revision.";
|
|
reference
|
|
"RFC XXXX: A YANG Data Model for Routing Management";
|
|
}
|
|
|
|
/* Features */
|
|
|
|
feature multiple-ribs {
|
|
description
|
|
"This feature indicates that the server supports user-defined
|
|
RIBS and the framework for passing routes between RIBs.
|
|
|
|
Servers that do not advertize this feature MUST provide
|
|
exactly one system-controlled RIB per supported address family
|
|
and make them also the default RIBs. These RIBs then appear as
|
|
entries of the list /routing-state/ribs/rib.";
|
|
}
|
|
|
|
feature multipath-routes {
|
|
description
|
|
|
|
"This feature indicates that the server supports multipath
|
|
routes that have a list of next-hops.";
|
|
}
|
|
|
|
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 advertize this feature set a router ID
|
|
algorithmically, usually to one of configured IPv4 addresses.
|
|
However, this algorithm is implementation-specific.";
|
|
}
|
|
|
|
/* Identities */
|
|
|
|
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 routing-protocol {
|
|
description
|
|
"Base identity from which routing protocol identities are
|
|
derived.";
|
|
}
|
|
|
|
identity direct {
|
|
base routing-protocol;
|
|
description
|
|
"Routing pseudo-protocol which provides routes to directly
|
|
connected networks.";
|
|
}
|
|
|
|
identity static {
|
|
base routing-protocol;
|
|
description
|
|
"Static routing pseudo-protocol.";
|
|
}
|
|
|
|
identity route-filter {
|
|
description
|
|
"Base identity from which all route filters are derived.";
|
|
}
|
|
|
|
identity deny-all-route-filter {
|
|
base route-filter;
|
|
description
|
|
"Route filter that blocks all routes.";
|
|
}
|
|
|
|
identity allow-all-route-filter {
|
|
base route-filter;
|
|
description
|
|
"Route filter that permits all routes.";
|
|
}
|
|
|
|
/* Type Definitions */
|
|
|
|
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 rib-ref {
|
|
type leafref {
|
|
path "/rt:routing/rt:ribs/rt:rib/rt:name";
|
|
}
|
|
description
|
|
"This type is used for leafs that reference a RIB
|
|
configuration.";
|
|
}
|
|
|
|
typedef rib-state-ref {
|
|
type leafref {
|
|
path "/rt:routing-state/rt:ribs/rt:rib/rt:name";
|
|
}
|
|
description
|
|
"This type is used for leafs that reference a RIB in state
|
|
data.";
|
|
}
|
|
|
|
typedef next-hop-list-ref {
|
|
type leafref {
|
|
path "/rt:routing-state/rt:next-hop-lists/rt:next-hop-list/"
|
|
+ "rt:id";
|
|
}
|
|
description
|
|
"This type is used for leafs that reference a next-hop list (in
|
|
state data).";
|
|
}
|
|
|
|
typedef route-filter-ref {
|
|
type leafref {
|
|
path "/rt:routing/rt:route-filters/rt:route-filter/rt:name";
|
|
}
|
|
description
|
|
"This type is used for leafs that reference a route filter
|
|
configuration.";
|
|
}
|
|
|
|
typedef route-filter-state-ref {
|
|
type leafref {
|
|
path "/rt:routing-state/rt:route-filters/rt:route-filter/"
|
|
+ "rt:name";
|
|
}
|
|
description
|
|
"This type is used for leafs that reference state data of a
|
|
route filter.";
|
|
}
|
|
|
|
typedef route-preference {
|
|
type uint32;
|
|
description
|
|
"This type is used for route preferences.";
|
|
}
|
|
|
|
/* Groupings */
|
|
|
|
grouping address-family {
|
|
description
|
|
"This grouping provides a leaf identifying an address
|
|
family.";
|
|
leaf address-family {
|
|
type identityref {
|
|
base address-family;
|
|
}
|
|
mandatory "true";
|
|
description
|
|
"Address family.";
|
|
}
|
|
}
|
|
|
|
grouping state-entry-id {
|
|
description
|
|
"This grouping provides a unique identifier for entries in
|
|
several operational state lists.";
|
|
leaf id {
|
|
type uint64;
|
|
description
|
|
"Unique numerical identifier of a list entry in operational
|
|
state. It may be used by protocols or tools that inspect
|
|
and/or manipulate operational state data and prefer
|
|
fixed-size integers as list entry handles.
|
|
|
|
These identifiers are always ephemeral, i.e., they may
|
|
change after a reboot.";
|
|
}
|
|
}
|
|
|
|
grouping router-id {
|
|
description
|
|
"This grouping provides router ID.";
|
|
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.";
|
|
}
|
|
}
|
|
|
|
grouping next-hop-classifiers {
|
|
description
|
|
"This grouping provides two next-hop classifiers.";
|
|
leaf priority {
|
|
type enumeration {
|
|
enum primary {
|
|
value "1";
|
|
description
|
|
"Primary next-hop.";
|
|
}
|
|
enum backup {
|
|
value "2";
|
|
description
|
|
"Backup next-hop.";
|
|
}
|
|
}
|
|
description
|
|
"Simple priority for distinguishing between primary and
|
|
backup next-hops.
|
|
|
|
Backup next-hops are used if and only if no primary
|
|
next-hops are reachable.";
|
|
}
|
|
leaf weight {
|
|
type uint8;
|
|
must ". = 0 or not(../../next-hop/weight = 0)" {
|
|
error-message "Illegal combination of zero and non-zero "
|
|
+ "next-hop weights.";
|
|
description
|
|
"Next-hop weights must be either all zero (equal
|
|
load-balancing) or all non-zero.";
|
|
}
|
|
description
|
|
"This parameter specifies the weight of the next-hop for load
|
|
balancing. The number specifies the relative fraction of the
|
|
traffic that will use the corresponding next-hop.
|
|
|
|
A value of 0 represents equal load-balancing.
|
|
|
|
If both primary and backup next-hops are present, then the
|
|
weights for each priority level are used separately.";
|
|
}
|
|
}
|
|
|
|
grouping special-next-hop {
|
|
description
|
|
"This grouping provides a leaf with enumeration of special
|
|
next-hops.";
|
|
leaf special-next-hop {
|
|
type enumeration {
|
|
enum blackhole {
|
|
description
|
|
"Silently discard the packet.";
|
|
}
|
|
enum unreachable {
|
|
description
|
|
"Discard the packet and notify the sender with an error
|
|
message indicating that the destination host is
|
|
unreachable.";
|
|
}
|
|
enum prohibit {
|
|
description
|
|
"Discard the packet and notify the sender with an error
|
|
message indicating that the communication is
|
|
administratively prohibited.";
|
|
}
|
|
enum receive {
|
|
description
|
|
"The packet will be received by the local system.";
|
|
}
|
|
}
|
|
description
|
|
"Special next-hop options.";
|
|
}
|
|
}
|
|
|
|
grouping next-hop-content {
|
|
description
|
|
"Generic parameters of next-hops in static routes.";
|
|
choice next-hop-options {
|
|
mandatory "true";
|
|
description
|
|
"Options for next-hops in static routes.";
|
|
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 leafref {
|
|
path "/rt:routing/rt:routing-instance/rt:interfaces/"
|
|
+ "rt:interface/rt:name";
|
|
}
|
|
description
|
|
"Name of the outgoing interface.";
|
|
}
|
|
}
|
|
case special-next-hop {
|
|
uses special-next-hop;
|
|
}
|
|
}
|
|
}
|
|
|
|
grouping next-hop-state-content {
|
|
description
|
|
"Generic parameters of next-hops in state data.";
|
|
choice next-hop-options {
|
|
mandatory "true";
|
|
description
|
|
"Options for next-hops in state data.";
|
|
leaf next-hop-list {
|
|
type next-hop-list-ref;
|
|
description
|
|
"Reference to a next-hop list.";
|
|
}
|
|
leaf use-rib {
|
|
type rib-state-ref;
|
|
description
|
|
"Reference to a RIB in which a new look-up is to be
|
|
performed.";
|
|
}
|
|
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 leafref {
|
|
path "/rt:routing-state/rt:routing-instance/"
|
|
+ "rt:interfaces/rt:interface/rt:name";
|
|
}
|
|
description
|
|
"Name of the outgoing interface.";
|
|
}
|
|
}
|
|
case special-next-hop {
|
|
uses special-next-hop;
|
|
}
|
|
}
|
|
}
|
|
|
|
grouping route-metadata {
|
|
description
|
|
"Route metadata.";
|
|
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.";
|
|
}
|
|
}
|
|
|
|
/* Operational state data */
|
|
|
|
container routing-state {
|
|
config "false";
|
|
description
|
|
"Operational state of the routing subsystem.";
|
|
list routing-instance {
|
|
key "name";
|
|
unique "id";
|
|
min-elements "1";
|
|
description
|
|
"Each list entry is a container for operational state data of
|
|
a routing instance.
|
|
|
|
An implementation MAY create one or more system-controlled
|
|
instances, other user-controlled instances MAY be created by
|
|
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.";
|
|
}
|
|
uses state-entry-id {
|
|
refine "id" {
|
|
mandatory "true";
|
|
}
|
|
}
|
|
leaf type {
|
|
type identityref {
|
|
base routing-instance;
|
|
}
|
|
description
|
|
"The routing instance type.";
|
|
}
|
|
container default-ribs {
|
|
description
|
|
"Default RIBs used by the routing instance.";
|
|
list default-rib {
|
|
key "address-family";
|
|
description
|
|
"Each list entry specifies the default RIB for one
|
|
address family.
|
|
|
|
The default RIB is operationally connected to all
|
|
routing protocols for which a connected RIB has not been
|
|
explicitly configured.
|
|
|
|
The 'direct' pseudo-protocol is always connected to the
|
|
default RIBs.";
|
|
uses address-family;
|
|
leaf rib-name {
|
|
type rib-state-ref;
|
|
mandatory "true";
|
|
description
|
|
"Name of an existing RIB to be used as the default RIB
|
|
for the given routing instance and address family.";
|
|
}
|
|
}
|
|
}
|
|
container interfaces {
|
|
description
|
|
"Network layer interfaces belonging to the routing
|
|
instance.";
|
|
list interface {
|
|
key "name";
|
|
description
|
|
"List of network layer interfaces assigned to the routing
|
|
instance.";
|
|
leaf name {
|
|
type if:interface-state-ref;
|
|
description
|
|
"A reference to the name of a configured network layer
|
|
interface.";
|
|
}
|
|
}
|
|
}
|
|
container routing-protocols {
|
|
description
|
|
"Container for the list of routing protocol instances.";
|
|
list routing-protocol {
|
|
key "type name";
|
|
description
|
|
"Operational state 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.";
|
|
}
|
|
leaf route-preference {
|
|
type route-preference;
|
|
mandatory "true";
|
|
description
|
|
"The value of route preference (administrative
|
|
distance) assigned to all routes generated by the
|
|
routing protocol instance. A lower value means a more
|
|
preferred route.";
|
|
}
|
|
container connected-ribs {
|
|
description
|
|
"Container for connected RIBs.";
|
|
list connected-rib {
|
|
key "rib-name";
|
|
description
|
|
"List of RIBs to which the routing protocol instance
|
|
is connected.
|
|
|
|
By default, routes learned by the routing protocol
|
|
instance are installed in all connected RIBs of the
|
|
matching address family, and, conversely, all routes
|
|
from connected RIBs are installed in the routing
|
|
protocol instance. However, routing protocols may
|
|
specify other rules.";
|
|
leaf rib-name {
|
|
type rib-state-ref;
|
|
description
|
|
"Name of an existing RIB.";
|
|
}
|
|
leaf import-filter {
|
|
type route-filter-state-ref;
|
|
description
|
|
"Reference to a route filter that is used for
|
|
filtering routes passed from this routing protocol
|
|
instance to the RIB specified by the 'rib-name'
|
|
sibling node.
|
|
|
|
If this leaf is not present, the behavior is
|
|
protocol-specific, but typically it means that all
|
|
routes are accepted.";
|
|
}
|
|
leaf export-filter {
|
|
type route-filter-state-ref;
|
|
description
|
|
"Reference to a route filter that is used for
|
|
filtering routes passed from the RIB specified by
|
|
the 'rib-name' sibling node to this routing
|
|
protocol instance.
|
|
|
|
If this leaf is not present, the behavior is
|
|
protocol-specific - typically it means that all
|
|
routes are accepted.
|
|
|
|
The 'direct' and 'static' pseudo-protocols accept
|
|
no routes from any RIB.";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
container next-hop-lists {
|
|
description
|
|
"Container for next-hop lists.";
|
|
list next-hop-list {
|
|
key "id";
|
|
description
|
|
"Next-hop list.";
|
|
uses state-entry-id;
|
|
uses address-family;
|
|
list next-hop {
|
|
description
|
|
"Entry in a next-hop list.";
|
|
uses next-hop-state-content;
|
|
uses next-hop-classifiers;
|
|
}
|
|
}
|
|
}
|
|
container ribs {
|
|
description
|
|
"Container for RIBs.";
|
|
list rib {
|
|
key "name";
|
|
unique "id";
|
|
description
|
|
"Each entry represents a RIB identified by the 'name' key.
|
|
All routes in a RIB MUST belong to the same address
|
|
family.
|
|
|
|
The server MUST provide a system-controlled default RIB
|
|
for each address family, and MAY provide other
|
|
system-controlled RIBs. Additional RIBs MAY be created in
|
|
the configuration.";
|
|
leaf name {
|
|
type string;
|
|
description
|
|
"The name of the RIB.";
|
|
}
|
|
uses state-entry-id {
|
|
refine "id" {
|
|
mandatory "true";
|
|
}
|
|
}
|
|
uses address-family;
|
|
container routes {
|
|
description
|
|
"Current content of the RIB.";
|
|
list route {
|
|
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.";
|
|
}
|
|
container next-hop {
|
|
description
|
|
"Route's next-hop attribute.";
|
|
uses next-hop-state-content;
|
|
}
|
|
uses route-metadata;
|
|
}
|
|
}
|
|
container recipient-ribs {
|
|
description
|
|
"Container for recipient RIBs.";
|
|
list recipient-rib {
|
|
key "rib-name";
|
|
description
|
|
"List of RIBs that receive routes from this RIB.";
|
|
leaf rib-name {
|
|
type rib-state-ref;
|
|
description
|
|
"The name of the recipient RIB.";
|
|
}
|
|
leaf filter {
|
|
type route-filter-state-ref;
|
|
description
|
|
"A route filter which is applied to the routes passed
|
|
to the recipient RIB.";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
container route-filters {
|
|
description
|
|
"Container for route filters.";
|
|
list route-filter {
|
|
key "name";
|
|
description
|
|
"Route filters are used for filtering and/or manipulating
|
|
routes that are passed between a routing protocol and a
|
|
RIB and vice versa, or between two RIBs.
|
|
|
|
It is expected that other modules augment this list with
|
|
contents specific for a particular route filter type.";
|
|
leaf name {
|
|
type string;
|
|
description
|
|
"The name of the route filter.";
|
|
}
|
|
leaf type {
|
|
type identityref {
|
|
base route-filter;
|
|
}
|
|
mandatory "true";
|
|
description
|
|
"Type of the route-filter - an identity derived from the
|
|
'route-filter' base identity.";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Configuration Data */
|
|
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 operational state data,
|
|
despite any other configuration that might be present.";
|
|
}
|
|
uses router-id {
|
|
if-feature router-id;
|
|
description
|
|
"Configuration of the global router ID. Routing protocols
|
|
that use router ID can use this parameter or override it
|
|
with another value.";
|
|
}
|
|
leaf description {
|
|
type string;
|
|
description
|
|
"Textual description of the routing instance.";
|
|
}
|
|
container default-ribs {
|
|
if-feature multiple-ribs;
|
|
description
|
|
"Configuration of the default RIBs used by the routing
|
|
instance.
|
|
|
|
The default RIB for an addressed family if by default
|
|
connected to all routing protocol instances supporting
|
|
that address family, and always receives direct routes.";
|
|
list default-rib {
|
|
must "address-family=/routing/ribs/rib[name=current()/"
|
|
+ "rib-name]/address-family" {
|
|
error-message "Address family mismatch.";
|
|
description
|
|
"The entry's address family MUST match that of the
|
|
referenced RIB.";
|
|
}
|
|
key "address-family";
|
|
description
|
|
"Each list entry configures the default RIB for one
|
|
address family.";
|
|
uses address-family;
|
|
leaf rib-name {
|
|
type string;
|
|
mandatory "true";
|
|
description
|
|
"Name of an existing RIB to be used as the default RIB
|
|
for the given routing instance and address family.";
|
|
}
|
|
}
|
|
}
|
|
container interfaces {
|
|
description
|
|
"Configuration of the routing instance's interfaces.";
|
|
list interface {
|
|
key "name";
|
|
description
|
|
"List of network layer interfaces assigned to the routing
|
|
instance.";
|
|
leaf name {
|
|
type if:interface-ref;
|
|
description
|
|
"A reference to the name of a configured network layer
|
|
interface.";
|
|
}
|
|
}
|
|
}
|
|
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.";
|
|
}
|
|
leaf enabled {
|
|
type boolean;
|
|
default "true";
|
|
description
|
|
"Enable/disable the routing protocol instance.
|
|
|
|
If this parameter is false, the parent routing
|
|
protocol instance is disabled and does not appear in
|
|
operational state data, despite any other
|
|
configuration that might be present.";
|
|
}
|
|
leaf route-preference {
|
|
type route-preference;
|
|
description
|
|
"The value of route preference (administrative
|
|
distance).
|
|
|
|
The default value depends on the routing protocol
|
|
type, and may also be implementation-dependent.";
|
|
}
|
|
container connected-ribs {
|
|
description
|
|
"Configuration of connected RIBs.";
|
|
list connected-rib {
|
|
key "rib-name";
|
|
description
|
|
"Each entry configures a RIB to which the routing
|
|
protocol instance is connected.
|
|
If no connected RIB is configured for an address
|
|
family, the routing protocol is connected to the
|
|
default RIB for that address family.";
|
|
leaf rib-name {
|
|
type rib-ref;
|
|
must "../../../type != 'rt:direct' or "
|
|
+ "../../../../../default-ribs/ "
|
|
+ "default-rib/rib-name=." {
|
|
error-message "The 'direct' protocol can be "
|
|
+ "connected only to a default RIB.";
|
|
description
|
|
"For the 'direct' pseudo-protocol, the connected
|
|
RIB must always be a default RIB.";
|
|
}
|
|
description
|
|
"Name of an existing RIB.";
|
|
}
|
|
leaf import-filter {
|
|
type route-filter-ref;
|
|
description
|
|
"Configuration of import filter.";
|
|
}
|
|
leaf export-filter {
|
|
type route-filter-ref;
|
|
description
|
|
"Configuration of export filter.";
|
|
}
|
|
}
|
|
}
|
|
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 ribs {
|
|
description
|
|
"Configuration of RIBs.";
|
|
list rib {
|
|
key "name";
|
|
description
|
|
"Each entry represents a configured RIB identified by the
|
|
'name' key.
|
|
|
|
Entries having the same key as a system-controlled entry
|
|
of the list /routing-state/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.";
|
|
}
|
|
uses address-family;
|
|
leaf description {
|
|
type string;
|
|
description
|
|
"Textual description of the RIB.";
|
|
}
|
|
container recipient-ribs {
|
|
if-feature multiple-ribs;
|
|
description
|
|
"Configuration of recipient RIBs.";
|
|
list recipient-rib {
|
|
must "rib-name != ../../name" {
|
|
error-message
|
|
"Source and recipient RIBs are identical.";
|
|
description
|
|
"A RIB MUST NOT appear among its recipient RIBs.";
|
|
}
|
|
must "/routing/ribs/rib[name=current()/rib-name]/"
|
|
+ "address-family=../../address-family" {
|
|
error-message "Address family mismatch.";
|
|
description
|
|
"Address family of the recipient RIB MUST match that
|
|
of the source RIB.";
|
|
}
|
|
key "rib-name";
|
|
description
|
|
"Each entry configures a recipient RIB.";
|
|
leaf rib-name {
|
|
type rib-ref;
|
|
description
|
|
"The name of the recipient RIB.";
|
|
}
|
|
leaf filter {
|
|
type route-filter-ref;
|
|
description
|
|
"A route filter which is applied to the routes passed
|
|
to the recipient RIB.";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
container route-filters {
|
|
description
|
|
"Configuration of route filters.";
|
|
list route-filter {
|
|
key "name";
|
|
description
|
|
"Each entry configures a named route filter.";
|
|
leaf name {
|
|
type string;
|
|
description
|
|
"The name of the route filter.";
|
|
}
|
|
leaf description {
|
|
type string;
|
|
description
|
|
"Textual description of the route filter.";
|
|
}
|
|
leaf type {
|
|
type identityref {
|
|
base route-filter;
|
|
}
|
|
mandatory "true";
|
|
description
|
|
"Type of the route filter..";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* RPC methods */
|
|
|
|
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 routing-instance-state-ref;
|
|
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'.";
|
|
uses address-family;
|
|
}
|
|
}
|
|
output {
|
|
container route {
|
|
description
|
|
"The active route for the specified destination.
|
|
|
|
If the routing instance has no active 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.";
|
|
uses address-family;
|
|
container next-hop {
|
|
description
|
|
"Route's next-hop attribute.";
|
|
uses next-hop-state-content;
|
|
}
|
|
uses route-metadata;
|
|
}
|
|
}
|
|
}
|
|
|
|
rpc route-count {
|
|
description
|
|
"Return the current number of routes in a RIB.";
|
|
input {
|
|
leaf rib-name {
|
|
type rib-state-ref;
|
|
mandatory "true";
|
|
description
|
|
"Name of the RIB.
|
|
|
|
If the RIB 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
|
|
'rib-not-found'.";
|
|
}
|
|
}
|
|
output {
|
|
leaf number-of-routes {
|
|
type uint64;
|
|
mandatory "true";
|
|
description
|
|
"Number of routes in the RIB.";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|