<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc number="8213" category="std" submissionType="IETF" consensus="yes"
     ipr="pre5378Trust200902">
  <front>
    <title abbrev="DHCP Relay/Server Security">
    Security of Messages Exchanged between Servers and Relay Agents</title>

    <author fullname="Bernie Volz" initials="B" surname="Volz">
      <organization abbrev="Cisco Systems">Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>1414 Massachusetts Ave</street>
          <city>Boxborough, MA  01719</city>
          <region></region>
          <code></code>
          <country>United States of America</country>
        </postal>
        <email>volz@cisco.com</email>
      </address>
    </author>

    <author initials="Y" surname="Pal" fullname="Yogendra Pal">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>Cessna Business Park</street>
          <street>Varthur Hobli, Outer Ring Road</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560103</code>
          <country>India</country>
        </postal>
        <email>yogpal@cisco.com</email>
      </address>
    </author>

    <date month="August" year="2017" />

    <area>Internet</area>

    <workgroup>Network Working Group</workgroup>


    <!--  SECTION 0:  Abstract                      -->

    <abstract>
      <t>
   The Dynamic Host Configuration Protocol for IPv4 (DHCPv4) has
   no guidance for how to secure messages exchanged between servers
   and relay agents. The Dynamic Host Configuration Protocol for
   IPv6 (DHCPv6) states that IPsec should be used to secure
   messages exchanged between servers and relay agents but does not
   require encryption. With recent concerns about
   pervasive monitoring and other attacks, it is appropriate to
   require securing relay-to-relay and relay-to-server communication
   for DHCPv6 and relay-to-server communication for DHCPv4.
      </t>
    </abstract>
  </front>

  <middle>
    <!--  SECTION 1:  Introduction                  -->

    <section title="Introduction">

      <t>
   The Dynamic Host Configuration Protocol for IPv4 (DHCPv4)
   <xref target="RFC2131"/> and the Bootstrap Protocol <xref target="RFC1542"/> have
   no guidance for how to secure messages exchanged between servers
   and relay agents. The Dynamic Host Configuration Protocol for
   IPv6 (DHCPv6) <xref target="RFC3315"/> states that IPsec should
   be used to secure messages exchanged between servers and relay agents
   but does not recommend encryption. With recent concerns about
   pervasive monitoring <xref target="RFC7258"/>, it is appropriate
   to require use of IPsec with encryption for relay-to-server communication
   for DHCPv4 and require use of IPsec with encryption for relay-to-relay and
   relay-to-server communication for DHCPv6.

      </t>

      <t>
   This document specifies the optional requirements for relay agent and
   server implementations to support IPsec authentication and encryption
   and recommends that operators enable this IPsec support.
      </t>

    </section>

    <!--  SECTION 2: Terminology                                         -->

    <section title="Requirements Language and Terminology">

      <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
    "MAY", and "OPTIONAL" in this document are to be interpreted as
    described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
    appear in all capitals, as shown here.
      </t>

      <t>
   This document uses terminology from <xref target="RFC1542"/>,
   <xref target="RFC2131"/>, and <xref target="RFC3315"/>.
      </t>

    </section>


    <!--  SECTION 3:                                  -->

    <section title="Security of Messages Exchanged between Servers and Relay Agents">

        <t>
   For DHCPv6 <xref target="RFC3315"/>, this specification REQUIRES relay and
   server implementations to support IPsec encryption of relay-to-relay and
   relay-to-server communication as documented below. The remainder of this section replaces
   the text in Section 21.1 of <xref target="RFC3315"/> when this specification
   is followed.
        </t>

      <t>
   For DHCPv4 <xref target="RFC2131"/>, this specification REQUIRES relay and
   server implementations to support IPsec encryption of relay-to-server
   communication as documented below.
      </t>

      <t>
   This specification RECOMMENDS that operators enable IPsec for this
   communication.
      </t>


      <t>
   By using IPsec with encryption for this communication, potentially sensitive
   client message and relay included information, such as the DHCPv4 Relay Agent
   Information option (82) <xref target="RFC3046"/>, vendor-specific information
   (for example, the options defined in <xref target="CableLabs-DHCP"/>), and
   Access-Network-Identifier
   option(s) <xref target="RFC7839"/>, are protected from pervasive monitoring
    and other attacks.
      </t>

      <t>
   Relay agents and servers MUST be able to exchange messages using the
   IPsec mechanisms described in <xref target="RFC4301"/> with the
   conditions below. If a client message is relayed through multiple relay
   agents (relay chain), each of the relay agents MUST have established
   independent, pairwise trust relationships.  That is, if
   messages from client C will be relayed by relay agent A to relay
   agent B and then to the server, relay agents A and B MUST be
   configured to use IPsec for the messages they exchange, and relay
   agent B and the server MUST be configured to use IPsec for the
   messages they exchange.
      </t>

      <t>
   Relay agents and servers use IPsec with the following conditions:

        <list hangIndent="17" style="hanging">

        <t hangText="Selectors"> Relay agents are manually configured with the addresses
        of the relay agent or server to which DHCP messages are to be
        forwarded. Each relay agent and server that will be using IPsec for
        securing DHCP messages MUST also be configured with a list of the
        relay agents to which messages will be returned. The selectors for the
        relay agents and servers will be the pairs of addresses defining relay
        agents and servers and the direction of DHCP message exchange on DHCPv4
        UDP port 67 or DHCPv6 UDP port 547.</t>

        <t hangText="Mode"> Relay agents and servers MUST use IPsec in
        transport mode and use Encapsulating Security Payload (ESP).</t>

        <t hangText="Encryption and authentication algorithms"><vspace />
        This document
        REQUIRES combined mode algorithms for ESP authenticated encryption,
        ESP encryption algorithms, and ESP authentication algorithms as per
        Sections 2.1, 2.2, and 2.3 of <xref target="RFC7321"/>, respectively.


        Encryption is required as relay agents may forward unencrypted
        client messages as well as include additional sensitive information,
        such as vendor-specific information (for example,
         the options defined in <xref target="CableLabs-DHCP"/>) and the
	 Access-Network-Identifier Option defined in 
        <xref target="RFC7839"/>.</t>

        <t hangText="Key management"> Because both relay agents and servers
        tend to be managed by a single organizational entity, public key
        schemes MAY be optional.  Manually configured key management MAY
        suffice but does not provide defense against replayed messages.
        Accordingly, Internet Key Exchange Protocol Version 2 (IKEv2) <xref
	target="RFC7296"/> with pre-shared secrets SHOULD be
        supported. IKEv2 with public keys MAY be supported. Additional
        information on manual vs. automated key management and when one
        should be used over the other can be found in
        <xref target="RFC4107"/>.</t>

        <t hangText="Security policy"> DHCP messages between relay agents and
        servers MUST only be accepted from DHCP peers as identified in the local
        configuration.</t>

        <t hangText="Authentication"> Shared keys, indexed to the source IP
        address of the received DHCP message, are adequate in this application.</t>

        </list></t>

      <t>
      Note: As using IPsec with multicast has additional complexities (see
      <xref target="RFC5374"/>), relay agents SHOULD be configured to forward
      DHCP messages to unicast addresses.
      </t>

   </section>

   <section title="Security Considerations">

      <t>
   The security model specified in this document is hop by hop. For DHCPv6, there
   could be multiple relay agents between a client and server, and each of these
   hops needs to be secured. For DHCPv4, there is no support for multiple relays.
      </t>

      <t>
   As this document only mandates securing messages exchanged between relay agents
   and servers, the message exchanges between clients and the first-hop relay
   agent or server are not secured. Clients may follow the recommendations in
   <xref target="RFC7844"/> to minimize what information they expose or make
   use of secure DHCPv6 <xref target="SEC-DHCPv6"/> to secure communication
   between the client and server.
      </t>



      <t>
   As mentioned in Section 14 of <xref target="RFC4552"/>, the following
   are known limitations of the usage of manual keys:

        <list hangIndent="3" style="hanging">

        <t hangText="o">As the sequence numbers cannot be negotiated, replay
        protection cannot be provided.  This leaves DHCP insecure against
        all the attacks that can be performed by replaying DHCP packets.</t>

        <t hangText="o">Manual keys are usually long lived (changing them
        often is a tedious task).  This gives an attacker enough time to
        discover the keys.</t>

        </list>
      </t>

      <t>
   It should be noted that if the requirements in this document are followed,
   while the DHCP traffic on the wire between relays and servers is encrypted,
   the unencrypted data may still be available through other attacks on the
   DHCP servers, relays, and related systems. 
