<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- Some of the more generally applicable PIs that most I-Ds might want to use -->
<!-- Try to enforce the ID-nits conventions and DTD validity -->
<?rfc strict="yes" ?>
<!-- Items used when reviewing the document -->
<?rfc comments="no" ?>
<!-- Controls display of <cref> elements -->
<?rfc inline="no" ?>
<!-- When no, put comments at end in comments section,
                                 otherwise, put inline -->
<?rfc editing="no" ?>
<!-- When yes, insert editing marks: editing marks consist of a
                                 string such as <29> printed in the blank line at the
                                 beginning of each paragraph of text. -->
<!-- Create Table of Contents (ToC) and set some options for it.
         Note the ToC may be omitted for very short documents,but idnits insists on a ToC
         if the document has more than 15 pages. -->
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<!-- If "yes" eliminates blank lines before main section entries. -->
<?rfc tocdepth="3"?>
<!-- Sets the number of levels of sections/subsections... in ToC -->
<!-- Choose the options for the references.
         Some like symbolic tags in the references (and citations) and others prefer
         numbers. The RFC Editor always uses symbolic tags.
         The tags used are the anchor attributes of the references. -->
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<!-- If "yes", causes the references to be sorted in order of tags.
                                 This doesn't have any effect unless symrefs is "yes" also. -->
