xref: /openbsd/usr.sbin/dhcrelay6/dhcrelay6.8 (revision 09467b48)
1.\"	$OpenBSD: dhcrelay6.8,v 1.2 2017/03/17 16:45:27 jmc Exp $
2.\"
3.\" Copyright (c) 1997 The Internet Software Consortium.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\"
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of The Internet Software Consortium nor the names
16.\"    of its contributors may be used to endorse or promote products derived
17.\"    from this software without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
20.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23.\" DISCLAIMED.  IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
24.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
27.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE.
32.\"
33.\" This software has been written for the Internet Software Consortium
34.\" by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
35.\" Enterprises.  To learn more about the Internet Software Consortium,
36.\" see ``http://www.isc.org/isc''.  To learn more about Vixie
37.\" Enterprises, see ``http://www.vix.com''.
38.\"
39.Dd $Mdocdate: March 17 2017 $
40.Dt DHCRELAY6 8
41.Os
42.Sh NAME
43.Nm dhcrelay6
44.Nd Dynamic Host Configuration Protocol relay agent
45.Sh SYNOPSIS
46.Nm
47.Op Fl dlov
48.Op Fl E Ar enterprise-number
49.Op Fl I Ar interface-id
50.Op Fl R Ar remote-id
51.Fl i Ar interface
52.Ar destination ...
53.Sh DESCRIPTION
54The
55.Nm
56utility provides a means for relaying DHCPv6 requests from a subnet to
57which no DHCP server is directly connected to one or more DHCPv6 servers
58on other subnets.
59.Pp
60.Nm
61listens for DHCPv6 requests on a given interface.
62When a query is received,
63.Nm
64forwards it to the list of DHCP destinations specified on the command
65line.
66When a reply is received, it is sent on the network from whence the
67original request came.
68.Pp
69The
70.Ar destination
71might be an address followed by a `%' and an interface name,
72or just an interface name (e.g. "2001:db8::1%em0" or "em1").
73When no address is specified
74.Nm
75will use multicast on the specified interface.
76.Pp
77The options are as follows:
78.Bl -tag -width Ds
79.It Fl d
80Do not daemonize.
81If this option is specified,
82.Nm
83will run in the foreground and log to
84.Em stderr .
85.It Fl E Ar enterprise-number
86Choose the
87.Ar enterprise-number
88that will be used by the Remote-ID option (this only has effect when using
89.Fl R ) .
90.It Fl I Ar interface-id
91The
92.Ar interface-id
93relay agent information option value that
94.Nm
95should use on relayed packets.
96If this option is not specified it will use the interface name by
97default.
98.Pp
99Avoid using this option when using Lightweight DHCPv6 Relay Mode
100(layer 2 relay), otherwise
101.Nm
102will always send replies back to the client interface, which will break
103networks with multiple DHCPv6 layer 2 relay agents.
104.It Fl i Ar interface
105The name of the network interface
106which will receive client DHCPv6 requests.
107For layer 3 mode at least one IPv6 local, site or global address has to
108be configured on this interface.
109.It Fl l
110Use the Lightweight DHCPv6 Relay Agent mode (layer 2 relaying).
111.It Fl o
112Add the Interface-ID option.
113This option is activated by default when using layer 2 relaying.
114.It Fl R Ar remote-id
115Enable and add the specified Relay Agent
116.Ar remote-id
117to identify this relay segment.
118.It Fl v
119Debug mode.
120This option will make
121.Nm
122run in the foreground, log to
123.Em stderr
124and show verbose messages.
125.El
126.Sh EXAMPLES
127Relay multicast packets in the current network to a unicast address
128(the relay must have a global address in em0):
129.Pp
130.Dl # dhcrelay6 -i em0 2001:db8::1000%em0
131.Pp
132Listen to one subnet and multicast DHCPv6 packets to another
133(requires at least link-local addresses):
134.Pp
135.Dl # dhcrelay6 -i em0 em1
136.Pp
137Relay DHCPv6 packets with Interface-ID (option 18) using the input
138interface as its content:
139.Pp
140.Dl # dhcrelay6 -o -i em0 2001:db8::1000%em0
141.Pp
142Same thing as before but with a custom Interface-ID:
143.Pp
144.Dl # dhcrelay6 -o -I \(dqOpenBSD Router 1\(dq -i em0 2001:db8::1000%em0
145.Pp
146Use Lightweight DHCPv6 Relay Agent (layer 2 relay) in a bridged or
147switched network (no IPv6 address required).
148Only makes sense when em0 and em1 are configured in a
149.Xr bridge 4 ,
150since
151.Nm
152needs to drop the original DHCPv6 packets and send modified ones with
153Interface-ID option.
154.Pp
155.Dl # dhcrelay6 -l -i em0 em1
156.Pp
157Identify a segment using Lightweight DHCPv6 Relay Agent (layer 2 relay)
158with a Remote-ID (option 37) instead of an Interface-ID:
159.Pp
160.Dl # dhcrelay6 -l -R \&"OpenBSD Router A\&" -i em0 em1
161.Sh SEE ALSO
162.Xr bridge 4 ,
163.Xr dhcrelay 8
164.Sh STANDARDS
165.Rs
166.%A R. Droms
167.%A J. Bound
168.%A B. Volz
169.%A T. Lemon
170.%A C. Perkins
171.%A M. Carney
172.%D July 2003
173.%R RFC 3315
174.%T Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
175.Re
176.Pp
177.Rs
178.%A B. Volz
179.%D August 2006
180.%R RFC 4649
181.%T Dynamic Host Configuration Protocol for IPv6 (DHCPv6) Relay Agent Remote-ID Option
182.Re
183.Pp
184.Rs
185.%A D. Miles
186.%A S. Ooghe
187.%A W. Dec
188.%A S. Krishnan
189.%A A. Kavanagh
190.%D May 2011
191.%R RFC 6221
192.%T Lightweight DHCPv6 Relay Agent
193.Re
194.Sh AUTHORS
195.An -nosplit
196.Xr dhcrelay 8
197was written by
198.An Ted Lemon Aq Mt mellon@fugue.com
199and reworked by
200.An Henning Brauer Aq Mt henning@openbsd.org .
201.Pp
202IPv6 support was implemented by
203.An Rafael Zalamena Aq Mt rzalamena@openbsd.org .
204