Internet DRAFT - draft-ichen-rtgwg-forwarding-policy-yang

draft-ichen-rtgwg-forwarding-policy-yang






Routing Area                                                     I. Chen
Internet-Draft                                                     Jabil
Intended status: Standards Track                            A. Choudhary
Expires: September 04, 2018                                        Cisco
                                                          March 05, 2018

                      Forwarding Policy YANG Model
              draft-ichen-rtgwg-forwarding-policy-yang-00

Abstract

   This document defines a YANG data model to manage forwarding
   policies.  The forwarding policy YANG model is based on the generic
   Quality-of-Service (Qos) policy YANG model ietf-qos-policy.yang, and
   includes augmented data nodes specific to forwarding policies.

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 04, 2018.

Copyright Notice

   Copyright (c) 2018 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.  Requirements Language  . . . . . . . . . . . . . . . . . . . .  2
   3.  Design of the Data Model . . . . . . . . . . . . . . . . . . .  2

Chen & Choudhary       Expires September 04, 2018               [Page 1]

Internet-Draft           Forwarding Policy YANG               March 2018

     3.1.  Forwarding Policy Actions  . . . . . . . . . . . . . . . .  2
     3.2.  Tree View  . . . . . . . . . . . . . . . . . . . . . . . .  3
   4.  YANG Module  . . . . . . . . . . . . . . . . . . . . . . . . .  3
   5.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . .  5
   6.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  5
   7.  Security Considerations  . . . . . . . . . . . . . . . . . . .  6
   8.  References . . . . . . . . . . . . . . . . . . . . . . . . . .  6
     8.1.  Normative References . . . . . . . . . . . . . . . . . . .  6
     8.2.  Informative References . . . . . . . . . . . . . . . . . .  6
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . .  6

1.  Introduction

   This document defines a YANG [RFC7950] data model to manage
   forwarding policies via protocols such as NETCONF [RFC6241].  A
   forwarding policy is a policy that defines several rules.  Each rule
   defines matching criteria and corresponding actions applied to
   packets such that packets matching those criteria are forwarded
   differently from what the routing table dictates.

   The forwarding policy YANG model is based on the generic base policy
   model called ietf-qos-policy.yang defined in the QoS YANG model [I-D
   .asechoud-rtgwg-qos-model].  Each forwarding policy is modeled as a
   QoS policy with a new type, the forwarding policy type.  The
   forwarding policy YANG model defines an augment to the base QoS
   policy that adds parameters specific to forwarding policies.  These
   added parameters are the packet handling actions that are specific to
   forwarding policies.

   In the rest of this document, Section 3.1 describes the model
   details, particularly the packet handling actions specific to
   forwarding policies that are defined in this model.  Section 3.2
   provides a tree view of the model, and Section 4 provides the
   forwarding policy YANG model in its entirety.

2.  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].

3.  Design of the Data Model

3.1.  Forwarding Policy Actions

   Because a forwarding policy is conceptually similar to a Quality-of-
   Service (QoS) policy where packets matching certain criteria are
   handled differently as these packets traverse the router and egress
   the router, the forwarding policy YANG model is based on the generic
   base QoS policy model ietf-qos-policy.yang, which is defined in the
   QoS YANG model [I-D.asechoud-rtgwg-qos-model].  What is specific to a
   forwarding policy is how packets are forwarded.  Instead of
   forwarding packets based on the routing table, packets are forwarded
   based on a forwarding policy.



Chen & Choudhary       Expires September 04, 2018               [Page 2]

Internet-Draft           Forwarding Policy YANG               March 2018


   This forwarding policy model currently defines three common
   forwarding actions: drop and forwarding to one or more user
   configured IPv4 or IPv6 nexthops instead of what the routing table
   dictates.  The model also allows for specifying the network instance
   [I-D.ietf-rtgwg-ni-model] to which the nexthops are associated.

   If necessary, other more advanced forwarding actions can be augmented
   to the forwarding policy as vendor augmentations.

3.2.  Tree View

   module: ietf-forwarding-policy
     augment /pol:policies/pol:policy-entry/pol:classifier-entry
             /pol:classifier-action-entry-cfg/pol:action-cfg-params:
       +--:(drop)
       |  +--rw drop-actions
       |     +--rw drop?   empty
       +--:(redirect-to-ipv4-nexthops)
       |  +--rw redirect-to-ipv4-nexthops-actions
       |     +--rw ipv4-nexthop* [address]
       |     |  +--rw address    inet:ipv4-address
       |     +--rw network-instance?   -> /ni:network-instances
                                          /network-instance/name
       +--:(redirect-to-ipv6-nexthops)
          +--rw redirect-to-ipv6-nexthops
             +--rw ipv6-nexthop* [address]
             |  +--rw address    inet:ipv6-address
             +--rw network-instance?   -> /ni:network-instances
                                          /network-instance/name