<!-- These two save paper: Just setting compact to "yes" makes savings by not starting each
         main section on a new page but does not omit the blank lines between list items.
         If subcompact is also "yes" the blank lines between list items are also omitted. -->
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<!-- end of list of popular I-D processing instructions -->
<!-- end of list of processing instructions -->
<rfc category="info"
     docName="draft-linkova-v6ops-conditional-ras-00"
     ipr="trust200902">
  <front>
	  <title abbrev="Conditional RAs">Using Conditional Router Advertisements for Enterprise Multihoming</title>
    <author fullname="Jen Linkova" initials="J." surname="Linkova">
      <organization>Google</organization>

      <address>
        <postal>
          <street/>

          <city>Mountain View</city>

          <code>94043</code>

          <region>California</region>

          <country>USA</country>
        </postal>

        <email>furry@google.com</email>
      </address>
    </author>

    <date/>

    <area>Operations and Management Area (ops)</area>

    <workgroup>	IPv6 Operations</workgroup>

    <abstract>
	    <t>
		    This document discusses most common scenarios of connecting an enterprise network to multiple ISPs using provider aggregatable address space (PA). The problem of enterprise multihoming without address translation of any form has not been solved yet as it requires both the network to select the correct egress ISP based on the packet source address and hosts to select the correct source address based on the desired egress ISP for that traffic. <xref target="I-D.ietf-rtgwg-enterprise-pa-multihoming"/> proposes a solution to this problem by introducing a new routing functionality (Source Address Dependent Routing) to solve the uplink selection issue and using Router Advertisements to influence the host source address selection. While the above-mentioned document focus is on solving the general problem and to cover various complex use cases, this document describes how the solution proposed in <xref target="I-D.ietf-rtgwg-enterprise-pa-multihoming"/> can be adopted for limited number of common use cases. In particular the focus is on scenarios when a enterprise network has two Internet uplinks used either in primary/backup mode or simultaniously and hosts in that network might not yet properly support multihoming as described in <xref target="RFC8028" />.
	    </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
         <t> 
		 Multihoming is an obvious requirement for many enterprise network to ensure the desired level of network reliability. However using more than one ISP introduces the problem of assigning IP addresses to hosts. In IPv4 world there was no choice but using <xref target="RFC1918" /> address space and NAT at the network edge (using Provider Independent or PI address space is not always an option as it requires running BGP between the enterprise network and the ISPs). As IPv6 host can, by design, have multiple addresses of the global scope, multihoming using provider address looks even easier for IPv6: each ISP assigns an IPv6 block (usually /48) and hosts in the enterprise network have addresses assigned from each ISP block. However using IPv6 PA blocks in multihoming scenario introduces some challenges, including but not limited to:
         </t>
	 <t>
		 <list style="symbols">
			 <t>Selecting the correct uplink based on the packet source address</t>
			 <t>signaling to hosts that some source addresses should or should not be used (e.g. an uplink to the ISP went down or became available again)</t>
		 </list>
	 </t>
	 <t>
		 The document <xref target="I-D.ietf-rtgwg-enterprise-pa-multihoming"/> discusses those and other related challenges in details in relation to general multihoming scenario for enterprise networks. Unfortunately the proposed solution heavily relies on the rule 5.5 of the default address selection algorithm (<xref target="RFC6724"/>) which has not been widely implemented. Therefore network administrators in enterprise networks could not yet assume that all devices in their network support the rule 5.5, especially in quite common BYOD ("Bring Your Own Device") scenario. However while it does not seem feasible to solve all possible multihoming scenarios without reliying on rule 5.5, it is possible to provide IPv6 multihoming using PA address space for most common use cases. This document discusses how the general solution described in <xref target="I-D.ietf-rtgwg-enterprise-pa-multihoming"/> can be applied to those two specific cases. 
	 </t>

	 </section>

    <section anchor="sec_scenarios"
	    title="Common Enterprise Multihoming Scenarios">
      <section anchor="sec_scenario_backup"
	      title="Two ISP Uplinks, Primary and Backup">
	      <t>
		      This scenario has the following key characteristics:`
	      </t>
	      <t><list style="symbols">
			      <t>The enterprise network is using uplinks to two (or more) ISPs for Internet access;</t>
			      <t>Each ISP assigns an IPv6 PA address space for the network.</t>
			      <t>Uplink(s) to one ISP is a primary (preferred) one. All other uplinks are backup and are not expected to be used while the primary one is operational.</t>
			      <t>If the primary uplink is operational, all Internet traffic should flow via that uplink.</t>
			      <t>When the primary uplink fails the Internet traffic needs to flow via the backup uplinks.</t>
			      <t>Recovery of the primary uplink needs to trigger the traffic switchover from the backup uplinks back to primary one.</t>
		      </list>
	      </t>

      </section>

      <section anchor="sec_scenario_lb"
               title="Two ISP Uplinks, Used for Load Balancing">
	      <t>
		      This scenario has the following key characteristics:`
	      </t>
	      <t><list style="symbols">
			      <t>The enterprise network is using uplinks to two (or more) ISPs for Internet access;</t>
			      <t>Each ISP assigns an IPv6 PA address space.</t>
			      <t> All uplink may be used simultaneously, traffic being randomly balanced between them.</t>
		      </list>
	      </t>

      </section>

      </section>

      <section anchor="sec_conditional_ras"
               title="Conditional Router Advertisements">
      <section anchor="sec_conditional_ras_overview"
	      title="Solution Overview">
	      <section anchor="sec_routing_over" title="Uplink Selection">
		      <t>
			      As discussed in  <xref target="I-D.ietf-rtgwg-enterprise-pa-multihoming"/> one of two main problems to be solved in the enterprise multihoming scenario is the problem of the next-hop (uplink) selection based on the packet source address. For example if the enterprise network has two uplinks, to ISP_A and ISP_B and hosts have addresses from subnet_A and subnet_B (belonging to ISP_A and  ISP_B respectively) then packets sourced from subnet_A must be sent to ISP_A uplink while packets sourced from subnet_B must be sent to ISP_B uplink.</t>
		      <t>
			      While some work is being done in the Source Address Dependent Routing (SADR) area, the simplest way to implement the desired functionality currently is to apply a policy which select a next-hop or an egress interface based on the packet source. Most of SMB/Enterprise grade routers have such functionality available currently.
		      </t>
      </section>
      <section anchor="sec_con_ras_over" title="Source Address Selection and Conditional RAs">
	      <t>
		      Another problem to be solved in the multihoming scenario is the source address selection on hosts.
		      In the normal situation (all uplinks are up/operational) hosts have multiple global unique addresses and can rely on the default address selection algorithm (<xref target="RFC6724"/>) to pick up a source address, while the network is responsible for choosing the correct uplink based on the source address selected by a host as described in <xref target="sec_con_ras_over"/>. However some network topology changes (changing uplink status) might affect the global reachability for packets sourced from the particular prefixes and therefore such changes have to be signaled back to the hosts. For example:
	      </t>
	      <t><list style="symbols">
			      <t>An uplink to an ISP_A went down so hosts should not use addresses from ISP_A prefix;</t>
			      <t>A primary uplink to ISP_A which was not operational has come back up so hosts should start using the source addresses from ISP_A prefix;</t>
		      </list>
	      </t>
	      <t>
		      <xref target="I-D.ietf-rtgwg-enterprise-pa-multihoming"/> provides detailed explanation on why SLAAC and router advertisements are the most suitable mechanism for signaling network topology changes to hosts and influencing the source address selection.  Sending a router advertisement to change the preferred lifetime for a given prefix provides the following functionality:
	      </t>
	      <t><list style="symbols">
			      <t>deprecating addresses (by sending an RA with the preferred_lifetime set to 0 in the corresponding POI) to indicate to hosts that that addresses from that prefix should not be used;</t>
			      <t>making previously unused (deprecated) prefix usable again (by sending an RA containing a POI with non-zero preferred lifetime) to indicate to hosts that addresses from that prefix can be used again;</t>
		      </list>
	      </t>
	      <t>
		      To provide the desired functionality, first-hop routers are required to</t>
