Text files for the RIB Module.  

 

Sue 




Network Working Group                                    N. Bahadur, Ed.
Internet-Draft                                         Bracket Computing
Intended status: Informational                            R. Folkes, Ed.
Expires: September 6, 2015                        Juniper Networks, Inc.
                                                            S. Kini, Ed.
                                                                Ericsson
                                                               J. Medved
                                                                   Cisco
                                                          March 05, 2015


                  Routing Information Base Info Model
                   draft-ietf-i2rs-rib-info-model-06

Abstract

   Routing and routing functions in enterprise and carrier networks are
   typically performed by network devices (routers and switches) using a
   routing information base (RIB).  Protocols and configuration push
   data into the RIB and the RIB manager installs state into the
   hardware; for packet forwarding.  This draft specifies an information
   model for the RIB to enable defining a standardized data model.  Such
   a data model can be used to define an interface to the RIB from an
   entity that may even be external to the network device.  This
   interface can be used to support new use-cases being defined by the
   IETF I2RS WG.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on September 6, 2015.








Bahadur, et al.         Expires September 6, 2015               [Page 1]

Internet-Draft     Routing Information Base Info Model        March 2015


Copyright Notice

   Copyright (c) 2015 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  Conventions used in this document . . . . . . . . . . . .   5
   2.  RIB data  . . . . . . . . . . . . . . . . . . . . . . . . . .   5
     2.1.  RIB definition  . . . . . . . . . . . . . . . . . . . . .   5
     2.2.  Routing instance  . . . . . . . . . . . . . . . . . . . .   6
     2.3.  Route . . . . . . . . . . . . . . . . . . . . . . . . . .   7
     2.4.  Nexthop . . . . . . . . . . . . . . . . . . . . . . . . .   8
       2.4.1.  Nexthop types . . . . . . . . . . . . . . . . . . . .  11
       2.4.2.  Nexthop list attributes . . . . . . . . . . . . . . .  12
       2.4.3.  Nexthop content . . . . . . . . . . . . . . . . . . .  12
       2.4.4.  Special nexthops  . . . . . . . . . . . . . . . . . .  13
   3.  Reading from the RIB  . . . . . . . . . . . . . . . . . . . .  13
   4.  Writing to the RIB  . . . . . . . . . . . . . . . . . . . . .  14
   5.  Notifications . . . . . . . . . . . . . . . . . . . . . . . .  14
   6.  RIB grammar . . . . . . . . . . . . . . . . . . . . . . . . .  15
     6.1.  Nexthop grammar explained . . . . . . . . . . . . . . . .  18
   7.  Using the RIB grammar . . . . . . . . . . . . . . . . . . . .  18
     7.1.  Using route preference  . . . . . . . . . . . . . . . . .  18
     7.2.  Using different nexthops types  . . . . . . . . . . . . .  19
       7.2.1.  Tunnel nexthops . . . . . . . . . . . . . . . . . . .  19
       7.2.2.  Replication lists . . . . . . . . . . . . . . . . . .  19
       7.2.3.  Weighted lists  . . . . . . . . . . . . . . . . . . .  19
       7.2.4.  Protection  . . . . . . . . . . . . . . . . . . . . .  20
       7.2.5.  Nexthop chains  . . . . . . . . . . . . . . . . . . .  21
       7.2.6.  Lists of lists  . . . . . . . . . . . . . . . . . . .  21
     7.3.  Performing multicast  . . . . . . . . . . . . . . . . . .  22
   8.  RIB operations at scale . . . . . . . . . . . . . . . . . . .  23
     8.1.  RIB reads . . . . . . . . . . . . . . . . . . . . . . . .  23
     8.2.  RIB writes  . . . . . . . . . . . . . . . . . . . . . . .  23
     8.3.  RIB events and notifications  . . . . . . . . . . . . . .  23
   9.  Security Considerations . . . . . . . . . . . . . . . . . . .  24



Bahadur, et al.         Expires September 6, 2015               [Page 2]

Internet-Draft     Routing Information Base Info Model        March 2015


   10. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  24
   11. Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  24
   12. References  . . . . . . . . . . . . . . . . . . . . . . . . .  24
     12.1.  Normative References . . . . . . . . . . . . . . . . . .  24
     12.2.  Informative References . . . . . . . . . . . . . . . . .  24
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  25

1.  Introduction

   Routing and routing functions in enterprise and carrier networks are
   traditionally performed in network devices.  Traditionally routers
   run routing protocols and the routing protocols (along with static
   config) populate the Routing information base (RIB) of the router.
   The RIB is managed by the RIB manager and the RIB manager provides a
   north-bound interface to its clients i.e. the routing protocols to
   insert routes into the RIB.  The RIB manager consults the RIB and
   decides how to program the forwarding information base (FIB) of the
   hardware by interfacing with the FIB manager.  The relationship
   between these entities is shown in Figure 1.

         +-------------+        +-------------+
         |RIB client 1 | ...... |RIB client N |
         +-------------+        +-------------+
                ^                      ^
                |                      |
                +----------------------+
                           |
                           V
                +---------------------+
                |RIB manager          |
                |                     |
                |       +-----+       |
                |       | RIB |       |
                |       +-----+       |
                +---------------------+
                           ^
                           |
          +---------------------------------+
          |                                 |
          V                                 V
   +-------------+                   +-------------+
   |FIB manager 1|                   |FIB manager M|
   |   +-----+   |    ..........     |   +-----+   |
   |   | FIB |   |                   |   | FIB |   |
   |   +-----+   |                   |   +-----+   |
   +-------------+                   +-------------+

            Figure 1: RIB manager, RIB clients and FIB managers



Bahadur, et al.         Expires September 6, 2015               [Page 3]

Internet-Draft     Routing Information Base Info Model        March 2015


   Routing protocols are inherently distributed in nature and each
   router makes an independent decision based on the routing data
   received from its peers.  With the advent of newer deployment
   paradigms and the need for specialized applications, there is an
   emerging need to guide the router's routing function
   [I-D.ietf-i2rs-problem-statement].  Traditional network-device
   protocol-based RIB population suffices for most use cases where
   distributed network control is used.  However there are use cases
   which the network operators currently address by configuring static
   routes, policies and RIB import/export rules on the routers.  There
   is also a growing list of use cases [I-D.white-i2rs-use-case],
   [I-D.hares-i2rs-use-case-vn-vc] in which a network operator might
   want to program the RIB based on data unrelated to just routing
   (within that network's domain).  Programming the RIB could be based
   on other information such as routing data in the adjacent domain or
   the load on storage and compute in the given domain.  Or it could
   simply be a programmatic way of creating on-demand dynamic overlays
   (e.g.  GRE tunnels) between compute hosts (without requiring the
   hosts to run traditional routing protocols).  If there was a
   standardized publicly documented programmatic interface to a RIB, it
   would enable further networking applications that address a variety
   of use-cases [I-D.ietf-i2rs-problem-statement].

   A programmatic interface to the RIB involves 2 types of operations -
   reading from the RIB and writing (adding/modifying/deleting) to the
   RIB.  [I-D.white-i2rs-use-case] lists various use-cases which require
   read and/or write manipulation of the RIB.

   In order to understand what is in a router's RIB, methods like per-
   protocol SNMP MIBs and show output screen scraping are used.  These
   methods are not scalable, since they are client pull mechanisms and
   not proactive push (from the router) mechanisms.  Screen scraping is
   error prone (since the output format can change) and is vendor
   dependent.  Building a RIB from per-protocol MIBs is error prone
   since the MIB data represent protocol data and not the exact
   information that went into the RIB.  Thus, just getting read-only RIB
   information from a router is a hard task.

   Adding content to the RIB from an external entity can be done today
   using static configuration mechanisms provided by router vendors.
   However the mix of what can be modified in the RIB varies from vendor
   to vendor and the method of configuring it is also vendor dependent.
   This makes it hard for an external entity to program a multi-vendor
   network in a consistent and vendor-independent way.

   The purpose of this draft is to specify an information model for the
   RIB.  Using the information model, one can build a detailed data




Bahadur, et al.         Expires September 6, 2015               [Page 4]

Internet-Draft     Routing Information Base Info Model        March 2015


   model for the RIB.  That data model could then be used by an external
   entity to program a network device.

   The rest of this document is organized as follows.  Section 2 goes
   into the details of what constitutes and can be programmed in a RIB.
   Guidelines for reading and writing the RIB are provided in Section 3
   and Section 4 respectively.  Section 5 provides a high-level view of
   the events and notifications going from a network device to an
   external entity, to update the external entity on asynchronous
   events.  The RIB grammar is specified in Section 6.  Examples of
   using the RIB grammar are shown in Section 7.  Section 8 covers
   considerations for performing RIB operations at scale.

1.1.  Conventions used in this document

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].

2.  RIB data

   This section describes the details of a RIB.  It makes forward
   references to objects in the RIB grammar (Section 6).  A high-level
   description of the RIB contents is as shown below.

                         routing-instance
                          |             |
                          |             |
                    0..N  |             | 1..N
                          |             |
                     interface(s)     RIB(s)
                                        |
                                        |
                                        | 0..N
                                        |
                                      route(s)

                            Figure 2: RIB model

2.1.  RIB definition

   A RIB is an entity that contains routes.  A RIB is identified by its
   name and a RIB is contained within a routing instance (Section 2.2).
   The name MUST be unique within a routing instance.  All routes in a
   given RIB MUST be of the same type (e.g.  IPv4).  Each RIB MUST
   belong to a routing instance.





Bahadur, et al.         Expires September 6, 2015               [Page 5]

Internet-Draft     Routing Information Base Info Model        March 2015


   A routing instance can have multiple RIBs.  A routing instance can
   even have two or more RIBs with the same type of routes (e.g.  IPv6).
   A typical case where this can be used is for multi-topology routing
   ([RFC4915], [RFC5120]).

   Each RIB can be optionally associated with a ENABLE_IP_RPF_CHECK
   attribute that enables Reverse path forwarding (RPF) checks on all IP
   routes in that RIB.  Reverse path forwarding (RPF) check is used to
   prevent spoofing and limit malicious traffic.  For IP packets, the IP
   source address is looked up and the rpf interface(s) associated with
   the route for that IP source address is found.  If the incoming IP
   packet's interface matches one of the rpf interface(s), then the IP
   packet is forwarded based on its IP destination address; otherwise,
   the IP packet is discarded.

2.2.  Routing instance

   A routing instance, in the context of the RIB information model, is a
   collection of RIBs, interfaces, and routing parameters.  A routing
   instance creates a logical slice of the router and allows different
   logical slices; across a set of routers; to communicate with each
   other.  Layer 3 Virtual Private Networks (VPN), Layer 2 VPNs (L2VPN)
   and Virtual Private Lan Service (VPLS) can be modeled as routing
   instances.  Note that modeling a Layer 2 VPN using a routing instance
   only models the Layer-3 (RIB) aspect and does not model any layer-2
   information (like ARP) that might be associated with the L2VPN.

   The set of interfaces indicates which interfaces are associated with
   this routing instance.  The RIBs specify how incoming traffic is to
   be forwarded.  And the routing parameters control the information in
   the RIBs.  The intersection set of interfaces of 2 routing instances
   MUST be the null set.  In other words, an interface MUST NOT be
   present in 2 routing instances.  Thus a routing instance describes
   the routing information and parameters across a set of interfaces.

   A routing instance MUST contain the following mandatory fields.

   o  INSTANCE_NAME: A routing instance is identified by its name,
      INSTANCE_NAME.  This MUST be unique across all routing instances
      in a given network device.

   o  rib-list: This is the list of RIBs associated with this routing
      instance.  Each routing instance can have multiple RIBs to
      represent routes of different types.  For example, one would put
      IPv4 routes in one RIB and MPLS routes in another RIB.

   A routing instance MAY contain the following optional fields.




Bahadur, et al.         Expires September 6, 2015               [Page 6]

Internet-Draft     Routing Information Base Info Model        March 2015


   o  interface-list: This represents the list of interfaces associated
      with this routing instance.  The interface list helps constrain
      the boundaries of packet forwarding.  Packets coming on these
      interfaces are directly associated with the given routing
      instance.  The interface list contains a list of identifiers, with
      each identifier uniquely identifying an interface.

   o  ROUTER_ID: The router-id field identifies the network device in
      control plane interactions with other network devices.  This field
      is to be used if one wants to virtualize a physical router into
      multiple virtual routers.  Each virtual router MUST have a unique
      router-id.  ROUTER_ID MUST be unique across all network devices in
      a given domain.

