1<refentry id="pg3"> 2 3<refmeta> 4<refentrytitle>pg3</refentrytitle> 5<manvolnum>8</manvolnum> 6<refmiscinfo>iputils-&snapshot;</refmiscinfo> 7</refmeta> 8 9 10<refnamediv> 11<refname>pg3, ipg, pgset</refname> 12<refpurpose>send stream of UDP packets</refpurpose> 13</refnamediv> 14 15<refsynopsisdiv> 16<cmdsynopsis> 17<command>source ipg</command> 18</cmdsynopsis> 19<cmdsynopsis> 20<command>pg</command> 21</cmdsynopsis> 22<cmdsynopsis> 23<command>pgset</command> 24<arg choice="req"><replaceable/COMMAND/</arg> 25</cmdsynopsis> 26</refsynopsisdiv> 27 28<refsect1><title>DESCRIPTION</title> 29<para> 30<command/ipg/ is not a program, it is script which should be sourced 31to <command/bash/. When sourced it loads module <filename/pg3/ and 32exports a few of functions accessible from parent shell. These macros 33are <command/pg/ to start packet injection and to get the results of run; 34and <command/pgset/ to setup packet generator. 35</para> 36 37<para> 38<command/pgset/ can send the following commands to module <filename/pg3/: 39</para> 40</refsect1> 41 42<refsect1><title>COMMAND</title> 43 44<variablelist> 45 46 <varlistentry> 47 <term><option>odev <replaceable/DEVICE/</option></term> 48 <listitem><para> 49Name of Ethernet device to test. See 50<link linkend="pg3.warning">warning</link> below. 51 </para></listitem> 52 </varlistentry> 53 54 <varlistentry> 55 <term><option>pkt_size <replaceable/BYTES/</option></term> 56 <listitem><para> 57Size of packet to generate. The size includes all the headers: UDP, IP, 58MAC, but does not account for overhead internal to medium, i.e. FCS 59and various paddings. 60 </para></listitem> 61 </varlistentry> 62 63 <varlistentry> 64 <term><option>frags <replaceable/NUMBER/</option></term> 65 <listitem><para> 66Each packet will contain <replaceable/NUMBER/ of fragments. 67Maximal amount for linux-2.4 is 6. Far not all the devices support 68fragmented buffers. 69 </para></listitem> 70 </varlistentry> 71 72 <varlistentry> 73 <term><option>count <replaceable/NUMBER/</option></term> 74 <listitem><para> 75Send stream of <replaceable/NUMBER/ of packets and stop after this. 76 </para></listitem> 77 </varlistentry> 78 79 <varlistentry> 80 <term><option>ipg <replaceable/TIME/</option></term> 81 <listitem><para> 82Introduce artificial delay between packets of <replaceable/TIME/ 83microseconds. 84 </para></listitem> 85 </varlistentry> 86 87 <varlistentry> 88 <term><option>dst <replaceable/IP_ADDRESS/</option></term> 89 <listitem><para> 90Select IP destination where the stream is sent to. 91Beware, never set this address at random. <command/pg3/ is not a toy, 92it creates really tough stream. Default value is 0.0.0.0. 93 </para></listitem> 94 </varlistentry> 95 96 <varlistentry> 97 <term><option>dst <replaceable/MAC_ADDRESS/</option></term> 98 <listitem><para> 99Select MAC destination where the stream is sent to. 100Default value is 00:00:00:00:00:00 in hope that this will not be received 101by any node on LAN. 102 </para></listitem> 103 </varlistentry> 104 105 <varlistentry> 106 <term><option>stop</option></term> 107 <listitem><para> 108Abort packet injection. 109 </para></listitem> 110 </varlistentry> 111 112</variablelist> 113</refsect1> 114 115<refsect1 id="pg3.warning"><title>WARNING</title> 116<para> 117When output device is set to some random device different 118of hardware Ethernet device, <command/pg3/ will crash kernel. 119</para> 120<para> 121Do not use it on VLAN, ethertap, VTUN and other devices, 122which emulate Ethernet not being real Ethernet in fact. 123</para> 124</refsect1> 125 126<refsect1><title>AUTHOR</title> 127<para> 128<command/pg3/ was written by <ulink url="mailto:robert.olsson@its.uu.se"> 129Robert Olsson <robert.olsson@its.uu.se></ulink>. 130</para> 131</refsect1> 132 133<refsect1><title>SECURITY</title> 134<para> 135This can be used only by superuser. 136</para> 137<para> 138This tool creates floods of packets which is unlikely to be handled 139even by high-end machines. For example, it saturates gigabit link with 14060 byte packets when used with Intel's e1000. In face of such stream 141switches, routers and end hosts may deadlock, crash, explode. 142Use only in test lab environment. 143</para> 144</refsect1> 145 146<refsect1><title>AVAILABILITY</title> 147<para> 148<command/pg3/ is part of <filename/iputils/ package 149and the latest versions are available in source form for anonymous ftp 150<ulink url="ftp://ftp.inr.ac.ru/ip-routing/iputils-current.tar.gz"> 151ftp://ftp.inr.ac.ru/ip-routing/iputils-current.tar.gz</ulink>. 152</para> 153</refsect1> 154 155<![IGNORE[ 156<refsect1><title>COPYING</title> 157<para> 158<literallayout> 159This documentation is free software; you can redistribute 160it and/or modify it under the terms of the GNU General Public 161License Version 2. 162 163This program is distributed in the hope that it will be 164useful, but WITHOUT ANY WARRANTY; without even the implied 165warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 166See the GNU General Public License for more details. 167 168For more details see the file COPYING in the source 169distribution of Linux kernel of version 2.4. 170</literallayout> 171</para> 172</refsect1> 173]]> 174 175</refentry> 176