System information
Manual:Tools/Traffic Generator
134
/tool traffic-generator packet-template
add header-stack=mac,ip,udp ip-dst=2.2.2.1/32 ip-gateway=1.1.1.2 ip-src=1.1.1.1/32 \
name=routing-1 port=port0
add header-stack=mac,ip,udp ip-dst=1.1.1.1/25 ip-gateway=2.2.2.2 ip-src=2.2.2.1/32 \
name=routing-2 port=port1
Notice that mac addresses was not specified since template generator can assume next-hop mac address
automatically by sending ARP messages. Since we are doing routing and destination IP is not directly reachable, we
have set ip-gateway parameter to determine next-hop mac-address.
When running print you can see all assumed (detected) values including mac addresses.
[admin@test-host] /tool traffic-generator packet-template> print
0 name="routing-1" header-stack=mac,ip,udp port=port0
assumed-mac-dst=00:0C:42:00:38:9D assumed-mac-src=00:0C:42:40:94:25
assumed-mac-protocol=ip assumed-ip-dscp=0 assumed-ip-id=0
assumed-ip-frag-off=0 assumed-ip-ttl=64 assumed-ip-protocol=udp
ip-src=1.1.1.1/32 ip-dst=2.2.2.1/32 assumed-udp-src-port=100
assumed-udp-dst-port=200 ip-gateway=1.1.1.2 data=uninitialized data-byte=0
1 name="routing-2" header-stack=mac,ip,udp port=port1
assumed-mac-dst=00:0C:42:00:38:D1 assumed-mac-src=00:0C:42:40:94:26
assumed-mac-protocol=ip assumed-ip-dscp=0 assumed-ip-id=0
assumed-ip-frag-off=0 assumed-ip-ttl=64 assumed-ip-protocol=udp
ip-src=2.2.2.1/32 ip-dst=1.1.1.1/32 assumed-udp-src-port=100
assumed-udp-dst-port=200 ip-gateway=2.2.2.2 data=uninitialized data-byte=0
For example if any router in SUT change, assumed mac-addresses will not be updated automatically. To update
packet templates simply issue command :
/tool traffic-generator packet-template set [find]
Last part is to configure streams
/tool traffic-generator stream
add disabled=no mbps=500 name=str1 num=3 packet-size=1450 port=port0 pps=0 \
tx-template=routing-1
add disabled=no mbps=500 name=str3 num=4 packet-size=1450 port=port1 pps=0 \
tx-template=routing-2
Notice that each stream has unique num value. This value identifies stream packets, otherwise traffic generator will
not work.
Now we are ready to run the test. In this case quick mode will be used:
[admin@test-host] /tool traffic-generator> quick mbps=450
SEQ NUM TX-PACKET TX-RATE RX-PACKET RX-RATE RX-OOO LOST-PACKET LOST-RATE
37 4 39 488 458.0Mbps 39 270 455.5Mbps 15 509 218 2.5Mbps
37 TOT 78 976 916.1Mbps 76 485 887.2Mbps 22 529 2 491 28.8Mbps
38 3 38 957 451.9Mbps 37 657 436.8Mbps 7 078 1 300 15.0Mbps
38 4 38 958 451.9Mbps 38 402 445.4Mbps 14 763 556 6.4Mbps
38 TOT 77 915 903.8Mbps 76 059 882.2Mbps 21 841 1 856 21.5Mbps
39 3 38 816 450.2Mbps 37 893 439.5Mbps 7 307 923 10.7Mbps