2.3.  Route

   A route is essentially a match condition and an action following the
   match.  The match condition specifies the kind of route (IPv4, MPLS,
   etc.) and the set of fields to match on.  Figure 3 represents the
   overall contents of a route.

                                 route
                                 | | |
                       +---------+ | +----------+
                       |           |            |
                  0..N |           |            | 1..N

         route-attribute         match         nexthop
                                   |
                                   |
                   +-------+-------+-------+--------+
                   |       |       |       |        |
                   |       |       |       |        |

                  IPv4    IPv6    MPLS    MAC    Interface
               (Unicast/Multicast)





                           Figure 3: Route model

   This document specifies the following match types:

   o  IPv4: Match on destination IP address in the IPv4 header

   o  IPv6: Match on destination IP address in the IPv6 header



Bahadur, et al.         Expires September 6, 2015               [Page 7]

Internet-Draft     Routing Information Base Info Model        March 2015


   o  MPLS: Match on a MPLS label at the top of the MPLS label stack

   o  MAC: Match on MAC destination addresses in the ethernet header

   o  Interface: Match on incoming interface of the packet

   o  IP multicast: Match on (S, G) or (*, G), where S and G are IP
      prefixes

   Each route MUST have associated with it the following mandatory route
   attributes.

   o  ROUTE_PREFERENCE: This is a numerical value that allows for
      comparing routes from different protocols.  Static configuration
      is also considered a protocol for the purpose of this field.  It
      is also known as administrative-distance.  The lower the value,
      the higher the preference.  For example there can be an OSPF route
      for 192.0.2.1/32 with a preference of 5.  If a controller programs
      a route for 192.0.2.1/32 with a preference of 2, then the
      controller's route will be preferred by the RIB manager.
      Preference should be used to dictate behavior.  For more examples
      of preference, see Section 7.1.

   Each route can have associated with it one or more optional route
   attributes.

   o  route-vendor-attributes: Vendors can specify vendor-specific
      attributes using this.  The details of this attribute is outside
      the scope of this document.

2.4.  Nexthop

   A nexthop represents an object resulting from a route lookup.  For
   example, if a route lookup results in sending the packet out a given
   interface, then the nexthop represents that interface.

   Nexthops can be fully resolved nexthops or unresolved nexthop.  A
   resolved nexthop has adequate information to send the outgoing packet
   to the destination by forwarding it on an interface to a directly
   connected neighbor.  For example, a nexthop to a point-to-point
   interface or a nexthop to an IP address on an Ethernet interface has
   the nexthop resolved.  An unresolved nexthop is something that
   requires the RIB manager to determine the final resolved nexthop.
   For example, a nexthop could be an IP address.  The RIB manager would
   resolve how to reach that IP address, e.g. is the IP address
   reachable by regular IP forwarding or by a MPLS tunnel or by both.
   If the RIB manager cannot resolve the nexthop, then the nexthop
   remains in an unresolved state and is NOT a candidate for



Bahadur, et al.         Expires September 6, 2015               [Page 8]

Internet-Draft     Routing Information Base Info Model        March 2015


   installation in the FIB.  Future RIB events can cause an unresolved
   nexthop to get resolved (like that IP address being advertised by an
   IGP neighbor).  Conversely resolved nexthops can also become
   unresolved (e.g. in case of a tunnel going down) and hence would no
   longer be candidates to be installed in the FIB.

   When at least one of a route's nexthops is resolved, then the route
   can be used to forward packets.  Such a route is considered eligible
   to be installed in the FIB and is henceforth referred to as a FIB-
   eligible route.  Conversely, when all the nexthops of a route are
   unresolved that route can no longer be used to forward packets.  Such
   a route is considered ineligible to be installed in the FIB and is
   henceforth referred to as a FIB-ineligible route.  The RIB
   information model allows an external entity to program routes whose
   nexthops may be unresolved initially.  Whenever an unresolved nexthop
   gets resolved, the RIB manager will send a notification of the same
   (see Section 5 ).

   The overall structure and usage of a nexthop is as shown in the
   figure below.































Bahadur, et al.         Expires September 6, 2015               [Page 9]

Internet-Draft     Routing Information Base Info Model        March 2015


                                 route
                                   |
                                   | 0..N
                                   |
                                 nexthop <-----------------+
                                   |                       |
            +-------+----------------------------+         |
            |       |              |             |         |
            |       |              |             |         |
         base   load-balance  primary-standby  replicate   |
            |       |              |             |         |
            |       |2..N          |2            |2..N     |
            |       |              V             |         |
            |       +------------->+<------------+         |
            |                      |                       |
            |                      +-----------------------+
            |
            +-------------------+
            |                   |
            |             nexthop-chain
            |                   |
   special-nexthop              | 1..N
                                |
                       nexthop-chain-member
                                |
                                |
       +---------------+--------+---------+------------------+
       |               |                  |                  |
       |               |                  |                  |
    nexthop-id   egress-interface    logical-tunnel     tunnel-encap

                          Figure 4: Nexthop model

   Nexthops can be identified by an identifier to create a level of
   indirection.  The identifier is set by the RIB manager and returned
   to the external entity on request.  The RIB data-model SHOULD support
   a way to optionally receive a nexthop identifier for a given nexthop.
   For example, one can create a nexthop that points to a BGP peer.  The
   returned nexthop identifier can then be used for programming routes
   to point to the same nexthop.  Given that the RIB manager has created
   an indirection for that BGP peer using the nexthop identifier, if the
   transport path to the BGP peer changes, that change in path will be
   seamless to the external entity and all routes that point to that BGP
   peer will automatically start going over the new transport path.
   Nexthop indirection using identifiers could be applied to not just
   unicast nexthops, but even to nexthops that contain chains and nested
   nexthops (Section 2.4.1).




Bahadur, et al.         Expires September 6, 2015              [Page 10]

Internet-Draft     Routing Information Base Info Model        March 2015


2.4.1.  Nexthop types

   This document specifies a very generic, extensible and recursive
   grammar for nexthops.  Nexthops can be

   o  Unicast nexthops - pointing to an interface

   o  Tunnel nexthops - pointing to a tunnel

   o  Replication lists - list of nexthops to which to replicate a
      packet

   o  Weighted lists - for load-balancing

   o  Primary/standby protection paths

   o  Nexthop chains - for chaining headers, e.g.  MPLS label over a GRE
      header

   o  Lists of lists - recursive application of the above

   o  Indirect nexthops - pointing to a nexthop identifier

   o  Special nexthops - for performing specific well-defined functions

   It is expected that all network devices will have a limit on how many
   levels of lookup can be performed and not all hardware will be able
   to support all kinds of nexthops.  RIB capability negotiation becomes
   very important for this reason and a RIB data-model MUST specify a
   way for an external entity to learn about the network device's
   capabilities.  Examples of when and how to use various kinds of
   nexthops are shown in Section 7.2.

   Tunnel nexthops allow an external entity to program static tunnel
   headers.  There can be cases where the remote tunnel end-point does
   not support dynamic signaling (e.g. no LDP support on a host) and in
   those cases the external entity might want to program the tunnel
   header on both ends of the tunnel.  The tunnel nexthop is kept
   generic with specifications provided for some commonly used tunnels.
   It is expected that the data-model will model these tunnel types with
   complete accuracy.

   Nexthop chains can be used to specify multiple headers over a packet,
   before a packet is forwarded.  One simple example is that of MPLS
   over GRE, wherein the packet has an inner MPLS header followed by a
   GRE header followed by an IP header.  The outermost IP header is
   decided by the network device whereas the MPLS header and GRE header
   are specified by the controller.  Not every network device will be



Bahadur, et al.         Expires September 6, 2015              [Page 11]

Internet-Draft     Routing Information Base Info Model        March 2015


   able to support all kinds of nexthop chains and an arbitrary number
   of header chained together.  The RIB data-model SHOULD provide a way
   to expose nexthop chaining capability supported by a given network
   device.

2.4.2.  Nexthop list attributes

   For nexthops that are of the form of a list(s), attributes can be
   associated with each member of the list to indicate the role of an
   individual member of the list.  One attribute is specified:

   o  NHOP_LB_WEIGHT: This is used for load-balancing.  Each list member
      MUST be assigned a weight between 1 and 99.  The weight determines
      the proportion of traffic to be sent over a nexthop used for
      forwarding as a ratio of the weight of this nexthop divided by the
      weights of all the nexthops of this route that are used for
      forwarding.  To perform equal load-balancing, one MAY specify a
      weight of "0" for all the member nexthops.  The value "0" is
      reserved for equal load-balancing and if applied, MUST be applied
      to all member nexthops.

2.4.3.  Nexthop content

   At the lowest level, a nexthop can be one of:

   o  identifier: This is an identifier returned by the network device
      representing another nexthop or another nexthop chain.

   o  EGRESS_INTERFACE: This represents a physical, logical or virtual
      interface on the network device.  Address resolution must not be
      required on this interface.  This interface may belong to any
      routing instance.

   o  IP address: A route lookup on this IP address is done to determine
      the egress interface.  Address resolution may be required
      depending on the interface.

      *  An optional RIB name can also be specified to indicate the RIB
         in which the IP address is to be looked up.  One can use the
         RIB name field to direct the packet from one domain into
         another domain.  By default the RIB will be the same as the one
         that route belongs to.

   o  EGRESS_INTERFACE and IP address: This can be used in cases e.g.
      where the IP address is a link-local address.






Bahadur, et al.         Expires September 6, 2015              [Page 12]

Internet-Draft     Routing Information Base Info Model        March 2015


   o  EGRESS_INTERFACE and MAC address: The egress interface must be an
      ethernet interface.  Address resolution is not required for this
      nexthop.

   o  tunnel encap: This can be an encap representing an IP tunnel or
      MPLS tunnel or others as defined in this document.  An optional
      egress interface can be specified to indicate which interface to
      send the packet out on.  The egress interface is useful when the
      network device contains Ethernet interfaces and one needs to
      perform address resolution for the IP packet.

   o  logical tunnel: This can be a MPLS LSP or a GRE tunnel (or others
      as defined in this document), that is represented by a unique
      identifier (E.g. name).

   o  RIB_NAME: A nexthop pointing to a RIB indicates that the route
      lookup needs to continue in the specified RIB.  This is a way to
      perform chained lookups.

2.4.4.  Special nexthops

   This document specifies certain special nexthops.  The purpose of
   each of them is explained below:

   o  DISCARD: This indicates that the network device should drop the
      packet and increment a drop counter.

   o  DISCARD_WITH_ERROR: This indicates that the network device should
      drop the packet, increment a drop counter and send back an
      appropriate error message (like ICMP error).

   o  RECEIVE: This indicates that that the traffic is destined for the
      network device.  For example, protocol packets or OAM packets.
      All locally destined traffic SHOULD be throttled to avoid a denial
      of service attack on the router's control plane.  An optional
      rate-limiter can be specified to indicate how to throttle traffic
      destined for the control plane.  The description of the rate-
      limiter is outside the scope of this document.

3.  Reading from the RIB

   A RIB data-model MUST allow an external entity to read entries, for
   RIBs created by that entity.  The network device administrator MAY
   allow reading of other RIBs by an external entity through access
   lists on the network device.  The details of access lists are outside
   the scope of this document.





Bahadur, et al.         Expires September 6, 2015              [Page 13]

Internet-Draft     Routing Information Base Info Model        March 2015


   The data-model MUST support a full read of the RIB and subsequent
   incremental reads of changes to the RIB.  An external agent SHOULD be
   able to request a full read at any time in the lifecycle of the
   connection.  When sending data to an external entity, the RIB manager
   SHOULD try to send all dependencies of an object prior to sending
   that object.

4.  Writing to the RIB

   A RIB data-model MUST allow an external entity to write entries, for
   RIBs created by that entity.  The network device administrator MAY
   allow writes to other RIBs by an external entity through access lists
   on the network device.  The details of access lists are outside the
   scope of this document.

   When writing an object to a RIB, the external entity SHOULD try to
   write all dependencies of the object prior to sending that object.
   The data-model MUST support requesting identifiers for nexthops and
   collecting the identifiers back in the response.

   Route programming in the RIB MUST result in a return code that
   contains the following attributes:

   o  Installed - Yes/No (Indicates whether the route got installed in
      the FIB)

   o  Active - Yes/No (Indicates whether a route is fully resolved and
      is a candidate for selection)

   o  Reason - E.g.  Not authorized

   The data-model MUST specify which objects are modify-able objects.  A
   modify-able object is one whose contents can be changed without
   having to change objects that depend on it and without affecting any
   data forwarding.  To change a non-modifiable object, one will need to
   create a new object and delete the old one.  For example, routes that
   use a nexthop that is identified by a nexthop-identifier should be
   unaffected when the contents of that nexthop changes.

5.  Notifications

   Asynchronous notifications are sent by the network device's RIB
   manager to an external entity when some event occurs on the network
   device.  A RIB data-model MUST support sending asynchronous
   notifications.  A brief list of suggested notifications is as below:

   o  Route change notification, with return code as specified in
      Section 4



