Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Commit

Permalink
slicing 01 run success.
Browse files Browse the repository at this point in the history
  • Loading branch information
niloysh committed May 8, 2021
1 parent 4a7a201 commit 020331e
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 17 deletions.
7 changes: 0 additions & 7 deletions slicing_01/config/smf1cfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ configuration:
- dnn: network1 # Data Network Name
dns: # the IP address of DNS
ipv4: 8.8.8.8
- sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information)
sst: 1 # Slice/Service Type (uinteger, range: 0~255)
sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
dnnInfos: # DNN information list
- dnn: network2 # Data Network Name
dns: # the IP address of DNS
ipv4: 8.8.8.8
pfcp: # the IP address of N4 interface on this SMF (PFCP)
addr: 127.0.0.51
userplane_information: # list of userplane information
Expand Down
7 changes: 0 additions & 7 deletions slicing_01/config/smf2cfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ configuration:
- nsmf-event-exposure # Nsmf_EventExposure service
- nsmf-oam # OAM service
snssaiInfos: # the S-NSSAI (Single Network Slice Selection Assistance Information) list supported by this AMF
- sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information)
sst: 1 # Slice/Service Type (uinteger, range: 0~255)
sd: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
dnnInfos: # DNN information list
- dnn: network1 # Data Network Name
dns: # the IP address of DNS
ipv4: 8.8.8.8
- sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information)
sst: 1 # Slice/Service Type (uinteger, range: 0~255)
sd: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF)
Expand Down
2 changes: 2 additions & 0 deletions slicing_01/scripts/clear_nfinfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
db.urilist.remove({})
db.NfProfile.remove({})
3 changes: 3 additions & 0 deletions slicing_01/scripts/clear_nfinfo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo "Clearing NF information from mongodb"
mongo free5gc clear_nfinfo.js
9 changes: 6 additions & 3 deletions slicing_01/scripts/run_5gc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ for NF in ${NF_LIST_1}; do
sleep 0.1
done

# ./bin/smf -smfcfg "${CONF_DIR}/smf1cfg.yaml" &
# PID_LIST+=($!)
# sleep 1
./bin/smf -smfcfg "${CONF_DIR}/smf1cfg.yaml" &
PID_LIST+=($!)
sleep 1

./bin/smf -smfcfg "${CONF_DIR}/smf2cfg.yaml" &
PID_LIST+=($!)
Expand All @@ -38,6 +38,9 @@ function terminate()
{
sudo kill -SIGTERM ${PID_LIST[${#PID_LIST[@]}-2]} ${PID_LIST[${#PID_LIST[@]}-1]}
sleep 2
# clear mongodb
cd ${HOME}/5gc-config/slicing_01/scripts
./clear_nfinfo.sh
}

trap terminate SIGINT
Expand Down
84 changes: 84 additions & 0 deletions slicing_01/smf_nfprofile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
MongoDB shell version v3.6.8
connecting to: mongodb://127.0.0.1:27017/free5gc
Implicit session: session { "id" : UUID("323459e9-a142-42f0-923f-c9db686ff4ca") }
MongoDB server version: 3.6.8
{
"_id" : ObjectId("6093db98e039b61ed3703022"),
"plmnList" : [
{
"mcc" : "208",
"mnc" : "93"
}
],
"sNssais" : [
{
"sst" : 1,
"sd" : "010203"
}
],
"ipv4Addresses" : [
"127.0.0.61"
],
"smfInfo" : {
"sNssaiSmfInfoList" : [
{
"sNssai" : {
"sst" : 1,
"sd" : "010203"
},
"dnnSmfInfoList" : [
{
"dnn" : "network1"
}
]
}
]
},
"nfServices" : [
{
"apiPrefix" : "http://127.0.0.61:8000",
"serviceInstanceId" : "5eef344c-65fa-40fe-8569-5a599fc654b5nsmf-pdusession",
"serviceName" : "nsmf-pdusession",
"versions" : [
{
"apiVersionInUri" : "v1",
"apiFullVersion" : "https://127.0.0.61:8000/nsmf-pdusession/v1",
"expiry" : "2021-05-06T12:05:44.644693117Z"
}
],
"scheme" : "https",
"nfServiceStatus" : "REGISTERED"
},
{
"scheme" : "https",
"nfServiceStatus" : "REGISTERED",
"apiPrefix" : "http://127.0.0.61:8000",
"serviceInstanceId" : "5eef344c-65fa-40fe-8569-5a599fc654b5nsmf-event-exposure",
"serviceName" : "nsmf-event-exposure",
"versions" : [
{
"apiVersionInUri" : "v1",
"apiFullVersion" : "https://127.0.0.61:8000/nsmf-pdusession/v1",
"expiry" : "2021-05-06T12:05:44.644693117Z"
}
]
},
{
"serviceInstanceId" : "5eef344c-65fa-40fe-8569-5a599fc654b5nsmf-oam",
"serviceName" : "nsmf-oam",
"versions" : [
{
"apiFullVersion" : "https://127.0.0.61:8000/nsmf-pdusession/v1",
"expiry" : "2021-05-06T12:05:44.644693117Z",
"apiVersionInUri" : "v1"
}
],
"scheme" : "https",
"nfServiceStatus" : "REGISTERED",
"apiPrefix" : "http://127.0.0.61:8000"
}
],
"nfInstanceId" : "5eef344c-65fa-40fe-8569-5a599fc654b5",
"nfType" : "SMF",
"nfStatus" : "REGISTERED"
}

0 comments on commit 020331e

Please sign in to comment.