DHCRELAY6(8)

NAME
dhcrelay6 - Dynamic Host Configuration Protocol relay agent

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

DESCRIPTION
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:

-d  Do not daemonize. If this option is specified, dhcrelay6 will run in the foreground and log to stderr.

-E enterprise-number
    Choose the enterprise-number that will be used by the Remote-ID option (this only has effect when using -R).

-I interface-id
    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.

-i interface
    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.

-l  Use the Lightweight DHCPv6 Relay Agent mode (layer 2 relaying).

-o  Add the Interface-ID option. This option is activated by default when using layer 2 relaying.

-R remote-id
    Enable and add the specified Relay Agent remote-id to identify this relay segment.

-v  Debug mode. This option will make dhcrelay6 run in the foreground, log to stderr and show verbose messages.

EXAMPLES
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

SEE ALSO
bridge(4), dhcrelay(8)

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

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

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

AUTHORS
-nosplit dhcrelay(8) was written by Ted Lemon <mellon@fugue.com> and reworked by Henning Brauer <henning@openbsd.org>.

IPv6 support was implemented by Rafael Zalamena <rzalamena@openbsd.org>.