Skip to content

Latest commit

 

History

History
executable file
·
1322 lines (1217 loc) · 33.4 KB

trex_preso.asciidoc

File metadata and controls

executable file
·
1322 lines (1217 loc) · 33.4 KB

TRex realistic traffic generator

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

.axis path, .axis line { fill: none; stroke: #000; shape-rendering: crispEdges; } .dot { stroke: #000; } h1 { font-size: 2.5em; } h2 { font-size: 1.5em; color: #CD7300; border-bottom-color: #000; } h7 { font-size: 4.5em; color: #CD7300; position: relative; top: auto; text-align: center; padding: 0; -webkit-transform: none; -moz-transform: none; -ms-transform: none; -o-transform: none; transform: none; padding: 0 48px; position: absolute; left: 0; right: 0; top: 50%; } h8 { font-size: 2.25em; font-weight: bold; padding-top: .5em; margin: 0 0 .66666em 0; border-top: 3px solid #888; color: #c00; border-top-color: #ccc; left: 0; right: 0; top: 40%; } html, body { height: 100%; margin: 0 auto; max-width: 1000px; }

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

$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

dns wireshark

DNS simple profile output

Table 1. Formated results
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

- 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
- 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

$.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

TrexViewer

  • 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=
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

More information

  • This presentation is about Stateful mode, have a look into Stateless (STL) and Advance Stateful (ASTF) models

Benefit

  • Significant budget saving

  • Product quality

Resource

Table 2. Resource
Link

Manual-html

Manual-pdf

Release Notes

How to install

Backup