<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc comments="yes"?>
<?rfc compact="yes"?>
<?rfc inline="yes"?>
<?rfc sortrefs="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc tocompact="yes"?>
<rfc category="std" docName="draft-bowers-spring-advertising-lsps-with-sr-01" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en">
  <front>
    <title abbrev="Advertising LSPs with Segment Routing ">
    Advertising LSPs with Segment Routing
    </title>

    <author fullname="Chris Bowers" initials="C." surname="Bowers">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>1194 N. Mathilda Ave.</street>
          <city>Sunnyvale</city>
          <region>CA</region>
          <code>94089</code>
          <country>US</country>
        </postal>
        <email>cbowers@juniper.net</email>
      </address>
    </author>

    <author fullname="Hannes Gredler" initials="H." surname="Gredler">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>1194 N. Mathilda Ave.</street>
          <city>Sunnyvale</city>
          <region>CA</region>
          <code>94089</code>
          <country>US</country>
        </postal>
        <email>hannes@juniper.net</email>
      </address>
    </author>
    
    <author fullname="Uma Chunduri" initials="U." surname="Chunduri">
      <organization>Ericsson Inc.</organization>
      <address>
        <postal>
          <street>300 Holger Way</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95134</code>
          <country>US</country>
        </postal>
        <email>uma.chunduri@ericsson.com</email>
      </address>
    </author>

    <date day="9" month="March" year="2015"/>

    <area>Routing</area>

    <workgroup>SPRING Working Group</workgroup>

    <abstract>
      <t>Segment routing uses globally-known labels to accomplish 
      forwarding along shortest paths, and label stacks to accomplish explicit routing
      along arbitrary paths.  These labels are advertised using an IGP. 
      This draft describes how label bindings corresponding
      to RSVP, LDP, BGP labeled-unicast, and static LSPs are advertised in
      segment routing and how these labels can be combined 
      with other segment routing labels to create
      forwarding paths.  This draft also describes how context labels for
      egress node protection are advertised in using segment routing IGP
      extensions.
      </t>
    </abstract>

    </front>

  <middle>
    <section title="Introduction">

      <t>  <xref target="I-D.ietf-spring-segment-routing"/> describes 
      the segment routing architecture.  In segment routing, LDP-like
      forwarding behavior along shortest paths is achieved
      using globally-known node labels.  Globally-known node labels can
      be distributed in one of two ways.  Each router can directly
      advertise a globally unique node label in the IGP.  Or
      each router can advertise a globally unique node index value as well a locally
      assigned label block, allowing any router in the IGP area to determine the 
      mapping of locally-assigned label to globally unique node index for any other
      router in the area.
      </t>
      
      <t>  In order to forward traffic along strict explicit paths, segment routing
      uses stacks of local adjacency labels.  Each router uses the IGP 
      to advertise locally significant
      adjacency labels corresponding to each of the router's outgoing interfaces.  
      This allows any router in the IGP area to construct an arbitrary forwarding
      path by imposing a stack of adjacency labels on a packet.  Forwarding is 
      accomplished at each router by reading the top label on the stack to determine
      next-hop interface (based on its adjacency label to interface mapping), popping that top label,
      and forwarding the packet out the next-hop interface.
      </t>
      
      <t>  The above is only a short description of the use of node and adjacency labels in segment
      routing.  See <xref target="I-D.ietf-spring-segment-routing"/>
      for more detail on node and adjacency label semantics as well as 
      combining node and adjacency labels in a label stack.  
      </t>
      
      <t> In addition to node and adjacency label advertisements, which advertise label 
      bindings corresponding to nodes and interfaces, it is 
      useful to advertise more abstract label bindings in the IGP, using a Binding advertisement.
      This draft describes how label bindings corresponding
      to RSVP, LDP, BGP labeled-unicast, and static LSPs are advertised in
      segment routing and how these labels can be combined 
      with other segment routing labels to create
      forwarding paths.  This draft also describes how context labels for
      egress node protection are advertised using a Binding advertisement.
      </t>
            
    </section>
    
    <section title="Segment routing label binding advertisements">
   
      <t> An LSP and its associated label is advertised in the IGP using the 
      Binding advertisement extensions defined in 
      <xref target="I-D.ietf-isis-segment-routing-extensions"/>
      and <xref target="I-D.ietf-ospf-segment-routing-extensions"/>. 
      The router which is the ingress for the LSP advertises the label as well as 
      the Forwarding Equivalency Class(FEC) associated with the LSP.   
      The advertisement may include other information that describes the LSP.
      An Explicit Route Object(ERO) may be included to describe the path taken
      by the LSP.  An ERO metric value may be included to indicate the  
      cumulative IGP or TE metric associated with the LSP along the path described
      by the ERO.  
      </t>
      
