OpenBSD manual page server

Manual Page Search Parameters

DHCRELAY6(8) System Manager's Manual DHCRELAY6(8)

dhcrelay6Dynamic Host Configuration Protocol for IPv6 (DHCPv6) relay agent

dhcrelay6 [-dlov] [-E enterprise-number] [-I interface-id] [-R remote-id] -i interface destination ...

The dhcrelay6 utility provides a means for relaying DHCPv6 requests from a subnet to which no DHCP server is directly connected to one or more DHCPv6 servers on other subnets.

dhcrelay6 listens for DHCPv6 requests on a given interface. When a query is received, dhcrelay6 forwards it to the list of DHCP destinations specified on the command line. When a reply is received, it is sent on the network from whence the original request came.

The destination might be an address followed by a `%' and an interface name, or just an interface name (e.g. "2001:db8::1%em0" or "em1"). When no address is specified, dhcrelay6 will use multicast on the specified interface.

The options are as follows:

Do not daemonize. If this option is specified, dhcrelay6 will run in the foreground and log to stderr.
Choose the enterprise-number that will be used by the Remote-ID option (this only has effect when using -R).
The interface-id relay agent information option value that dhcrelay6 should use on relayed packets. If this option is not specified, it will use the interface name by default.

Avoid using this option when using Lightweight DHCPv6 Relay Mode (layer 2 relay), otherwise dhcrelay6 will always send replies back to the client interface, which will break networks with multiple DHCPv6 layer 2 relay agents.

The name of the network interface which will receive client DHCPv6 requests. For layer 3 mode at least one IPv6 local, site or global address has to be configured on this interface.
Use the Lightweight DHCPv6 Relay Agent mode (layer 2 relaying).
Add the Interface-ID option. This option is activated by default when using layer 2 relaying.
Enable and add the specified Relay Agent remote-id to identify this relay segment.
Debug mode. This option will make dhcrelay6 run in the foreground, log to stderr and show verbose messages.

Relay multicast packets in the current network to a unicast address (the relay must have a global address in em0):

# dhcrelay6 -i em0 2001:db8::1000%em0

Listen to one subnet and multicast DHCPv6 packets to another (requires at least link-local addresses):

# dhcrelay6 -i em0 em1

Relay DHCPv6 packets with Interface-ID (option 18) using the input interface as its content:

# dhcrelay6 -o -i em0 2001:db8::1000%em0

Same thing as before but with a custom Interface-ID:

# dhcrelay6 -o -I "OpenBSD Router 1" -i em0 2001:db8::1000%em0

Use Lightweight DHCPv6 Relay Agent (layer 2 relay) in a bridged or switched network (no IPv6 address required). Only makes sense when em0 and em1 are configured in a bridge(4), since dhcrelay6 needs to drop the original DHCPv6 packets and send modified ones with Interface-ID option.

# dhcrelay6 -l -i em0 em1

Identify a segment using Lightweight DHCPv6 Relay Agent (layer 2 relay) with a Remote-ID (option 37) instead of an Interface-ID:

# dhcrelay6 -l -R "OpenBSD Router A" -i em0 em1

bridge(4), dhcrelay(8)

R. Droms, J. Bound, B. Volz, T. Lemon, C. Perkins, and M. Carney, Dynamic Host Configuration Protocol for IPv6 (DHCPv6), RFC 3315, July 2003.

B. Volz, Dynamic Host Configuration Protocol for IPv6 (DHCPv6) Relay Agent Remote-ID Option, RFC 4649, August 2006.

D. Miles, S. Ooghe, W. Dec, S. Krishnan, and A. Kavanagh, Lightweight DHCPv6 Relay Agent, RFC 6221, May 2011.

dhcrelay(8) was written by Ted Lemon <> and reworked by Henning Brauer <>.

IPv6 support was implemented by Rafael Zalamena <>.

March 2, 2023 OpenBSD-current