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

DIAGNOSTIC OPTIONS

78       --log-level <level>
79           Set the active log level. Supported levels in lowest to highest
80           order are "noisy", "debug", "info", "message", "warning",
81           "critical", and "error". Messages at each level and higher will be
82           printed, for example "warning" prints "warning", "critical", and
83           "error" messages and "noisy" prints all messages. Levels are case
84           insensitive.
85
86       --log-fatal <level>
87           Abort the program if any messages are logged at the specified level
88           or higher. For example, "warning" aborts on any "warning",
89           "critical", or "error" messages.
90
91       --log-domains <list>
92           Only print messages for the specified log domains, e.g.
93           "GUI,Epan,sshdump". List of domains must be comma-separated.
94
95       --log-debug <list>
96           Force the specified domains to log at the "debug" level. List of
97           domains must be comma-separated.
98
99       --log-noisy <list>
100           Force the specified domains to log at the "noisy" level. List of
101           domains must be comma-separated.
102
103       --log-file <path>
104           Write log messages and stderr output to the specified file.
105

EXAMPLES

107       To see a description of the randpkt options use:
108
109           randpkt
110
111       To generate a capture file with 1000 DNS packets use:
112
113           randpkt -b 500 -t dns rand_dns.pcap
114
115       To generate a small capture file with just a single LLC frame use:
116
117           randpkt -b 100 -c 1 -t llc single_llc.pcap
118

SEE ALSO

120       pcap(3), editcap(1)
121
122
123
124                                  2023-08-31                        RANDPKT(1)
Impressum