<t><list style="symbols">
                         <t>send RA triggered by defined event policies in response to uplink status change event.</t>
			 <t>while sending periodic or solicted RAs, set the value in the given RA field (e.g. PIO preferred lifetime) based on the uplink status.</t>
</list></t>
<t>  The exact definition of the 'uplink status' depends on the network topology and may include conditions like:
	      </t>
	      <t><list style="symbols">
			      <t>uplink interface status change</t>
			      <t>presence of a particular route in the routing table</t>
			      <t>presence of a particular route with the particular attribute (next-hop, tag etc) in the routing table</t>
			      <t>protocol adjacency change</t>
		      </list>
	      </t>
		      <t>etc.</t>
	      <t>
		      In some scenarios, when two routers providing first-hop redundancy via VRRP, the master-backup status can be considered as a conditions for sending RA and changing the preferred lifetime value. See <xref target="sec_ras_scen2"/> for more details.
	      </t>
	      <t>
		      If hosts are provided with ISP DNS servers IPv6 addresses via RDNSS <xref target="RFC8106"/> it might
		      be desirable for the conditional RAs to update Lifetime field of the RDNSS option as well.
	      </t>
              </section>
      </section>

      <section anchor="sec_ras_scens" title="Example Scenarios">
	      <t> This section illustrates how the conditional RAs solution can be applied to most common enterprise multihoming scenarios.</t>
	      <section anchor="sec_ras_scen1" title="Single Router, Primary/Backup Uplinks">
		      <figure align="center" anchor="fig_scenario1"
			      title="Single Router, Primary/Backup Uplinks">
			      <artwork align="center"><![CDATA[

                                                                        -------- 
                                                     ,-------,        ,'        ',
                       +------+  2001:db8:1::/48   ,'         ',     :            :
                       |      |-------------------+    ISP_A    +---+:            :
                       |      |                    ',         ,'     :            :
    2001:db8:1:1::/64  |      |                      '-------'       :            :
H1---------------------|  R1  |                                      :  INTERNET  :
    2001:db8:2:1::/64  |      |                      ,-------,       :            :
                       |      |  2001:db8:2::/48   ,'         ',     :            :
                       |      |-------------------+    ISP_B    +---+:            :
                       +------+                    ',         ,'     :            :
                                                     '-------'        ',        ,'
                                                                        --------

			      ]]></artwork>
			              </figure>
<t>
Let's look at the simple network topology when a single router acts as a border router to terminate two ISP uplinks and as a first-hop router for hosts. Each ISP assigns /48 to the network and the ISP_A uplink is a primary one, to be used for all Internet traffic, while the ISP_B uplink is a backup, to be used only when the primary uplink is not operational.
</t>
<t>
To ensure that packets with ISP_A and ISP_B source addresses are only routed to ISP_A and ISP_B uplinks respectively, network administrator needs to configure a policy on R1:</t>
<figure>
	<artwork>
if {
     packet_destination_address is not in 2001:db8:1::/48 or 2001:db8:2::/48
     packet_source_address is in 2001:db8:1::/48 
} then {
       next-hop is ISP_A_uplink
} 
if {
     packet_destination_address is not in 2001:db8:1::/48 or 2001:db8:2::/48
     packet_source_address is in 2001:db8:1::/48 
}
then {
       next-hop is ISP_B_uplink
}
	</artwork>
</figure>
<t>
	Under normal circumstances it's desirable that all traffic is sent via ISP_A uplink, therefore hosts (the host H1 in the example topology figure) should be using source addresses from 2001:db8:1:1:/64. When/if ISP_A uplink fails, hosts should stop using 2001:db8:1:1:/64 prefix and start using 2001:db8:1:2:/64 until the ISP_A uplink comes back up. To achieve the desired behavior the router advertisement configuration on the R1 device for the interface facing H1 needs to have the following policy:
</t>
<figure>
	<artwork>
prefix 2001:db8:1:1::/64 {
  if ISP_A_uplink is up 
    then preferred_lifetime = 604800  
  else preferred_lifetime = 0
 }

