<?xml version="1.0" encoding="US-ASCII"?>

<?rfc rfcedstyle="yes"?>
<?rfc compact="yes"?>  
<?rfc subcompact="no"?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes"?>


<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
    <!ENTITY rfc2119 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
    <!ENTITY rfc2131 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2131.xml'>
    <!ENTITY rfc3046 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3046.xml'>
    <!ENTITY rfc4030 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4030.xml'>
    <!ENTITY rfc4388 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4388.xml'>
    <!ENTITY rfc5107 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5107.xml'>
    <!ENTITY rfc4122 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4122.xml'>
]>

<rfc number="6925" ipr="trust200902" category="std" submissionType="IETF" consensus="yes">

<front>

<title abbrev="The Relay Agent ID Sub-Option">
The DHCPv4 Relay Agent Identifier Sub-Option
</title>

<author initials="B." surname="Joshi" fullname="Bharat Joshi">
<organization>Infosys Ltd.</organization>
<address>
<postal>
<street>44 Electronics City, Hosur Road</street>
<city>Bangalore</city> <code>560 100</code>
<country>India</country>
</postal>
<email>bharat_joshi@infosys.com</email>
<uri>http://www.infosys.com/</uri>
</address>
</author>

<author initials="R." surname="Desetti" fullname="D.T.V Ramakrishna Rao">
<organization>Infosys Ltd.</organization>
<address>
<postal>
<street>44 Electronics City, Hosur Road</street>
<city>Bangalore</city> <code>560 100</code>
<country>India</country>
</postal>
<email>ramakrishnadtv@infosys.com</email>
<uri>http://www.infosys.com/</uri>
</address>
</author>

<author initials="M." surname="Stapp" fullname="Mark Stapp">
<organization>Cisco Systems, Inc.</organization>
<address>
<postal>
<street>1414 Massachusetts Ave.</street>
<city>Boxborough</city> <region>MA</region> <code>01719</code>
<country>USA</country>
</postal>
<phone>+1 978 936 0000</phone>
<email>mjs@cisco.com</email>
</address>
</author>

<date month="April" year="2013"></date>

<workgroup>DHC</workgroup>

<keyword>DHCP</keyword>
<keyword>relay</keyword>

<abstract>

<t>
   This document defines a new Relay Agent Identifier sub-option for
   the Dynamic Host Configuration Protocol (DHCP) Relay Agent Information
   option.  The sub-option carries a value that uniquely identifies the
   relay agent device within the administrative domain.  The value is
   normally administratively configured in the relay agent.  The
   sub-option allows a DHCP relay agent to include the identifier in the
   DHCP messages it sends.
</t>

</abstract>

</front>

<middle>


<section title="Introduction" anchor="section.intro">

<t>
   The Dynamic Host Configuration Protocol for IPv4 (DHCPv4)
   <xref target="RFC2131" />
   provides IP addresses and configuration information for IPv4 clients.
   It includes a relay agent capability, in which network elements
   receive broadcast messages from clients and forward them to DHCP
   servers as unicast messages.  In many network environments, relay
   agents add information to the DHCP messages before forwarding them,
   using the Relay Agent Information option <xref
target="RFC3046" />.  Servers that
   recognize the Relay Agent Information option echo it back in their
   replies.
</t>

<t>
   This specification introduces a Relay Agent Identifier (Relay-ID) sub-option
   for the Relay Agent Information option.  The Relay-ID sub-option carries a
   sequence of octets that is intended to uniquely identify the relay
   agent within the administrative domain. In this document,
   an administrative domain consists of all DHCP servers and relay agents
   that communicate with each other.
</t>
</section>

<section title="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" />.

</t>

<t>
DHCPv4 terminology is defined in <xref target="RFC2131"/>, and the
DHCPv4 Relay Agent Information option is defined in <xref
target="RFC3046"/>.
</t>

</section>

<section title="Example Use Cases">

<section title="Bulk Leasequery">

<t>
   There has been quite a bit of recent interest in extending the DHCP
   Leasequery protocol <xref
target="RFC4388" /> to accommodate some additional
   situations.  
   <xref
target="RFC6926"/> proposes a variety of
   enhancements to the existing Leasequery protocol.  The document
   describes a use case where a relay agent queries DHCP servers using
   the relay identifier to retrieve all the leases allocated through the
   relay agent.
</t>

</section>

<section title="Industrial Ethernet">
<t>

   DHCP typically identifies clients based on information in their DHCP
   messages, such as the Client-Identifier option or the value of the
   chaddr field.  In some networks, however, the location of a client --
   its point of attachment to the network -- is a more useful identifier.
   In factory-floor networks (commonly called 'industrial' networks),
   for example, the role a device plays is often fixed and based on its
   location.  Using manual address configuration is possible (and is
   common), but it would be beneficial if DHCP configuration could be
   applied to these networks.
</t>

<t>
   One way to provide connection-based identifiers for industrial
   networks is to have the network elements acting as DHCP relay agents
   supply information that a DHCP server could use as a client
   identifier.  A straightforward way to form identifier information is
   to combine something that is unique within the scope of the network
   element, such as a port/slot value, with something that uniquely
   identifies that network element, such as a Relay Agent Identifier.

</t>

</section>
</section>

<section title="Sub-Option Format">

<figure>
<preamble>Format of the Relay Agent Identifier sub-option:</preamble>
<artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |SUBOPT_RELAY_ID|    length     |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
   .                                                               .
   .                   identifier (variable)                       .
   .                                                               .
   +---------------------------------------------------------------+

   Where:

   SUBOPT_RELAY_ID   12

   length            the number of octets in the sub-option
                     (excluding the sub-option ID and length fields);
                     the minimum length is one.

   identifier        the identifying data</artwork></figure>

</section>

<section title="Identifier Stability">

<t>

   If the relay identifier is to be meaningful, it has to be stable.  A
   relay agent SHOULD use a single identifier value consistently.  The
   identifier used by a relay device SHOULD be committed to stable
   storage, unless the relay device can regenerate the value upon
   reboot.

</t>
<t>

If the Relay-ID configured in a relay agent is not unique within its
   administrative domain, resource allocation problems may occur as the
   DHCP server attempts to allocate the same resource to devices behind
   two different relay agents. Therefore, a Relay-ID configured in a relay
   agent MUST be unique within its administrative domain.
   To aid in ensuring uniqueness of Relay-IDs, relay agents SHOULD make
   their relay identifiers visible to their administrators via their
   user interface, through a log entry, through a MIB field, or through some
   other mechanism.

</t>
<t>

   Implementors of relay agents should note that the identifier needs to be
   present in all DHCP message types where its value is being used by the DHCP
   server.  The relay agent may not be able to add the Relay Agent
   Information option to all messages, such as RENEW messages sent as
   IP unicasts.  In some deployments, that might mean that the server has
   to be willing to continue to associate the relay identifier it has
   last seen with a lease that is being RENEWed.  Other deployments may
   prefer to use the Server Identifier Override sub-option <xref
target="RFC5107" /> to
   permit the relay device to insert the Relay Agent Information option
   into all relayed messages.

</t>
<t>

   Handling situations where a relay agent device is replaced is another
   aspect of stability.  One of the use cases for the relay identifier
   is to permit a server to associate clients' lease bindings with the
   relay device connected to the clients.  If the relay device is
   replaced because it has failed or been upgraded, it may be desirable
   for the new device to continue to provide the same relay identifier
   as the old device. Therefore, if a relay agent supports Relay-ID, the
   Relay-ID should be administratively configurable.

</t>

<section title="Identifier Uniqueness">

<t>
It is strongly recommended that administrators take special care to ensure
that Relay-IDs
configured in their relay agents are not duplicated.  There are a
number of strategies that may be used to achieve this.

</t>
<t>
Administrators may use a strategy to configure unique Relay-IDs.
One such strategy is that a Relay-ID on a relay agent may
reuse an existing identifier or set of identifiers that are
already guaranteed to be unique (e.g., Universally Unique Identifier (UUID) <xref target="RFC4122" />).

</t>

<t>

For administrators who are already using a provisioning system to manage their
networking infrastructure, it may work to enumerate relay agents on the basis
of roles and then, as a second step, assign those roles to specific relay
agents or groups of relay agents.   
In such a scenario, when a replacement relay agent is first seen by the DHCP
server, it could trigger a configuration event on the provisioning
system, and the new relay agent could be assigned to the role of the
relay agent it is replacing.
</t>


<t>
It may be that the DHCP server has configurable event notification
and that a duplicate Relay-ID would trigger this notification. Administrators
can take advantage of this feature to work out whether the duplication
is real and unintended or whether the original relay agent is being replaced.

</t>
<t>
A network management/provisioning system may also be able to collect a full list of all relay agents on the network.   It may then notice that more than one device reports the same Relay-ID.   In such a case, the provisioning system could notify the administrator of the fault, which could then be corrected.

</t>
<t>
This is not an exhaustive list of strategies.   We suggest an additional
strategy in the Security Considerations section. 
If none of these strategies will work, administrators are also encouraged to
consider the specifics of their own
network configuration to see if there is some way to detect duplicate Relay-IDs
other than the ones listed here.
</t>

</section>
</section>

<section title="Security Considerations">

<section title="Forged Relay ID Attacks">

<t>
   Security issues with the Relay Agent Information option and its use
   by servers in address assignment are discussed in <xref target="RFC3046" /> and
   <xref
target="RFC4030" />.
The DHCP Relay Agent Information option depends on a trusted
relationship between the DHCP relay agent and the DHCP server, as
described in Section 5 of <xref target="RFC3046" />.  While the introduction of
fraudulent DHCP Relay Agent Information options can be prevented by a
perimeter defense that blocks these options unless the DHCP relay
agent is trusted, a deeper defense using the authentication sub-option
for the DHCP Relay Agent Information option <xref target="RFC4030" /> SHOULD be
deployed as well. It also helps in avoiding duplication of relay identifiers
by malicious entities. However, implementation of the authentication sub-option for
the DHCP Relay Agent Information option <xref target="RFC4030" /> is not a must to
support the Relay-ID sub-option.
</t>
</section>


<section title="Factory-Floor Scenario">

<t>
One possible use case for the Relay-ID sub-option is the automated
configuration of machines on a factory floor.   In this situation, various
sections of the factory floor might be on their own network links with a relay
agent interposed between those links and the DHCP server.   The Relay-ID of
each relay agent might cause special configurations to be downloaded to those
devices to control their behavior.

</t>
<t>
If a relay agent was deployed on the factory floor in such a situation, with an incorrect Relay-ID, there is the potential that devices could be misconfigured in a way that could produce incorrect results, cause physical damage, or even create hazardous conditions for workers.

</t>
<t>
In deployment scenarios like this one, administrators must use some dependable technique to ensure that such misconfigurations do not occur.   It is beyond the scope of this document to provide a complete list of such techniques.

</t>
<t>
However, as an example, a relay agent device intended for use in such a
scenario could require the use of a hardware token that contains a Relay-ID
that is physically attached to the installation location of the relay agent
device and can be connected to and disconnected from the relay agent
device without the use of special tools.   Such a relay agent device should not
be operable when this hardware token is not connected to it: either it should 
fail because it presents an unknown identifier to the DHCP server, or it should
simply refuse to relay DHCP packets until the token is connected to it.

</t>
<t>

A relay agent device that does not provide a clear mitigation strategy for a scenario where misconfiguration could have damaging or hazardous consequences should not be deployed in such a scenario.

</t>

</section>
</section>

<section title="IANA Considerations" anchor="section.iana">

<t>
IANA has assigned a new sub-option code from the
"DHCP Relay Agent Sub-Option Codes" registry maintained at
http://www.iana.org/assignments/bootp-dhcp-parameters.

<list>
<t>Relay Agent Identifier Sub-Option    12</t>
</list>
</t>

</section>

<section title="Acknowledgments">

<t>

   Thanks to Bernie Volz, David W. Hankins, Pavan Kurapati, and Ted Lemon
   for providing valuable suggestions.

</t>

</section>

</middle>

<back>

<references title="Normative References">

&rfc2119;
&rfc2131;
&rfc3046;
&rfc4030;

</references>

<references title="Informative References">

&rfc4122;
&rfc4388;
&rfc5107;


<reference anchor='RFC6926'>
<front>
<title>DHCPv4 Bulk Leasequery</title>

<author initials='K' surname='Kinnear' fullname='Kim Kinnear'>
    <organization />
</author>

<author initials='M' surname='Stapp' fullname='Mark Stapp'>
    <organization />
</author>

<author initials='R' surname='Desetti' fullname='Ramakrishna Rao DTV'>
    <organization />
</author>

<author initials='B' surname='Joshi' fullname='Bharat Joshi'>
    <organization />
</author>

<author initials='N' surname='Russell' fullname='Neil Russell'>
    <organization />
</author>

<author initials='P' surname='Kurapati' fullname='Pavan Kurapati'>
    <organization />
</author>

<author initials='B' surname='Volz' fullname='Bernie Volz'>
    <organization />
</author>


<date month='April' year='2013' />

</front>
<seriesInfo name='RFC' value='6926' />
</reference>

</references>

</back>

</rfc>

