Subject: [dhcwg] Regarding DHCP Discover with Dest Ip as subnet broadcast

From: Venkataratnam Naidu <[email-masked]>
Date: Mon, 18 May 2020 21:12:23 +0530

Hi Experts,

As per the RFC, The DHCP client broadcasts DHCPDISCOVER, DHCPREQUEST and
DHCPINFORM messages, unless the client knows the address of a DHCP server.

Broadcast here means only all network broadcast(255.255.255.255) , or does
it also includes the subnet broadcast.

when Destination Ip(in ip header) is "subnet broadcast", would like to know
the dhcp server behavior with below cases.
1. Destination ip is "subnet broadcast"  and the destination mac is
FF:FF:FF:FF:FF:FF
2. Destination ip is "subnet broadcast" and the destination mac is "unicast
mac"

Regards,
Venkat.

---

From: Ted Lemon <[email-masked]>
Date: Mon, 18 May 2020 11:59:05 -0400

On May 18, 2020, at 11:42 AM, Venkataratnam Naidu <[email-masked]> wrote:
> Broadcast here means only all network broadcast(255.255.255.255) , or does it also includes the subnet broadcast.  

You want the link-local (255.255.255.255) broadcast. The subnet broadcast could in theory work, but if it’s resolving to a station address and not the ethernet broadcast address, you don’t have a subnet, and the host is not interpreting it as a broadcast address. You should just use 255.255.255.255—this will always work.

---

From: Venkataratnam Naidu <[email-masked]>
Date: Mon, 18 May 2020 21:53:03 +0530

Hi Ted Lemon,

Thank you for the reply.  Dhcp client using 255.255.255.255 always works.
But wanted to know the dhcp server behavior when it receives
Discover/Request with below. And also would like to know any dhcp-client
implementations using the "subnet broadcast" as destination ip.

Regards,
Venkat.

On Mon, May 18, 2020 at 9:29 PM Ted Lemon <[email-masked]> wrote:

> You want the link-local (255.255.255.255) broadcast. The subnet broadcast
> could in theory work, but if it’s resolving to a station address and not
> the ethernet broadcast address, you don’t have a subnet, and the host is
> not interpreting it as a broadcast address. You should just use
> 255.255.255.255—this will always work.
>
>
>

---

From: Ted Lemon <[email-masked]>
Date: Mon, 18 May 2020 12:46:05 -0400

On May 18, 2020, at 12:23 PM, Venkataratnam Naidu <[email-masked]> wrote:
> Thank you for the reply.  Dhcp client using 255.255.255.255 always works. But wanted to know the dhcp server behavior when it receives Discover/Request with below. And also would like to know any dhcp-client implementations using the "subnet broadcast" as destination ip.

If you don’t see the behavior called out explicitly in the spec, you should not count on there being any standard behavior.  No correctly implemented client will use the subnet broadcast address, because this will not work in all cases. Some client that isn’t able to use the link-local broadcast may use subnet broadcast and hope for the best, but you can assume that there will be cases where this definitely will not work. If the client tries to do anything other than DHCPINFORM this way, there is a good chance that the DHCP server will guess the wrong subnet and give an address that won’t work. Or it might work just fine. But using the 255.255.255.255 broadcast is required for broadcast packets, not optional.

The DHCP server is permitted to unicast its response, and a client with no address listening on 0.0.0.0 is expected to handle this correctly.

---

From: Venkataratnam Naidu <[email-masked]>
Date: Tue, 19 May 2020 20:25:11 +0530

Hi Ted Lemon,

Thank you for your valuable feedback.

Regards,
Venkat.

On Mon, May 18, 2020 at 10:16 PM Ted Lemon <[email-masked]> wrote:

> If you don’t see the behavior called out explicitly in the spec, you
> should not count on there being any standard behavior.  No correctly
> implemented client will use the subnet broadcast address, because this will
> not work in all cases. Some client that isn’t able to use the link-local
> broadcast may use subnet broadcast and hope for the best, but you can
> assume that there will be cases where this definitely will not work. If the
> client tries to do anything other than DHCPINFORM this way, there is a good
> chance that the DHCP server will guess the wrong subnet and give an address
> that won’t work. Or it might work just fine. But using the 255.255.255.255
> broadcast is required for broadcast packets, not optional.
>
> The DHCP server is permitted to unicast its response, and a client with no
> address listening on 0.0.0.0 is expected to handle this correctly.
>
>