daggen(1)

NAME
daggen - generate an ERF or PCAP format synthetic trace file

SYNOPSIS
daggen -x GROUP [options]

DESCRIPTION
daggen is an application for creating synthetic trace files. daggen can generate Ethernet, PoS, ATM and AAL5 traffic to ERF or pcap(3) format files.

To use daggen you need a configuration file that specifies the traffic pattern. You define different kind of packets and then specify the order and amount of them. Several random options are defined for the MAC address and payload of the packets, so many traffic patterns can be generated from a few lines of configuration.

The output file can be either a file of 64-bit aligned ERF records or a pcap(3) format file.

OPTIONS

-e  0|2|4 Set the global FCS size (in bytes). (default: chosen automatically according to the type of traffic)

-f FILE
    Use FILE as the configuration file (default: config.dag).

-i IFACE
    Set the output interface to IFACE (default: 0).

-l RX_ERROR
    Set rx error flag in ERF header to RX_ERROR (default: 0).

-o FILE
    Set the output file to FILE (default: output.dag).

-p  Select pcap(3) as the output file format (default: ERF format).

-r NUM
    Set the random number generation seed to be NUM (default: based on the system time).

-s NUM
    (round down at 64-bit alignment).

-S NUM
    (round up at 64-bit alignment) Truncate packets at a snaplength of NUM bytes (default: generate whole packets).

-v

--verbose
    Increase output verbosity (default: quiet).

-x GROUP
    Set the traffic group to execute to GROUP (no default, if wrong reports error).

EXAMPLES
////////////////////////////////
// daggen example config file //
////////////////////////////////
// General options
options {
    output_file "output3.erf";
    output_format erf; // erf or pcap
    verbose;
    random_seed 5188;
    interface 2;
}
packets {
    counters {
        counter_1 20 size 1;
        counter_2 [100:1000] size 2;
        counter_3 uniform(0,150000) size 4;
        c4 uniform (0x2A00, 0x2D00) size 2;
        spc uniform (1024, 65535) size 2;
        dpc [6000:7000] size 2;
    }
    // Packet type A
    packet eth_802_3 packet_A {
        // when a sentence is specified more than once, only
        // the last one is used
        src_addr 00:08:71:**:c7:7*;
        dst_addr **:10:02:93:4A:**;
        payload dummy (1500);
        payload dummy ([46:1500] step [1:15] step uniform (2,4));
    }
    // Packet type B
    packet eth_802_3 packet_B {
        src_addr 0*:0*:0*:0*:0*:0*;
        dst_addr *0:*0:*0:*0:*0:*0;
        payload dummy (100);
    }
    // Packet type B - DUPLICATE!
    packet eth_802_3 packet_B {
        src_addr 00:FF:ff:00:00:01;    // Address are case insensitive
        dst_addr 00:FF:ff:00:00:02;
        payload dummy (100);
    }
    // Packet type A - DUPLICATE!
    packet eth_802_3 packet_A {
        src_addr 00:08:71:B6:c7:7E;
        dst_addr 00:10:02:93:4A:1b;
        payload dummy (1500);
    }
    packet eth_802_3 packet_D { }
    packet eth_802_3 packet_E {
        src_addr FF:FF:FF:FF:FF:**;
    }
    packet eth_802_3 F2004 {
        payload dummy(normal(1000,10));
    }
    packet pos pos1 {
        address 0x0f;
        control 0x03;
        protocol_size 2;    // choose: 1 or 2 bytes
        protocol 0x0800;    // IP, although its contents is random
        payload dummy(uniform(100,9180)); // size of payload
        fcs_size 4;    // choose: 0, 2 or 4 bytes
    }
    packet pos pos2 {
        address 0x8f;
        control 0;
        protocol_size 1;
        protocol 113;
        payload dummy(100);    // size of payload
        fcs_size 2;
    }
    packet pos pos3 {
        fcs_size 0;
    }
    packet eth_II pII {
        src_addr ab:e1:c0:01:**:**;
        dst_addr c0:01:ab:e1:**:**;
        protocol 0x0800; // IP protocol
        payload "4500 0066 058a 4000 4006 b1a9 c0a8 010d
                 c0a8 0101" + spc + dpc +
                "64e4 bc07 158b 0862
                 8018 8218 8599 0000 0101 080a 04be 8fc0
                 0ad7 c5e5 1703 0000 2dbc b523 dbae 2e14
                 de4f 1bb7 a51b 3e92 3fbb 79b8 f049 e809
                 1a3c" + "0000 0000" + dummy([100~102]);
    }
    packet eth_802_3 packet_z {
        src_addr 00:01:80:**:**:**;
        dst_addr 00:09:AB:**:CA:BA;
        payload "Abe1" + c4(7) + "f001 beef bad bed
                 feed daf0e ca7 fa15e" + dummy (200);
    }
    packet atm atm_1 {
        type uni;
        gfc 0x8;
        vpi 0x76;
        vci 0x5432;
        pt  0b0;
        clp 1;
        payload dummy(48);
    }
    packet aal5 aal5_2 {
        // ATM parameters
        type uni;
        gfc 0x8;
        vpi 0x76;
        vci 0x5432;
        pt  0b0;
        clp 1;
        // AAL5 parameters
        payload "aa aa 03 000000 0800" +
                "6500 0066 058a 4000 4006 b1a9 c0a8 010d
                 c0a8 0101 0123 0321" +
                "64e4 bc07 158b 0862
                 8018 8218 8599 0000 0101 080a 04be 8fc0
                 0ad7 c5e5 1703 0000 2dbc b523 dbae 2e14
                 de4f 1bb7 a51b 3e92 3fbb 79b8 f049 e809
                 1a3c" + "0000 0000" + dummy([100~102])
                 + dummy(16);
        uu  0xDD;
        cpi 0xEE;
    }
}
traffic {
    group traffic_group_A {
        send packet_A 1;
        loop 4 {
            send packet_A 100;
            send packet_D 10;
            send packet_B uniform(100,200);
            send packet_E 2;
        }
        loop normal (100,8) {
            loop [10:20] {
                send F2004 [9~15] step 2;
            }
            send pos1     1;
            send pos2     1;
            send pos3     1;
        }
    }
    group traffic_group_B {
        loop [50:150] step uniform (2,8) {
            send packet_z 333;
            send pII      2002;
        }
        send packet_A 0xabc;
        loop 0x40 {
            send atm_1 0b0101110;
            send aal5_2 [100~0x100] step 0b101;
        }
    }
}

FILES

config.dag
    The default configuration file.

output.dag
    The default output (generated) file.

SEE ALSO
dagflood(1), pcap(3).

BUGS
Report bugs to <support@endace.com>.

LAST UPDATED
$Author: nuwan.gunasekara $
$Revision: 13724 $
$Date: 2011-01-14 17:09:23 +1300 (Fri, 14 Jan 2011) $

COPYRIGHT
(c) 2004-2005 Endace Technology, Hamilton, New Zealand. All Rights Reserved.