<figure anchor="fig_example_basic" title="Example network" align="center">
<artwork align="center"><![CDATA[      
    +-----+      +-----+      +-----+
    |     |      |     |      |     |  
R1--|     |--R4--|     |--R7--|     |--R10
    |     |      |     |      |     |
    +-----+      +-----+      +-----+
]]></artwork>
</figure>
      
      <t> Consider the network shown in <xref target="fig_example_basic"/>.
      A router R4 advertising a label L1 and a FEC F using a Binding advertisement
      to advertise an LSP
      is indicating the following forwarding behavior.
      (See <xref target="I-D.ietf-spring-segment-routing"/> for a description of the segment
      routing label operation and forwarding terminology.)
      Assume that a particular packet P arrives at R4 with a segment list/label stack whose incoming active
      segment is label L1.  
      R4 performs a NEXT operation on the segment list 
      (equivalent to a label POP operation).  Assume that this results 
      in a label stack of depth m-1, with the m-1 label being the new active segment
      with respect to segment routing forwarding actions.
      R4 forwards P to the router associated with FEC F (call it R7) by means of a 
      Label Switched Path.
      The precise set of MPLS label operations that get P from R4 to R7 is
      not specified.  However, the label operations MUST satisfy the properties of a "Label
      Switched Path of level m" described in <xref target="RFC3031"/> Section 3.15, where R4 plays the 
      role of LSP Ingress and R7 plays the role of LSP Egress.  In particular, if R4 
      (acting as the LSP Ingress) pushes 
      a level m label onto P's label stack, then the forwarding decision
      on each router between R4 and R7 cannot make use of label information below the level m
      label in the label stack. 
      </t>      
      
      <t>Instead, the forwarding decision at R7 (acting as the LSP Egress)
      does make use of label information (or packet header information) below the level m label.
      Note that the level m LSP from R4 to R7 is not exclusively reserved for carrying traffic that
      enters at R4 via the segment routing mechanism described above.
      In general, it will also carry labeled or unlabeled packets
      that enter the LSP via other mechanisms.  Also, the packets may have entered the LSP at a router
      other than R4 in the case of label merging.
      For example, in situations where R7 needs to make use of the value of the level m label
      for the processing of other traffic, 
      R7 may distribute a non-null label to the penultimate hop
      router in the level m LSP from R4 to R7.
      R7 needs to be able to properly and consistently process the packet P that originated at
      R4 via the segment routing mechanism described above, regardless of the details of how
      R7 is performing the LSP egress role for other traffic.  
      </t>
      
      <t> If m=1, then R7 should forward P based on the received packet header information.
      If m>1, then the m-1 label of P at R7 MUST correspond to a label distributed by R7.
      If the m-1 label corresponds to a segment routing label, then R7 MUST treat the m-1 label 
      as the incoming active segment and perform the corresponding incoming label operations and 
      forwarding action.  R7 MUST the perform any necessary additional label operations to ensure that the
      next SR-capable router that receives the packet can correctly determine the incoming active segment.
      For example, if R7 distributed a non-null or explicit null label to the penultimate hop router in the 
      level m LSP from R4 to R7, then R7 MUST POP that label before performing the segment routing
      label operation required by the incoming active segment, the m-1 label.
      </t>
      
      <t> Continuing with the example above, a segment routing capable router R1 uses the information
      describing the LSP contained in the Binding advertisement (FEC, ERO, metric, etc.)
      to determine if it wants to use that LSP as part of a longer forwarding path. If so, 
      R1 uses the label L1 advertised by R4 for the LSP in the construction of a label stack.  
      R1 can use any combination of segment routing labels stacked above L1 to define a path to reach R1.
      The only requirement is that label L1 be the incoming active segment when the packet reaches R4.  This will
      ensure that R4 forwards the packet to R7.  If R1 has determined that 
      R7 supports segment routing, then R1 can also include additional
      segment routing labels below L1 in the label stack to specify the forwarding path
      beyond R7.</t>
      
      <t> The description above assumes that R1 is responsible for computing the forwarding path and 
      the associated label stack.  However, the same forwarding behavior can be achieved if a
      centralized controller is used to compute the path and communicate the associated label 
      stack to R1 via PCEP with the appropriate segment routing extensions 
      (see <xref target="I-D.ietf-pce-segment-routing"/>).  The same is true of the 
      examples for specific label distribution protocols provided below.
      </t>
      
    </section>
    
    <section anchor="sec_conventions" title="Conventions used in the following examples">
      <t> To simplify the diagrams and descriptions of the examples
      in this draft, we assume that all routers
      advertise a router-id of the form 192.0.2.XX, where XX is the router number of the form RXX.
      For example, in <xref target="fig_example_rsvp"/> R16 advertises router-id=192.0.2.16 as a loopback address.
      </t>
      
      <t> Unless otherwise stated, links between routers all have the same IGP metric of 10.
      </t>
      
      <t> The node-SID index value for a router 
      with name RXX will be XX.  For example, R23 in <xref target="fig_example_rsvp"/> 
      has an index value of 23.  We assume that all routers are advertising the same 
      SR Global Block of 1000-1099.  For example, for R11 <xref target="fig_example_rsvp"/> 
      to send a packet to R23 on the shortest path, R11 sends the packet to R13 with
      the top label equal to 1023.
      </t>
 
    </section>
    
    <section title="Advertising an RSVP-TE LSP">
    
      <figure anchor="fig_example_rsvp" title="Example network with segment routing and RSVP" align="center">
