|
@@ -22,9 +22,9 @@
|
|
|
- PERFORMANCE OF THIS SOFTWARE.
|
|
|
-->
|
|
|
|
|
|
-<book>
|
|
|
- <?xml-stylesheet href="bind10-guide.css" type="text/css"?>
|
|
|
+<?xml-stylesheet href="bind10-guide.css" type="text/css"?>
|
|
|
|
|
|
+<book>
|
|
|
<bookinfo>
|
|
|
<title>DHCP Performance Guide</title>
|
|
|
<!-- <subtitle>Various aspects of DHCP Performance in BIND 10</subtitle> -->
|
|
@@ -37,7 +37,10 @@
|
|
|
<firstname>Tomasz</firstname>
|
|
|
<surname>Mrugalski</surname>
|
|
|
</author>
|
|
|
-
|
|
|
+ <author>
|
|
|
+ <firstname>Marcin</firstname>
|
|
|
+ <surname>Siodelski</surname>
|
|
|
+ </author>
|
|
|
<abstract>
|
|
|
<para>BIND 10 is a framework that features Domain Name System
|
|
|
(DNS) suite and Dynamic Host Configuration Protocol (DHCP)
|
|
@@ -586,9 +589,252 @@ SQLite version: 3.7.9sourceid version is 2011-11-01 00:52:41 c7c6050ef060877ebe7
|
|
|
|
|
|
<chapter id="perfdhcp">
|
|
|
<title>perfdhcp</title>
|
|
|
- <para>
|
|
|
- TODO: Write something about perfdhcp here.
|
|
|
- </para>
|
|
|
- </chapter>
|
|
|
+ <section>
|
|
|
+ <title>Purpose</title>
|
|
|
+ <para>
|
|
|
+ There is a growing need to evaluate performance of DHCP servers in
|
|
|
+ different traffic conditions to understand their bottle necks.
|
|
|
+ This helps to elimante bugs in existing DHCP software as well
|
|
|
+ as make informed decisions regarding new DHCP software designs
|
|
|
+ to significantly improve its performance. The perfdhcp tool has
|
|
|
+ been created to fill the gap in performance measurement capabilities
|
|
|
+ mostly. However, the number of implemented features and parameters
|
|
|
+ exposed to the user make this tool useful for functional testing as
|
|
|
+ well.
|
|
|
+ </para>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <section>
|
|
|
+ <title>Key features</title>
|
|
|
+ <para>
|
|
|
+ The perfdhcp exposes the number of command line parameters to
|
|
|
+ control DHCP message exchanges. Currently they fall back to
|
|
|
+ the following categories:
|
|
|
+ <orderedlist>
|
|
|
+ <listitem>
|
|
|
+ <para>
|
|
|
+ Rate control - control how many DHCP exchanges
|
|
|
+ are initiated within a period of time. Tool can also simulate
|
|
|
+ best effort conditions where it attempts to start as many
|
|
|
+ exchanges as possible.
|
|
|
+ </para>
|
|
|
+ </listitem>
|
|
|
+ <listitem>
|
|
|
+ <para>
|
|
|
+ Test exit specifiers - control the conditions when test
|
|
|
+ completes including number of initiated exchanges, test period or
|
|
|
+ maximum number of dropped packets.
|
|
|
+ </para>
|
|
|
+ </listitem>
|
|
|
+ <listitem>
|
|
|
+ <para>
|
|
|
+ Packet templates - specify files containing packet templates that
|
|
|
+ are used by perfdhcp to create custom DHCP messages instead of
|
|
|
+ default. Tool also allows to specify number of values indicating
|
|
|
+ offsets of variable values within a packet that are modified in
|
|
|
+ flight by the tool.
|
|
|
+ </para>
|
|
|
+ </listitem>
|
|
|
+ <listitem>
|
|
|
+ <para>
|
|
|
+ Reporting - for each test produce the set of performance data
|
|
|
+ including achieved packet exchange rate (server performance).
|
|
|
+ There is also a number of diagnostic selectors available that
|
|
|
+ enable periodic (intermediate) reporting, packet timestamps
|
|
|
+ printing and detailed information about perfdhcp internal
|
|
|
+ states (for debugging).
|
|
|
+ </para>
|
|
|
+ </listitem>
|
|
|
+ <listitem>
|
|
|
+ <para>
|
|
|
+ Different mode of operations - specify DHCP version used
|
|
|
+ (v4 or v6), 2-way or 4-way exchanges, use Rapid Commit option
|
|
|
+ for DHCPv6.
|
|
|
+ </para>
|
|
|
+ </listitem>
|
|
|
+ <listitem>
|
|
|
+ <para>
|
|
|
+ IP layer options - specify local/remote address, local interface
|
|
|
+ and local port to be used for communication with DHCP server.
|
|
|
+ </para>
|
|
|
+ </listitem>
|
|
|
+ </orderedlist>
|
|
|
+ </para>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <section id="perfdhcp-command-line">
|
|
|
+ <title>Command line options</title>
|
|
|
+ <para>
|
|
|
+ The following command line options may be used with perfdhcp tool.
|
|
|
+ This summary also presents its possible exit codes as well as
|
|
|
+ error counters printed along when test is complete:
|
|
|
+ <screen>$ <userinput>./perfdhcp -h</userinput>
|
|
|
+<![CDATA[perfdhcp [-hv] [-4|-6] [-r<rate>] [-t<report>] [-R<range>] [-b<base>]
|
|
|
+ [-n<num-request>] [-p<test-period>] [-d<drop-time>] [-D<max-drop>]
|
|
|
+ [-l<local-addr|interface>] [-P<preload>] [-a<aggressivity>]
|
|
|
+ [-L<local-port>] [-s<seed>] [-i] [-B] [-c] [-1]
|
|
|
+ [-T<template-file>] [-X<xid-offset>] [-O<random-offset]
|
|
|
+ [-E<time-offset>] [-S<srvid-offset>] [-I<ip-offset>]
|
|
|
+ [-x<diagnostic-selector>] [-w<wrapped>] [server]
|
|
|
+
|
|
|
+The [server] argument is the name/address of the DHCP server to
|
|
|
+contact. For DHCPv4 operation, exchanges are initiated by
|
|
|
+transmitting a DHCP DISCOVER to this address.
|
|
|
+
|
|
|
+For DHCPv6 operation, exchanges are initiated by transmitting a DHCP
|
|
|
+SOLICIT to this address. In the DHCPv6 case, the special name 'all'
|
|
|
+can be used to refer to All_DHCP_Relay_Agents_and_Servers (the
|
|
|
+multicast address FF02::1:2), or the special name 'servers' to refer
|
|
|
+to All_DHCP_Servers (the multicast address FF05::1:3). The [server]
|
|
|
+argument is optional only in the case that -l is used to specify an
|
|
|
+interface, in which case [server] defaults to 'all'.
|
|
|
+
|
|
|
+The default is to perform a single 4-way exchange, effectively pinging
|
|
|
+the server.
|
|
|
+The -r option is used to set up a performance test, without
|
|
|
+it exchanges are initiated as fast as possible.
|
|
|
+
|
|
|
+Options:
|
|
|
+-1: Take the server-ID option from the first received message.
|
|
|
+-4: DHCPv4 operation (default). This is incompatible with the -6 option.
|
|
|
+-6: DHCPv6 operation. This is incompatible with the -4 option.
|
|
|
+-a<aggressivity>: When the target sending rate is not yet reached,
|
|
|
+ control how many exchanges are initiated before the next pause.
|
|
|
+-b<base>: The base mac, duid, IP, etc, used to simulate different
|
|
|
+ clients. This can be specified multiple times, each instance is
|
|
|
+ in the <type>=<value> form, for instance:
|
|
|
+ (and default) mac=00:0c:01:02:03:04.
|
|
|
+-d<drop-time>: Specify the time after which a request is treated as
|
|
|
+ having been lost. The value is given in seconds and may contain a
|
|
|
+ fractional component. The default is 1 second.
|
|
|
+-E<time-offset>: Offset of the (DHCPv4) secs field / (DHCPv6)
|
|
|
+ elapsed-time option in the (second/request) template.
|
|
|
+ The value 0 disables it.
|
|
|
+-h: Print this help.
|
|
|
+-i: Do only the initial part of an exchange: DO or SA, depending on
|
|
|
+ whether -6 is given.
|
|
|
+-I<ip-offset>: Offset of the (DHCPv4) IP address in the requested-IP
|
|
|
+ option / (DHCPv6) IA_NA option in the (second/request) template.
|
|
|
+-l<local-addr|interface>: For DHCPv4 operation, specify the local
|
|
|
+ hostname/address to use when communicating with the server. By
|
|
|
+ default, the interface address through which traffic would
|
|
|
+ normally be routed to the server is used.
|
|
|
+ For DHCPv6 operation, specify the name of the network interface
|
|
|
+ via which exchanges are initiated.
|
|
|
+-L<local-port>: Specify the local port to use
|
|
|
+ (the value 0 means to use the default).
|
|
|
+-O<random-offset>: Offset of the last octet to randomize in the template.
|
|
|
+-P<preload>: Initiate first <preload> exchanges back to back at startup.
|
|
|
+-r<rate>: Initiate <rate> DORA/SARR (or if -i is given, DO/SA)
|
|
|
+ exchanges per second. A periodic report is generated showing the
|
|
|
+ number of exchanges which were not completed, as well as the
|
|
|
+ average response latency. The program continues until
|
|
|
+ interrupted, at which point a final report is generated.
|
|
|
+-R<range>: Specify how many different clients are used. With 1
|
|
|
+ (the default), all requests seem to come from the same client.
|
|
|
+-s<seed>: Specify the seed for randomization, making it repeatable.
|
|
|
+-S<srvid-offset>: Offset of the server-ID option in the
|
|
|
+ (second/request) template.
|
|
|
+-T<template-file>: The name of a file containing the template to use
|
|
|
+ as a stream of hexadecimal digits.
|
|
|
+-v: Report the version number of this program.
|
|
|
+-w<wrapped>: Command to call with start/stop at the beginning/end of
|
|
|
+ the program.
|
|
|
+-x<diagnostic-selector>: Include extended diagnostics in the output.
|
|
|
+ <diagnostic-selector> is a string of single-keywords specifying
|
|
|
+ the operations for which verbose output is desired. The selector
|
|
|
+ keyletters are:
|
|
|
+ * 'a': print the decoded command line arguments
|
|
|
+ * 'e': print the exit reason
|
|
|
+ * 'i': print rate processing details
|
|
|
+ * 'r': print randomization details
|
|
|
+ * 's': print first server-id
|
|
|
+ * 't': when finished, print timers of all successful exchanges
|
|
|
+ * 'T': when finished, print templates
|
|
|
+-X<xid-offset>: Transaction ID (aka. xid) offset in the template.
|
|
|
+
|
|
|
+DHCPv4 only options:
|
|
|
+-B: Force broadcast handling.
|
|
|
+
|
|
|
+DHCPv6 only options:
|
|
|
+-c: Add a rapid commit option (exchanges will be SA).
|
|
|
+
|
|
|
+The remaining options are used only in conjunction with -r:
|
|
|
+
|
|
|
+-D<max-drop>: Abort the test if more than <max-drop> requests have
|
|
|
+ been dropped. Use -D0 to abort if even a single request has been
|
|
|
+ dropped. If <max-drop> includes the suffix '%', it specifies a
|
|
|
+ maximum percentage of requests that may be dropped before abort.
|
|
|
+ In this case, testing of the threshold begins after 10 requests
|
|
|
+ have been expected to be received.
|
|
|
+-n<num-request>: Initiate <num-request> transactions. No report is
|
|
|
+ generated until all transactions have been initiated/waited-for,
|
|
|
+ after which a report is generated and the program terminates.
|
|
|
+-p<test-period>: Send requests for the given test period, which is
|
|
|
+ specified in the same manner as -d. This can be used as an
|
|
|
+ alternative to -n, or both options can be given, in which case the
|
|
|
+ testing is completed when either limit is reached.
|
|
|
+-t<report>: Delay in seconds between two periodic reports.
|
|
|
+
|
|
|
+Errors:
|
|
|
+- tooshort: received a too short message
|
|
|
+- orphans: received a message which doesn't match an exchange
|
|
|
+ (duplicate, late or not related)
|
|
|
+- locallimit: reached to local system limits when sending a message.
|
|
|
+
|
|
|
+Exit status:
|
|
|
+The exit status is:
|
|
|
+0 on complete success.
|
|
|
+1 for a general error.
|
|
|
+2 if an error is found in the command line arguments.
|
|
|
+3 if there are no general failures in operation, but one or more
|
|
|
+ exchanges are not successfully completed.
|
|
|
+]]>
|
|
|
+ </screen>
|
|
|
+ </para>
|
|
|
+ </section>
|
|
|
+ <section>
|
|
|
+ <title>Running a test</title>
|
|
|
+ <para>
|
|
|
+ In order to run performance test at least two separate systems
|
|
|
+ have to be installed: client and server. The first one has to have
|
|
|
+ perfdhcp tool installed, the latter has to have DHCP server
|
|
|
+ running (v4 or v6). If only single system is available the client
|
|
|
+ and server can be run on virtual machines (running on the same
|
|
|
+ phisical system) but in this case performance data may be heavily
|
|
|
+ impacted by the performance of VMs.
|
|
|
+ </para>
|
|
|
+ <para>
|
|
|
+ The DHCP operates on low port numbers (67 for DHCPv4 relays and
|
|
|
+ 547 for DHCPv6) running perfdhcp with non-root priviliges will
|
|
|
+ usually result in the error message similar to this:
|
|
|
+ <screen><userinput>$./perfdhcp -4 -l eth3 -r 100 all</userinput>
|
|
|
+Error running perfdhcp: Failed to bind socket 3 to 172.16.1.2/port=67
|
|
|
+ </screen>
|
|
|
+ perfdhcp exposes '-L' command line option that
|
|
|
+ imposes use of custom local port and the following command line will
|
|
|
+ work:
|
|
|
+ <screen><userinput>$./perfdhcp -4 -l eth3 -r 100 -L 10067 all</userinput></screen>
|
|
|
+ but in the standard configuration no responses will be received
|
|
|
+ from the ISC DHCP server because server responds to default relay
|
|
|
+ port 67.
|
|
|
+ </para>
|
|
|
+ <para>
|
|
|
+ Alternative way to overcome the issue with lack of privileges
|
|
|
+ to use default DHCP port number is to run perfdhcp as root.
|
|
|
+ </para>
|
|
|
|
|
|
+ <para>
|
|
|
+ In this section the perfdhcp command line options examples
|
|
|
+ are presented as a quick start guide for new users. For the
|
|
|
+ detailed list of command line options refer to
|
|
|
+ <xref linkend="perfdhcp-command-line"/>.
|
|
|
+ </para>
|
|
|
+ <para>
|
|
|
+ <screen>
|
|
|
+ <userinput></userinput>
|
|
|
+ </screen>
|
|
|
+ </para>
|
|
|
+ </section>
|
|
|
+ </chapter>
|
|
|
</book>
|