<?xml version="1.0" encoding="ASCII"?>
<!DOCTYPE rfc  SYSTEM "rfc3667.dtd">
<!ENTITY rfc2119 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
<!ENTITY rfc3031 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3031.xml'>
<!ENTITY rfc4023 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4023.xml'>
<!ENTITY rfc4271 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml'>
<!ENTITY rfc4364 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4364.xml'>

<?rfc rfcedstyle="yes" ?>
<?rfc toc="yes" ?>

<rfc number="4797" category="info"> 

<front>
	<title abbrev="L3VPN GRE"> 
	Use of Provider Edge to Provider Edge (PE-PE)
	Generic&nbsp;Routing&nbsp;Encapsulation&nbsp;(GRE)&nbsp;or&nbsp;IP in&nbsp;BGP/&wj;MPLS&nbsp;IP&nbsp;Virtual&nbsp;Private&nbsp;Networks
	</title>

	<author initials="Y" surname="Rekhter" fullname="Yakov Rekhter">
		<organization>Juniper Networks</organization>
		<address>
			<postal>
				<street>1194 N. Mathilda Ave.</street>
				<city>Sunnyvale</city> 
				<region>CA</region>
				<code>94089</code>
				<country>US</country>
			</postal>
			<email>yakov@juniper.net</email>
		</address>
	</author>
	<author initials="R" surname="Bonica" fullname="Ronald P. Bonica">
		<organization>Juniper Networks</organization>
		<address>
			<postal>
				<street>2251 Corporate Park Drive</street>
				<city>Herndon</city> 
				<region>VA</region>
				<code>20171</code>
				<country>US</country>
			</postal>
			<email>rbonica@juniper.net</email>
		</address>
	</author>
	<author initials="E" surname="Rosen" fullname="Eric C. Rosen">
		<organization>Cisco Systems, Inc.</organization>
		<address>
			<postal>
				<street>250 Apollo Drive</street>
				<city>Chelmsford</city> 
				<region>MA</region>
				<code>01824</code>
				<country>US</country>
			</postal>
			<email>erosen@cisco.com</email>
		</address>
	</author>
	<date month="January" year="2007" />
	<area>Internet</area>
	<workgroup>L3VPN Working Group</workgroup>
	<keyword>L3VPN GRE encapsulation</keyword>

<note title="IESG Note">
<t>
   This document proposes an automated mechanism for establishing
   tunnels between provider-edge routers in a VPN, but does not provide
   an automated mechanism for establishing security associations for
   these tunnels. Without such a mechanism, this document is not
   appropriate for publication on the Internet standards track.
</t>
</note>

	<abstract>
<t>
   This document describes an implementation strategy for 
   BGP/MPLS IP Virtual Private Networks (VPNs) 
   in which the outermost MPLS label (i.e., the tunnel label) 
   is replaced with either an IP header or an IP header with 
   Generic Routing Encapsulation (GRE).  
</t>
<t>
   The implementation strategy described herein enables the deployment of 
   BGP/MPLS IP VPN technology in networks whose edge devices
   are MPLS and VPN aware, but whose interior devices are not.
</t>
	</abstract>
</front>

<middle>

<section anchor="Introduction" title="Introduction"> 
<t>
  A "conventional" <xref target="RFC4364">BGP/MPLS IP VPN</xref>
  is characterized as follows:

<?rfc compact="no"?> 
<list style="hanging">
 <t>
      Each Provider Edge (PE) router maintains one or more Virtual
      Routing and Forwarding (VRF) instances. A VRF instances is a
      VPN-specific forwarding table.</t>
 <t>
      PE routers exchange reachability information with one another
      using <xref target="RFC4271">BGP</xref> with <xref
      target="RFC4760">multi-protocol extensions</xref>.</t>
 <t>
      <xref target="RFC3031">MPLS Label Switching Paths (LSPs)</xref>
      connect PE routers to one another.</t>
</list>
</t>