Securing these systems and the
   data in databases and logs also needs to be considered on both the systems
   themselves and when transferred over a network (i.e., to network attached
   storage for backups or to operational support systems).
      </t>

      <t>
   Use of IPsec as described herein is also applicable to Lightweight DHCPv6
   Relay Agents <xref target="RFC6221"/>, as they have a link-local
   address that can be used to secure communication with their next-hop
   relay(s).
      </t>

    </section>

    <section title="IANA Considerations">

     <t>
This document makes no request of IANA.
     </t>


    </section>

  </middle>

  <back>
    <!--  SECTION 12.1:  Normative References		-->

    <references title="Normative References">
      <?rfc include='reference.RFC.1542'?>
      <?rfc include='reference.RFC.2119'?>
      <?rfc include='reference.RFC.2131'?>
      <?rfc include='reference.RFC.3315'?>
      <?rfc include='reference.RFC.4301'?>
      <?rfc include='reference.RFC.7321'?>
      <?rfc include='reference.RFC.8174'?>

    </references>

    <!--  SECTION 12.2:  Informative References		-->

    <references title="Informative References">
      <?rfc include='reference.RFC.3046'?>
      <?rfc include='reference.RFC.4107'?>
      <?rfc include='reference.RFC.4552'?>
      <?rfc include='reference.RFC.5374'?>
      <?rfc include='reference.RFC.6221'?>
      <?rfc include='reference.RFC.7258'?>
      <?rfc include='reference.RFC.7296'?>

      <?rfc include='reference.RFC.7839'?>
      <?rfc include='reference.RFC.7844'?>


