1RANDPKT(1)              The Wireshark Network Analyzer              RANDPKT(1)
2
3
4

NAME

6       randpkt - Random Packet Generator
7

SYNOPSIS

9       randpkt [ -b <maxbytes> ] [ -c <count> ] [ -t <type> ] <filename>
10

DESCRIPTION

12       randpkt is a small utility that creates a libpcap trace file full of
13       random packets.
14
15       By creating many randomized packets of a certain type, you can test
16       packet sniffers to see how well they handle malformed packets.  The
17       sniffer can never trust the data that it sees in the packet because you
18       can always sniff a very bad packet that conforms to no standard.
19       randpkt produces very bad packets.
20
21       When creating packets of a certain type, randpkt uses a sample packet
22       that is stored internally to randpkt. It uses this as the starting
23       point for your random packets, and then adds extra random bytes to the
24       end of this sample packet.
25
26       For example, if you choose to create random ARP packets, randpkt will
27       create a packet which contains a predetermined Ethernet II header, with
28       the Type field set to ARP. After the Ethernet II header, it will put a
29       random number of bytes with random values.
30

OPTIONS

32       -b <maxbytes>
33           Default 5000.
34
35           Defines the maximum number of bytes added to the sample packet.  If
36           you choose a maxbytes value that is less than the size of the
37           sample packet, then your packets would contain only the sample
38           packet... not much variance there! randpkt exits on that condition.
39
40       -c <count>
41           Default 1000.
42
43           Defines the number of packets to generate.
44
45       -t <type>
46           Default Ethernet II frame.
47
48           Defines the type of packet to generate:
49                   arp     Address Resolution Protocol
50                   bgp     Border Gateway Protocol
51                   bvlc    BACnet Virtual Link Control
52                   dns     Domain Name Service
53                   eth     Ethernet
54                   fddi    Fiber Distributed Data Interface
55                   giop    General Inter-ORB Protocol
56                   icmp    Internet Control Message Protocol
57                   ip      Internet Protocol
58                   llc     Logical Link Control
59                   m2m     WiMAX M2M Encapsulation Protocol
60                   megaco  MEGACO
61                   nbns    NetBIOS-over-TCP Name Service
62                   ncp2222 NetWare Core Protocol
63                   sctp    Stream Control Transmission Protocol
64                   syslog  Syslog message
65                   tds     TDS NetLib
66                   tcp     Transmission Control Protocol
67                   tr      Token-Ring
68                   udp     User Datagram Protocol
69                   usb     Universal Serial Bus
70                   usb-linux       Universal Serial Bus with Linux specific
71           header
72

EXAMPLES

74       To see a description of the randpkt options use:
75
76           randpkt
77
78       To generate a capture file with 1000 DNS packets use:
79
80           randpkt -b 500 -t dns rand_dns.pcap
81
82       To generate a small capture file with just a single LLC frame use:
83
84           randpkt -b 100 -c 1 -t llc single_llc.pcap
85

SEE ALSO

87       pcap(3), editcap(1)
88
89
90
911.4.10                            2011-11-01                        RANDPKT(1)
Impressum