1RANDPKT(1) RANDPKT(1)
2
3
4
6 randpkt - Random packet generator
7
9 randpkt [ -b <maxbytes> ] [ -c <count> ] [ -t <type> ] <filename>
10
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
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
78 To see a description of the randpkt options use:
79
80 randpkt
81
82 To generate a capture file with 1000 DNS packets use:
83
84 randpkt -b 500 -t dns rand_dns.pcap
85
86 To generate a small capture file with just a single LLC frame use:
87
88 randpkt -b 100 -c 1 -t llc single_llc.pcap
89
91 pcap(3), editcap(1)
92
93
94
95 2021-11-25 RANDPKT(1)