1RANDPKT(1) The Wireshark Network Analyzer 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 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 llc Logical Link Control
60 m2m WiMAX M2M Encapsulation Protocol
61 megaco MEGACO
62 nbns NetBIOS-over-TCP Name Service
63 ncp2222 NetWare Core Protocol
64 sctp Stream Control Transmission Protocol
65 syslog Syslog message
66 tds TDS NetLib
67 tcp Transmission Control Protocol
68 tr Token-Ring
69 udp User Datagram Protocol
70 usb Universal Serial Bus
71 usb-linux Universal Serial Bus with Linux specific header
72
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
87 pcap(3), editcap(1)
88
89
90
911.10.14 2015-05-12 RANDPKT(1)