<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC0768 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0768.xml">
<!ENTITY RFC0791 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0791.xml">
<!ENTITY RFC0792 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0792.xml">
<!ENTITY RFC0793 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0793.xml">
<!ENTITY RFC2460 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2460.xml">
<!ENTITY RFC2460 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2460.xml">
<!ENTITY RFC3060 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3060.xml">
<!ENTITY RFC3460 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3460.xml">
<!ENTITY RFC3644 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3644.xml">
<!ENTITY RFC4960 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4960.xml">
<!ENTITY RFC5575 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5575.xml">
<!ENTITY I-D.ietf-i2rs-architecture SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-architecture.xml">
<!ENTITY I-D.ietf-i2rs-rib-info-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-rib-info-model.xml">
<!ENTITY I-D.ietf-i2rs-rib-data-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-rib-data-model.xml">
<!ENTITY I-D.ietf-netmod-acl-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-acl-model.xml">
<!ENTITY I-D.ietf-netmod-routing-cfg SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-routing-cfg.xml">
<!ENTITY I-D.hares-i2rs-pkt-eca-data-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.hares-i2rs-pkt-eca-data-model.xml">
<!ENTITY I-D.ietf-i2rs-usecase-reqs-summary SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-usecase-reqs-summary.xml">
<!ENTITY I-D.kini-i2s-fb-rib-info-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.kini-i2rs-fb-rib-info-model.xml">
<!ENTITY I-D.acee-rtgwg-yang-rib-extend
  SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.acee-rtgwg-yang-rib-extend.xml">

]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc iprnotified="no" ?>
<?rfc strict="no" ?>
<rfc category="std" docName="draft-ietf-i2rs-fb-rib-data-model-00"  ipr="trust200902">
  <front>
    <title abbrev="Filter-Base RIB DM">Filter-Based RIB Data Model </title>
	 <author fullname="Susan Hares" initials="S." surname="Hares">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>7453 Hickory Hill</street>
          <city>Saline</city>
          <region>MI</region>
          <code>48176</code>
          <country>USA</country>
        </postal>
        <email>shares@ndzh.com</email>
      </address>
    </author>
	<author fullname="Sriganesh Kini" initials="S." surname="Kini">
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street></street>
          <city> </city>
          <country></country>
        </postal>
        <email>sriganesh.kini@ericsson.com</email>
      </address>
    </author>
	    <author fullname="Linda Dunbar" initials="L." surname="Dunbar">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street> </street>
          <city> </city>
          <region> </region>
          <code> </code>
          <country>USA</country>
        </postal>
        <email>linda.dunbar@huawei.com</email>
      </address>
    </author>
    <author fullname="Ram Krishnan" initials="R." surname="Krishnan">
      <organization>Dell</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <country></country>
        </postal>
        <email>Ramkri123@gmail.com</email>
      </address>
    </author>
    <author fullname="Dean Bogdanovic" initials="D." surname="Bogdanovic">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street></street>
          <city>Westford, MA</city>
          <country></country>
        </postal>
        <email>ivandean@gmail.org</email>
      </address>
    </author>
	    <author fullname="Russ White" initials="R." surname="White">
      <organization>Linkedin</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <country></country>
        </postal>
        <email>russ@riw.us</email>
      </address>
    </author>
    <date year="2016" />
    <area>Routing Area</area>
    <workgroup>I2RS working group</workgroup>
    <keyword>RFC</keyword>
    <keyword>Request for Comments</keyword>
    <keyword>I-D</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>I2RS</keyword>
    <abstract>
	<t>This document defines a data model to support the
	Filter-based Routing Information Base (RIB) Yang data models for
	I2RS. A routing system uses
	the Filter-based RIB to program FIB entries that process incoming
	packets by matching on multiple fields within the packet and then performing
	a specified action on it.  The FB-RIB can also specify an action to forward 
	the packet according to the FIB entries programmed
	 using the RIBs of its routing instance.</t>
	 </abstract>
  </front>
  <middle>
    <section anchor="intro" title="Introduction">
      <t>The Interface to the Routing System (I2RS) <xref target="I-D.ietf-i2rs-architecture"></xref> 
	  architecture provides dynamic read and write access to the information and state within the routing
      elements. The I2RS client interacts with the I2RS agent in one or more network routing systems. 
	  </t>
     <t> This document provides a yang module for the I2RS filter Based Routing Information Base
	 (FB-RIB) and describes the I2RS interaction with routing filters within a routing element. 
	 The informational model for the FB-RIB is in 
	 <xref target="I-D.kini-i2rs-fb-rib-info-model"></xref>
	 </t>
	 <section title="Definition of I2RS Filter Based RIB">
	 <t>Filter-based routing is a technique used to make packet forwarding decisions
     based on a filter that is matched to the incoming packets and the specified action.
	 It should be noted that that this is distinct from the static routes in the RIB
	 <xref target="I-D.ietf-i2rs-rib-info-model"></xref> where the routing is destination 
	 ddress based.  
	 </t>
	<t> A Filter-Based RIB (Routing Information Base) is contained in a routing
	  instance (defined in <xref target="I-D.ietf-i2rs-rib-info-model"></xref>). 
	  It contains a list of filters (match-action conditions) and a list of interfaces the filter-based
      forwarding operates on, and default RIB(s). 
	  </t> 
	<t>A Filter Based RIB uses packet forwarding policy.  If packet reception is considered an
	event, then the I2RS Filter-based RIB uses a minimalistic Event-matchCondition-Action policy with
	the following characteristics: 
	<list>
	<t>event = packet/frame received,</t>
	<t>match condition - match on field in frame/packet or circumstances relating to packet 
       reception (e.g. time received), </t>
	<t>action - modify packet and forward/drop packet.</t>
	</list>
	 A Filter-based RIB entry specifies match filters for the fields in a packet 
	 (which may include layer 1 to layer 3 header fields, transport or 
	 application fields) or size of the packet or interface received on. 
	The matches are contained in an ordered list of filters which 
	contain pairs of match condition-action (aka event-condition-action).
	</t>
	<t>
	If all matches fail, default action is to forward the packet using 
	Destination Based forward from the default RIB(s).  The 
	default RIBs can be:
	<list style="symbols">
	<t>created by the I2RS Routing Informational Base
	(RIB) manager using the yang model described in: 
	in <xref target="I-D.ietf-i2rs-rib-info-model"></xref>, or </t>
	<t>configured RIB created using static routes or
	<xref target="I-D.ietf-netmod-routing-cfg"></xref>.
	</t>
	<t>or static RIB created via static route yang model </t>
	</list>
 	</t>
	<t>	Actions in the condition-action pair may impact forwarding or 
	set something in the packet that will impact forwarding.
	Policy actions are typically applied before applying QoS constraints
    since policy actions may override QoS constraint.
	 </t>
	<t>
    The Filter-Based RIB resides in ephemeral state as does the I2RS RIB and I2RS
	topology models.
	 </t>
	 </section>
	</section>
	<section title="Requirements Language">
	<t>   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].
   </t>
	<t> In this document, these words will appear with that interpretation
   only when in ALL CAPS.  Lower case uses of these words are not to be
   interpreted as carrying RFC-2119 significance.
	</t>
	</section>
    <section title="Definitions and Acronyms">
	      <t>
		  <list style="hanging"> 
          <t hangText="CLI"><vspace blankLines="1" /> Command Line Interface</t>
	      <t hangText="FB-RIB"><vspace blankLines="1" /> Filter-Based Routing Information Base</t> 
		  <t hangText="FB-Route"><vspace blankLines="1" />  
	      The policy rules in the  filter-based RIB are prescriptive of the Event-Condition-Action
		  form which is often represented by if Condition then action". </t>
		  <t hangText="Policy Group"><vspace blankLines="1" /> Policy Groups are groups of
		  policy rules. The groups of policy in the basic network policy
		  <xref target="I-D.hares-i2rs-pkt-eca-data-model"></xref> allow grouping
		  of policy by name. This structure allow easier management of 
		  customer-based or provider based filters, but does not change the 
		  policy-rules list. 
		  </t>
		  <t hangText="RIB IM "><vspace blankLines="1" /> RIB Informational Model (RIB IM) 
		  <xref target="I-D.ietf-i2rs-rib-info-model"></xref>   </t>
		  <t hangText="Routing instance"><vspace blankLines="1" /> A routing instance, 
		  in the context of the FB-FIB 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.  </t>
        </list>
		</t>
    </section>
  <section title="High level Yang structure for the FB-RIB">
 <t> There are three levels in the Filter-Based RIB (FB-RIB) structure: 
 <list style="symbols">
 <t> a global FB-RIB structures,
