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