blob: a834f9da89994bb89f5fc5cbcf837a2e4c964f24 [file] [log] [blame]
Wei-Yu Chen450a98a2019-01-15 16:56:30 -08001---
Wei-Yu Chen53aec362019-01-18 16:30:33 -08002# Copyright 2018-present Open Networking Foundation
3# Copyright 2018 Intel Corporation
Wei-Yu Chen450a98a2019-01-15 16:56:30 -08004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17apiVersion: v1
18kind: ConfigMap
19metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080020 name: ngiccp-config
21data:
22 adc_rules.cfg: |
23 [GLOBAL]
24 NUM_ADC_RULES = 5
25
26 ;FORMAT ::
27 ;ADC_TYPE : [ DOMAIN = 0 | IP = 1 | IP PREFIX =2 ]
28 ;
29 ;if ADC_TYPE = 0
30 ; DOMAIN
31 ;elseif ADC_TYPE = 1
32 ; IP
33 ;elseif ADC_TYPE = 2
34 ; IP
35 ; PREFIX
36 ;else
37 ; NONE
38 ;
39 ;NOTE :
40 ;Rules defined first have a higher priority, unless DROP is specified
41 ;(i.e. multiple rules for the same IP).
42 ;When specifying DROP with an IP address, use a prefix of 32 to prevent DNS
43 ;results from overwriting rule.
44
45
46 [ADC_RULE_1]
47 ADC_TYPE = 2
48 IP = 0.0.0.0
49 PREFIX = 0
50
51 [ADC_RULE_2]
52 ADC_TYPE = 2
53 IP = 13.1.1.0
54 PREFIX = 24
55
56 [ADC_RULE_3]
57 ADC_TYPE = 1
58 IP = 13.1.1.254
59
60 [ADC_RULE_4]
61 ADC_TYPE = 0
62 DOMAIN = www.example.gov
63
64 [ADC_RULE_5]
65 ADC_TYPE = 0
66 DOMAIN = www.drop_example.com
67 cdr.cfg: |
68 CDR_PATH=./cdr
69 MASTER_CDR=./cdr/master.csv
70 cp_config.cfg: |
71 if [ ! -d "/dev/hugepages" ]; then
72 MEMORY="--no-huge -m $((MEM_LIMIT-1024))"
73 fi
74
Wei-Yu Chen450a98a2019-01-15 16:56:30 -080075 MGMT_INFO="-s ${SGW_S11_IP} -m ${MME_S11_IP} -w ${SGW_S1U_IP}"
76 APN_INFO="-i ${IP_POOL_IP} -p ${IP_POOL_MASK} -a ${APN}"
77 SPGW_CFG="-d 03 -l 2 -r 7.7.7.7 -g 6.6.6.6 -v 4.4.4.4 -u 5.5.5.5"
78
79 TEID_INFO="-t ${S11_TEID_POOL_START} -e ${S11_TEID_POOL_STOP} -q ${S1U_TEID_POOL_START} -o ${S1U_TEID_POOL_STOP}"
80 APP_ARGS="${MGMT_INFO} ${APN_INFO} ${SPGW_CFG} ${TEID_INFO}"
81
82 CORES="-c $(taskset -p $$ | awk '{print $NF}')"
83 DEVICES="--no-pci"
84 EAL_ARGS="${CORES} ${MEMORY} ${DEVICES}"
85 dp_config.cfg: |
86 get_pcimac_addr () {
87 ifname=$1
88 cid="$(sed -ne '/hostname/p' /proc/1/task/1/mountinfo | awk -F '/' '{print $6}' |tr -d " " )"
89 cid="$cid-$ifname"
90 eval "export $2=$(awk -F '"' '{print $4}' /sriov-cni/$cid)"
91 eval "export $3=$(awk -F '"' '{print $8}' /sriov-cni/$cid)"
92 eval "export $4=$(awk -F '"' '{print $12}' /sriov-cni/$cid)"
93 }
94
95 if [ -d "/sriov-cni" ]; then
96 echo "================== SR-IOV FOUND ============"
97 get_pcimac_addr s1u-net SGW_S1U_PCI S1U_MAC SGW_S1U_IP
98 get_pcimac_addr sgi-net SGW_SGI_PCI SGI_MAC SGW_SGI_IP
99 DEVICES="-w $SGW_S1U_PCI -w $SGW_SGI_PCI"
100 SHARED_DIR="/opt/ngic/config/shared"
101 echo $SGW_S1U_IP > ${SHARED_DIR}/SGW_S1U_IP
102 else #dev --vdev af_packt
103 echo "vdev (AF_PACKET)"
104 # set the variables we provide
105 SGW_S1U_IP=$(netstat -ie | grep -A1 s1u-net | tail -1 | awk '{print $2}' | tr -d addr:)
106 SGW_SGI_IP=$(netstat -ie | grep -A1 sgi-net | tail -1 | awk '{print $2}' | tr -d addr:)
107 S1U_MAC=$( netstat -ie | grep -B1 $SGW_S1U_IP | head -n1 | awk '{print $5}' )
108 SGI_MAC=$( netstat -ie | grep -B1 $SGW_SGI_IP | head -n1 | awk '{print $5}' )
109
110 DEVICES="--no-pci --vdev eth_af_packet0,iface=s1u-net --vdev eth_af_packet1,iface=sgi-net"
111 fi
112
113 if [ ! -d "/dev/hugepages" ]; then
114 MEMORY="--no-huge -m $((MEM_LIMIT-1024))"
115 fi
116
117 CORES="-c $(taskset -p $$ | awk '{print $NF}')"
118 SPGW_CFG="--spgw_cfg 03"
119 EAL_ARGS="${CORES} ${MEMORY} ${DEVICES}"
120
121 S1U="--s1u_ip ${SGW_S1U_IP} --s1u_mac ${S1U_MAC}"
122 SGI="--sgi_ip ${SGW_SGI_IP} --sgi_mac ${SGI_MAC} --sgi_gw_ip ${RTR_SGI_IP} --sgi_mask ${SGI_MASK}"
123 WORKERS="--num_workers 1"
124 MISC="--log 1"
125 APP_ARGS="${S1U} ${SGI} ${WORKERS} ${MISC} ${SPGW_CFG}"
126 interface.cfg: |
127 [0]
Wei-Yu Chend21956f2019-02-04 15:21:01 -0800128 dp_comm_ip = {{ .Values.spgwu_s11_ip }}
Wei-Yu Chenda76c322019-01-18 13:31:55 -0800129 dp_comm_port = {{ .Values.spgwu_port }}
Wei-Yu Chen450a98a2019-01-15 16:56:30 -0800130 cp_comm_ip = 127.0.0.1
131 cp_comm_port = 21
132 meter_profile.cfg: |
133 [GLOBAL]
134 NUM_OF_IDX = 7
135
136 [ENTRY_1]
137 ;Committed Information Rate (CIR). Measured in bytes per second.
138 ;MBR is mapped into CIR, convert MBR from bits to Bytes and set CIR.
139 CIR = 2342400
140 ;Committed Burst Size unit = Bytes
141 CBS = 5856
142 ;Excess Burst Size unit = Bytes
143 EBS = 11712
144 ;Meter profile index. Refer this index in static_pcc.cfg to set AMBR/MBR
145 MTR_PROFILE_IDX = 3
146
147 [ENTRY_2]
148 ;1200 = 1756800
149 ;1400 = 2049600
150 ;1600 = 2342400
151 CIR = 2342400
152 CBS = 5856
153 EBS = 11712
154 MTR_PROFILE_IDX = 4
155
156 [ENTRY_3]
157 ; QCI5,QCI7 15.571kbps = 1947 B
158 CIR = 2342400
159 CBS = 5856
160 EBS = 11712
161 MTR_PROFILE_IDX = 5
162
163 [ENTRY_4]
164 ; QCI1, 44kbps = 5500 B
165 CIR = 2342400
166 CBS = 5856
167 EBS = 11712
168 MTR_PROFILE_IDX = 6
169
170 [ENTRY_5]
171 ; QCI9, 31.143kbps = 3893 B
172 CIR = 2342400
173 CBS = 5856
174 EBS = 11712
175 MTR_PROFILE_IDX = 7
176
177 [ENTRY_6]
178 ; 128B, 7pps
179 CIR = 2342400
180 CBS = 512
181 EBS = 1024
182 MTR_PROFILE_IDX = 8
183
184 [ENTRY_7]
185 ; 128B, 2pps
186 CIR = 2342400
187 CBS = 512
188 EBS = 1024
189 MTR_PROFILE_IDX = 9
190
191 pcc_rules.cfg: |
192 [GLOBAL]
193 NUM_PCC_FILTERS = 9
194 ;To config AMBR/MBR values refer meter_profile.cfg. specify only the
195 ;meter profile index to be set here.
196 UL_AMBR_MTR_PROFILE_IDX = 3
197 DL_AMBR_MTR_PROFILE_IDX = 4
198
199 ;default filter - must be first for now (until DP doesn't install any filters)
200 ;associated with default adc rule
201 [PCC_FILTER_1]
202 RULE_NAME = DefaultRule
203 RATING_GROUP = 9
204 SERVICE_ID = 0
205 RULE_STATUS = 0
206 GATE_STATUS = 1
207 SESSION_CONT = 0
208 REPORT_LEVEL = 1
209 CHARGING_MODE = 0
210 METERING_METHOD = 0
211 MUTE_NOTIFY = 0
212 MONITORING_KEY = 0
213 SPONSOR_ID = 0
214 REDIRECT_INFO = 0
215 PRECEDENCE = 254
216 DROP_PKT_COUNT = 0
217 ;Specify the meter profile index from meter_profile.cfg
218 UL_MBR_MTR_PROFILE_IDX = 7
219 DL_MBR_MTR_PROFILE_IDX = 7
220 ;List of ADC filter indices
221 SDF_FILTER_IDX = 99998
222
223 [PCC_FILTER_2]
224 RULE_NAME = sdf_rule_1
225 RATING_GROUP = 5
226 SERVICE_ID = 0
227 RULE_STATUS = 0
228 GATE_STATUS = 1
229 SESSION_CONT = 0
230 REPORT_LEVEL = 2
231 CHARGING_MODE = 0
232 METERING_METHOD = 0
233 MUTE_NOTIFY = 0
234 MONITORING_KEY = 0
235 SPONSOR_ID = 0
236 REDIRECT_INFO = 0
237 PRECEDENCE = 1
238 DROP_PKT_COUNT = 0
239 UL_MBR_MTR_PROFILE_IDX = 5
240 DL_MBR_MTR_PROFILE_IDX = 5
241 ;List of SDF filter indices
242 SDF_FILTER_IDX = 1
243
244 [PCC_FILTER_3]
245 RULE_NAME = sdf_rule_2
246 RATING_GROUP = 1
247 SERVICE_ID = 0
248 RULE_STATUS = 0
249 GATE_STATUS = 1
250 SESSION_CONT = 0
251 REPORT_LEVEL = 3
252 CHARGING_MODE = 0
253 METERING_METHOD = 0
254 MUTE_NOTIFY = 0
255 MONITORING_KEY = 0
256 SPONSOR_ID = 0
257 REDIRECT_INFO = 0
258 PRECEDENCE = 18
259 DROP_PKT_COUNT = 0
260 UL_MBR_MTR_PROFILE_IDX = 6
261 DL_MBR_MTR_PROFILE_IDX = 6
262 ;List of SDF filter indices
263 SDF_FILTER_IDX = 2
264
265 [PCC_FILTER_4]
266 RULE_NAME = adc_rule_1
267 RATING_GROUP = Zero-Rate
268 SERVICE_ID = Internet
269 RULE_STATUS = 0
270 GATE_STATUS = 1
271 SESSION_CONT = 0
272 REPORT_LEVEL = 8
273 CHARGING_MODE = 0
274 METERING_METHOD = 0
275 MUTE_NOTIFY = 0
276 MONITORING_KEY = 0
277 REDIRECT_INFO = 0
278 SPONSOR_ID = Example
279 PRECEDENCE = 15
280 DROP_PKT_COUNT = 0
281 UL_MBR_MTR_PROFILE_IDX = 7
282 DL_MBR_MTR_PROFILE_IDX = 7
283 ;List of SDF filter indices
284 ADC_FILTER_IDX = 1
285
286 [PCC_FILTER_5]
287 RULE_NAME = adc_rule_2
288 RATING_GROUP = 0
289 SERVICE_ID = CIPA
290 RULE_STATUS = 0
291 GATE_STATUS = 1
292 SESSION_CONT = 0
293 REPORT_LEVEL = 9
294 CHARGING_MODE = 0
295 METERING_METHOD = 0
296 MUTE_NOTIFY = 0
297 MONITORING_KEY = 0
298 SPONSOR_ID = Example
299 REDIRECT_INFO = 0
300 SPONSOR_ID = Example
301 REDIRECT_INFO = 0
302 PRECEDENCE = 4
303 DROP_PKT_COUNT = 0
304 UL_MBR_MTR_PROFILE_IDX = 0
305 DL_MBR_MTR_PROFILE_IDX = 0
306 ;List of SDF filter indices
307 ADC_FILTER_IDX = 2
308
309 [PCC_FILTER_6]
310 RULE_NAME = sdf_rule_3
311 RATING_GROUP = 7
312 SERVICE_ID = 0
313 RULE_STATUS = 0
314 GATE_STATUS = 1
315 SESSION_CONT = 0
316 REPORT_LEVEL = 4
317 CHARGING_MODE = 0
318 METERING_METHOD = 0
319 MUTE_NOTIFY = 0
320 MONITORING_KEY = 0
321 SPONSOR_ID = 0
322 REDIRECT_INFO = 0
323 PRECEDENCE = 17
324 DROP_PKT_COUNT = 0
325 UL_MBR_MTR_PROFILE_IDX = 5
326 DL_MBR_MTR_PROFILE_IDX = 5
327 ;List of SDF filter indices
328 SDF_FILTER_IDX = 3
329
330 [PCC_FILTER_7]
331 RULE_NAME = adc_rule_3
332 RATING_GROUP = Zero-Rate
333 SERVICE_ID = Internet
334 RULE_STATUS = 0
335 GATE_STATUS = 1
336 SESSION_CONT = 0
337 REPORT_LEVEL = 5
338 CHARGING_MODE = 0
339 METERING_METHOD = 0
340 MUTE_NOTIFY = 0
341 MONITORING_KEY = 0
342 SPONSOR_ID = Example
343 REDIRECT_INFO = 0
344 PRECEDENCE = 210
345 DROP_PKT_COUNT = 0
346 UL_MBR_MTR_PROFILE_IDX = 7
347 DL_MBR_MTR_PROFILE_IDX = 7
348 ;List of SDF filter indices
349 ADC_FILTER_IDX = 4
350
351 [PCC_FILTER_8]
352 RULE_NAME = adc_rule_4
353 RATING_GROUP = Zero-Rate
354 SERVICE_ID = Management
355 RULE_STATUS = 0
356 GATE_STATUS = 1
357 SESSION_CONT = 0
358 REPORT_LEVEL = 6
359 CHARGING_MODE = 0
360 METERING_METHOD = 0
361 MUTE_NOTIFY = 0
362 MONITORING_KEY = 0
363 SPONSOR_ID = Example
364 REDIRECT_INFO = 0
365 PRECEDENCE = 200
366 DROP_PKT_COUNT = 0
367 UL_MBR_MTR_PROFILE_IDX = 7
368 DL_MBR_MTR_PROFILE_IDX = 7
369 ;List of SDF filter indices
370 ADC_FILTER_IDX = 12
371
372 [PCC_FILTER_9]
373 RULE_NAME = adc_rule_5
374 RATING_GROUP = Zero-Rate
375 SERVICE_ID = Provisioning
376 RULE_STATUS = 0
377 GATE_STATUS = 1
378 SESSION_CONT = 0
379 REPORT_LEVEL = 7
380 CHARGING_MODE = 0
381 METERING_METHOD = 0
382 MUTE_NOTIFY = 0
383 MONITORING_KEY = 0
384 SPONSOR_ID = Example
385 REDIRECT_INFO = 0
386 PRECEDENCE = 220
387 DROP_PKT_COUNT = 0
388 UL_MBR_MTR_PROFILE_IDX = 7
389 DL_MBR_MTR_PROFILE_IDX = 7
390 ;List of SDF filter indices
391 ADC_FILTER_IDX = 3
392 sdf_rules.cfg: |
393 [GLOBAL]
394 NUM_SDF_FILTERS = 4
395
396 [SDF_FILTER_1]
397 DIRECTION = downlink_only
398 IPV4_REMOTE = 13.2.1.113
399 IPV4_REMOTE_MASK = 255.255.255.0
400 PROTOCOL = 17
401 LOCAL_LOW_LIMIT_PORT = 0
402 LOCAL_HIGH_LIMIT_PORT = 65535
403 REMOTE_LOW_LIMIT_PORT = 0
404 REMOTE_HIGH_LIMIT_PORT = 65535
405
406 [SDF_FILTER_2]
407 DIRECTION = uplink_only
408 IPV4_LOCAL = 16.255.255.0
409 IPV4_LOCAL_MASK = 255.255.255.0
410 PROTOCOL = 17
411 LOCAL_LOW_LIMIT_PORT = 0
412 LOCAL_HIGH_LIMIT_PORT = 65535
413 REMOTE_LOW_LIMIT_PORT = 0
414 REMOTE_HIGH_LIMIT_PORT = 65535
415
416 [SDF_FILTER_3]
417 DIRECTION = downlink_only
418 IPV4_REMOTE = 130.10.0.0
419 IPV4_REMOTE_MASK = 255.255.0.0
420 PROTOCOL = 17
421 REMOTE_LOW_LIMIT_PORT = 5060
422 REMOTE_HIGH_LIMIT_PORT = 5060
423
424 [SDF_FILTER_4]
425 DIRECTION = uplink_only
426 IPV4_REMOTE = 103.1.0.0
427 IPV4_REMOTE_MASK = 255.255.0.0
428 PROTOCOL = 17
429 LOCAL_LOW_LIMIT_PORT = 17000
430 LOCAL_HIGH_LIMIT_PORT = 17010
431
432---
433apiVersion: v1
434kind: ConfigMap
435metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -0800436 name: cassandra
437data:
438 cassandra-rackdc.properties: |
439 dc=DC1
440 rack=RAC1
441 prefer_local=true
442---
443apiVersion: v1
444kind: ConfigMap
445metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -0800446 name: hss
447data:
448 acl.conf: |
449 ALLOW_OLD_TLS *.cluster.local
450 hss.conf: |
451 # -------- Local ---------
452 # The first parameter in this section is Identity, which will be used to
453 # identify this peer in the Diameter network. The Diameter protocol mandates
454 # that the Identity used is a valid FQDN for the peer. This parameter can be
455 # omitted, in that case the framework will attempt to use system default value
456 # (as returned by hostname --fqdn).
457 Identity = "HSS_IDENTITY";
458
459 # In Diameter, all peers also belong to a Realm. If the realm is not specified,
460 # the framework uses the part of the Identity after the first dot.
461 Realm = "HSS_REALM";
462
463
464 # This parameter is mandatory, even if it is possible to disable TLS for peers
465 # connections. A valid certificate for this Diameter Identity is expected.
466 TLS_Cred = "./conf/HSS_HOST.cert.pem", "./conf/HSS_HOST.key.pem";
467 TLS_CA = "./conf/cacert.pem";
468
469
470 # Disable use of TCP protocol (only listen and connect in SCTP)
471 # Default : TCP enabled
472 No_SCTP;
473
474
475 # This option is ignored if freeDiameter is compiled with DISABLE_SCTP option.
476 # Prefer TCP instead of SCTP for establishing new connections.
477 # This setting may be overwritten per peer in peer configuration blocs.
478 # Default : SCTP is attempted first.
479 Prefer_TCP;
480
481
482 # Disable use of IPv6 addresses (only IP)
483 # Default : IPv6 enabled
484 No_IPv6;
485
486
487 # Overwrite the number of SCTP streams. This value should be kept low,
488 # especially if you are using TLS over SCTP, because it consumes a lot of
489 # resources in that case. See tickets 19 and 27 for some additional details on
490 # this.
491 # Limit the number of SCTP streams
492 SCTP_streams = 3;
493
494
495 # By default, freeDiameter acts as a Diameter Relay Agent by forwarding all
496 # messages it cannot handle locally. This parameter disables this behavior.
497 NoRelay;
498
499
500 # Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed
501 # on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the
502 # CER/CEA exchange on a dedicated secure port.
503 # This parameter only affects outgoing connections.
504 # The setting can be also defined per-peer (see Peers configuration section).
505 # Default: use RFC6733 method with separate port for TLS.
506
507 #TLS_old_method;
508
509
510 # Number of parallel threads that will handle incoming application messages.
511 # This parameter may be deprecated later in favor of a dynamic number of threads
512 # depending on the load.
513 AppServThreads = 4;
514
515 # Specify the addresses on which to bind the listening server. This must be
516 # specified if the framework is unable to auto-detect these addresses, or if the
517 # auto-detected values are incorrect. Note that the list of addresses is sent
518 # in CER or CEA message, so one should pay attention to this parameter if some
519 # adresses should be kept hidden.
520 #ListenOn = "127.0.0.1";
521
522 Port = {{ .Values.hss.ports.s6a }};
523 SecPort = {{ .Values.hss.ports.secs6a }};
524
525 LoadExtension = "acl_wl.fdx" : "./conf/acl.conf";
526
527 # -------- Extensions ---------
528
529 #LoadExtension = "/usr/local/lib/freeDiameter/_sample.fdx";
530 #LoadExtension = "/usr/local/lib/freeDiameter/app_acct.fdx";
531 #LoadExtension = "/usr/local/lib/freeDiameter/app_diameap.fdx";
532 #LoadExtension = "/usr/local/lib/freeDiameter/app_radgw.fdx";
533 #LoadExtension = "/usr/local/lib/freeDiameter/app_redirect.fdx";
534 #LoadExtension = "/usr/local/lib/freeDiameter/app_sip.fdx";
535 #LoadExtension = "/usr/local/lib/freeDiameter/dbg_interactive.fdx";
536 #LoadExtension = "/usr/local/lib/freeDiameter/dbg_monitor.fdx";
537 #LoadExtension = "/usr/local/lib/freeDiameter/dbg_msg_dumps.fdx";
538 #LoadExtension = "/usr/local/lib/freeDiameter/dbg_msg_timings.fdx";
539 #LoadExtension = "/usr/local/lib/freeDiameter/dbg_rt.fdx";
540 LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx";
541 #LoadExtension = "/usr/local/lib/freeDiameter/dict_CreditControl.fdx";
542 #LoadExtension = "/usr/local/lib/freeDiameter/dict_CxDx.fdx";
543 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Gx.fdx";
544 #LoadExtension = "/usr/local/lib/freeDiameter/dict_NAS.fdx";
545 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Ro.fdx";
546 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Rx.fdx";
547 #LoadExtension = "/usr/local/lib/freeDiameter/dict_S6mS6n.fdx";
548 #LoadExtension = "/usr/local/lib/freeDiameter/dict_SGd.fdx";
549 #LoadExtension = "/usr/local/lib/freeDiameter/dict_SLh.fdx";
550 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Sd.fdx";
551 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Sh.fdx";
552 #LoadExtension = "/usr/local/lib/freeDiameter/dict_T4.fdx";
553 #LoadExtension = "/usr/local/lib/freeDiameter/dict_T6aT6bT7.fdx";
554 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Tsp.fdx";
555 #LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca.fdx";
556 #LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca_3gpp.fdx";
557 #LoadExtension = "/usr/local/lib/freeDiameter/dict_dcca_starent.fdx";
558 LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx";
559 #LoadExtension = "/usr/local/lib/freeDiameter/dict_eap.fdx";
560 LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx";
561 #LoadExtension = "/usr/local/lib/freeDiameter/dict_legacy_xml.fdx";
562 #LoadExtension = "/usr/local/lib/freeDiameter/dict_mip6a.fdx";
563 #LoadExtension = "/usr/local/lib/freeDiameter/dict_mip6i.fdx";
564 #LoadExtension = "/usr/local/lib/freeDiameter/dict_nas_mipv6.fdx";
565 #LoadExtension = "/usr/local/lib/freeDiameter/dict_nasreq.fdx";
566 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx";
567 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx";
568 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx";
569 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx";
570 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx";
571 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx";
572 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx";
573 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx";
574 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx";
575 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx";
576 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx";
577 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx";
578 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx";
579 #LoadExtension = "/usr/local/lib/freeDiameter/dict_sip.fdx";
580 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx";
581 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx";
582 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx";
583 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx";
584 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx";
585 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx";
586 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx";
587 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx";
588 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx";
589 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx";
590 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx";
591 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx";
592 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx";
593 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx";
594 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx";
595 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx";
596 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx";
597 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx";
598 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx";
599 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx";
600 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx";
601 #LoadExtension = "/usr/local/lib/freeDiameter/rt_busypeers.fdx";
602 #LoadExtension = "/usr/local/lib/freeDiameter/rt_default.fdx";
603 #LoadExtension = "/usr/local/lib/freeDiameter/rt_ereg.fdx";
604 #LoadExtension = "/usr/local/lib/freeDiameter/rt_ignore_dh.fdx";
605 #LoadExtension = "/usr/local/lib/freeDiameter/rt_load_balance.fdx";
606 #LoadExtension = "/usr/local/lib/freeDiameter/rt_randomize.fdx";
607 #LoadExtension = "/usr/local/lib/freeDiameter/rt_redirect.fdx";
608 #LoadExtension = "/usr/local/lib/freeDiameter/test_acct.fdx";
609 #LoadExtension = "/usr/local/lib/freeDiameter/test_app.fdx";
610 #LoadExtension = "/usr/local/lib/freeDiameter/test_hss.fdx";
611 #LoadExtension = "/usr/local/lib/freeDiameter/test_netemul.fdx";
612 #LoadExtension = "/usr/local/lib/freeDiameter/test_rt_any.fdx";
613 #LoadExtension = "/usr/local/lib/freeDiameter/test_sip.fdx";
614 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Rf.fdx";
615 LoadExtension = "/usr/local/lib/freeDiameter/dict_S6as6d.fdx";
616 LoadExtension = "/usr/local/lib/freeDiameter/dict_S6t.fdx";
617 LoadExtension = "/usr/local/lib/freeDiameter/dict_S6c.fdx";
618
619
620 # Load RFC4072 dictionary objects
621 #LoadExtension = "dict_eap.fdx";
622
623 # Load the Diameter EAP server extension (requires diameap.conf)
624 #LoadExtension = "app_diameap.fdx" : "diameap.conf";
625
626 # Load the Accounting Server extension (requires app_acct.conf)
627 #LoadExtension = "app_acct.fdx" : "app_acct.conf";
628
629 # -------- Peers ---------
630
631 # The framework will actively attempt to establish and maintain a connection
632 # with the peers listed here.
633 # For only accepting incoming connections, see the acl_wl.fx extension.
634
635 #ConnectPeer = "peer1.localdomain" { ConnectTo = "127.0.0.1"; };
636 hss.json: |
637 {"common": {
638 "fdcfg": "conf/hss.conf",
639 "originhost": "HSS_IDENTITY",
640 "originrealm": "HSS_REALM"
641 },
642 "hss": {
643 "gtwhost": "*",
644 "gtwport" : 9080,
645 "restport" : 9081,
646 "casssrv": "CASSANDRA_ADDR",
647 "cassusr": "root",
648 "casspwd": "root",
649 "cassdb" : "vhss",
650 "randv" : true,
651 "optkey" : "63bfa50ee6523365ff14c1f45f88737d",
652 "reloadkey" : true
653 }
654 }
655 launch.sh: |
656 #!/bin/bash
657
658 cd /opt/c3po/hss
659 cp /etc/hss/conf/{acl.conf,hss.json,hss.conf} conf
660
661 HSS_HOST=$(hostname)
662 HSS_DOMAIN=$(dnsdomainname)
663 CASSANDRA_ADDR=${CASSANDRA_ADDR:-localhost}
664
665 # from hss.json
666 sed -i "s/HSS_IDENTITY/$HSS_HOST.$HSS_DOMAIN/g" conf/hss.json
667 sed -i "s/HSS_REALM/$HSS_DOMAIN/g" conf/hss.json
668 sed -i "s/CASSANDRA_ADDR/$CASSANDRA_ADDR/g" conf/hss.json
669
670 # from hss.conf
671 sed -i "s/HSS_IDENTITY/$HSS_HOST.$HSS_DOMAIN/g" conf/hss.conf
672 sed -i "s/HSS_REALM/$HSS_DOMAIN/g" conf/hss.conf
673 sed -i "s/HSS_HOST/$HSS_HOST/g" conf/hss.conf
674
675 # If necessary, calculate the OPc value for each UE (User Equipment).
676 #./bin/hss -j conf/hss.json --onlyloadkey
677
678 cd conf
679 make_certs.sh $(hostname) $(dnsdomainname)
680 cd ..
681
682 # finally, launch
683 hss -j conf/hss.json
684---
685apiVersion: v1
686kind: ConfigMap
687metadata:
Wei-Yu Chen450a98a2019-01-15 16:56:30 -0800688 name: mme
689data:
690 launch.sh: |
691 #!/bin/bash
692
693 cd /opt/c3po/mme/bin
694 cp /etc/mme/conf/{vbsm_cfg.txt,vbfd.conf} .
695
696 # from vbsm_cfg.txt
697 SGW_S11_IP=${SGW_S11_IP:-sgw.localdomain}
698 ENB_S1AP_IP=${ENB_S1AP_IP:-enb1.localdomain}
699 ENB_S1AP_PORT=${ENB_S1AP_PORT:-36412}
700 MME_ETH0_IP=${MME_ETH0_IP:-0.0.0.0}
701
702 # from vbfd.conf
703 CONNECT_PEER=${CONNECT_PEER:-hss.localdomain}
704 HSS_S6A_IP=${HSS_S6A_IP:-hss.localdomain}
705 HSS_PORT=${HSS_PORT:-3868}
706 VAR_HSS_REALM=${VAR_HSS_REALM:-openair4G.eur}
707
708
709 sed -i "s/SGW_S11_IP/$(dig $SGW_S11_IP +short)/g" vbsm_cfg.txt
710 sed -i "s/ENB_S1AP_IP/$ENB_S1AP_IP/g" vbsm_cfg.txt
711 sed -i "s/ENB_S1AP_PORT/$ENB_S1AP_PORT/g" vbsm_cfg.txt
712 sed -i "s/MME_ETH0_IP/$MME_ETH0_IP/g" vbsm_cfg.txt
713 sed -i "s/VAR_HSS_HOST/$CONNECT_PEER/g" vbsm_cfg.txt
714 sed -i "s/VAR_HSS_REALM/$VAR_HSS_REALM/g" vbsm_cfg.txt
715
716
717 MME_HOST=$(hostname)
718 MME_DOMAIN=$(dnsdomainname)
719 sed -i "s/CONNECT_PEER/$CONNECT_PEER/g" vbfd.conf
720 sed -i "s/HSS_S6A_IP/$HSS_S6A_IP/g" vbfd.conf
721 sed -i "s/HSS_PORT/$HSS_PORT/g" vbfd.conf
722 sed -i "s/MME_IDENTITY/$MME_HOST.$MME_DOMAIN/g" vbfd.conf
723 sed -i "s/MME_REALM/$MME_DOMAIN/g" vbfd.conf
724 sed -i "s/MME_HOST/$MME_HOST/g" vbfd.conf
725
726 # generate the certs
727 # ./make_certs.sh mme localdomain
728 ./make_certs.sh $MME_HOST $MME_DOMAIN
729
730
731 # finally, launch
732 ./vb_acc
733 vbfd.conf: |
734 # -------- Test configuration ---------
735
736 # Identity = "<diameter_host>.<diameter_realm>";
737 Identity = "MME_IDENTITY";
738 Realm = "MME_REALM";
739 # Port = 3868;
740 # SecPort = 3869;
741
742 ConnectPeer = "CONNECT_PEER" { ConnectTo = "HSS_S6A_IP"; No_TLS; port = HSS_PORT; };
743
744 # TLS_Cred = "<diameter_host>.cert.pem", "<diameter_host>.key.pem";
745 TLS_Cred = "MME_HOST.cert.pem",
746 "MME_HOST.key.pem";
747 TLS_CA = "cacert.pem";
748
749 LoadExtension = "/usr/local/lib/freeDiameter/dict_3gpp2_avps.fdx";
750 #LoadExtension = "/usr/local/lib/freeDiameter/dict_CreditControl.fdx";
751 #LoadExtension = "/usr/local/lib/freeDiameter/dict_base_rfc6733.fdx";
752 LoadExtension = "/usr/local/lib/freeDiameter/dict_draftload_avps.fdx";
753 LoadExtension = "/usr/local/lib/freeDiameter/dict_etsi283034_avps.fdx";
754 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4004_avps.fdx";
755 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4006bis_avps.fdx";
756 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4072_avps.fdx";
757 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc4590_avps.fdx";
758 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5447_avps.fdx";
759 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5580_avps.fdx";
760 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5777_avps.fdx";
761 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc5778_avps.fdx";
762 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6734_avps.fdx";
763 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc6942_avps.fdx";
764 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7155_avps.fdx";
765 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7683_avps.fdx";
766 LoadExtension = "/usr/local/lib/freeDiameter/dict_rfc7944_avps.fdx";
767 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29061_avps.fdx";
768 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29128_avps.fdx";
769 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29154_avps.fdx";
770 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29173_avps.fdx";
771 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29212_avps.fdx";
772 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29214_avps.fdx";
773 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29215_avps.fdx";
774 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29217_avps.fdx";
775 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29229_avps.fdx";
776 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29272_avps.fdx";
777 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29273_avps.fdx";
778 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29329_avps.fdx";
779 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29336_avps.fdx";
780 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29337_avps.fdx";
781 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29338_avps.fdx";
782 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29343_avps.fdx";
783 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29344_avps.fdx";
784 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29345_avps.fdx";
785 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29368_avps.fdx";
786 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts29468_avps.fdx";
787 LoadExtension = "/usr/local/lib/freeDiameter/dict_ts32299_avps.fdx";
788 #LoadExtension = "/usr/local/lib/freeDiameter/dict_CxDx.fdx";
789 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Gx.fdx";
790 #LoadExtension = "/usr/local/lib/freeDiameter/dict_NAS.fdx";
791 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Rf.fdx";
792 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Ro.fdx";
793 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Rx.fdx";
794 LoadExtension = "/usr/local/lib/freeDiameter/dict_S6as6d.fdx";
795 LoadExtension = "/usr/local/lib/freeDiameter/dict_S6c.fdx";
796 #LoadExtension = "/usr/local/lib/freeDiameter/dict_S6mS6n.fdx";
797 LoadExtension = "/usr/local/lib/freeDiameter/dict_S6t.fdx";
798 #LoadExtension = "/usr/local/lib/freeDiameter/dict_S9.fdx";
799 LoadExtension = "/usr/local/lib/freeDiameter/dict_SGd.fdx";
800 #LoadExtension = "/usr/local/lib/freeDiameter/dict_SLh.fdx";
801 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Sd.fdx";
802 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Sh.fdx";
803 #LoadExtension = "/usr/local/lib/freeDiameter/dict_T4.fdx";
804 LoadExtension = "/usr/local/lib/freeDiameter/dict_T6aT6bT7.fdx";
805 #LoadExtension = "/usr/local/lib/freeDiameter/dict_Tsp.fdx";
806 vbsm_cfg.txt: |
807 # Configuration file for MME
808
809 ##### NOTE: Please Do NOT change the order of the parameters #####
810
811 # EGTP related
812 VBSM_EG_DFLT_PORT 2123 # EGTP Default port
813 VBSM_EG_NONDFLT_PORT 2124 # EGTP Non Default port
814 VBSM_EG_S10_NONDFLT_PORT 2125 # EGTP Non Default
815 VBSM_EG_S3_NONDFLT_PORT 2126 # EGTP Non Default port for S3 interface towards SGSN
816 # port for S10
817 VBSM_EG_DFLT_HOST_NAME "sutlej.ccin.ccpu.com" # EGTP host name
818
819
820 # E-NodeB related
821 VBSM_ENB_ADDR_1 "ENB_S1AP_IP" # IP address of eNodeB
822 VBSM_ENB_PORT_1 "ENB_S1AP_PORT" # eNodeB port
823 #VBSM_ENB_ADDR_2 "172.26.20.180" # IP address of eNodeB
824 #VBSM_ENB_PORT_2 36422 # eNodeB port
825
826 # MME related
827 VBSM_MME_IPADDR "MME_ETH0_IP" # MME IP address
828 VBSM_MME_S1AP_IPADDR "MME_ETH0_IP" # MME IP address associated with the S1AP interface
829 VBSM_MME_EGTP_IPADDR "MME_ETH0_IP" # MME IP address associated with the EGTP interface
830 VBSM_MME_SCTP_PORT {{ .Values.mme.ports.s1ap }} # MME SCTP port
831
832 VBSM_SGW_IPADDR "SGW_S11_IP" # SGW IP address
833 VBSM_PGW_IPADDR "192.168.1.105" # PDN-GW IP address
834
835 VBSM_UE_NUM 1000 # Support 1000 UE's
836 VBSM_SCTP_UDP_SERV_TYPE 0 #service type,default 0 SCTP
837
838 # Debug mask to be set; each represent
839 #different debug masks to be set (1 and 0 to unset)
840 #in the form |LVB_DBGMASK_INFO|LVB_DBGMASK_ERROR|LVB_DBGMASK_TRC|LVB_DBGMASK_MEM
841
842 VBSM_MME_DBG_MASK 1111
843 VBSM_DBG_MASK 1111
844 VBSM_NW_INIATED_DETACH_TIMER 1000
845
846 VBSM_MCC_DIG1 3
847 VBSM_MCC_DIG2 0
848 VBSM_MCC_DIG3 2
849
850 VBSM_MNC_DIG1 7
851 VBSM_MNC_DIG2 2
852 VBSM_MNC_DIG3 0
853
854 # Target PLMN ID format [ MCC + MNC], + is concatination operator
855 # If MNC has two digits, the last charater shall be 'f'
856 # Valid Configurations: 11223f, 112345.
857 VBSM_TARGET_MME_PLMN_ID 31310f
858 VBSM_TARGET_MME_IP_ADDR "192.25.1.100"
859
Pingping Lin79f84702019-02-05 18:38:40 -0800860 VBSM_T3412 0
Wei-Yu Chen450a98a2019-01-15 16:56:30 -0800861
862 VBSM_SGSN_IP_ADDR "192.25.1.195"
863
864
865 VBSM_SGSN_PLMN_ID 31311f
866
867 VBSM_FD_CFG "vbfd.conf"
868 VBSM_HSS_HOST "VAR_HSS_HOST"
869 VBSM_HSS_REALM "VAR_HSS_REALM"
870
871 # set VBSM_DISABLE_EPC_DNS 0 - enable DNS, 1 - disable DNS
872 VBSM_DISABLE_EPC_DNS 1
873 VBSM_DISABLE_EIA0 1
874 VBSM_REL_CAP 1
875 VBSM_MME_NAME "vmmestandalone"
876 VBSM_S1C_SCTP_INSTREAMS 10
877 VBSM_S1C_SCTP_OUTSTREAMS 10
878 VBSM_MAX_ENB 2
879 VBSM_NO_OFGUMMEIS 1
880 VBSM_MMECODE 1
881 VBSM_MMEGRPID 1
882 VBSM_NO_OF_TAI 1
883 VBSM_TAI_LIST {{"{{ 1,2,0,8,0,1,1 }}"}}
884
885 VBSM_SMS_ROUTER_HOST "smsrouter.test3gpp.net"
886 VBSM_SMS_ROUTER_REALM "test3gpp.net"