<?rfc compact="yes"?> 
<t>
   In simple configurations, the VPN service is offered by a single Autonomous System (AS). 
   All service provider routers 
   are contained by a single AS and all VPN sites attach to that AS. 
   When an ingress
   PE router receives a packet from a VPN site, 
   it looks up the
   packet's destination IP address in a VRF that is associated with the
   packet's ingress attachment circuit. As a result of
   this lookup, the ingress PE router determines an MPLS label stack,
   a data link header, and an output interface. The label stack is
   prepended to the packet, the data link header is prepended to that,
   and the resulting frame is queued for the output interface.
</t>
<t>
   The innermost label in the MPLS label stack is
   called the VPN route label. The VPN route label is significant and visible to 
   the egress PE router only.  It
   controls forwarding of the packet by the egress PE router.
</t>
<t>
   The outermost
   label in the MPLS label stack is called the tunnel label. 
   The tunnel label causes the packet to be
   delivered to the egress PE router that understands the VPN route
   label. Specifically, the tunnel label identifies an MPLS LSP that connects the ingress 
   PE router to the egress PE router. In the context of BGP/MPLS IP VPNs, this LSP is called a 
   tunnel LSP.
</t>
<t>
   The tunnel LSP provides a forwarding path between the ingress and
   egress PE routers. Quality of service (QoS) information
   can be mapped from the VPN packet to the tunnel LSP header so that required forwarding 
   behaviors can be maintained at each hop along the forwarding path. 
