<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE rfc PUBLIC '' "http://xml.resource.org/authoring/rfc2629.dtd"[
<!ENTITY RFC2119 PUBLIC '' "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2622 PUBLIC '' "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2622.xml">
<!ENTITY RFC4012 PUBLIC '' "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4012.xml">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="info"
     docName="draft-snijders-rpsl-via-03"
     ipr="trust200902"
     obsoletes=""
     updates=""
     submissionType="IETF"
     xml:lang="en">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->
  <!-- ***** FRONT MATTER ***** -->

  <front>
    <title abbrev="The via attributes in RPSL">
      The "import-via" and "export-via" attributes in RPSL Policy Specifications
    </title>

    <author initials="J" surname="Snijders" fullname="Job Snijders">
      <organization>Hibernia Networks</organization>
      <address>
        <postal>
          <street>Tupolevlaan 103a</street>
          <city>Schiphol-Rijk</city>
          <code>1119 PA</code>
          <country>NL</country>
        </postal>
        <email>job.snijders@hibernianetworks.com</email>
      </address>
    </author>

    <date year="2014" month="March"/>

    <abstract>
      <t>

This document defines two attributes in the aut-num Class which can be used
in RPSL policy specifications to publish desired routing policy regarding
non-adjacent networks. 

      </t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction">
      <t>

The Routing Policy Specification Language <xref target="RFC4012" /> allows
operators to specify routing policies regarding directly adjacent networks
through various import and export attributes.  These attributes only apply
to directly adjacent networks.

      </t>
      <t>

This document proposes to extend RPSL according to the following
goals and requirements:

        <list style="symbols">
          <t>

Provide a way for network (A) to describe what an adjacent network (B) could use
as routing policy towards its adjacent networks (C, D, E .. N).

          </t>
          <t>

The extension should be backward compatible with minimal impact on existing
tools and processes, following Section 10.2 of <xref target="RFC2622" />.

          </t>
        </list>

The addition of the "import-via" and "export-via" attributes in the aut-num
Class will especially help participants of Multi-Lateral Peering services to
inform the intermediate autonomous system what routing policy should be
applied towards other participants. 

      </t>
    </section>


    <section title="Notational Conventions">
      <t>
        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
        <xref target="RFC2119" />.
      </t>
    </section>


    <section title="Background">
      <t>

The via keyword specifically benefits operators who were assigned
a 32 bit AS Number and transit providers when participating in
Multi-Lateral Peering Agreements facilitated by a Route Server. 

      </t>
      <t>

Often Route Server operators overload BGP Communities <xref target="RFC1997"
/>) to facilitate signaling of desired routing policy between the participants
and the Route Server. Because BGP Communities have a length of 32 bit,
it is not possible to signal a 32 bit AS Number coupled with an action.
In practise this means Route Server participants who use a 32 bit AS
Number cannot specifically be included or excluded during path
distribution calculations on the Route Server unless a mapping system
is applied. 

      </t>
      <t>

Transit providers often have a routing policy which states that
the transit provider does not want to exchange paths with its downstream
customers through Route Servers via public Internet Exchanges. The import-via
and export-via attributes allow transit providers to participate in
Multi-Lateral Peering services while instructing Route Server operators
through a simple routing policy specification that paths should not be
distributed to downstream customers and reducing the 
likelihood of Path Hiding on the Route Server.

      </t>
    </section>

    <section title="Import and Export Via Syntax and Semantics">
      <t>

The two attributes can be used within the aut-num class.

    <list style="empty">
        <t>import-via:</t>
        <t>export-via:</t>
    </list>

        <figure anchor="vis_syntax">
          <preamble>The syntax for these attributes is as follows:</preamble>
          <artwork>
Attribute  Value                                         Type
import-via [protocol &lt;protocol-1&gt;] [into &lt;protocol-2&gt;]   optional,
           [afi &lt;afi-list&gt;]                              multi-valued
           &lt;mp-peering-1&gt;
           from &lt;mp-peering-2&gt; [action &lt;action-1&gt;; ... &lt;action-N&gt;;]
           . . .
           &lt;mp-peering-3&gt;
           from &lt;mp-peering-M&gt; [action &lt;action-1&gt;; ... &lt;action-N&gt;;]
           accept &lt;mp-filter&gt; [;]

