DHCP relay#
The second tab of DHCP, at /dhcp.
A DHCP client broadcasts, and a broadcast does not cross a router. When the server that should answer lives on another network — one server for the whole site rather than one per router — the router in between has to pick the request up and pass it on. That is a relay.
The relay#
When it is on, the panel lists the interfaces it listens on, the interfaces it forwards out of, the DHCP servers it relays to, and whether it is on. When it is off, Turn on the DHCP relay opens the form; Edit opens the same form for a relay that exists.
| Field | What it takes |
|---|---|
| Listen on | a checkbox for every interface, VLANs included: the networks with the clients |
| Forward out of | the interfaces facing the server |
| DHCP servers | the servers' IPv4 addresses |
| Disabled | keeps the settings and relays nothing |
Save needs at least one of each. Turn off removes the relay after asking.
A relay configured on an older release may list its interfaces in a single list, shown as Relays on (older form). That list cannot be combined with the two above: clear it before choosing listening and forwarding interfaces.
Which interfaces go where#
- Listen on is the network with the clients: the LAN, the VLAN, the guest network.
- Forward out of is the interface facing the server. The relay's address there is where the server sends its answer, and the address the relay listens on tells the server which of its pools to use. Get it wrong and the server answers from the wrong pool, or not at all.
What has to be true elsewhere#
A relay has three sides, and this page configures one of them.
- The router must reach the server: a route to its network, and a firewall that lets the forwarded requests out and the answers back.
- The server must have a pool for the relayed network. A server with only its own network configured ignores requests from yours.
- Nothing else may answer the clients. See the warning above.
What breaks if you get it wrong#
- A relay and a server on one interface. Inconsistent addressing, described above.
- The wrong forwarding interface. The server does not recognise the network the request comes from and does not answer; clients time out, which looks exactly like no relay.
- No address on the listening interface. The relay needs one to relay from.
- Firewall. The router now sends traffic to the server and receives answers. A strict input policy written when the router answered DHCP itself does not necessarily allow it.
See also#
- DHCP — the local server, which is the alternative to relaying.
- DHCP and IPv6 — the third tab.
- Static routes — reaching the server's network.