prefix 2001:db8:2:1::/64 {
  if ISP_A_Uplink is up
    then preferred_lifetime = 0
  else preferred_lifetime = 604800 
}
    </artwork>
    </figure>
    <t>
	    The similar policy needs to be applied to RDNSS Lifetime filed if ISP_A and ISP_B DNS servers are used.
    </t>

      </section>
      <section anchor="sec_ras_scen2" title="Two Routers, Primary/Backup Uplinks">
	      <t> Let's look at a bit more complex scenario when two border routers are terminating two ISP uplinks (one each),
		      acting as redundant first-hop routers for hosts. The topology is shown on the Fig.2</t>

		      <figure align="center" anchor="fig_scenario2"
			      title="Two Routers, Primary/Backup Uplinks">
			      <artwork align="center"><![CDATA[

                                                                        -------- 
                                                     ,-------,        ,'        ',
                         +----+  2001:db8:1::/48   ,'         ',     :            :
    2001:db8:1:1::/64   _|    |-------------------+    ISP_A    +---+:            :
                       | | R1 |                    ',         ,'     :            :
                       | +----+                      '-------'       :            :
H1---------------------|                                             :  INTERNET  :
                       | +----+                      ,-------,       :            :
                       |_|    |  2001:db8:2::/48   ,'         ',     :            :
    2001:db8:2:1::/64    | R2 |-------------------+    ISP_B    +---+:            :
                         +----+                    ',         ,'     :            :
                                                     '-------'        ',        ,'
                                                                        --------

									]]></artwork>
							</figure>

<t> In this scenario R1 sends RAs with PIO for 2001:db8:1:1::/64 (ISP_A address space) and R2 sends RAs with PIO for 2001:db8:2:1::/64 (ISP_B address space). Each router needs to have a forwarding policy configured for packets received on hosts-facing interface:
</t>
<figure><artwork>
if {
     packet_destination_address is not in 2001:db8:1::/48 or 2001:db8:2::/48
     packet_source_address is in 2001:db8:1::/48 
} then {
    next-hop is ISP_A_uplink
} 
if {
     packet_destination_address is not in 2001:db8:1::/48 or 2001:db8:2::/48
     packet_source_address is in 2001:db8:1::/48 
} then {
    next-hop is ISP_B_uplink
}
</artwork></figure>
<t>
	In this case there is more than one way ensure that hosts are selecting the correct source address based on the uplink status. If VRRP is used to provide first-hop redundancy and the master router is one with the active uplink, then the simplest way to use VRRP mastership as a condition for router advertisement. So, if ISP_A is the primary uplink, the routers R1 and R2 need to be configured in the following way:
</t>
<t>
	R1 is VRRP master by default (when ISP_A uplink is up). If ISP_A uplink is down then R1 becomes a backup. Router advertisement on R1 interface facing H1 needs to have the following policy applied:</t>
<figure>
	<artwork>
prefix 2001:db8:1:1::/64 {
  if vrrp_master then preferred_lifetime = 604800
    else preferred_lifetime = 0
}
</artwork>
</figure>
<t>
	R2 is VRRP backup by default.
	Router advertsement on R2 interface facing H1 needs to have the following policy applied:</t>
<figure>
	<artwork>
prefix 2001:db8:2:1::/64 {
  if vrrp_master then preferred_lifetime = 604800
    else preferred_lifetime = 0
}
</artwork>
</figure>
<t>
	If VRRP is not used or interface status tracking is not used for mastership switchover, then each router needs to be able to detect somehow the uplink failure/recovery on the neighboring router so RAs with updated preferred lifetime value are triggered. Depending on the network setup various triggers like a route to uplink interface subnet or a defaul route received from the uplink can be used. The obvious drawback of using the routing table to trigger the conditional RAs is that some additional configuration would be required. For example if a route to the prefix assigned to the ISP uplink is used as a trgger then the conditional RA policy would have the following logic:
</t>
<t>R1:</t>
<figure><artwork>
prefix 2001:db8:1:1::/64 {
  if ISP_A_uplink is up then preferred_lifetime = 604800
  else preferred_lifetime = 0
  } 
  </artwork></figure>
  <t>R2:</t>