<artwork align="center"><![CDATA[
                  +-R35-+ 
                 /       \
R11-------R13--R14--R15--R16--R17--R18
 |         |    |    |    |    |    |
R21--R22--R23--R24--R25--R26--R27--R28
                                      
|<--- SR --->|          |<--- SR --->|
         |<------RSVP------>|             
]]></artwork>
</figure>

      <t> <xref target="fig_example_rsvp"/> shows a network that uses both segment routing and RSVP.
      Segment routing is enabled on R11, R13, R21, R22, R23, R16, R17, R18, R26, R27, and R28.
      RSVP is enabled on R13, R14, R15, R16, R23, R24, R25, R26, and R35.  Note that both segment routing
      and RSVP are enabled on R13, R23, R16, and R26.  R23 uses RSVP to signal an LSP from R23 to R16,
      following the path R23-&gt;R24-&gt;R25-&gt;R26-&gt;R16.  R23 uses a Binding 
      advertisement to advertise the following values:
      <list style="symbols">
        <t>label value = 2099</t>
        <t>FEC = 192.0.2.16/32 </t>
        <t>ERO = (192.0.2.24[strict], 192.0.2.25[strict], 192.0.2.26[strict], 192.0.2.16[strict])</t>
      </list>  
      </t>

      <t> R11 receives the Binding advertisement and decides (based on some policy) to 
      forward traffic from R11 to R18 along a path that consists of the following partial paths:  
      <list style="symbols">
        <t>the shortest path from R11 to R23</t>
        <t>the path from R23 to R16 following the explicit path R23-&gt;R24-&gt;R25-&gt;R26-&gt;R16</t>
        <t>the shortest path from R16 to R18</t>
      </list>
      In order to accomplish this, R11 sends packets to R13 with the 
      label stack = &lt;1023,2099,1018&gt;. Label 1023 corresponds to the node-SID label for
      R23, and thus results in forwarding along the shortest path from R11 to R23.
      The packets will arrive at R23 with label stack = &lt;2099,1018&gt;.  
      The top label value of 2099 at R23 will result in forwarding of packets  
      along the path R23-&gt;R24-&gt;R25-&gt;R26-&gt;R16 using the label SWAP 
      operations signalled by RSVP for this LSP.  With penultimate hop popping, the packets 
      will arrive at R16 with label stack = &lt;1018&gt;.  Label 1018 corresponds
      to the node-SID label for R18, and thus results in forwarding along 
      the shortest path from R16 to R18.
      </t>
      
    <t> 
    R11 may use the information about the primary path in this Binding advertisement to 
    decide whether or not to construct SR label stacks that use this RSVP LSP.  
    For example,  R11 may have a requirement to avoid forwarding traffic over primary paths that include R35.  
    The ERO advertised in this Binding advertisement satisfies this requirement.
    </t>

      <t>Note that the scenario described in this example is very similar to 
      the commonly deployed LDP-over-RSVP architecture, with shortest path routing
      with LDP at the edges and explicit routing with RSVP in the core. However,
      it is difficult to achieve fine-grained forwarding behavior described in this example
      using LDP-over-RSVP.  In an LDP-over-RSVP network, the only way to influence 
      which LDP/edge traffic gets tunnelled over which RSVP LSPs is to advertise the RSVP LSPs as
      forwarding adjacencies (FAs) and tune the IGP metrics of the FAs.  It may be difficult
      or impossible to achieve the desired mapping of LDP/edge traffic over RSVP LSPs by 
      tuning the metrics of FAs.      
      </t>
      
      <t>Instead, with the SR-and-RSVP architecture described above,
      it is possible to achieve an arbitrary 
      mapping of edge traffic to core RSVP LSPs using a maximum label stack depth of 3,
      assuming shortest path forwarding between edge and core nodes via node-SIDs. 
      </t>
      
      <t>One could also build label stacks using adjacency labels advertised by SR-capable
        routers in the edge networks in order to forward traffic along non-shortest paths
        in the edge networks.  More explicit control of forwarding paths in the edge networks 
        would come at the expense of deeper label stacks.
      </t>
      
      
    <section title="Advertising a backup ERO">
    <t> Continuing with the example of
    <xref target="fig_example_rsvp"/>, it may also be desirable for R23 to provide information
    about backup paths that may be used in the event of a failure 
    affecting the primary path.  For example, assume that R23 has signalled a primary LSP along the path 
    R23-&gt;R24-&gt;R25-&gt;R26-&gt;R16 and a backup LSP along the path 
    R23-&gt;R13-&gt;R14-&gt;R35-&gt;R16.   R23 uses a Binding 
      advertisement to advertise the following values:
      <list style="symbols">
        <t>label value = 2099</t>
        <t>FEC = 192.0.2.16/32 </t>
        <t>ERO = (192.0.2.24[strict], 192.0.2.25[strict], 192.0.2.26[strict], 192.0.2.16[strict])</t>
        <t>backup ERO = (192.0.2.13[strict], 192.0.2.14[strict], 192.0.2.35[strict], 192.0.2.16[strict])</t>
      </list>
    </t>
    <t> 
    R11 may use the information about the backup path in this Binding advertisement to decide whether or not to construct SR label stacks that use this RSVP LSP.  For example,  R11 may have a requirement to avoid forwarding traffic over primary or backup paths that include R35. 
    </t>
    
    </section>
    
    </section>
    


    <section title="Advertising an LDP LSP">

      <figure anchor="fig_example_ldp" title="Example network with segment routing and LDP" align="center">
