dhcpd 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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 if 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. see
  151. .IR ndb (6)
  152. .PD
  153. .PP
  154. .I Dhcpd
  155. will answer
  156. .SM BOOTP
  157. requests only if it has been specifically targeted or if it
  158. has read access to the boot file for the requester. That means that the requester
  159. must specify a boot file in the request or one has to exist in NDB for
  160. .I dhcpd
  161. to answer.
  162. .I Dhcpd
  163. will answer all
  164. .SM DHCP
  165. requests for which it can associate an IP address with the
  166. requester.
  167. The options are:
  168. .TP
  169. .B d
  170. Print debugging to standard output.
  171. .TP
  172. .B f
  173. Specify a file other than
  174. .B /lib/ndb/local
  175. as the network database.
  176. .TP
  177. .B m
  178. Mute: don't reply to requests, just log them and what
  179. .I dhcpd
  180. would have done.
  181. .TP
  182. .B M
  183. Use
  184. .I secs
  185. as the minimum lease time for dynamic addresses.
  186. .TP
  187. .B n
  188. Don't answer
  189. .SM BOOTP
  190. requests.
  191. .TP
  192. .B p
  193. Answer
  194. .SM DHCP
  195. requests from
  196. .SM PPTP
  197. clients only.
  198. .TP
  199. .B r
  200. Mute static addresses: don't reply to requests for static addresses,
  201. just log them and what
  202. .I dhcpd
  203. would have done.
  204. .TP
  205. .B s
  206. Sleep roughly 1 to 2 seconds before answering requests for static addresses.
  207. This is used to make a server be a backup only.
  208. .TP
  209. .B S
  210. Sleep roughly 1 to 2 seconds before answering requests for dynamic addresses.
  211. .TP
  212. .B x
  213. The IP stack to use is mounted at
  214. .IR netmtpt .
  215. The default is
  216. .BR /net .
  217. .TP
  218. .B Z
  219. Use
  220. .I secs
  221. as the minimum lease time for static addresses.
  222. .PD
  223. .PP
  224. .I Dhcpleases
  225. prints out the currently valid DHCP leases found in the
  226. .B /lib/ndb/dhcp
  227. directory.
  228. .PP
  229. .I Rarpd
  230. performs the Reverse Address Resolution Protocol, translating
  231. Ethernet addresses into IP addresses.
  232. The options are:
  233. .TP
  234. .B d
  235. Print debugging to standard output.
  236. .TP
  237. .B e
  238. Use the Ethernet mounted at
  239. .BI /net/ etherdev\f1.
  240. .TP
  241. .B x
  242. The IP stack to use is mounted at
  243. .IR netmtpt .
  244. The default is
  245. .BR /net .
  246. .PD
  247. .PP
  248. .I Tftpd
  249. transfers files to systems that are booting.
  250. It runs as user
  251. .B none
  252. and can only access files with global read permission.
  253. .L %C
  254. in a file name is replaced with the name of the
  255. booting system's
  256. .L /cfg/pxe
  257. file.
  258. Similarly,
  259. .L %E
  260. becomes the booting system's Ethernet MAC address
  261. and
  262. .L %I
  263. becomes its IP address.
  264. The options are:
  265. .TP
  266. .B d
  267. Print debugging to standard output.
  268. .TP
  269. .B x
  270. The IP stack to use is mounted at
  271. .IR netmtpt .
  272. The default is
  273. .BR /net .
  274. .TP
  275. .B h
  276. Change directory to
  277. .IR homedir .
  278. The default is
  279. .BR /lib/tftpd .
  280. All requests for files with non-rooted file names are served starting at this
  281. directory with the exception of files of the form
  282. .BR xxxxxxxx.SUNyy .
  283. These are Sparc kernel boot files where
  284. .B xxxxxxxx
  285. is the hex IP address of the machine requesting the kernel and
  286. .B yy
  287. is an architecture identifier.
  288. .I Tftpd
  289. looks up the file in the network database using
  290. .I ipinfo
  291. (see
  292. .IR ndb (2))
  293. and responds with the boot file specified for that particular
  294. machine.
  295. If no boot file is specified, the transfer fails.
  296. .I Tftpd
  297. supports only octet mode.
  298. .TP
  299. .B r
  300. Restricts access to only those files rooted in the
  301. .IR homedir .
  302. .PD
  303. .SH FILES
  304. .BR /lib/ndb/dhcp " directory of dynamic address files
  305. .SH SOURCE
  306. .B /sys/src/cmd/ip
  307. .SH "SEE ALSO"
  308. .IR ndb (6),
  309. .IR 9boot (8),
  310. .IR booting (8)
  311. .SH BUGS
  312. .I Dhcpd
  313. doesn't really understand a single interface having addresses
  314. on multiple subnets, as during renumbering of a subnet.
  315. It will only respond with addresses on the subnet
  316. of its primary IP address on that interface.