TRex realistic traffic generator ================================ :author: hhaim :email: :description: TRex Low cost, High scale, realistic traffic generator :revdate: 2014-11-01 :revnumber: 0.2 :deckjs_theme: swiss :deckjs_transition: horizontal-slide :scrollable: :web_server_url: https://trex-tgn.cisco.com/trex include::trex_ga.asciidoc[] == What problem is being solved? * Network elements include complex stateful features * Require testing with stateful and real traffic mix * Traffic generators of stateful/realistic traffic are: ** Expensive ~$100-500K ** Not scalable for high rates ** Not flexible * Due to cost, quality is impacted ** Limited access / testing ** Late testing ** No standard ++++++++++++++++++ ++++++++++++++++++ == What is TRex? * TRex is a *statefull* *traffic* *generator* tool based on a smart replay of real flows (not a full TCP/IP stack,yet) ++++++++++++++++++ title= ++++++++++++++++++ * Generates, manipulates and amplifies based on templates of a real/captured flows. * Templates are processed offline * *High* *performance* full line rate ** tx= up to 200Gb/sec rx=up to 200Gb/sec * *Low* *cost* C220M UCS-1RU, Cisco internal eqip * Generate both sides of the traffic Clients and Servers * *Standard* *hardware* (X86/Intel NIC I350,82599,XL710) ++++++++++++++++++ title= ++++++++++++++++++ * Flexible and Open Software (DPDK) * Support Virtualization * Virtual interface support *E1000* , *VMXNET3*. Enabler for ** Amazon AWS ** Cisco LaaS == Realistic traffic model ++++++++++++++++++ title= ++++++++++++++++++ == TRex high level software architecture ++++++++++++++++++ title= ++++++++++++++++++ * *DPDK* ** user space driver ** Big TLB ** Utilize all DDR banks * *Multi-Threaded* ** Scale linearly ** ~20Gb/sec per DP core * *No TCP-IP* ** Fast events scheduler ** Generate flows template ** Can support 1K templates * *Slow-path flexibility (per-flow)* ** Client/server generation ** Measure latency ** Measure flow order ** NAT translation learning == TRex basic flows generation algorithm ++++++++++++++++++ title= ++++++++++++++++++ == DNS simple profile example * traffic profile is in YAML fomat [source,python] ---- $more cap2/dns_test.yaml - duration : 10.0 generator : distribution : "seq" clients_start : "16.0.0.1" clients_end : "16.0.0.255" servers_start : "48.0.0.1" servers_end : "48.0.0.255" dual_port_mask : "1.0.0.0" tcp_aging : 1 udp_aging : 1 cap_info : - name: cap2/dns.pcap <1> cps : 1.0 <2> ---- <1> the pcap file that include DNS cap file that will be replicate <2> how many connection per second to generate, 1.0 means 1 connection per secod image:images/dns_wireshark.png[title="generator"] == DNS simple profile output .Formated results [format="csv",cols="1^,2^,1^,1^,2^,1^,2^,1^", options="header"] |================= pkt,time sec,fid,flow-pkt-id,client_ip,client_port,server_ip ,direction 1 , 0.010000 , 1 , 1 , 16.0.0.1 , 1024 , 48.0.0.1 , -> 2 , 0.020000 , 1 , 2 , 16.0.0.1 , 1024 , 48.0.0.1 , <- 3 , 2.010000 , 2 , 1 , 16.0.0.2 , 1024 , 48.0.0.2 , -> 4 , 2.020000 , 2 , 2 , 16.0.0.2 , 1024 , 48.0.0.2 , <- 5 , 3.010000 , 3 , 1 , 16.0.0.3 , 1024 , 48.0.0.3 , -> 6 , 3.020000 , 3 , 2 , 16.0.0.3 , 1024 , 48.0.0.3 , <- 7 , 4.010000 , 4 , 1 , 16.0.0.4 , 1024 , 48.0.0.4 , -> 8 , 4.020000 , 4 , 2 , 16.0.0.4 , 1024 , 48.0.0.4 , <- 9 , 5.010000 , 5 , 1 , 16.0.0.5 , 1024 , 48.0.0.5 , -> 10 , 5.020000 , 5 , 2 , 16.0.0.5 , 1024 , 48.0.0.5 , <- 11 , 6.010000 , 6 , 1 , 16.0.0.6 , 1024 , 48.0.0.6 , -> |================= == DNS simple profile chart +++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++ == HTTP & DNS profile example [source,python] ---- - duration : 1.0 generator : distribution : "seq" clients_start : "16.0.0.1" clients_end : "16.0.0.10" servers_start : "48.0.0.1" servers_end : "48.0.0.3" dual_port_mask : "1.0.0.0" tcp_aging : 1 udp_aging : 1 cap_ipg : true cap_info : - name: cap2/dns.pcap cps : 10.0 <1> - name: avl/delay_10_http_browsing_0.pcap cps : 2.0 <1> ---- <1> Diffrent CPS * Inter packet Gap (IPG) is taken from pcap file * IPG can be manualy set == HTTP & DNS profile chart +++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++ == EMIX traffic profile ++++++++++++++++++ title= ++++++++++++++++++ * EMIX traffic profile suggested. used for NBAR/AVC tests * Property ** BW: 70% TCP (http, mail) , 30% UDP (rtp) ** Connections: 50% TCP (http, mail) , 50% UDP (rtp, dns) ** Avg. Packet Size (~585B) ** PPS= 221K per 1Gb/sec ** CPS = 4K per 1Gb/sec ** Flows per 1Gb/sec = 50K ** Avg. Packets per flow (50) == EMIX YAML profile .Simplified version of EMIX YAML profile [source,python] ---- - duration : 0.1 generator : distribution : "seq" clients_start : "16.0.0.1" clients_end : "16.0.1.255" servers_start : "48.0.0.1" servers_end : "48.0.20.255" dual_port_mask : "1.0.0.0" cap_ipg : true cap_info : - name: avl/delay_10_http_get_0.pcap cps : 404.52 - name: avl/delay_10_http_post_0.pcap cps : 404.52 - name: avl/delay_10_https_0.pcap cps : 130.8745 - name: avl/delay_10_http_browsing_0.pcap cps : 709.89 - name: avl/delay_10_exchange_0.pcap cps : 253.81 - name: avl/delay_10_mail_pop_2.pcap cps : 4.759 - name: avl/delay_10_oracle_0.pcap cps : 79.3178 - name: avl/delay_10_rtp_160k_full.pcap cps : 2.776 - name: avl/delay_10_smtp_0.pcap cps : 7.3369 - name: avl/delay_10_sip_video_call_full.pcap cps : 29.347 - name: avl/delay_10_citrix_0.pcap cps : 43.6248 - name: avl/delay_10_dns_0.pcap cps : 1975.015 ---- == EMIX profile chart +++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++ == TRex command line main options [source,bash] ---- $.sudo /t-rex-64 -f [traffic_yaml] -m [muti] -d [duration] -l [Hz=1000] -c [cores] ---- *-f=TRAFFIC_CFG* :: Traffic YAML configuration file *-m*:: CPS multiplier *-d=DURATION* :: Duration of the test in sec *-l=Hz* :: Latency pakets rate (Hz) *-c*:: How many cores to use == TRex Vision * All in One, most of the functionality of existing tools * Standard tests (e.g. traffic mix, automation) across features/platforms * Cisco wide developers community * Open source, Standardize tests == TRex GUI image:images/TrexViewer.png[width=500] * Monitor GUI works on Windows 7 * Nonitor real-time properties of TRex ( e.g min/max/average latency,jitter ) == Python API and automation tools ++++++++++++++++++ title=
++++++++++++++++++ [source,python] ----- import trex_client trex = trex_client.CTRexClient('csi-kiwi-02') ret = trex.start_trex( m = 1.1, d = 20, f = 'avl/sfr_delay_10_1g.yaml', l = 1000) while trex.is_running() : trex.get_running_info() res=trex.get_result_obj() if res.is_done_warmup (): res.get_value_list("trex-global.data.m_tx_bps"); time.sleep(1); ret = trex.stop_trex() ----- ++++++++++++++++++
++++++++++++++++++ == TRex On your laptop ++++++++++++++++++ title= ++++++++++++++++++ * You can experience TRex on your laptop == Roadmap * TCP stack * Export SDK application plugins API - more application support * Automation (e.g ATS, Cisco HLTAPI etc) * Open source * Tunnel agnostic (e.g. VXLAN,QinQ,MPLS,NSH) == Benefit ** Significant budget saving ** Product quality == Resource .Resource [options="header",cols="1^",width="40%"] |================= | Link | link:trex_manual.html[Manual-html] | link:trex_book.pdf[Manual-pdf] | link:release_notes.html[Release Notes] | link:trex_manual.html#_download_and_installation[How to install] |================= ++++++++++++++++++

Backup
++++++++++++++++++