<artwork align="center"><![CDATA[
R31--R32--R33--R34--R35--R36
                            
|<------ SR ----->|         
              |<--- LDP --->|
       
]]></artwork>
</figure>

      <t> <xref target="fig_example_ldp"/> shows a network that uses both segment routing and LDP.
      Segment routing is enabled on R31-34,  while LDP is 
      enabled on R34-36. Note that both segment routing
      and LDP are enabled on R34.  Also note that LDP is NOT enabled on R31, R32 and R33.
      R34 has received a label mapping for FEC=192.0.2.36/32  
      from R35 using LDP, corresponding to an LDP LSP from R34 to R36 along the shortest path.
      R34 uses a Binding 
      advertisement to advertise the following values:
      <list style="symbols">
        <t>label value = 2088</t>
        <t>FEC = 192.0.2.36/32 </t>
      </list>  
      </t>
      
      <t> After receiving this Binding advertisement, R31 can forward traffic to R36 by sending
      packets to next-hop R32 with label stack = &lt;1034,2088&gt;.  The packets will arrive at
      R34 with label stack = &lt;2088&gt;. The top label value of 2088 at R34 will 
      result in forwarding of packets along the shortest path to R36 using the label SWAP 
      operations for FEC = 192.0.2.36/32 signalled by LDP. 
      </t>

      <t> Now we look at what is needed to forward labeled traffic from R36 in the 
      LDP-only domain to R31 in the SR-only domain. R34 can get a packet to R31 using R31's node-SID label (1031).
      In order for R34 to apply label=1031 to packets in FEC 192.0.2.31, packets need to arrive at R34 with a label 
      corresponding to FEC 192.0.2.31.  Therefore R34 should not use penultimate hop popping when 
      it distributes a label to the LDP-only domain.
      </t>
      
      <t> The routers in the LDP-only domain (R34, R35, and R36) advertise
      label mappings for FEC 192.0.2.31/32 using LDP.  This corresponds to normal 
      LDP behavior based on <xref target="RFC5036"/> since
      R34, R35, and R36 each has an entry in its routing table 
      for 192.0.2.31/32, and in the absence of segment routing,
      R34 is an egress LSR with respect to FEC 192.0.2.31/32.   This will allow 
      packets to travel from R36 to R34 using LDP labels. 

      Via LDP, R34 advertises the
      label value 3154 for FEC 192.0.2.31/32 (instead of implicit or explicit null).  
      Packets from R36 arrive at R34 with label=3154.  R34 recognizes that label=3154 corresponds to 
      FEC 192.0.2.31/32, so it swaps the label with outgoing label=1031 (the node-SID for R31),
      and forwards the packet to next-hop R33.  The packet will ultimately be delivered to R31 over the 
      shortest path in the SR-only network using the node-SID.    
      </t>
      
      <t> Note that <xref target="I-D.filsfils-spring-segment-routing-ldp-interop"/> 
      describes a different method (utilizing a Segment Routing
      Mapping Server) to allow SR-enabled nodes to send traffic to 
      LDP nodes that do not support SR.  
      </t>
      
    </section>
    
    <section title="Advertising a BGP labeled-unicast LSP">
    
       <figure anchor="fig_example_bgp" title="Example network 
       with segment routing and BGP labeled unicast" align="center">
