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