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

NAME

6       dhcrelay - Dynamic Host Configuration Protocol Relay Agent
7

SYNOPSIS

9       dhcrelay  [ -4 ] [ -dqaD ] [ -p port ] [ -c count ] [ -A length ] [ -pf
10       pid-file ] [ --no-pid ] [ -m append | replace | forward | discard  ]  [
11       -i interface0 [ ...  -i interfaceN ] ] server0 [ ...serverN ]
12
13       dhcrelay  -6 [ -dqI ] [ -p port ] [ -c count ] [ -pf pid-file ] [ --no-
14       pid ] -l lower0 [ ...  -l lowerN ] -u upper0 [ ...  -u upperN ]
15

DESCRIPTION

17       The Internet Systems Consortium DHCP Relay Agent, dhcrelay, provides  a
18       means  for  relaying  DHCP and BOOTP requests from a subnet to which no
19       DHCP server is directly connected to one or more DHCP servers on  other
20       subnets.  It supports both DHCPv4/BOOTP and DHCPv6 protocols.
21

OPERATION

23       The  DHCP Relay Agent listens for DHCPv4 or DHCPv6 queries from clients
24       or other relay agents on one or more interfaces, passing them along  to
25       ``upstream''  servers or relay agents as specified on the command line.
26       When a reply is received from upstream, it is multicast or unicast back
27       downstream to the source of the original request.
28

COMMAND LINE

30       Protocol selection options:
31
32       -6     Run  dhcrelay as a DHCPv6 relay agent.  Incompatible with the -4
33              option.
34
35       -4     Run dhcrelay as a DHCPv4/BOOTP relay agent.  This is the default
36              mode  of operation, so the argument is not necessary, but may be
37              specified for clarity.  Incompatible with -6.
38
39       Specifying DHCPv4/BOOTP servers
40
41       In DHCPv4 mode, a list of one or more server addresses must  be  speci‐
42       fied  on  the  command  line,  to  which  DHCP/BOOTP  queries should be
43       relayed.
44
45       Options available for both DHCPv4 and DHCPv6:
46
47       -c COUNT
48              Maximum hop count.  When forwarding packets,  dhcrelay  discards
49              packets which have reached a hop count of COUNT.  Default is 10.
50              Maximum is 255.
51
52       -d     Force dhcrelay to run as a foreground process.  Useful when run‐
53              ning  dhcrelay  under  a  debugger, or running out of inittab on
54              System V systems.
55
56       -p PORT
57              Listen and transmit on port PORT.  This  is  mostly  useful  for
58              debugging  purposes.   Default  is  port 67 for DHCPv4/BOOTP, or
59              port 547 for DHCPv6.
60
61       -q     Quiet mode.  Prevents dhcrelay6 from printing its  network  con‐
62              figuration on startup.
63
64       -pf pid-file
65              Path to alternate pid file.
66
67       --no-pid
68              Option  to  disable  writing  pid files.  By default the program
69              will write a pid file.
70
71       Options available in DHCPv4 mode only:
72
73       -a     Append an agent option field to each request  before  forwarding
74              it  to  the  server.  Agent option fields in responses sent from
75              servers to clients  will  be  stripped  before  forwarding  such
76              responses  back to the client.  The agent option field will con‐
77              tain two agent options: the Circuit ID suboption and the  Remote
78              ID  suboption.   Currently, the Circuit ID will be the printable
79              name of the interface on which the client request was  received.
80              The  client supports inclusion of a Remote ID suboption as well,
81              but this is not used by default.
82
83       -A LENGTH
84              Specify the maximum  packet  size  to  send  to  a  DHCPv4/BOOTP
85              server.   This might be done to allow sufficient space for addi‐
86              tion of relay agent options while still fitting into the  Ether‐
87              net MTU size.
88
89       -D     Drop  packets  from upstream servers if they contain Relay Agent
90              Information  options  that  indicate  they  were  generated   in
91              response  to  a query that came via a different relay agent.  If
92              this option is not specified, such packets will be relayed  any‐
93              way.
94
95       -i ifname
96              Listen  for  DHCPv4/BOOTP queries on interface ifname.  Multiple
97              interfaces may be specified by using more than  one  -i  option.
98              If  no  interfaces  are  specified on the command line, dhcrelay
99              will identify all network interfaces, eliminating  non-broadcast
100              interfaces if possible, and attempt to listen on all of them.
101
102       -m append|replace|forward|discard
103              Control  the  handling  of incoming DHCPv4 packets which already
104              contain relay agent options.  If such a  packet  does  not  have
105              giaddr  set  in  its header, the DHCP standard requires that the
106              packet be discarded.  However, if giaddr is set, the relay agent
107              may  handle  the  situation in four ways:  It may append its own
108              set of relay options to the packet, leaving the supplied  option
109              field intact; it may replace the existing agent option field; it
110              may forward the packet unchanged; or, it may discard it.
111
112              To use this option you must also enable the -a option.
113
114       Options available in DHCPv6 mode only:
115
116       -I     Force use of the DHCPv6 Interface-ID  option.   This  option  is
117              automatically  sent when there are two or more downstream inter‐
118              faces in use, to  disambiguate  between  them.   The  -I  option
119              causes  dhcrelay  to  send  the option even if there is only one
120              downstream interface.
121
122       -l [address%]ifname[#index]
123              Specifies the ``lower'' network interface for DHCPv6 relay mode:
124              the  interface on which queries will be received from clients or
125              from other relay  agents.   At  least  one  -l  option  must  be
126              included  in  the command line when running in DHCPv6 mode.  The
127              interface name  ifname  is  a  mandatory  parameter.   The  link
128              address can be specified by address%; if it isn't, dhcrelay will
129              use the first non-link-local address configured  on  the  inter‐
130              face.   The  optional  #index  parameter specifies the interface
131              index.
132
133       -u [address%]ifname
134              Specifies the ``upper'' network interface for DHCPv6 relay mode:
135              the  interface  to  which  queries  from clients and other relay
136              agents should be forwarded.  At least  one  -u  option  must  be
137              included  in  the command line when running in DHCPv6 mode.  The
138              interface name ifname is a mandatory parameter. The  destination
139              unicast  or  multicast  address can be specified by address%; if
140              not specified, the  relay  agent  will  forward  to  the  DHCPv6
141              All_DHCP_Relay_Agents_and_Servers multicast address.
142
143       It  is  possible to specify the same interface with different addresses
144       more than once, and even, when the system supports it, to use the  same
145       interface as both upper and lower interfaces.
146

SEE ALSO

148       dhclient(8), dhcpd(8), RFC3315, RFC2132, RFC2131.
149

BUGS

151       Using the same interface on both upper and lower sides may cause loops,
152       so when running this way, the maximum hop count should be set to a  low
153       value.
154
155       The loopback interface is not (yet) recognized as a valid interface.
156

AUTHOR

158       dhcrelay(8)  To  learn  more  about  Internet  Systems  Consortium, see
159       https://www.isc.org
160
161
162
163                                                                   dhcrelay(8)
Impressum