Bahadur, et al.         Expires September 6, 2015              [Page 14]

Internet-Draft     Routing Information Base Info Model        March 2015


   o  Nexthop resolution status (resolved/unresolved) notification

6.  RIB grammar

   This section specifies the RIB information model in Routing Backus-
   Naur Form [RFC5511].  This grammar is intended to help the reader
   better understand the english text description in order to derive a
   data model.  However it may not provide all the detail provided by
   the english text.  When there is a lack of clarity in the grammar the
   english text will take precedence.

<routing-instance> ::= <INSTANCE_NAME>
                       [<interface-list>] <rib-list>
                       [<ROUTER_ID>]




<interface-list> ::= (<INTERFACE_IDENTIFIER> ...)




<rib-list> ::= (<rib> ...)
<rib> ::= <RIB_NAME> <rib-family>
                    [<route> ... ]
                    [ENABLE_IP_RPF_CHECK]
<rib-family> ::= <IPV4_RIB_FAMILY> | <IPV6_RIB_FAMILY> |
                 <MPLS_RIB_FAMILY> | <IEEE_MAC_RIB_FAMILY>


<route> ::= <match> <nexthop>
            [<route-attributes>]
            [<route-vendor-attributes>]


<match> ::= <route-type> (<ipv4-route> | <ipv6-route> | <mpls-route> |
                          <mac-route> | <interface-route>)
<match> ::= <IPV4> <ipv4-route> | <IPV6> <ipv6-route> |
            <MPLS> <MPLS_LABEL> | <IEEE_MAC> <MAC_ADDRESS> |
            <INTERFACE> <INTERFACE_IDENTIFIER>
<route-type> ::= <IPV4> | <IPV6> | <MPLS> | <IEEE_MAC> | <INTERFACE>


<ipv4-route> ::= <ip-route-type>
                 (<destination-ipv4-address> | <source-ipv4-address> |
                  (<destination-ipv4-address> <source-ipv4-address>))
<destination-ipv4-address> ::= <ipv4-prefix>



Bahadur, et al.         Expires September 6, 2015              [Page 15]

Internet-Draft     Routing Information Base Info Model        March 2015


<source-ipv4-address> ::= <ipv4-prefix>
<ipv4-prefix> ::= <IPV4_ADDRESS> <IPV4_PREFIX_LENGTH>


<ipv6-route> ::= <ip-route-type>
                 (<destination-ipv6-address> | <source-ipv6-address> |
                  (<destination-ipv6-address> <source-ipv6-address>))
<destination-ipv6-address> ::= <ipv6-prefix>
<source-ipv6-address> ::= <ipv6-prefix>
<ipv6-prefix> ::= <IPV6_ADDRESS> <IPV6_PREFIX_LENGTH>
<ip-route-type> ::= <SRC> | <DEST> | <DEST_SRC>


<route-attributes> ::= <ROUTE_PREFERENCE> [<LOCAL_ONLY>]
                       [<address-family-route-attributes>]

<address-family-route-attributes> ::= <ip-route-attributes> |
                                      <mpls-route-attributes> |
                                      <ethernet-route-attributes>
<ip-route-attributes> ::= <>
<mpls-route-attributes> ::= <>
<ethernet-route-attributes> ::= <>
<route-vendor-attributes> ::= <>




<nexthop> ::= <NEXTHOP_BASE> <nexthop-base> |
              <NEXTHOP_LOAD_BALANCE> <nexthop-lb> |
              <NEXTHOP_PRIMARY_STANDBY> <nexthop-ps> |
              <NEXTHOP_REPLICATE> <nexthop-replicate>


<nexthop-lb> ::= <NHOP_LB_WEIGHT> <nexthop-lb-member>
                 (<NHOP_LB_WEIGHT> <nexthop-lb-member>) ...
<NHOP_LB_WEIGHT> is a number between 1 and 99.
<nexthop-lb-member> ::= <nexthop>


<nexthop-ps> = <nexthop-primary> <nexthop-standby>
<nexthop-primary> ::= <nexthop>
<nexthop-standby> ::= <nexthop>


<nexthop-replicate> ::= <nexthop> <nexthop> ...


<nexthop-base> ::= <nexthop-special> | <nexthop-chain>



Bahadur, et al.         Expires September 6, 2015              [Page 16]

Internet-Draft     Routing Information Base Info Model        March 2015


<nexthop-chain> ::= <nexthop-chain-member> ...
<nexthop-chain-identifier> ::= <NEXTHOP_CHAIN_NAME> | <NEXTHOP_CHAIN_ID>
<nexthop-chain-member> ::= <nexthop-chain-member-special> |
               <nexthop-chain-member-identifier> |
               <EGRESS_INTERFACE> |
               <ipv4-address> | <ipv6-address> |
               (<EGRESS_INTERFACE> (<ipv4-address> | <ipv6-address>)) |
               (<EGRESS_INTERFACE> <IEEE_MAC_ADDRESS>) |
               (<tunnel-encap> [<EGRESS_INTERFACE>]) |
               <logical-tunnel> |
               <RIB_NAME>)


<EGRESS_INTERFACE> ::= <INTERFACE_IDENTIFIER>


<nexthop-chain-member-identifier> ::= <NEXTHOP_CHAIN_MEMBER_NAME> |
                                      <NEXTHOP_CHAIN_MEMBER_ID>
<nexthop-special> ::= <DISCARD> | <DISCARD_WITH_ERROR> |
                      (<RECEIVE> [<COS_VALUE>])




<logical-tunnel> ::= <tunnel-type> <TUNNEL_NAME>
<tunnel-type> ::= <IPV4> | <IPV6> | <MPLS> | <GRE> | <VxLAN> | <NVGRE>




<tunnel-encap> ::= (<IPV4> <ipv4-header>) |
                   (<IPV6> <ipv6-header>) |
                   (<MPLS> <mpls-header>) |
                   (<GRE> <gre-header>) |
                   (<VXLAN> <vxlan-header>) |
                   (<NVGRE> <nvgre-header>)

<ipv4-header> ::= <SOURCE_IPv4_ADDRESS> <DESTINATION_IPv4_ADDRESS>
                  <PROTOCOL> [<TTL>] [<DSCP>]

<ipv6-header> ::= <SOURCE_IPV6_ADDRESS> <DESTINATION_IPV6_ADDRESS>
                  <NEXT_HEADER> [<TRAFFIC_CLASS>]
                  [<FLOW_LABEL>] [<HOP_LIMIT>]




<mpls-header> ::= (<mpls-label-operation> ...)



Bahadur, et al.         Expires September 6, 2015              [Page 17]

Internet-Draft     Routing Information Base Info Model        March 2015


<mpls-label-operation> ::= (<MPLS_PUSH> <MPLS_LABEL> [<S_BIT>]
                           [<TOS_VALUE>] [<TTL_VALUE>]) |
                           (<MPLS_POP> [<TTL_ACTION>])




<gre-header> ::= <GRE_IP_DESTINATION> <GRE_PROTOCOL_TYPE> [<GRE_KEY>]
<vxlan-header> ::= (<ipv4-header> | <ipv6-header>)
                   [<VXLAN_IDENTIFIER>]
<nvgre-header> ::= (<ipv4-header> | <ipv6-header>)
                   <VIRTUAL_SUBNET_ID>
                   [<FLOW_ID>]









                        Figure 5: RIB rBNF grammar

6.1.  Nexthop grammar explained

   A nexthop is used to specify the next network element to forward the
   traffic to.  It is also used to specify how the traffic should be
   load-balanced, protected using primary/standby or multicasted using
   replication.  This is explicitly specified in the grammar.  The
   nexthop has recursion built-in to address complex use-cases like the
   one defined in Section 7.2.6.

7.  Using the RIB grammar

   The RIB grammar is very generic and covers a variety of features.
   This section provides examples on using objects in the RIB grammar
   and examples to program certain use cases.

7.1.  Using route preference

   Using route preference a client can pre-install alternate paths in
   the network.  For example, if OSPF has a route preference of 10, then
   another client can install a route with route preference of 20 to the
   same destination.  The OSPF route will get precedence and will get
   installed in the FIB.  When the OSPF route is withdrawn, the
   alternate path will get installed in the FIB.




Bahadur, et al.         Expires September 6, 2015              [Page 18]

Internet-Draft     Routing Information Base Info Model        March 2015


   Route preference can also be used to prevent denial of service
   attacks by installing routes with the best preference, which either
   drops the offending traffic or routes it to some monitoring/analysis
   station.  Since the routes are installed with the best preference,
   they will supersede any route installed by any other protocol.

7.2.  Using different nexthops types

   The RIB grammar allows one to create a variety of nexthops.  This
   section describes uses for certain types of nexthops.

7.2.1.  Tunnel nexthops

   A tunnel nexthop points to a tunnel of some kind.  Traffic that goes
   over the tunnel gets encapsulated with the tunnel encap.  Tunnel
   nexthops are useful for abstracting out details of the network, by
   having the traffic seamlessly route between network edges.

7.2.2.  Replication lists

   One can create a replication list for replicating traffic to multiple
   destinations.  The destinations, in turn, could be complex nexthops
   in themselves - at a level supported by the network device.  Point to
   multipoint and broadcast are examples that involve replication.

   A replication list (at the simplest level) can be represented as:

   <nexthop> ::= <NEXTHOP_REPLICATE> <nexthop> [ <nexthop> ... ]




   The above can be derived from the grammar as follows:


   <nexthop> ::= <NEXTHOP_REPLICATE> <nexthop-replicate>
   <nexthop> ::= <NEXTHOP_REPLICATE> <nexthop> <nexthop> ...



7.2.3.  Weighted lists

   A weighted list is used to load-balance traffic among a set of
   nexthops.  From a modeling perspective, a weighted list is very
   similar to a replication list, with the difference that each member
   nexthop MUST have a NHOP_LB_WEIGHT associated with it.

   A weighted list (at the simplest level) can be represented as:



Bahadur, et al.         Expires September 6, 2015              [Page 19]

Internet-Draft     Routing Information Base Info Model        March 2015


   <nexthop> ::= <NEXTHOP_LOAD_BALANCE> (<nexthop> <NHOP_LB_WEIGHT>)
                      [(<nexthop> <NHOP_LB_WEIGHT>)... ]




   The above can be derived from the grammar as follows:


   <nexthop> ::= <NEXTHOP_LOAD_BALANCE> <nexthop-lb>
   <nexthop> ::= <NEXTHOP_LOAD_BALANCE>
                   <NHOP_LB_WEIGHT> <nexthop-lb-member>
                   (<NHOP_LB_WEIGHT> <nexthop-lb-member>) ...
   <nexthop> ::= <NEXTHOP_LOAD_BALANCE> (<NHOP_LB_WEIGHT> <nexthop>)
                   (<NHOP_LB_WEIGHT> <nexthop>) ...



7.2.4.  Protection

   A primary/standby protection can be represented as:

   <nexthop> ::= <NEXTHOP_PRIMARY_STANDBY> (<nexthop> <nexthop>)


   The above can be derived from the grammar as follows:


   <nexthop> ::= <NEXTHOP_PRIMARY_STANDBY> <nexthop-ps>
   <nexthop> ::= <NEXTHOP_PRIMARY_STANDBY> (<nexthop-primary>
                 <nexthop-standby>)
   <nexthop> ::= <NEXTHOP_PRIMARY_STANDBY> (<nexthop> <nexthop>)



   Traffic can be load-balanced among multiple primary nexthops of a
   protection list.  In such a case, the nexthop will look like:

   <nexthop> ::= <NEXTHOP_PRIMARY_STANDBY> (<NEXTHOP_LOAD_BALANCE>
                 <nexthop> <nexthop> ...)
                   <nexthop>



   A standby can also have another standby.  In such a case, the list
   will look like:





Bahadur, et al.         Expires September 6, 2015              [Page 20]

Internet-Draft     Routing Information Base Info Model        March 2015


   <nexthop> ::= <NEXTHOP_PRIMARY_STANDBY> <nexthop>
                 (<NEXTHOP_PRIMARY_STANDBY> <nexthop> <nexthop>)



7.2.5.  Nexthop chains

   A nexthop chain specifies how to that put one or more headers on an
   outgoing packet.  One example is a Pseudowire - which is MPLS over
   some transport (MPLS or GRE for instance).  Another example is VxLAN
   over IP.  A nexthop chain allows an external entity to break up the
   programming of the nexthop into independent pieces - one per
   encapsulation.

   Elements in a nexthop-chain are evaluated left to right.

   A simple example of MPLS over GRE can be represented as:

 <nexthop-chain> ::= (<MPLS> <mpls-header>) (<GRE> <gre-header>
                     <outgoing-1>)


 The above can be derived from the grammar as follows:


 <nexthop-chain> ::= <nexthop-chain-member> [<nexthop-chain-member> ...]
 <nexthop-chain> ::= <tunnel-encap> (<tunnel-encap>
                     <nexthop-chain-member>)
 <nexthop-chain> ::= <tunnel-encap> (<tunnel-encap> <EGRESS_INTERFACE>)
 <nexthop-chain> ::= (<MPLS> <mpls-header>) (<GRE> <gre-header>
                     <outgoing-1>)

