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 ] [ -m
10       append | replace | forward | discard ] [ -i interface0 [ ...  -i inter‐
11       faceN ] ] server0 [ ...serverN ]
12
13       dhcrelay  -6 [ -dqI ] [ -p port ] [ -c count ] -l lower0 [ ...  -l low‐
14       erN ] -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       Options available in DHCPv4 mode only:
65
66       -a     Append  an  agent option field to each request before forwarding
67              it to the server.   Agent option fields in responses  sent  from
68              servers  to  clients  will  be  stripped  before forwarding such
69              responses back to the client.  The agent option field will  con‐
70              tain  two agent options: the Circuit ID suboption and the Remote
71              ID suboption.  Currently, the Circuit ID will be  the  printable
72              name  of the interface on which the client request was received.
73              The client supports inclusion of a Remote ID suboption as  well,
74              but this is not used by default.
75
76       -A LENGTH
77              Specify  the  maximum  packet  size  to  send  to a DHCPv4/BOOTP
78              server.  This might be done to allow sufficient space for  addi‐
79              tion  of relay agent options while still fitting into the Ether‐
80              net MTU size.
81
82       -D     Drop packets from upstream servers if they contain  Relay  Agent
83              Information   options  that  indicate  they  were  generated  in
84              response to a query that came via a different relay  agent.   If
85              this  option is not specified, such packets will be relayed any‐
86              way.
87
88       -i ifname
89              Listen for DHCPv4/BOOTP queries on interface  ifname.   Multiple
90              interfaces  may  be  specified by using more than one -i option.
91              If no interfaces are specified on  the  command  line,  dhcrelay
92              will  identify all network interfaces, eliminating non-broadcast
93              interfaces if possible, and attempt to listen on all of them.
94
95       -m append|replace|forward|discard
96              Control the handling of incoming DHCPv4  packets  which  already
97              contain  relay  agent  options.   If such a packet does not have
98              giaddr set in its header, the DHCP standard  requires  that  the
99              packet be discarded.  However, if giaddr is set, the relay agent
100              may handle the situation in four ways:  It may  append  its  own
101              set  of relay options to the packet, leaving the supplied option
102              field intact; it may replace the existing agent option field; it
103              may forward the packet unchanged; or, it may discard it.
104
105       Options available in DHCPv6 mode only:
106
107       -I     Force  use  of  the  DHCPv6 Interface-ID option.  This option is
108              automatically sent when there are two or more downstream  inter‐
109              faces  in  use,  to  disambiguate  between  them.  The -I option
110              causes dhcrelay to send the option even if  there  is  only  one
111              downstream interface.
112
113       -l [address%]ifname[#index]
114              Specifies the ``lower'' network interface for DHCPv6 relay mode:
115              the interface on which queries will be received from clients  or
116              from  other  relay  agents.   At  least  one  -l  option must be
117              included in the command line when running in DHCPv6  mode.   The
118              interface  name  ifname  is  a  mandatory  parameter.   The link
119              address can be specified by address%; if it isn't, dhcrelay will
120              use  the  first  non-link-local address configured on the inter‐
121              face.  The optional #index  parameter  specifies  the  interface
122              index.
123
124       -u [address%]ifname
125              Specifies the ``upper'' network interface for DHCPv6 relay mode:
126              the interface to which queries  from  clients  and  other  relay
127              agents  should  be  forwarded.   At  least one -u option must be
128              included in the command line when running in DHCPv6  mode.   The
129              interface  name ifname is a mandatory parameter. The destination
130              unicast or multicast address can be specified  by  address%;  if
131              not  specified,  the  relay  agent  will  forward  to the DHCPv6
132              All_DHCP_Relay_Agents_and_Servers multicast address.
133
134       It is possible to specify the same interface with  different  addresses
135       more  than once, and even, when the system supports it, to use the same
136       interface as both upper and lower interfaces.
137

SEE ALSO

139       dhclient(8), dhcpd(8), RFC3315, RFC2132, RFC2131.
140

BUGS

142       Using the same interface on both upper and lower sides may cause loops,
143       so  when running this way, the maximum hop count should be set to a low
144       value.
145
146       The loopback interface is not (yet) recognized as a valid interface.
147

AUTHOR

149       dhcrelay(8) To  learn  more  about  Internet  Systems  Consortium,  see
150       https://www.isc.org
151
152
153
154                                                                   dhcrelay(8)
Impressum