perfdhcp.xml 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872
  1. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY mdash "&#8212;">]>
  4. <!--
  5. - Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
  6. -
  7. - Permission to use, copy, modify, and/or distribute this software for any
  8. - purpose with or without fee is hereby granted, provided that the above
  9. - copyright notice and this permission notice appear in all copies.
  10. -
  11. - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  12. - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  13. - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  14. - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  15. - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  16. - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. - PERFORMANCE OF THIS SOFTWARE.
  18. -->
  19. <refentry>
  20. <refentryinfo>
  21. <date>February 19, 2014</date>
  22. </refentryinfo>
  23. <refmeta>
  24. <refentrytitle>perfdhcp</refentrytitle>
  25. <manvolnum>1</manvolnum>
  26. <refmiscinfo>Kea</refmiscinfo>
  27. </refmeta>
  28. <refnamediv>
  29. <refname>perfdhcp</refname>
  30. <refpurpose>DHCP benchmarking tool</refpurpose>
  31. </refnamediv>
  32. <docinfo>
  33. <copyright>
  34. <year>2014</year>
  35. <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
  36. </copyright>
  37. </docinfo>
  38. <refsynopsisdiv>
  39. <cmdsynopsis>
  40. <command>perfdhcp</command>
  41. <arg><option>-1</option></arg>
  42. <arg><option>-4|-6</option></arg>
  43. <arg><option>-a <replaceable class="parameter">aggressivity</replaceable></option></arg>
  44. <arg><option>-b <replaceable class="parameter">base</replaceable></option></arg>
  45. <arg><option>-B</option></arg>
  46. <arg><option>-c</option></arg>
  47. <arg><option>-d <replaceable class="parameter">drop-time</replaceable></option></arg>
  48. <arg><option>-D <replaceable class="parameter">max-drop</replaceable></option></arg>
  49. <arg><option>-e <replaceable class="parameter">lease-type</replaceable></option></arg>
  50. <arg><option>-E <replaceable class="parameter">time-offset</replaceable></option></arg>
  51. <arg><option>-f <replaceable class="parameter">renew-rate</replaceable></option></arg>
  52. <arg><option>-F <replaceable class="parameter">release-rate</replaceable></option></arg>
  53. <arg><option>-h</option></arg>
  54. <arg><option>-i</option></arg>
  55. <arg><option>-I <replaceable class="parameter">ip-offset</replaceable></option></arg>
  56. <arg><option>-l <replaceable class="parameter">local-address|interface</replaceable></option></arg>
  57. <arg><option>-L <replaceable class="parameter">local-port</replaceable></option></arg>
  58. <arg><option>-n <replaceable class="parameter">num-request</replaceable></option></arg>
  59. <arg><option>-O <replaceable class="parameter">random-offset</replaceable></option></arg>
  60. <arg><option>-p <replaceable class="parameter">test-period</replaceable></option></arg>
  61. <arg><option>-P <replaceable class="parameter">preload</replaceable></option></arg>
  62. <arg><option>-r <replaceable class="parameter">rate</replaceable></option></arg>
  63. <arg><option>-R <replaceable class="parameter">num-clients</replaceable></option></arg>
  64. <arg><option>-s <replaceable class="parameter">seed</replaceable></option></arg>
  65. <arg><option>-S <replaceable class="parameter">srvid-offset</replaceable></option></arg>
  66. <arg><option>-t <replaceable class="parameter">report</replaceable></option></arg>
  67. <arg><option>-T <replaceable class="parameter">template-file</replaceable></option></arg>
  68. <arg><option>-v</option></arg>
  69. <arg><option>-W <replaceable class="parameter">wrapped</replaceable></option></arg>
  70. <arg><option>-x <replaceable class="parameter">diagnostic-selector</replaceable></option></arg>
  71. <arg><option>-X <replaceable class="parameter">xid-offset</replaceable></option></arg>
  72. <arg>server</arg>
  73. </cmdsynopsis>
  74. </refsynopsisdiv>
  75. <refsect1>
  76. <title>DESCRIPTION</title>
  77. <para>
  78. <command>perfdhcp</command> is a DHCP benchmarking tool. It
  79. provides a way of measuring the performance of DHCP servers by
  80. generating large amounts of traffic from simulated multiple
  81. clients. It is able to test both IPv4 and IPv6 servers, and
  82. provides statistics concerning response times and the number of
  83. requests that are dropped.
  84. </para>
  85. <para>
  86. By default, tests are run using the full four-packet exchange
  87. sequence (DORA for DHCPv4, SARR for DHCPv6). An option is
  88. provided to run tests using the initial two-packet exchange (DO
  89. and SA) instead. It is also possible to configure perfdhcp to
  90. send DHCPv6 RENEW and RELEASE messages at a specified rate in
  91. parallel with the DHCPv6 four-way exchanges.
  92. </para>
  93. <para>
  94. When running a performance test, <command>perfdhcp</command>
  95. will exchange packets with the server under test as fast as
  96. possible unless the <option>-r</option> is given to limit the
  97. request rate. The length of the test can be limited by setting
  98. a threshold on any or all of the number of requests made by
  99. <command>perfdhcp</command>, the elapsed time, or the number of
  100. requests dropped by the server.
  101. </para>
  102. </refsect1>
  103. <refsect1>
  104. <title>TEMPLATES</title>
  105. <para>
  106. To allow the contents of packets sent to the server to be
  107. customized, <command>perfdhcp</command> allows the specification
  108. of template files that determine the contents of the packets.
  109. For example, the customized packet may contain a DHCPv6 ORO to
  110. request a set of options to be returned by the server, or it may
  111. contain the Client FQDN option to request that server performs DNS
  112. updates. This may be used to discover performance bottlenecks for
  113. different server configurations (e.g. DDNS enabled or disabled).
  114. </para>
  115. <para>
  116. Up to two template files can be specified on the command line,
  117. each file representing the contents of a particular type of
  118. packet, the type being determined by the test being carried out.
  119. For example, if testing DHCPv6:
  120. </para>
  121. <itemizedlist>
  122. <listitem>
  123. <para>
  124. With no template files specified on the command line,
  125. <command>perfdhcp</command> will generate both SOLICIT
  126. and REQUEST packets.
  127. </para>
  128. </listitem> <listitem>
  129. <para>
  130. With one template file specified, that file
  131. will be used as the pattern for SOLICIT packets:
  132. <command>perfdhcp</command> will generate the REQUEST
  133. packets.
  134. </para>
  135. </listitem> <listitem>
  136. <para>
  137. With two template files given on the command line, the
  138. first will be used as the pattern for SOLICIT packets,
  139. the second as the pattern for REQUEST packets.
  140. </para>
  141. </listitem>
  142. </itemizedlist>
  143. <para>
  144. (Similar determination applies to DHCPv4's DISCOVER and REQUEST
  145. packets.)
  146. </para>
  147. <para>
  148. The template file holds the DHCP packet represented as a stream
  149. of ASCII hexadecimal digits and it excludes any IP/UDP stack
  150. headers. The template file must not contain any characters other
  151. than hexadecimal digits and spaces. Spaces are discarded when the
  152. template file is parsed (so in the file, '12B4' is the same as
  153. '12 B4' which is the same as '1 2 B 4')
  154. </para>
  155. <para>
  156. The template files should be used in conjunction with the command
  157. line parameters which specify offsets of the data fields being
  158. modified in outbound packets. For example, example, the <option>-E
  159. <replaceable class="parameter">time-offset</replaceable></option>
  160. switch specifies the offset of the DHCPv6 Elapsed Time option in
  161. the packet template. If the offset is specified, perfdhcp will
  162. inject the current elapsed time value into this field before
  163. sending the packet to the server.
  164. </para>
  165. <para>
  166. In many scenarios, <command>perfdhcp</command> needs to simulate
  167. multiple clients (having unique client identifier). Since
  168. packets for each client are generated from the same template
  169. file, it is necessary to randomize the client identifier (or HW
  170. address in DHCPv4) in the packet created from it. The <option>-O
  171. <replaceable class="parameter">random-offset</replaceable></option>
  172. option allows specification of the offset in the template where
  173. randomization should be performed. It is important to note that
  174. this offset points to the end (not the beginning) of the client
  175. identifier (or HW address field). The number of bytes being
  176. randomized depends on the number of simulated clients. If the
  177. number of simulated clients is between 1 and 255, only one byte
  178. (to which randomization offset points) will be randomized. If the
  179. number of simulated clients is between 256 and 65535, two bytes
  180. will be randomized. Note, that two last bytes of the client
  181. identifier will be randomized in this case: the byte which
  182. randomization offset parameter points to, and the one which
  183. precedes it (random-offset - 1). If the number of simulated
  184. clients exceeds 65535, three bytes will be randomized; and so on.
  185. </para>
  186. <para>
  187. Templates may be currently used to generate packets being sent
  188. to the server in 4-way exchanges, i.e. SOLICIT, REQUEST (DHCPv6)
  189. and DISCOVER, REQUEST (DHCPv4). They cannot be used when RENEW
  190. or RELEASE packets are being sent.
  191. </para>
  192. </refsect1>
  193. <refsect1>
  194. <title>OPTIONS</title>
  195. <variablelist>
  196. <varlistentry>
  197. <term><option>-1</option></term>
  198. <listitem>
  199. <para>
  200. Take the server-ID option from the first received
  201. message.
  202. </para>
  203. </listitem>
  204. </varlistentry>
  205. <varlistentry>
  206. <term><option>-4</option></term>
  207. <listitem>
  208. <para>
  209. DHCPv4 operation; this is the default. It is
  210. incompatible with the <option>-6</option> option.
  211. </para>
  212. </listitem>
  213. </varlistentry>
  214. <varlistentry>
  215. <term><option>-6</option></term>
  216. <listitem>
  217. <para>
  218. DHCPv6 operation. This is incompatible with the
  219. <option>-4</option> option.
  220. </para>
  221. </listitem>
  222. </varlistentry>
  223. <varlistentry>
  224. <term><option>-a <replaceable class="parameter">aggressivity</replaceable></option></term>
  225. <listitem>
  226. <para>
  227. When the target sending rate is not yet reached,
  228. control how many exchanges are initiated before the
  229. next pause. This is a positive integer and defaults
  230. to 1.
  231. </para>
  232. </listitem>
  233. </varlistentry>
  234. <varlistentry>
  235. <term><option>-b <replaceable class="parameter">basetype=value</replaceable></option></term>
  236. <listitem>
  237. <para>
  238. The base MAC or DUID used to simulate
  239. different clients. The <replaceable
  240. class="parameter">basetype</replaceable> may be "mac"
  241. or "duid". (The keyword "ether" may alternatively
  242. used for MAC.) The <option>-b</option> option can be
  243. specified multiple times. The MAC address must consist
  244. of six octets separated by single (:) or double (::)
  245. colons, for example: mac=00:0c:01:02:03:04. The DUID
  246. value is a hexadecimal string: it must be at least six
  247. octets long and must not be longer than 64 bytes and
  248. the length must be less than 128 hexadecimal digits,
  249. for example: duid=0101010101010101010110111F14.
  250. </para>
  251. </listitem>
  252. </varlistentry>
  253. <varlistentry>
  254. <term><option>-d <replaceable class="parameter">drop-time</replaceable></option></term>
  255. <listitem>
  256. <para>
  257. Specify the time after which a request is treated
  258. as having been lost. The value is given in seconds
  259. and may contain a fractional component. The default
  260. is 1 second.
  261. </para>
  262. </listitem>
  263. </varlistentry>
  264. <varlistentry>
  265. <term><option>-e <replaceable class="parameter">lease-type</replaceable></option></term>
  266. <listitem>
  267. <para>
  268. Specifies the type of lease being requested from
  269. the server. It may be one of the following:
  270. </para>
  271. <variablelist>
  272. <varlistentry>
  273. <term>address-only</term>
  274. <listitem>
  275. <para>Only regular addresses (v4 or v6) will be requested.</para>
  276. </listitem>
  277. </varlistentry>
  278. <varlistentry>
  279. <term>prefix-only</term>
  280. <listitem>
  281. <para>Only IPv6 prefixes will be requested.</para>
  282. </listitem>
  283. </varlistentry>
  284. <varlistentry>
  285. <term>address-and-prefix</term>
  286. <listitem>
  287. <para>Both IPv6 addresses and prefixes will be requested.</para>
  288. </listitem>
  289. </varlistentry>
  290. </variablelist>
  291. <para>
  292. The <option>-e prefix-only</option> and <option>-e
  293. address-and-prefix</option> forms may not be used
  294. with the <option>-4</option> option.
  295. </para>
  296. </listitem>
  297. </varlistentry>
  298. <varlistentry>
  299. <term><option>-h</option></term>
  300. <listitem>
  301. <para>
  302. Print help and exit.
  303. </para>
  304. </listitem>
  305. </varlistentry>
  306. <varlistentry>
  307. <term><option>-i</option></term>
  308. <listitem>
  309. <para>
  310. Do only the initial part of the exchange:
  311. DISCOVER-OFFER if <option>-4</option> is selected,
  312. SOLICIT-ADVERTISE if <option>-6</option> is chosen.
  313. </para>
  314. <para>
  315. <option>-i</option> is incompatible with the following
  316. options: <option>-1</option>, <option>-d</option>,
  317. <option>-D</option>, <option>-E</option>,
  318. <option>-S</option>, <option>-I</option> and
  319. <option>-F</option>. In addition, it cannot be
  320. used with multiple instances of <option>-O</option>,
  321. <option>-T</option> and <option>-X</option>.
  322. </para>
  323. </listitem>
  324. </varlistentry>
  325. <varlistentry>
  326. <term><option>-l <replaceable class="parameter">local-addr|interface</replaceable></option></term>
  327. <listitem>
  328. <para>
  329. For DHCPv4 operation, specify the local
  330. hostname/address to use when communicating with
  331. the server. By default, the interface address
  332. through which traffic would normally be routed to
  333. the server is used. For DHCPv6 operation, specify
  334. the name of the network interface through which
  335. exchanges are initiated.
  336. </para>
  337. </listitem>
  338. </varlistentry>
  339. <varlistentry>
  340. <term><option>-L <replaceable class="parameter">local-port</replaceable></option></term>
  341. <listitem>
  342. <para>
  343. Specify the local port to use. This must be zero
  344. or a positive integer up to 65535. A value of 0
  345. (the default) allows <command>perfdhcp</command>
  346. to choose its own port.
  347. </para>
  348. </listitem>
  349. </varlistentry>
  350. <varlistentry>
  351. <term><option>-P <replaceable class="parameter">preload</replaceable></option></term>
  352. <listitem>
  353. <para>
  354. Initiate <replaceable
  355. class="parameter">preload</replaceable>
  356. exchanges back to back at startup. <replaceable
  357. class="parameter">preload</replaceable> must be 0
  358. (the default) or a positive integer.
  359. </para>
  360. </listitem>
  361. </varlistentry>
  362. <varlistentry>
  363. <term><option>-r <replaceable class="parameter">rate</replaceable></option></term>
  364. <listitem>
  365. <para>
  366. Initiate <replaceable
  367. class="parameter">rate</replaceable> DORA/SARR (or
  368. if <option>-i</option> is given, DO/SA) exchanges
  369. per second. A periodic report is generated showing
  370. the number of exchanges which were not completed,
  371. as well as the average response latency. The program
  372. continues until interrupted, at which point a final
  373. report is generated.
  374. </para>
  375. </listitem>
  376. </varlistentry>
  377. <varlistentry>
  378. <term><option>-R <replaceable class="parameter">num-clients</replaceable></option></term>
  379. <listitem>
  380. <para>
  381. Specify how many different clients are used. With
  382. a value of 1 (the default), all requests seem
  383. to come from the same client. <replaceable
  384. class="parameter">num-clients</replaceable> must be
  385. a positive number.
  386. </para>
  387. </listitem>
  388. </varlistentry>
  389. <varlistentry>
  390. <term><option>-s <replaceable class="parameter">seed</replaceable></option></term>
  391. <listitem>
  392. <para>
  393. Specify the seed for randomization, making runs of
  394. <command>perfdhcp</command> repeatable. <replaceable
  395. class="parameter">seed</replaceable> is 0 or a positive
  396. integer. The value 0 means that a seed is not used;
  397. this is the default.
  398. </para>
  399. </listitem>
  400. </varlistentry>
  401. <varlistentry>
  402. <term><option>-T <replaceable class="parameter">template-file</replaceable></option></term>
  403. <listitem>
  404. <para>
  405. The name of a file containing the template to use as a
  406. stream of hexadecimal digits. This may be specified
  407. up to two times and controls the contents of the
  408. packets sent (see the "TEMPLATES" section above).
  409. </para>
  410. </listitem>
  411. </varlistentry>
  412. <varlistentry>
  413. <term><option>-v</option></term>
  414. <listitem>
  415. <para>
  416. Print the version of this program.
  417. </para>
  418. </listitem>
  419. </varlistentry>
  420. <varlistentry>
  421. <term><option>-w <replaceable class="parameter">wrapped</replaceable></option></term>
  422. <listitem>
  423. <para>
  424. Command to call with a single parameter of "start"
  425. or "stop" at the beginning/end of the program.
  426. </para>
  427. </listitem>
  428. </varlistentry>
  429. <varlistentry>
  430. <term><option>-x <replaceable class="parameter">diagnostic-selector</replaceable></option></term>
  431. <listitem>
  432. <para>
  433. Include extended diagnostics
  434. in the output. <replaceable
  435. class="parameter">diagnostic-selector</replaceable>
  436. is a string of single-keywords specifying the
  437. operations for which verbose output is desired.
  438. The selector key letters are:
  439. </para>
  440. <variablelist>
  441. <varlistentry>
  442. <term>a</term>
  443. <listitem>
  444. <para>Print the decoded command line arguments.</para>
  445. </listitem>
  446. </varlistentry>
  447. <varlistentry>
  448. <term>e</term>
  449. <listitem>
  450. <para>Print the exit reason.</para>
  451. </listitem>
  452. </varlistentry>
  453. <varlistentry>
  454. <term>i</term>
  455. <listitem>
  456. <para>Print rate processing details.</para>
  457. </listitem>
  458. </varlistentry>
  459. <varlistentry>
  460. <term>s</term>
  461. <listitem>
  462. <para>Print the first server-ID.</para>
  463. </listitem>
  464. </varlistentry>
  465. <varlistentry>
  466. <term>t</term>
  467. <listitem>
  468. <para>When finished, print timers of all successful exchanges.</para>
  469. </listitem>
  470. </varlistentry>
  471. <varlistentry>
  472. <term>T</term>
  473. <listitem>
  474. <para>When finished, print templates</para>
  475. </listitem>
  476. </varlistentry>
  477. </variablelist>
  478. </listitem>
  479. </varlistentry>
  480. </variablelist>
  481. <refsect2>
  482. <title>DHCPv4-Only Options</title>
  483. <para>
  484. The following options only apply for DHCPv4 (i.e. when
  485. <option>-4</option> is given).
  486. </para>
  487. <variablelist>
  488. <varlistentry>
  489. <term><option>-B</option></term>
  490. <listitem>
  491. <para>
  492. Force broadcast handling.
  493. </para>
  494. </listitem>
  495. </varlistentry>
  496. </variablelist>
  497. </refsect2>
  498. <refsect2>
  499. <title>DHCPv6-Only Options</title>
  500. <para>
  501. The following options only apply for DHCPv6 (i.e. when
  502. <option>-6</option> is given).
  503. </para>
  504. <variablelist>
  505. <varlistentry>
  506. <term><option>-c</option></term>
  507. <listitem>
  508. <para>
  509. Add a rapid commit option (exchanges will be
  510. SOLICIT-ADVERTISE).
  511. </para>
  512. </listitem>
  513. </varlistentry>
  514. <varlistentry>
  515. <term><option>-f <replaceable class="parameter">renew-rate</replaceable></option></term>
  516. <listitem>
  517. <para>
  518. Rate at which IPv6 RENEW requests are sent
  519. to a server. This value is only valid when
  520. used in conjunction with the exchange
  521. rate (given by <option>-r <replaceable
  522. class="parameter">rate</replaceable></option>).
  523. Furthermore the sum of this value and the
  524. release-rate (given by <option>-F <replaceable
  525. class="parameter">rate</replaceable></option>)
  526. must be equal to or less than the exchange rate.
  527. </para>
  528. </listitem>
  529. </varlistentry>
  530. <varlistentry>
  531. <term><option>-F <replaceable class="parameter">release-rate</replaceable></option></term>
  532. <listitem>
  533. <para>
  534. Rate at which IPv6 RELEASE requests are
  535. sent to a server. This value is only valid
  536. when used in conjunction with the exchange
  537. rate (given by <option>-r <replaceable
  538. class="parameter">rate</replaceable></option>).
  539. Furthermore the sum of this value and the
  540. renew-rate (given by <option>-f <replaceable
  541. class="parameter">rate</replaceable></option>)
  542. must be equal to or less than the exchange rate.
  543. </para>
  544. </listitem>
  545. </varlistentry>
  546. </variablelist>
  547. </refsect2>
  548. <refsect2>
  549. <title>Template-Related Options</title>
  550. <para>
  551. The following options may only be used in conjunction with
  552. <option>-T</option> and control how <command>perfdhcp</command>
  553. modifies the template. The options may be specified multiple
  554. times on the command line; each occurrence affects the
  555. corresponding template file (see "TEMPLATES" above).
  556. </para>
  557. <varlistentry>
  558. <term><option>-E <replaceable class="parameter">time-offset</replaceable></option></term>
  559. <listitem>
  560. <para>
  561. Offset of the (DHCPv4) secs field or (DHCPv6)
  562. elapsed-time option in the (second i.e. REQUEST)
  563. template and must be 0 or a positive integer:
  564. a value of 0 disables this.
  565. </para>
  566. </listitem>
  567. </varlistentry>
  568. <varlistentry>
  569. <term><option>-I <replaceable class="parameter">ip-offset</replaceable></option></term>
  570. <listitem>
  571. <para>
  572. Offset of the (DHCPv4) IP address in the requested-IP
  573. option / (DHCPv6) IA_NA option in the (second/request)
  574. template.
  575. </para>
  576. </listitem>
  577. </varlistentry>
  578. <varlistentry>
  579. <term><option>-O <replaceable class="parameter">random-offset</replaceable></option></term>
  580. <listitem>
  581. <para>
  582. Offset of the last octet to
  583. randomize in the template. <replaceable
  584. class="parameter">random-offset</replaceable> must be
  585. an integer greater than 3. The <option>-T</option>
  586. switch must be given to use this option.
  587. </para>
  588. </listitem>
  589. </varlistentry>
  590. <varlistentry>
  591. <term><option>-S <replaceable class="parameter">srvid-offset</replaceable></option></term>
  592. <listitem>
  593. <para>
  594. Offset of the server-ID option in the
  595. (second/request) template. <replaceable
  596. class="parameter">srvid-offset</replaceable> must
  597. be a positive integer, and the switch can only be
  598. used when the template option (<option>-T</option>)
  599. is also given.
  600. </para>
  601. </listitem>
  602. </varlistentry>
  603. <varlistentry>
  604. <term><option>-X <replaceable class="parameter">xid-offset</replaceable></option></term>
  605. <listitem>
  606. <para>
  607. Offset of the transaction ID (xid) in the template.
  608. <replaceable class="parameter">xid-offset</replaceable>
  609. must be a positive integer, and the switch can only
  610. be used when the template option (<option>-T</option>)
  611. is also given.
  612. </para>
  613. </listitem>
  614. </varlistentry>
  615. </refsect2>
  616. <refsect2>
  617. <title>Options Controlling a Test</title>
  618. <para>
  619. The following options may only be used in conjunction with
  620. <option>-r</option> and control both the length of the test
  621. and the frequency of reports.
  622. </para>
  623. <variablelist>
  624. <varlistentry>
  625. <term><option>-D <replaceable class="parameter">max-drop</replaceable></option></term>
  626. <listitem>
  627. <para>
  628. Abort the test if more than <replaceable
  629. class="parameter">max-drop</replaceable>
  630. requests have been dropped. Use <option>-D
  631. 0</option> to abort if even a single
  632. request has been dropped. If <replaceable
  633. class="parameter">max-drop</replaceable> includes
  634. the suffix '%', it specifies a maximum percentage
  635. of requests that may be dropped before abort.
  636. In this case, testing of the threshold begins after
  637. 10 requests have been expected to be received.
  638. </para>
  639. </listitem>
  640. </varlistentry>
  641. <varlistentry>
  642. <term><option>-n <replaceable class="parameter">num-requests</replaceable></option></term>
  643. <listitem>
  644. <para>
  645. Initiate <replaceable
  646. class="parameter">num-request</replaceable>
  647. transactions. No report is generated until all
  648. transactions have been initiated/waited-for,
  649. after which a report is generated and the
  650. program terminates.
  651. </para>
  652. </listitem>
  653. </varlistentry>
  654. <varlistentry>
  655. <term><option>-p <replaceable class="parameter">test-period</replaceable></option></term>
  656. <listitem>
  657. <para>
  658. Send requests for <replaceable
  659. class="parameter">test-period</replaceable>,
  660. which is specified in the same manner as
  661. <option>-d</option>. This can be used as an
  662. alternative to <option>-n</option>, or both
  663. options can be given, in which case the testing
  664. is completed when either limit is reached.
  665. </para>
  666. </listitem>
  667. </varlistentry>
  668. <varlistentry>
  669. <term><option>-t <replaceable class="parameter">interval</replaceable></option></term>
  670. <listitem>
  671. <para>
  672. Sets the delay (in seconds) between two successive reports.
  673. </para>
  674. </listitem>
  675. </varlistentry>
  676. </variablelist>
  677. </refsect2>
  678. <refsect2>
  679. <title>Arguments</title>
  680. <variablelist>
  681. <varlistentry>
  682. <term>server</term>
  683. <listitem>
  684. <para>
  685. Server to test, specified as an IP address.
  686. In the DHCPv6 case, the special name 'all' can be
  687. used to refer to All_DHCP_Relay_Agents_and_Servers
  688. (the multicast address FF02::1:2), or the special
  689. name 'servers' to refer to All_DHCP_Servers (the
  690. multicast address FF05::1:3). The server is
  691. mandatory except where the <option>-l</option>
  692. option is given to specify an interface, in
  693. which case it defauls to 'all'.
  694. </para>
  695. </listitem>
  696. </varlistentry>
  697. </variablelist>
  698. </refsect2>
  699. </refsect1>
  700. <refsect1>
  701. <title>ERRORS</title>
  702. <para>
  703. <command>perfdhcp</command> can report the following errors in the packet exchange:
  704. </para>
  705. <variablelist>
  706. <varlistentry>
  707. <term>tooshort</term>
  708. <listitem>
  709. <para>A message was received that was too short.</para>
  710. </listitem>
  711. </varlistentry>
  712. <varlistentry>
  713. <term>orphans</term>
  714. <listitem>
  715. <para>
  716. Received a message which doesn't match one sent
  717. to the server (i.e. it is a duplicate message, a
  718. message that has arrived after an excessive delay,
  719. or one that is just not recognized).
  720. </para>
  721. </listitem>
  722. </varlistentry>
  723. <varlistentry>
  724. <term>locallimit</term>
  725. <listitem>
  726. <para>Reached local system limits when sending a message.</para>
  727. </listitem>
  728. </varlistentry>
  729. </variablelist>
  730. </refsect1>
  731. <refsect1>
  732. <title>EXIT STATUS</title>
  733. <para>
  734. <command>perfdhcp</command> can exit with one of the following
  735. status codes:
  736. </para>
  737. <variablelist>
  738. <varlistentry>
  739. <term>0</term> <listitem>
  740. <para>Success.</para>
  741. </listitem>
  742. </varlistentry>
  743. <varlistentry>
  744. <term>1</term>
  745. <listitem>
  746. <para>General error.</para>
  747. </listitem>
  748. </varlistentry>
  749. <varlistentry>
  750. <term>2</term>
  751. <listitem>
  752. <para>Error in command-line arguments.</para>
  753. </listitem>
  754. </varlistentry>
  755. <varlistentry>
  756. <term>3</term>
  757. <listitem>
  758. <para>No general failures in operation, but one or more exchanges were unsuccessful.</para>
  759. </listitem>
  760. </varlistentry>
  761. </variablelist>
  762. </refsect1>
  763. <refsect1>
  764. <title>SEE ALSO</title>
  765. <para>
  766. <citerefentry><refentrytitle>kea-dhcp4</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
  767. <citerefentry><refentrytitle>kea-dhcp6</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
  768. <citetitle>BIND 10 Guide</citetitle>,
  769. <citetitle>DHCP Performance Guide</citetitle>.
  770. </para>
  771. </refsect1>
  772. <!--
  773. <refsect1>
  774. <title>HISTORY</title>
  775. <para>
  776. The <command>perfdhcp</command> tool was initially coded by John DuBois, Francis Dupont and Marcin Siodelski of ISC.
  777. </para>
  778. </refsect1>
  779. -->
  780. </refentry>