</t>
<t>the common structure of the FB-RIB, and 
</t>
<t>the groupings that make up the FB-RIB  
</t>
</list>
</t>
<t>
 All structures have two types: configuration/ephemeral state and operational state. 
 </t>
 <t>
 This yang model describes three types of FB-RIBS: configuration, I2RS, and 
 BGP Flow Specification.  The configuration FB-RIB yang module is config state ("config true" and
"ephemeral false") and survives a reboot. The I2RS FB-RB yang model is reboot ephemeral 
("config true" and "ephemeral true;").  The BGP Flow Specification Filter-Based RIB stores
policy which is received by the BGP peers.  The BGP configuration contains a flow-specification
as part of its configuration, and the ability to export this flow specification to other BGP peers. 
The BGP local configuration with the flow specification is consider ("config true"), and it is 
possible to be ephemeral ("ephemeral true") or local configuration ("ephemeral false" ).
The BGP flow specifications received from peers are derived state, just like other BGP 
dervised state. 
 </t>
  <t> 
 <figure>
 <artwork> 

Configuration RIBS 
	 
   +-----------------------------------------+
   |     routing instance                    |
   +-------|-------------|----------------|--+
           |             |                |
           |             |                |
 +---------|----+  +-----|-----+ +--------|-----+
 |config-fb-rib |  |i2rs-fb-rib| |bgp-fs-fb-rib |
 |              |  |           | |config only   | 
 +------|-------+  +-----|-----+ +------|-------+
        |............:....|...............|
                     :  (uses common structures
                     :   in separate lists of FB-RIBs) 		
            +--------|----+  
            |fb-ribs*     |  
            |             |  
            +--|----------+  
               |             
       

  Figure 3: Routing instance with three types of 
            Filter-FIB lists