<artwork align="center"><![CDATA[
   region 1    |     region 2    |    region 3 

R71-------R72-----R81-------R82-----R91-------R92
 |         |       |         |       |         | 
R73--R74--R75-----R83--R84--R85-----R93--R94--R95

|<---- SR ---->|<----- LDP ----->|<---- LDP --->|

            ^     ^ ^       ^ ^     ^ ^       ^
             \___/   \_____/   \___/   \_____/ 
             BGP-LU   BGP-LU   BGP-LU   BGP-LU  

]]></artwork>
</figure>
      <t> <xref target="fig_example_bgp"/> shows a network that uses
      segment routing together with BGP labeled-unicast (BGP-LU) <xref target="RFC3107"/>.
      In this example, segment routing is enabled on R71-75 (region 1).
      LDP is enabled on R81-85 (region 2) and R91-95 (region 3).
      In addition, BGP-LU sessions
      exist between R75 and R83, R83 and R85, R85 and R93, and R93 and R95.
      Via LDP, R93 learns a label value of 3009 from R94
      corresponding to FEC 192.0.2.95/32.
      Via its BGP-LU session with R85, R93 advertises 
      a label value of 4021 corresponding to prefix 192.0.2.95/32,
      with a next-hop of 192.0.2.93.
      Via its BGP-LU session with R83, R85 advertises 
      a label value of 4031 corresponding to prefix 192.0.2.95/32,
      with a next-hop of 192.0.2.85.
      Via its BGP-LU session with R75, R83 advertises 
      a label value of 4041 corresponding to prefix 192.0.2.95/32,
      with a next-hop of 192.0.2.83.
      
      R75 uses a segment routing Binding 
      advertisement to advertise the following values:
      <list style="symbols">
        <t>label value = 2077</t>
        <t>FEC = 192.0.2.95/32 </t>
        <t>ERO = (192.0.2.83[strict])</t>
      </list>
      In this example, R75 has included an ERO list with a single element corresponding to
      the directly connected next-hop from R75 to R83.  Its inclusion
      by R75 is optional, but the information may be useful to routers
      that receive the Binding advertisement.  R75 could also optionally 
	  include a loose hop
	  for R93 in the ERO since it knows that information from the 
	  BGP Originator_ID attribute of the BGP-LU advertisement.
      </t>

      <t>R71 receives the Binding advertisement via the IGP.  In order to send 
      a labeled packet to R95, R71 needs to construct a label stack that
      causes the packet to arrive at R75 with top label=2077.  If R71 wants the
      packet to take the shortest path from R71 to R75, then it sends the packet
      to R72 with label stack = &lt;1075,2077&gt;.  (Label 1075 is the node-SID for R75
      based on the conventions in <xref target="sec_conventions"/>.)
      The packet arrives
      at R75 with label stack = &lt;2077&gt;.  R75 swaps label 2077 
      with label 4041 and forwards the packet to next-hop R83.
      R83 swaps label 4031 with label 4021, pushes the LDP label distributed by R84 
      for FEC=192.0.2.85, and forwards the packet to next-hop R84.  
      The packet arrives at R85 with label 4031 exposed, so R85 swaps 
      label 4031 with label 4021, and forwards the packet to next-hop R93.  
      Finally R93 swaps label 4021 with label 3009 and forwards the packet to next-hop
      R94, allowing the packet to be delivered to R95 via LDP label operations.
  
      </t>
      
      <t>If instead R71 wants the
      packet to take the path R71-&gt;R73-&gt;R74-&gt;R75, then it would send the packet 
      to R73 with two adjacency labels corresponding to the links between R73 and R74
      and between R74 and R75, followed by the label 2077.
      </t>
      
      <t>The above description accounts for sending labeled packets 
      from a source in a segment routing region to a destination 
      in another region using paths established by BGP-LU.  Since the example is
      not symmetric with respect to source and destination, for completeness, we illustrate how 
      traffic to send traffic from another region to a destination in a segment routing 
      region using LSPs established by BGP-LU, which in this example corresponds to
      sending a packet from R95 to R71.  
      </t>
      
      <t>
      R75 knows that it can send a packet to R71 
      by imposing a node-SID label of 1071.   Via its BGP-LU session with R83, R75 advertises 
      a label value of 4052 for prefix 192.0.2.71/32,
      with a next-hop of 192.0.2.75.  The string of BGP-LU sessions from R83 to 
      R85 to R93 to R95 advertise label bindings for prefix 192.0.2.71/32 such that R95 can send a packet to R93 with the appropriate BGP-LU label 
      that the packet will arrive at R75 with label 4052 exposed as the top label. When R75 receives this packet, it swaps label 4052 with label 1071
      and forwards the packet to next-hop R72, resulting in the packet being 
      delivered to R71.
      </t>

    </section>

        <section title="Advertising a static LSP ">

           <figure anchor="fig_example_static" title="Example network 
       using segment routing extensions to advertise a 
       static lsp" align="center">
