VLANs are quite fundamental in most networks today and a great solution for traffic isolation - e.g. to carry different types of traffic (web, VoIP etc.) on the same physical LAN infrastructure or isolate and identify tenants in multi-tenant WAN networks.
VLAN tagged
To craft and transmit VLAN tagged packets in Ostinato is easy.
Just create a stream and when selecting protocols, set VLAN to Tagged.
Next, in the Protocol Data tab, set the VLAN Id and optionally other fields like priority and CFI/DEI.
That’s it!
Dual VLAN aka QinQ
For double tagged VLAN packets, just select Stacked instead of Tagged in the VLAN selection and configure both VLANs under Protocol Data.
If you want to use a different TPID for SVLAN, you can do that as well -
More VLAN Tags
Want more than 2 VLAN tags in the packet? We’ve got you covered!
Switch to Protocol Selection | Advanced and insert multiple VLAN headers in the protocol stack between MAC
and Eth II
.
You can configure values for all the VLAN tags as usual in the Protocol Data tab.
VLAN tagged streams with Device Emulation
If you are using emulated devices and VLAN tagged streams, ensure that the VLANs in the streams MUST match the VLANs used by the devices
Without the above matching, Ostinato will not be able to identify the source device for a stream and hence Source/Destination Mac resolution will fail (you can still use fixed mac addresses in your stream).
See Matching Streams with Devices to understand how streams are matched with devices.
Multiple VLANs
If you want to generate VLAN tagged packets with varying VLAN values, you can use the Variable Fields tab to generate VLAN IDs in incrementing, decrementing or random sequences.
💡 If you are generating incrementing/decrementing VLAN values, make sure you have the same varying sequence in the device group configuration too - applicable only if using device emulation. A random sequence of VLANs will not work with device emulation - for obvious reasons.
If something is not clear or if there is something more you want to do with VLANs, let us know!