7.2.6.  Lists of lists

   Lists of lists is a complex construct.  One example of usage of such
   a construct is to replicate traffic to multiple destinations, with
   load balancing.  In other words, for each branch of the replication
   tree, there are multiple interfaces on which traffic needs to be
   load-balanced on.  So the outer list is a replication list for
   multicast and the inner lists are weighted lists for load balancing.
   Lets take an example of a network element has to replicate traffic to
   two other network elements.  Traffic to the first network element
   should be load balanced equally over two interfaces outgoing-1-1 and
   outgoing-1-2.  Traffic to the second network element should be load
   balanced over three interfaces outgoing-2-1, outgoing-2-2 and
   outgoing-2-3 in the ratio 20:20:60.





Bahadur, et al.         Expires September 6, 2015              [Page 21]

Internet-Draft     Routing Information Base Info Model        March 2015


This can be derived from the grammar as follows:


<nexthop> ::= <NEXTHOP_REPLICATE> <nexthop-replicate>
<nexthop> ::= <NEXTHOP_REPLICATE> (<nexthop> <nexthop>...)
<nexthop> ::= <NEXTHOP_REPLICATE> (<nexthop> <nexthop>)
<nexthop> ::= <NEXTHOP_REPLICATE> ((<NEXTHOP_LOAD_BALANCE> <nexthop-lb>)
              (<NEXTHOP_LOAD_BALANCE> <nexthop-lb>))
