<?xml version="1.0" encoding="US-ASCII"?>
<!-- edited by Yuchi Chen, Tsinghua University -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc autobreaks="no"?>
<?rfc subcompact="no"?>

<rfc category="std" docName="draft-zhang-dhc-dhcpv6-failure-detection-00" ipr="trust200902">
    
<front>
  
  <title abbrev="DHCPv6 Failover Detection">Detection of Primary Server Failure in DHCPv6 Failover</title>

<!-- Author List -->
  
  <author fullname="Lanshan Zhang" initials="L." surname="Zhang">
    <organization>BUPT University</organization>   
    <address>
      <postal>
          <street>Beijing University of Posts and Telecommunications (BUPT)</street>
          <city>Beijing</city>
          <region></region>
          <code>100876</code>
          <country>P.R.China</country>
      </postal>
      <phone>+86-13146885878</phone>
      <email>zls326@sina.com</email>
    </address>
  </author>
  
    <author fullname="Wanying Jia" initials="W." surname="Jia">
    <organization>BUPT University</organization>   
    <address>
      <postal>
        <street>Beijing University of Posts and Telecommunications (BUPT)</street>
          <city>Beijing</city>
          <region></region>
          <code>100876</code>
          <country>P.R.China</country>
      </postal>
      <phone>+86-15699866013</phone>
      <email>wanyingjia@bupt.edu.cn</email>
    </address>
  </author>
  
  <author fullname="Yuchi Chen" initials="Y." surname="Chen">
    <organization>Tsinghua University</organization>   
    <address>
      <postal>
        <street/>
          <city>Beijing</city>
          <region></region>
          <code>100084</code>
          <country>P.R.China</country>
      </postal>
      <phone>+86-10-6278-5822</phone>
      <email>chenycmx@gmail.com</email>
    </address>
  </author>
  
  <author fullname="Shenghui Yan" initials="S." surname="Yan">
    <organization>Tsinghua University</organization>   
    <address>
      <postal>
        <street/>
          <city>Beijing</city>
          <region></region>
          <code>100084</code>
          <country>P.R.China</country>
      </postal>
      <phone>+86-13511180353</phone>
      <email>tuotyan@gmail.com</email>
    </address>
  </author>
      
  <date year="2014"/>

  <abstract>
    <t>In DHCPv6 failover scenario an automatical failure detection capability may
    	be desirable. This document describes a detection method, with which the
    	secondary server can detect the link failure between the primary server and 
    	clients.</t>     
  </abstract>
  
  <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119"></xref>.</t>
  </note>
</front>

<middle>
	
	<section anchor="Introduction" title="Introduction">
    <t><xref target="RFC7031"/> describes the requirements of DHCPv6 failover. 
    	In the DHCPv6 failover scenario, two DHCPv6 servers, which act as two
    	partners, are serving the clients in the domain. One server should act as the
    	primary server if it is responsible for answering clients' requests. The other 
    	one should be the secondary server, which is expected to be responsive in case 
    	of the primary server failure.</t>
    	
    <t><xref target="I-D.ietf-dhc-dhcpv6-failover-design"/> defines the notion of 
    	auto-partner-down capability, with which the server can automatically enter
    	PARTNER-DOWN state without operator intervention. It also proposes a a timer-based 
    	CONTACT message mechanism, with which the server can detect	partner unreachability.
    	However, this mechanism is not so suffient, as it cannot resolve the situation 
    	in which the connection between the primary and secondary servers is normal, but 
    	the primary server is unreachable for clients.</t>	
    	
    <t>This document describes a method for the secondary server to detect such a situation.
    	The consideration of the potential preference conflict between the responsive secondary
    	server and primary server is also presented.</t>
	</section>
	
	<section anchor="Problem" title="Problem Statement">
    <t>In some cases the primary server is unreachable for (likely all of the) clients, even if
    	it is still responsive. A (physic) link failure between the primary server and clients may
    	lead to such a situation. In this situation, the secondary server should be able to detect
    	this failure. It should become responsive if the it is allowed (i.e. the auto-partner-down capability).</t>
    	
    <t>The CONTACT message based mechanism described in the Section 8.4 of <xref target="I-D.ietf-dhc-dhcpv6-failover-design"/>
    	may not be suffient for the secondary server to detect such a primary server failure, because 
    	the connection between the primary and secondary server is not interupted.</t>
  </section>
  
  <section anchor="Detection" title="Detection of Primary Server Falure">
    <t>Assume that the secondary server is reachable to clients while the primary server is not 
    	(at least to part of clients). In this case, some clients may keep advertising SOLICIT
    	or REQUEST messages. </t>
    
    <t>When the secondary server received SOLICIT or REQUEST messages, but does not see any 
    	BNDUPD message coming from the primary server for TBD1 period, it may consider that the 
    	primary	server is unresponsive.</t>
    
    <t>An alternative method is that if the secondary server receives the SOLICIT messages from
    	the same client for TBD2 times, it may consider that the primary server failure occured.
    	This method requires that the secondary server to maintain a state (or leverage the lease 
    	base) to record the time of receipt of SOLICIT message from a certain client.</t>
    	
    <t>Once the primary server failure is detected, the secondary server may move to PARTNER-DOWN 
    	state	and start to serve as a responsive server.</t>	
       
  </section>
  
  <section anchor="Consideration" title="Other Considerations">
  	
  	<t>The detection method described in this document is likely to lead to a situation in
  	which both the primary (which is most likely in NORMAL state) and secondary server 
  	(which is expected to move to PARTNER-DOWN state) are responsive, at least to part 
  	of clients. According to Section 9.4.2 of <xref target="I-D.ietf-dhc-dhcpv6-failover-design"/>,
  	however, the secondary server cannot enter PARTNER-DOWN state if the primary server
  	is in NORMAL state.</t>
  	 
  	<t>The most imporant reason is that the primary server cannot detect this failure of its own,
  	and thus stays in NORMAL state and prevents the secondary server from being responsive.</t>
  	 	
  	<t>A possible solution is that the primary server performs a failure detection process. Once 
  		such a failure is detected, the primary server should move to a state in which it will not
  		prevent the	secondary server to serve as a responsive server (e.g. the RECOVER-DONE state).</t>
  	 
  </section>
	
  <section anchor="Security" title="Security Considerations">
    <t>A sort of DoS attack can be performed by a malicious client, which can flood the SOLICIT 
    	message in the network, thus pushing the secondary server to enter PARTNER-DOWN state while
    	the primary server is actually responsive to the other clients. </t>
    
    <t>Further security consideration is TBD.</t>
    
  </section>
  <section anchor="IANA" title="IANA Considerations">
    <t>This document does not include an IANA request.</t>
  </section>
</middle>

<back>

  <references title="Normative References">
    <?rfc include="reference.RFC.2119" ?>
    <?rfc include="reference.RFC.7031" ?>
    <?rfc include="reference.I-D.ietf-dhc-dhcpv6-failover-design" ?>
  
  </references>

  <references title="Informative References">
  	<?rfc include="reference.RFC.6853" ?>
  </references>

</back>
</rfc>
