1 Stateless Traffic Gen with VPP
2 ==============================
4 It’s simple to configure vpp as a high-performance stateless traffic
5 generator. A couple of vpp worker threads running on an older system can
6 easily generate 20 MPPS’ worth of traffic.
8 In the configurations shown below, we connect a vpp traffic generator
9 and a vpp UUT using two 40 gigabit ethernet ports on each system:
13 +-------------------+ +-------------------+
14 | traffic generator | | UUT |
15 | port 0 | <=======> | port 0 |
16 | 192.168.40.2/24 | | 192.168.40.1/24 |
17 +-------------------+ +-------------------+
19 +-------------------+ +-------------------+
20 | traffic generator | | UUT |
21 | port 1 | <=======> | port 1 |
22 | 192.168.41.2/24 | | 192.168.41.1/24 |
23 +-------------------+ +-------------------+
25 Traffic Generator Setup Script
26 ------------------------------
30 set int ip address FortyGigabitEthernet2/0/0 192.168.40.2/24
31 set int ip address FortyGigabitEthernet2/0/1 192.168.41.2/24
32 set int state FortyGigabitEthernet2/0/0 up
33 set int state FortyGigabitEthernet2/0/1 up
35 comment { send traffic to the VPP UUT }
37 packet-generator new {
43 tx-interface FortyGigabitEthernet2/0/0
44 node FortyGigabitEthernet2/0/0-output
45 data { IP4: 1.2.40 -> 3cfd.fed0.b6c8
46 UDP: 192.168.40.10 -> 192.168.50.10
52 packet-generator new {
58 tx-interface FortyGigabitEthernet2/0/1
59 node FortyGigabitEthernet2/0/1-output
60 data { IP4: 1.2.4 -> 3cfd.fed0.b6c9
61 UDP: 192.168.41.10 -> 192.168.51.10
67 comment { delete return traffic on sight }
69 ip route add 192.168.50.0/24 via drop
70 ip route add 192.168.51.0/24 via drop
72 Note 1: the destination MAC addresses shown in the configuration (e.g.
73 3cfd.fed0.b6c8 and 3cfd.fed0.b6c9) **must** match the vpp UUT port MAC
76 Note 2: this script assumes that /etc/vpp/startup.conf and/or the
77 command-line in use specifies (at least) two worker threads. Uncomment
78 “workers 2” in the cpu configuration section of /etc/vpp/startup.conf:
82 ## Specify a number of workers to be created
83 ## Workers are pinned to N consecutive CPU cores while skipping "skip-cores" CPU core(s)
84 ## and main thread's CPU core
87 Any plausible packet generator script - including one which replays pcap
88 captures - can be used.
93 The vpp UUT uses a couple of static routes to forward traffic back to
94 the traffic generator:
98 set int ip address FortyGigabitEthernet2/0/0 192.168.40.1/24
99 set int ip address FortyGigabitEthernet2/0/1 192.168.41.1/24
100 set int state FortyGigabitEthernet2/0/0 up
101 set int state FortyGigabitEthernet2/0/1 up
103 ip route add 192.168.50.10/32 via 192.168.41.2
104 ip route add 192.168.51.10/32 via 192.168.40.2