export-via [protocol &lt;protocol-1&gt;] [into &lt;protocol-2&gt;]   optional,
           [afi &lt;afi-list&gt;]                              multi-valued
           &lt;mp-peering-1&gt;
           to &lt;mp-peering-2&gt; [action &lt;action-1&gt;; ... &lt;action-N&gt;;]
           . . .
           &lt;mp-peering-3&gt;
           to &lt;mp-peering-M&gt; [action &lt;action-1&gt;; ... &lt;action-N&gt;;]
           announce &lt;mp-filter&gt; [;]

          </artwork>
        </figure>
      </t>
      <t>

The import-via and export-via attributes are optional, and should be ignored by
implementations which do not support interpretation of those attributes. The
syntax closely mimics the mp-import and mp-export attributes described in 
Section 2.5 of <xref target="RFC4012" />, with the exception that before the
"from" and "to" keywords an &lt;mp-peering&gt; is defined to indicate the
common AS between two non-adjacent networks.

      </t>
      <t>

In the above example &lt;peering-1&gt; and &lt;peering-3&gt; are directly adjacent
networks, for instance a Multi-Lateral Peering service. &lt;peering-2&gt; is a
non-adjacent network.

      </t>
    </section>

    <section title="Example Usage">
      <t>
   
        <figure anchor="putting_it_all_together">
          <preamble>Putting it all together:</preamble>
          <artwork>
   aut-num: AS5580
   import-via: AS6777
                from AS15562
                action pref = 2;
                accept AS-SNIJDERS
   export-via: AS6777
                to AS15562 action community.={5580:40};
                announce AS-ATRATO
   import-via: AS5580:AS-ROUTESERVERS
                from AS5580:AS-CUSTOMERS
                accept NOT ANY
   export-via: AS5580:AS-ROUTESERVERS
                to AS5580:AS-CUSTOMERS announce NOT ANY
   import-via: AS6777
                from AS4247483647
                accept AS4247483647
   export-via: AS6777
                to AS4247483647 action community.={5580:40};
                announce AS-ATRATO
          </artwork>
        </figure>
      </t>
      <t>
 
In the above examples AS5580 and AS15562 are Route Server participants.
AS4247483647 is a participant who has been assigned a 32 bit AS Number.
AS6777 functions as a Route Server <xref target="I-D.ietf-idr-ix-bgp-route-server" />
and AS-SET AS5580:AS-ROUTESERVERS contains a list of Route Server AS Numbers.
AS-SET AS5580:AS-CUSTOMERS contains a list of downstream transit customers from AS5580. 
    </t>
    <t>
The intention of the above policy would be to enable the exchange of NLRI's
through AS6777 with two parties: AS15562 and AS4247483647, yet prevent the
Route Server from distributing NLRI's announced by AS5580 towards customers of
said network. Publishing the policy that AS5580 will not accept customer
routes through the Route Server can help counteract the "path hiding" phenomenon
as described in Section 2.3.1 of <xref target="I-D.ietf-idr-ix-bgp-route-server" />,
as the Route Server now is informed which NLRI's should not be considered in
the best path selection process.

      </t>
    </section>

    <section title="Ambiguity Resolution">
      <t>

The same peering can be covered by more than one "via" policy attribute
or by a combination of multi-protocol policy attributes, or multi-protocol
policy attributes (when specifying IPv4 unicast policy) and the previously
defined IPv4 unicast policy attributes.  In these cases, implementations
should follow the specification-order rule as defined in Section 6.4 of
RFC 2622 [1]. 

Operators should take note that in order to break ambiguity, the action
corresponding to the first peering specification is used.
</t>

<t>Consider the following example regarding ambiguity resolution.

<figure anchor="ambiguity">
<artwork>
 aut-num: AS5580
 export:     to AS6777 195.69.144.255 announce AS5580
 export-via: AS6777 195.69.144.255 to AS-AMS-IX-RS announce AS-ATRATO
</artwork>
</figure>

As both policy specifications cover the same peering with AS6777,
specification-order rule is used and Route Server AS6777 195.69.144.255
should only accept AS5580, instead of AS-ATRATO, even though the export-via
specification is more specific. If the intended policy was to announce all
routes which can be resolved through AS-ATRATO on this particular peering,
the operator should have specified:

<figure anchor="ambiguity2">
<artwork>
 aut-num: AS5580
 export-via: AS6777 195.69.144.255 to AS-AMS-IX-RS announce AS-ATRATO
 export:     to AS6777 195.69.144.255 announce AS5580
</artwork>
</figure>

      </t>
    </section>


    <section title="Security Considerations">
      <t>

There are no security considerations for this specification.  

      </t>
    </section>

    <section title="IANA Considerations">
      <t>

This document has no IANA actions.

      </t>
    </section>
    <section title="Acknowledgments">
      <t>