<figure><artwork>
prefix 2001:db8:2:1::/64 {
  if ISP_A_uplink_route is present then preferred_lifetime = 0
    else preferred_lifetime = 604800
 } 
  </artwork></figure>

      </section>
      <section anchor="sec_ras_scen4" title="Single Router, Load Balancing Between Uplinks">
	      <t>
		      Let's look at the example topology shown on <xref target="fig_scenario1"/> but with both uplinks
		      used simultaneously. In that case R1 would send RAs containing PIOs for both prefixes, 2001:db8:1:1::/64 and 2001:db8:2:1::/64, changing the preferred lifetime based on particular uplink availability. If the interface status is used as a uplink availability indicator The policy logic would look like:
	      </t>
<figure><artwork>
prefix 2001:db8:1:1::/64 {
  if ISP_A_uplink is up then preferred_lifetime  = 604800
     else preferred_lifetime = 0
}
prefix 2001:db8:2:1::/64 {
  if ISP_B_uplink is up then preferred_lifetime  = 604800
     else preferred_lifetime = 0
}
</artwork></figure>
		 <t>
			 R1 needs a forwarding policy to be applied to forward packets to the correct uplink based on the source address as described in <xref target="sec_ras_scen1"/>.
		 </t>
	
      </section>
      <section anchor="sec_ras_scen5" title="Two Router, Load Balancing Between Uplinks">
	      <t>
		      In this scenario the example topology is similar to one shown on <xref target="fig_scenario2"/> but both uplinks can be used at the same time. It means that both R1 and R2 have to have the corresponding forwarding policy to forward packets based on their source addresses.</t>
	      <t>
		      Each router would send RAs with POI for the corresponding prefix. setting preferred_lifetime to non-zero value when the ISP uplink is up and deprecating the prefix by setting the preferred lifetime to 0 in case of the uplink failure. The uplink recovery would trigger another RA with non-zero preferred lifetime to make the addresses from the prefix preferred again. The example RA policy on R1 and R2 would look like:
</t>
	      <t>
		      R1:</t>
<figure><artwork>
prefix 2001:db8:1:1::/64 {
  if ISP_A_uplink is up then preferred_lifetime  = 604800
     else preferred_lifetime = 0
}
</artwork></figure>
<t>R2:</t>
<figure><artwork>
prefix 2001:db8:2:1::/64 {
  if ISP_B_uplink is up then preferred_lifetime  = 604800
     else preferred_lifetime = 0
}
</artwork></figure>
</section>
<section anchor="sec_ras_scen_complex" title="Topologies with Dedicated Border Routers">
	<t>
	      For simplicity reasons all topologie sbelow show the ISP uplinks terminated on the first-hop routers. Obviously the proposed approach can be used in more complex topologies when dedicated devices are used for terminating ISP uplinks. In that case VRRP mastership or inteface status can not be used as a triiger for conditional RAs and route presence should be used instead as describe above.</t>
</section>
</section>
</section>


    <section anchor="IANA" title="IANA Considerations">
      <t>This memo asks the IANA for no new parameters.</t>
    </section>

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

      <t/>

      <section anchor="Privacy" title="Privacy Considerations">
        <t/>
      </section>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
    </section>
  </middle>

  <back>
    <!-- references split to informative and normative -->

    <references title="Normative References">
      <?rfc include="reference.RFC.2827" ?>

      <?rfc include="reference.RFC.4193" ?>

      <?rfc include="reference.RFC.6296" ?>

      <?rfc include="reference.RFC.1918" ?>

      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.2460"?>

      <?rfc include="reference.RFC.3582" ?>

      <?rfc include="reference.RFC.4116" ?>

      <?rfc include="reference.RFC.4218" ?>

      <?rfc include="reference.RFC.4219" ?>
      <?rfc include="reference.RFC.4862" ?>

      <?rfc include="reference.RFC.7157" ?>
      <?rfc include="reference.RFC.8106" ?>
	    <?rfc include="reference.I-D.ietf-rtgwg-enterprise-pa-multihoming" ?>
    </references>

    <references title="Informative References">

      <?rfc include="reference.RFC.8028" ?>

      <?rfc include="reference.I-D.ietf-rtgwg-dst-src-routing" ?>

      <?rfc include="reference.RFC.4861" ?>

      <?rfc include="reference.RFC.5533" ?>

      <?rfc include="reference.RFC.5534" ?>

      <?rfc include="reference.RFC.6724" ?>

      <?rfc include="reference.RFC.7788" ?>

      <?rfc include="reference.RFC.4941" ?>

      <?rfc include="reference.RFC.3704" ?>

    </references>

    <section anchor="log" title="Change Log">
      <t><list style="hanging">
          <t hangText="Initial Version:">July 2017</t>
        </list></t>
    </section>
  </back>
</rfc>