<nexthop> ::= <NEXTHOP_REPLICATE> ((<NEXTHOP_LOAD_BALANCE>
              (<NHOP_LB_WEIGHT> <nexthop-lb-member>
              (<NHOP_LB_WEIGHT> <nexthop-lb-member>) ...))
               ((<NEXTHOP_LOAD_BALANCE>
                (<NHOP_LB_WEIGHT> <nexthop-lb-member>
                (<NHOP_LB_WEIGHT> <nexthop-lb-member>) ...))
<nexthop> ::= <NEXTHOP_REPLICATE> ((<NEXTHOP_LOAD_BALANCE>
              (<NHOP_LB_WEIGHT> <nexthop-lb-member>
               (<NHOP_LB_WEIGHT> <nexthop-lb-member>)))
                ((<NEXTHOP_LOAD_BALANCE>
                (<NHOP_LB_WEIGHT> <nexthop-lb-member>
                (<NHOP_LB_WEIGHT> <nexthop-lb-member>)
                (<NHOP_LB_WEIGHT> <nexthop-lb-member>)))
<nexthop> ::= <NEXTHOP_REPLICATE> ((<NEXTHOP_LOAD_BALANCE>
               (<NHOP_LB_WEIGHT> <nexthop-lb-member>)
               (<NHOP_LB_WEIGHT> <nexthop-lb-member>)))
               ((<NEXTHOP_LOAD_BALANCE>
               (<NHOP_LB_WEIGHT> <nexthop-lb-member>)
               (<NHOP_LB_WEIGHT> <nexthop-lb-member>)
               (<NHOP_LB_WEIGHT> <nexthop-lb-member>)))
<nexthop> ::= <NEXTHOP_REPLICATE> ((<NEXTHOP_LOAD_BALANCE>
               (<NHOP_LB_WEIGHT> <nexthop>)
               (<NHOP_LB_WEIGHT> <nexthop>)))
               ((<NEXTHOP_LOAD_BALANCE> (<NHOP_LB_WEIGHT> <nexthop>)
               (<NHOP_LB_WEIGHT> <nexthop>)
               (<NHOP_LB_WEIGHT> <nexthop>)))
<nexthop> ::= <NEXTHOP_REPLICATE>
               ((<NEXTHOP_LOAD_BALANCE>
                 (50 <outgoing-1-1>)
                 (50 <outgoing-1-2>)))
                ((<NEXTHOP_LOAD_BALANCE>
                  (20 <outgoing-2-1>)
                  (20 <outgoing-2-2>)
                  (60 <outgoing-2-3>)))

7.3.  Performing multicast

   IP multicast involves matching a packet on (S, G) or (*, G), where
   both S (source) and G (group) are IP prefixes.  Following the match,
   the packet is replicated to one or more recipients.  How the



Bahadur, et al.         Expires September 6, 2015              [Page 22]

Internet-Draft     Routing Information Base Info Model        March 2015


   recipients subscribe to the multicast group is outside the scope of
   this document.

   In PIM-based multicast, the packets are IP forwarded on an IP
   multicast tree.  The downstream nodes on each point in the multicast
   tree is one or more IP addresses.  These can be represented as a
   replication list ( Section 7.2.2 ).

   In MPLS-based multicast, the packets are forwarded on a point to
   multipoint (P2MP) label-switched path (LSP).  The nexthop for a P2MP
   LSP can be represented in the nexthop grammar as a <logical-tunnel>
   (P2MP LSP identifier) or a replication list ( Section 7.2.2) of
   <tunnel-encap>, with each tunnel encap representing a single mpls
   downstream nexthop.

8.  RIB operations at scale

   This section discusses the scale requirements for a RIB data-model.
   The RIB data-model should be able to handle large scale of
   operations, to enable deployment of RIB applications in large
   networks.

8.1.  RIB reads

   Bulking (grouping of multiple objects in a single message) MUST be
   supported when a network device sends RIB data to an external entity.
   Similarly the data model MUST enable a RIB client to request data in
   bulk from a network device.

8.2.  RIB writes

   Bulking (grouping of multiple write operations in a single message)
   MUST be supported when an external entity wants to write to the RIB.
   The response from the network device MUST include a return-code for
   each write operation in the bulk message.

8.3.  RIB events and notifications

   There can be cases where a single network event results in multiple
   events and/or notifications from the network device to an external
   entity.  On the other hand, due to timing of multiple things
   happening at the same time, a network device might have to send
   multiple events and/or notifications to an external entity.  The
   network device originated event/notification message MUST support
   bulking of multiple events and notifications in a single message.






Bahadur, et al.         Expires September 6, 2015              [Page 23]

Internet-Draft     Routing Information Base Info Model        March 2015


9.  Security Considerations

   All interactions between a RIB manager and an external entity MUST be
   authenticated and authorized.  The RIB manager MUST protect itself
   against a denial of service attack by a rogue external entity, by
   throttling request processing.  A RIB manager MUST enforce limits on
   how much data can be programmed by an external entity and return
   error when such a limit is reached.

   The RIB manager MUST expose a data-model that it implements.  An
   external agent MUST send requests to the RIB manager that comply with
   the supported data-model.  The data-model MUST specify the behavior
   of the RIB manager on handling of unsupported data requests.

10.  IANA Considerations

   This document does not generate any considerations for IANA.

11.  Acknowledgements

   The authors would like to thank the working group co-chairs and
   reviewers on their comments and suggestions on this draft.  The
   following people contributed to the design of the RIB model as part
   of the I2RS Interim meeting in April 2013 - Wes George, Chris
   Liljenstolpe, Jeff Tantsura, Susan Hares and Fabian Schneider.

12.  References

12.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

12.2.  Informative References

   [I-D.hares-i2rs-use-case-vn-vc]
              Hares, S. and M. Chen, "Use Cases for Virtual Connections
              on Demand (VCoD) and Virtual Network on Demand (VNoD)
              using Interface to Routing System", draft-hares-i2rs-use-
              case-vn-vc-03 (work in progress), July 2014.

   [I-D.ietf-i2rs-problem-statement]
              Atlas, A., Nadeau, T., and D. Ward, "Interface to the
              Routing System Problem Statement", draft-ietf-i2rs-
              problem-statement-06 (work in progress), January 2015.






Bahadur, et al.         Expires September 6, 2015              [Page 24]

Internet-Draft     Routing Information Base Info Model        March 2015


   [I-D.white-i2rs-use-case]
              White, R., Hares, S., and A. Retana, "Protocol Independent
              Use Cases for an Interface to the Routing System", draft-
              white-i2rs-use-case-06 (work in progress), July 2014.

   [RFC4915]  Psenak, P., Mirtorabi, S., Roy, A., Nguyen, L., and P.
              Pillay-Esnault, "Multi-Topology (MT) Routing in OSPF", RFC
              4915, June 2007.

   [RFC5120]  Przygienda, T., Shen, N., and N. Sheth, "M-ISIS: Multi
              Topology (MT) Routing in Intermediate System to
              Intermediate Systems (IS-ISs)", RFC 5120, February 2008.

   [RFC5511]  Farrel, A., "Routing Backus-Naur Form (RBNF): A Syntax
              Used to Form Encoding Rules in Various Routing Protocol
              Specifications", RFC 5511, April 2009.

Authors' Addresses

   Nitin Bahadur (editor)
   Bracket Computing
   320 Soquel Way
   Sunnyvale, CA  94085
   US

   Email: [email protected]


   Ron Folkes (editor)
   Juniper Networks, Inc.
   1194 N. Mathilda Avenue
   Sunnyvale, CA  94089
   US

   Phone: +1 408 745 2000
   Email: [email protected]
   URI:   www.juniper.net


   Sriganesh Kini (editor)
   Ericsson

   Email: [email protected]








Bahadur, et al.         Expires September 6, 2015              [Page 25]

Internet-Draft     Routing Information Base Info Model        March 2015


   Jan Medved
   Cisco

   Email: [email protected]















































Bahadur, et al.         Expires September 6, 2015              [Page 26]



Network Working Group                                            L. Wang
Internet-Draft                                                    Huawei
Intended status: Standards Track                      H. Ananthakrishnan
Expires: September 6, 2015                                 Packet Design
                                                                 M. Chen
                                                                  Huawei
                                                                 A. Dass
                                                                 S. Kini
                                                                Ericsson
                                                              N. Bahadur
                                                       Bracket Computing
                                                          March 05, 2015


                    Data Model for RIB I2RS protocol
                       draft-wang-i2rs-rib-dm-01

Abstract

   This document defines a YANG data model for Routing Information Base
   (RIB) that aligns with the I2RS RIB information model.

Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on September 6, 2015.







Wang, et al.            Expires September 6, 2015               [Page 1]

Internet-Draft                   RIB DM                       March 2015


Copyright Notice

   Copyright (c) 2015 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Definitions and Acronyms  . . . . . . . . . . . . . . . . . .   3
   3.  Model Structure . . . . . . . . . . . . . . . . . . . . . . .   3
     3.1.  RIB Capability  . . . . . . . . . . . . . . . . . . . . .   3
     3.2.  Routing Instance and Rib  . . . . . . . . . . . . . . . .   4
     3.3.  Route . . . . . . . . . . . . . . . . . . . . . . . . . .   5
     3.4.  Nexthop . . . . . . . . . . . . . . . . . . . . . . . . .   6
     3.5.  Notifications . . . . . . . . . . . . . . . . . . . . . .   9
   4.  YANG Modules  . . . . . . . . . . . . . . . . . . . . . . . .  13
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  35
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  36
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  36
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  36
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  36
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  37

1.  Introduction

   The Interface to the Routing System (I2RS)
   [I-D.ietf-i2rs-architecture] provides read and write access to the
   information and state within the routing process that exists inside
   the routing elements via protocol message exchange between I2RS
   clients and I2RS agents associated with the routing system.  One of
   the functions of I2RS is to read and write the data of Routing
   Information Base (RIB).  [I-D.ietf-i2rs-usecase-reqs-summary]
   introduces a set of RIB use cases and the RIB information model is
   defined in [I-D.ietf-i2rs-rib-info-model].

   This document defines a YANG [RFC6020][RFC6021] data model for the
   RIB that satisfies the use cases and aligns with the
   [I-D.ietf-i2rs-rib-info-model].  Any variation from this



Wang, et al.            Expires September 6, 2015               [Page 2]

Internet-Draft                   RIB DM                       March 2015


   informational model (unless indicated by an editorial note in the
   text below) is an error.

2.  Definitions and Acronyms

   RIB: Routing Information Base

   Information Model: An abstract model of a conceptual domain,
   independent of a specific implementation or data representation.

   NETCONF: The Network Configuration Protocol as defined in [RFC6536].

   RESTCONF: The REST-like protocol that provides a programmatic
   interface over HTTP for accessing the data defined in YANG, using
   datastores defined in NETCONF Protocol [I-D.ietf-netconf-restconf] as
   defined in RBNF: Routing Backus-Naur Form [RFC5511].

3.  Model Structure

   The RIB model includes the following major containers and lists.

3.1.  RIB Capability

   RIB capability negotiation is very important because not all of the
   hardware will be able to support all kinds of nexthops and there
   should be a limitation on how many levels of lookup can be
   practically performed.  Therefore, a RIB data model MUST specify a
   way for an external entity to learn about the functional capabilities
   of a network device.

   At the same time, nexthop chains can be used to specify multiple
   headers over a packet, before that particular packet is forwarded.
   Not every network device will be able to support all kinds of nexthop
   chains along with the arbitrary number of headers which are chained
   together.  The RIB data model MUST provide a way to expose the
   nexthop chaining capability supported by a given network device.

   The structure of the next-hop-capacity and the nexthop-tunnel-encap-
   capacity is shown in the following figure:

   Editorial Note: this version only includes the capabilities for
   nexthop-hop and nexthop-tunnel-encap capabilities.  Additional
   capabilities may need to be defined for the RIB in future revision.








Wang, et al.            Expires September 6, 2015               [Page 3]

Internet-Draft                   RIB DM                       March 2015


      +--rw nexthop-capacity
      |  +--rw support-tunnel?         boolean
      |  +--rw support-chains?         boolean
      |  +--rw support-list-of-list?   boolean
      |  +--rw support-replication?    boolean
      |  +--rw support-weighted?       boolean
      |  +--rw support-protection?     boolean
      |  +--rw lookup-limit?           uint8
      +--rw nexthop-tunnel-encap-capacity
      |  +--rw support-ipv4?    boolean
      |  +--rw support-ipv6?    boolean
      |  +--rw support-mpls?    boolean
      |  +--rw support-gre?     boolean
      |  +--rw support-ipsec?   boolean
      |  +--rw support-vxlan?   boolean
      |  +--rw support-nvgre?   boolean

3.2.  Routing Instance and Rib

   A routing instance, in the context of the RIB information model, is a
   collection of RIBs, interfaces, and routing protocol parameters.  A
   routing instance creates a logical slice of the router and can allow
   multiple different logical slices; across a set of routers; to
   communicate with each other.  And the routing protocol parameters
   control the information available in the RIBs.  More detail about
   routing instance can be found in Section 2.2 of
   [I-D.ietf-i2rs-rib-info-model].

   Editorial note: The [I-D.ietf-i2rs-rib-info-model] describes only 1
   instance for the routing instances for a router.  This draft suggests
   multiple instances be supported.  The authors of both drafts would
   appreciate feedback on a instance or multiple instances.

   The [I-D.ietf-i2rs-rib-info-model] provides a list of RIBs.  Based on
   the combination of a list of routing instances and a list of ribs,
   the high structure is shown in the figure below.















Wang, et al.            Expires September 6, 2015               [Page 4]

Internet-Draft                   RIB DM                       March 2015


   +--rw routing-instance-list* [instance-name]
         +--rw instance-name     string
         +--rw interface-list* [name]
         |  +--rw name    if:interface-ref
         +--rw router-id?        yang:dotted-quad
         +--rw rib-list* [rib-name]
            +--rw rib-name               string
            +--rw rib-family             rib-family-def
            +--rw enable-ip-rpf-check?   boolean
            +--rw route-list* [route-index]
               ...


3.3.  Route

   A route is essentially a match condition and an action following that
   match.  The match condition specifies the kind of route (e.g., IPv4,
   MPLS, MAC, Interface etc.) and the set of fields to match on.

   According to the definition in [I-D.ietf-i2rs-rib-info-model], a
   route MUST associate with the following attributes:

   o  ROUTE_PREFERENCE: See Section 2.3 of
      [I-D.ietf-i2rs-rib-info-model].

   o  ACTIVE: Indicates whether a route is fully resolved and is a
      candidate for selection.

   o  INSTALLED: Indicates whether the route got installed in the FIB.

   Editorial note: The status indications are not in the RBNF in
   [I-D.ietf-i2rs-rib-info-model] but are included in the English text
   which is the normative portion of the model.

   In addition, a route can associate with one or more optional route
   attributes(e.g., route-vendor-attributes).

   For a RIB, there will have a number of routes, so the routes are
   expressed as a list under the rib list.












Wang, et al.            Expires September 6, 2015               [Page 5]

Internet-Draft                   RIB DM                       March 2015


+--rw route-list* [route-index]
   +--rw route-index                uint64
   +--rw route-type                 route-type-def
   +--rw match
   |  +--rw (rib-route-type)?
   |     +--:(ipv4)
   |     |  +--rw ipv4
   |     |     +--rw ipv4-route-type                    ip-route-type-def
   |     |     +--rw (ip-route-type)?
   |     |        +--:(destination-ipv4-address)
   |     |        |  +--rw destination-ipv4-prefix            inet:ipv4-prefix
   |     |        +--:(source-ipv4-address)
   |     |        |  +--rw source-ipv4-prefix                 inet:ipv4-prefix
   |     |        +--:(destination-source-ipv4-address)
   |     |           +--rw destination-source-ipv4-address
   |     |              +--rw destination-ipv4-prefix    inet:ipv4-prefix
   |     |              +--rw source-ipv4-prefix         inet:ipv4-prefix
   |     +--:(ipv6)
   |     |  +--rw ipv6
   |     |     +--rw ipv6-route-type                    ip-route-type-def
   |     |     +--rw (ip-route-type)?
   |     |        +--:(destination-ipv6-address)
   |     |        |  +--rw destination-ipv6-prefix            inet:ipv6-prefix
   |     |        +--:(source-ipv6-address)
   |     |        |  +--rw source-ipv6-prefix                 inet:ipv6-prefix
   |     |        +--:(destination-source-ipv6-address)
   |     |           +--rw destination-source-ipv6-address
   |     |              +--rw destination-ipv6-prefix    inet:ipv6-prefix
   |     |              +--rw source-ipv6-prefix         inet:ipv6-prefix
   |     +--:(mpls-route)
   |     |  +--rw mpls-label              uint32
   |     +--:(mac-route)
   |     |  +--rw mac-address             uint32
   |     +--:(interface-route)
   |        +--rw interface-identifier    if:interface-ref
   +--rw nexthop
     ...

3.4.  Nexthop

   A nexthop represents an object resulting from a route lookup.  The
   detail information of nexthop is defined in Section 2.4 of
   [I-D.ietf-i2rs-rib-info-model].  Currently, four types of nexthop are
   defined.

   o  base

   o  load-balance: design for load-balance case;



Wang, et al.            Expires September 6, 2015               [Page 6]

Internet-Draft                   RIB DM                       March 2015


   o  primary-standby: designed for protection scenario where it
      normally will have primary and standby nexthop.

   o  replicate: designed for multiple destinations forwarding.

   To support some complex use cases (e.g., multicast with load-balance
   and/or protection), the nexthop is defined in the way of recursion.

   The structure tree of nexthop is shown in the following figure:

+--rw nexthop
|  +--rw nexthop-id           uint32
|  +--rw (nexthop-type)?
|     +--:(nexthop-base)
|     |  +--rw nexthop-base
|     |     +--rw nexthop-chain* [nexthop-chain-id]
|     |        +--rw nexthop-chain-id                          uint32
|     |        +--rw (nexthop-chain-type)?
|     |           +--:(nexthop-chain-member-special)
|     |           |  +--rw nexthop-chain-member-special
|     |           |     +--rw nexthop-chain-member-special?   
special-nexthop-def
|     |           +--:(nexthop-chain-member-identifier)
|     |           |  +--rw (nexthop-identifier-type)?
|     |           |     +--:(nexthop-chain-name)
|     |           |     |  +--rw nexthop-chain-name                        
string
|     |           |     +--:(nexthop-chain-id)
|     |           |        +--rw nexthop-chain-id                          
uint32
|     |           +--:(egress-interface-next-hop)
|     |           |  +--rw outgoing-interface                        
if:interface-ref
|     |           +--:(ipv4-address-next-hop)
|     |           |  +--rw next-hop-ipv4-address                     
inet:ipv4-address
|     |           +--:(ipv6-address-next-hop)
|     |           |  +--rw next-hop-ipv6-address                     
inet:ipv6-address
|     |           +--:(egress-interface-ipv4-next-hop)
|     |           |  +--rw next-hop-egress-interface-ipv4-address
|     |           |     +--rw outgoing-interface              if:interface-ref
|     |           |     +--rw next-hop-egress-ipv4-address    inet:ipv4-address
|     |           +--:(egress-interface-ipv6-next-hop)
|     |           |  +--rw next-hop-egress-interface-ipv6-address
|     |           |     +--rw outgoing-interface              if:interface-ref
|     |           |     +--rw next-hop-egress-ipv6-address    inet:ipv4-address
|     |           +--:(egress-interface-mac-next-hop)
|     |           |  +--rw next-hop-egress-interface-mac-address
|     |           |     +--rw outgoing-interface    if:interface-ref
|     |           |     +--rw ieee-mac-address      uint32
|     |           +--:(tunnel-encap-next-hop)
|     |           |  +--rw tunnel-encap
|     |           |     +--rw (tunnel-type)?



Wang, et al.            Expires September 6, 2015               [Page 7]

Internet-Draft                   RIB DM                       March 2015


|     |           |     |  +--:(ipv4)
|     |           |     |  |  +--rw source-ipv4-address         
inet:ipv4-address
|     |           |     |  |  +--rw destination-ipv4-address    
inet:ipv4-address
|     |           |     |  |  +--rw protocol                    uint8
|     |           |     |  |  +--rw ttl?                        uint8
|     |           |     |  |  +--rw dscp?                       uint8
|     |           |     |  +--:(ipv6)
|     |           |     |  |  +--rw source-ipv6-address         
inet:ipv6-address
|     |           |     |  |  +--rw destination-ipv6-address    
inet:ipv6-address
|     |           |     |  |  +--rw next-header                 uint8
|     |           |     |  |  +--rw traffic-class?              uint8
|     |           |     |  |  +--rw flow-label?                 uint16
|     |           |     |  |  +--rw hop-limit?                  uint8
|     |           |     |  +--:(mpls)
|     |           |     |  |  +--rw (mpls-action-type)?
|     |           |     |  |     +--:(mpls-push)
|     |           |     |  |     |  +--rw mpls-push                   boolean
|     |           |     |  |     |  +--rw mpls-label                  uint32
|     |           |     |  |     |  +--rw s-bit?                      boolean
|     |           |     |  |     |  +--rw tos-value?                  uint8
|     |           |     |  |     |  +--rw ttl-value?                  uint8
|     |           |     |  |     +--:(mpls-pop)
|     |           |     |  |        +--rw mpls-pop                    boolean
|     |           |     |  |        +--rw ttl-action?                 uint8
|     |           |     |  +--:(gre)
|     |           |     |  |  +--rw gre-ip-destination          
inet:ipv4-address
|     |           |     |  |  +--rw gre-protocol-type           
inet:ipv4-address
|     |           |     |  |  +--rw gre-key?                    uint64
|     |           |     |  +--:(ipsec)
|     |           |     |  |  +--rw ipsec-spi                   uint32
|     |           |     |  |  +--rw ipsec-sequence-number       uint32
|     |           |     |  +--:(nvgre)
|     |           |     |     +--rw (nvgre-type)?
|     |           |     |     |  +--:(ipv4)
|     |           |     |     |  |  +--rw source-ipv4-address         
inet:ipv4-address
|     |           |     |     |  |  +--rw destination-ipv4-address    
inet:ipv4-address
|     |           |     |     |  |  +--rw protocol                    uint8
|     |           |     |     |  |  +--rw ttl?                        uint8
|     |           |     |     |  |  +--rw dscp?                       uint8
|     |           |     |     |  +--:(ipv6)
|     |           |     |     |     +--rw source-ipv6-address         
inet:ipv6-address
|     |           |     |     |     +--rw destination-ipv6-address    
inet:ipv6-address
|     |           |     |     |     +--rw next-header                 uint8
|     |           |     |     |     +--rw traffic-class?              uint8
|     |           |     |     |     +--rw flow-label?                 uint16
|     |           |     |     |     +--rw hop-limit?                  uint8
|     |           |     |     +--rw virtual-subnet-id           uint32
|     |           |     |     +--rw flow-id?                    uint16



Wang, et al.            Expires September 6, 2015               [Page 8]

Internet-Draft                   RIB DM                       March 2015


|     |           |     +--rw outgoing-interface?         string
|     |           +--:(logical-tunnel-next-hop)
|     |           |  +--rw logical-tunnel
|     |           |     +--rw tunnel-type    tunnel-type-def
|     |           |     +--rw tunnel-name    string
|     |           +--:(rib-name)
|     |              +--rw rib-name?                                 string
|     +--:(nexthop-primary-standby)
|     |  +--rw nexthop-ps
|     |     +--rw nexthop-primary    nexthop-ref
|     |     +--rw nexthop-standby    nexthop-ref
|     +--:(nexthop-load-balance)
|     |  +--rw nexthop-lb
|     |     +--rw nexthop-lbs* [nexthop-lbs-id]
|     |        +--rw nexthop-lbs-id       uint32
|     |        +--rw nhop-lb-weight       nhop-lb-weight-def
|     |        +--rw nexthop-lb-member    nexthop-ref
|     +--:(nexthop-replicate)
|        +--rw nexthop-replicate
|           +--rw nexthop-replicates* [nexthop-replicates-id]
|              +--rw nexthop-replicates-id    uint32
|              +--rw nexthop-replicate?       nexthop-ref

3.5.  Notifications

   Asynchronous notifications are sent by the RIB manager of a network
   device to an external entity when some event triggers on the network
   device.  A RIB data-model MUST support sending 2 kind of asynchronous
   notifications.

   1.  Route change notification:

   o Installed (Indicates whether the route got installed in the FIB) ;

   o Active (Indicates whether a route is fully resolved and is a
   candidate for selection) ;

   o Reason - E.g.  Not authorized

   2.  Nexthop resolution status notification

   Nexthops can be fully resolved nexthops or an unresolved nexthop.

   A resolved nexthop has adequate level of information to send the
   outgoing packet towards the destination by forwarding it on an
   interface of a directly connected neighbor.





Wang, et al.            Expires September 6, 2015               [Page 9]

Internet-Draft                   RIB DM                       March 2015


   An unresolved nexthop is something that requires the RIB manager to
   determine the final resolved nexthop.  For example, in a case when a
   nexthop could be an IP address.  The RIB manager would resolve how to
   reach that IP address, e.g. by checking if that particular IP is
   address reachable by regular IP forwarding or by a MPLS tunnel or by
   both.  If the RIB manager cannot resolve the nexthop, then the
   nexthop remains in an unresolved state and is NOT a suitable
   candidate for installation in the FIB.

   Editorial note: The route changes notifications are not in the
   [I-D.ietf-i2rs-rib-info-model] RBNF text, but in the English text
   which is the normative portion of the draft.

   The structure tree of notifications is shown in the following figure.

notifications:
   +---n nexthop-resolution-status-change
   |  +--ro nexthop
   |  |  +--ro nexthop-id           uint32
   |  |  +--ro (nexthop-type)?
   |  |     +--:(nexthop-base)
   |  |     |  +--ro nexthop-base
   |  |     |     +--ro nexthop-chain* [nexthop-chain-id]
   |  |     |        +--ro nexthop-chain-id                          uint32
   |  |     |        +--ro (nexthop-chain-type)?
   |  |     |           +--:(nexthop-chain-member-special)
   |  |     |           |  +--ro nexthop-chain-member-special
   |  |     |           |     +--ro nexthop-chain-member-special?   
special-nexthop-def
   |  |     |           +--:(nexthop-chain-member-identifier)
   |  |     |           |  +--ro (nexthop-identifier-type)?
   |  |     |           |     +--:(nexthop-chain-name)
   |  |     |           |     |  +--ro nexthop-chain-name                       
 string
   |  |     |           |     +--:(nexthop-chain-id)
   |  |     |           |        +--ro nexthop-chain-id                         
 uint32
   |  |     |           +--:(egress-interface-next-hop)
   |  |     |           |  +--ro outgoing-interface                        
if:interface-ref
   |  |     |           +--:(ipv4-address-next-hop)
   |  |     |           |  +--ro next-hop-ipv4-address                     
inet:ipv4-address
   |  |     |           +--:(ipv6-address-next-hop)
   |  |     |           |  +--ro next-hop-ipv6-address                     
inet:ipv6-address
   |  |     |           +--:(egress-interface-ipv4-next-hop)
   |  |     |           |  +--ro next-hop-egress-interface-ipv4-address
   |  |     |           |     +--ro outgoing-interface              
if:interface-ref
   |  |     |           |     +--ro next-hop-egress-ipv4-address    
inet:ipv4-address
   |  |     |           +--:(egress-interface-ipv6-next-hop)
   |  |     |           |  +--ro next-hop-egress-interface-ipv6-address
   |  |     |           |     +--ro outgoing-interface              
if:interface-ref
   |  |     |           |     +--ro next-hop-egress-ipv6-address    
inet:ipv4-address



Wang, et al.            Expires September 6, 2015              [Page 10]

Internet-Draft                   RIB DM                       March 2015


   |  |     |           +--:(egress-interface-mac-next-hop)
   |  |     |           |  +--ro next-hop-egress-interface-mac-address
   |  |     |           |     +--ro outgoing-interface    if:interface-ref
   |  |     |           |     +--ro ieee-mac-address      uint32
   |  |     |           +--:(tunnel-encap-next-hop)
   |  |     |           |  +--ro tunnel-encap
   |  |     |           |     +--ro (tunnel-type)?
   |  |     |           |     |  +--:(ipv4)
   |  |     |           |     |  |  +--ro source-ipv4-address         
inet:ipv4-address
   |  |     |           |     |  |  +--ro destination-ipv4-address    
inet:ipv4-address
   |  |     |           |     |  |  +--ro protocol                    uint8
   |  |     |           |     |  |  +--ro ttl?                        uint8
   |  |     |           |     |  |  +--ro dscp?                       uint8
   |  |     |           |     |  +--:(ipv6)
   |  |     |           |     |  |  +--ro source-ipv6-address         
inet:ipv6-address
   |  |     |           |     |  |  +--ro destination-ipv6-address    
inet:ipv6-address
   |  |     |           |     |  |  +--ro next-header                 uint8
   |  |     |           |     |  |  +--ro traffic-class?              uint8
   |  |     |           |     |  |  +--ro flow-label?                 uint16
   |  |     |           |     |  |  +--ro hop-limit?                  uint8
   |  |     |           |     |  +--:(mpls)
   |  |     |           |     |  |  +--ro (mpls-action-type)?
   |  |     |           |     |  |     +--:(mpls-push)
   |  |     |           |     |  |     |  +--ro mpls-push                   
boolean
   |  |     |           |     |  |     |  +--ro mpls-label                  
uint32
   |  |     |           |     |  |     |  +--ro s-bit?                      
boolean
   |  |     |           |     |  |     |  +--ro tos-value?                  
uint8
   |  |     |           |     |  |     |  +--ro ttl-value?                  
uint8
   |  |     |           |     |  |     +--:(mpls-pop)
   |  |     |           |     |  |        +--ro mpls-pop                    
boolean
   |  |     |           |     |  |        +--ro ttl-action?                 
uint8
   |  |     |           |     |  +--:(gre)
   |  |     |           |     |  |  +--ro gre-ip-destination          
inet:ipv4-address
   |  |     |           |     |  |  +--ro gre-protocol-type           
inet:ipv4-address
   |  |     |           |     |  |  +--ro gre-key?                    uint64
   |  |     |           |     |  +--:(ipsec)
   |  |     |           |     |  |  +--ro ipsec-spi                   uint32
   |  |     |           |     |  |  +--ro ipsec-sequence-number       uint32
   |  |     |           |     |  +--:(nvgre)
   |  |     |           |     |     +--ro (nvgre-type)?
   |  |     |           |     |     |  +--:(ipv4)
   |  |     |           |     |     |  |  +--ro source-ipv4-address         
inet:ipv4-address
   |  |     |           |     |     |  |  +--ro destination-ipv4-address    
inet:ipv4-address
   |  |     |           |     |     |  |  +--ro protocol                    
uint8
   |  |     |           |     |     |  |  +--ro ttl?                        
uint8
   |  |     |           |     |     |  |  +--ro dscp?                       
uint8
   |  |     |           |     |     |  +--:(ipv6)
   |  |     |           |     |     |     +--ro source-ipv6-address         
inet:ipv6-address



Wang, et al.            Expires September 6, 2015              [Page 11]

Internet-Draft                   RIB DM                       March 2015


   |  |     |           |     |     |     +--ro destination-ipv6-address    
inet:ipv6-address
   |  |     |           |     |     |     +--ro next-header                 
uint8
   |  |     |           |     |     |     +--ro traffic-class?              
uint8
   |  |     |           |     |     |     +--ro flow-label?                 
uint16
   |  |     |           |     |     |     +--ro hop-limit?                  
uint8
   |  |     |           |     |     +--ro virtual-subnet-id           uint32
   |  |     |           |     |     +--ro flow-id?                    uint16
   |  |     |           |     +--ro outgoing-interface?         string
   |  |     |           +--:(logical-tunnel-next-hop)
   |  |     |           |  +--ro logical-tunnel
   |  |     |           |     +--ro tunnel-type    tunnel-type-def
   |  |     |           |     +--ro tunnel-name    string
   |  |     |           +--:(rib-name)
   |  |     |              +--ro rib-name?                                 
string
   |  |     +--:(nexthop-primary-standby)
   |  |     |  +--ro nexthop-ps
   |  |     |     +--ro nexthop-primary    nexthop-ref
   |  |     |     +--ro nexthop-standby    nexthop-ref
   |  |     +--:(nexthop-load-balance)
   |  |     |  +--ro nexthop-lb
   |  |     |     +--ro nexthop-lbs* [nexthop-lbs-id]
   |  |     |        +--ro nexthop-lbs-id       uint32
   |  |     |        +--ro nhop-lb-weight       nhop-lb-weight-def
   |  |     |        +--ro nexthop-lb-member    nexthop-ref
   |  |     +--:(nexthop-replicate)
   |  |        +--ro nexthop-replicate
   |  |           +--ro nexthop-replicates* [nexthop-replicates-id]
   |  |              +--ro nexthop-replicates-id    uint32
   |  |              +--ro nexthop-replicate?       nexthop-ref
   |  +--ro nexthop-state    nexthop-state-def
   +---n route-change
      +--ro instance-name            string
      +--ro rib-name                 string
      +--ro rib-family               rib-family-def
      +--ro route-index              uint64
      +--ro route-type               route-type-def
      +--ro match
      |  +--ro (rib-route-type)?
      |     +--:(ipv4)
      |     |  +--ro ipv4
      |     |     +--ro ipv4-route-type                    ip-route-type-def
      |     |     +--ro (ip-route-type)?
      |     |        +--:(destination-ipv4-address)
      |     |        |  +--ro destination-ipv4-prefix            
inet:ipv4-prefix
      |     |        +--:(source-ipv4-address)
      |     |        |  +--ro source-ipv4-prefix                 
inet:ipv4-prefix
      |     |        +--:(destination-source-ipv4-address)
      |     |           +--ro destination-source-ipv4-address



Wang, et al.            Expires September 6, 2015              [Page 12]

Internet-Draft                   RIB DM                       March 2015


      |     |              +--ro destination-ipv4-prefix    inet:ipv4-prefix
      |     |              +--ro source-ipv4-prefix         inet:ipv4-prefix
      |     +--:(ipv6)
      |     |  +--ro ipv6
      |     |     +--ro ipv6-route-type                    ip-route-type-def
      |     |     +--ro (ip-route-type)?
      |     |        +--:(destination-ipv6-address)
      |     |        |  +--ro destination-ipv6-prefix            
inet:ipv6-prefix
      |     |        +--:(source-ipv6-address)
      |     |        |  +--ro source-ipv6-prefix                 
inet:ipv6-prefix
      |     |        +--:(destination-source-ipv6-address)
      |     |           +--ro destination-source-ipv6-address
      |     |              +--ro destination-ipv6-prefix    inet:ipv6-prefix
      |     |              +--ro source-ipv6-prefix         inet:ipv6-prefix
      |     +--:(mpls-route)
      |     |  +--ro mpls-label              uint32
      |     +--:(mac-route)
      |     |  +--ro mac-address             uint32
      |     +--:(interface-route)
      |        +--ro interface-identifier    if:interface-ref
      +--ro route-installed-state    route-installed-state-def
      +--ro route-state              route-state-def
      +--ro route-reason             route-reason-def

4.  YANG Modules

//<code begins> file "i2rs [email protected]"

module i2rs-rib {
  namespace "urn:TBD1:params:xml:ns:yang:rt:i2rs:rib";
    // replace with iana namespace when assigned
    prefix "i2rs-rib";

  import ietf-inet-types {
    prefix inet;
    //rfc6991
  }

  import ietf-interfaces {
    prefix "if";
  }

  import ietf-routing {
    prefix "rt";
  }

  organization
    "TBD2";



Wang, et al.            Expires September 6, 2015              [Page 13]

Internet-Draft                   RIB DM                       March 2015


  contact
     "email: [email protected]
      email: [email protected]
      email: [email protected]
      email: [email protected]
      email: [email protected]
      email: [email protected]";

  description
    "
      terms and acronyms

      isis (isis):intermediate system to intermediate system

      ip (ip): internet protocol

      ipv4 (ipv4):internet protocol version 4

      ipv6 (ipv6): internet protocol version 6

      metric(metric): multi exit discriminator

      igp (igp): interior gateway protocol

      mtu (mtu) maximum transmission uint
     ";


  revision "2015-03-04" {
    description "initial revision";
    reference "draft-ietf-i2rs-rib-info-model-06";
  }


  container nexthop-capacity{
    leaf support-tunnel{
      type boolean;
    }
    leaf support-chains{
      type boolean;
    }
    leaf support-list-of-list{
      type boolean;
    }
    leaf support-replication{
      type boolean;
    }
    leaf support-weighted{



Wang, et al.            Expires September 6, 2015              [Page 14]

Internet-Draft                   RIB DM                       March 2015


      type boolean;
    }
    leaf support-protection{
      type boolean;
    }
    leaf lookup-limit{
      type uint8;
    }
  }


  container nexthop-tunnel-encap-capacity{
    leaf support-ipv4{
      type boolean;
    }
    leaf support-ipv6{
      type boolean;
    }
    leaf support-mpls{
      type boolean;
    }
    leaf support-gre{
      type boolean;
    }
    leaf support-ipsec{
      type boolean;
    }
    leaf support-vxlan{
      type boolean;
    }
    leaf support-nvgre{
      type boolean;
    }
  }

  list routing-instance-list{
    description
      "configuration of a 'i2rs' pseudo-protocol instance
        consists of a list of routes.";
    key "instance-name";
    leaf instance-name {
      description
        "A routing instance is identified by its name,
        INSTANCE_name.  This MUST be unique across all routing instances
        in a given network device.";
      type string ;
      mandatory true;
    }



Wang, et al.            Expires September 6, 2015              [Page 15]

Internet-Draft                   RIB DM                       March 2015


    list interface-list {
      description
        "This represents the list of interfaces associated
        with this routing instance.  The interface list helps constrain
        the boundaries of packet forwarding.  Packets coming on these
        interfaces are directly associated with the given routing
        instance.  The interface list contains a list of identifiers, with
        each identifier uniquely identifying an interface.";
      key "name";
      leaf name {
        type if:interface-ref;
         description
         "A reference to The name of a configured network layer  interface.";
      }
    }
    uses rt:router-id ;
    list rib-list {
      description
        "This is the list of RIBs associated with this routing
        instance.  Each routing instance can have multiple RIBs to
        represent routes of different types.";
      key "rib-name";
      leaf rib-name {
        description
         "A reference to The name of a rib.";
       type string;
        mandatory true;
      }
      leaf rib-family {
        type rib-family-def;
        mandatory true;
      }
      leaf enable-ip-rpf-check {
        description
          "Each RIB can be optionally associated with a ENABLE_IP_RPF_CHECK
           attribute that enables Reverse path forwarding (RPF) checks on all IP
           routes in that RIB.  Reverse path forwarding (RPF) check is used to
           prevent spoofing and limit malicious traffic.";
        type boolean;
      }
      list route-list{
        key "route-index";
        uses route;
      }
    }
  }

  grouping route-prefix{



Wang, et al.            Expires September 6, 2015              [Page 16]

Internet-Draft                   RIB DM                       March 2015


    description
      "The common attributes used for all routes";
    leaf route-index {
      type uint64 ;
      mandatory true;
    }
    leaf route-type {
      type route-type-def ;
      mandatory true;
    }
    container match {
      choice rib-route-type {
        case ipv4 {
          description
            "Match on destination IP address in the IPv4 header";
          container ipv4{
            leaf ipv4-route-type {
              type ip-route-type-def ;
              mandatory true;
            }
            choice ip-route-type {

              case destination-ipv4-address {
                leaf destination-ipv4-prefix {
                  type inet:ipv4-prefix;
                  mandatory true;
                }
              }
              case source-ipv4-address {
                leaf source-ipv4-prefix {
                  type inet:ipv4-prefix;
                  mandatory true;
                }
              }
              case destination-source-ipv4-address {
                container destination-source-ipv4-address {
                  leaf destination-ipv4-prefix {
                    type inet:ipv4-prefix;
                    mandatory true;
                  }
                  leaf source-ipv4-prefix {
                    type inet:ipv4-prefix;
                    mandatory true;
                  }
                }
              }
            }
          }



Wang, et al.            Expires September 6, 2015              [Page 17]

Internet-Draft                   RIB DM                       March 2015


        }
        case ipv6 {
          description
            "Match on destination IP address in the IPv6 header";
          container ipv6{
            leaf ipv6-route-type {
              type ip-route-type-def ;
              mandatory true;
            }
            choice ip-route-type {
              case destination-ipv6-address {
                leaf destination-ipv6-prefix {
                  type inet:ipv6-prefix;
                  mandatory true;
                }
              }
              case source-ipv6-address {
                leaf source-ipv6-prefix {
                  type inet:ipv6-prefix;
                  mandatory true;
                }
              }
              case destination-source-ipv6-address {
                container destination-source-ipv6-address {
                  leaf destination-ipv6-prefix {
                    type inet:ipv6-prefix;
                    mandatory true;
                  }
                  leaf source-ipv6-prefix {
                    type inet:ipv6-prefix;
                    mandatory true;
                  }
                }
              }
            }
          }
        }
        case mpls-route {
          description
            "Match on a MPLS label at the top of the MPLS label stack";
          leaf mpls-label {
            type uint32 ;
            mandatory true;
          }
        }

        case mac-route {
          description



Wang, et al.            Expires September 6, 2015              [Page 18]

Internet-Draft                   RIB DM                       March 2015


            "Match on MAC destination addresses in the ethernet header";
          leaf mac-address {
            type uint32 ;
            mandatory true;
          }
        }
        case interface-route {
          description
            "Match on incoming interface of the packet";
          leaf interface-identifier {
            type if:interface-ref;
            mandatory true;
          }
        }
      }
    }
  }

  grouping route
  {
    description
      "The common attributes usesd for all routes";
    uses route-prefix;
    container nexthop
    {
      uses nexthop;
    }
    container route-statistic{
      leaf route-state {
        type route-state-def ;
        config false;
      }
      leaf route-installed-state {
        type route-installed-state-def ;
        config false;
      }
      leaf route-reason {
        type route-reason-def ;
        config false;
      }
    }
    container route-attributes{
      uses route-attributes;
    }
    container route-vendor-attributes{
      uses route-vendor-attributes;
    }
  }



Wang, et al.            Expires September 6, 2015              [Page 19]

Internet-Draft                   RIB DM                       March 2015


  typedef nexthop-ref {
    type leafref {
      path  
"/i2rs-rib:routing-instance-list/i2rs-rib:rib-list/i2rs-rib:route-list/i2rs-rib:nexthop/i2rs-rib:nexthop-id";

    }
  }

  grouping nexthop {
    leaf nexthop-id {
      mandatory true;
      type uint32;
    }
    choice nexthop-type {
      case nexthop-base {
        container nexthop-base {
          list nexthop-chain {
            key "nexthop-chain-id";
            uses nexthop-chain-member;
          }
        }
      }

      case nexthop-primary-standby {
        container nexthop-ps {
           leaf nexthop-primary {
             mandatory true;
             type nexthop-ref;
           }
           leaf nexthop-standby {
             mandatory true;
             type nexthop-ref;
           }
        }
      }

      case nexthop-load-balance {
        container nexthop-lb {
          list nexthop-lbs {
            key "nexthop-lbs-id";
            leaf nexthop-lbs-id {
              mandatory true;
              type uint32;
            }
            leaf nhop-lb-weight {
              mandatory true;
              type nhop-lb-weight-def;
            }
            leaf nexthop-lb-member {



Wang, et al.            Expires September 6, 2015              [Page 20]

Internet-Draft                   RIB DM                       March 2015


              mandatory true;
              type nexthop-ref;
            }
          }
        }
      }

      case nexthop-replicate {
        container nexthop-replicate {
          list nexthop-replicates{
            key "nexthop-replicates-id";
            leaf nexthop-replicates-id {
              mandatory true;
              type uint32;
            }
            leaf nexthop-replicate {
              type nexthop-ref;
            }
          }
        }
      }
    }
  }

  grouping nexthop-chain-member {
    description
      "One Nexthop content for routes.";
    leaf nexthop-chain-id{
      type uint32;
      mandatory true;
    }
    choice nexthop-chain-type {
      case nexthop-chain-member-special {
        container nexthop-chain-member-special {
          leaf nexthop-chain-member-special{
            type special-nexthop-def;
          }
        }
      }

      case nexthop-chain-member-identifier{
        uses nexthop-chain-member-identifier;
      }

      case egress-interface-next-hop {
         description
           "Simple next-hop is specified as an outgoing interface,
            next-hop address or both.";



Wang, et al.            Expires September 6, 2015              [Page 21]

Internet-Draft                   RIB DM                       March 2015


         leaf outgoing-interface {
           type if:interface-ref;
           mandatory true;
           description
             "Name of The outgoing interface.";
         }
      }

      case ipv4-address-next-hop {
        leaf next-hop-ipv4-address {
          type inet:ipv4-address;
          mandatory true;
          description
            "Ipv4 address of The next-hop.";
        }
      }

      case ipv6-address-next-hop {
        leaf next-hop-ipv6-address {
          type inet:ipv6-address;
          mandatory true;
          description
            "Ipv6 address of The next-hop.";
        }
      }

      case egress-interface-ipv4-next-hop {
        container next-hop-egress-interface-ipv4-address{
          leaf outgoing-interface {
            type if:interface-ref;
            mandatory true;
            description    "Name of The outgoing interface.";
          }
          leaf next-hop-egress-ipv4-address {
            type inet:ipv4-address;
            mandatory true;
            description
              "Ipv4 address of The next-hop.";
          }
          description
            "Egress-interface and ip address: This can be usesd in cases e.g.
            where The ip address is a link-local address..";
        }
      }

      case egress-interface-ipv6-next-hop {
        container next-hop-egress-interface-ipv6-address{
          leaf outgoing-interface {



Wang, et al.            Expires September 6, 2015              [Page 22]

Internet-Draft                   RIB DM                       March 2015


            type if:interface-ref;
            mandatory true;
            description    "Name of The outgoing interface.";
          }
          leaf next-hop-egress-ipv6-address {
            type inet:ipv4-address;
            mandatory true;
            description
              "Ipv4 address of The next-hop.";
          }
          description
            "Egress-interface and ip address: This can be usesd in cases e.g.
            where The ip address is a link-local address..";
        }
      }

      case egress-interface-mac-next-hop {
        container next-hop-egress-interface-mac-address{
          leaf outgoing-interface {
            type if:interface-ref;
            mandatory true;
            description    "Name of The outgoing interface.";
          }
          leaf ieee-mac-address {
            type uint32;
            mandatory true;
            description    "Name of The mac-address.";
          }
          description
            "Egress-interface and ip address: This can be usesd in cases e.g.
            where The ip address is a link-local address..";
        }
      }

      case tunnel-encap-next-hop {
        container tunnel-encap {
          uses tunnel-encap;
            leaf outgoing-interface {
              type string;
          }
          description
            "This can be an encap representing an ip tunnel or
             mpls tunnel or oThers as defined in This document.  an optional
             egress interface can be specified to indicate which interface to
             send The packet out on.  The egress interface is usesful when The
             network device contains eThernet interfaces and one needs to
             perform address resolution for The ip packet.";
        }



Wang, et al.            Expires September 6, 2015              [Page 23]

Internet-Draft                   RIB DM                       March 2015


      }

      case logical-tunnel-next-hop {
        container logical-tunnel {
          uses logical-tunnel;
          description
            "This can be a mpls lsp or a gre tunnel (or oThers
              as defined in This document), that is represented by a unique
              identifier (e.g. name).";
        }
      }

      case rib-name {
        leaf rib-name {
          type string;
            description
              "A nexthop pointing to a rib indicates that The route
              lookup needs to continue in The specified rib.  This is a way to
              perform chained lookups.";
        }
      }
    }
  }

  grouping  nexthop-chain-member-identifier{
    choice nexthop-identifier-type{
      case nexthop-chain-name {
        leaf nexthop-chain-name {
          type string;
          mandatory true;
        }
      }
      case nexthop-chain-id {
        leaf nexthop-chain-id {
          type uint32;
          mandatory true;
        }
      }
    }
  }

  grouping  route-vendor-attributes{

  }

  grouping  logical-tunnel{
    leaf tunnel-type {
      type tunnel-type-def ;



Wang, et al.            Expires September 6, 2015              [Page 24]

Internet-Draft                   RIB DM                       March 2015


      mandatory true;
    }
    leaf tunnel-name {
      type string ;
      mandatory true;
    }
  }

  grouping  ipv4-header{
    leaf source-ipv4-address {
      type inet:ipv4-address;
      mandatory true;
    }
    leaf destination-ipv4-address {
      type inet:ipv4-address;
      mandatory true;
    }
    leaf protocol {
      type uint8;
      mandatory true;
    }
    leaf ttl {
      type uint8;
    }
    leaf dscp {
      type uint8;
    }
  }

  grouping  ipv6-header{
    leaf source-ipv6-address {
      type inet:ipv6-address;
      mandatory true;
    }
    leaf destination-ipv6-address {
      type inet:ipv6-address;
      mandatory true;
    }
    leaf next-header {
      type uint8;
      mandatory true;
    }
    leaf traffic-class {
      type uint8;
    }
    leaf flow-label {
      type uint16;
    }



Wang, et al.            Expires September 6, 2015              [Page 25]

Internet-Draft                   RIB DM                       March 2015


    leaf hop-limit {
      type uint8;
    }
  }

  grouping  nvgre-header{
    choice nvgre-type {
      description
        "nvgre-header.";
      case ipv4 {
        uses ipv4-header;
      }
      case ipv6 {
        uses ipv6-header;
      }
    }
    leaf virtual-subnet-id {
      type uint32;
      mandatory true;
    }
    leaf flow-id {
      type uint16;
    }
  }

  grouping  vxlan-header{
    choice vxlan-type {
      description
        "vxlan-header.";
      case ipv4 {
        uses ipv4-header;
      }
      case ipv6 {
        uses ipv6-header;
      }
    }
    leaf vxlan-identifier {
      type uint32;
    }
  }

  grouping  gre-header{
    leaf gre-ip-destination {
      type inet:ipv4-address;
      mandatory true;
    }
    leaf gre-protocol-type {
      type inet:ipv4-address;



Wang, et al.            Expires September 6, 2015              [Page 26]

Internet-Draft                   RIB DM                       March 2015


      mandatory true;
    }
    leaf gre-key {
      type uint64;
    }
  }

  grouping  ipsec-header{
    description
    "The IPSEC header begins with two 4-byte fields (Security Parameters Index 
(SPI) and Sequence
    Number).  Following these fields is the Payload Data, which has
    substructure that depends on the choice of encryption algorithm and
    mode, and on the use of TFC padding, which is examined in more detail 
later. ";
    leaf ipsec-spi {
      type uint32;
      mandatory true;
    }
    leaf ipsec-sequence-number {
      type uint32;
      mandatory true;
    }
  }

  grouping  mpls-header{
    choice mpls-action-type {
      description
        "mpls-header.";
      case mpls-push {
        leaf mpls-push {
          type boolean;
          mandatory true;
        }
        leaf mpls-label {
          type uint32;
          mandatory true;
        }
        leaf s-bit {
          type boolean;
        }
        leaf tos-value {
          type uint8;
        }
        leaf ttl-value {
          type uint8;
        }
          }
      case mpls-pop {
        leaf mpls-pop {



Wang, et al.            Expires September 6, 2015              [Page 27]

Internet-Draft                   RIB DM                       March 2015


          type boolean;
          mandatory true;
        }
        leaf ttl-action {
          type uint8;
        }
      }
    }
  }

  grouping  tunnel-encap{
    choice tunnel-type {
      description
        "options for next-hops.";
      case ipv4 {
        uses ipv4-header;
      }
      case ipv6 {
        uses ipv6-header;
      }
      case mpls {
        uses mpls-header;
      }
      case gre {
        uses gre-header;
      }
      case ipsec {
        uses ipsec-header;
      }
      case nvgre {
        uses nvgre-header;
      }
    }
  }

  grouping  route-attributes{
    leaf route-preference {
      description
        "ROUTE_PREFERENCE: This is a numerical value that allows for
        comparing routes from different protocols.  Static configuration
        is also considered a protocol for the purpose of this field.  It
        is also known as administrative-distance.  The lower the value,
        the higher the preference.";
        type uint32 ;
      mandatory true;
    }
    leaf local-only {
      type boolean ;



Wang, et al.            Expires September 6, 2015              [Page 28]

Internet-Draft                   RIB DM                       March 2015


      mandatory true;
    }
    container address-family-route-attributes{
      choice route-type {
        case ip-route-attributes {
        }
        case mpls-route-attributes {
        }
        case eThernet-route-attributes {
        }
      }
    }
  }

  typedef nhop-lb-weight-def {
    description
      "Nhop-lb-weight is a number between 1 and 99 . ";
    type uint8 {
      range "1..99";
    }
  }

  identity mpls-action {
    description "The mpls-action. ";
  }

  identity push {
    base "mpls-action";
  }

  identity pop {
    base "mpls-action";
  }

  identity swap {
    base "mpls-action";
  }

  typedef mpls-action-def {
    type identityref {
      base "mpls-action";
    }
  }

  identity special-nexthop {
    description "special-nexthop. ";
  }




Wang, et al.            Expires September 6, 2015              [Page 29]

Internet-Draft                   RIB DM                       March 2015


  identity discard {
    base "special-nexthop";
  }

  identity discard-with-error {
    base "special-nexthop";
  }

  identity receive {
    base "special-nexthop";
  }

  identity cos-value {
    base "special-nexthop";
  }

  typedef special-nexthop-def {
    type identityref {
      base "special-nexthop";
    }
  }

  identity ip-route-type {
    description "The ip route type. ";
  }

  identity src {
    base "ip-route-type";
  }

  identity dest {
    base "ip-route-type";
  }

  identity dest-src {
    base "ip-route-type";
  }

  typedef ip-route-type-def {
    type identityref {
      base "ip-route-type";
    }
  }

  identity rib-family {
    description "The rib-family. ";
  }




Wang, et al.            Expires September 6, 2015              [Page 30]

Internet-Draft                   RIB DM                       March 2015


  identity ipv4-rib-family {
    base "rib-family";
  }

  identity ipv6-rib-family {
    base "rib-family";
  }

  identity mpls-rib-family {
    base "rib-family";
  }

  identity ieee-mac-rib-family {
    base "rib-family";
  }

  typedef rib-family-def {
    type identityref {
      base "rib-family";
    }
  }

  identity route-type {
    description "The route type. ";
  }

  identity ipv4-route {
    base "route-type";
  }

  identity ipv6-route {
    base "route-type";
  }

  identity mpls-route {
    base "route-type";
  }

  identity ieee-mac {
    base "route-type";
  }

  identity interface {
    base "route-type";
  }

  typedef route-type-def {
    type identityref {



Wang, et al.            Expires September 6, 2015              [Page 31]

Internet-Draft                   RIB DM                       March 2015


      base "route-type";
    }
  }

  identity tunnel-type {
    description "the tunnel type.";
  }

  identity ipv4-tunnel {
    base "tunnel-type";
    description "ipv4";
  }

  identity ipv6-tunnel {
    base "tunnel-type";
    description "ipv6";
  }

  identity mpls-tunnel {
    base "tunnel-type";
    description "mpls";
  }

  identity gre-tunnel {
    base "tunnel-type";
    description "gre";
  }

  identity ipsec-tunnel {
    base "tunnel-type";
    description "ipsec";
  }

  identity vxlan-tunnel {
    base "tunnel-type";
    description "vxlan";
  }

  identity nvgre-tunnel {
    base "tunnel-type";
    description "nvgre";
  }

  typedef tunnel-type-def {
    type identityref {
      base "tunnel-type";
    }
  }



Wang, et al.            Expires September 6, 2015              [Page 32]

Internet-Draft                   RIB DM                       March 2015


  identity route-state {
    description "The route state. ";
  }

  identity active {
    base "route-state";
  }

  identity inactive {
    base "route-state";
  }

  typedef route-state-def {
    type identityref {
      base "route-state";
    }
  }

  identity nexthop-state {
    description "The nexthop state. ";
  }

  identity resolved {
    base "nexthop-state";
  }

  identity unresolved {
    base "nexthop-state";
  }

  typedef nexthop-state-def {
    type identityref {
      base "nexthop-state";
    }
  }

  identity route-installed-state {
    description "The route installed state. ";
  }

  identity uninstalled {
    base "route-installed-state";
  }

  identity Installed {
    base "route-installed-state";
  }




Wang, et al.            Expires September 6, 2015              [Page 33]

Internet-Draft                   RIB DM                       March 2015


  typedef route-installed-state-def {
    type identityref {
      base "route-installed-state";
    }
  }

  identity route-reason {
    description "The reason of invalid Route. ";
  }

  identity low-preference {
    base "route-reason";
    description "low preference";
  }

  identity unresolved-nexthop {
    base "route-reason";
    description "unresolved nexthop";
  }

  identity higher-metric {
    base "route-reason";
    description "higher metric";
  }

  typedef route-reason-def {
    type identityref {
      base "route-reason";
    }
  }


  notification nexthop-resolution-status-change {
    description
        "Nexthop resolution status (resolved/unresolved) notification.";
    container nexthop{
      uses nexthop;
    }
    leaf nexthop-state {
      description
       "Nexthop resolution status (resolved/unresolved) notification.";
      type nexthop-state-def;
      mandatory true;
    }
  }

  notification route-change {
    description



Wang, et al.            Expires September 6, 2015              [Page 34]

Internet-Draft                   RIB DM                       March 2015


        "Route change notification.";
    leaf instance-name {
      description
        "A routing instance is identified by its name,
        INSTANCE_name.  This MUST be unique across all routing instances
        in a given network device.";
      type string ;
      mandatory true;
    }
    leaf rib-name {
      description
       "A reference to The name of a rib.";
      type string;
      mandatory true;
    }
    leaf rib-family {
      type rib-family-def;
      mandatory true;
    }
    uses route-prefix;
    leaf route-installed-state {
      description
       "Indicates whether the route got installed in the FIB.";
      type route-installed-state-def;
      mandatory true;
    }
    leaf route-state {
      description
       "Indicates whether a route is fully resolved and
        is a candidate for selection.";
      type route-state-def;
      mandatory true;
    }
    leaf route-reason {
      description
       "Need to be added.";
      type route-reason-def;
      mandatory true;
    }
  }
}
//   </code ends>

5.  IANA Considerations

   This draft includes no request to IANA.





Wang, et al.            Expires September 6, 2015              [Page 35]

Internet-Draft                   RIB DM                       March 2015


6.  Security Considerations

   This document introduces no new security threat and SHOULD follow the
   security requirements as stated in [I-D.ietf-i2rs-architecture].

7.  References

7.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

7.2.  Informative References

   [I-D.ietf-i2rs-architecture]
              Atlas, A., Halpern, J., Hares, S., Ward, D., and T.
              Nadeau, "An Architecture for the Interface to the Routing
              System", draft-ietf-i2rs-architecture-08 (work in
              progress), January 2015.

   [I-D.ietf-i2rs-rib-info-model]
              Bahadur, N., Folkes, R., Kini, S., and J. Medved, "Routing
              Information Base Info Model", draft-ietf-i2rs-rib-info-
              model-05 (work in progress), January 2015.

   [I-D.ietf-i2rs-usecase-reqs-summary]
              Hares, S. and M. Chen, "Summary of I2RS Use Case
              Requirements", draft-ietf-i2rs-usecase-reqs-summary-00
              (work in progress), November 2014.

   [I-D.ietf-netconf-restconf]
              Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", draft-ietf-netconf-restconf-04 (work in
              progress), January 2015.

   [RFC5511]  Farrel, A., "Routing Backus-Naur Form (RBNF): A Syntax
              Used to Form Encoding Rules in Various Routing Protocol
              Specifications", RFC 5511, April 2009.

   [RFC6020]  Bjorklund, M., "YANG - A Data Modeling Language for the
              Network Configuration Protocol (NETCONF)", RFC 6020,
              October 2010.

   [RFC6021]  Schoenwaelder, J., "Common YANG Data Types", RFC 6021,
              October 2010.






Wang, et al.            Expires September 6, 2015              [Page 36]

Internet-Draft                   RIB DM                       March 2015


   [RFC6536]  Bierman, A. and M. Bjorklund, "Network Configuration
              Protocol (NETCONF) Access Control Model", RFC 6536, March
              2012.

Authors' Addresses

   Lixing Wang
   Huawei

   Email: [email protected]


   Hariharan Ananthakrishnan
   Packet Design

   Email: [email protected]


   Mach(Guoyi) Chen
   Huawei

   Email: [email protected]


   Amit Dass
   Ericsson
   Torshamnsgatan 48.
   Stockholm  16480
   Sweden

   Email: [email protected]


   Sriganesh Kini
   Ericsson

   Email: [email protected]


   Nitin Bahadur
   Bracket Computing

   Email: [email protected]








Wang, et al.            Expires September 6, 2015              [Page 37]
_______________________________________________
i2rs mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/i2rs

Reply via email to