Packet generator vs traffic generator - which do you need?

Ostinato Team bio photo By Ostinato Team

What is a packet generator

A packet generator is a software or hardware tool that generates network packets of the desired protocol or application. The use cases vary widely from testing various networking and networking protocol related functionality to performance or throughput testing to troubleshooting networking problems. You could be testing a single networking device (DUT - device under test) or a network containing multiple devices (NUT - network under test). Sometimes the network under test could even span multiple geographic locations or continents!

The term Packet Generator is a bit of an umbrella term and a bit vague. Other related terms are packet crafter, traffic generator, traffic tester etc. which all mean slightly different things but overlap significantly with each other - so much so that even networking industry folks use these terms interchangeably.

In this post we will attempt to disambiguate these terms.

Packet Crafter

A packet crafter, as the name suggests, allows you to craft or create network packets - typically from scratch. You can choose the packet size, select the protocols to be included in the packet and provide values for most (if not all) protocol fields.

Packet Crafting with Ostinato

Features may vary between tools, but you are also typically able to set invalid values for certain protocol fields to generate error packets or stack protocol headers in the packet in unexpected ways - these capabilities are very useful to check negative test scenarios and potential mishandling of error packets by networking devices.

Crafting and sending a packet with Scapy

Essentially you have full control on everything the packet contains including its length. Examples of packet generators include Colasoft Packet Builder, PackEth, Ostinato and Scapy.

An alternate way to create packets is to edit a pcap file and then do a pcap replay.

Packet Generator

Just crafting or building a packet is not very useful without putting the crafted packet on the wire. So most packet crafters will allow you to generate the packet as well i.e. send it out on the network.

Sending packets out on a network is packet generator territory. What possibly distinguishes packet generators from packet crafters is less focus on the crafting capabilities (i.e. control on every aspect of the packet, especially the ability to create error packets). Packet Generators typically focus only on the most important packet fields (like IP addresses) and the ability to put them on the wire at various rates.

Packet Sender

Examples include Packet Sender plus all the examples mentioned previously under Packet Crafter.

Traffic Generator

Talking of packet rates, brings us into traffic generator territory.

When you start sending packets, you are essentially generating network traffic at various rates.

iperf traffic generator

Traffic generators focus on traffic level features - such as packet rates, bit rates, burst sizes, fixed duration or continuous traffic, sending multiple traffic types and ways to mix them together.

Ostinato Traffic Rate Control

They may or may not offer full packet crafting features.

Examples include iperf/jperf, Packet Sender, Ostinato and T-Rex

Traffic Tester

Till now we have only been concerned mainly about the transmit side - packets, rates etc. But that’s only one side of the story. What about the story at the destination?

  • Did all TX packets make it to the destination?
  • Were some packets dropped?
  • How many and of which traffic type were dropped?
  • What was the latency/jitter from transmitter to receiver?
  • What is the behavior when you mix traffic of different priorities (read QOS)?

A traffic tester provides features to answer these sort of higher level questions.

Spirent Test Solution

Examples in this category include all the industry standard hardware tools like those from Ixia (now Keysight), Spirent, Xena etc.

Ostinato also provide some of these features, with more in the works.

Summary

One way to look at these categories is in terms of subsets and super sets.

Taxonomy of packet traffic generators

Of course, the diagram above is a gross simplification and does not match reality - but is still useful as a visual and mental model.

All these tools generate what is called synthetic traffic, not real traffic - something we will talk about in a future post.

Other terms

Another term used for this category of tools is a Router Tester - a term we have heard used within Juniper circles, but not much outside.

Is there any other term that you’ve heard used within some company or community circles? Let us know!