1
0

dhcpd 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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 [ -mdsnp ]
  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. This is used to make a server
  180. be a backup only.
  181. .TP
  182. .B n
  183. Don't answer
  184. .SM BOOTP
  185. requests.
  186. .TP
  187. .B p
  188. Answer
  189. .SM DHCP
  190. requests from
  191. .SM PPTP
  192. clients only.
  193. .TP
  194. .B x
  195. The IP stack to use is mounted at
  196. .IR netmtpt .
  197. The default is
  198. .BR /net .
  199. .TP
  200. .B M
  201. Use
  202. .I secs
  203. as the minimum lease time.
  204. .PD
  205. .PP
  206. .I Dhcpleases
  207. prints out the currently valid DHCP leases found in the
  208. .B /lib/ndb/dhcp
  209. directory.
  210. .PP
  211. .I Rarpd
  212. performs the Reverse Address Resolution Protocol, translating
  213. Ethernet addresses into IP addresses.
  214. The options are:
  215. .TP
  216. .B d
  217. Print debugging to standard output.
  218. .TP
  219. .B e
  220. Use the Ethernet mounted at
  221. .BI /net/ etherdev\f1.
  222. .TP
  223. .B x
  224. The IP stack to use is mounted at
  225. .IR netmtpt .
  226. The default is
  227. .BR /net .
  228. .PD
  229. .PP
  230. .I Tftpd
  231. transfers files to systems that are booting.
  232. It runs as user
  233. .B none
  234. and can only access files with global read permission.
  235. The options are:
  236. .TP
  237. .B d
  238. Print debugging to standard output.
  239. .TP
  240. .B x
  241. The IP stack to use is mounted at
  242. .IR netmtpt .
  243. The default is
  244. .BR /net .
  245. .TP
  246. .B h
  247. Change directory to
  248. .IR homedir .
  249. The default is
  250. .BR /lib/tftpd .
  251. All requests for files with non-rooted file names are served starting at this
  252. directory with the exception of files of the form
  253. .BR xxxxxxxx.SUNyy .
  254. These are Sparc kernel boot files where
  255. .B xxxxxxxx
  256. is the hex IP address of the machine requesting the kernel and
  257. .B yy
  258. is an architecture identifier.
  259. .I Tftpd
  260. looks up the file in the network database using
  261. .I ipinfo
  262. (see
  263. .IR ndb (2))
  264. and responds with the boot file specified for that particular
  265. machine.
  266. If no boot file is specified, the transfer fails.
  267. .I Tftpd
  268. supports only octet mode.
  269. .TP
  270. .B r
  271. Restricts access to only those files rooted in the
  272. .IR homedir .
  273. .PD
  274. .SH FILES
  275. .BR /lib/ndb/dhcp " directory of dynamic address files
  276. .SH SOURCE
  277. .B /sys/src/cmd/ip
  278. .SH "SEE ALSO"
  279. .IR ndb (6)