netconfcentral logo

ietf-routing

HTML

ietf-routing.yang



  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;
    }
    import iana-afn-safi {
      prefix ianaaf;
    }

    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: David Kessens
     <mailto:david.kessens@nsn.com>

     WG Chair: Juergen Schoenwaelder
     <mailto:j.schoenwaelder@jacobs-university.de>

     Editor: Ladislav Lhotka
     <mailto:lhotka@nic.cz>
    ";

    description
      "This module contains YANG definitions of essential components
     that may be used for configuring a routing subsystem.

     Copyright (c) 2012 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 "2012-02-20" {
      description "Initial revision.";
      reference
        "RFC XXXX: A YANG Data Model for Routing Configuration";

    }


    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.";
    }

    typedef router-ref {
      type leafref {
        path "/rt:routing/rt:router/rt:name";
      }
      description
        "This type is used for leafs that reference a router
       instance.";
    }

    grouping afn-safi {
      description
        "This grouping provides two parameters specifying address
       family and subsequent address family.";
      leaf address-family {
        type ianaaf:address-family;
        default "ipV4";
        description
          "Address family of routes in the routing table.";
      }

      leaf safi {
        type ianaaf:subsequent-address-family;
        default "nlri-unicast";
        description
          "Subsequent address family identifier of routes in the
         routing table.";
      }
    }  // grouping afn-safi

    grouping route-content {
      description
        "Generic parameters of routes.

       A module for an address family should define a specific
       version of this grouping containing 'uses rt:route-content'.
      ";
      leaf outgoing-interface {
        type if:interface-ref;
        description "Outgoing interface.";
      }
    }  // grouping route-content

    rpc get-route {
      description
        "Query the forwarding information base of a router instance
       whose name is given as the first parameter 'router-name'. The
       second parameter 'destination-address' should be augmented in
       order to support destination addresses of all supported
       address families. The server returns the route which is
       currently used for forwarding datagrams to that destination
       address, or an error message, if no such route exists.";
      input {
        leaf router-name {
          type router-ref;
          mandatory true;
          description
            "First parameter: name of the router instance whose
           forwarding information base is queried.";
        }

        container destination-address {
          description
            "Second parameter: destination address.

           AFN/SAFI-specific modules must augment this container with
           a leaf named 'address'.
          ";
          uses afn-safi;
        }  // container destination-address
      }

      output {
        container route {
          description
            "Contents of the reply specific for each address family
           should be defined through augmenting.";
          uses afn-safi;
        }  // container route
      }
    }  // rpc get-route

    container routing {
      description "Routing parameters.";
      list router {
        key "name";
        unique "interfaces/interface/name";
        description
          "Each list entry is a container for configuration and
         operational state data of a single (logical) router.";
        leaf name {
          type string;
          description
            "The unique router name.";
        }

        leaf description {
          type string;
          description
            "Textual description of the router.";
        }

        leaf enabled {
          type boolean;
          default "true";
          description
            "Enable or disable the router. The default value is 'true',
           which means that the router is enabled.";
        }

        container interfaces {
          description
            "Router interface parameters.";
          list interface {
            key "name";
            description
              "List of logical interfaces assigned to the router
             instance. Any logical interface can only be assigned to
             one router instance.";
            leaf name {
              type if:interface-ref;
              description
                "A reference to the name of a configured logical
               interface.";
            }
          }  // list interface
        }  // container interfaces

        container routing-protocols {
          description
            "Container for the list of configured routing protocol
           instances.";
          list routing-protocol {
            key "name";
            description
              "An instance of a routing protocol.";
            leaf name {
              type string;
              description
                "The name of the routing protocol instance.";
            }

            leaf description {
              type string;
              description
                "Textual description of the routing protocol
               instance.";
            }

            leaf type {
              type identityref {
                base routing-protocol;
              }
              mandatory true;
              description
                "Type of the routing protocol - an identity derived
               from the 'routing-protocol' base identity.";
            }

            container connected-routing-tables {
              description
                "Container for connected routing tables.";
              list routing-table {
                must
                  "not(../../../../routing-tables/"
                    + "routing-table[current()/"
                    + "preceding-sibling::routing-table/name]/"
                    + "address-family=../../../../routing-tables/"
                    + "routing-table[current()/name]/"
                    + "address-family and ../../../../routing-tables/"
                    + "routing-table[current()/"
                    + "preceding-sibling::routing-table/name]/safi=../"
                    + "../../../routing-tables/routing-table[current()/"
                    + "name]/safi)" {
                  error-message
                    "Each routing protocol may have no more than one
                   connected routing table for each AFN and SAFI.";
                  description
                    "For each AFN/SAFI pair there may be at most one
                   connected routing table.";
                }
                key "name";
                description
                  "List of routing tables to which the routing protocol
                 instance is connected.

                 Implementation may provide default routing tables
                 for some AFN/SAFI pairs, which are used if the
                 corresponding entry is not configured.
                ";
                leaf name {
                  type leafref {
                    path "../../../../../routing-tables/routing-table/name";
                  }
                  description
                    "Reference to an existing routing table.";
                }

                leaf import-filter {
                  type leafref {
                    path "../../../../../route-filters/route-filter/name";
                  }
                  description
                    "Reference to a route filter that is used for
                   filtering routes passed from this routing protocol
                   instance to the routing table specified by the
                   '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 leafref {
                    path "../../../../../route-filters/route-filter/name";
                  }
                  description
                    "Reference to a route filter that is used for
                   filtering routes passed from the routing table
                   specified by the '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,
                   except for the 'direct' and 'static'
                   pseudo-protocols which accept no routes from any
                   routing table.";
                }
              }  // list routing-table
            }  // container connected-routing-tables

            container static-routes {
              must "../type='static'" {
                error-message
                  "Static routes may be configured only for 'static'
                 routing protocol.";
                description
                  "This container is only valid for the 'static'
                 routing protocol.";
              }
              description
                "Configuration of 'static' pseudo-protocol.";
            }  // container static-routes
          }  // list routing-protocol
        }  // container routing-protocols

        container route-filters {
          description
            "Container for configured 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
             routing table or vice versa, or between two routing
             tables. 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 description {
              type string;
              description
                "Textual description of the route filter.";
            }

            leaf type {
              type identityref {
                base route-filter;
              }
              default
                "deny-all-route-filter";
              description
                "Type of the route-filter - an identity derived from
               the 'route-filter' base identity. The default value
               represents an all-blocking filter.";
            }
          }  // list route-filter
        }  // container route-filters

        container routing-tables {
          description
            "Container for configured routing tables.";
          list routing-table {
            key "name";
            description
              "Each entry represents a routing table identified by the
             'name' key. All routes in a routing table must have the
             same AFN and SAFI.";
            leaf name {
              type string;
              description
                "The name of the routing table.";
            }

            uses afn-safi;

            leaf description {
              type string;
              description
                "Textual description of the routing table.";
            }

            container routes {
              config false;
              description
                "Current contents of the routing table (operational
               state data).";
              list route {
                description
                  "A routing table entry. This data node must augmented
                 with information specific for routes of each address
                 family.";
                leaf source-protocol {
                  type leafref {
                    path "../../../../../routing-protocols/routing-protocol/name";
                  }
                  description
                    "The name of the routing protocol instance from
                   which the route comes. This routing protocol must
                   be configured (automatically or manually) in the
                   device.";
                }

                leaf last-modified {
                  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 to the routing
                   table.";
                }
              }  // list route
            }  // container routes

            list recipient-routing-tables {
              key "recipient-name";
              description
                "A list of routing tables that receive routes from this
               routing table.";
              leaf recipient-name {
                type leafref {
                  path "../../../routing-table/name";
                }
                description
                  "The name of the recipient routing table.";
              }

              leaf filter {
                type leafref {
                  path "../../../../route-filters/route-filter/name";
                }
                description
                  "A route filter which is applied to the routes passed
                 on to the recipient routing table.";
              }
            }  // list recipient-routing-tables
          }  // list routing-table
        }  // container routing-tables
      }  // list router
    }  // container routing
  }  // module ietf-routing

