6f9621e17abb722472846e5a0bfcf5048ed957cb
[vswitchperf.git] / docs / userguide / integration.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. (c) OPNFV, Intel Corporation, AT&T and others.
4
5 Integration tests
6 =================
7
8 VSPERF includes a set of integration tests defined in conf/integration.
9 These tests can be run by specifying --run-integration as a parameter to vsperf.
10 Current tests in conf/integration are Overlay tests.
11
12
13 Executing Tunnel encapsulation tests
14 ------------------------------------
15
16 VSPERF supports VXLAN, GRE and GENEVE tunneling protocols.
17 Testing of these protocols is limited to unidirectional traffic and
18 P2P (Physical to Physical scenarios).
19
20 The VXLAN OVS DPDK encapsulation tests requires IPs, MAC addresses,
21 bridge names and WHITELIST_NICS for DPDK.
22
23 Default values are already provided. To customize for your environment, override
24 the following variables in you user_settings.py file:
25
26 # Variables defined in conf/integration/02_vswitch.conf
27 # Tunnel endpoint for Overlay P2P deployment scenario
28 # used for br0
29 VTEP_IP1 = '192.168.0.1/24'
30
31 # Used as remote_ip in adding OVS tunnel port and
32 # to set ARP entry in OVS (e.g. tnl/arp/set br-ext 192.168.240.10 02:00:00:00:00:02
33 VTEP_IP2 = '192.168.240.10'
34
35 # Network to use when adding a route for inner frame data
36 VTEP_IP2_SUBNET = '192.168.240.0/24'
37
38 # Bridge names
39 TUNNEL_INTEGRATION_BRIDGE = 'br0'
40 TUNNEL_EXTERNAL_BRIDGE = 'br-ext'
41
42 # IP of br-ext
43 TUNNEL_EXTERNAL_BRIDGE_IP = '192.168.240.1/24'
44
45 # vxlan|gre|geneve
46 TUNNEL_TYPE = 'vxlan'
47
48 # Variables defined conf/integration/03_traffic.conf
49 # For OP2P deployment scenario
50 TRAFFICGEN_PORT1_MAC = '02:00:00:00:00:01'
51 TRAFFICGEN_PORT2_MAC = '02:00:00:00:00:02'
52 TRAFFICGEN_PORT1_IP = '1.1.1.1'
53 TRAFFICGEN_PORT2_IP = '192.168.240.10'
54
55
56 To run VXLAN encapsulation tests:
57
58   .. code-block:: console
59
60      ./vsperf --conf-file user_settings.py --run-integration --test-param 'tunnel_type=vxlan' overlay_p2p_tput
61
62 To run GRE encapsulation tests:
63
64   .. code-block:: console
65
66      ./vsperf --conf-file user_settings.py --run-integration --test-param 'tunnel_type=gre' overlay_p2p_tput
67
68 To run GENEVE encapsulation tests:
69
70   .. code-block:: console
71
72      ./vsperf --conf-file user_settings.py --run-integration --test-param 'tunnel_type=geneve' overlay_p2p_tput
73
74 To run OVS NATIVE tunnel tests (VXLAN/GRE/GENEVE):
75
76 1. Install the OVS kernel modules
77
78   .. code:: console
79
80      cd src/ovs/ovs
81      sudo -E make modules_install
82
83 2. Set the following variables:
84
85   .. code-block:: console
86
87    VSWITCH = 'OvsVanilla'
88    VSWITCH_VANILLA_PHY_PORT_NAMES = ['nic1name', 'nic2name']
89    # Specify vport_* kernel module to test.
90    VSWITCH_VANILLA_KERNEL_MODULES = ['vport_vxlan',
91                                      'vport_gre',
92                                      'vport_geneve',
93                                      os.path.join(OVS_DIR_VANILLA, 'datapath/linux/openvswitch.ko')]
94
95 3. Run tests:
96
97   .. code-block:: console
98
99      ./vsperf --conf-file user_settings.py --run-integration --test-param 'tunnel_type=vxlan' overlay_p2p_tput
100
101
102 Executing VXLAN decapsulation tests
103 ------------------------------------
104
105 To run VXLAN decapsulation tests:
106
107 1. Set the variables used in "Executing Tunnel encapsulation tests"
108
109 2. Set IXNET_TCL_SCRIPT, VXLAN_FRAME_L2, VLXAN_FRAME_L3 and DUT_NIC1_MAC of your settings file to:
110
111   .. code-block:: console
112
113    IXNET_TCL_SCRIPT='ixnetrfc2544v2.tcl'
114
115    VXLAN_FRAME_L2 = {'srcmac':
116                      '01:02:03:04:05:06',
117                      'dstmac':
118                      '<DUT's NIC1 MAC>',
119                     }
120
121    VXLAN_FRAME_L3 = {'proto': 'udp',
122                      'packetsize': 64,
123                      'srcip': '1.1.1.1',
124                      'dstip': '192.168.240.1',
125                     }
126
127    VXLAN_FRAME_L4 = {'srcport': 4789,
128                      'dstport': 4789,
129                      'vni': VXLAN_VNI,
130                      'inner_srcmac': '01:02:03:04:05:06',
131                      'inner_dstmac': '06:05:04:03:02:01',
132                      'inner_srcip': '192.168.0.10',
133                      'inner_dstip': '192.168.240.9',
134                      'inner_proto': 'udp',
135                      'inner_srcport': 3000,
136                      'inner_dstport': 3001,
137                     }
138
139     # The receiving NIC of VXLAN traffic
140     DUT_NIC1_MAC = '<mac address>'
141
142 3. Run test:
143
144   .. code-block:: console
145
146      ./vsperf --conf-file user_settings.py --run-integration overlay_p2p_decap_cont
147
148 Executing GRE decapsulation tests
149 ---------------------------------
150
151 To run GRE decapsulation tests:
152
153 1. Set the variables used in "Executing Tunnel encapsulation tests"
154
155 2. Set IXNET_TCL_SCRIPT, GRE_FRAME_L2, GRE_FRAME_L3 and DUT_NIC1_MAC of your settings file to:
156
157   .. code-block:: console
158
159    IXNET_TCL_SCRIPT='ixnetrfc2544v2.tcl'
160
161    GRE_FRAME_L2 = {'srcmac':
162                    '01:02:03:04:05:06',
163                    'dstmac':
164                    '<DUT's NIC2 MAC>',
165                   }
166
167    GRE_FRAME_L3 = {'proto': 'gre',
168                    'packetsize': 64,
169                    'srcip': '1.1.1.1',
170                    'dstip': '192.168.240.1',
171                   }
172
173    GRE_FRAME_L4 = {'srcport': 0,
174                    'dstport': 0
175                    'inner_srcmac': '01:02:03:04:05:06',
176                    'inner_dstmac': '06:05:04:03:02:01',
177                    'inner_srcip': '192.168.0.10',
178                    'inner_dstip': '192.168.240.9',
179                    'inner_proto': 'udp',
180                    'inner_srcport': 3000,
181                    'inner_dstport': 3001,
182                   }
183
184     # The receiving NIC of GRE traffic
185     DUT_NIC1_MAC = '<mac address>'
186
187 3. Run test:
188
189   .. code-block:: console
190
191      ./vsperf --conf-file user_settings.py --test-param 'tunnel_type=gre' --run-integration overlay_p2p_decap_cont
192
193
194 Executing GENEVE decapsulation tests
195 ------------------------------------
196
197 IxNet 7.3X does not have native support of GENEVE protocol. The
198 template, GeneveIxNetTemplate.xml_ClearText.xml, should be imported
199 into IxNET for this testcase to work.
200
201 To import the template do:
202 1. Run the IxNetwork TCL Server
203 2. Click on the Traffic menu
204 3. Click on the Traffic actions and click Edit Packet Templates
205 4. On the Template editor window, click Import.
206    Select the template tools/pkt_gen/ixnet/GeneveIxNetTemplate.xml_ClearText.xml
207    and click import.
208
209
210 To run GENEVE decapsulation tests:
211
212 1. Set the variables used in "Executing Tunnel encapsulation tests"
213
214 2. Set IXNET_TCL_SCRIPT, GENEVE_FRAME_L2, GENEVE_FRAME_L3 and DUT_NIC1_MAC of your settings file to:
215
216   .. code-block:: console
217
218    IXNET_TCL_SCRIPT='ixnetrfc2544v2.tcl'
219
220    GENEVE_FRAME_L2 = {'srcmac':
221                       '01:02:03:04:05:06',
222                       'dstmac':
223                       '<DUT's NIC2 MAC>',
224                       }
225
226    GENEVE_FRAME_L3 = {'proto': 'udp',
227                       'packetsize': 64,
228                       'srcip': '1.1.1.1',
229                       'dstip': '192.168.240.1',
230                       'geneve_vni': 0,
231                       'inner_srcmac': '01:02:03:04:05:06',
232                       'inner_dstmac': '06:05:04:03:02:01',
233                       'inner_srcip': '192.168.0.10',
234                       'inner_dstip': '192.168.240.9',
235                       'inner_proto': 'udp',
236                      }
237    GENEVE_FRAME_L4 = {'srcport': 6081,
238                       'dstport': 6081,
239                       'geneve_vni': 0,
240                       'inner_srcmac': '01:02:03:04:05:06',
241                       'inner_dstmac': '06:05:04:03:02:01',
242                       'inner_srcip': '192.168.0.10',
243                       'inner_dstip': '192.168.240.9',
244                       'inner_proto': 'udp',
245                       'inner_srcport': 3000,
246                       'inner_dstport': 3001,
247                      }
248
249
250     # The receiving NIC of GENEVE traffic
251     DUT_NIC1_MAC = '<mac address>'
252
253 3. Run test:
254
255   .. code-block:: console
256
257      ./vsperf --conf-file user_settings.py --test-param 'tunnel_type=geneve' --run-integration overlay_p2p_decap_cont
258