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 pcap 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
50                   arp             Address Resolution Protocol
51                   bgp             Border Gateway Protocol
52                   bvlc            BACnet Virtual Link Control
53                   dns             Domain Name Service
54                   eth             Ethernet
55                   fddi            Fiber Distributed Data Interface
56                   giop            General Inter-ORB Protocol
57                   icmp            Internet Control Message Protocol
58                   ip              Internet Protocol
59                   ipv6            Internet Protocol Version 6
60                   llc             Logical Link Control
61                   m2m             WiMAX M2M Encapsulation Protocol
62                   megaco          MEGACO
63                   nbns            NetBIOS-over-TCP Name Service
64                   ncp2222         NetWare Core Protocol
65                   sctp            Stream Control Transmission Protocol
66                   syslog          Syslog message
67                   tds             TDS NetLib
68                   tcp             Transmission Control Protocol
69                   tr              Token-Ring
70                   udp             User Datagram Protocol
71                   usb             Universal Serial Bus
72                   usb-linux       Universal Serial Bus with Linux specific header
73

EXAMPLES

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

SEE ALSO

88       pcap(3), editcap(1)
89
90
91
923.4.5                             2021-05-27                        RANDPKT(1)
Impressum