Summary

  
  
Organization IETF NETMOD (NETCONF Data Modeling Language) Working Group
  
Module ietf-routing
Version 2012-02-20
File ietf-routing.yang
  
Prefix rt
Namespace urn:ietf:params:xml:ns:yang:ietf-routing
  
Cooked /cookedmodules/ietf-routing/2012-02-20
YANG /src/ietf-routing@2012-02-20.yang
XSD /xsd/ietf-routing@2012-02-20.xsd
  
Abstract This module contains YANG definitions of essential components that may be used for configuring a routing subsystem. Copyright (...
  
Contact
WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>

WG Chair: David Kessens
<mailto:david.kessens@nsn.com>

WG Chair: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>

Editor: Ladislav Lhotka
<mailto:lhotka@nic.cz>

Description

 
This module contains YANG definitions of essential components
that may be used for configuring a routing subsystem.

Copyright (c) 2012 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.

Typedefs

Typedef Base type Abstract
router-ref leafref This type is used for leafs that reference a router instance.

Groupings

Grouping Objects Abstract
afn-safi address-family safi This grouping provides two parameters specifying address family and subsequent address family.
route-content outgoing-interface Generic parameters of routes. A module for an address family should define a specific version of this grouping containing 'uses rt:route-content'.

Objects

Type Key
Mandatory config
Optional config
Not config
Object Type Abstract
routing container Routing parameters.
   router list Each list entry is a container for configuration and operational state data of a single (logical) router.
      description leaf Textual description of the router.
      enabled leaf Enable or disable the router. The default value is 'true', which means that the router is enabled.
      interfaces container Router interface parameters.
         interface list List of logical interfaces assigned to the router instance. Any logical interface can only be assigned to one router instance.
            name leaf A reference to the name of a configured logical interface.
      name leaf The unique router name.
      route-filters container Container for configured route filters.
         route-filter list Route filters are used for filtering and/or manipulating routes that are passed between a routing protocol and a routing table or vice versa, or between two routing tables. It is expected that other modules augment this list with contents specific for a p...
            description leaf Textual description of the route filter.
            name leaf The name of the route filter.
            type leaf Type of the route-filter - an identity derived from the 'route-filter' base identity. The default value represents an all-blocking filter.
      routing-protocols container Container for the list of configured routing protocol instances.
         routing-protocol list An instance of a routing protocol.
            connected-routing-tables container Container for connected routing tables.
               routing-table list List of routing tables to which the routing protocol instance is connected. Implementation may provide default routing tables for some AFN/SAFI pairs, which are used if the corresponding entry is not configured.
                  export-filter leaf Reference to a route filter that is used for filtering routes passed from the routing table specified by the 'name' sibling node to this routing protocol instance. If this leaf is not present, the behavior is protocol-specific - typically it means that al...
                  import-filter leaf Reference to a route filter that is used for filtering routes passed from this routing protocol instance to the routing table specified by the 'name' sibling node. If this leaf is not present, the behavior is protocol-specific, but typically it means that...
                  name leaf Reference to an existing routing table.
            description leaf Textual description of the routing protocol instance.
            name leaf The name of the routing protocol instance.
            static-routes container Configuration of 'static' pseudo-protocol.
            type leaf Type of the routing protocol - an identity derived from the 'routing-protocol' base identity.
      routing-tables container Container for configured routing tables.
         routing-table list Each entry represents a routing table identified by the 'name' key. All routes in a routing table must have the same AFN and SAFI.
            address-family leaf Address family of routes in the routing table.
            description leaf Textual description of the routing table.
            name leaf The name of the routing table.
            recipient-routing-tables list A list of routing tables that receive routes from this routing table.
               filter leaf A route filter which is applied to the routes passed on to the recipient routing table.
               recipient-name leaf The name of the recipient routing table.
            routes container Current contents of the routing table (operational state data).
               route list A routing table entry. This data node must augmented with information specific for routes of each address family.
                  last-modified leaf Time stamp of the last modification of the route. If the route was never modified, it is the time when the route was inserted to the routing table.
                  source-protocol leaf The name of the routing protocol instance from which the route comes. This routing protocol must be configured (automatically or manually) in the device.
            safi leaf Subsequent address family identifier of routes in the routing table.

RPC Methods

RPC Abstract
get-route Query the forwarding information base of a router instance whose name is given as the first parameter 'router-name'. The second parameter 'destination-address' should be augmented in order to support destination addresses of all supported address families...