|
|
To be updated |
|
|
\ No newline at end of file |
|
|
# SPGW-U Installation
|
|
|
|
|
|
Tested and validated on Ubuntu Bionic arch amd64.
|
|
|
|
|
|
## Download OAI SPGW-U source code
|
|
|
|
|
|
```
|
|
|
ubuntu@test-spgwu:~$ git clone https://github.com/OPENAIRINTERFACE/openair-spgwu-tiny.git -b gtp_extension_header
|
|
|
```
|
|
|
|
|
|
## Install SPGW-U
|
|
|
|
|
|
### Install SPGW-U software dependencies
|
|
|
|
|
|
```
|
|
|
ubuntu@test-spgwu:~$ cd openair-spgwu-tiny/
|
|
|
ubuntu@test-spgwu:~/openair-spgwu-tiny$ cd ./build/scripts
|
|
|
ubuntu@test-spgwu:~/openair-spgwu-tiny/build/scripts$ ./build_spgwu -I -f
|
|
|
```
|
|
|
|
|
|
### Build SPGW-U
|
|
|
|
|
|
As a starting point, you can start with a Debug build, then you can change the build type
|
|
|
Check build types with `./build_spgwu -h`
|
|
|
|
|
|
```
|
|
|
ubuntu@test-spgwu:~/openair-spgwu-tiny/build/scripts$ ./build_spgwu -c -V -b Debug -j
|
|
|
```
|
|
|
|
|
|
## SPGW-U Configuration
|
|
|
|
|
|
|
|
|
**Create SPGW-U configuration files**
|
|
|
|
|
|
|
|
|
```
|
|
|
# prompt has been removed for easier Ctrl+C Ctrl+V
|
|
|
# please update the following information according to your configuration
|
|
|
|
|
|
INSTANCE=1
|
|
|
PREFIX='/usr/local/etc/oai'
|
|
|
sudo mkdir -m 0777 -p $PREFIX
|
|
|
cp ../../etc/spgwu.conf $PREFIX
|
|
|
|
|
|
declare -A SPGWU_CONF
|
|
|
|
|
|
SPGWU_CONF[@INSTANCE@]=$INSTANCE
|
|
|
SPGWU_CONF[@PREFIX@]=$PREFIX
|
|
|
SPGWU_CONF[@PID_DIRECTORY@]='/var/run'
|
|
|
|
|
|
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP@]='eth0'
|
|
|
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_SX@]='eth0'
|
|
|
SPGWU_CONF[@PGW_INTERFACE_NAME_FOR_SGI@]='eth0'
|
|
|
|
|
|
SPGWU_CONF[@NETWORK_UE_IP@]='12.1.1.0/24'
|
|
|
SPGWU_CONF[@NETWORK_UE_NAT_OPTION@]='yes'
|
|
|
|
|
|
SPGWC0_IP_ADDRESS
|
|
|
NRF_IPV4_ADDRESS
|
|
|
|
|
|
|
|
|
|
|
|
SMF_CONF[@SMF_INTERFACE_PORT_FOR_SBI@]='80'
|
|
|
SMF_CONF[@SMF_INTERFACE_HTTP2_PORT_FOR_SBI@]='9090'
|
|
|
SMF_CONF[@SMF_API_VERSION@]='v1'
|
|
|
|
|
|
SMF_CONF[@UDM_IPV4_ADDRESS@]='172.16.1.103'
|
|
|
SMF_CONF[@UDM_PORT@]='80'
|
|
|
SMF_CONF[@UDM_API_VERSION@]='v2'
|
|
|
|
|
|
SMF_CONF[@AMF_IPV4_ADDRESS@]='192.168.122.183'
|
|
|
SMF_CONF[@AMF_PORT@]='80'
|
|
|
SMF_CONF[@AMF_API_VERSION@]='v1'
|
|
|
|
|
|
SMF_CONF[@UPF_IPV4_ADDRESS@]='192.168.122.151'
|
|
|
|
|
|
SMF_CONF[@NRF_IPV4_ADDRESS@]='192.168.1.23'
|
|
|
SMF_CONF[@NRF_PORT@]='8080'
|
|
|
SMF_CONF[@NRF_API_VERSION@]='v1'
|
|
|
|
|
|
SMF_CONF[@DEFAULT_DNS_IPV4_ADDRESS@]='8.8.8.8'
|
|
|
SMF_CONF[@DEFAULT_DNS_SEC_IPV4_ADDRESS@]='4.4.4.4'
|
|
|
|
|
|
for K in "${!SMF_CONF[@]}"; do
|
|
|
egrep -lRZ "$K" $PREFIX | xargs -0 -l sed -i -e "s|$K|${SMF_CONF[$K]}|g"
|
|
|
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${SMF_CONF[$K]}"
|
|
|
done
|
|
|
|
|
|
```
|
|
|
|
|
|
Then execute the following command to generate the corresponding configuration file for SMF (`/usr/local/etc/oai/smf.conf`):
|
|
|
```
|
|
|
ubuntu@test-smf:~/oai-cn5g-smf/build/scripts$ ./smf_conf.sh
|
|
|
```
|
|
|
|
|
|
**An example for the configuration file**
|
|
|
|
|
|
More detailed explanation for the SMF configuration is available in the section [SMF configuration](smf_configuration)
|
|
|
|
|
|
# Launch SMF
|
|
|
|
|
|
After that, you can launch SMF by executing the following command
|
|
|
```
|
|
|
ubuntu@test-smf:~/oai-cn5g-smf/build/scripts$ sudo smf -c /usr/local/etc/oai/smf.conf -o
|
|
|
```
|
|
|
|