Generate IMIX traffic with Ostinato

3 minute read

Ostinato can craft packets and generate network traffic for various protocols at various packet sizes.

But first things first.

What is IMIX traffic?

IMIX or Internet Mix is a traffic profile representing typical Internet traffic. It’s a mix of specific packet sizes and number of packets of that size.

Whether the traffic profile truly mirrors the Internet traffic is debatable, still having a standard IMIX profile is a useful benchmark. There’s no official standard for IMIX - each vendor seems to have their own variant. For this post, we will go with Simple IMIX as described in Wikipedia.

Simple IMIX

Eth Packet Size No. of Packets % Packet Distribution
64 7 58.33%
594 4 33.33%
1518 1 8.33%

The Wikipedia page specifies IP packet size. We derive the Ethernet packet size as follows

ethernetPacketSize = max(ipPacketSize+18, 64)
  18 = size of (dmac + smac + ethtype + fcs)
  64 = minimum ethernet packet size

That’s an average packet size of ~362 bytes.

Create IMIX streams in Ostinato

With Ostinato 1.2.0 or later

In Ostinato 1.2.0 or later, simply select IMIX as the frame length mode,

IMIX frame length mode

and change the number of packets to at least 12 (7+4+1).

IMIX mode frame count

That’s it. Seriously!

This method uses the Simple IMIX distribution as specified above. If you want to use a different distribution, use the below method.

With Ostinato 1.1 or earlier

We need to create 3 streams in Ostinato, one for each row in the Simple IMIX table above and send packets in a loop.

If you prefer video, watch the IMIX demo from my talk at Sharkfest 2020.


Here are the detailed steps -

  1. Create the first stream of frame length 64 and number of packets as 7
    IMIX stream #1 - 64 bytes

    IMIX stream #1 - 7 packets

  2. Configure the protocols and protocol fields for the stream as required

  3. Duplicate the above stream for a count of 2
    IMIX duplicate stream

  4. Rename the new streams as IMIX stream 2 and 3
    IMIX renamed streams

  5. Edit the second stream to set frame length 594 and number of packets as 4
    IMIX stream2 - 594 bytes

    IMIX stream2 - 4 packets

  6. Edit the third stream to set frame length 1518 and number of packets as 1
    IMIX stream #3 - 1518 bytes

    IMIX stream #3 - 1 packet

  7. Set the third stream to loop back to first stream
    IMIX stream3 - goto first

  8. Click on Apply followed by Start Transmit IMIX transmit
Use interleaved streams to mix up the IMIX packets

If you look at the Wireshark capture, you’ll notice that streams are sent in sequence, i.e. 7 packets of size 64, followed by 4 packets of size 594 and finally 1 packet of size 1518, before it repeats that same pattern

IMIX sequential streams

If you are wondering why Wireshark shows 4 bytes less for all packet sizes, that’s because Ostinato configuration of packet size is including FCS, while Wireshark shows packet sizes without FCS (the NIC strips it off).

Although this sequence should not cause a problem, if you want to mix up the sizes, you can configure the port to use Interleaved streams instead of Sequential streams

Port transmit mode

In interleaved mode, all streams are transmitted simultaneously, so you will get a mix of the configured packet sizes, but sent in the same 7:4:1 ratio.

IMIX interleaved streams

Note that, after changing the port mode to interleaved, you have to edit the streams so that the Packets/sec rate is in the 7:4:1 ratio. A quick way to do this is to set each stream pps rate to 7, 4 and 1 respectively and then change the Avg pps rate from 12 to whatever value you want - any subsequent change to the Avg pps rate will retain the 7:4:1 rate ratio across the streams.

Verify IMIX using Wireshark

To verify, capture the packets in Wireshark, go to Statistics | Packet Lengths and look at the Percent column -

IMIX wireshark verify

Verify that the Percent values match the % Packet distribution in the Simple IMIX table above.

Gotchas

Make sure your DUT/SUT supports packet size of 1518 - in my experiments with virtual topologies, VirtualBox would drop packets > 1504 bytes.

For more Ostinato related content, subscribe for email updates.

Leave a Comment