<artwork align="center"><![CDATA[


                           +-R54-+ 
                          /       \  
                      +-R51  AS5  R53--+ 
                     /    \       /     \      
                    /      +-R52-+       R71---R74
   R41----R42----R43                      | AS7 |
    |             | \      +-R66-+       R72---R73
    |             |  \    /       \     /  
    |     AS4     |   +-R61       R65--+  
    |             |      |   AS6   |   
    |             |      |         |   
   R44----R45----R46----R62       R64
                          \       /  
                           +-R63-+ 

   |<---- SR ----->|
                 
   
]]></artwork>
</figure>
      <t> In <xref target="fig_example_static"/>, each grouping of
      routers (R41-46, R51-54, R61-66, and R71-74) represents 
      a different autonomous system (AS 4,5,6, and 7 respectively).
      Segment routing is enabled on R41-46.
      R43 has two
      interfaces that connect to routers outside of its AS.  
      One egress interface connects to R51 while another connects to R61.
      It is desirable for routers in AS4 to be able to send traffic 
      to R43 with a label stack that indicates the interface that 
      R43 should use to send the traffic.  This can be accomplished
      by having R43 advertise label bindings for one-hop static LSPs
      corresponding to each of its egress interfaces.  
      In order to advertise the egress interface connected to R51, 
      R43 uses a segment routing Binding 
      advertisement to advertise the following values:
      <list style="symbols">
        <t>label value = 2033</t>
        <t>FEC = 192.0.2.51/32 </t>
        <t>ERO = (192.0.2.51[strict])</t>
      </list>
      In order to advertise the egress interface connected to R61, 
      R43 uses a segment routing Binding 
      advertisement to advertise the following values:
      <list style="symbols">
        <t>label value = 2034</t>
        <t>FEC = 192.0.2.61/32 </t>
        <t>ERO = (192.0.2.61[strict])</t>
      </list>
      </t>
      
      <t>R41 receives the Binding advertisements via the IGP.  In order to send 
      a packet out R43's interface to R51, R41 constructs a packet with 
      label stack = &lt;1043,2033&gt; and sends it to R42.  
      (Label 1043 is the node-SID for R43
      based on the conventions in <xref target="sec_conventions"/>.)
      The packet arrives
      at R43 with label stack = &lt;2033&gt;.  R43 will POP label 2033
      and send the unlabeled packet out the interface to R51.
      Similarly in order to send 
      a packet out R43's interface to R56, R41 constructs a packet with 
      label stack = &lt;1043,2034&gt; and sends it to R42.  
      </t>

    </section>
    

    <section title="Advertising a context label for egress node protection ">

           <figure anchor="fig_example_context" title="Example network 
       using segment routing extensions to advertise a 
       context label for egress node protection" align="center">