</t>
<t>
   <xref target="RFC4364">Sections 9 and 10 of reference </xref> define more complex
   configurations (i.e., carriers' carrier and multi-AS backbones) in which service providers offer L3VPN
   services across multiple autonomous systems. In these configurations, VPN route labels can be stitched
   together 
<?rfc needLines="2" ?>
across AS boundaries. Within each AS, tunnel LSPs carry VPN packets from network edge to network edge.
</t>

<t>
   In most configurations, tunnel LSPs never traverse AS boundaries. 
   The tunnel LSP is always contained within a single AS. In one 
   particular configuration (i.e., Inter-provider Option C), 
   tunnel LSPs may traverse AS boundaries.
</t>
<t>
   This memo describes procedures for creating an MPLS packet that
   carries the VPN route label, but does not carry the tunnel label.
   Then, using either GRE or IP encapsulation, the ingress PE router sends
   the MPLS packet across the network to the egress
   PE router. 
</t>
<t>
   That is, a GRE or IP tunnel replaces the tunnel LSP that was present
   in "conventional" BGP/MPLS IP VPNs. Like the tunnel LSP, the GRE/IP tunnel provides 
   a forwarding path 
   between the ingress and egress PE routers. 
   QoS information can be copied from the VPN packet to the GRE/IP tunnel header 
   so that required forwarding 
   behaviors can be maintained at each hop along the forwarding path. However, because the
   GRE/IP tunnel lacks traffic engineering capabilities, any traffic engineering features 
   provided by the tunnel LSP are lost. 
</t>
</section>

<section anchor="Conventions" title=" Conventions Used In This Document">
<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 <xref target="RFC2119">RFC 2119</xref>.</t>
</section>

<section anchor="Motivation" title="Motivation"> 
<t>
   "Conventional" BGP/MPLS IP VPNs require an MPLS Label
   Switched Path (LSP) between a packet's ingress PE router and its
   egress PE router.  This means that a BGP/MPLS IP VPN cannot be
   implemented if there is a part of the path between the ingress and
   egress PE routers that does not support MPLS.
</t>
<t>
   In order to enable BGP/MPLS IP VPNs to be deployed even when there
   are non-MPLS routers along the path between the ingress and egress PE
   routers, it is desirable to have an alternative, which allows the
   tunnel label to be replaced with either an IP or (IP + GRE) header.  The
   encapsulation header would have the address of the egress PE router
   in its destination IP address field, and this would cause the packet
   to be delivered to the egress PE router.
</t>
<t>
   In this procedure, the ingress and egress PE routers themselves must
   support MPLS, but that is not an issue, as those routers must
   necessarily have BGP/MPLS IP VPN support, whereas the transit routers
   need not support MPLS or BGP/MPLS VPNs.
</t>
</section>
<section anchor="Specification" title="Specification"> 
<t>
   In short, the technical approach specified here is:
</t>

<?rfc compact="no"?> 
<list style="numbers">
<t>
      Continue to use MPLS to identify a VPN route, by continuing to
      add an MPLS label stack to the VPN packets. Between the ingress
      and egress PE router, the outermost member of the label stack will
      represent the VPN route label.
</t>
<t>
      An <xref target="RFC4023">MPLS-in-GRE or MPLS-in-IP</xref> encapsulation will
      be used to turn the MPLS packet, described above, back into an IP packet. This,
      in effect, creates a GRE or an IP tunnel between the ingress PE
      router and the egress PE router. 
</t>
</list>
<?rfc compact="yes"?> 

<t>
   The net effect is that an MPLS packet gets sent through a GRE or an
   IP tunnel.
</t>
<t>
   Service providers must protect the above-mentioned IP or GRE tunnel as recommended in Section 8.2 of
   <xref target="RFC4023">reference</xref>. As stated in that document:
</t>

<?rfc compact="no"?> 
<list style="hanging">
<t>
   "If the tunnel lies entirely within a single
   administrative domain, address filtering at the boundaries can be
   used to ensure that no packet with the IP source address of a tunnel
   endpoint or with the IP destination address of a tunnel endpoint can
   enter the domain from outside.
</t>
<t>
   However, when the tunnel head and the tunnel tail are not in the same
   administrative domain, this may become difficult, and filtering based
   on the destination address can even become impossible if the packets
   must traverse the public Internet.
</t>
<t>
   Sometimes only source address filtering (but not destination address
   filtering) is done at the boundaries of an administrative domain.  If
   this is the case, the filtering does not provide effective protection
   at all unless the decapsulator of an MPLS-in-IP or MPLS-in-GRE
   validates the IP source address of the packet.  This document does
   not require that the decapsulator validate the IP source address of
   the tunneled packets, but it should be understood that failure to do
   so presupposes that there is effective destination-based (or a
   combination of source-based and destination-based) filtering at the
   boundaries."
</t>
</list>
<?rfc compact="yes"?> 

<section anchor="Encaps" title="MPLS-in-IP/MPLS-in-GRE Encapsulation by Ingress PE">
<t>
   The following description is not meant to specify an implementation
   strategy; any implementation procedure that produces the same result
   is acceptable.
</t>
<t>
   When an ingress
   PE router receives a packet from a Customer Edge (CE) router, 
   it looks up the
   packet's destination IP address in a VRF that is associated with the
   packet's ingress attachment circuit. 
   This enables the (ingress) PE router to find a VPN-IP route.
   The VPN-IP route will have an associated VPN route label and an
   associated BGP Next Hop.&nbsp; The label is pushed on the packet. Then an
   IP (or IP+GRE) encapsulation header is prepended to the packet,
   creating an MPLS-in-IP (or MPLS-in-GRE) encapsulated packet. The IP
   source address field of the encapsulation header will be an address
   of the ingress PE router itself. The IP destination address field of
   the encapsulation header will contain the value of the associated BGP
   Next Hop; this will be an IP address of the egress PE router.
   QoS information can be copied from the VPN packet to the GRE/IP tunnel header 
   so that required forwarding 
      behaviors can be maintained at each hop along the 
      forwarding path.
</t>
<t>
  The IP address of the remote tunnel endpoints MAY be inferred from the Network 
Address of the Next Hop field of the
<xref target="RFC4760">MP_REACH_NLRI BGP attribute</xref>.  Note that 
the set of Next Hop Network Addresses is not known in advance, but is learned 
dynamically via the BGP distribution of VPN-IP routes.  Assuming a consistent 
set of tunnel capabilities exist between all the PEs and Autonomous
System Border Routers (ASBRs), no a priori 
configuration of the remote tunnel endpoints is needed.  The entire set of PE 
and ASBRs MUST have the same tunnel capabilities if the dynamic creation 
of IP (or GRE) tunnels is desired.  The preference to use an IP (or GRE) tunnel 
MUST be configured.  A set of PEs using two or more tunnel mechanisms (i.e., LSP, 
GRE, IP, etc.) MUST determine the tunnel type on a per-peer basis.  The automatic 
association of tunnel capabilities on a per-peer basis is for future study.  Note 
that these tunnels SHOULD NOT be IGP-visible links, and routing adjacencies SHOULD 
NOT be supported across these tunnel. 
</t>
</section>
<section anchor="Decaps" title="MPLS-in-IP/MPLS-in-GRE Decapsulation by Egress PE">
<t>
   Every egress PE is also an ingress PE, and hence has 
   the ability to decapsulate MPLS-in-IP (or MPLS-in-GRE) packets.
   After decapsulation, the packets SHOULD be delivered to the routing
   function for ordinary MPLS switching.
</t>
<t>
   As stated above, if the service provider deploys source-based filtering
   at network edges to protect the IP/GRE tunnel (instead of destination-based
   filtering), the decapsulator must validate the IP source address of
   the tunneled packets.  
</t>
</section>
</section>
<section anchor="Spoof" title="Implications on Packet Spoofing">
<t>
   It should be noted that if the tunnel MPLS labels are replaced with
   an unsecured IP encapsulation, like GRE or IP, it becomes more
   difficult to protect the VPNs against spoofed packets. This is
   because a Service Provider (SP) can protect against spoofed MPLS
   packets by the simple expedient of not accepting MPLS packets from
   outside its own boundaries (or more generally, by keeping track of
   which labels are validly received over which interfaces, and
   discarding packets that arrive with labels that are not valid for
   their incoming interfaces).
</t>
<t>
   By contrast, protection
   against spoofed IP packets requires all SP boundary routers
   to perform filtering; either (a) filtering packets from
   "outside" the SP, which are addressed to PE routers, or (b)
   filtering packets from "outside" the SP, which have source
   addresses that belong "inside" and, in addition, filtering on each PE
   all packets that have source addresses that belong "outside" the
   SP.
</t>
<t>
   The maintenance of these filter lists can be management intensive. 
   Furthermore, depending upon implementation, these filter lists can 
   be performance affecting. However, such filters may be required for
   reasons other than protection against spoofed VPN packets, in
   which case the additional maintenance overhead of these filters to
   protect (among other things) against spoofing of VPN packets may be
   of no practical significance. Note that allocating IP addresses used
   for GRE or IP tunnels out of a single (or a small number of) IP block
   could simplify maintenance of the filters.
</t>
</section>
<section anchor="Security" title="Security Considerations">
<t>
   Security considerations in 
   <xref target="RFC4023">reference</xref>  apply here as well.
   Additional security issues are discussed in the previous section "Implications
   on Packet Spoofing".
</t>
</section>

<section anchor="Acknowledgments" title="Acknowledgments">
<t>
Thanks to Robert Raszuk and Scott Wainner for their contributions to this document.
</t>
</section>
</middle>
<?rfc needLines="10" ?>
<back>
	<references title="Normative References">
		&rfc2119;
		&rfc4364;
                &rfc4271;

<!-- 4760 (draft-ietf-idr-rfc2858bis-10) in AUTH48 1/15/07 -->
<reference anchor='RFC4760'>
<front>
<title>Multiprotocol Extensions for BGP-4</title>
	<author initials="T" surname="Bates" fullname="Tony Bates"/>
	<author initials="R" surname="Chandra" fullname="Ravi Chandra"/>
	<author initials="D" surname="Katz" fullname="Dave Katz"/>
	<author initials="Y" surname="Rekhter" fullname="Yakov Rekhter"/>
<date month="January" year="2007"/>
	<abstract>
	<t>
   This document defines extensions to BGP-4 to enable it to carry
   routing information for multiple Network Layer protocols (e.g., IPv6,
   IPX, L3VPN, etc.).  The extensions are backward compatible - a router
   that supports the extensions can interoperate with a router that
   doesn't support the extensions.
</t>
</abstract>
</front>
<seriesInfo name="RFC" value="4760"/>
</reference>


                &rfc3031;
		&rfc4023;

	</references>


</back>
</rfc>
