1dhcrelay(8)                 System Manager's Manual                dhcrelay(8)
2
3
4

NAME

6       dhcrelay - Dynamic Host Configuration Protocol Relay Agent
7

SYNOPSIS

9       dhcrelay  [ -p port ] [ -d ] [ -q ] [ -i if0 [ ...  -i ifN ] ] [ -a ] [
10       -c count ] [ -A length ] [ -D ] [ -m append | replace | forward |  dis‐
11       card ] server0 [ ...serverN ]
12

DESCRIPTION

14       The  Internet Systems Consortium DHCP Relay Agent, dhcrelay, provides a
15       means for relaying DHCP and BOOTP requests from a subnet  to  which  no
16       DHCP  server is directly connected to one or more DHCP servers on other
17       subnets.
18

OPERATION

20       The DHCP Relay Agent listens for DHCP and BOOTP queries and  responses.
21       When  a  query  is  received from a client, dhcrelay forwards it to the
22       list of DHCP servers specified on the command line.  When  a  reply  is
23       received  from  a  server, it is broadcast or unicast (according to the
24       relay agent's ability or the client's  request)  on  the  network  from
25       which the original request came.
26

COMMAND LINE

28       The  names  of  the  network interfaces that dhcrelay should attempt to
29       configure may be specified on the command line using the -i option.  If
30       no  interface  names  are  specified  on the command line dhcrelay will
31       identify all network interfaces, elimininating non-broadcast interfaces
32       if possible, and attempt to configure each interface.
33
34       The  -i flag can be used to specify the network interfaces on which the
35       relay agent should listen.   In general, it must  listen  not  only  on
36       those  network  interfaces  to  which clients are attached, but also on
37       those network interfaces to  which  the  server  (or  the  router  that
38       reaches  the  server)  is  attached.   However, in some cases it may be
39       necessary to exclude some networks; in this case,  you  must  list  all
40       those network interfaces that should not be excluded using the -i flag.
41
42       In  some  cases  it  is helpful for the relay agent to forward requests
43       from networks on which a DHCP server is running to other DHCP  servers.
44       This  would  be the case if two DHCP servers on different networks were
45       being used to provide backup service for each other's networks.
46
47       If dhcrelay should listen and transmit on a port other than  the  stan‐
48       dard (port 67), the -p flag may used.  It should be followed by the udp
49       port number that dhcrelay should use.  This is mostly useful for debug‐
50       ging purposes.
51
52       Dhcrelay will normally run in the foreground until it has configured an
53       interface, and then will revert to running in the background.  To force
54       dhcrelay  to  always run as a foreground process, the -d flag should be
55       specified.  This is useful when running dhcrelay under a  debugger,  or
56       when running it out of inittab on System V systems.
57
58       Dhcrelay  will  normally  print  its  network configuration on startup.
59       This can be unhelpful in a system startup script - to disable this  be‐
60       haviour, specify the -q flag.
61

RELAY AGENT INFORMATION OPTIONS

63       If the -a flag is set the relay agent will append an agent option field
64       to each request before forwarding it  to  the  server.    Agent  option
65       fields  in  responses  sent  from  servers  to clients will be stripped
66       before forwarding such responses back to the client.
67
68       The agent option field will contain two agent options: the  Circuit  ID
69       suboption  and the Remote ID suboption.  Currently, the Circuit ID will
70       be the printable name of the interface on which the client request  was
71       received.   The  client  supports inclusion of a Remote ID suboption as
72       well, but this is not used by default.
73
74       When forwarding packets, dhcrelay discards packets which have reached a
75       hop  count  of  10.   If  a  lower  or  higher threshold (up to 255) is
76       desired, depending on your environment, you can  specify  the  max  hop
77       count threshold as a number following the -c option.
78
79       Relay Agent options are added to a DHCP packet without the knowledge of
80       the DHCP client.   The client may have filled the  DHCP  packet  option
81       buffer completely, in which case there theoretically isn't any space to
82       add Agent options.   However, the DHCP server may be able to  handle  a
83       much  larger  packet  than  most DHCP clients would send.   The current
84       Agent Options draft requires that the relay agent use a maximum  packet
85       size of 576 bytes.
86
87       It  is  recommended  that  with  the  Internet  Systems Consortium DHCP
88       server, the maximum packet size be set to about 1400,  allowing  plenty
89       of extra space in which the relay agent can put the agent option field,
90       while still fitting into the Ethernet MTU size.  This can  be  done  by
91       specifying  the  -A  flag,  followed by the desired maximum packet size
92       (e.g., 1400).
93
94       Note that this is reasonably safe to do even if  the  MTU  between  the
95       server  and the client is less than 1500, as long as the hosts on which
96       the server and client are running support IP  fragmentation  (and  they
97       should).   With  some knowledge as to how large the agent options might
98       get in a particular configuration,  this  parameter  can  be  tuned  as
99       finely as necessary.
100
101       It is possible for a relay agent to receive a packet which already con‐
102       tains an agent option field.  If this packet does  not  have  a  giaddr
103       set, the standard requires that the packet be discarded.
104
105       If  giaddr  is  set, the server may handle the situation in one of four
106       ways: it may append its own set of relay options to the packet, leaving
107       the  supplied  option field intact.   It may replace the existing agent
108       option field.  It may forward the packet unchanged.   Or, it  may  dis‐
109       card it.
110
111       Which  of  these behaviours is followed by the Internet Systems Consor‐
112       tium DHCP Relay Agent may be configured with the -m flag,  followed  by
113       one of the four keywords specified in italics above.
114
115       When  the relay agent receives a reply from a server that it's supposed
116       to forward to a client, and Relay Agent Information  option  processing
117       is  enabled,  the relay agent scans the packet for Relay Agent Informa‐
118       tion options and removes them.   As it's scanning, if it finds a  Relay
119       Agent  Information  option  field containing an Agent ID suboption that
120       matches one of its IP addresses, that option is recognized as its  own.
121       If no such option is found, the relay agent can either drop the packet,
122       or relay it anyway.   If the -D option is specified, all  packets  that
123       don't contain a match will be dropped.
124

SPECIFYING DHCP SERVERS

126       The  name  or  IP address of at least one DHCP server to which DHCP and
127       BOOTP requests should be relayed must be specified on the command line.
128

SEE ALSO

130       dhclient(8),   dhcpd(8),   RFC2132,   RFC2131,    draft-ietf-dhc-agent-
131       options-03.txt.
132

BUGS

134       It  should be possible for the user to define the Circuit ID and Remote
135       ID values on a per-interface basis.
136
137       The relay agent should not relay packets received on a physical network
138       to  DHCP  servers on the same physical network - if they do, the server
139       will receive duplicate packets.   In order to fix  this,  however,  the
140       relay agent needs to be able to learn about the network topology, which
141       requires that it have a configuration file.
142

AUTHOR

144       dhcrelay(8) has been written for Internet  Systems  Consortium  by  Ted
145       Lemon  in  cooperation  with  Vixie  Enterprises.   To learn more about
146       Internet Systems Consortium, see http://www.isc.org/isc.  To learn more
147       about Vixie Enterprises, see http://www.vix.com.
148
149
150
151                                                                   dhcrelay(8)
Impressum