<artwork align="center"><![CDATA[

             /- RR -\ 
            /        \
    PE3---P7----------P8---PE5
   /       |          |       \
CE1        |          |        CE2
   \       |          |       /
    PE4---P9---P10---P11---PE6 

   |<--------- LDP ---------->|
    
]]></artwork>
</figure>
      <t> <xref target="I-D.minto-2547-egress-node-fast-protection"/> describes 
      a mechanism to provide fast protection of RFC 2547/4364 based VPN traffic 
      against egress PE failure.  In the example 
      in <xref target="fig_example_context"/>, CE1 and CE2 
      are each dual-homed to two different PEs and belong to the VPN-A.   
      In the absence of a failure, traffic travels from CE1 to CE2 over the path
      CE1-&gt;PE3-&gt;P7-&gt;P8-&gt;PE5-&gt;CE2.  
      Using the mechanism described in 
      <xref target="I-D.minto-2547-egress-node-fast-protection"/>, 
      upon the failure of PE5, the point of local repair (P8) can use a loop-free alternate (LFA)
      to divert the traffic destined for protected PE (PE5)
      to a Protector function co-located with an alternate egress PE for CE2 (PE6).
      Before forwarding the traffic to PE6, P8 pushes a context label associated
      with PE5 (the protected PE).  This context label allows PE6 to 
      interpret the VPN label in the context of PE5 VPN label advertisements, since
      the VPN label on these packets was originally imposed by the ingress PE (PE3) based 
      on the assumption that they would be delivered to PE5.
      </t>
      
      <t>  We assume in this example that there is a single context-identifier corresponding
      to the protected PE (PE5) with a value of 203.0.113.5.   The prefix 203.0.113.5/32 is advertised
      in the IGP and in LDP by PE5.
      PE5 advertises VPN-IP prefixes via BGP with next-hop = 203.0.113.5.
      This causes VPN traffic from 
      PE3 to PE5 will take an LDP transport tunnel corresponding to FEC 203.0.113.5/32.
      </t>
      
      <t> 
      PE6 advertises a context label for          
      context-identifier 203.0.113.5 using a segment routing Binding 
      advertisement with the following values:
      <list style="symbols">
        <t>label value = 2066</t>
        <t>FEC = 203.0.113.5/32 </t>
        <t>Mirror context = TRUE</t>
      </list>
      </t>      
      
      <t>When P8 receives this Binding advertisement via the IGP,
      it creates a forwarding table entry for LDP traffic in FEC 203.0.113.5 that will be
      activated immediately when the link to PE5 fails.
      This behavior is triggered by setting Mirror context = TRUE
      in the advertisement.  This backup forwarding table entry uses
      a loop-free alternate (LFA) or remote LFA to send traffic to PE6 (using FEC 192.0.2.6
      which is the router-id of PE6) 
      along a path that avoids passing through PE5.  Importantly, the backup forwarding table
      entry pushes label 2066 into the packet before applying any labels associated with
      the repair path to PE6.</t>
      
      <t>When the link to PE5 fails and P8 activates the backup forwarding table entry
      for LDP traffic in FEC 203.0.113.5, that traffic will be diverted to PE6.  The packets
      will arrive at PE6 with top label = 2066, followed by the VPN label advertised by PE5.
      PE6 pops label 2066, and interprets the next
      label as a VPN label advertised by PE5.  
      PE6 has been listening in on PE5s BGP advertisements, 
      so it knows the mapping between a given VPN label advertised by PE5 and
      the actual VPN.
      </t>
      
    </section>
    
    <section anchor="IANA" title="IANA Considerations">
      <t>This document introduces no new IANA Considerations.
      </t>
    </section>
    
    <section title="Management Considerations">
      <t>TBD
      </t>
    </section>

    <section title="Security Considerations">
      <t> TBD
      </t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements" toc="default">
      <t>   The authors would like to thank Bruno Decraene and Nick Slabakov for their suggestions and review.
      </t>
    </section>

  </middle>

  <back>
  
    <references title="Normative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.3031.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5036.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.3107.xml"?>
    </references>
      
    <references title="Informative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-spring-segment-routing-01.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-filsfils-spring-segment-routing-ldp-interop-02.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-isis-segment-routing-extensions-03.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-ospf-segment-routing-extensions-04.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-pce-segment-routing-00.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-minto-2547-egress-node-fast-protection-03.xml"?>
    </references>
  </back>
</rfc>
