1dhcp-fwd(1) General Commands Manual dhcp-fwd(1)
2
3
4
6 dhcp-fwd - starts the DHCP forwarding agent
7
9 dhcp-fwd [-n] [-d] [-v] [-h] [-c config_file]
10
12 dhcp-fwd starts a DHCP forwarding agents which relays DHCP messages
13 between subnets with different sublayer broadcast domains.
14
15 When called without arguments, it reads its configuration from
16 /etc/dhcp-fwd.cfg and forks itself into background. An alternative con‐
17 figfile can be given by the -c option; the forking can be prevented
18 with the -n switch. There exists a -d option which is indented for
19 debugging purposes and prevents forking too. Currently it is just an
20 alias for -n.
21
22 Although the program must be started as root, it will drop its privi‐
23 leges and go into a chroot-jail after finishing the initialization.
24
26 -n Prevents daemon from going into background after initialization.
27 This option may be useful when using advanced init-concepts like
28 minit (http://www.fefe.de/minit/).
29
30 -d Turns on debugging mode and prevents forking; currently it is
31 just an alias for -n.
32
33 -c config_file
34 Specifies the configfile to use; the default is /etc/dhcp-
35 fwd.cfg.
36
37 -v Shows version
38
39 -h Shows help
40
42 The default location of the configfile is determined at compilation-
43 time and can be overridden by using the -c option. When an option needs
44 a boolean parameter, the keywords true, false, 0, 1, yes and no are
45 possible values.
46
47 Within the configfile the following options MUST be set:
48
49 user username|uid
50 The program setuid()'s to the given user after finishing its
51 initialization. The parameter must be an alphanumeric username
52 or a numeric uid.
53
54 group groupname|gid
55 The program setgid()'s to the given group after finishing its
56 initialization. The parameter must be an alphanumeric groupname
57 or a numeric gid.
58
59 chroot path
60 The program goes into this directory and calls there chroot()
61 after finishing its initialization.
62
63 pidfile filename
64 The file where the pid of the daemon will be written into.
65
66 Beside the mandatory options above, the following options are possible:
67
68 ulimit resource limit
69 Sets a maximum limit for the given resource by calling setr‐
70 limit() appropriately. Possible values for resource are stack,
71 data, core, rss, nproc, nofile, memlock, as and (if supported by
72 your OS) locks. For the meaning of this values see setr‐
73 limit(2).
74
75 limit may be plain unsigned number, a number followed by 'k'
76 (*1000), 'K' (*1024), 'm' (*1000k), 'M' (*1024K) or '-1' to
77 remove the limit for this resource.
78
79 logfile filename
80 Specifies the file where messages will be stored. This file is
81 located relatively to the directory where dhcp-fwd was started
82 and not to the directory given at the chroot option.
83
84 if ifname has_clients has_servers allow_bcast
85 Declares an interface and sets parameter of the network topol‐
86 ogy. When an interfacename is used in one of the other options,
87 it must have been declared by if already.
88
89 ifname is the name of the interface as being used e.g. by ifcon‐
90 fig also (e.g. eth0).
91
92 has_clients and has_servers tell if messages from clients or
93 servers can be expected on this interface. BOOTREQUESTs are
94 assumed to be client- and BOOTREPLYs are assumed to be server-
95 messages. Unexpected packages will be dropped away.
96
97 allow_bcast is/was an experimentell features and will be disap‐
98 pear probably. When not set, the interface will not send pack‐
99 ages to IP-broadcast addresses. This affects messages to clients
100 only; when specifying a bcast-server, this option will be
101 ignored.
102
103 name ifname agent-id
104 specifies the RFC 3046 agent-id for the given interface. When
105 not used explicitly, the interfacename will be assumed as the
106 agent-id.
107
108 ip ifname ip
109 assigns the ip to be used in the giaddr field. By default to IP
110 of the interface will be assumed but when having multiple IPs
111 for one interface this option may be usefully.
112
113 Attention: This IP will not be used in the IP-layer; this means
114 that the UDP packet sent to the server will contain the IP
115 assigned by the system. To setup this address, usual SNAT rule‐
116 sets in a local packetfilter are recommended.
117
118 server type info
119 Defines the DHCP server to be used. The following types are sup‐
120 ported:
121
122 server ip address [interface]
123 address is a dotted IP-address and the optional interface
124 the name of an interface. Please note that mixing decla‐
125 rations without an interface parameter and such ones with
126 this parameter will fail.
127
128 server bcast interface
129 the DHCP server with be assumed at interface interface
130 and contacted with broadcast messages.
131
132 For an example see the contrib/dhcp-fwd.conf file in the source-tar‐
133 ball.
134
136 /etc/dhcp-fwd.conf
137 configuration file
138
139 /usr/sbin/dhcp-fwd
140 executable
141
143 RFC 2131, 2132, 3046
144
146 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
147
148
149
150dhcp-forwarder 0.6 June 14 2002 dhcp-fwd(1)