Internet DRAFT - draft-spaghetti-sidrops-rpki-vrp-yang

draft-spaghetti-sidrops-rpki-vrp-yang







SIDROPS                                                      J. Snijders
Internet-Draft                                                       NTT
Intended status: Standards Track                          April 10, 2020
Expires: October 12, 2020


                        YANG Model for RPKI VRPs
                draft-spaghetti-sidrops-rpki-vrp-yang-00

Abstract

   This document describes a YANG model for a commonly used
   datastructure for RPKI Validated ROA Payload data.  This specific
   datastructure is commonly used in the transport between RPKI Cache
   Validators and BGP routers.

Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

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 https://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 October 12, 2020.

Copyright Notice

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



Snijders                Expires October 12, 2020                [Page 1]

Internet-Draft          YANG Model for RPKI VRPs              April 2020


   (https://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.  Export Model Design and Structure . . . . . . . . . . . . . .   2
   3.  RPKI VRP Export Module  . . . . . . . . . . . . . . . . . . .   2
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
   6.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .   4
   7.  Normative References  . . . . . . . . . . . . . . . . . . . .   4
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   5

1.  Introduction

   This document defines a base YANG [RFC6020] data module to structure
   RPKI [RFC6480], Validated ROA Prefix [RFC6811] (VRP) information.
   Such export functionality has emerged in several implementations of
   relaying party (RP) software, but was not previously standardized,
   resulting in loose coordination between implementers.  This module
   establishes a simple and consistent interface for information export
   by RPs drawing from best practices observed in existing
   implementations.

2.  Export Model Design and Structure

   This section should explain why the specific elements have been
   chosen for export, and why the structure of roas block + prefix and
   AS content is the most useful or widely used.

3.  RPKI VRP Export Module

<CODE BEGINS> file "rpki-vrps.yang"
module rpki-vrp {

  namespace "urn:ietf:params:xml:ns:yang:rpki-vrp";

  prefix rpki-vrp;
  import "ietf-inet-types" {
    prefix inet;
  }




Snijders                Expires October 12, 2020                [Page 2]

Internet-Draft          YANG Model for RPKI VRPs              April 2020


  typedef asn {
    type string {
      pattern 'AS(0|[1-9][0-9]{0,8}|[1-3][0-9]{1,9}|4([0-1][0-9]{8}|2([0-8][0-9]{7}|9([0-3][0-9]{6}|4([0-8][0-9]{5}|9([0-5][0-9]{4}|6([0-6][0-9]{3}|7([0-1][0-9]{2}|2([0-8][0-9]|9[0-5])))))))))';
    }
    description
      "The Autonomous System Number";
  }

  typedef ta {
    type enumeration {
      enum apic;
      enum arin;
      enum ripe;
      enum lacnic;
      enum afrinic;
    }
  }

  typedef ip-mask {
    type union {
      type ipv4-mask;
      type ipv6-mask;
    }
  }

  typedef ipv4-mask {
    type uint8 {
      range "0 .. 32";
    }
  }

  typedef ipv6-mask {
    type uint8 {
      range "0 .. 128";
    }
  }

  container roas {
    config true;
    list roas {
      key "prefix asn";
      leaf asn {
        type asn;
        mandatory true;
      }
      leaf prefix {
        type inet:ip-prefix;
        mandatory true;



Snijders                Expires October 12, 2020                [Page 3]

Internet-Draft          YANG Model for RPKI VRPs              April 2020


      }
      leaf maxLength {
        type ip-mask;
        mandatory true;
      }
      leaf ta {
        type ta;
        mandatory true;
      }
      must "number(substring-after(prefix,'/')) >= number(maxLength)" {
        error-message "Max prefix Length is larger then prefix";
      }
    }
  }
}
<CODE ENDS>

4.  Security Considerations

   A few words about not spooking parsers would fit here.

5.  IANA Considerations

   None.

6.  Acknowledgments

   The authors would like to thank Yannis Gonianakis and Louis
   Poinsignon for their contributions to the data model described in
   this document.  The authors are grateful for feedback from Kooistra
   and David Monosov.

7.  Normative References

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

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC6480]  Lepinski, M. and S. Kent, "An Infrastructure to Support
              Secure Internet Routing", RFC 6480, DOI 10.17487/RFC6480,
              February 2012, <https://www.rfc-editor.org/info/rfc6480>.




Snijders                Expires October 12, 2020                [Page 4]

Internet-Draft          YANG Model for RPKI VRPs              April 2020


   [RFC6811]  Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R.
              Austein, "BGP Prefix Origin Validation", RFC 6811,
              DOI 10.17487/RFC6811, January 2013,
              <https://www.rfc-editor.org/info/rfc6811>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

Author's Address

   Job Snijders
   NTT
   Theodorus Majofskistraat 100
   Amsterdam  1065 SZ
   The Netherlands

   Email: job@ntt.net

































Snijders                Expires October 12, 2020                [Page 5]