Skip to content

Basic OTG Configurations

Single TCP Traffic Flow between two Test Ports

File: flow.otg.yaml.

This single flow configuration specifies:

  • Flow Name: f1
  • Packet Schedule:
    • 1000 packets
    • of 512B size
    • to be transmitted as fixed rate of 100pps
  • Packet Template:
    • Ethernet src 02:00:00:00:01:aa dst 02:00:00:00:02:aa
    • IPv4 src 192.0.2.1 dst 192.0.2.2
    • TCP ports src start at 1024 increment by 7 dst 7
  • Test Ports
    • Tx: p1 with OTG location localhost:5555
    • Rx: p2 with OTG location localhost:5556

This configuration was generated by running:

otgen create flow --rate 100 --size 512 > flow.otg.yaml

Two Traffic Flows representing bi-directional UDP traffic between two Traffic Ports

File: bidir-flow.otg.yaml.

This bi-directional flow configuration specifies:

  • Flow Names: f1; f2
  • Packet Schedule:
    • f1: 1000; f2: 100 packets
    • of f1: 512B; f2: 256B size
    • to be transmitted as fixed rate of f1: 100pps; f2: 10pps
  • Packet Template:
    • Ethernet f1 src 02:00:00:00:01:aa dst 02:00:00:00:02:aa; f2 src/dst swapped
    • IPv4 f1 src 192.0.2.1 dst 192.0.2.2; f2 src/dst swapped
    • TCP ports f1 src start at 1024 increment by 7 dst 7; f2 src/dst swapped
  • Test Ports
    • Tx: f1: p1 with OTG location localhost:5555; f2: p2
    • Rx: f1: p2 with OTG location localhost:5556; f2: p1

This configuration was generated by running:

otgen create flow --rate 100 --size 512 --proto udp | \
otgen add flow --name f2 --count 100 --rate 10 --size 256 --proto udp --swap \
> bidir-flow.otg.yaml

Single Traffic Flows representing TCP traffic between two Emulated Devices

File: device-flow.otg.yaml.

This single flow configuration specifies:

  • Device Names: otg1; otg2
    • Ethernet Interfaces: otg1.eth[0]; otg2.eth[0]
    • MAC Addresses: 02:00:00:00:01:aa; 02:00:00:00:02:aa
    • IP Addresses: 192.0.2.1; 192.0.2.2
    • Default Gateways: 192.0.2.2; 192.0.2.1
    • Subnet Netmasks: /24; /24
  • Flow Name: f1
  • Packet Schedule:
    • 1000 packets
    • of 512B size
    • to be transmitted as fixed rate of 100pps
  • Packet Template:
    • Ethernet src 02:00:00:00:01:aa dst 02:00:00:00:02:aa
    • IPv4 src 192.0.2.1 dst 192.0.2.2
    • TCP ports src start at 1024 increment by 7 dst 7
  • Flow Tx:
    • Device Interface: otg1.eth[0]
    • Connected to: Test Port p1 with OTG location te1:5555
  • Flow Rx:
    • Device Interface: otg2.eth[0]
    • Connected to: Test Port p2 with OTG location te2:5555

This configuration was generated by running:

otgen create device --port p1 --location "te1:5555" | \
otgen add device --name otg2 --port p2 --location "te2:5555" \
                 --ip "192.0.2.2" --gw "192.0.2.1" | \
otgen add flow --tx otg1 --rx otg2 \
> device-flow.otg.yaml