Printer FriendlyEmail Article Link

Spirent TestCenter- HLTAPI: How do I set packet transmission rate (packets per second) using sth::traffic_config API?

Environment/Versions
  • Spirent TestCenter
  • Automation- HLTAPI
  • PGA
Answer
  • Use rate_pps attribute under sth::traffic_config API as shown below.

set streamblock_ret1 [::sth::traffic_config \
                                             -mode create\
                                             -port_handle $hport1 \
                                             -l2_encap ethernet_ii\
                                             -l3_protocol ipv6\
                                             -mac_src_count 2000\
                                             -mac_src_mode increment\
                                             -ipv6_srcprefix_len 12\
                                             -ipv6_srcprefix ::FFFF:FFFF\
                                             -ipv6_src_step ::1\
                                             -ipv6_src_mode increment\
                                             -ipv6_src_count 2000\
                                             -ipv6_src_addr 2000::2\
                                             -ipv6_traffic_class 0\
                                             -ipv6_dst_addr 3001::2\
                                             -ipv6_next_header 59\
                                             -ipv6_length 0\
                                             -ipv6_flow_label 0\
                                             -ipv6_hop_limit 255\
                                             -mac_src 00:10:94:00:00:02\
                                             -ether_type 88B5\
                                             -mac_dst 00:27:0D:D3:DE:12\
                                             -enable_control_plane 0\
                                             -l3_length 110\
                                             -name IPv6_2k\
                                             -fill_type constant\
                                             -fcs_error 0\
                                             -fill_value 0\
                                             -traffic_state 1\
                                             -high_speed_result_analysis 1\
                                             -length_mode fixed\
                                             -disable_signature 0\
                                             -enable_stream_only_gen 1\
                                             -pkts_per_burst 1\
                                             -inter_stream_gap_unit bytes\
                                             -transmit_mode continuous\
                                             -inter_stream_gap 12\
                                             -rate_pps 300\
                                             -mac_discovery_gw 2002::1 \
                                             -enable_stream false]

 


Product : Spirent TestCenter,Automation,API,Spirent TestCenter,PGA