perfdhcp.xml 37 KB

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