]> git.ipfire.org Git - thirdparty/dhcp.git/blame - relay/dhcrelay.8
Merge changes between 3.0rc7 and 3.0rc8pl2.
[thirdparty/dhcp.git] / relay / dhcrelay.8
CommitLineData
0e7affc7
TL
1.\" dhcrelay.8
2.\"
866428dd 3.\" Copyright (c) 1997, 1998 The Internet Software Consortium.
0e7affc7
TL
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.TH dhcrelay 8
39.SH NAME
d73361d0 40dhcrelay - Dynamic Host Configuration Protocol Relay Agent
0e7affc7
TL
41.SH SYNOPSIS
42.B dhcrelay
43[
44.B -p
45.I port
46]
47[
48.B -d
49]
50[
a138b5dd
TL
51.B -q
52]
53[
0e7affc7
TL
54.B -i
55.I if0
56[
57.B ...
58.B -i
59.I ifN
60]
61]
866428dd
TL
62[
63.B -a
64]
65[
66.B -A
67.I length
68]
69[
70.B -D
71]
72[
73.B -m
74.I append
75|
76.I replace
77|
78.I forward
79|
80.I discard
81]
0e7affc7
TL
82.I server0
83[
84.I ...serverN
85]
86.SH DESCRIPTION
87The Internet Software Consortium DHCP Relay Agent, dhcrelay, provides a
88means for relaying DHCP and BOOTP requests from a subnet to which
e997d30a 89no DHCP server is directly connected to one or more DHCP servers on other
0e7affc7
TL
90subnets.
91.SH OPERATION
92.PP
866428dd
TL
93The DHCP Relay Agent listens for DHCP and BOOTP queries and responses.
94When a query is received from a client, dhcrelay forwards it to the
95list of DHCP servers specified on the command line. When a reply is
96received from a server, it is broadcast or unicast (according to the
97relay agent's ability or the client's request) on the network from
98which the original request came.
0e7affc7
TL
99.SH COMMAND LINE
100.PP
101The names of the network interfaces that dhcrelay should attempt to
102configure may be specified on the command line using the
866428dd 103.B -i
0e7affc7
TL
104option. If no interface names
105are specified on the command line dhcrelay will identify all network
106interfaces, elimininating non-broadcast interfaces if possible, and
107attempt to configure each interface.
108.PP
d758ad8c 109The
866428dd 110.B -i
d758ad8c
TL
111flag can be used to specify the network interfaces on which the relay
112agent should listen. In general, it must listen not only on those
113network interfaces to which clients are attached, but also on those
114network interfaces to which the server (or the router that reaches the
115server) is attached. However, in some cases it may be necessary to
116exclude some networks; in this case, you must list all those network
117interfaces that should \fInot\fR be excluded using the \fB-i\fR flag.
866428dd 118.PP
d758ad8c 119In some cases it
866428dd
TL
120.I is
121helpful for the relay agent to forward requests from networks on which
122a DHCP server is running to other DHCP servers. This would be the
123case if two DHCP servers on different networks were being used to
124provide backup service for each other's networks.
125.PP
0e7affc7
TL
126If dhcrelay should listen and transmit on a port other than the
127standard (port 67), the
128.B -p
129flag may used. It should be followed by the udp port number that
130dhcrelay should use. This is mostly useful for debugging purposes.
131.PP
a138b5dd 132Dhcrelay will normally run in the foreground until it has configured
0e7affc7
TL
133an interface, and then will revert to running in the background.
134To run force dhcrelay to always run as a foreground process, the
135.B -d
136flag should be specified. This is useful when running dhcrelay under
137a debugger, or when running it out of inittab on System V systems.
138.PP
a138b5dd 139Dhcrelay will normally print its network configuration on startup.
d758ad8c 140This can be unhelpful in a system startup script - to disable this
a138b5dd 141behaviour, specify the
866428dd 142.B -q
a138b5dd 143flag.
866428dd
TL
144.SH RELAY AGENT INFORMATION OPTIONS
145If the
146.B -a
147flag is set the relay agent will append an agent option field to each
148request before forwarding it to the server. Agent option fields in
149responses sent from servers to clients will be stripped before
150forwarding such responses back to the client.
151.PP
152The agent option field will contain two agent options: the Circuit ID
153suboption and the Agent ID suboption. Currently, the Circuit ID will
154be the printable name of the interface on which the client request was
155received. The Agent ID will be the value that the relay agent stores
156in the DHCP packet's giaddr field. The client supports inclusion of
157a Remote ID suboption as well, but this is not used by default.
158.PP
159.I Note:
160The Agent ID suboption is not defined in the current Relay Agent
161Information Option draft (draft-ietf-dhc-agent-options-03.txt), but
162has been proposed for inclusion in the next draft.
163.PP
164Relay Agent options are added to a DHCP packet without the knowledge
165of the DHCP client. The client may have filled the DHCP packet
166option buffer completely, in which case there theoretically isn't any
167space to add Agent options. However, the DHCP server may be able to
168handle a much larger packet than most DHCP clients would send. The
169current Agent Options draft requires that the relay agent use a
170maximum packet size of 576 bytes.
a138b5dd 171.PP
866428dd
TL
172It is recommended that with the Internet Software Consortium DHCP
173server, the maximum packet size be set to about 1400, allowing plenty
174of extra space in which the relay agent can put the agent option
175field, while still fitting into the Ethernet MTU size. This can be
176done by specifying the
177.B -A
178flag, followed by the desired maximum packet size (e.g., 1400).
0e7affc7 179.PP
866428dd
TL
180Note that this is reasonably safe to do even if the MTU between the
181server and the client is less than 1500, as long as the hosts on which
182the server and client are running support IP fragmentation (and they
183should). With some knowledge as to how large the agent options might
184get in a particular configuration, this parameter can be tuned as
185finely as necessary.
186.PP
187It is possible for a relay agent to receive a packet which already
188contains an agent option field. If this packet does not have a giaddr
189set, the standard requires that the packet be discarded.
190.PP
191If giaddr is set, the server may handle the situation in one of four
192ways: it may
193.I append
194its own set of relay options to the packet, leaving the
195supplied option field intact. It may
196.I replace
197the existing agent option field.
198It may
199.I forward
200the packet unchanged. Or, it may
201.I discard
202it.
203.PP
204Which of these behaviours is followed by the Internet Software
205Consortium DHCP Relay Agent may be configured with the
206.B -m
207flag, followed by one of the four keywords specified in
208.I italics
209above.
210.PP
211When the relay agent receives a reply from a server that it's supposed
212to forward to a client, and Relay Agent Information option processing
213is enabled, the relay agent scans the packet for Relay Agent
214Information options and removes them. As it's scanning, if it finds
215a Relay Agent Information option field containing an Agent ID
216suboption that matches one of its IP addresses, that option is
217recognized as its own. If no such option is found, the relay agent
218can either drop the packet, or relay it anyway. If the
219.B -D
220option is specified, all packets that don't contain a match will be
221dropped.
222.SH SPECIFYING DHCP SERVERS
223The name or IP address of at least one DHCP server to which DHCP and
224BOOTP requests should be relayed must be specified on the command
225line.
0e7affc7 226.SH SEE ALSO
866428dd
TL
227dhclient(8), dhcpd(8), RFC2132, RFC2131, draft-ietf-dhc-agent-options-03.txt.
228.SH BUGS
229It should be possible for the user to define the Circuit ID and Remote
230ID values on a per-interface basis.
231.PP
232The relay agent should not relay packets received on a physical
233network to DHCP servers on the same physical network - if they do, the
234server will receive duplicate packets. In order to fix this,
235however, the relay agent needs to be able to learn about the network
236topology, which requires that it have a configuration file.
0e7affc7
TL
237.SH AUTHOR
238.B dhcrelay(8)
239has been written for the Internet Software Consortium
240by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
241Enterprises. To learn more about the Internet Software Consortium,
242see
243.B http://www.vix.com/isc.
244To learn more about Vixie
245Enterprises, see
246.B http://www.vix.com.