<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="std" 
     docName="draft-ietf-dhc-relay-server-security-02.txt"
     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>USA</country>
        </postal>
        <email>volz@cisco.com</email>
      </address>
    </author>


    <author initials="Y" surname="Pal" fullname="Yogendra Pal">
      <organization>Cisco Systems, Inc.</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 year="2016" />

    <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. And, 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 <xref target="RFC1542"/> has
   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. And, 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>

    </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", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in <xref target="RFC2119"/> when they
   appear in ALL CAPS.  When these words are not in ALL CAPS (such as
   "should" or "Should"), they have their usual English meanings, and
   are not to be interpreted as <xref target="RFC2119"/> key words.
      </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>
   The following text replaces the text in RFC3315 section 21.1 and also
   applies to DHCPv4 (RFC1542) for relay to server communication.
   This revised text REQUIRES IPsec encryption of relay to relay and relay to server
   communications as relay agents
   may forward unencrypted client messages as well as include additional
   sensitive information, such as vendor-specific information (for
   example, <xref target="CableLabs-DHCP"/>) and <xref target="RFC7839"/>.
   By using IPsec with encryption, the potentially sensitive communication between relays
   and servers is protected from pervasive monitoring and other attacks.
      </t>

      <t>
   Relay agents and servers MUST exchange messages securely using the
   IPsec mechanisms described in <xref target="RFC4301"/>.  If a client
   message is relayed through multiple relay agents, each of the relay
   agents MUST have an 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>
        <list hangIndent="24" 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 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
        section 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,
        <xref target="CableLabs-DHCP"/>) and
        <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, IKEv2 <xref target="RFC7296"/> with preshared 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>


   </section>

   <section title="Security Considerations">

      <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 <xref target="I-D.ietf-dhc-sedhcpv6"/> to secure communication
   between the client and server.
      </t>

      <t>
   As mentioned in <xref target="RFC4552"/> section 14, 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 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 the systems
   themselves and if 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 which can be used to secure communication with their next hop
   relay(s).
      </t>

    </section>

    <section title="IANA Considerations">

     <t>
   This document has no requests of the fantastic IANA team.
     </t>


    </section>

    <!--  SECTION 11:  Acknowledgments     			-->

    <section title="Acknowledgments">

      <t>
   The motivation for this document was several IESG discusses on recent
   DHCP relay agent options.
      </t>

      <t>
   Thanks to Kim Kinnear, Jinmei Tatuya, and Tomek Mrugalski for reviewing
   drafts and helping to improve the document. And, thanks to the authors
   of <xref target="RFC3315"/> for the original Section 21.1 text.
      </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'?>

    </references>

    <!--  SECTION 12.2:  Informative References		-->

    <references title="Informative References">
      <?rfc include='reference.RFC.4107'?>
      <?rfc include='reference.RFC.4552'?>
      <?rfc include='reference.RFC.6221'?>
      <?rfc include='reference.RFC.7258'?>
      <?rfc include='reference.RFC.7296'?>
      <?rfc include='reference.I-D.ietf-dhc-sedhcpv6'?>
      <?rfc include='reference.RFC.7839'?>
      <?rfc include='reference.RFC.7844'?>

      <reference anchor="CableLabs-DHCP"
                 target="http://www.cablelabs.com/specification/cablelabs-dhcp-options-registry-2/">
        <front>
          <title>CableLabs' DHCP Options Registry</title>
          <author/>
          <date/>
        </front>
      </reference>

    </references>

  </back>
</rfc>