</artwork>
</figure>
</t>  	
 <t>
 The following section provides the high level yang structure diagrams
 for the following levels of structures for both config/ephemeral state and operationa. 
 <list style="symbols">
 <t>ietf-fb-rib - contains filter-based RIBS for config, I2RS FB-RIB, and BGP Flow Specification.</t>
 <t>fb-rib - that contains the structures for the filter-based grouping</t>
 <t>fb-rib-types - that contains the structures for groupings within the filter-based RIBS</t>
 </list> 
 These structures are contained within the yang section in this draft. 
 </t> 
 <t>
 The packet-reception ECA policy yang module is contained in the draft
 <xref target="I-D.hares-i2rs-pkt-eca-data-model"></xref>.
 </t>
 <t> For those who desire more information regarding the logic behind the 
 I2RS Filter-Based RIB, please see the Informational Model at:
 <xref target="I-D.kini-i2rs-fb-rib-info-model"></xref>.
 </t>
<section title="Top Level Yang Structure for ietf-fb-rib">
 <t> The Top-level Yang structure for a global FB-RIB types (similar to acl) is 
not defined for filter-based RIBS.
The I2RS Filter-Based RIB should be defined under this structure
under a routing instance.  The three things under this RIB would be: 
configured Filter-Based RIB (aka Policy routing), I2RS reboot 
Ephemeral Filter-Based RIB, and BGP Flow Specification's Filter-Based RIB. 
All of these RIBs have similar actions. 
</t>
 <t>There are two types top-level structures for ietf-fb-ribs: config and operational state.
 </t>
 <t> 		  
