1 Vpp Stateless Traffic Generation
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
6 can 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:
12 +-------------------+ +-------------------+
13 | traffic generator | | UUT |
14 | port 0 | <=======> | port 0 |
15 | 192.168.40.2/24 | | 192.168.40.1/24 |
16 +-------------------+ +-------------------+
18 +-------------------+ +-------------------+
19 | traffic generator | | UUT |
20 | port 1 | <=======> | port 1 |
21 | 192.168.41.2/24 | | 192.168.41.1/24 |
22 +-------------------+ +-------------------+
25 Traffic Generator Setup Script
26 ------------------------------
29 set int ip address FortyGigabitEthernet2/0/0 192.168.40.2/24
30 set int ip address FortyGigabitEthernet2/0/1 192.168.41.2/24
31 set int state FortyGigabitEthernet2/0/0 up
32 set int state FortyGigabitEthernet2/0/1 up
34 comment { send traffic to the VPP UUT }
36 packet-generator new {
42 tx-interface FortyGigabitEthernet2/0/0
43 node FortyGigabitEthernet2/0/0-output
44 data { IP4: 1.2.40 -> 3cfd.fed0.b6c8
45 UDP: 192.168.40.10 -> 192.168.50.10
51 packet-generator new {
57 tx-interface FortyGigabitEthernet2/0/1
58 node FortyGigabitEthernet2/0/1-output
59 data { IP4: 1.2.4 -> 3cfd.fed0.b6c9
60 UDP: 192.168.41.10 -> 192.168.51.10
66 comment { delete return traffic on sight }
68 ip route add 192.168.50.0/24 via drop
69 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:
81 ## Specify a number of workers to be created
82 ## Workers are pinned to N consecutive CPU cores while skipping "skip-cores" CPU core(s)
83 ## and main thread's CPU core
87 Any plausible packet generator script - including one which replays
88 pcap captures - can be used.
94 The vpp UUT uses a couple of static routes to forward traffic back to
95 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