IXPKTGEN is a packet generator running at IXP2400 network processor. It was designed for sending packets to saturate several Gigabits lines.
We have only tested the IXPKTGEN on an IXP evaluation board which is called ENP-2611. This board have three 1000Mbps ethernet interfaces.
This tool was developed to test our ESP project.
Users are supposed to be able to install the IXP2400 platform. Otherwise, please refer to Intel IXP2400 documents. You need to install the hardware, the embedded linux. and the Intel IXA SDK 3.1 ( or later ).
Installation is simple for IXPKTGEN. Just download the tar.gz achive, compile the program, and copy both executable file and the .uof file to the tagart directory. See Compile & Run for detail.
you are supposed to be able to setup the envionment. Try to compile and run the sample codes provided by intel before you start.
The following lines are the commands to compile and run the IXPKTGEN.
cd YOUR_DIRECTORY/applications/pktgen
make TARGET_LOC=YOUR_TARGET_DIRECTORY
telnet to the IP_OF_EMBEDDED_LINUX
pktgen setup stream1:1 stream2:2 stream3:3 stream4:1
pktgen startNOTE:
- YOUR_DIRECTORY: The directory created by untar the tar.gz archive.
- YOUR_TARGET_DIRECTORY: The directory which will be mounted by the embedded linux. Usually it's /opt/hardhat/previewkit/arm/xscale_be/target/opt/uof .
- IP_OF_EMBEDDED_LINUX : The IP of the embedded linux running at ixp2400 xscale core.
- The usage of pktgen is : pktgen stream_file:port_number stream_file:port_number .....
The ideal of stream is borrow from paket simulation envionment of Intel IXP workbench.
The structure of stream file is:
|
The stream commands includes:
- mbps_speed : packet sending rate in Mbps.
- pps_speed : packet sending rate in pps.
- interval : packet sending interval in ms.
- order : packet sending order. It can be sequence or random. Defaultis by sequence.
- repeat : repeat sending packet. It can be yes or no. Default is yes.
- repeat_until: repeat sending packet until xxxxx packets was sent.
The packet commands includes:
- fixed_data command provide the whole data of the ethernet frame. you can use multiple 'fixed_data' to describe the packet. the packet will assambled by the sequence of fixed_data.
- increased_byte
increase_2_bytes
increase_long_word
decrease_byte
decrease_2_bytes
decrease_long_word
random_byte
random_2_bytes
random_long_wordThese commands have the same format.
COMMAND byte_offset [MIN] [MAX] [STEP]Each of this command take the byte offset as the first parameter. The
MIN and MAX provide the range of the command. They are optional.
STEP define the value of increaseing or decreasing. If STEP is used,
you must also give MIN and MAX.NOTES:
- All Keywords are not case sensitive.
- Here is the a sample packet stream file.
- It's possible that you increase the value of a few bits. Suppose you want to increase bit 42 to bit 45 by 1. You may use the following command.
increase_byte 8 Min Max 4
If you are generating packet using linux kernel pktgen module, we have a perl script to convert your shell program to our stream file. Your shell program must use the pgset function in the linux kernel pktgen documents.
You need the change the pgset function to echo "pgset $1". Then you can run perl convert.pl YOUR_SHELL_PROGRAM. If everything is ok, you will get YOUR_SHELL_PROGRAM.stream
Once you have the stream input file, you can generate them using our IXPKTGEN. See Compile & Run for detail.
if you have any question, feel free to email us .