dhcpd 5.3 KB

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