update rest api table
[samplevnf.git] / docs / testing / user / userguide / 07-Config_files.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International
2 .. License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, Intel Corporation and others.
5
6 SampleVNF - Config files
7 ========================
8
9 The configuration files are created based on the DUT test scenarios.
10 The example reference files are provided as part of the VNFs in the
11 config folder.
12
13 Following parameters will define the config files.
14
15 1. Load balancing type: Hardware or Software
16 2. Traffic type: IPv4 or IPv6
17 3. Number of Port Pairs: Single or Multi
18
19 Following are the example configuration files for sampleVNFs.
20
21 vCGNAPT Config files
22 --------------------
23 The reference configuration files explained here are for Software and Hardware
24 loadbalancing with IPv4 traffic type and single port pair.
25 For other configurations liek IPv6 and Multi-port, refer to example config
26 files provided as part of the source code in config(VNFs/vCGNAPT/config) folder
27 of the VNFs.
28
29 1. SWLB, IPv4, Single Port Pair, 1WT:
30
31   ::
32     [EAL]
33     w = 05:00.0
34     w = 05:00.1
35
36     [PIPELINE0]
37     type = MASTER
38     core = 0
39
40     [PIPELINE1]
41     type = ARPICMP
42     core = 1
43     pktq_in = SWQ0
44     pktq_out = SWQ7
45
46     pktq_in_prv = RXQ0.0
47     prv_to_pub_map = (0, 1)
48
49     [PIPELINE2]
50     type = TIMER
51     core = 2
52     n_flows = 1048576
53
54     [PIPELINE3]
55     type = TXRX
56     core = 3
57     pipeline_txrx_type = RXRX
58     dest_if_offset = 176
59     pktq_in = RXQ0.0 RXQ1.0
60     pktq_out = SWQ1 SWQ2 SWQ0
61
62     [PIPELINE4]
63     type = LOADB
64     core = 4
65     pktq_in = SWQ1 SWQ2
66     pktq_out = SWQ3 SWQ4
67     outport_offset = 136; 8
68     n_vnf_threads = 1
69     prv_que_handler = (0,)
70
71     [PIPELINE5]
72     type = CGNAPT
73     core = 5
74     pktq_in = SWQ3 SWQ4
75     pktq_out = SWQ5 SWQ6
76     phyport_offset = 204
77     n_flows = 1048576
78     key_offset = 192;64
79     key_size = 8
80     hash_offset = 200;72
81     timer_period = 100
82     max_clients_per_ip = 65535
83     max_port_per_client = 10
84     public_ip_port_range = 98103214:(1, 65535)
85     vnf_set = (3,4,5)
86     pkt_type = ipv4
87     cgnapt_meta_offset = 128
88     prv_que_handler = (0,)
89
90     [PIPELINE6]
91     type = TXRX
92     core = 6
93     pipeline_txrx_type = TXTX
94     dest_if_offset = 176
95     pktq_in = SWQ5 SWQ6
96     pktq_out = TXQ0.0 TXQ1.0
97
98 2. HWLB, IPv4, Single Port Pair, 1 WT:
99
100 This configuration doesn't require LOADB and TXRX pipelines
101
102 ::
103   [EAL]
104   w = 05:00.0
105   w = 05:00.1
106
107   [PIPELINE0]
108   type = MASTER
109   core = 0
110
111   [PIPELINE1]
112   type = ARPICMP
113   core = 1
114   pktq_in = SWQ0
115   pktq_out = TXQ0.0 TXQ1.0
116
117
118   pktq_in_prv = RXQ0.0
119   prv_to_pub_map = (0, 1)
120
121   [PIPELINE2]
122   type = TIMER
123   core = 2
124   n_flows = 1048576
125
126   [PIPELINE3]
127   type = CGNAPT
128   core = 3
129   pktq_in = RXQ0.0 RXQ1.0
130   pktq_out = TXQ0.1 TXQ1.1 SWQ0
131   phyport_offset = 204
132   n_flows = 1048576
133   key_offset = 192;64
134   key_size = 8
135   hash_offset = 200;72
136   timer_period = 100
137   max_clients_per_ip = 65535
138   max_port_per_client = 10
139   public_ip_port_range = 98103214:(1, 65535)
140   vnf_set = (3,4,5)
141   pkt_type = ipv4
142   cgnapt_meta_offset = 128
143   prv_que_handler = (0,)
144
145 vFW Config files
146 ----------------
147
148 The reference configuration files explained here are for Software and Hardware
149 loadbalancing with IPv4 traffic type and single port pair.
150 For other configurations liek IPv6 and Multi-port, refer to example config
151 files provided as part of the source code in config(VNFs/vFW/config) folder
152 of the VNFs.
153
154 1. SWLB, IPv4, Single Port Pair, 4WT:
155
156   ::
157
158     [PIPELINE0]
159     type = MASTER
160     core = 0
161
162     [PIPELINE1]
163     type =  ARPICMP
164     core = 0
165
166     pktq_in  = SWQ2
167     pktq_out = TXQ0.0 TXQ1.0
168
169     ; IPv4 ARP route table entries (dst_ip, mask, if_port, nh) hex values with no 0x
170     ; arp_route_tbl = (ac102814,ff000000,1,ac102814) (ca106414,ff000000,0,ca106414)
171
172     ; IPv6 ARP route table entries (dst_ip, mask, if_port, nh) hex values with no 0x
173     ;nd_route_tbl =  (fec0::6a05:caff:fe30:21b0,64,0,fec0::6a05:caff:fe30:21b0)
174     ;nd_route_tbl =  (2012::6a05:caff:fe30:2081,64,1,2012::6a05:caff:fe30:2081)
175
176     ; egress (private interface) info
177     pktq_in_prv =  RXQ0.0
178
179     ;for pub port <-> prv port mapping (prv, pub)
180     prv_to_pub_map = (0,1)
181     prv_que_handler = (0)
182
183     [PIPELINE2]
184     type = TXRX
185     core = 1
186     pktq_in  = RXQ0.0 RXQ1.0
187     pktq_out = SWQ0 SWQ1 SWQ2
188     pipeline_txrx_type = RXRX
189
190     [PIPELINE3]
191     type = LOADB
192     core = 2
193     pktq_in  = SWQ0 SWQ1
194     pktq_out = SWQ3 SWQ4 SWQ5 SWQ6 SWQ7 SWQ8 SWQ9 SWQ10
195     outport_offset = 136
196     n_vnf_threads = 4 ; Number of worker threads
197     prv_que_handler = (0)
198     n_lb_tuples = 5 ; tuple(src_ip,dst_ip, src_port, dst_port, protocol)
199     ;loadb_debug = 0
200
201     [PIPELINE4]
202     type = VFW
203     core = 3
204     pktq_in  = SWQ3 SWQ4
205     pktq_out = SWQ11 SWQ12;TXQ0.0 TXQ1.0
206
207     n_rules = 4096 ; Max number of ACL rules
208     ;n_flows gets round up to power of 2
209     n_flows = 1048576 ; Max number of connections/flows per vFW WT
210     traffic_type = 4 ; IPv4 Traffic
211     ;traffic_type = 6 ; IPv6 Traffic
212     ; tcp_time_wait controls timeout for closed connection, normally 120
213     tcp_time_wait = 10  ; TCP Connection WAIT timeout
214     tcp_be_liberal = 0
215     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
216     udp_unreplied = 180 ; UDP timeouts for unreplied traffic
217     udp_replied = 180 ; UDP timeout for replied traffic
218
219     [PIPELINE5]
220     type = VFW
221     core = 4
222     pktq_in  = SWQ5 SWQ6
223     pktq_out = SWQ13 SWQ14;TXQ0.0 TXQ1.0
224
225     n_rules = 4096
226     ;n_flows gets round up to power of 2
227     n_flows = 1048576
228     traffic_type = 4 ; IPv4 Traffic
229     ;traffic_type = 6 ; IPv6 Traffic
230     ; tcp_time_wait controls timeout for closed connection, normally 120
231     tcp_time_wait = 10
232     tcp_be_liberal = 0
233     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
234     udp_unreplied = 180
235     udp_replied = 180
236
237     [PIPELINE6]
238     type = VFW
239     core = 5
240     pktq_in  = SWQ7 SWQ8
241     pktq_out = SWQ15 SWQ16
242
243     n_rules = 4096
244     ;n_flows gets round up to power of 2
245     n_flows = 1048576
246     traffic_type = 4 ; IPv4 Traffic
247     ;traffic_type = 6 ; IPv6 Traffic
248     ; tcp_time_wait controls timeout for closed connection, normally 120
249     tcp_time_wait = 10
250     tcp_be_liberal = 0
251     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
252     udp_unreplied = 180
253     udp_replied = 180
254
255     [PIPELINE7]
256     type = VFW
257     core = 6
258     pktq_in  = SWQ9 SWQ10
259     pktq_out = SWQ17 SWQ18
260
261     n_rules = 4096
262     ;n_flows gets round up to power of 2
263     n_flows = 1048576
264     traffic_type = 4 ; IPv4 Traffic
265     ;traffic_type = 6 ; IPv6 Traffic
266     ; tcp_time_wait controls timeout for closed connection, normally 120
267     tcp_time_wait = 10
268     tcp_be_liberal = 0
269     udp_unreplied = 180
270     udp_replied = 180
271
272     [PIPELINE8]
273     type = TXRX
274     core = 1h
275     pktq_in  = SWQ11 SWQ12 SWQ13 SWQ14 SWQ15 SWQ16 SWQ17 SWQ18
276     pktq_out = TXQ0.1 TXQ1.1 TXQ0.2 TXQ1.2 TXQ0.3 TXQ1.3 TXQ0.4 TXQ1.4
277     pipeline_txrx_type = TXTX
278
279
280 2. HWLB, IPv4, Single Port Pair, 4 WT:
281
282 This configuration doesn't require LOADB and TXRX pipelines
283
284   ::
285
286     [PIPELINE0]
287     type = MASTER
288     core = 0
289
290     [PIPELINE1]
291     type =  ARPICMP
292     core = 0
293     pktq_in  = SWQ0 SWQ1 SWQ2 SWQ3
294     pktq_out = TXQ0.0 TXQ1.0
295
296     ; egress (private interface) info
297     pktq_in_prv =  RXQ0.0
298
299     ;for pub port <-> prv port mapping (prv, pub)
300     prv_to_pub_map = (0,1)
301     prv_que_handler = (0)
302
303     [PIPELINE2]
304     type = VFW
305     core = 1
306     pktq_in  = RXQ0.0 RXQ1.0
307     pktq_out = TXQ0.1 TXQ1.1 SWQ0
308
309     n_rules = 4096
310     ;n_flows gets round up to power of 2
311     n_flows = 1048576
312
313     traffic_type = 4 ; IPv4 Traffic
314     ;traffic_type = 6 ; IPv6 Traffic
315     ; tcp_time_wait controls timeout for closed connection, normally 120
316     tcp_time_wait = 10
317     tcp_be_liberal = 0
318     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
319     udp_unreplied = 180
320     udp_replied = 180
321
322     [PIPELINE3]
323     type = VFW
324     core = 2
325     pktq_in  = RXQ0.1 RXQ1.1
326     pktq_out = TXQ0.2 TXQ1.2 SWQ1
327
328     n_rules = 4096
329     ;n_flows gets round up to power of 2
330     n_flows = 1048576
331
332     traffic_type = 4 ; IPv4 Traffic
333     ;traffic_type = 6 ; IPv6 Traffic
334     ; tcp_time_wait controls timeout for closed connection, normally 120
335     tcp_time_wait = 10
336     tcp_be_liberal = 0
337     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
338     udp_unreplied = 180
339     udp_replied = 180
340
341     [PIPELINE4]
342     type = VFW
343     core = 3
344     pktq_in  = RXQ0.2 RXQ1.2
345     pktq_out = TXQ0.3 TXQ1.3 SWQ2
346
347     n_rules = 4096
348     ;n_flows gets round up to power of 2
349     n_flows = 1048576
350
351     traffic_type = 4 ; IPv4 Traffic
352     ;traffic_type = 6 ; IPv6 Traffic
353     ; tcp_time_wait controls timeout for closed connection, normally 120
354     tcp_time_wait = 10
355     tcp_be_liberal = 0
356     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
357     udp_unreplied = 180
358     udp_replied = 180
359
360     [PIPELINE5]
361     type = VFW
362     core = 4
363     pktq_in  = RXQ0.3 RXQ1.3
364     pktq_out = TXQ0.4 TXQ1.4 SWQ3
365
366     n_rules = 4096
367     ;n_flows gets round up to power of 2
368     n_flows = 1048576
369
370     traffic_type = 4 ; IPv4 Traffic
371     ;traffic_type = 6 ; IPv6 Traffic
372     ; tcp_time_wait controls timeout for closed connection, normally 120
373     tcp_time_wait = 10
374     tcp_be_liberal = 0
375     ;udp_unreplied and udp_replied controls udp "connection" timeouts, normally 30/180
376     udp_unreplied = 180
377     udp_replied = 180
378
379
380 vACL Config files
381 ----------------
382
383 The reference configuration files explained here are for Software and Hardware
384 loadbalancing with IPv4 traffic type and single port pair.
385 For other configurations liek IPv6 and Multi-port, refer to example config
386 files provided as part of the source code in config(VNFs/vACL/config) folder
387 of the VNFs.
388
389 1. SWLB, IPv4, Single Port Pair, 1 WT:
390
391  ::
392
393     [EAL]
394     # add pci whitelist eg below
395     w = 05:00.0  ; Network Ports binded to dpdk
396     w = 05:00.1  ; Network Ports binded to dpdk
397
398     [PIPELINE0]
399     type = MASTER
400     core = 0
401
402     [PIPELINE1]
403     type = ARPICMP
404     core = 0
405     pktq_in  = SWQ2
406     pktq_out = SWQ7
407     pktq_in_prv =  RXQ0.0
408     prv_to_pub_map = (0,1)
409     prv_que_handler = (0)
410
411     [PIPELINE2]
412     type = TXRX
413     core = 1
414     pktq_in  = RXQ0.0 RXQ1.0
415     pktq_out = SWQ0 SWQ1 SWQ2
416     pipeline_txrx_type = RXRX
417     dest_if_offset = 176
418
419     [PIPELINE3]
420     type = LOADB
421     core = 2
422     pktq_in  = SWQ0 SWQ1
423     pktq_out = SWQ3 SWQ4
424     outport_offset = 136
425     phyport_offset = 204
426     n_vnf_threads = 1
427     prv_que_handler = (0)
428
429     [PIPELINE4]
430     type = ACL
431     core = 3
432     pktq_in  = SWQ3 SWQ4
433     pktq_out = SWQ5 SWQ6
434     n_flows = 1000000
435     pkt_type = ipv4
436     traffic_type = 4
437
438     [PIPELINE5]
439     type = TXRX
440     core = 1h
441     pktq_in  = SWQ5 SWQ6 SWQ7
442     pktq_out = TXQ0.0 TXQ1.0
443     pipeline_txrx_type = TXTX
444
445
446 2. SWLB, IPv4, Single Port Pair, 1 WT:
447
448  ::
449
450     [EAL]
451     # add pci whitelist eg below
452     w = 05:00.0
453     w = 05:00.1
454
455     [PIPELINE0]
456     type = MASTER
457     core = 0
458
459     [PIPELINE1]
460     type = ARPICMP
461     core = 0
462     pktq_in  = SWQ0
463     pktq_out = TXQ0.0 TXQ1.0
464     pktq_in_prv =  RXQ0.0
465     prv_to_pub_map = (0,1)
466     prv_que_handler = (0)
467
468     [PIPELINE2]
469     type = ACL
470     core = 1
471     pktq_in  = RXQ0.0 RXQ1.0
472     pktq_out = TXQ0.1 TXQ1.1 SWQ0
473     n_flows = 1000000
474     pkt_type = ipv4
475     traffic_type = 4