Source mac resolve failed for one or more streams - Device matching stream’s source IP not found

New Ostinato users who encounter this error often get confused.
This kb/src-mac-resolve-failed article will explain what it means and how to fix it.
Root cause
When you create a new Ostinato stream, by default the source and destination Mac addresses are set to Resolve

This configuration setting tells Ostinato to auto populate the source and destination MAC addresses in the packet based on the source and destination IP addresses configured in the traffic stream.
How does Ostinato do that?
It uses the stream’s source IP address to find the source device. To do that, it will look up the list of devices configured on the same port and find a device with the same source IP address as configured in the stream.
Once it knows the source device (which can be the physical port itself or an emulated device), it will use the source device’s MAC address to populate the source MAC address in the packet.
If a source device is not found, Ostinato is not able to resolve the source MAC address and will display this error.
Note that without first identifying a source device for the stream, Ostinato cannot do a destination MAC address resolution using ARP/NDP either since it needs to know the gateway IP address to do that.
How to fix it?
Follow these steps to troubleshoot and fix the issue -
- Note the source IP address configured in the stream
- Go to the Devices > Information tab and look for a device with the same source IP address
- If you find a device, carefully check if the source IP is exactly the same as the one configured in the stream
- If you don’t find a device, create an emulated device with this source IP address
- Apply the changes and verify the error is not seen now
TIP: If you have multiple streams with different source IP addresses, you can disable all streams and enable them one by one, click Apply button after each enable to see which stream is causing the issue.
VLAN tagged traffic
For VLAN tagged traffic, the VLAN ID in the stream MUST match the VLAN ID in the device configuration. In other words, the device must also be configured with the same VLAN ID(s).
For Q-in-Q or multiple VLAN tags, ALL the VLAN IDs in the stream must match the number, order and values of the VLAN IDs in the device configuration - including the TPIDs.
Example
Here’s an example showing a stream with a source IP address that matches a device configured -

Note that the source IP address in the stream is exactly the same as the device IP address configured.
Here’s another example with Q-in-Q VLAN tagged traffic -

Note that apart from the same source IP address, the VLAN IDs in the stream is exactly the same as the VLAN IDs in the device configuration - in number, order, values and TPIDs.
Common pitfall
When creating devices with IPv4, Ostinato uses the IP address 198.18.x.y by default - this is a reserved range of IP addresses for benchmarking and testing purposes.
192.168.x.y is a reserved range of IP addresses for local network use.
Both these IP address can look similar at first glance and may trigger this error if you used the default IP address in the device configuration and set the stream source IP address to 192.168.x.y!