The Top-level Yang structure for a global 
configuration of Filter-Based RIBs are:     
<figure>
<artwork>
Augments rt:logical-network-elements:\
        :logical-network-element:network-instances: \
	    network-instance 


ietf-fb-rib module 
  +--rw ietf-fb-rib
     +--rw default-instance-name string 
     +--rw default-router-id rt:router-id
     +--rw config-fb-ribs
	    if-feature "config-filter-based-RIB";
        uses fb-ribs;
     +--rw i2rs-fb-ribs 
		  if-feature "I2RS-filter-based-RIB";
		  uses fb-rib-t:fb-ribs;	
     +--rw bgp-fs-fb-ribs 
		 if-feature "BGP-FS-filter-based-RIB";
		  uses fb-rib-t:fb-ribs;
		
    Figure 5: configuration state   		
</artwork>
</figure>
</t>
 <t> 		  
The Top-level Yang structure for a global 
operational state of Filter-Based RIBs are:     
<figure>
<artwork>
Augments rt:logical-network-elements:\
        :logical-network-element:network-instances: \
	    network-instance 
		
ietf-fb-rib module 
  +--rw ietf-fb-rib-opstate
    +--rw default-instance-name string 
    +--rw default-router-id rt:router-id
	+--rw config-fb-rib-opstate 
		  if-feature "config-filter-based-RIB";
		  uses fb-rib-t:fb-ribs-oper-status;
	+--rw i2rs-fb-rib-opstate {
		  if-feature "I2RS-filter-based-RIB";
		  uses fb-rib-t:fb-ribs-oper-status;
	+--rw bgp-fs-fb-rib-opstate 
		  if-feature "BGP-FS-filter-based-RIB";
		  uses fb-rib-t:fb-ribs-oper-status;
		
    Figure 5: operational state   		
</artwork>
</figure>
</t>	  
</section>
<section title="Filter-Based RIB structures">
<t>The Top-level yang structures at the Filter-Based RIB level have
two types: configuration and operational state.
</t> 
 <t> 
The Top-level Yang structure for the FB-RIB types is: 
 <figure>
 <artwork>
 module: fb-rib-types:
 +--rw fb-ribs 
    +--rw fb-rib* [rib-name]
    |  +--rw rib-name string
    |  |  rw fb-type identityref / ephemeral or not 
    |  +--rw rib-afi rt:address-family 
    |  +--rw fb-rib-intf* [name] 
    |  |  +--rw name string
    |  |  +--rw intf if:interface 
    |  +--rw default-rib 
    |  |  +--rw rt-rib string 
    |  |  +--rw config-rib string;  // config rib name                     
    |  |  +--rw i2rs-rib:routing-instance:name   
    |  |  +--rw i2rs-rib string;   //ephemeral rib name
    |  |  +--rw bgp-instance-name string 
    |  |  +--rw bgp-rib  string    //session ephemeral 
    |  +--rw fb-rib-refs
    |  |  +--rw fb-rib-update-ref uint32 /count of writes 
    |  +--rw instance-using* 
    |  |   device:networking-instance:networking-instance-name 
    |  +--use pkt-eca:pkt-eca-policy-set
		
rt-rib - refer to static rib.  
		
	  Figure 6: FB RIB Type Structure   
	  
</artwork>
</figure>
 </t>
 <t>
<figure>
<artwork>
HIgh Level Yang 

+--rw fb-ribs-oper-status
   +--rw fb-rib-oper-status* [fb-rib-name]
         uses pkt-eca:pkt-eca-opstate 
</artwork>
</figure>
</t>
</section>
</section>
<section title="yang models">
<section title="Filter-Based RIB types">
<t>
<figure>
<artwork>
&lt;CODE BEGINS&gt; file "ietf-fb-rib-types@2016-02-09.yang"
 module ietf-fb-rib-types {

  yang-version "1";

  // namespace
    namespace "urn:ietf:params:xml:ns:yang:ietf-fb-rib-types";
    prefix "fb-rib-t";
	import ietf-interfaces {prefix "if";}
	import ietf-routing {prefix "rt";}
	import ietf-pkt-eca-policy {prefix "pkt-eca";}

  // meta
  organization
    "IETF";

  contact
     "email: shares@ndzh.com;
	  email: sriganesh.kini@ericsson.com
      email: cengiz@packetdesign.com
      email: ivandean@gmal.org 
      email: linda.dunbar@huawei.com;
      email: russ@riw.com;	  
	 ";

  description
    "This module describes a YANG model for the I2RS 
    Filter-based RIB Types.  These types 
    specify types for the Filter-Based RIB.  
	
	Copyright (c) 2015 IETF Trust and the persons identified as
    the document authors.  All rights reserved.

    Redistribution and use in source and binary forms, with or
    without modification, is permitted pursuant to, and subject
    to the license terms contained in, the Simplified BSD
    License set forth in Section 4.c of the IETF Trust's Legal
    Provisions Relating to IETF Documents
    (http://trustee.ietf.org/license-info).";

   
  revision "2016-02-09" {
      description
        "Filter-Based RIB protocol ";
        reference "draft-hares-i2rs-fb-rib-data-model-01";
    }
  
    typedef fb-rib-type-def {
	   type identityref {
	     base "fb-rib-type";
		 }
		description 
		"This type is used to refer to
		 source of Filter-Based RIB: 
		 configuration, I2RS, Flow-Spec.";
     }
	 
	identity fb-rib-type {
		description 
		"This type is used to refer to
		 source of Filter-Based RIB: 
		 configuration, I2RS, Flow-Spec.";
	} 
	 
  	identity fb-rib-config-type {
	   	 base fb-rib-type;
	     description 
	     "config Filter-Based RIB";
	 }
	 
	identity fb-rib-i2rs-ephemeral-type {
	   	 base fb-rib-type;
	     description 
	     "I2RS Reboot ephemeral Filter-Based RIB";
	 }
	 
	identity fb-rib-BGP-FS-type {
	   	 base fb-rib-type;
	     description 
	     "BGP Flow Specification Filter-Based RIB";
	 }
  
    typedef fb-rib-policy-type-def {
	   type identityref {
	     base "fb-rib-policy-type";
		 }
		description 
		"This type is used to refer to FB-RIB type";
     }
	 
	identity fb-rib-policy-type {
	     description 
	     "Types of filter-based policies
		  acl and eca";
	 }
	  
	   identity fb-rib-acl {
	   	  base fb-rib-policy-type;
	      description  
          "filter based policy based on access-lists";
	    }
				
  	   identity fb-bnp-eca-rules {
	   	  base fb-rib-policy-type;
	      description  
          "filter based policy based on qos forwarding rules";
	    }
		
	typedef fb-rules-status  {
	   type identityref {
	     base "fb-rule-opstat";
		 }
		description 
		"This type is used to refer to FB-RIB type";
	 }
	 
	  identity fb-rule-opstat {
		description 
		"operational statues for filter rules
		 inactive and active";
		 }
	 
	  identity fb-rule-inactive {
		base fb-rule-opstat;
		description
		"policy rule is inactive";
	   }
		
	  identity fb-rule-active {
		base fb-rule-opstat;
		description
		"policy rule is active";
	   }
		
	  grouping fb-rib-rule-order-status {
	  leaf statement-order {
	  	  type uint16;
	  	  description "order identifier";
	   }
	   leaf statement-oper_status {
		   type fb-rules-status;
   		   description "status of rule";
		}
		description "filter-rib 
		  policy rule order and status";
	  }
	
     grouping fb-rib-group-order-status {
	  leaf group-refcnt {
	    type uint16; 
	    description "refcnt for this group";
		}
	   leaf group-installed {
	    type uint32;
	    description "number of rules installed";
		}
		leaf group-matches {
		 type uint64;
		 description "number of matches by all
		  rules in group";
		}
		description "fb-rib group list order
		   and status info.";
	  }
	  
	grouping fb-rib-updates {
	   leaf fb-rib-update-ref {
   		 type uint64;
	     description 
		 "number of updates to this FB RIB
		  since last reboot";
	   }
	   description "FB-RIB update info";
	 }	 
	 
	grouping default-fb-rib {
	   // configuration instance for default RIB 
        leaf config-instance {
		type string;
		description "instance name - string until 
		   netmod fixes mount issues";
		}
		leaf config-rib {
		  type string;
		  description "name of config default RIB";
		}	
		//I2RS default instance for default RIB 
	    leaf i2rs-instance-name {
		 type string; 
		 description "I2RS instance name";
		}
		leaf i2rs-rib-name {
			type string;
   	        description "name of default I2RS RIB";
		}	
		leaf bgp-instance-name {
		   type string; 
		   description "name of bgp instance";
		}
		   
		leaf bgp-fs-rib-name {
		    type string;
			description "name of BGP
			 flow specification default RIB";
		}
	    description "default RIB for forwarding 
		   if the policy match";
    }			
	
    grouping fb-ribs {
	    list fb-rib {
		    key fb-rib-name;   
		    leaf fb-rib-name {
		        type string;
				mandatory true;
		        description "RIB name";
            }
		    uses rt:address-family;
		    leaf fb-type {
			    type fb-rib-type-def;
			    description "type of RIB
				list: config, I2RS rebooot
				ephemeral, BGP Flow Specification
				ephemeral. ";
		    }
	        list fb-rib-intf {
			  key "name";
			  leaf name {
				type if:interface-ref;
			    description
			     "A reference to the name of a 
				 configured network layer
			     interface.";
			   }
			  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.";
	        }
			uses default-fb-rib;  // defaults ribs  
			uses fb-rib-updates;  // write refs to this RIB   
	        list instance-using {
			  key instance-name;
			  leaf instance-name {
			    type string;
			    description 
				" name of instance using this fb-rib
				 rt:routing-instance";
			   }
			  description "instances using
			   this fb-rib";
			}  
		    // ordered rule list + group list  
		    uses pkt-eca:pkt-eca-policy-set;
            			
		  description  "Configuration of 
		     an filter-based rib list";
	    }
	   description "fb-rib group";
    }
	
	grouping fb-ribs-oper-status {
	    list fb-rib-oper-status {
  	      key fb-rib-name;
		  leaf fb-rib-name {
			  type string; 
			  description "rib name";
		  }
          uses pkt-eca:pkt-eca-opstate;
		  description  "Configuration of 
		     an filter-based rib list";
	    }
	   description "list of FB-FIB operational 
	     status";
    }
	
	        			
 } 

&lt;CODE ENDS&gt;
</artwork>
</figure>
</t>
</section>
<section title="FB-RIB">
<t>
<figure>
<artwork>
 &lt;CODE BEGINS&gt; file "ietf-fb-rib@2016-02-09.yang"
module ietf-fb-rib {
  yang-version "1";
  
  // namespace
  namespace "urn:ietf:params:xml:ns:yang:ietf-fb-rib";
  // replace with iana namespace when assigned
    prefix "fb-rib";


  // import some basic inet types
  import ietf-yang-types {prefix "yang";}
  import ietf-fb-rib-types { prefix "fb-rib-t";}
 
  // meta
  organization
    "IETF";

  contact
     "email: sriganesh.kini@ericsson.com
	  email: cengiz@packetdesign.com
      email: anoop@ieee.duke.edu
      email: ivandean@gmail.org
      email: shares@ndzh.com;	 
      email: linda.dunbar@huawei.com;	
      email: russ@riw.com;  
	 ";

  description
    "This Top level module describes a YANG model for the I2RS 
	Filter-based RIB which is an global protocol independent FB RIB module.";

     revision "2016-02-09" {
       description "initial revision";
       reference "draft-hares-i2rs-fb-rib-data-model-01";
     }
 	
	feature config-filter-based-RIB {
    description 
      "This feature means that a node support
       config filter-based rib.";
    }
 	feature I2RS-filter-based-RIB {
    description 
      "This feature means that a node support
       I2RS filter-based rib.";
    }
   	feature BGP-FS-filter-based-RIB {
    description 
      "This feature means that a node support
      BGP FS filter-based rib.";
    }

	
	 container ietf-fb-rib {
	   presence "top-level structure for
	    configuration";
       leaf default-instance-name {
	     type string;
		 mandatory true;
        description
          "A routing instance is identified by its name,
           INSTANCE_name.  This MUST be unique across all routing
           instances in a given network device.";
         }
	     leaf default-router-id {
		    type yang:dotted-quad; 
		    description "Default router id";
		}
		container config-fb-rib {
		 if-feature config-filter-based-RIB;
		  uses fb-rib-t:fb-ribs;
		 description "config filter-based RIB";
		}
		
 		container i2rs-fb-rib {
		  if-feature I2RS-filter-based-RIB;
		  uses fb-rib-t:fb-ribs;
		 description "bgp-fs filter-based RIB";
		}
		container bgp-fs-fb-rib {
		  if-feature BGP-FS-filter-based-RIB;
		  uses fb-rib-t:fb-ribs;
		 description "bgp fs filter-based RIB";
		}
	   description "fb-rib augments routing instance";
	 }
	 
	container ietf-fb-rib-opstate {
	   presence "top-level structure for
	    op-state";
	   config "false";
       leaf default-instance-name {
	     type string;
		 mandatory true;
        description
          "A routing instance is identified by its name,
           INSTANCE_name.  This MUST be unique across all routing
           instances in a given network device.";
         }
	     leaf default-router-id {
		    type yang:dotted-quad; 
		    description "Default router id";
		}
		container config-fb-rib-opstate {
		  if-feature config-filter-based-RIB;
		  uses fb-rib-t:fb-ribs-oper-status;
		 description "config filter-based RIB";
		}
 		container i2rs-fb-rib-opstate {
		  if-feature I2RS-filter-based-RIB;
		  uses fb-rib-t:fb-ribs-oper-status;
		 description "bgp-fs filter-based RIB";
		}
		container bgp-fs-fb-rib-opstate {
		  if-feature BGP-FS-filter-based-RIB;
		  uses fb-rib-t:fb-ribs-oper-status;
		 description "bgp fs filter-based RIB";
		}
	   description "fb-rib augments routing instance";
	 }
}
	

	
&lt;CODE ENDS&gt;

</artwork>
</figure>
</t>
</section>
</section>
    <section anchor="IANA" title="IANA Considerations">
      <t>TBD</t>
    </section>
    <section title="Security Considerations">
      <t>A I2RS RIB is ephemeral data store that will 
 dyanamically change traffic paths set by the routing configuration.
 An I2RS FB-RIB provides dynamic Event-Condition-Action policy that
 will further change the operation of forwarding by allow dyanmic 
 policy and ephemeral RIBs to alter the traffic paths set by 
 routing configuration.  Care must be taken in deployments to
 use the appropriate security and operational control to make 
 use of the tools the I2RS RIB and I2RS FB-RIB provide. 
 </t>
    </section>
  </middle>
  <back>
    <references title="Normative References:">
	 &I-D.ietf-i2rs-architecture;
     &I-D.ietf-i2rs-rib-info-model;
	 &I-D.ietf-i2rs-rib-data-model;
	 &I-D.ietf-netmod-acl-model; 
     &I-D.ietf-netmod-routing-cfg; 
	 &I-D.hares-i2rs-pkt-eca-data-model;
	 &I-D.kini-i2s-fb-rib-info-model;
	</references>
    <references title="Informative References">
      &RFC2119;
	  &I-D.ietf-i2rs-usecase-reqs-summary;
	  &I-D.acee-rtgwg-yang-rib-extend;
    </references>
  </back>
</rfc>