| DHCRELAY6(8) | System Manager's Manual | DHCRELAY6(8) |
dhcrelay6 —
Dynamic 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:
-ddhcrelay6 will run in the foreground and log to
stderr.-E
enterprise-number-R).-I
interface-iddhcrelay6 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-l-o-R
remote-id-v-d.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%em0Listen to one subnet and multicast DHCPv6 packets to another (requires at least link-local addresses):
# dhcrelay6 -i em0 em1Relay DHCPv6 packets with Interface-ID (option 18) using the input interface as its content:
# dhcrelay6 -o -i em0
2001:db8::1000%em0Same thing as before but with a custom Interface-ID:
# dhcrelay6 -o -I "OpenBSD
Router 1" -i em0 2001:db8::1000%em0Use 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
em1Identify 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 em1R. 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 <mellon@fugue.com> and reworked by Henning Brauer <henning@openbsd.org>.
IPv6 support was implemented by Rafael Zalamena <rzalamena@openbsd.org>.
| May 16, 2025 | Debian |