aboutsummaryrefslogtreecommitdiffstats
path: root/samples/vnf_samples/nsut/prox/configs/handle_lw_aftr-4.cfg
blob: 60b5dc7ca400ce03cbb585adae1808123d154c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# Copyright (c) 2016-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# This configuration creates the functionality of a lwAFTR component of the
# lw4over6 architecture as described in IETF draft available at:
#   http://tools.ietf.org/id/draft-ietf-softwire-lw4over6-13.txt
# The lwAFTR simply terminates IPv6 tunnels that carry IPv4 traffic for many
# customers (one tunnel per customer). It consists of two tasks:
# 1) ipv6_encap that encapsulates IPv4 packets into IPv6 and sends those tunnel
#    packets towards the customer tunnel endpoint. For this, it must use a
#    binding table that associates with each tunnel, a public IPv4 address and a
#    set of ports.
# 2) ipv6_decap which handles packets arriving from the tunnel, checks they use
#    a source IPv4 address and port combination that matches their originating
#    tunnel (based on the same binding table as used by ipv6_encap), removes the
#    IPv6 encapsulation and sends them out its "internet" interface.
# The binding table must be loaded in the [lua] section and assigned to the
# tasks using the "tun_bindings" parameter. This configuration loads its binding
# table from the provided ip6_tun_bind_65k.lua.
#

[lua]
bindings = dofile("ip6_tun_bind_65k.lua")

[variables]
$tun_hop_limit=5
$local_ipv6=fe80:0000:0000:0000:0100:00ff:fe00:0000
$lookup_port_mask=0xffc0
$master        =0
$core_inet_0   =1
$core_inet_1   =2
$core_lwb4_0   =3
$core_lwb4_1   =4

[eal options]
-n=4
no-output=no ; disable DPDK debug output

[port 0]
name=inet_0
mac=hardware
rx desc=2048
tx desc=2048
promiscuous=yes

[port 1]
name=lwB4_0
mac=hardware
rx desc=2048
tx desc=2048
promiscuous=yes

[port 2]
name=inet_1
mac=hardware
rx desc=2048
tx desc=2048
promiscuous=yes

[port 3]
name=lwB4_1
mac=hardware
rx desc=2048
tx desc=2048
promiscuous=yes

[defaults]
mempool size=32K
memcache size=512

[global]
start time=20
name=lwAFTR

[core $master]
mode=master

;*****************************************************************************************
;##### Send Internet IPv4 traffic into IPv6 tunnels, according to binding table ####
[core $core_inet_0]
name=v6_encap
task=0
mode=ipv6_encap
rx port=inet_0
tx cores=${self}t1
drop=no
local ipv6=$local_ipv6
tunnel hop limit=$tun_hop_limit
lookup port mask=$lookup_port_mask
tun_bindings=bindings

name=tx_lwb4_0
task=1
mode=l2fwd
dst mac=@@tester_p1
rx ring=yes
tx port=lwB4_0
drop=no

[core $core_inet_1]
name=v6_encap
task=0
mode=ipv6_encap
rx port=inet_1
tx cores=${self}t1
drop=no
local ipv6=$local_ipv6
tunnel hop limit=$tun_hop_limit
lookup port mask=$lookup_port_mask
tun_bindings=bindings

name=tx_lwb4_1
task=1
mode=l2fwd
dst mac=@@tester_p3
rx ring=yes
tx port=lwB4_1
drop=no

;*****************************************************************************************
;##### Terminate IPv6 tunnels and transmit IPv4 out to Internet ####
;# Binding table is checked to ensure src IPv4 address and port combo is allocated to the originating tunnel
[core $core_lwb4_0]
name=v6_decap
task=0
mode=ipv6_decap
rx port=lwB4_0
tx cores=${self}t1
drop=no
local ipv6=$local_ipv6
tunnel hop limit=$tun_hop_limit
lookup port mask=$lookup_port_mask
tun_bindings=bindings

name=tx_inet_0
task=1
mode=l2fwd
dst mac=@@tester_p0
rx ring=yes
tx port=inet_0
drop=no

[core $core_lwb4_1]
name=v6_decap
task=0
mode=ipv6_decap
rx port=lwB4_1
tx cores=${self}t1
drop=no
local ipv6=$local_ipv6
tunnel hop limit=$tun_hop_limit
lookup port mask=$lookup_port_mask
tun_bindings=bindings

name=tx_inet_1
task=1
mode=l2fwd
dst mac=@@tester_p2
rx ring=yes
tx port=inet_1
drop=no