4.  YANG Module























Chen & Choudhary       Expires September 04, 2018               [Page 3]

Internet-Draft           Forwarding Policy YANG               March 2018


   <CODE BEGINS> file "ietf-forwarding-policy@2018-03-05.yang"
   module ietf-forwarding-policy {
     yang-version "1.1";
     namespace "urn:ietf:params:xml:ns:yang:ietf-forwarding-policy";
     prefix "fwd";
   
     import ietf-inet-types {
       prefix "inet";
     }
   
     import ietf-network-instance {
       prefix "ni";
     }
   
     import ietf-qos-policy {
       prefix "pol";
     }
   
     organization "";
     contact "";
     description "";
   
     revision 2018-03-05 {
       description "Initial version";
       reference "";
     }
   
     identity forwarding-policy {
       base pol:policy-type;
       description "Forwarding policy type";
     }
   
     identity redirect-action {
       base pol:action-type;
       description "Redirect action type";
     }
   
     augment "/pol:policies" +
             "/pol:policy-entry" +
             "/pol:classifier-entry" +
             "/pol:classifier-action-entry-cfg" +
             "/pol:action-cfg-params" {
       when "../../pol:policy-type = 'fwd:forwarding-policy'" {
         description "Forwarding policy's action augmentation";
       }
       description "Forwarding policy's action parameters";
       case drop {
         description "Drop action choice";
         container drop-actions {
           description "Redirect action that are drop actions";
           leaf drop {
             type empty;
             description "Redirect packet such that it is dropped";

Chen & Choudhary       Expires September 04, 2018               [Page 4]

Internet-Draft           Forwarding Policy YANG               March 2018

           }
         }
       }
       case redirect-to-ipv4-nexthops {
         container redirect-to-ipv4-nexthops-actions {
           description "Actions to redirect to a list of nexthops";
           list ipv4-nexthop {
             key "address";
             leaf address {
               type inet:ipv4-address;
               description "The IPv4 address";
             }
             description "A list of IPv4 nexthops";
           }
           leaf network-instance {
             type leafref {
               path "/ni:network-instances/ni:network-instance/ni:name";
             }
             description "The routing instance in which the addresses " +
                         "reside";
           }
         }
       }
       case redirect-to-ipv6-nexthops {
         container redirect-to-ipv6-nexthops {
           description "Redirect actions to IPv6 nexthops";
           list ipv6-nexthop {
             key "address";
             leaf address {
               type inet:ipv6-address;
               description "The IPv6 address";
             }
             description "A list of IPv6 nexthop addresses";
           }
           leaf network-instance {
             type leafref {
               path "/ni:network-instances/ni:network-instance/ni:name";
             }
             description "The routing instance in which the addresses " +
                         "reside";
           }
         }
       }
     }
   }
   <CODE ENDS>

5.  Acknowledgments

   TBD

6.  IANA Considerations

   TBD

Chen & Choudhary       Expires September 04, 2018               [Page 5]

Internet-Draft           Forwarding Policy YANG               March 2018


7.  Security Considerations

   TBD

8.  References

8.1.  Normative References

   [I-D.asechoud-rtgwg-qos-model]
              Choudhary, A., Jethanandani, M., Strahle, N., Aries, E.
              and I. Chen, "YANG Model for QoS", Work in Progress,
              draft-asechoud-rtgwg-qos-model-03, December 2017.

   [I-D.ietf-rtgwg-ni-model]
              Berger, L., Hopps, C., Lindem, A. and D. Bogdanovic, "YANG
              Network Instances", Work in Progress, draft-ietf-rtgwg-ni-
              model-10, Februrary 2018.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/
              RFC2119, March 1997, <http://www.rfc-editor.org/info/
              rfc2119>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016, <http://www
              .rfc-editor.org/info/rfc7950>.

8.2.  Informative References

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J.Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <http://www.rfc-editor.org/info/rfc6241>.

Authors' Addresses

   I. Chen
   Jabil
   
   Email: ing-wher_chen@jabil.com


   A. Choudhary
   Cisco
   
   Email: asechoud@cisco.com







Chen & Choudhary       Expires September 04, 2018               [Page 6]