go-bgp

a collection of golang BGP tools to monitor, archive and serve
git clone git://git.2f30.org/go-bgp
Log | Files | Refs | README

rfc4364.txt (116446B)


      1 
      2 
      3 
      4 
      5 
      6 
      7 Network Working Group                                           E. Rosen
      8 Request for Comments: 4364                           Cisco Systems, Inc.
      9 Obsoletes: 2547                                               Y. Rekhter
     10 Category: Standards Track                         Juniper Networks, Inc.
     11                                                            February 2006
     12 
     13 
     14               BGP/MPLS IP Virtual Private Networks (VPNs)
     15 
     16 Status of This Memo
     17 
     18    This document specifies an Internet standards track protocol for the
     19    Internet community, and requests discussion and suggestions for
     20    improvements.  Please refer to the current edition of the "Internet
     21    Official Protocol Standards" (STD 1) for the standardization state
     22    and status of this protocol.  Distribution of this memo is unlimited.
     23 
     24 Copyright Notice
     25 
     26    Copyright (C) The Internet Society (2006).
     27 
     28 Abstract
     29 
     30    This document describes a method by which a Service Provider may use
     31    an IP backbone to provide IP Virtual Private Networks (VPNs) for its
     32    customers.  This method uses a "peer model", in which the customers'
     33    edge routers (CE routers) send their routes to the Service Provider's
     34    edge routers (PE routers); there is no "overlay" visible to the
     35    customer's routing algorithm, and CE routers at different sites do
     36    not peer with each other.  Data packets are tunneled through the
     37    backbone, so that the core routers do not need to know the VPN
     38    routes.
     39 
     40    This document obsoletes RFC 2547.
     41 
     42 
     43 
     44 
     45 
     46 
     47 
     48 
     49 
     50 
     51 
     52 
     53 
     54 
     55 
     56 
     57 
     58 Rosen & Rekhter             Standards Track                     [Page 1]
     59 
     60 RFC 4364                    BGP/MPLS IP VPNs               February 2006
     61 
     62 
     63 Table of Contents
     64 
     65    1. Introduction ....................................................3
     66       1.1. Virtual Private Networks ...................................4
     67       1.2. Customer Edge and Provider Edge ............................5
     68       1.3. VPNs with Overlapping Address Spaces .......................6
     69       1.4. VPNs with Different Routes to the Same System ..............7
     70       1.5. SP Backbone Routers ........................................7
     71       1.6. Security ...................................................8
     72    2. Sites and CEs ...................................................8
     73    3. VRFs: Multiple Forwarding Tables in PEs .........................9
     74       3.1. VRFs and Attachment Circuits ...............................9
     75       3.2. Associating IP Packets with VRFs ..........................10
     76       3.3. Populating the VRFs .......................................11
     77    4. VPN Route Distribution via BGP .................................12
     78       4.1. The VPN-IPv4 Address Family ...............................13
     79       4.2. Encoding of Route Distinguishers ..........................14
     80       4.3. Controlling Route Distribution ............................15
     81            4.3.1. The Route Target Attribute .........................15
     82            4.3.2. Route Distribution Among PEs by BGP ................17
     83            4.3.3. Use of Route Reflectors ............................20
     84            4.3.4. How VPN-IPv4 NLRI Is Carried in BGP ................22
     85            4.3.5. Building VPNs Using Route Targets ..................23
     86            4.3.6. Route Distribution Among VRFs in a Single PE .......23
     87    5. Forwarding .....................................................23
     88    6. Maintaining Proper Isolation of VPNs ...........................26
     89    7. How PEs Learn Routes from CEs ..................................27
     90    8. How CEs Learn Routes from PEs ..................................30
     91    9. Carriers' Carriers .............................................30
     92    10. Multi-AS Backbones ............................................32
     93    11. Accessing the Internet from a VPN .............................34
     94    12. Management VPNs ...............................................36
     95    13. Security Considerations .......................................37
     96       13.1. Data Plane ...............................................37
     97       13.2. Control Plane ............................................39
     98       13.3. Security of P and PE Devices .............................39
     99    14. Quality of Service ............................................39
    100    15. Scalability ...................................................40
    101    16. IANA Considerations ...........................................40
    102    17. Acknowledgements ..............................................41
    103    18. Contributors ..................................................41
    104    19. Normative References ..........................................44
    105    20. Informative References ........................................45
    106 
    107 
    108 
    109 
    110 
    111 
    112 
    113 
    114 Rosen & Rekhter             Standards Track                     [Page 2]
    115 
    116 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    117 
    118 
    119 1.  Introduction
    120 
    121    This document describes a method by which a Service Provider may use
    122    an IP backbone to provide IP Virtual Private Networks (VPNs) for its
    123    customers.  This method uses a "peer model", in which the customers'
    124    edge routers (CE routers) send their routes to the Service Provider's
    125    edge routers (PE routers).  Border Gateway Protocol (BGP)
    126    [BGP, BGP-MP] is then used by the Service Provider to exchange the
    127    routes of a particular VPN among the PE routers that are attached to
    128    that VPN.  This is done in a way that ensures that routes from
    129    different VPNs remain distinct and separate, even if two VPNs have an
    130    overlapping address space.  The PE routers distribute, to the CE
    131    routers in a particular VPN, the routes from other the CE routers in
    132    that VPN.  The CE routers do not peer with each other, hence there is
    133    no "overlay" visible to the VPN's routing algorithm.  The term "IP"
    134    in "IP VPN" is used to indicate that the PE receives IP datagrams
    135    from the CE, examines their IP headers, and routes them accordingly.
    136 
    137    Each route within a VPN is assigned a Multiprotocol Label Switching
    138    (MPLS) [MPLS-ARCH, MPLS-BGP, MPLS-ENCAPS] label; when BGP distributes
    139    a VPN route, it also distributes an MPLS label for that route.
    140    Before a customer data packet travels across the Service Provider's
    141    backbone, it is encapsulated with the MPLS label that corresponds, in
    142    the customer's VPN, to the route that is the best match to the
    143    packet's destination address.  This MPLS packet is further
    144    encapsulated (e.g., with another MPLS label or with an IP or Generic
    145    Routing Encapsulation (GRE) tunnel header [MPLS-in-IP-GRE]) so that
    146    it gets tunneled across the backbone to the proper PE router.  Thus,
    147    the backbone core routers do not need to know the VPN routes.
    148 
    149    The primary goal of this method is to support the case in which a
    150    client obtains IP backbone services from a Service Provider or
    151    Service Providers with which it maintains contractual relationships.
    152    The client may be an enterprise, a group of enterprises that need an
    153    extranet, an Internet Service Provider, an application service
    154    provider, another VPN Service Provider that uses this same method to
    155    offer VPNs to clients of its own, etc.  The method makes it very
    156    simple for the client to use the backbone services.  It is also very
    157    scalable and flexible for the Service Provider, and allows the
    158    Service Provider to add value.
    159 
    160 
    161 
    162 
    163 
    164 
    165 
    166 
    167 
    168 
    169 
    170 Rosen & Rekhter             Standards Track                     [Page 3]
    171 
    172 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    173 
    174 
    175 1.1.  Virtual Private Networks
    176 
    177    Consider a set of "sites" that are attached to a common network that
    178    we call "the backbone".  Now apply some policy to create a number of
    179    subsets of that set, and impose the following rule: two sites may
    180    have IP interconnectivity over that backbone only if at least one of
    181    these subsets contains them both.
    182 
    183    These subsets are Virtual Private Networks (VPNs).  Two sites have IP
    184    connectivity over the common backbone only if there is some VPN that
    185    contains them both.  Two sites that have no VPN in common have no
    186    connectivity over that backbone.
    187 
    188    If all the sites in a VPN are owned by the same enterprise, the VPN
    189    may be thought of as a corporate "intranet".  If the various sites in
    190    a VPN are owned by different enterprises, the VPN may be thought of
    191    as an "extranet".  A site can be in more than one VPN; e.g., in an
    192    intranet and in several extranets.  In general, when we use the term
    193    "VPN" we will not be distinguishing between intranets and extranets.
    194 
    195    We refer to the owners of the sites as the "customers".  We refer to
    196    the owners/operators of the backbone as the "Service Providers"
    197    (SPs).  The customers obtain "VPN service" from the SPs.
    198 
    199    A customer may be a single enterprise, a set of enterprises, an
    200    Internet Service Provider, an Application Service Provider, another
    201    SP that offers the same kind of VPN service to its own customers,
    202    etc.
    203 
    204    The policies that determine whether a particular collection of sites
    205    is a VPN are the policies of the customers.  Some customers will want
    206    the implementation of these policies to be entirely the
    207    responsibility of the SP.  Other customers may want to share with the
    208    SP the responsibility for implementing these policies.  This document
    209    specifies mechanisms that can be used to implement these policies.
    210    The mechanisms we describe are general enough to allow these policies
    211    to be implemented either by the SP alone or by a VPN customer
    212    together with the SP.  Most of the discussion is focused on the
    213    former case, however.
    214 
    215    The mechanisms discussed in this document allow the implementation of
    216    a wide range of policies.  For example, within a given VPN, one can
    217    allow every site to have a direct route to every other site ("full
    218    mesh").  Alternatively, one can force traffic between certain pairs
    219    of sites to be routed via a third site.  This can be useful, e.g., if
    220    it is desired that traffic between a pair of sites be passed through
    221    a firewall, and the firewall is located at the third site.
    222 
    223 
    224 
    225 
    226 Rosen & Rekhter             Standards Track                     [Page 4]
    227 
    228 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    229 
    230 
    231    In this document, we restrict our discussion to the case in which the
    232    customer is explicitly purchasing VPN service from an SP, or from a
    233    set of SPs that have agreed to cooperate to provide the VPN service.
    234    That is, the customer is not merely purchasing internet access from
    235    an SP, and the VPN traffic does not pass through a random collection
    236    of interconnected SP networks.
    237 
    238    We also restrict our discussion to the case in which the backbone
    239    provides an IP service to the customer, rather than, e.g., a layer 2
    240    service such as Frame Relay, Asynchronous Transfer Mode (ATM),
    241    ethernet, High Level Data Link Control (HDLC), or Point-to-Point
    242    Protocol (PPP).  The customer may attach to the backbone via one of
    243    these (or other) layer 2 services, but the layer 2 service is
    244    terminated at the "edge" of the backbone, where the customer's IP
    245    datagrams are removed from any layer 2 encapsulation.
    246 
    247    In the rest of this introduction, we specify some properties that
    248    VPNs should have.  The remainder of this document specifies a set of
    249    mechanisms that can be deployed to provide a VPN model that has all
    250    these properties.  This section also introduces some of the technical
    251    terminology used in the remainder of the document.
    252 
    253 1.2.  Customer Edge and Provider Edge
    254 
    255    Routers can be attached to each other, or to end systems, in a
    256    variety of different ways: PPP connections, ATM Virtual Circuits
    257    (VCs), Frame Relay VCs, ethernet interfaces, Virtual Local Area
    258    Networks (VLANs) on ethernet interfaces, GRE tunnels, Layer 2
    259    Tunneling Protocol (L2TP) tunnels, IPsec tunnels, etc.  We will use
    260    the term "attachment circuit" to refer generally to some such means
    261    of attaching to a router.  An attachment circuit may be the sort of
    262    connection that is usually thought of as a "data link", or it may be
    263    a tunnel of some sort; what matters is that it be possible for two
    264    devices to be network layer peers over the attachment circuit.
    265 
    266    Each VPN site must contain one or more Customer Edge (CE) devices.
    267    Each CE device is attached, via some sort of attachment circuit, to
    268    one or more Provider Edge (PE) routers.
    269 
    270    Routers in the SP's network that do not attach to CE devices are
    271    known as "P routers".
    272 
    273    CE devices can be hosts or routers.  In a typical case, a site
    274    contains one or more routers, some of which are attached to PE
    275    routers.  The site routers that attach to the PE routers would then
    276    be the CE devices, or "CE routers".  However, there is nothing to
    277    prevent a non-routing host from attaching directly to a PE router, in
    278    which case the host would be a CE device.
    279 
    280 
    281 
    282 Rosen & Rekhter             Standards Track                     [Page 5]
    283 
    284 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    285 
    286 
    287    Sometimes, what is physically attached to a PE router is a layer 2
    288    switch.  In this case, we do NOT say that the layer 2 switch is a CE
    289    device.  Rather, the CE devices are the hosts and routers that
    290    communicate with the PE router through the layer 2 switch; the layer
    291    2 infrastructure is transparent.  If the layer 2 infrastructure
    292    provides a multipoint service, then multiple CE devices can be
    293    attached to the PE router over the same attachment circuit.
    294 
    295    CE devices are logically part of a customer's VPN.  PE and P routers
    296    are logically part of the SP's network.
    297 
    298    The attachment circuit over which a packet travels when going from CE
    299    to PE is known as that packet's "ingress attachment circuit", and the
    300    PE as the packet's "ingress PE".  The attachment circuit over which a
    301    packet travels when going from PE to CE is known as that packet's
    302    "egress attachment circuit", and the PE as the packet's "egress PE".
    303 
    304    We will say that a PE router is attached to a particular VPN if it is
    305    attached to a CE device that is in a site of that VPN.  Similarly, we
    306    will say that a PE router is attached to a particular site if it is
    307    attached to a CE device that is in that site.
    308 
    309    When the CE device is a router, it is a routing peer of the PE(s) to
    310    which it is attached, but it is NOT a routing peer of CE routers at
    311    other sites.  Routers at different sites do not directly exchange
    312    routing information with each other; in fact, they do not even need
    313    to know of each other at all.  As a consequence, the customer has no
    314    backbone or "virtual backbone" to manage, and does not have to deal
    315    with any inter-site routing issues.  In other words, in the scheme
    316    described in this document, a VPN is NOT an "overlay" on top of the
    317    SP's network.
    318 
    319    With respect to the management of the edge devices, clear
    320    administrative boundaries are maintained between the SP and its
    321    customers.  Customers are not required to access the PE or P routers
    322    for management purposes, nor is the SP required to access the CE
    323    devices for management purposes.
    324 
    325 1.3.  VPNs with Overlapping Address Spaces
    326 
    327    If two VPNs have no sites in common, then they may have overlapping
    328    address spaces.  That is, a given address might be used in VPN V1 as
    329    the address of system S1, but in VPN V2 as the address of a
    330    completely different system S2.  This is a common situation when the
    331    VPNs each use an RFC 1918 private address space.  Of course, within
    332    each VPN, each address must be unambiguous.
    333 
    334 
    335 
    336 
    337 
    338 Rosen & Rekhter             Standards Track                     [Page 6]
    339 
    340 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    341 
    342 
    343    Even two VPNs that do have sites in common may have overlapping
    344    address spaces, as long as there is no need for any communication
    345    between systems with such addresses and systems in the common sites.
    346 
    347 1.4.  VPNs with Different Routes to the Same System
    348 
    349    Although a site may be in multiple VPNs, it is not necessarily the
    350    case that the route to a given system at that site should be the same
    351    in all the VPNs.  Suppose, for example, we have an intranet
    352    consisting of sites A, B, and C, and an extranet consisting of A, B,
    353    C, and the "foreign" site D.  Suppose that at site A there is a
    354    server, and we want clients from B, C, or D to be able to use that
    355    server.  Suppose also that at site B there is a firewall.  We want
    356    all the traffic from site D to the server to pass through the
    357    firewall, so that traffic from the extranet can be access controlled.
    358    However, we don't want traffic from C to pass through the firewall on
    359    the way to the server, since this is intranet traffic.
    360 
    361    It is possible to set up two routes to the server.  One route, used
    362    by sites B and C, takes the traffic directly to site A.  The second
    363    route, used by site D, takes the traffic instead to the firewall at
    364    site B.  If the firewall allows the traffic to pass, it then appears
    365    to be traffic coming from site B, and follows the route to site A.
    366 
    367 1.5.  SP Backbone Routers
    368 
    369    The SP's backbone consists of the PE routers, as well as other
    370    routers ("P routers") that do not attach to CE devices.
    371 
    372    If every router in an SP's backbone had to maintain routing
    373    information for all the VPNs supported by the SP, there would be
    374    severe scalability problems; the number of sites that could be
    375    supported would be limited by the amount of routing information that
    376    could be held in a single router.  It is important therefore that the
    377    routing information about a particular VPN only needs to be present
    378    in the PE routers that attach to that VPN.  In particular, the P
    379    routers do not need to have ANY per-VPN routing information
    380    whatsoever.  (This condition may need to be relaxed somewhat when
    381    multicast routing is considered.  This is not considered further in
    382    this paper, but is examined in [VPN-MCAST].)
    383 
    384    So just as the VPN owners do not have a backbone or "virtual
    385    backbone" to administer, the SPs themselves do not have a separate
    386    backbone or "virtual backbone" to administer for each VPN.  Site-to-
    387    site routing in the backbone is optimal (within the constraints of
    388    the policies used to form the VPNs) and is not constrained in any way
    389    by an artificial "virtual topology" of tunnels.
    390 
    391 
    392 
    393 
    394 Rosen & Rekhter             Standards Track                     [Page 7]
    395 
    396 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    397 
    398 
    399    Section 10 discusses some of the special issues that arise when the
    400    backbone spans several Service Providers.
    401 
    402 1.6.  Security
    403 
    404    VPNs of the sort being discussed here, even without making use of
    405    cryptographic security measures, are intended to provide a level of
    406    security equivalent to that obtainable when a layer 2 backbone (e.g.,
    407    Frame Relay) is used.  That is, in the absence of misconfiguration or
    408    deliberate interconnection of different VPNs, it is not possible for
    409    systems in one VPN to gain access to systems in another VPN.  Of
    410    course, the methods described herein do not by themselves encrypt the
    411    data for privacy, nor do they provide a way to determine whether data
    412    has been tampered with en route.  If this is desired, cryptographic
    413    measures must be applied in addition. (See, e.g., [MPLS/BGP-IPsec].)
    414    Security is discussed in more detail in Section 13.
    415 
    416 2.  Sites and CEs
    417 
    418    From the perspective of a particular backbone network, a set of IP
    419    systems may be regarded as a "site" if those systems have mutual IP
    420    interconnectivity that doesn't require use of the backbone.  In
    421    general, a site will consist of a set of systems that are in
    422    geographic proximity.  However, this is not universally true.  If two
    423    geographic locations are connected via a leased line, over which Open
    424    Shortest Path First (OSPF) protocol [OSPFv2] is running, and if that
    425    line is the preferred way of communicating between the two locations,
    426    then the two locations can be regarded as a single site, even if each
    427    location has its own CE router.  (This notion of "site" is
    428    topological, rather than geographical.  If the leased line goes down,
    429    or otherwise ceases to be the preferred route, but the two geographic
    430    locations can continue to communicate by using the VPN backbone, then
    431    one site has become two.)
    432 
    433    A CE device is always regarded as being in a single site (though as
    434    we shall see in Section 3.2, a site may consist of multiple "virtual
    435    sites").  A site, however, may belong to multiple VPNs.
    436 
    437    A PE router may attach to CE devices from any number of different
    438    sites, whether those CE devices are in the same or in different VPNs.
    439    A CE device may, for robustness, attach to multiple PE routers, of
    440    the same or of different service providers.  If the CE device is a
    441    router, the PE router and the CE router will appear as router
    442    adjacencies to each other.
    443 
    444    While we speak mostly of "sites" as being the basic unit of
    445    interconnection, nothing here prevents a finer degree of granularity
    446    in the control of interconnectivity.  For example, certain systems at
    447 
    448 
    449 
    450 Rosen & Rekhter             Standards Track                     [Page 8]
    451 
    452 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    453 
    454 
    455    a site may be members of an intranet as well as members of one or
    456    more extranets, while other systems at the same site may be
    457    restricted to being members of the intranet only.  However, this
    458    might require that the site have two attachment circuits to the
    459    backbone, one for the intranet and one for the extranet; it might
    460    further require that firewall functionality be applied on the
    461    extranet attachment circuit.
    462 
    463 3.  VRFs: Multiple Forwarding Tables in PEs
    464 
    465    Each PE router maintains a number of separate forwarding tables.  One
    466    of the forwarding tables is the "default forwarding table".  The
    467    others are "VPN Routing and Forwarding tables", or "VRFs".
    468 
    469 3.1.  VRFs and Attachment Circuits
    470 
    471    Every PE/CE attachment circuit is associated, by configuration, with
    472    one or more VRFs.  An attachment circuit that is associated with a
    473    VRF is known as a "VRF attachment circuit".
    474 
    475    In the simplest case and most typical case, a PE/CE attachment
    476    circuit is associated with exactly one VRF.  When an IP packet is
    477    received over a particular attachment circuit, its destination IP
    478    address is looked up in the associated VRF.  The result of that
    479    lookup determines how to route the packet.  The VRF used by a
    480    packet's ingress PE for routing a particular packet is known as the
    481    packet's "ingress VRF".  (There is also the notion of a packet's
    482    "egress VRF", located at the packet's egress PE; this is discussed in
    483    Section 5.)
    484 
    485    If an IP packet arrives over an attachment circuit that is not
    486    associated with any VRF, the packet's destination address is looked
    487    up in the default forwarding table, and the packet is routed
    488    accordingly.  Packets forwarded according to the default forwarding
    489    table include packets from neighboring P or PE routers, as well as
    490    packets from customer-facing attachment circuits that have not been
    491    associated with VRFs.
    492 
    493    Intuitively, one can think of the default forwarding table as
    494    containing "public routes", and of the VRFs as containing "private
    495    routes".  One can similarly think of VRF attachment circuits as being
    496    "private", and of non-VRF attachment circuits as being "public".
    497 
    498    If a particular VRF attachment circuit connects site S to a PE
    499    router, then connectivity from S (via that attachment circuit) can be
    500    restricted by controlling the set of routes that gets entered in the
    501    corresponding VRF.  The set of routes in that VRF should be limited
    502    to the set of routes leading to sites that have at least one VPN in
    503 
    504 
    505 
    506 Rosen & Rekhter             Standards Track                     [Page 9]
    507 
    508 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    509 
    510 
    511    common with S.  Then a packet sent from S over a VRF attachment
    512    circuit can only be routed by the PE to another site S' if S' is in
    513    one of the same VPNs as S.  That is, communication (via PE routers)
    514    is prevented between any pair of VPN sites that have no VPN in
    515    common.  Communication between VPN sites and non-VPN sites is
    516    prevented by keeping the routes to the VPN sites out of the default
    517    forwarding table.
    518 
    519    If there are multiple attachment circuits leading from S to one or
    520    more PE routers, then there might be multiple VRFs that could be used
    521    to route traffic from S.  To properly restrict S's connectivity, the
    522    same set of routes would have to exist in all the VRFs.
    523    Alternatively, one could impose different connectivity restrictions
    524    over different attachment circuit from S.  In that case, some of the
    525    VRFs associated with attachment circuits from S would contain
    526    different sets of routes than some of the others.
    527 
    528    We allow the case in which a single attachment circuit is associated
    529    with a set of VRFs, rather than with a single VRF.  This can be
    530    useful if it is desired to divide a single VPN into several
    531    "sub-VPNs", each with different connectivity restrictions, where some
    532    characteristic of the customer packets is used to select from among
    533    the sub-VPNs.  For simplicity though, we will usually speak of an
    534    attachment circuit as being associated with a single VRF.
    535 
    536 3.2.  Associating IP Packets with VRFs
    537 
    538    When a PE router receives a packet from a CE device, it must
    539    determine the attachment circuit over which the packet arrived, as
    540    this determines in turn the VRF (or set of VRFs) that can be used for
    541    forwarding that packet.  In general, to determine the attachment
    542    circuit over which a packet arrived, a PE router takes note of the
    543    physical interface over which the packet arrived, and possibly also
    544    takes note of some aspect of the packet's layer 2 header.  For
    545    example, if a packet's ingress attachment circuit is a Frame Relay
    546    VC, the identity of the attachment circuit can be determined from the
    547    physical Frame Relay interface over which the packet arrived,
    548    together with the Data Link Connection Identifier (DLCI) field in the
    549    packet's Frame Relay header.
    550 
    551    Although the PE's conclusion that a particular packet arrived on a
    552    particular attachment circuit may be partially determined by the
    553    packet's layer 2 header, it must be impossible for a customer, by
    554    writing the header fields, to fool the SP into thinking that a packet
    555    that was received over one attachment circuit really arrived over a
    556    different one.  In the example above, although the attachment circuit
    557    is determined partially by inspection of the DLCI field in the Frame
    558    Relay header, this field cannot be set freely by the customer.
    559 
    560 
    561 
    562 Rosen & Rekhter             Standards Track                    [Page 10]
    563 
    564 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    565 
    566 
    567    Rather, it must be set to a value specified by the SP, or else the
    568    packet cannot arrive at the PE router.
    569 
    570    In some cases, a particular site may be divided by the customer into
    571    several "virtual sites".  The SP may designate a particular set of
    572    VRFs to be used for routing packets from that site and may allow the
    573    customer to set some characteristic of the packet, which is then used
    574    for choosing a particular VRF from the set.
    575 
    576    For example, each virtual site might be realized as a VLAN.  The SP
    577    and the customer could agree that on packets arriving from a
    578    particular CE, certain VLAN values would be used to identify certain
    579    VRFs.  Of course, packets from that CE would be discarded by the PE
    580    if they carry VLAN tag values that are not in the agreed-upon set.
    581    Another way to accomplish this is to use IP source addresses.  In
    582    this case, the PE uses the IP source address in a packet received
    583    from the CE, along with the interface over which the packet is
    584    received, to assign the packet to a particular VRF.  Again, the
    585    customer would only be able to select from among the particular set
    586    of VRFs that that customer is allowed to use.
    587 
    588    If it is desired to have a particular host be in multiple virtual
    589    sites, then that host must determine, for each packet, which virtual
    590    site the packet is associated with.  It can do this, e.g., by sending
    591    packets from different virtual sites on different VLANs, or out
    592    different network interfaces.
    593 
    594 3.3. Populating the VRFs
    595 
    596    With what set of routes are the VRFs populated?
    597 
    598    As an example, let PE1, PE2, and PE3 be three PE routers, and let
    599    CE1, CE2, and CE3 be three CE routers.  Suppose that PE1 learns, from
    600    CE1, the routes that are reachable at CE1's site.  If PE2 and PE3 are
    601    attached, respectively, to CE2 and CE3, and there is some VPN V
    602    containing CE1, CE2, and CE3, then PE1 uses BGP to distribute to PE2
    603    and PE3 the routes that it has learned from CE1.  PE2 and PE3 use
    604    these routes to populate the VRFs that they associate, respectively,
    605    with the sites of CE2 and CE3.  Routes from sites that are not in VPN
    606    V do not appear in these VRFs, which means that packets from CE2 or
    607    CE3 cannot be sent to sites that are not in VPN V.
    608 
    609    When we speak of a PE "learning" routes from a CE, we are not
    610    presupposing any particular learning technique.  The PE may learn
    611    routes by means of a dynamic routing algorithm, but it may also
    612    "learn" routes by having those routes configured (i.e., static
    613    routing).  (In this case, to say that the PE "learned" the routes
    614    from the CE is perhaps to exercise a bit of poetic license.)
    615 
    616 
    617 
    618 Rosen & Rekhter             Standards Track                    [Page 11]
    619 
    620 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    621 
    622 
    623    PEs also need to learn, from other PEs, the routes that belong to a
    624    given VPN.  The procedures to be used for populating the VRFs with
    625    the proper sets of routes are specified in Section 4.
    626 
    627    If there are multiple attachment circuits leading from a particular
    628    PE router to a particular site, they might all be mapped to the same
    629    forwarding table.  But if policy dictates, they could be mapped to
    630    different forwarding tables.  For instance, the policy might be that
    631    a particular attachment circuit from a site is used only for intranet
    632    traffic, while another attachment circuit from that site is used only
    633    for extranet traffic.  (Perhaps, e.g., the CE attached to the
    634    extranet attachment circuit is a firewall, while the CE attached to
    635    the intranet attachment circuit is not.)  In this case, the two
    636    attachment circuits would be associated with different VRFs.
    637 
    638    Note that if two attachment circuits are associated with the same
    639    VRF, then packets that the PE receives over one of them will be able
    640    to reach exactly the same set of destinations as packets that the PE
    641    receives over the other.  So two attachment circuits cannot be
    642    associated with the same VRF unless each CE is in the exact same set
    643    of VPNs as is the other.
    644 
    645    If an attachment circuit leads to a site which is in multiple VPNs,
    646    the attachment circuit may still associated with a single VRF, in
    647    which case the VRF will contain routes from the full set of VPNs of
    648    which the site is a member.
    649 
    650 4.  VPN Route Distribution via BGP
    651 
    652    PE routers use BGP to distribute VPN routes to each other (more
    653    accurately, to cause VPN routes to be distributed to each other).
    654 
    655    We allow each VPN to have its own address space, which means that a
    656    given address may denote different systems in different VPNs.  If two
    657    routes to the same IP address prefix are actually routes to different
    658    systems, it is important to ensure that BGP not treat them as
    659    comparable.  Otherwise, BGP might choose to install only one of them,
    660    making the other system unreachable.  Further, we must ensure that
    661    POLICY is used to determine which packets get sent on which routes;
    662    given that several such routes are installed by BGP, only one such
    663    must appear in any particular VRF.
    664 
    665    We meet these goals by the use of a new address family, as specified
    666    below.
    667 
    668 
    669 
    670 
    671 
    672 
    673 
    674 Rosen & Rekhter             Standards Track                    [Page 12]
    675 
    676 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    677 
    678 
    679 4.1.  The VPN-IPv4 Address Family
    680 
    681    The BGP Multiprotocol Extensions [BGP-MP] allow BGP to carry routes
    682    from multiple "address families".  We introduce the notion of the
    683    "VPN-IPv4 address family".  A VPN-IPv4 address is a 12-byte quantity,
    684    beginning with an 8-byte Route Distinguisher (RD) and ending with a
    685    4-byte IPv4 address.  If several VPNs use the same IPv4 address
    686    prefix, the PEs translate these into unique VPN-IPv4 address
    687    prefixes.  This ensures that if the same address is used in several
    688    different VPNs, it is possible for BGP to carry several completely
    689    different routes to that address, one for each VPN.
    690 
    691    Since VPN-IPv4 addresses and IPv4 addresses are different address
    692    families, BGP never treats them as comparable addresses.
    693 
    694    An RD is simply a number, and it does not contain any inherent
    695    information; it does not identify the origin of the route or the set
    696    of VPNs to which the route is to be distributed.  The purpose of the
    697    RD is solely to allow one to create distinct routes to a common IPv4
    698    address prefix.  Other means are used to determine where to
    699    redistribute the route (see Section 4.3).
    700 
    701    The RD can also be used to create multiple different routes to the
    702    very same system.  We have already discussed a situation in which the
    703    route to a particular server should be different for intranet traffic
    704    than for extranet traffic.  This can be achieved by creating two
    705    different VPN-IPv4 routes that have the same IPv4 part, but different
    706    RDs.  This allows BGP to install multiple different routes to the
    707    same system, and allows policy to be used (see Section 4.3.5) to
    708    decide which packets use which route.
    709 
    710    The RDs are structured so that every Service Provider can administer
    711    its own "numbering space" (i.e., can make its own assignments of
    712    RDs), without conflicting with the RD assignments made by any other
    713    Service Provider.  An RD consists of three fields: a 2-byte type
    714    field, an administrator field, and an assigned number field.  The
    715    value of the type field determines the lengths of the other two
    716    fields, as well as the semantics of the administrator field.  The
    717    administrator field identifies an assigned number authority, and the
    718    assigned number field contains a number that has been assigned, by
    719    the identified authority, for a particular purpose.  For example, one
    720    could have an RD whose administrator field contains an Autonomous
    721    System number (ASN), and whose (4-byte) number field contains a
    722    number assigned by the SP to whom that ASN belongs (having been
    723    assigned to that SP by the appropriate authority).
    724 
    725    RDs are given this structure in order to ensure that an SP that
    726    provides VPN backbone service can always create a unique RD when it
    727 
    728 
    729 
    730 Rosen & Rekhter             Standards Track                    [Page 13]
    731 
    732 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    733 
    734 
    735    needs to do so.  However, the structure is not meaningful to BGP;
    736    when BGP compares two such address prefixes, it ignores the structure
    737    entirely.
    738 
    739    A PE needs to be configured such that routes that lead to a
    740    particular CE become associated with a particular RD.  The
    741    configuration may cause all routes leading to the same CE to be
    742    associated with the same RD, or it may cause different routes to be
    743    associated with different RDs, even if they lead to the same CE.
    744 
    745 4.2.  Encoding of Route Distinguishers
    746 
    747    As stated, a VPN-IPv4 address consists of an 8-byte Route
    748    Distinguisher followed by a 4-byte IPv4 address.  The RDs are encoded
    749    as follows:
    750 
    751      - Type Field: 2 bytes
    752      - Value Field: 6 bytes
    753 
    754    The interpretation of the Value field depends on the value of the
    755    type field.  At the present time, three values of the type field are
    756    defined: 0, 1, and 2.
    757 
    758      - Type 0: The Value field consists of two subfields:
    759 
    760          * Administrator subfield: 2 bytes
    761          * Assigned Number subfield: 4 bytes
    762 
    763        The Administrator subfield must contain an Autonomous System
    764        number.  If this ASN is from the public ASN space, it must have
    765        been assigned by the appropriate authority (use of ASN values
    766        from the private ASN space is strongly discouraged).  The
    767        Assigned Number subfield contains a number from a numbering space
    768        that is administered by the enterprise to which the ASN has been
    769        assigned by an appropriate authority.
    770 
    771      - Type 1: The Value field consists of two subfields:
    772 
    773          * Administrator subfield: 4 bytes
    774          * Assigned Number subfield: 2 bytes
    775 
    776        The Administrator subfield must contain an IP address.  If this
    777        IP address is from the public IP address space, it must have been
    778        assigned by an appropriate authority (use of addresses from the
    779        private IP address space is strongly discouraged).  The Assigned
    780        Number subfield contains a number from a numbering space which is
    781        administered by the enterprise to which the IP address has been
    782        assigned.
    783 
    784 
    785 
    786 Rosen & Rekhter             Standards Track                    [Page 14]
    787 
    788 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    789 
    790 
    791      - Type 2: The Value field consists of two subfields:
    792 
    793          * Administrator subfield: 4 bytes
    794          * Assigned Number subfield: 2 bytes
    795 
    796        The Administrator subfield must contain a 4-byte Autonomous
    797        System number [BGP-AS4].  If this ASN is from the public ASN
    798        space, it must have been assigned by the appropriate authority
    799        (use of ASN values from the private ASN space is strongly
    800        discouraged).  The Assigned Number subfield contains a number
    801        from a numbering space which is administered by the enterprise to
    802        which the ASN has been assigned by an appropriate authority.
    803 
    804 4.3.  Controlling Route Distribution
    805 
    806    In this section, we discuss the way in which the distribution of the
    807    VPN-IPv4 routes is controlled.
    808 
    809    If a PE router is attached to a particular VPN (by being attached to
    810    a particular CE in that VPN), it learns some of that VPN's IP routes
    811    from the attached CE router.  Routes learned from a CE routing peer
    812    over a particular attachment circuit may be installed in the VRF
    813    associated with that attachment circuit.  Exactly which routes are
    814    installed in this manner is determined by the way in which the PE
    815    learns routes from the CE.  In particular, when the PE and CE are
    816    routing protocol peers, this is determined by the decision process of
    817    the routing protocol; this is discussed in Section 7.
    818 
    819    These routes are then converted to VPN-IP4 routes, and "exported" to
    820    BGP.  If there is more than one route to a particular VPN-IP4 address
    821    prefix, BGP chooses the "best" one, using the BGP decision process.
    822    That route is then distributed by BGP to the set of other PEs that
    823    need to know about it.  At these other PEs, BGP will again choose the
    824    best route for a particular VPN-IP4 address prefix.  Then the chosen
    825    VPN-IP4 routes are converted back into IP routes, and "imported" into
    826    one or more VRFs.  Whether they are actually installed in the VRFs
    827    depends on the decision process of the routing method used between
    828    the PE and those CEs that are associated with the VRF in question.
    829    Finally, any route installed in a VRF may be distributed to the
    830    associated CE routers.
    831 
    832 4.3.1.  The Route Target Attribute
    833 
    834    Every VRF is associated with one or more Route Target (RT)
    835    attributes.
    836 
    837    When a VPN-IPv4 route is created (from an IPv4 route that the PE has
    838    learned from a CE) by a PE router, it is associated with one or more
    839 
    840 
    841 
    842 Rosen & Rekhter             Standards Track                    [Page 15]
    843 
    844 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    845 
    846 
    847    Route Target attributes.  These are carried in BGP as attributes of
    848    the route.
    849 
    850    Any route associated with Route Target T must be distributed to every
    851    PE router that has a VRF associated with Route Target T.  When such a
    852    route is received by a PE router, it is eligible to be installed in
    853    those of the PE's VRFs that are associated with Route Target T.
    854    (Whether it actually gets installed depends upon the outcome of the
    855    BGP decision process, and upon the outcome of the decision process of
    856    the IGP (i.e., the intra-domain routing protocol) running on the
    857    PE/CE interface.)
    858 
    859    A Route Target attribute can be thought of as identifying a set of
    860    sites.  (Though it would be more precise to think of it as
    861    identifying a set of VRFs.)  Associating a particular Route Target
    862    attribute with a route allows that route to be placed in the VRFs
    863    that are used for routing traffic that is received from the
    864    corresponding sites.
    865 
    866    There is a set of Route Targets that a PE router attaches to a route
    867    received from site S; these may be called the "Export Targets".  And
    868    there is a set of Route Targets that a PE router uses to determine
    869    whether a route received from another PE router could be placed in
    870    the VRF associated with site S; these may be called the "Import
    871    Targets".  The two sets are distinct, and need not be the same.  Note
    872    that a particular VPN-IPv4 route is only eligible for installation in
    873    a particular VRF if there is some Route Target that is both one of
    874    the route's Route Targets and one of the VRF's Import Targets.
    875 
    876    The function performed by the Route Target attribute is similar to
    877    that performed by the BGP Communities attribute.  However, the format
    878    of the latter is inadequate for present purposes, since it allows
    879    only a 2-byte numbering space.  It is desirable to structure the
    880    format, similar to what we have described for RDs (see Section 4.2),
    881    so that a type field defines the length of an administrator field,
    882    and the remainder of the attribute is a number from the specified
    883    administrator's numbering space.  This can be done using BGP Extended
    884    Communities.  The Route Targets discussed herein are encoded as BGP
    885    Extended Community Route Targets [BGP-EXTCOMM].  They are structured
    886    similarly to the RDs.
    887 
    888    When a BGP speaker has received more than one route to the same VPN-
    889    IPv4 prefix, the BGP rules for route preference are used to choose
    890    which VPN-IPv4 route is installed by BGP.
    891 
    892    Note that a route can only have one RD, but it can have multiple
    893    Route Targets.  In BGP, scalability is improved if one has a single
    894    route with multiple attributes, as opposed to multiple routes.  One
    895 
    896 
    897 
    898 Rosen & Rekhter             Standards Track                    [Page 16]
    899 
    900 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    901 
    902 
    903    could eliminate the Route Target attribute by creating more routes
    904    (i.e., using more RDs), but the scaling properties would be less
    905    favorable.
    906 
    907    How does a PE determine which Route Target attributes to associate
    908    with a given route?  There are a number of different possible ways.
    909    The PE might be configured to associate all routes that lead to a
    910    specified site with a specified Route Target.  Or the PE might be
    911    configured to associate certain routes leading to a specified site
    912    with one Route Target, and certain with another.
    913 
    914    If the PE and the CE are themselves BGP peers (see Section 7), then
    915    the SP may allow the customer, within limits, to specify how its
    916    routes are to be distributed.  The SP and the customer would need to
    917    agree in advance on the set of RTs that are allowed to be attached to
    918    the customer's VPN routes.  The CE could then attach one or more of
    919    those RTs to each IP route that it distributes to the PE.  This gives
    920    the customer the freedom to specify in real time, within agreed-upon
    921    limits, its route distribution policies.  If the CE is allowed to
    922    attach RTs to its routes, the PE MUST filter out all routes that
    923    contain RTs that the customer is not allowed to use.  If the CE is
    924    not allowed to attach RTs to its routes, but does so anyway, the PE
    925    MUST remove the RT before converting the customer's route to a VPN-
    926    IPv4 route.
    927 
    928 4.3.2.  Route Distribution Among PEs by BGP
    929 
    930    If two sites of a VPN attach to PEs that are in the same Autonomous
    931    System, the PEs can distribute VPN-IPv4 routes to each other by means
    932    of an IBGP connection between them.  (The term "IBGP" refers to the
    933    set of protocols and procedures used when there is a BGP connection
    934    between two BGP speakers in the same Autonomous System.  This is
    935    distinguished from "EBGP", the set of procedures used between two BGP
    936    speakers in different Autonomous Systems.)  Alternatively, each can
    937    have an IBGP connection to a route reflector [BGP-RR].
    938 
    939    When a PE router distributes a VPN-IPv4 route via BGP, it uses its
    940    own address as the "BGP next hop".  This address is encoded as a
    941    VPN-IPv4 address with an RD of 0.  ([BGP-MP] requires that the next
    942    hop address be in the same address family as the Network Layer
    943    Reachability Information (NLRI).)  It also assigns and distributes an
    944    MPLS label.  (Essentially, PE routers distribute not VPN-IPv4 routes,
    945    but Labeled VPN-IPv4 routes.  Cf. [MPLS-BGP].)  When the PE processes
    946    a received packet that has this label at the top of the stack, the PE
    947    will pop the stack, and process the packet appropriately.
    948 
    949 
    950 
    951 
    952 
    953 
    954 Rosen & Rekhter             Standards Track                    [Page 17]
    955 
    956 RFC 4364                    BGP/MPLS IP VPNs               February 2006
    957 
    958 
    959    The PE may distribute the exact set of routes that appears in the
    960    VRF, or it may perform summarization and distribute aggregates of
    961    those routes, or it may do some of one and some of the other.
    962 
    963    Suppose that a PE has assigned label L to route R, and has
    964    distributed this label mapping via BGP.  If R is an aggregate of a
    965    set of routes in the VRF, the PE will know that packets from the
    966    backbone that arrive with this label must have their destination
    967    addresses looked up in a VRF.  When the PE looks up the label in its
    968    Label Information Base, it learns which VRF must be used.  On the
    969    other hand, if R is not an aggregate, then when the PE looks up the
    970    label, it learns the egress attachment circuit, as well as the
    971    encapsulation header for the packet.  In this case, no lookup in the
    972    VRF is done.
    973 
    974    We would expect that the most common case would be the case where the
    975    route is NOT an aggregate.  The case where it is an aggregate can be
    976    very useful though if the VRF contains a large number of host routes
    977    (e.g., as in dial-in), or if the VRF has an associated Local Area
    978    Network (LAN) interface (where there is a different outgoing layer 2
    979    header for each system on the LAN, but a route is not distributed for
    980    each such system).
    981 
    982    Whether or not each route has a distinct label is an implementation
    983    matter.  There are a number of possible algorithms one could use to
    984    determine whether two routes get assigned the same label:
    985 
    986      - One may choose to have a single label for an entire VRF, so that
    987        a single label is shared by all the routes from that VRF.  Then
    988        when the egress PE receives a packet with that label, it must
    989        look up the packet's IP destination address in that VRF (the
    990        packet's "egress VRF"), in order to determine the packet's egress
    991        attachment circuit and the corresponding data link encapsulation.
    992 
    993      - One may choose to have a single label for each attachment
    994        circuit, so that a single label is shared by all the routes with
    995        the same "outgoing attachment circuit".  This enables one to
    996        avoid doing a lookup in the egress VRF, though some sort of
    997        lookup may need to be done in order to determine the data link
    998        encapsulation, e.g., an Address Resolution Protocol (ARP) lookup.
    999 
   1000      - One may choose to have a distinct label for each route.  Then if
   1001        a route is potentially reachable over more than one attachment
   1002        circuit, the PE/CE routing can switch the preferred path for a
   1003        route from one attachment circuit to another, without there being
   1004        any need to distribute new a label for that route.
   1005 
   1006 
   1007 
   1008 
   1009 
   1010 Rosen & Rekhter             Standards Track                    [Page 18]
   1011 
   1012 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1013 
   1014 
   1015    There may be other possible algorithms as well.  The choice of
   1016    algorithm is entirely at the discretion of the egress PE, and is
   1017    otherwise transparent.
   1018 
   1019    In using BGP-distributed MPLS labels in this manner, we presuppose
   1020    that an MPLS packet carrying such a label can be tunneled from the
   1021    router that installs the corresponding BGP-distributed route to the
   1022    router that is the BGP next hop of that route.  This requires either
   1023    that a label switched path exist between those two routers or else
   1024    that some other tunneling technology (e.g., [MPLS-in-IP-GRE]) can be
   1025    used between them.
   1026 
   1027    This tunnel may follow a "best effort" route, or it may follow a
   1028    traffic-engineered route.  Between a given pair of routers, there may
   1029    be one such tunnel, or there may be several, perhaps with different
   1030    Quality of Service (QoS) characteristics.  All that matters for the
   1031    VPN architecture is that some such tunnel exists.  To ensure
   1032    interoperability among systems that implement this VPN architecture
   1033    using MPLS label switched paths as the tunneling technology, all such
   1034    systems MUST support Label Distribution Protocol (LDP) [MPLS-LDP].
   1035    In particular, Downstream Unsolicited mode MUST be supported on
   1036    interfaces that are neither Label Controlled ATM (LC-ATM) [MPLS-ATM]
   1037    nor Label Controlled Frame Relay (LC-FR) [MPLS-FR] interfaces, and
   1038    Downstream on Demand mode MUST be supported on LC-ATM interfaces and
   1039    LC-FR interfaces.
   1040 
   1041    If the tunnel follows a best-effort route, then the PE finds the
   1042    route to the remote endpoint by looking up its IP address in the
   1043    default forwarding table.
   1044 
   1045    A PE router, UNLESS it is a route reflector (see Section 4.3.3) or an
   1046    Autonomous System Border Router (ASBR) for an inter-provider VPN (see
   1047    Section 10), should not install a VPN-IPv4 route unless it has at
   1048    least one VRF with an Import Target identical to one of the route's
   1049    Route Target attributes.  Inbound filtering should be used to cause
   1050    such routes to be discarded.  If a new Import Target is later added
   1051    to one of the PE's VRFs (a "VPN Join" operation), it must then
   1052    acquire the routes it may previously have discarded.  This can be
   1053    done using the refresh mechanism described in [BGP-RFSH].  The
   1054    outbound route filtering mechanism of [BGP-ORF] can also be used to
   1055    advantage to make the filtering more dynamic.
   1056 
   1057    Similarly, if a particular Import Target is no longer present in any
   1058    of a PE's VRFs (as a result of one or more "VPN Prune" operations),
   1059    the PE may discard all routes that, as a result, no longer have any
   1060    of the PE's VRF's Import Targets as one of their Route Target
   1061    attributes.
   1062 
   1063 
   1064 
   1065 
   1066 Rosen & Rekhter             Standards Track                    [Page 19]
   1067 
   1068 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1069 
   1070 
   1071    A router that is not attached to any VPN and that is not a Route
   1072    Reflector (i.e., a P router) never installs any VPN-IPv4 routes at
   1073    all.
   1074 
   1075    Note that VPN Join and Prune operations are non-disruptive and do not
   1076    require any BGP connections to be brought down, as long as the
   1077    refresh mechanism of [BGP-RFSH] is used.
   1078 
   1079    As a result of these distribution rules, no one PE ever needs to
   1080    maintain all routes for all VPNs; this is an important scalability
   1081    consideration.
   1082 
   1083 4.3.3.  Use of Route Reflectors
   1084 
   1085    Rather than having a complete IBGP mesh among the PEs, it is
   1086    advantageous to make use of BGP Route Reflectors [BGP-RR] to improve
   1087    scalability.  All the usual techniques for using route reflectors to
   1088    improve scalability (e.g., route reflector hierarchies) are
   1089    available.
   1090 
   1091    Route reflectors are the only systems that need to have routing
   1092    information for VPNs to which they are not directly attached.
   1093    However, there is no need to have any one route reflector know all
   1094    the VPN-IPv4 routes for all the VPNs supported by the backbone.
   1095 
   1096    We outline below two different ways to partition the set of VPN-IPv4
   1097    routes among a set of route reflectors.
   1098 
   1099       1. Each route reflector is preconfigured with a list of Route
   1100          Targets.  For redundancy, more than one route reflector may be
   1101          preconfigured with the same list.  A route reflector uses the
   1102          preconfigured list of Route Targets to construct its inbound
   1103          route filtering.  The route reflector may use the techniques of
   1104          [BGP-ORF] to install on each of its peers (regardless of
   1105          whether the peer is another route reflector or a PE) the set of
   1106          Outbound Route Filters (ORFs) that contains the list of its
   1107          preconfigured Route Targets.  Note that route reflectors should
   1108          accept ORFs from other route reflectors, which means that route
   1109          reflectors should advertise the ORF capability to other route
   1110          reflectors.
   1111 
   1112          A service provider may modify the list of preconfigured Route
   1113          Targets on a route reflector.  When this is done, the route
   1114          reflector modifies the ORFs it installs on all of its IBGP
   1115          peers.  To reduce the frequency of configuration changes on
   1116          route reflectors, each route reflector may be preconfigured
   1117          with a block of Route Targets.  This way, when a new Route
   1118          Target is needed for a new VPN, there is already one or more
   1119 
   1120 
   1121 
   1122 Rosen & Rekhter             Standards Track                    [Page 20]
   1123 
   1124 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1125 
   1126 
   1127          route reflectors that are (pre)configured with this Route
   1128          Target.
   1129 
   1130          Unless a given PE is a client of all route reflectors, when a
   1131          new VPN is added to the PE ("VPN Join"), it will need to become
   1132          a client of the route reflector(s) that maintain routes for
   1133          that VPN.  Likewise, deleting an existing VPN from the PE ("VPN
   1134          Prune") may result in a situation where the PE no longer needs
   1135          to be a client of some route reflector(s).  In either case, the
   1136          Join or Prune operation is non-disruptive (as long as
   1137          [BGP-RFSH] is used, and never requires a BGP connection to be
   1138          brought down, only to be brought right back up.
   1139 
   1140          (By "adding a new VPN to a PE", we really mean adding a new
   1141          import Route Target to one of its VRFs, or adding a new VRF
   1142          with an import Route Target not had by any of the PE's other
   1143          VRFs.)
   1144 
   1145       2. Another method is to have each PE be a client of some subset of
   1146          the route reflectors.  A route reflector is not preconfigured
   1147          with the list of Route Targets, and does not perform inbound
   1148          route filtering of routes received from its clients (PEs);
   1149          rather, it accepts all the routes received from all of its
   1150          clients (PEs).  The route reflector keeps track of the set of
   1151          the Route Targets carried by all the routes it receives.  When
   1152          the route reflector receives from its client a route with a
   1153          Route Target that is not in this set, this Route Target is
   1154          immediately added to the set.  On the other hand, when the
   1155          route reflector no longer has any routes with a particular
   1156          Route Target that is in the set, the route reflector should
   1157          delay (by a few hours) the deletion of this Route Target from
   1158          the set.
   1159 
   1160          The route reflector uses this set to form the inbound route
   1161          filters that it applies to routes received from other route
   1162          reflectors.  The route reflector may also use ORFs to install
   1163          the appropriate outbound route filtering on other route
   1164          reflectors.  Just like with the first approach, a route
   1165          reflector should accept ORFs from other route reflectors.  To
   1166          accomplish this, a route reflector advertises ORF capability to
   1167          other route reflectors.
   1168 
   1169          When the route reflector changes the set, it should immediately
   1170          change its inbound route filtering.  In addition, if the route
   1171          reflector uses ORFs, then the ORFs have to be immediately
   1172          changed to reflect the changes in the set.  If the route
   1173          reflector doesn't use ORFs, and a new Route Target is added to
   1174 
   1175 
   1176 
   1177 
   1178 Rosen & Rekhter             Standards Track                    [Page 21]
   1179 
   1180 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1181 
   1182 
   1183          the set, the route reflector, after changing its inbound route
   1184          filtering, must issue BGP Refresh to other route reflectors.
   1185 
   1186          The delay of "a few hours" mentioned above allows a route
   1187          reflector to hold onto routes with a given RT, even after it
   1188          loses the last of its clients that are interested in such
   1189          routes.  This protects against the need to reacquire all such
   1190          routes if the clients' "disappearance" is only temporary.
   1191 
   1192          With this procedure, VPN Join and Prune operations are also
   1193          non-disruptive.
   1194 
   1195          Note that this technique will not work properly if some client
   1196          PE has a VRF with an import Route Target that is not one of its
   1197          export Route Targets.
   1198 
   1199    In these procedures, a PE router which attaches to a particular VPN
   1200    "auto-discovers" the other PEs that attach to the same VPN.  When a
   1201    new PE router is added, or when an existing PE router attaches to a
   1202    new VPN, no reconfiguration of other PE routers is needed.
   1203 
   1204    Just as there is no one PE router that needs to know all the VPN-IPv4
   1205    routes supported over the backbone, these distribution rules ensure
   1206    that there is no one Route Reflector (RR) that needs to know all the
   1207    VPN-IPv4 routes supported over the backbone.  As a result, the total
   1208    number of such routes that can be supported over the backbone is not
   1209    bounded by the capacity of any single device, and therefore can
   1210    increase virtually without bound.
   1211 
   1212 4.3.4.  How VPN-IPv4 NLRI Is Carried in BGP
   1213 
   1214    The BGP Multiprotocol Extensions [BGP-MP] are used to encode the
   1215    NLRI.  If the Address Family Identifier (AFI) field is set to 1, and
   1216    the Subsequent Address Family Identifier (SAFI) field is set to 128,
   1217    the NLRI is an MPLS-labeled VPN-IPv4 address.  AFI 1 is used since
   1218    the network layer protocol associated with the NLRI is still IP.
   1219    Note that this VPN architecture does not require the capability to
   1220    distribute unlabeled VPN-IPv4 addresses.
   1221 
   1222    In order for two BGP speakers to exchange labeled VPN-IPv4 NLRI, they
   1223    must use BGP Capabilities Advertisement to ensure that they both are
   1224    capable of properly processing such NLRI.  This is done as specified
   1225    in [BGP-MP], by using capability code 1 (multiprotocol BGP), with an
   1226    AFI of 1 and an SAFI of 128.
   1227 
   1228    The labeled VPN-IPv4 NLRI itself is encoded as specified in
   1229    [MPLS-BGP], where the prefix consists of an 8-byte RD followed by an
   1230    IPv4 prefix.
   1231 
   1232 
   1233 
   1234 Rosen & Rekhter             Standards Track                    [Page 22]
   1235 
   1236 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1237 
   1238 
   1239 4.3.5.  Building VPNs Using Route Targets
   1240 
   1241    By setting up the Import Targets and Export Targets properly, one can
   1242    construct different kinds of VPNs.
   1243 
   1244    Suppose it is desired to create a fully meshed closed user group,
   1245    i.e., a set of sites where each can send traffic directly to the
   1246    other, but traffic cannot be sent to or received from other sites.
   1247    Then each site is associated with a VRF, a single Route Target
   1248    attribute is chosen, that Route Target is assigned to each VRF as
   1249    both the Import Target and the Export Target, and that Route Target
   1250    is not assigned to any other VRFs as either the Import Target or the
   1251    Export Target.
   1252 
   1253    Alternatively, suppose one desired, for whatever reason, to create a
   1254    "hub and spoke" kind of VPN.  This could be done by the use of two
   1255    Route Target values, one meaning "Hub" and one meaning "Spoke".  At
   1256    the VRFs attached to the hub sites, "Hub" is the Export Target and
   1257 
   1258    "Spoke" is the Import Target.  At the VRFs attached to the spoke
   1259    site, "Hub" is the Import Target and "Spoke" is the Export Target.
   1260 
   1261    Thus, the methods for controlling the distribution of routing
   1262    information among various sets of sites are very flexible, which in
   1263    turn provides great flexibility in constructing VPNs.
   1264 
   1265 4.3.6.  Route Distribution Among VRFs in a Single PE
   1266 
   1267    It is possible to distribute routes from one VRF to another, even if
   1268    both VRFs are in the same PE, even though in this case one cannot say
   1269    that the route has been distributed by BGP.  Nevertheless, the
   1270    decision to distribute a particular route from one VRF to another
   1271    within a single PE is the same decision that would be made if the
   1272    VRFs were on different PEs.  That is, it depends on the Route Target
   1273    attribute that is assigned to the route (or would be assigned if the
   1274    route were distributed by BGP), and the import target of the second
   1275    VRF.
   1276 
   1277 5.  Forwarding
   1278 
   1279    If the intermediate routers in the backbone do not have any
   1280    information about the routes to the VPNs, how are packets forwarded
   1281    from one VPN site to another?
   1282 
   1283    When a PE receives an IP packet from a CE device, it chooses a
   1284    particular VRF in which to look up the packet's destination address.
   1285    This choice is based on the packet's ingress attachment circuit.
   1286 
   1287 
   1288 
   1289 
   1290 Rosen & Rekhter             Standards Track                    [Page 23]
   1291 
   1292 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1293 
   1294 
   1295    Assume that a match is found.  As a result we learn the packet's
   1296    "next hop".
   1297 
   1298    If the packet's next hop is reached directly over a VRF attachment
   1299    circuit from this PE (i.e., the packet's egress attachment circuit is
   1300    on the same PE as its ingress attachment circuit), then the packet is
   1301    sent on the egress attachment circuit, and no MPLS labels are pushed
   1302    onto the packet's label stack.
   1303 
   1304    If the ingress and egress attachment circuits are on the same PE, but
   1305    are associated with different VRFs, and if the route that best
   1306    matches the destination address in the ingress attachment circuit's
   1307    VRF is an aggregate of several routes in the egress attachment
   1308    circuit's VRF, it may be necessary to look up the packet's
   1309    destination address in the egress VRF as well.
   1310 
   1311    If the packet's next hop is NOT reached through a VRF attachment
   1312    circuit, then the packet must travel at least one hop through the
   1313    backbone.  The packet thus has a "BGP Next Hop", and the BGP Next Hop
   1314    will have assigned an MPLS label for the route that best matches the
   1315    packet's destination address.  Call this label the "VPN route label".
   1316    The IP packet is turned into an MPLS packet with the VPN route label
   1317    as the sole label on the label stack.
   1318 
   1319    The packet must then be tunneled to the BGP Next Hop.
   1320 
   1321    If the backbone supports MPLS, this is done as follows:
   1322 
   1323      - The PE routers (and any Autonomous System border routers) that
   1324        redistribute VPN-IPv4 addresses need to insert /32 address
   1325        prefixes for themselves into the IGP routing tables of the
   1326        backbone.  This enables MPLS, at each node in the backbone
   1327        network, to assign a label corresponding to the route to each PE
   1328        router.  To ensure interoperability among different
   1329        implementations, it is required to support LDP for setting up the
   1330        label switched paths across the backbone.  However, other methods
   1331        of setting up these label switched paths are also possible.
   1332        (Some of these other methods may not require the presence of the
   1333        /32 address prefixes in the IGP.)
   1334 
   1335      - If there are any traffic engineering tunnels to the BGP next hop,
   1336        and if one or more of those is available for use by the packet in
   1337        question, one of these tunnels is chosen.  This tunnel will be
   1338        associated with an MPLS label, the "tunnel label".  The tunnel
   1339        label gets pushed on the MPLS label stack, and the packet is
   1340        forwarded to the tunnel's next hop.
   1341 
   1342 
   1343 
   1344 
   1345 
   1346 Rosen & Rekhter             Standards Track                    [Page 24]
   1347 
   1348 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1349 
   1350 
   1351      - Otherwise,
   1352 
   1353          * The packet will have an "IGP Next Hop", which is the next hop
   1354            along the IGP route to the BGP Next Hop.
   1355 
   1356          * If the BGP Next Hop and the IGP Next Hop are the same, and if
   1357            penultimate hop popping is used, the packet is then sent to
   1358            the IGP Next Hop, carrying only the VPN route label.
   1359 
   1360          * Otherwise, the IGP Next Hop will have assigned a label for
   1361            the route that best matches the address of the BGP Next Hop.
   1362            Call this the "tunnel label".  The tunnel label gets pushed
   1363            on as the packet's top label.  The packet is then forwarded
   1364            to the IGP Next Hop.
   1365 
   1366      - MPLS will then carry the packet across the backbone to the BGP
   1367        Next Hop, where the VPN label will be examined.
   1368 
   1369    If the backbone does not support MPLS, the MPLS packet carrying only
   1370    the VPN route label may be tunneled to the BGP Next Hop using the
   1371    techniques of [MPLS-in-IP-GRE].  When the packet emerges from the
   1372    tunnel, it will be at the BGP Next Hop, where the VPN route label
   1373    will be examined.
   1374 
   1375    At the BGP Next Hop, the treatment of the packet depends on the VPN
   1376    route label (see Section 4.3.2).  In many cases, the PE will be able
   1377    to determine, from this label, the attachment circuit over which the
   1378    packet should be transmitted (to a CE device), as well as the proper
   1379    data link layer header for that interface.  In other cases, the PE
   1380    may only be able to determine that the packet's destination address
   1381    needs to be looked up in a particular VRF before being forwarded to a
   1382    CE device.  There are also intermediate cases in which the VPN route
   1383    label may determine the packet's egress attachment circuit, but a
   1384    lookup (e.g., ARP) still needs to be done in order to determine the
   1385    packet's data link header on that attachment circuit.
   1386 
   1387    Information in the MPLS header itself, and/or information associated
   1388    with the label, may also be used to provide QoS on the interface to
   1389    the CE.
   1390 
   1391    In any event, if the packet was an unlabeled IP packet when it
   1392    arrived at its ingress PE, it will again be an unlabeled packet when
   1393    it leaves its egress PE.
   1394 
   1395    The fact that packets with VPN route labels are tunneled through the
   1396    backbone is what makes it possible to keep all the VPN routes out of
   1397    the P routers.  This is crucial to ensuring the scalability of the
   1398 
   1399 
   1400 
   1401 
   1402 Rosen & Rekhter             Standards Track                    [Page 25]
   1403 
   1404 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1405 
   1406 
   1407    scheme.  The backbone does not even need to have routes to the CEs,
   1408    only to the PEs.
   1409 
   1410    With respect to the tunnels, it is worth noting that this
   1411    specification:
   1412 
   1413      - DOES NOT require that the tunnels be point-to-point; multipoint-
   1414        to-point can be used;
   1415 
   1416      - DOES NOT require that there be any explicit setup of the tunnels,
   1417        either via signaling or via manual configuration;
   1418 
   1419      - DOES NOT require that there be any tunnel-specific signaling;
   1420 
   1421      - DOES NOT require that there be any tunnel-specific state in the P
   1422        or PE routers, beyond what is necessary to maintain the routing
   1423        information and (if used) the MPLS label information.
   1424 
   1425    Of course, this specification is compatible with the use of point-
   1426    to-point tunnels that must be explicitly configured and/or signaled,
   1427    and in some situations there may be reasons for using such tunnels.
   1428 
   1429    The considerations that are relevant to choosing a particular
   1430    tunneling technology are outside the scope of this specification.
   1431 
   1432 6.  Maintaining Proper Isolation of VPNs
   1433 
   1434    To maintain proper isolation of one VPN from another, it is important
   1435    that no router in the backbone accept a tunneled packet from outside
   1436    the backbone, unless it is sure that both endpoints of that tunnel
   1437    are outside the backbone.
   1438 
   1439    If MPLS is being used as the tunneling technology, this means that a
   1440    router in the backbone MUST NOT accept a labeled packet from any
   1441    adjacent non-backbone device unless the following two conditions
   1442    hold:
   1443 
   1444       1. the label at the top of the label stack was actually
   1445          distributed by that backbone router to that non-backbone
   1446          device, and
   1447 
   1448       2. the backbone router can determine that use of that label will
   1449          cause the packet to leave the backbone before any labels lower
   1450          in the stack will be inspected, and before the IP header will
   1451          be inspected.
   1452 
   1453    The first condition ensure that any labeled packets received from
   1454    non-backbone routers have a legitimate and properly assigned label at
   1455 
   1456 
   1457 
   1458 Rosen & Rekhter             Standards Track                    [Page 26]
   1459 
   1460 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1461 
   1462 
   1463    the top of the label stack.  The second condition ensures that the
   1464    backbone routers will never look below that top label.  Of course,
   1465    the simplest way to meet these two conditions is just to have the
   1466    backbone devices refuse to accept labeled packets from non-backbone
   1467    devices.
   1468 
   1469    If MPLS is not being used as the tunneling technology, then filtering
   1470    must be done to ensure that an MPLS-in-IP or MPLS-in-GRE packet can
   1471    be accepted into the backbone only if the packet's IP destination
   1472    address will cause it to be sent outside the backbone.
   1473 
   1474 7.  How PEs Learn Routes from CEs
   1475 
   1476    The PE routers that attach to a particular VPN need to know, for each
   1477    attachment circuit leading to that VPN, which of the VPN's addresses
   1478    should be reached over that attachment circuit.
   1479 
   1480    The PE translates these addresses into VPN-IPv4 addresses, using a
   1481    configured RD.  The PE then treats these VPN-IPv4 routes as input to
   1482    BGP.  Routes from a VPN site are NOT leaked into the backbone's IGP.
   1483 
   1484    Exactly which PE/CE route distribution techniques are possible
   1485    depends on whether or not a particular CE is in a "transit VPN".  A
   1486    "transit VPN" is one that contains a router that receives routes from
   1487    a "third party" (i.e., from a router that is not in the VPN, but is
   1488    not a PE router) and that redistributes those routes to a PE router.
   1489    A VPN that is not a transit VPN is a "stub VPN".  The vast majority
   1490    of VPNs, including just about all corporate enterprise networks,
   1491    would be expected to be "stubs" in this sense.
   1492 
   1493    The possible PE/CE distribution techniques are:
   1494 
   1495       1. Static routing (i.e., configuration) may be used. (This is
   1496          likely to be useful only in stub VPNs.)
   1497 
   1498       2. PE and CE routers may be Routing Information Protocol (RIP)
   1499          [RIP] peers, and the CE may use RIP to tell the PE router the
   1500          set of address prefixes that are reachable at the CE router's
   1501          site.  When RIP is configured in the CE, care must be taken to
   1502          ensure that address prefixes from other sites (i.e., address
   1503          prefixes learned by the CE router from the PE router) are never
   1504          advertised to the PE.  More precisely:  if a PE router, say,
   1505          PE1, receives a VPN-IPv4 route R1, and as a result distributes
   1506          an IPv4 route R2 to a CE, then R2 must not be distributed back
   1507          from that CE's site to a PE router, say, PE2, (where PE1 and
   1508          PE2 may be the same router or different routers), unless PE2
   1509          maps R2 to a VPN-IPv4 route that is different than (i.e.,
   1510          contains a different RD than) R1.
   1511 
   1512 
   1513 
   1514 Rosen & Rekhter             Standards Track                    [Page 27]
   1515 
   1516 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1517 
   1518 
   1519       3. The PE and CE routers may be OSPF peers.  A PE router that is
   1520          an OSPF peer of a CE router appears, to the CE router, to be an
   1521          area 0 router.  If a PE router is an OSPF peer of CE routers
   1522          that are in distinct VPNs, the PE must of course be running
   1523          multiple instances of OSPF.
   1524 
   1525          IPv4 routes that the PE learns from the CE via OSPF are
   1526          redistributed into BGP as VPN-IPv4 routes.  Extended Community
   1527          attributes are used to carry, along with the route, all the
   1528          information needed to enable the route to be distributed to
   1529          other CE routers in the VPN in the proper type of OSPF Link
   1530          State Advertisement (LSA).  OSPF route tagging is used to
   1531          ensure that routes received from the MPLS/BGP backbone are not
   1532          sent back into the backbone.
   1533 
   1534          Specification of the complete set of procedures for the use of
   1535          OSPF between PE and CE can be found in [VPN-OSPF] and
   1536          [OSPF-2547-DNBIT].
   1537 
   1538       4. The PE and CE routers may be BGP peers, and the CE router may
   1539          use BGP (in particular, EBGP to tell the PE router the set of
   1540          address prefixes that are at the CE router's site. (This
   1541          technique can be used in stub VPNs or transit VPNs.)
   1542 
   1543          This technique has a number of advantages over the others:
   1544 
   1545             a) Unlike the IGP alternatives, this does not require the PE
   1546                to run multiple routing algorithm instances in order to
   1547                talk to multiple CEs.
   1548 
   1549             b) BGP is explicitly designed for just this function:
   1550                passing routing information between systems run by
   1551                different administrations.
   1552 
   1553             c) If the site contains "BGP backdoors", i.e., routers with
   1554                BGP connections to routers other than PE routers, this
   1555                procedure will work correctly in all circumstances.  The
   1556                other procedures may or may not work, depending on the
   1557                precise circumstances.
   1558 
   1559             d) Use of BGP makes it easy for the CE to pass attributes of
   1560                the routes to the PE.  A complete specification of the
   1561                set of attributes and their use is outside the scope of
   1562                this document.  However, some examples of the way this
   1563                may be used are the following:
   1564 
   1565 
   1566 
   1567 
   1568 
   1569 
   1570 Rosen & Rekhter             Standards Track                    [Page 28]
   1571 
   1572 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1573 
   1574 
   1575                  - The CE may suggest a particular Route Target for each
   1576                    route, from among the Route Targets that the PE is
   1577                    authorized to attach to the route.  The PE would then
   1578                    attach only the suggested Route Target, rather than
   1579                    the full set.  This gives the CE administrator some
   1580                    dynamic control of the distribution of routes from
   1581                    the CE.
   1582 
   1583                  - Additional types of Extended Community attributes may
   1584                    be defined, where the intention is to have those
   1585                    attributes passed transparently (i.e., without being
   1586                    changed by the PE routers) from CE to CE.  This would
   1587                    allow CE administrators to implement additional route
   1588                    filtering, beyond that which is done by the PEs.
   1589                    This additional filtering would not require
   1590                    coordination with the SP.
   1591 
   1592          On the other hand, using BGP may be something new for the CE
   1593          administrators.
   1594 
   1595          If a site is not in a transit VPN, note that it need not have a
   1596          unique Autonomous System Number (ASN).  Every CE whose site is
   1597          not in a transit VPN can use the same ASN.  This can be chosen
   1598          from the private ASN space, and it will be stripped out by the
   1599          PE.  Routing loops are prevented by use of the Site of Origin
   1600          attribute (see below).
   1601 
   1602          What if a set of sites constitutes a transit VPN?  This will
   1603          generally be the case only if the VPN is itself an Internet
   1604          Service Provider's (ISP's) network, where the ISP is itself
   1605          buying backbone services from another SP.  The latter SP may be
   1606          called a "carrier's carrier".  In this case, the best way to
   1607          provide the VPN is to have the CE routers support MPLS, and to
   1608          use the technique described in Section 9.
   1609 
   1610    When we do not need to distinguish among the different ways in which
   1611    a PE can be informed of the address prefixes that exist at a given
   1612    site, we will simply say that the PE has "learned" the routes from
   1613    that site.  This includes the case where the PE has been manually
   1614    configured with the routes.
   1615 
   1616    Before a PE can redistribute a VPN-IPv4 route learned from a site, it
   1617    must assign a Route Target attribute (see Section 4.3.1) to the
   1618    route, and it may assign a Site of Origin attribute to the route.
   1619 
   1620    The Site of Origin attribute, if used, is encoded as a Route Origin
   1621    Extended Community [BGP-EXTCOMM].  The purpose of this attribute is
   1622    to uniquely identify the set of routes learned from a particular
   1623 
   1624 
   1625 
   1626 Rosen & Rekhter             Standards Track                    [Page 29]
   1627 
   1628 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1629 
   1630 
   1631    site.  This attribute is needed in some cases to ensure that a route
   1632    learned from a particular site via a particular PE/CE connection is
   1633    not distributed back to the site through a different PE/CE
   1634    connection.  It is particularly useful if BGP is being used as the
   1635    PE/CE protocol, but different sites have not been assigned distinct
   1636    ASNs.
   1637 
   1638 8.  How CEs Learn Routes from PEs
   1639 
   1640    In this section, we assume that the CE device is a router.
   1641 
   1642    If the PE places a particular route in the VRF it uses to route
   1643    packets received from a particular CE, then in general, the PE may
   1644    distribute that route to the CE.  Of course, the PE may distribute
   1645    that route to the CE only if this is permitted by the rules of the
   1646    PE/CE protocol.  (For example, if a particular PE/CE protocol has
   1647    "split horizon", certain routes in the VRF cannot be redistributed
   1648    back to the CE.)  We add one more restriction on the distribution of
   1649    routes from PE to CE: if a route's Site of Origin attribute
   1650    identifies a particular site, that route must never be redistributed
   1651    to any CE at that site.
   1652 
   1653    In most cases, however, it will be sufficient for the PE to simply
   1654    distribute the default route to the CE.  (In some cases, it may even
   1655    be sufficient for the CE to be configured with a default route
   1656    pointing to the PE.)  This will generally work at any site that does
   1657    not itself need to distribute the default route to other sites.
   1658    (E.g., if one site in a corporate VPN has the corporation's access to
   1659    the Internet, that site might need to have default distributed to the
   1660    other site, but one could not distribute default to that site
   1661    itself.)
   1662 
   1663    Whatever procedure is used to distribute routes from CE to PE will
   1664    also be used to distribute routes from PE to CE.
   1665 
   1666 9.  Carriers' Carriers
   1667 
   1668    Sometimes a VPN may actually be the network of an ISP, with its own
   1669    peering and routing policies.  Sometimes a VPN may be the network of
   1670    an SP that is offering VPN services in turn to its own customers.
   1671    VPNs like these can also obtain backbone service from another SP, the
   1672    "carrier's carrier", using essentially the same methods described in
   1673    this document.  However, it is necessary in these cases that the CE
   1674    routers support MPLS.  In particular:
   1675 
   1676      - The CE routers should distribute to the PE routers ONLY those
   1677        routes that are internal to the VPN.  This allows the VPN to be
   1678        handled as a stub VPN.
   1679 
   1680 
   1681 
   1682 Rosen & Rekhter             Standards Track                    [Page 30]
   1683 
   1684 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1685 
   1686 
   1687      - The CE routers should support MPLS, in that they should be able
   1688        to receive labels from the PE routers, and send labeled packets
   1689        to the PE routers.  They do not need to distribute labels of
   1690        their own, though.
   1691 
   1692      - The PE routers should distribute, to the CE routers, labels for
   1693        the routes they distribute to the CE routers.
   1694 
   1695        The PE must not distribute the same label to two different CEs
   1696        unless one of the following conditions holds:
   1697 
   1698          * The two CEs are associated with exactly the same set of VRFs;
   1699 
   1700          * The PE maintains a different Incoming Label Map ([MPLS-ARCH])
   1701            for each CE.
   1702 
   1703        Further, when the PE receives a labeled packet from a CE, it must
   1704        verify that the top label is one that was distributed to that CE.
   1705 
   1706      - Routers at the different sites should establish BGP connections
   1707        among themselves for the purpose of exchanging external routes
   1708        (i.e., routes that lead outside of the VPN).
   1709 
   1710      - All the external routes must be known to the CE routers.
   1711 
   1712    Then when a CE router looks up a packet's destination address, the
   1713    routing lookup will resolve to an internal address, usually the
   1714    address of the packet's BGP next hop.  The CE labels the packet
   1715    appropriately and sends the packet to the PE.  The PE, rather than
   1716    looking up the packet's IP destination address in a VRF, uses the
   1717    packet's top MPLS label to select the BGP next hop.  As a result, if
   1718    the BGP next hop is more than one hop away, the top label will be
   1719    replaced by two labels, a tunnel label and a VPN route label.  If the
   1720    BGP next hop is one hop away, the top label may be replaced by just
   1721    the VPN route label.  If the ingress PE is also the egress PE, the
   1722    top label will just be popped.  When the packet is sent from its
   1723    egress PE to a CE, the packet will have one fewer MPLS labels than it
   1724    had when it was first received by its ingress PE.
   1725 
   1726    In the above procedure, the CE routers are the only routers in the
   1727    VPN that need to support MPLS.  If, on the other hand, all the
   1728    routers at a particular VPN site support MPLS, then it is no longer
   1729    required that the CE routers know all the external routes.  All that
   1730    is required is that the external routes be known to whatever routers
   1731    are responsible for putting the label stack on a hitherto unlabeled
   1732    packet and that there be label switched path that leads from those
   1733    routers to their BGP peers at other sites.  In this case, for each
   1734 
   1735 
   1736 
   1737 
   1738 Rosen & Rekhter             Standards Track                    [Page 31]
   1739 
   1740 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1741 
   1742 
   1743    internal route that a CE router distributes to a PE router, it must
   1744    also distribute a label.
   1745 
   1746 10.  Multi-AS Backbones
   1747 
   1748    What if two sites of a VPN are connected to different Autonomous
   1749    Systems (e.g., because the sites are connected to different SPs)?
   1750    The PE routers attached to that VPN will then not be able to maintain
   1751    IBGP connections with each other, or with a common route reflector.
   1752    Rather, there needs to be some way to use EBGP to distribute VPN-IPv4
   1753    addresses.
   1754 
   1755    There are a number of different ways of handling this case, which we
   1756    present in order of increasing scalability.
   1757 
   1758       a) VRF-to-VRF connections at the AS (Autonomous System) border
   1759          routers.
   1760 
   1761          In this procedure, a PE router in one AS attaches directly to a
   1762          PE router in another.  The two PE routers will be attached by
   1763          multiple sub-interfaces, at least one for each of the VPNs
   1764          whose routes need to be passed from AS to AS.  Each PE will
   1765          treat the other as if it were a CE router.  That is, the PEs
   1766          associate each such sub-interface with a VRF, and use EBGP to
   1767          distribute unlabeled IPv4 addresses to each other.
   1768 
   1769          This is a procedure that "just works", and that does not
   1770          require MPLS at the border between ASes.  However, it does not
   1771          scale as well as the other procedures discussed below.
   1772 
   1773       b) EBGP redistribution of labeled VPN-IPv4 routes from AS to
   1774          neighboring AS.
   1775 
   1776          In this procedure, the PE routers use IBGP to redistribute
   1777          labeled VPN-IPv4 routes either to an Autonomous System Border
   1778          Router (ASBR), or to a route reflector of which an ASBR is a
   1779          client.  The ASBR then uses EBGP to redistribute those labeled
   1780          VPN-IPv4 routes to an ASBR in another AS, which in turn
   1781          distributes them to the PE routers in that AS, or perhaps to
   1782          another ASBR which in turn distributes them, and so on.
   1783 
   1784          When using this procedure, VPN-IPv4 routes should only be
   1785          accepted on EBGP connections at private peering points, as part
   1786          of a trusted arrangement between SPs.  VPN-IPv4 routes should
   1787          neither be distributed to nor accepted from the public
   1788          Internet, or from any BGP peers that are not trusted.  An ASBR
   1789          should never accept a labeled packet from an EBGP peer unless
   1790          it has actually distributed the top label to that peer.
   1791 
   1792 
   1793 
   1794 Rosen & Rekhter             Standards Track                    [Page 32]
   1795 
   1796 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1797 
   1798 
   1799          If there are many VPNs having sites attached to different
   1800          Autonomous Systems, there does not need to be a single ASBR
   1801          between those two ASes that holds all the routes for all the
   1802          VPNs; there can be multiple ASBRs, each of which holds only the
   1803          routes for a particular subset of the VPNs.
   1804 
   1805          This procedure requires that there be a label switched path
   1806          leading from a packet's ingress PE to its egress PE.  Hence the
   1807          appropriate trust relationships must exist between and among
   1808          the set of ASes along the path.  Also, there must be agreement
   1809          among the set of SPs as to which border routers need to receive
   1810          routes with which Route Targets.
   1811 
   1812       c) Multi-hop EBGP redistribution of labeled VPN-IPv4 routes
   1813          between source and destination ASes, with EBGP redistribution
   1814          of labeled IPv4 routes from AS to neighboring AS.
   1815 
   1816          In this procedure, VPN-IPv4 routes are neither maintained nor
   1817          distributed by the ASBRs.  An ASBR must maintain labeled IPv4
   1818          /32 routes to the PE routers within its AS.  It uses EBGP to
   1819          distribute these routes to other ASes.  ASBRs in any transit
   1820          ASes will also have to use EBGP to pass along the labeled /32
   1821          routes.  This results in the creation of a label switched path
   1822          from the ingress PE router to the egress PE router.  Now PE
   1823          routers in different ASes can establish multi-hop EBGP
   1824          connections to each other, and can exchange VPN-IPv4 routes
   1825          over those connections.
   1826 
   1827          If the /32 routes for the PE routers are made known to the P
   1828          routers of each AS, everything works normally.  If the /32
   1829          routes for the PE routers are NOT made known to the P routers
   1830          (other than the ASBRs), then this procedure requires a packet's
   1831          ingress PE to put a three-label stack on it.  The bottom label
   1832          is assigned by the egress PE, corresponding to the packet's
   1833          destination address in a particular VRF.  The middle label is
   1834          assigned by the ASBR, corresponding to the /32 route to the
   1835          egress PE.  The top label is assigned by the ingress PE's IGP
   1836          Next Hop, corresponding to the /32 route to the ASBR.
   1837 
   1838          To improve scalability, one can have the multi-hop EBGP
   1839          connections exist only between a route reflector in one AS and
   1840          a route reflector in another.  (However, when the route
   1841          reflectors distribute routes over this connection, they do not
   1842          modify the BGP next hop attribute of the routes.)  The actual
   1843          PE routers would then only have IBGP connections to the route
   1844          reflectors in their own AS.
   1845 
   1846 
   1847 
   1848 
   1849 
   1850 Rosen & Rekhter             Standards Track                    [Page 33]
   1851 
   1852 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1853 
   1854 
   1855          This procedure is very similar to the "carrier's carrier"
   1856          procedures described in Section 9.  Like the previous
   1857          procedure, it requires that there be a label switched path
   1858          leading from a packet's ingress PE to its egress PE.
   1859 
   1860 11.  Accessing the Internet from a VPN
   1861 
   1862    Many VPN sites will need to be able to access the public Internet, as
   1863    well as to access other VPN sites.  The following describes some of
   1864    the alternative ways of doing this.
   1865 
   1866       1. In some VPNs, one or more of the sites will obtain Internet
   1867          access by means of an "Internet gateway" (perhaps a firewall)
   1868          attached to a non-VRF interface to an ISP.  The ISP may or may
   1869          not be the same organization as the SP that is providing the
   1870          VPN service.  Traffic to/from the Internet gateway would then
   1871          be routed according to the PE router's default forwarding
   1872          table.
   1873 
   1874          In this case, the sites that have Internet access may be
   1875          distributing a default route to their PEs, which in turn
   1876          redistribute it to other PEs and hence into other sites of the
   1877          VPN.  This provides Internet access for all of the VPN's sites.
   1878 
   1879          In order to properly handle traffic from the Internet, the ISP
   1880          must distribute, to the Internet, routes leading to addresses
   1881          that are within the VPN.  This is completely independent of any
   1882          of the route distribution procedures described in this
   1883          document.  The internal structure of the VPN will in general
   1884          not be visible from the Internet; such routes would simply lead
   1885          to the non-VRF interface that attaches to the VPN's Internet
   1886          gateway.
   1887 
   1888          In this model, there is no exchange of routes between a PE
   1889          router's default forwarding table and any of its VRFs.  VPN
   1890          route distribution procedures and Internet route distribution
   1891          procedures are completely independent.
   1892 
   1893          Note that although some sites of the VPN use a VRF interface to
   1894          communicate with the Internet, ultimately all packets to/from
   1895          the Internet traverse a non-VRF interface before
   1896          leaving/entering the VPN, so we refer to this as "non-VRF
   1897          Internet access".
   1898 
   1899          Note that the PE router to which the non-VRF interface attaches
   1900          does not necessarily need to maintain all the Internet routes
   1901          in its default forwarding table.  The default forwarding table
   1902          could have as few as one route, "default", which leads to
   1903 
   1904 
   1905 
   1906 Rosen & Rekhter             Standards Track                    [Page 34]
   1907 
   1908 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1909 
   1910 
   1911          another router (probably an adjacent one) that has the Internet
   1912          routes.  A variation of this scheme is to tunnel packets
   1913          received over the non-VRF interface from the PE router to
   1914          another router, where this other router maintains the full set
   1915          of Internet routes.
   1916 
   1917       2. Some VPNs may obtain Internet access via a VRF interface ("VRF
   1918          Internet access").  If a packet is received by a PE over a VRF
   1919          interface, and if the packet's destination address does not
   1920          match any route in the VRF, then it may be matched against the
   1921          PE's default forwarding table.  If a match is made there, the
   1922          packet can be forwarded natively through the backbone to the
   1923          Internet, instead of being forwarded by MPLS.
   1924 
   1925          In order for traffic to flow natively in the opposite direction
   1926          (from Internet to VRF interface), some of the routes from the
   1927          VRF must be exported to the Internet forwarding table.
   1928          Needless to say, any such routes must correspond to globally
   1929          unique addresses.
   1930 
   1931          In this scheme, the default forwarding table might have the
   1932          full set of Internet routes, or it might have as little as a
   1933          single default route leading to another router that does have
   1934          the full set of Internet routes in its default forwarding
   1935          table.
   1936 
   1937       3. Suppose the PE has the capability to store "non-VPN routes" in
   1938          a VRF.  If a packet's destination address matches a "non-VPN
   1939          route", then the packet is transmitted natively, rather than
   1940          being transmitted via MPLS.  If the VRF contains a non-VPN
   1941          default route, all packets for the public Internet will match
   1942          it, and be forwarded natively to the default route's next hop.
   1943          At that next hop, the packets' destination addresses will be
   1944          looked up in the default forwarding table, and may match more
   1945          specific routes.
   1946 
   1947          This technique would only be available if none of the CE
   1948          routers is distributing a default route.
   1949 
   1950       4. It is also possible to obtain Internet access via a VRF
   1951          interface by having the VRF contain the Internet routes.
   1952          Compared with model 2, this eliminates the second lookup, but
   1953          it has the disadvantage of requiring the Internet routes to be
   1954          replicated in each such VRF.
   1955 
   1956          If this technique is used, the SP may want to make its
   1957          interface to the Internet be a VRF interface, and to use the
   1958 
   1959 
   1960 
   1961 
   1962 Rosen & Rekhter             Standards Track                    [Page 35]
   1963 
   1964 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   1965 
   1966 
   1967          techniques of Section 4 to distribute Internet routes, as VPN-
   1968          IPv4 routes, to other VRFs.
   1969 
   1970    It should be clearly understood that by default, there is no exchange
   1971    of routes between a VRF and the default forwarding table.  This is
   1972    done ONLY upon agreement between a customer and an SP, and only if it
   1973    suits the customer's policies.
   1974 
   1975 12.  Management VPNs
   1976 
   1977    This specification does not require that the sub-interface connecting
   1978    a PE router and a CE router be a "numbered" interface.  If it is a
   1979    numbered interface, this specification allows the addresses assigned
   1980    to the interface to come from either the address space of the VPN or
   1981    the address space of the SP.
   1982 
   1983    If a CE router is being managed by the Service Provider, then the
   1984    Service Provider will likely have a network management system that
   1985    needs to be able to communicate with the CE router.  In this case,
   1986    the addresses assigned to the sub-interface connecting the CE and PE
   1987    routers should come from the SP's address space, and should be unique
   1988    within that space.  The network management system should itself
   1989    connect to a PE router (more precisely, be at a site that connects to
   1990    a PE router) via a VRF interface.  The address of the network
   1991    management system will be exported to all VRFs that are associated
   1992    with interfaces to CE routers that are managed by the SP.  The
   1993    addresses of the CE routers will be exported to the VRF associated
   1994    with the network management system, but not to any other VRFs.
   1995 
   1996    This allows communication between the CE and network management
   1997    system, but does not allow any undesired communication to or among
   1998    the CE routers.
   1999 
   2000    One way to ensure that the proper route import/exports are done is to
   2001    use two Route Targets; call them T1 and T2.  If a particular VRF
   2002    interface attaches to a CE router that is managed by the SP, then
   2003    that VRF is configured to:
   2004 
   2005      - import routes that have T1 attached to them, and
   2006 
   2007      - attach T2 to addresses assigned to each end of its VRF
   2008        interfaces.
   2009 
   2010    If a particular VRF interface attaches to the SP's network management
   2011    system, then that VRF is configured to attach T1 to the address of
   2012    that system, and to import routes that have T2 attached to them.
   2013 
   2014 
   2015 
   2016 
   2017 
   2018 Rosen & Rekhter             Standards Track                    [Page 36]
   2019 
   2020 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2021 
   2022 
   2023 13.  Security Considerations
   2024 
   2025 13.1.  Data Plane
   2026 
   2027    By security in the "data plane", we mean protection against the
   2028    following possibilities:
   2029 
   2030      - Packets from within a VPN travel to a site outside the VPN, other
   2031        than in a manner consistent with the policies of the VPN.
   2032 
   2033      - Packets from outside a VPN enter one of the VPN's sites, other
   2034        than in a manner consistent with the policies of the VPN.
   2035 
   2036    Under the following conditions:
   2037 
   2038       1. a backbone router does not accept labeled packets over a
   2039          particular data link, unless it is known that that data link
   2040          attaches only to trusted systems, or unless it is known that
   2041          such packets will leave the backbone before the IP header or
   2042          any labels lower in the stack will be inspected, and
   2043 
   2044       2. labeled VPN-IPv4 routes are not accepted from untrusted or
   2045          unreliable routing peers,
   2046 
   2047       3. no successful attacks have been mounted on the control plane,
   2048 
   2049    the data plane security provided by this architecture is virtually
   2050    identical to that provided to VPNs by Frame Relay or ATM backbones.
   2051    If the devices under the control of the SP are properly configured,
   2052    data will not enter or leave a VPN unless authorized to do so.
   2053 
   2054    Condition 1 above can be stated more precisely.  One should discard a
   2055    labeled packet received from a particular neighbor unless one of the
   2056    following two conditions holds:
   2057 
   2058      - the packet's top label has a label value that the receiving
   2059        system has distributed to that neighbor, or
   2060 
   2061      - the packet's top label has a label value that the receiving
   2062        system has distributed to a system beyond that neighbor (i.e.,
   2063        when it is known that the path from the system to which the label
   2064        was distributed to the receiving system may be via that
   2065        neighbor).
   2066 
   2067 
   2068 
   2069 
   2070 
   2071 
   2072 
   2073 
   2074 Rosen & Rekhter             Standards Track                    [Page 37]
   2075 
   2076 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2077 
   2078 
   2079    Condition 2 above is of most interest in the case of inter-provider
   2080    VPNs (see Section 10).  For inter-provider VPNs constructed according
   2081    to scheme b) of Section 10, condition 2 is easily checked.  (The
   2082    issue of security when scheme (c) of Section 10 is used is for
   2083    further study.)
   2084 
   2085    It is worth noting that the use of MPLS makes it much simpler to
   2086    provide data plane security than might be possible if one attempted
   2087    to use some form of IP tunneling in place of the MPLS outer label.
   2088    It is a simple matter to have one's border routers refuse to accept a
   2089    labeled packet unless the first of the above conditions applies to
   2090    it.  It is rather more difficult to configure a router to refuse to
   2091    accept an IP packet if that packet is an IP tunneled packet whose
   2092    destination address is that of a PE router; certainly, this is not
   2093    impossible to do, but it has both management and performance
   2094    implications.
   2095 
   2096    MPLS-in-IP and MPLS-in-GRE tunneling are specified in
   2097    [MPLS-in-IP-GRE].  If it is desired to use such tunnels to carry VPN
   2098    packets, then the security considerations described in Section 8 of
   2099    that document must be fully understood.  Any implementation of
   2100    BGP/MPLS IP VPNs that allows VPN packets to be tunneled as described
   2101    in that document MUST contain an implementation of IPsec that can be
   2102    used as therein described.  If the tunnel is not secured by IPsec,
   2103    then the technique of IP address filtering at the border routers,
   2104    described in Section 8.2 of that document, is the only means of
   2105    ensuring that a packet that exits the tunnel at a particular egress
   2106    PE was actually placed in the tunnel by the proper tunnel head node
   2107    (i.e., that the packet does not have a spoofed source address).
   2108    Since border routers frequently filter only source addresses, packet
   2109    filtering may not be effective unless the egress PE can check the IP
   2110    source address of any tunneled packet it receives, and compare it to
   2111    a list of IP addresses that are valid tunnel head addresses.  Any
   2112    implementation that allows MPLS-in-IP and/or MPLS-in-GRE tunneling to
   2113    be used without IPsec MUST allow the egress PE to validate in this
   2114    manner the IP source address of any tunneled packet that it receives.
   2115 
   2116    In the case where a number of CE routers attach to a PE router via a
   2117    LAN interface, to ensure proper security, one of the following
   2118    conditions must hold:
   2119 
   2120       1. All the CE routers on the LAN belong to the same VPN, or
   2121 
   2122       2. A trusted and secured LAN switch divides the LAN into multiple
   2123          VLANs, with each VLAN containing only systems of a single VPN;
   2124          in this case, the switch will attach the appropriate VLAN tag
   2125          to any packet before forwarding it to the PE router.
   2126 
   2127 
   2128 
   2129 
   2130 Rosen & Rekhter             Standards Track                    [Page 38]
   2131 
   2132 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2133 
   2134 
   2135    Cryptographic privacy is not provided by this architecture, nor by
   2136    Frame Relay or ATM VPNs.  These architectures are all compatible with
   2137    the use of cryptography on a CE-CE basis, if that is desired.
   2138 
   2139    The use of cryptography on a PE-PE basis is for further study.
   2140 
   2141 13.2.  Control Plane
   2142 
   2143    The data plane security of the previous section depends on the
   2144    security of the control plane.  To ensure security, neither BGP nor
   2145    LDP connections should be made with untrusted peers.  The TCP/IP MD5
   2146    authentication option [TCP-MD5] should be used with both these
   2147    protocols.  The routing protocol within the SP's network should also
   2148    be secured in a similar manner.
   2149 
   2150 13.3.  Security of P and PE Devices
   2151 
   2152    If the physical security of these devices is compromised, data plane
   2153    security may also be compromised.
   2154 
   2155    The usual steps should be taken to ensure that IP traffic from the
   2156    public Internet cannot be used to modify the configuration of these
   2157    devices, or to mount Denial of Service attacks on them.
   2158 
   2159 14.  Quality of Service
   2160 
   2161    Although not the focus of this paper, Quality of Service is a key
   2162    component of any VPN service.  In MPLS/BGP VPNs, existing L3 QoS
   2163    capabilities can be applied to labeled packets through the use of the
   2164    "experimental" bits in the shim header [MPLS-ENCAPS], or, where ATM
   2165    is used as the backbone, through the use of ATM QoS capabilities.
   2166    The traffic engineering work discussed in [MPLS-RSVP] is also
   2167    directly applicable to MPLS/BGP VPNs.  Traffic engineering could even
   2168    be used to establish label switched paths with particular QoS
   2169    characteristics between particular pairs of sites, if that is
   2170    desirable.  Where an MPLS/BGP VPN spans multiple SPs, the
   2171    architecture described in [PASTE] may be useful.  An SP may apply
   2172    either intserv (Integrated Services) or diffserv (Differentiated
   2173    Services) capabilities to a particular VPN, as appropriate.
   2174 
   2175 
   2176 
   2177 
   2178 
   2179 
   2180 
   2181 
   2182 
   2183 
   2184 
   2185 
   2186 Rosen & Rekhter             Standards Track                    [Page 39]
   2187 
   2188 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2189 
   2190 
   2191 15.  Scalability
   2192 
   2193    We have discussed scalability issues throughout this paper.  In this
   2194    section, we briefly summarize the main characteristics of our model
   2195    with respect to scalability.
   2196 
   2197    The Service Provider backbone network consists of (a) PE routers, (b)
   2198    BGP Route Reflectors, (c) P routers (that are neither PE routers nor
   2199    Route Reflectors), and, in the case of multi-provider VPNs, (d)
   2200    ASBRs.
   2201 
   2202    P routers do not maintain any VPN routes.  In order to properly
   2203    forward VPN traffic, the P routers need only maintain routes to the
   2204    PE routers and the ASBRs.  The use of two levels of labeling is what
   2205    makes it possible to keep the VPN routes out of the P routers.
   2206 
   2207    A PE router maintains VPN routes, but only for those VPNs to which it
   2208    is directly attached.
   2209 
   2210    Route reflectors can be partitioned among VPNs so that each partition
   2211    carries routes for only a subset of the VPNs supported by the Service
   2212    Provider.  Thus, no single route reflector is required to maintain
   2213    routes for all VPNs.
   2214 
   2215    For inter-provider VPNs, if the ASBRs maintain and distribute VPN-
   2216    IPv4 routes, then the ASBRs can be partitioned among VPNs in a
   2217    similar manner, with the result that no single ASBR is required to
   2218    maintain routes for all the inter-provider VPNs.  If multi-hop EBGP
   2219    is used, then the ASBRs need not maintain and distribute VPN-IPv4
   2220    routes at all.
   2221 
   2222    As a result, no single component within the Service Provider network
   2223    has to maintain all the routes for all the VPNs.  So the total
   2224    capacity of the network to support increasing numbers of VPNs is not
   2225    limited by the capacity of any individual component.
   2226 
   2227 16.  IANA Considerations
   2228 
   2229    The Internet Assigned Numbers Authority (IANA) has created a new
   2230    registry for the "Route Distinguisher Type Field" (see Section 4.2).
   2231    This is a two-byte field.  Types 0, 1, and 2 are defined by this
   2232    document.  Additional Route Distinguisher Type Field values with a
   2233    high-order bit of 0 may be allocated by IANA on a "First Come, First
   2234    Served" basis [IANA].  Values with a high-order bit of 1 may be
   2235    allocated by IANA based on "IETF consensus" [IANA].
   2236 
   2237 
   2238 
   2239 
   2240 
   2241 
   2242 Rosen & Rekhter             Standards Track                    [Page 40]
   2243 
   2244 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2245 
   2246 
   2247    This document specifies (see Section 4.3.4) the use of the BGP
   2248    Address Family Identifier (AFI) value 1, along with the BGP
   2249    Subsequent Address Family Identifier (SAFI) value 128, to represent
   2250    the address family "VPN-IPv4 Labeled Addresses", which is defined in
   2251    this document.
   2252 
   2253    The use of AFI value 1 for IP is as currently specified in the IANA
   2254    registry "Address Family Identifier", so IANA need take no action
   2255    with respect to it.
   2256 
   2257    The SAFI value 128 was originally specified as "Private Use" in the
   2258    IANA "Subsequent Address Family Identifier" registry.  IANA has
   2259    changed the SAFI value 128 from "private use" to "MPLS-labeled VPN
   2260    address".
   2261 
   2262 17. Acknowledgements
   2263 
   2264    The full list of contributors can be found in Section 18.
   2265 
   2266    Significant contributions to this work have also been made by Ravi
   2267    Chandra, Dan Tappan, and Bob Thomas.
   2268 
   2269    We also wish to thank Shantam Biswas for his review and
   2270    contributions.
   2271 
   2272 18.  Contributors
   2273 
   2274    Tony Bogovic
   2275    Telcordia Technologies
   2276    445 South Street, Room 1A264B
   2277    Morristown, NJ 07960
   2278 
   2279    EMail: tjb@research.telcordia.com
   2280 
   2281 
   2282    Stephen John Brannon
   2283    Swisscom AG
   2284    Postfach 1570
   2285    CH-8301
   2286    Glattzentrum (Zuerich), Switzerland
   2287 
   2288    EMail: stephen.brannon@swisscom.com
   2289 
   2290 
   2291 
   2292 
   2293 
   2294 
   2295 
   2296 
   2297 
   2298 Rosen & Rekhter             Standards Track                    [Page 41]
   2299 
   2300 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2301 
   2302 
   2303    Marco Carugi
   2304    Nortel Networks S.A.
   2305    Parc d'activites de Magny-Les Jeunes Bois  CHATEAUFORT
   2306    78928 YVELINES Cedex 9 - FRANCE
   2307 
   2308    EMail: marco.carugi@nortelnetworks.com
   2309 
   2310 
   2311    Christopher J. Chase
   2312    AT&T
   2313    200 Laurel Ave
   2314    Middletown, NJ 07748
   2315    USA
   2316 
   2317    EMail: chase@att.com
   2318 
   2319 
   2320    Ting Wo Chung
   2321    Bell Nexxia
   2322    181 Bay Street
   2323    Suite 350
   2324    Toronto, Ontario
   2325    M5J2T3
   2326 
   2327    EMail: ting_wo.chung@bellnexxia.com
   2328 
   2329 
   2330    Eric Dean
   2331 
   2332 
   2333    Jeremy De Clercq
   2334    Alcatel Network Strategy Group
   2335    Francis Wellesplein 1
   2336    2018 Antwerp, Belgium
   2337 
   2338    EMail: jeremy.de_clercq@alcatel.be
   2339 
   2340 
   2341    Luyuan Fang
   2342    AT&T
   2343    IP Backbone Architecture
   2344    200 Laurel Ave.
   2345    Middletown, NJ 07748
   2346 
   2347    EMail: luyuanfang@att.com
   2348 
   2349 
   2350 
   2351 
   2352 
   2353 
   2354 Rosen & Rekhter             Standards Track                    [Page 42]
   2355 
   2356 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2357 
   2358 
   2359    Paul Hitchen
   2360    BT
   2361    BT Adastral Park
   2362    Martlesham Heath,
   2363    Ipswich IP5 3RE
   2364    UK
   2365 
   2366    EMail: paul.hitchen@bt.com
   2367 
   2368 
   2369    Manoj Leelanivas
   2370    Juniper Networks, Inc.
   2371    385 Ravendale Drive
   2372    Mountain View, CA 94043 USA
   2373 
   2374    EMail: manoj@juniper.net
   2375 
   2376 
   2377    Dave Marshall
   2378    Worldcom
   2379    901 International Parkway
   2380    Richardson, Texas 75081
   2381 
   2382    EMail: dave.marshall@wcom.com
   2383 
   2384 
   2385    Luca Martini
   2386    Cisco Systems, Inc.
   2387    9155 East Nichols Avenue, Suite 400
   2388    Englewood, CO, 80112
   2389 
   2390    EMail: lmartini@cisco.com
   2391 
   2392 
   2393    Monique Jeanne Morrow
   2394    Cisco Systems, Inc.
   2395    Glatt-com, 2nd floor
   2396    CH-8301
   2397    Glattzentrum, Switzerland
   2398 
   2399    EMail: mmorrow@cisco.com
   2400 
   2401 
   2402 
   2403 
   2404 
   2405 
   2406 
   2407 
   2408 
   2409 
   2410 Rosen & Rekhter             Standards Track                    [Page 43]
   2411 
   2412 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2413 
   2414 
   2415    Ravichander Vaidyanathan
   2416    Telcordia Technologies
   2417    445 South Street, Room 1C258B
   2418    Morristown, NJ 07960
   2419 
   2420    EMail: vravi@research.telcordia.com
   2421 
   2422 
   2423    Adrian Smith
   2424    BT
   2425    BT Adastral Park
   2426    Martlesham Heath,
   2427    Ipswich IP5 3RE
   2428    UK
   2429 
   2430    EMail: adrian.ca.smith@bt.com
   2431 
   2432 
   2433    Vijay Srinivasan
   2434    1200 Bridge Parkway
   2435    Redwood City, CA 94065
   2436 
   2437    EMail: vsriniva@cosinecom.com
   2438 
   2439 
   2440    Alain Vedrenne
   2441    Equant
   2442    Heraklion, 1041 route des Dolines, BP347
   2443    06906 Sophia Antipolis, Cedex, France
   2444 
   2445    EMail: Alain.Vedrenne@equant.com
   2446 
   2447 19.  Normative References
   2448 
   2449    [BGP]             Rekhter, Y. and T. Li, "A Border Gateway Protocol 4
   2450                      (BGP-4)", RFC 4271, January 2006.
   2451 
   2452    [BGP-MP]          Bates, T., Rekhter, Y., Chandra, R., and D. Katz,
   2453                      "Multiprotocol Extensions for BGP-4", RFC 2858,
   2454                      June 2000.
   2455 
   2456    [BGP-EXTCOMM]     Sangli, S., Tappan, D., and Y. Rekhter, "BGP
   2457                      Extended Communities Attribute", RFC 4360, February
   2458                      2006.
   2459 
   2460    [MPLS-ARCH]       Rosen, E., Viswanathan, A., and R. Callon,
   2461                      "Multiprotocol Label Switching Architecture", RFC
   2462                      3031, January 2001.
   2463 
   2464 
   2465 
   2466 Rosen & Rekhter             Standards Track                    [Page 44]
   2467 
   2468 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2469 
   2470 
   2471    [MPLS-BGP]        Rekhter, Y. and E. Rosen, "Carrying Label
   2472                      Information in BGP-4", RFC 3107, May 2001.
   2473 
   2474    [MPLS-ENCAPS]     Rosen, E., Tappan, D., Fedorkow, G., Rekhter, Y.,
   2475                      Farinacci, D., Li, T., and A. Conta, "MPLS Label
   2476                      Stack Encoding", RFC 3032, January 2001.
   2477 
   2478 20.  Informative References
   2479 
   2480    [BGP-AS4]         Vohra, Q. and E. Chen, "BGP Support for Four-Octet
   2481                      AS Number Space", Work in Progress, March 2004.
   2482 
   2483    [BGP-ORF]         Chen, E. and Y. Rekhter, "Cooperative Route
   2484                      Filtering Capability for BGP-4", Work in Progress,
   2485                      March 2004.
   2486 
   2487    [BGP-RFSH]        Chen, E., "Route Refresh Capability for BGP-4", RFC
   2488                      2918, September 2000.
   2489 
   2490    [BGP-RR]          Bates, T., Chandra, R., and E. Chen, "BGP Route
   2491                      Reflection - An Alternative to Full Mesh IBGP", RFC
   2492                      2796, April 2000.
   2493 
   2494    [IANA]            Narten, T. and H. Alvestrand, "Guidelines for
   2495                      Writing an IANA Considerations Section in RFCs",
   2496                      BCP 26, RFC 2434, October 1998.
   2497 
   2498    [MPLS-ATM]        Davie, B., Lawrence, J., McCloghrie, K., Rosen, E.,
   2499                      Swallow, G., Rekhter, Y., and P. Doolan, "MPLS
   2500                      using LDP and ATM VC Switching", RFC 3035, January
   2501                      2001.
   2502 
   2503    [MPLS/BGP-IPsec]  Rosen, E., De Clercq, J., Paridaens, O., T'Joens,
   2504                      Y., and C. Sargor, "Architecture for the Use of
   2505                      PE-PE IPsec Tunnels in BGP/MPLS IP VPNs", Work in
   2506                      Progress, March 2004.
   2507 
   2508    [MPLS-FR]         Conta, A., Doolan, P., and A. Malis, "Use of Label
   2509                      Switching on Frame Relay Networks Specification",
   2510                      RFC 3034, January 2001.
   2511 
   2512    [MPLS-in-IP-GRE]  Worster, T., Rekhter, Y., and E. Rosen,
   2513                      "Encapsulating MPLS in IP or Generic Routing
   2514                      Encapsulation (GRE)", RFC 4023, March 2005.
   2515 
   2516    [MPLS-LDP]        Andersson, L., Doolan, P., Feldman, N., Fredette,
   2517                      A., and B. Thomas, "LDP Specification", RFC 3036,
   2518                      January 2001.
   2519 
   2520 
   2521 
   2522 Rosen & Rekhter             Standards Track                    [Page 45]
   2523 
   2524 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2525 
   2526 
   2527    [MPLS-RSVP]       Awduche, D., Berger, L., Gan, D., Li, T.,
   2528                      Srinivasan, V., and G. Swallow, "RSVP-TE:
   2529                      Extensions to RSVP for LSP Tunnels", RFC 3209,
   2530                      December 2001.
   2531 
   2532    [OSPFv2]          Moy, J., "OSPF Version 2", STD 54, RFC 2328, April
   2533                      1998.
   2534 
   2535    [PASTE]           Li, T. and Y. Rekhter, "A Provider Architecture for
   2536                      Differentiated Services and Traffic Engineering
   2537                      (PASTE)", RFC 2430, October 1998.
   2538 
   2539    [RIP]             Malkin, G., "RIP Version 2", STD 56, RFC 2453,
   2540                      November 1998.
   2541 
   2542    [OSPF-2547-DNBIT] Rosen, E., Psenak, P., and P. Pillay-Esnault,
   2543                      "Using an LSA Options Bit to Prevent Looping in
   2544                      BGP/MPLS IP VPNs", Work in Progress, March 2004.
   2545 
   2546    [TCP-MD5]         Heffernan, A., "Protection of BGP Sessions via the
   2547                      TCP MD5 Signature Option", RFC 2385, August 1998.
   2548 
   2549    [VPN-MCAST]       Rosen, E., Cai, Y., and J. Wijsnands, "Multicast in
   2550                      MPLS/BGP VPNs", Work in Progress, May 2004.
   2551 
   2552    [VPN-OSPF]        Rosen, E., Psenak, P., and P. Pillay-Esnault, "OSPF
   2553                      as the PE/CE Protocol in BGP/MPLS VPNs", Work in
   2554                      Progress, February 2004.
   2555 
   2556 Authors' Addresses
   2557 
   2558    Eric C. Rosen
   2559    Cisco Systems, Inc.
   2560    1414 Massachusetts Avenue
   2561    Boxborough, MA 01719
   2562 
   2563    EMail: erosen@cisco.com
   2564 
   2565 
   2566    Yakov Rekhter
   2567    Juniper Networks
   2568    1194 N. Mathilda Avenue
   2569    Sunnyvale, CA 94089
   2570 
   2571    EMail: yakov@juniper.net
   2572 
   2573 
   2574 
   2575 
   2576 
   2577 
   2578 Rosen & Rekhter             Standards Track                    [Page 46]
   2579 
   2580 RFC 4364                    BGP/MPLS IP VPNs               February 2006
   2581 
   2582 
   2583 Full Copyright Statement
   2584 
   2585    Copyright (C) The Internet Society (2006).
   2586 
   2587    This document is subject to the rights, licenses and restrictions
   2588    contained in BCP 78, and except as set forth therein, the authors
   2589    retain all their rights.
   2590 
   2591    This document and the information contained herein are provided on an
   2592    "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   2593    OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   2594    ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   2595    INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   2596    INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   2597    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
   2598 
   2599 Intellectual Property
   2600 
   2601    The IETF takes no position regarding the validity or scope of any
   2602    Intellectual Property Rights or other rights that might be claimed to
   2603    pertain to the implementation or use of the technology described in
   2604    this document or the extent to which any license under such rights
   2605    might or might not be available; nor does it represent that it has
   2606    made any independent effort to identify any such rights.  Information
   2607    on the procedures with respect to rights in RFC documents can be
   2608    found in BCP 78 and BCP 79.
   2609 
   2610    Copies of IPR disclosures made to the IETF Secretariat and any
   2611    assurances of licenses to be made available, or the result of an
   2612    attempt made to obtain a general license or permission for the use of
   2613    such proprietary rights by implementers or users of this
   2614    specification can be obtained from the IETF on-line IPR repository at
   2615    http://www.ietf.org/ipr.
   2616 
   2617    The IETF invites any interested party to bring to its attention any
   2618    copyrights, patents or patent applications, or other proprietary
   2619    rights that may cover technology that may be required to implement
   2620    this standard.  Please address the information to the IETF at
   2621    ietf-ipr@ietf.org.
   2622 
   2623 Acknowledgement
   2624 
   2625    Funding for the RFC Editor function is provided by the IETF
   2626    Administrative Support Activity (IASA).
   2627 
   2628 
   2629 
   2630 
   2631 
   2632 
   2633 
   2634 Rosen & Rekhter             Standards Track                    [Page 47]
   2635