The author would like to thank Remko van Mook for confirming that "via"
is a better keyword than 'through' or 'thru', Nick Hilliard for his 
unparalleled support, Jeffrey Haas for providing historic perspective, 
David Croft and Martin Pels for nitpicking.

      </t>
    </section>

  </middle>

  <back>

    <references title="Normative References">
      <?rfc include="reference.RFC.1997"?> <!-- bgp communities -->
      <?rfc include="reference.RFC.2119"?> <!-- keywords -->
      <?rfc include="reference.RFC.2622"?> <!-- Routing Policy Specification Language (RPSL) -->
      <?rfc include="reference.RFC.4012"?> <!-- Routing Policy Specification Language next generation (RPSLng) -->
    </references>

    <references title="Informative References">
      <?rfc include="reference.I-D.ietf-idr-ix-bgp-route-server"?>
    </references> 

    <section title="Grammar Rules">
      <t>
      Note that only 'via' specific grammar rules have been listed. Currently
      two routing registry whois daemons have support for the 'via' attributes:
      IRRd 3.0.7 and RIPE Whois Server 1.71.  </t>
  <t>
      <figure anchor="gram_syntax">
        <artwork>

%type &lt;string&gt; line_autnum
%type &lt;string&gt; attr_autnum
%type &lt;string&gt; attr_import_via
%type &lt;string&gt; attr_export_via

%token T_IV_KEY //*** import-via: ***
%token T_EV_KEY //*** export-via: ***
%token T_AFI T_PROTOCOL T_WORD T_INTO T_EXCEPT T_REFINE
%token T_ACCEPT T_ANNOUNCE T_TO T_FROM T_PRNGNAME

line_autnum: attr_autnum 
    | attr_import_via
    | attr_export_via

attr_import_via: T_IV_KEY attr_import_syntax

attr_import_syntax: opt_protocol_from opt_protocol_into import_simple
    | opt_protocol_from opt_protocol_into afi_import_exp

attr_export_via: T_EV_KEY attr_export_syntax 

attr_export_syntax: opt_protocol_from opt_protocol_into export_simple
    | opt_protocol_from opt_protocol_into afi_export_exp

opt_afi_specification: 
    | T_AFI afi_list 

afi_list: afi_token 
    | afi_list ',' afi_token

afi_token: afi_name 

opt_protocol_from: 
    | T_PROTOCOL T_WORD

opt_protocol_into: 
    | T_INTO T_WORD

import_simple: opt_afi_specification import_factor

export_simple: opt_afi_specification export_factor

afi_import_exp: opt_afi_specification import_exp

afi_export_exp: opt_afi_specification export_exp

import_exp: import_term
    | import_term T_EXCEPT afi_import_exp
    | import_term T_REFINE afi_import_exp

import_factor_list: import_factor ';'
    | import_factor_list import_factor ';'

import_term: import_factor ';'
    | '{' import_factor_list '}'

export_exp: export_term
    | export_term T_EXCEPT afi_export_exp
    | export_term T_REFINE afi_export_exp

export_factor_list: export_factor ';'
    | export_factor_list export_factor ';'

export_term: export_factor ';'
    | '{' export_factor_list '}'

import_factor: import_peering_action_list T_ACCEPT filter

export_factor: export_peering_action_list T_ANNOUNCE filter

peering: as_expression opt_router_expression \
            opt_router_expression_with_at
    | T_PRNGNAME 

// Below are two grammar rules that actually differ
// from mp-import: + mp-export:

import_peering_action_list: peering T_FROM peering opt_action
    | import_peering_action_list peering T_FROM peering opt_action

export_peering_action_list: peering T_TO peering opt_action
    | export_peering_action_list peering T_TO peering opt_action

</artwork>
</figure>

</t>
</section>

<section title="Document Change Log">
<t> (RFC Editor - this Appendix can be removed upon publication as RFC)</t>
<t>
    <list style="numbers">
    <t> Initial document.</t> 

    <t>Changes to draft-snijders-rpsl-via-01.txt
    <list style="letters">
        <t>
        Moved from adding a new RPSL keyword to a new RPSL attribute
        to improve backwards compatibility.</t>
        </list>
    </t>

    <t>Changes to draft-snijders-rpsl-via-02.txt
    <list style="letters">
        <t>Added grammar appendix.</t>
        <t>Added section about Ambiguity Resolution.</t>
        </list>
    </t>

    <t>Changes to draft-snijders-rpsl-via-03.txt
    <list style="letters">
        <t>Updated current IRR implementations.</t>
        </list>
    </t>


</list>
</t>
</section>
</back>

</rfc>

