Commit 853137b4 authored by foo's avatar foo
Browse files

bench test added

parent 7a74b991
<?xml version="1.0" encoding="UTF-8"?>
<dst:devsol xmlns:dst="http://www.developingsolutions.com/schema/dsTest" test_name="Local Library/upf_test_multiple_ue.dsx">
<!-- XML generated by dsClientv5.5.20201109 on 02/24/2021 11:11:24 using dsTest schema v5.5.20210117 -->
<config>
<nodes>
<spr name="spr_gnb">
<auto_start>true</auto_start>
<subscriber_database count="2" name="gnb_subs">
<subscriber_profiles>
<access_profile name="access_profile">
<new_radio_128_nea0_encryption>true</new_radio_128_nea0_encryption>
<new_radio_128_nia1_integrity>true</new_radio_128_nia1_integrity>
<requested_nssai>
<s_nssai>
<sst>222</sst>
<sd>123</sd>
</s_nssai>
<s_nssai>
<sst>75</sst>
<sd>2</sd>
</s_nssai>
</requested_nssai>
<ssc_mode>1</ssc_mode>
</access_profile>
<subscription_profile name="subscription_profile">
<pdu_config>
<context_id>34</context_id>
<type>IPv4</type>
<dnn>default</dnn>
<s_nssai>
<sst>222</sst>
<sd>123</sd>
</s_nssai>
<up_transport_address>172.10.5.1</up_transport_address>
</pdu_config>
</subscription_profile>
<user_data_profile name="user_data_profile_1">
<delay>500</delay>
<basic_data name="basic_data">
<dest_ip>8.8.8.8</dest_ip>
<protocol>UDP</protocol>
<dport>5001</dport>
<sport>5001</sport>
<size>1024</size>
<rate>10</rate>
<auto_start>true</auto_start>
<auto_stop>5000</auto_stop>
</basic_data>
</user_data_profile>
<SmartProfile name="SmartProfile">
<SmartEvents>
<states>
<state start_point="133.6,81.6" width="100.0" height="60.0">idle</state>
<state start_point="366.1,81.6" width="100.0" height="60.0">pdu_setup</state>
<state start_point="510.1,193.6" width="100.0" height="60.0">pdu_delete</state>
<state start_point="381.6,337.6" width="100.0" height="60.0">detach</state>
<state start_point="157.6,341.6" width="100.0" height="60.0">ending</state>
</states>
<event_handlers>
<event_handler start_point="144.1,82.1" end_point="224.1,82.1" height="-68">
<current_state>idle</current_state>
<transaction_start/>
<action>
<app>n2</app>
<event>registration</event>
<node>gnb_1</node>
</action>
</event_handler>
<event_handler start_point="234.1,112.1" end_point="366.6,112.1" height="-92">
<current_state>idle</current_state>
<event_received app="n2" event="registration"/>
<next_state>pdu_setup</next_state>
<timer>2000</timer>
</event_handler>
<event_handler start_point="376.6,82.1" end_point="456.6,82.1" height="-92">
<current_state>pdu_setup</current_state>
<timeout/>
<action>
<app>n2</app>
<event>pdu_session_establish</event>
<node>gnb_1</node>
<dnn>carrier.com</dnn>
</action>
</event_handler>
<event_handler start_point="466.6,112.1" end_point="560.6,194.1" height="-72">
<current_state>pdu_setup</current_state>
<event_received app="n2" event="pdu_session_establish"/>
<next_state>pdu_delete</next_state>
<timer>500000000</timer>
</event_handler>
<event_handler start_point="610.6,204.1" end_point="610.6,244.1" height="68">
<current_state>pdu_delete</current_state>
<timeout/>
<action>
<app>n2</app>
<event>pdu_session_release</event>
<node>gnb_1</node>
<dnn>default</dnn>
</action>
</event_handler>
<event_handler start_point="560.6,254.1" end_point="482.1,368.1" height="-92">
<current_state>pdu_delete</current_state>
<event_received app="n2" event="pdu_session_release"/>
<next_state>detach</next_state>
<timer>2000</timer>
</event_handler>
<event_handler start_point="382.1,368.1" end_point="258.1,372.1" height="-68">
<current_state>detach</current_state>
<timeout/>
<action>
<app>n2</app>
<event>deregistration</event>
<node>gnb_1</node>
</action>
<next_state>ending</next_state>
</event_handler>
<event_handler start_point="208.1,342.1" end_point="184.1,142.1" height="-52">
<current_state>ending</current_state>
<event_received app="n2" event="deregistration"/>
<transaction_complete/>
</event_handler>
<event_handler start_point="109.4,279.0" end_point="134.1,132.1" height="-72">
<current_state>ANY</current_state>
<error/>
<transaction_failed/>
</event_handler>
</event_handlers>
</SmartEvents>
</SmartProfile>
</subscriber_profiles>
<subscriber_group start="1" end="2" name="subscriber_group">
<group_profiles>
<access_profile>access_profile</access_profile>
<subscription_profile>subscription_profile</subscription_profile>
<user_data_profile>user_data_profile_1</user_data_profile>
<SmartProfile>SmartProfile</SmartProfile>
</group_profiles>
<identities>
<imsi>208950000000031</imsi>
<imei>55000000000001</imei>
<key>0x0C0A34601D4F07677303652C0462535B</key>
<opc>0x63bfa50ee6523365ff14c1f45f88737d</opc>
</identities>
<dynamic_information>
<sqn>0x40</sqn>
<vplmn>431-265</vplmn>
<cell_id>1485</cell_id>
</dynamic_information>
</subscriber_group>
</subscriber_database>
</spr>
<gnb name="gnb_1">
<auto_start>true</auto_start>
<n2>
<interface name="interface_1" native="true">
<sctp>
<ip_address>192.168.61.193</ip_address>
<dest_ip_address>192.168.61.195</dest_ip_address>
</sctp>
<user_socket>
<ip_address>192.168.61.193</ip_address>
</user_socket>
</interface>
<user_data>
<basic_data name="basic_data"/>
</user_data>
</n2>
<mcc>208</mcc>
<mnc>95</mnc>
<node_name>gnb-1</node_name>
<global_gnb_id>1048575</global_gnb_id>
<default_paging_drx>v32</default_paging_drx>
<supported_ta>
<tac>0xa000</tac>
<bplmn>
<mcc>208</mcc>
<mnc>95</mnc>
<slice_support_item>
<nssai_sst>222</nssai_sst>
<nssai_sd>123</nssai_sd>
</slice_support_item>
<slice_support_item>
<nssai_sst>0x27</nssai_sst>
<nssai_sd>0x385382</nssai_sd>
</slice_support_item>
</bplmn>
<bplmn>
<mcc>207</mcc>
<mnc>54</mnc>
<slice_support_item>
<nssai_sst>0x10</nssai_sst>
<nssai_sd>0x583922</nssai_sd>
</slice_support_item>
</bplmn>
</supported_ta>
<supported_ta>
<tac>0xa001</tac>
<bplmn>
<mcc>202</mcc>
<mnc>100</mnc>
<slice_support_item>
<nssai_sst>0x23</nssai_sst>
<nssai_sd>0x321236</nssai_sd>
</slice_support_item>
</bplmn>
<bplmn>
<mcc>203</mcc>
<mnc>001</mnc>
<slice_support_item>
<nssai_sst>0xFF</nssai_sst>
<nssai_sd>0x123483</nssai_sd>
</slice_support_item>
</bplmn>
</supported_ta>
<subscriber_database name="gnb_subs"/>
</gnb>
</nodes>
</config>
<command>
<wait>1000</wait>
</command>
<command>
<spr name="spr_gnb">
<action>
<rate>1</rate>
<cycle>1</cycle>
<start>1</start>
<end>2</end>
<ready>gnb_1</ready>
<app>SmartEvents</app>
<event>start</event>
</action>
</spr>
</command>
</dst:devsol>
version: '3.8'
services:
mysql:
container_name: vpptest-mysql
image: mysql:5.7
volumes:
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
- ./mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
environment:
- TZ=Europe/Paris
- MYSQL_DATABASE=oai_db
- MYSQL_USER=test
- MYSQL_PASSWORD=test
- MYSQL_ROOT_PASSWORD=linux
healthcheck:
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
interval: 10s
timeout: 5s
retries: 5
networks:
macvlan_net:
ipv4_address: 192.168.74.200
oai-smf:
image: oai-smf:vpp-upf
container_name: vpptest-oai-smf
privileged: true
networks:
macvlan_net:
ipv4_address: 192.168.74.196
environment:
INSTANCE: 1
PID_DIRECTORY: /var/run
SMF_INTERFACE_NAME_FOR_N4: eth0
SMF_INTERFACE_NAME_FOR_SBI: eth0
SMF_INTERFACE_PORT_FOR_SBI: 80
SMF_INTERFACE_HTTP2_PORT_FOR_SBI: 8080
SMF_API_VERSION: v1
DEFAULT_DNS_IPV4_ADDRESS: 8.8.8.8
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
UE_IP_ADDRESS_POOL: '10.1.1.2 - 10.1.1.200'
AMF_IPV4_ADDRESS: 192.168.74.195
AMF_PORT: 80
AMF_API_VERSION: v1
UDM_IPV4_ADDRESS: 192.168.74.194
UDM_PORT: 80
UDM_API_VERSION: v1
UPF_IPV4_ADDRESS: 192.168.74.202
USE_NETWORK_INSTANCE: 'yes'
DISCOVER_UPF: 'no'
NRF_API_VERSION: 'v1'
NRF_IPV4_ADDRESS: '127.0.0.1'
NRF_PORT: '8080'
REGISTER_NRF: 'no'
healthcheck:
test: /bin/bash -c "pgrep oai_smf"
interval: 10s
timeout: 5s
retries: 5
extra_hosts:
- "gw1.vppupf.node.5gcn.mnc95.mcc208.3gppnetwork.org:192.168.74.202"
oai-amf:
image: oai-amf:develop
container_name: vpptest-oai-amf
privileged: true
networks:
macvlan_net:
ipv4_address: 192.168.74.195
environment:
INSTANCE: 1
PID_DIRECTORY: /var/run
MCC: '208'
MNC: '95'
REGION_ID: '128'
AMF_SET_ID: 1
SERVED_GUAMI_MCC_0: '208'
SERVED_GUAMI_MCC_1: '460'
SERVED_GUAMI_MNC_0: '95'
SERVED_GUAMI_MNC_1: '11'
SERVED_GUAMI_REGION_ID_0: '95'
SERVED_GUAMI_REGION_ID_1: '11'
SERVED_GUAMI_AMF_SET_ID_0: '1'
SERVED_GUAMI_AMF_SET_ID_1: '1'
PLMN_SUPPORT_MCC: '208'
PLMN_SUPPORT_MNC: '95'
PLMN_SUPPORT_TAC: '0xa000'
SST_0: '222'
SST_1: '1'
SD_0: '123'
SD_1: '12'
SMF_SELECTION: 'no'
SMF_INSTANCE_ID_0: 1
SMF_INSTANCE_ID_1: 2
SMF_IPV4_ADDR_0: 192.168.74.196
SMF_IPV4_ADDR_1: 127.0.0.1
SMF_HTTP_VERSION_0: v1
SMF_HTTP_VERSION_1: v1
AMF_INTERFACE_NAME_FOR_NGAP: eth0
AMF_INTERFACE_NAME_FOR_N11: eth0
AUSF_IPV4_ADDRESS: 192.168.74.205
AUSF_API_VERSION: 'v1'
AUSF_PORT: 80
NRF_IPV4_ADDRESS: 192.168.74.206
NRF_API_VERSION: 'v1'
NRF_PORT: 80
MYSQL_SERVER: 192.168.74.200
MYSQL_USER: 'root'
MYSQL_PASS: 'linux'
MYSQL_DB: 'oai_db'
OPERATOR_KEY: '63bfa50ee6523365ff14c1f45f88737d'
NF_REGISTRATION: 'no'
healthcheck:
test: /bin/bash -c "pgrep oai_smf"
interval: 10s
timeout: 5s
retries: 5
oai-vpp:
image: vpp-upg:latest
privileged: true
container_name: vpptest-oai-vpp-upf
networks:
macvlan_net:
ipv4_address: 192.168.75.197
macvlan_net:
ipv4_address: 192.168.74.197
macvlan_net:
ipv4_address: 192.168.76.197
environment:
NWI_CORE : "core.oai"
NWI_ACCESS : "access.oai"
NWI_SGI : "sgi.oai"
# NWI_SGI_SEC: "sgi.secondary.oai" # To Do - Traffic sterring or traffic redirection or I-UPF (N9)
GW_ID: "1"
MNC03: "95"
MCC : "208"
REALM: "3gppnetwork.org"
NETWORK_UE_IP: "12.1.1.0/24"
N3_IPV4_ADDRESS_REMOTE: "192.168.75.198"
N3_IPV4_ADDRESS_LOCAL : "192.168.75.202"
N4_IPV4_ADDRESS_REMOTE: "192.168.74.196"
N4_IPV4_ADDRESS_LOCAL : "192.168.74.202"
N6_IPV4_ADDRESS_REMOTE: "192.168.76.205"
N6_IPV4_ADDRESS_LOCAL : "192.168.76.202"
VPP_MAIN_CORE : 0
VPP_CORE_WORKER: 1
oai-spgwu:
image: oai-spgwu-tiny:gtp_ext_header
privileged: true
container_name: oai-spgwu
networks:
macvlan_net:
ipv4_address: 192.168.74.199
environment:
INSTANCE: 1
PID_DIRECTORY: /var/run
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP: "eth0"
SGW_INTERFACE_NAME_FOR_SX: "eth0"
PGW_INTERFACE_NAME_FOR_SGI: "eth0"
SPGWC0_IP_ADDRESS: "192.168.74.196"
NETWORK_UE_IP: "10.1.1.0/24"
NETWORK_UE_NAT_OPTION: "yes"
NRF_IPV4_ADDRESS: "192.168.1.23"
NRF_PORT: "8080"
NRF_API_VERSION: "v1"
GW_ID: "1"
MNC03: "95"
MCC: "208"
REALM: "3gppnetwork.org"
THREAD_S1U_PRIO: "64"
S1U_THREADS: "16"
THREAD_SX_PRIO: "64"
SX_THREADS: "1"
THREAD_SGI_PRIO: "64"
SGI_THREADS: "16"
GTP_EXTENSION_HEADER_PRESENT: "no"
BYPASS_UL_PFCP_RULES: "no"
oai-nat:
image: ubuntu:bionic
privileged: true
container_name: vpptest-oai-nat
networks:
macvlan_net:
ipv4_address: 192.168.74.205
macvlan_net:
ipv4_address: 192.168.76.205
entrypoint: /bin/bash -c \
"apt update; apt install -y iptables iproute2 iputils-ping net-tools python iperf3;"\
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
"ip route add 10.1.1.0/24 via 192.168.74.199 dev eth0;"\
"ip route add 12.1.1.0/24 via 192.168.76.201 dev eth1; sleep infinity"
gnbsim:
image: gnbsim:latest
privileged: true
container_name: vpptest-gnbsim
environment:
MCC: 208
MNC: 95
GNBID: 1
TAC: '0x00a000'
SST: '222'
SD: '010203'
SD_UE_PARAM: '00007b'
PagingDRX: 'v32'
RANUENGAPID: 0
IMEISV: '35609204079514'
MSIN: '0000000031'
RoutingIndicator: 1234
ProtectionScheme: 'null'
KEY: '0C0A34601D4F07677303652C0462535B'
OPc: '63bfa50ee6523365ff14c1f45f88737d'
DNN: 'default'
URL: 'http://192.168.76.205:8000'
NRCellID: 1
NGAPPeerAddr: '192.168.74.195'
GTPuLocalAddr: '192.168.75.198'
GTPuIFname: 'eth0'
networks:
macvlan_net:
ipv4_address: 192.168.74.198
macvlan_net:
ipv4_address: 192.168.75.198
volumes:
- ./lib/modules/4.15.0-76-generic/kernel/drivers/net/gtp.ko:/lib/modules/5.8.0-43-generic/kernel/drivers/net/gtp.ko
networks:
# public_net:
# name: oai-public-net
# ipam:
# config:
# - subnet: 192.168.74.0/24
# public_net_access:
# name: oai-public-access
# ipam:
# config:
# - subnet: 192.168.75.0/24
# public_net_sgi_lan:
# name: oai-public-sgi-lan
# ipam:
# config:
# - subnet: 192.168.76.0/24
macvlan_net:
external:
name: oairohan
#!/bin/bash
set -eo pipefail
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
exit 0
fi
host="$(hostname --ip-address || echo '127.0.0.1')"
user="${MYSQL_USER:-root}"
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
args=(
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
-h"$host"
-u"$user"
--silent
)
STATUS=0
if command -v mysqladmin &> /dev/null; then
if mysqladmin "${args[@]}" ping > /dev/null; then
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
if [[ -z $database_check ]]; then
echo "Healthcheck error: oai_db not populated"
STATUS=1
fi
STATUS=0
else
echo "Healthcheck error: Mysql port inactive"
STATUS=1
fi
else
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM users;")
if [[ -z $database_check ]]; then
echo "Healthcheck error: oai_db not populated"
STATUS=1
fi
STATUS=0
else
echo "Healthcheck error: Mysql port inactive"
STATUS=1
fi
fi
exit $STATUS
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment