<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc rfcedstyle="yes" ?>
<?rfc subcompact="no" ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="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 rfc2132 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2132.xml'>
    <!ENTITY rfc3046 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3046.xml'>
    <!ENTITY rfc3074 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3074.xml'>

    <!ENTITY rfc3118 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3118.xml'>
    <!ENTITY rfc4030 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4030.xml'>
]>
<rfc number="5010" category="std">

<front>
<title abbrev="Relay Agent Flags Suboption">
    The Dynamic Host Configuration Protocol Version 4 (DHCPv4) Relay Agent Flags Suboption
</title>
<author initials="K." surname="Kinnear" fullname="Kim Kinnear">
<organization>Cisco Systems, Inc.</organization>
<address>
<postal>

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

<address>
<postal>
<street>1414 Massachusetts Ave.</street>
<city>Boxborough</city><region>MA</region><code>01719</code>
<country>US</country>
</postal>
<phone>+1 978 936 0000</phone>
<email>mnormoyle@cisco.com</email>
</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>US</country>
</postal>
<phone>+1 978 936 0000</phone>
<email>mjs@cisco.com</email>

</address>
</author>

<date month="August" year="2007"></date>
<workgroup>DHC</workgroup>
<keyword>I-D</keyword>
<keyword>Internet-Draft</keyword>
<keyword>DHCP</keyword>

<abstract>
<t>
This memo defines a new suboption of the Dynamic Host Configuration
Protocol (DHCP) relay agent information
option that allows the DHCP relay to specify flags for the forwarded
packet. One flag is defined to indicate whether the DHCP relay
received the packet via a unicast or broadcast packet. This
information may be used by the DHCP server to better serve
clients based on whether their request was originally broadcast 
or unicast.
</t>

</abstract>

</front>

<middle>

<!-- =============================================================== -->

<section title="Introduction">

<t>
Any time a client's DHCP packet is broadcast, a local
DHCP relay will process its request and forward it on to the DHCP server.
When the DHCP relay performs this function, it can be configured to
use the DHCP relay agent information option to forward additional
information to the DHCP server, which the server may then use 
to alter its processing algorithms.
Once the lease has been granted, however, future DHCP 
DHCPREQUEST/RENEWAL messages 
are unicast directly to the DHCP Server
<xref target='RFC2131'/>
<xref target='RFC2132'/>
<xref target='RFC3046'/>.
</t> 

<t>

In general, DHCP servers may also make subtle (and sometimes not so 
subtle) changes in their processing algorithms depending on whether or 
not the DHCP server received the message as a unicast packet from 
the DHCP client directly, a broadcast packet from the DHCP client 
on a locally connected network, or a unicast packet from a DHCP Relay Agent,
which has forwarded on a packet broadcast from a DHCP client connected 
to a network local to the DHCP Relay Agent.
</t>

<t>
In some situations, DHCP Clients may unicast their DHCPREQUEST/RENEW
packets to the DHCP Relay Agent, which will forward the packet on to
the DHCP server. In these cases, the DHCP server cannot tell whether
the packet was broadcast or unicast by the DHCP client, and so it may
be unable to process the DHCP client packets in the manner that it
would if it knew whether the original DHCP packet was broadcast or
unicast.  For example, a server might be willing to NAK a client in
the REBINDING state based on a determination that the client's address
does not match its location in the network, but might not be willing
to do so if the client is in the RENEWING state.
</t>

<t>
The purpose of the suboption described in this document is to allow 
the DHCP relay to specify flags for the forwarded packet. These
flags can be used to describe DHCP client attributes that 
are useful to the DHCP server, but can only be detected by the 
local DHCP relay. The DHCP server can use the information 
provided by the DHCP relay to improve its processing algorithms.
</t>

<t>
One flag is defined to indicate whether the DHCP relay
received the packet via a unicast or broadcast packet. This allows
the DHCP server to know if a packet forwarded on by a DHCP Relay Agent 
was broadcast or unicast to the DHCP Relay Agent.
</t>



</section>

<!-- =============================================================== -->

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

</section>

<!-- =============================================================== -->

<section title="The Flags Suboption">

<t>
The Flags suboption provides an extensible suboption definition
for several possible flags. The first flag defined is the unicast flag.
</t>

<figure>
<preamble>The format of the suboption is:</preamble>
<artwork>
       0                   1                   2  
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Code      |    Length     |    Flags      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

        Code     The suboption code (10).

        Length   The suboption length, 1 octet.
        
        Flags    The Relay Agent flags for this forwarded packet.
                    
                    0 1 2 3 4 5 6 7 
                   +-+-+-+-+-+-+-+-+
                   |U|    MBZ      |
                   +-+-+-+-+-+-+-+-+

                   U:  UNICAST flag

                        unicast = 1
                        broadcast = 0

                   MBZ:  MUST BE ZERO (reserved for future use)
</artwork>
</figure>

</section>

<section title="DHCP Relay Agent Behavior">

<t>
A DHCP relay agent that claims to conform to this specification MUST
include this suboption in every Relay Agent Information Option <xref
target="RFC3046"/> it adds to a forwarded DHCP request.  In this way,
the DHCP server can distinguish a request forwarded from a DHCP relay
agent that does not support the relay-agent-flags suboption from a
request forwarded by a DHCP relay agent that supports the
relay-agent-flags suboption, and which received the request that is
being forwarded in a broadcast packet.
</t>

<t>
To put this another way, A DHCP relay agent that supports the
relay-agent-flags suboption MUST always include it in every
relay-agent-information-option that it inserts into packets that it
forwards on to the DHCP server, whether the packet it is forwarding
was received as a broadcast or as a unicast.  This is because the DHCP
server will
<?rfc needLines="5" ?>
be dealing with DHCP relay agents that support the
relay-agent-flags suboption as well as DHCP relay agents that do not
support the relay-agent-flags suboption.
</t>

</section>

<section title="DHCP Server Behavior">

<t>
This option provides additional information to the DHCP server.  The
DHCP server MAY use this information to make processing decisions
regarding the DHCP Client's packet that it is processing.  For
instance, knowledge of the broadcast or unicast reception of a packet
by a DHCP relay agent could be used when making the processing
decisions required to implement Load Balancing <xref
target="RFC3074"/>. A load-balancing server may be willing to respond
to a REBINDING client, but the server cannot determine the client's
state without this additional indication.
</t>

<t>
The option length is one octet. If the DHCP server receives a 
relay-agent-flags suboption that is longer than one octet, it MUST
evaluate the first octet.
</t>

<t>
Note to implementors:
In specifying the behavior of new flags bits in the future, careful
attention must be paid to compatibility with earlier implementations.
If additional flags values are defined in the future, it will not
always be possible to distinguish between messages from relay agents
who understand the new value and set its value to 'zero', and relay
agents who are simply setting a series of unassigned bits to
'zero'. It would be a mistake to specify significant behavior changes
based on 'zero' values of flags specified in the future.
</t>

</section>

<section title="Security Considerations">

<t>
Message authentication in DHCP for intradomain use, where the out-of-
band exchange of a shared secret is feasible, is defined in 
<xref target="RFC3118"/>. 
Potential exposures to attack are discussed 
in Section 7 of the DHCP protocol specification in  

<xref target="RFC2131"/>.
</t>

<t>
The DHCP Relay Agent option depends on a trusted relationship between
the DHCP relay agent and the server, as described in Section 5 of 
<xref target="RFC3046"/>.
While the introduction of fraudulent relay-agent options can
be prevented by a perimeter defense that blocks these options unless
the relay agent is trusted, a deeper defense using the authentication
option for relay agent options <xref target="RFC4030"/> 
SHOULD be deployed as well.
</t>

</section>

<section title="IANA Considerations">

<t>
IANA has assigned a suboption number (10) for the Flags
Suboption from the DHCP Relay Agent Information
Option <xref target="RFC3046"/> suboption number space.

</t>

</section>

<section title="Acknowledgements">

<t>
Thanks to David Hankins for realizing the problems created by the 
server-id-override option document and for helping us understand the 
value of finally solving this problem in a way that has general 
applicability.
</t>

</section>

<!-- ============================================================= -->

</middle>

<!-- ============================================================= -->

<back>

<references title="Normative References">
&rfc2131;
&rfc2132;
&rfc3046;
&rfc2119;
&rfc3118;
&rfc4030;
</references>

<references title="Informative References">
&rfc3074;
</references>

</back>

</rfc>
