# DHCP Relay/Helper

**URL:** <https://forums.suse.com/t/dhcp-relay-helper/23046>\
**Category:** Chatting over the Back Fence\
**Created:** [September 4, 2012, 5:59am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046 "2012-09-04T05:59:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [September 4, 2012, 5:59am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/1 "2012-09-04T05:59:42Z")

</div>

Can anyone please confirm something about DHCP Relay?

Does the DHCP server have to be on a subnet that is attached to the  
DHCP Reay?

So if I have a network like this:

Network A  
O  
| 192.168.0.x/24  
|  
|  
O Router A - DHCP Relay  
|  
| 192.168.1.x/24  
|  
|  
O Router B  
|  
|  
| 192.168.2.x/24  
O  
Network B w/ DHCP Server

Client on Network A issues a DHCP request. Router A DHCP relay points  
to the IP address of a server in network B - will this fail?

I’ve read a couple of articles implying it will.

Cheers,  
Scott

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [September 4, 2012, 9:19am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/2 "2012-09-04T09:19:17Z")

</div>

Scott,  
[color=blue]

> will this fail?[/color]

yes - DHCP requests are broadcasts, and a DHCP helper takes the  
broadcast, and converts it to a unicast packet destined for the helper  
address. Since broadcasts don’t cross routers (imagine the possibility  
for feedback loops!) the help must be on the same segment

–

Shaun Pond

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [September 4, 2012, 10:49am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/3 "2012-09-04T10:49:12Z")

</div>

On 04.09.2012 04:59, Scott A. Campbell wrote:[color=blue]

> Can anyone please confirm something about DHCP Relay?
> 
> Does the DHCP server have to be on a subnet that is attached to the  
> DHCP Reay?
> 
> So if I have a network like this:
> 
> Network A  
> O  
> | 192.168.0.x/24  
> |  
> |  
> O Router A - DHCP Relay  
> |  
> | 192.168.1.x/24  
> |  
> |  
> O Router B  
> |  
> |  
> | 192.168.2.x/24  
> O  
> Network B w/ DHCP Server
> 
> Client on Network A issues a DHCP request. Router A DHCP relay points  
> to the IP address of a server in network B - will this fail?[/color]

No. The DHCP Relay must be connected to the same network as the client.  
That’s the only restriction.  
[color=blue]

> I’ve read a couple of articles implying it will.[/color]

Example?

## CU,

Massimo Rosen  
Novell Knowledge Partner  
No emails please!  
[http://www.cfc-it.de](http://www.cfc-it.de)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [September 4, 2012, 10:52am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/4 "2012-09-04T10:52:07Z")

</div>

On 04.09.2012 08:19, Shaun Pond wrote:[color=blue]

> Scott,  
> [color=green]
> 
> > will this fail?[/color]
> 
> yes - DHCP requests are broadcasts, and a DHCP helper takes the  
> broadcast, and converts it to a unicast packet[/color]

So why would it fail when - as your perfectly correct explanation says -  
the relay turns it into an unicast? 😉  
[color=blue]

> destined for the helper  
> address. Since broadcasts don’t cross routers (imagine the possibility  
> for feedback loops!) the help must be on the same segment[/color]

Correct, but that wasn’t the question. The helper must be on the same  
subnet as the client, certainly. But the DHCP _server_ can be on a  
remote subnet from the dhcp helper (or relay).

## CU,

Massimo Rosen  
Novell Knowledge Partner  
No emails please!  
[http://www.cfc-it.de](http://www.cfc-it.de)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [September 4, 2012, 11:23am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/5 "2012-09-04T11:23:17Z")

</div>

Massimo,

oops - early morning (2 hours sleep isn’t enough, I’ve just found :))  
thanks for catching that

–

Shaun Pond

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [September 5, 2012, 1:52am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/6 "2012-09-05T01:52:09Z")

</div>

Massimo Rosen wrote:  
[color=blue]

> No. The DHCP Relay must be connected to the same network as the  
> client. That’s the only restriction.[/color]

Fantastic!  
[color=blue][color=green]

> > I’ve read a couple of articles implying it will.[/color]  
> > Example?[/color]

[http://www.networkworld.com/community/node/26204](http://www.networkworld.com/community/node/26204)

“Relay agents receive Dynamic Host Configuration Protocol (DHCP)  
messages and then generate a new DHCP message to send out on another  
interface.”

There was another article which had a similar comment, but I can’t find  
it now and I wasn’t too sure about whether unicast could travel subnets.

That combined with abject failure when configuring something that looks  
pretty simple made me wonder if I was expecting too much 🙂

Thanks for the reply Massimo 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [September 5, 2012, 1:53am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/7 "2012-09-05T01:53:16Z")

</div>

Shaun Pond wrote:  
[color=blue]

> oops - early morning (2 hours sleep isn’t enough, I’ve just found :))  
> thanks for catching that[/color]

Thanks for the reply anyway, I think I can let you away with the lack  
of sleep… 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [September 5, 2012, 7:59am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/8 "2012-09-05T07:59:03Z")

</div>

Scott A. Campbell,[color=blue]

> “Relay agents receive Dynamic Host Configuration Protocol (DHCP)  
> messages and then generate a new DHCP message to send out on another  
> interface.”[/color]

But that is exactly what Massimo says. Ie it must be able to listen on  
the same segment as the client. It can then forward the packet on any  
other interface.

–  
Anders Gustafsson (NKP)  
The Aaland Islands (N60 E20)

Have an idea for a product enhancement? Please visit:  
[http://www.novell.com/rms](http://www.novell.com/rms)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [September 5, 2012, 10:15am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/9 "2012-09-05T10:15:52Z")

</div>

On 05.09.2012 06:59, Anders Gustafsson wrote:[color=blue]

> Scott A. Campbell,[color=green]
> 
> > “Relay agents receive Dynamic Host Configuration Protocol (DHCP)  
> > messages and then generate a new DHCP message to send out on another  
> > interface.”[/color]
> 
> But that is exactly what Massimo says. Ie it must be able to listen on  
> the same segment as the client. It can then forward the packet on any  
> other interface.  
> [/color]

Well, not quite exactly what was said. Yes, it forwards the request, but  
_not_ as Broadcast, which the original request was, but instead it sends  
a regular UDP packet with the proper target IP. That’s because (and why)  
a DHCP helper needs to know the IP address of the DHCP server. If it  
would just forward/recreate another broadcast, _then_ it would only work  
when the server too is directly connected to it. And in that case, the  
DHCP helper wouldn’t need to know the IP of the server.

## CU,

Massimo Rosen  
Novell Knowledge Partner  
No emails please!  
[http://www.cfc-it.de](http://www.cfc-it.de)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [September 5, 2012, 11:58am UTC](https://forums.suse.com/t/dhcp-relay-helper/23046/10 "2012-09-05T11:58:46Z")

</div>

Massimo Rosen,[color=blue]

> Yes, it forwards the request, but  
> _not_ as Broadcast, which the original request was, but instead it sends  
> a regular UDP packet with the proper target IP. That’s because (and why)  
> a DHCP helper needs to know the IP address of the DHCP server.[/color]

Yes. In that context, the sentence:

“Relay agents receive Dynamic Host Configuration Protocol (DHCP)  
messages and then generate a new DHCP message to send out on another  
interface.”

Is wrong or at least incomplete as it leads the reader to think that it is  
“just” a new DHCP message.

–  
Anders Gustafsson (NKP)  
The Aaland Islands (N60 E20)

Have an idea for a product enhancement? Please visit:  
[http://www.novell.com/rms](http://www.novell.com/rms)
