dhcpd 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. .TH DHCPD 8
  2. .SH NAME
  3. dhcpd, dhcpleases, rarpd, tftpd \- Internet booting
  4. .SH SYNOPSIS
  5. .PP
  6. .B ip/dhcpd
  7. .RB [ -dmnprsSZ ]
  8. .RB [ -f
  9. .IR ndb-file ]
  10. .RB [ -M
  11. .IR secs ]
  12. .RB [ -x
  13. .IR netmtpt ]
  14. .RB [ -Z
  15. .IR secs ]
  16. [
  17. .I address
  18. .I n
  19. ] ...
  20. .PP
  21. .B ip/dhcpleases
  22. .PP
  23. .B ip/rarpd
  24. .RB [ -d ]
  25. .RB [ -e
  26. .IR etherdev ]
  27. .RB [ -x
  28. .IR netmtpt ]
  29. .PP
  30. .B ip/tftpd
  31. .RB [ -dr ]
  32. .RB [ -h
  33. .IR homedir ]
  34. .RB [ -x
  35. .IR netmtpt ]
  36. .SH DESCRIPTION
  37. These programs support booting over the Internet.
  38. They should all be run on the same server to
  39. allow other systems to be booted.
  40. .I Dhcpd
  41. and
  42. .I tftpd
  43. are used to boot everything;
  44. .I rarpd
  45. is an extra piece just for Suns.
  46. .PP
  47. .I Dhcpd
  48. runs the
  49. .SM BOOTP
  50. and
  51. .SM DHCP
  52. protocols.
  53. Clients use these protocols to obtain configuration information.
  54. This information comes from attribute/value pairs in the network database
  55. (see
  56. .IR ndb (6)
  57. and
  58. .IR ndb (8)).
  59. DHCP requests are honored both for static addresses found in
  60. the NDB and for dynamic addresses listed in the command line.
  61. DHCP requests are honored if either:
  62. .br
  63. \- there exists an NDB entry
  64. containing both the ethernet address of the requester and
  65. an IP address on the originating network or subnetwork.
  66. .br
  67. \- a free dynamic address exists on the originating network or subnetwork.
  68. .PP
  69. A BOOTP request is honored it all of the following are true:
  70. .br
  71. \- there exists an NDB entry
  72. containing both the ethernet address of the requester and
  73. an IP address on the originating network or subnetwork.
  74. .br
  75. \- the entry contains a
  76. .B bootf=
  77. attribute
  78. .br
  79. \- the file in the
  80. .B bootf=
  81. attribute is readable.
  82. .PP
  83. Dynamic addresses are specified on the command line as a list
  84. of addresses and number pairs.
  85. For example,
  86. .EX
  87. ip/dhcpd 10.1.1.12 10 10.2.1.70 12
  88. .EE
  89. directs
  90. .I dhcpd
  91. to return dynamic addresses 10.1.1.12 through 10.1.1.21 inclusive
  92. and 10.2.1.70 through 10.2.1.81 inclusive.
  93. .PP
  94. .I Dhcpd
  95. maintains a record of all dynamic addresses in the directory
  96. .BR /lib/ndb/dhcp ,
  97. one file per address.
  98. If multiple servers have access to this common directory,
  99. they will correctly coordinate their actions.
  100. .PP
  101. Attributes come from either the NDB entry for the system, the entry for its
  102. subnet, or the entry for its network. The system entry has precedence,
  103. then the subnet, then the network.
  104. The NDB attributes used are:
  105. .TF ipmask
  106. .TP
  107. .B ip
  108. the IP address
  109. .TP
  110. .B ipmask
  111. the IP mask
  112. .TP
  113. .B ipgw
  114. the default IP gateway
  115. .TP
  116. .B dom
  117. the domain name of the system
  118. .TP
  119. .B fs
  120. the default Plan 9 name server
  121. .TP
  122. .B auth
  123. the default Plan 9 authentication server
  124. .TP
  125. .B dns
  126. a domain name server
  127. .TP
  128. .B ntp
  129. a network time protocol server
  130. .TP
  131. .B time
  132. a time server
  133. .TP
  134. .B wins
  135. a
  136. .SM NETBIOS
  137. name server
  138. .TP
  139. .B www
  140. a World Wide Web proxy
  141. .TP
  142. .B pop3
  143. a POP3 mail server
  144. .TP
  145. .B smtp
  146. an SMTP mail server
  147. .TP
  148. .B bootf
  149. the default boot file
  150. .PD
  151. .PP
  152. .I Dhcpd
  153. will answer
  154. .SM BOOTP
  155. requests only if it has been specifically targeted or if it
  156. has read access to the boot file for the requester. That means that the requester
  157. must specify a boot file in the request or one has to exist in NDB for
  158. .I dhcpd
  159. to answer.
  160. .I Dhcpd
  161. will answer all
  162. .SM DHCP
  163. requests for which it can associate an IP address with the
  164. requester.
  165. The options are:
  166. .TP
  167. .B d
  168. Print debugging to standard output.
  169. .TP
  170. .B f
  171. Specify a file other than
  172. .B /lib/ndb/local
  173. as the network database.
  174. .TP
  175. .B m
  176. Mute: don't reply to requests, just log them and what
  177. .I dhcpd
  178. would have done.
  179. .TP
  180. .B M
  181. Use
  182. .I secs
  183. as the minimum lease time for dynamic addresses.
  184. .TP
  185. .B n
  186. Don't answer
  187. .SM BOOTP
  188. requests.
  189. .TP
  190. .B p
  191. Answer
  192. .SM DHCP
  193. requests from
  194. .SM PPTP
  195. clients only.
  196. .TP
  197. .B r
  198. Mute static addresses: don't reply to requests for static addresses,
  199. just log them and what
  200. .I dhcpd
  201. would have done.
  202. .TP
  203. .B s
  204. Sleep 2 seconds before answering requests for static addresses.
  205. This is used to make a server be a backup only.
  206. .TP
  207. .B S
  208. Sleep 2 seconds before answering requests for dynamic addresses.
  209. .TP
  210. .B x
  211. The IP stack to use is mounted at
  212. .IR netmtpt .
  213. The default is
  214. .BR /net .
  215. .TP
  216. .B Z
  217. Use
  218. .I secs
  219. as the minimum lease time for static addresses.
  220. .PD
  221. .PP
  222. .I Dhcpleases
  223. prints out the currently valid DHCP leases found in the
  224. .B /lib/ndb/dhcp
  225. directory.
  226. .PP
  227. .I Rarpd
  228. performs the Reverse Address Resolution Protocol, translating
  229. Ethernet addresses into IP addresses.
  230. The options are:
  231. .TP
  232. .B d
  233. Print debugging to standard output.
  234. .TP
  235. .B e
  236. Use the Ethernet mounted at
  237. .BI /net/ etherdev\f1.
  238. .TP
  239. .B x
  240. The IP stack to use is mounted at
  241. .IR netmtpt .
  242. The default is
  243. .BR /net .
  244. .PD
  245. .PP
  246. .I Tftpd
  247. transfers files to systems that are booting.
  248. It runs as user
  249. .B none
  250. and can only access files with global read permission.
  251. The options are:
  252. .TP
  253. .B d
  254. Print debugging to standard output.
  255. .TP
  256. .B x
  257. The IP stack to use is mounted at
  258. .IR netmtpt .
  259. The default is
  260. .BR /net .
  261. .TP
  262. .B h
  263. Change directory to
  264. .IR homedir .
  265. The default is
  266. .BR /lib/tftpd .
  267. All requests for files with non-rooted file names are served starting at this
  268. directory with the exception of files of the form
  269. .BR xxxxxxxx.SUNyy .
  270. These are Sparc kernel boot files where
  271. .B xxxxxxxx
  272. is the hex IP address of the machine requesting the kernel and
  273. .B yy
  274. is an architecture identifier.
  275. .I Tftpd
  276. looks up the file in the network database using
  277. .I ipinfo
  278. (see
  279. .IR ndb (2))
  280. and responds with the boot file specified for that particular
  281. machine.
  282. If no boot file is specified, the transfer fails.
  283. .I Tftpd
  284. supports only octet mode.
  285. .TP
  286. .B r
  287. Restricts access to only those files rooted in the
  288. .IR homedir .
  289. .PD
  290. .SH FILES
  291. .BR /lib/ndb/dhcp " directory of dynamic address files
  292. .SH SOURCE
  293. .B /sys/src/cmd/ip
  294. .SH "SEE ALSO"
  295. .IR ndb (6)