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