<!-- ietf-dhc-sedhcpv6 IESG state: AD watching -->

<reference anchor='SEC-DHCPv6'>
<front>
<title>Secure DHCPv6</title>

<author initials='L' surname='Li' fullname='Lishan Li'>
    <organization />
</author>

<author initials='S' surname='Jiang' fullname='Sheng Jiang'>
    <organization />
</author>

<author initials='Y' surname='Cui' fullname='Yong Cui'>
    <organization />
</author>

<author initials='T' surname='Jinmei' fullname='Tatuya Jinmei'>
    <organization />
</author>

<author initials='T' surname='Lemon' fullname='Ted Lemon'>
    <organization />
</author>

<author initials='D' surname='Zhang' fullname='Dacheng Zhang'>
    <organization />
</author>

<date month='February' day='21' year='2017' />

</front>

<seriesInfo name='Work in Progress,' value='draft-ietf-dhc-sedhcpv6-21' />

</reference>



      <reference anchor="CableLabs-DHCP"
                 target="https://apps.cablelabs.com/specification/CL-SP-CANN-DHCP-Reg">
        <front>
          <title>CableLabs' DHCP Options Registry</title>
          <author>
	  <organization>CableLabs
	  </organization>
	  </author>
          <date/>
        </front>
      </reference>

    </references>

    <!--  Acknowledgments     			-->

    <section title="Acknowledgments" numbered="no">

      <t>
   The motivation for this document was several IESG DISCUSSes on recent
   DHCP relay agent options.
      </t>

      <t>
   Thanks to Kim Kinnear, Jinmei Tatuya, Francis Dupont, and Tomek
   Mrugalski for reviewing and helping to improve the document.
   Thanks to the authors of <xref target="RFC3315"/> for the original
   Section 21.1 text.
      </t>

    </section>

  </back>
</rfc>
