TRex realistic traffic generator

hhaim

2014-11-01

What problem is being solved?

What is TRex?

title= title=

Realistic traffic model

title=

TRex high level software architecture

title=

TRex basic flows generation algorithm

title=

DNS simple profile example

$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

images/dns_wireshark.png

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

TRex GUI

images/TrexViewer.png

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=

Roadmap

Benefit

Resource

Table 2. Resource
Link

Manual-html

Manual-pdf

Release Notes

How to install

Backup

/