Commit 66d503dc authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen
Browse files

add scripts for configuring interface for SMF/UPF

parent 89d1be31
# prompt has been removed for easier Ctrl+C Ctrl+V
sudo ifconfig eno1:sxc 172.55.55.101 up # SPGW-C SXab interface
sudo ifconfig eno1:s5c 172.58.58.102 up # SGW-C S5S8 interface
sudo ifconfig eno1:p5c 172.58.58.101 up # PGW-C S5S8 interface
sudo ifconfig eno1:s11 172.16.1.104 up # SGW-C S11 interface
INSTANCE=1
PREFIX='/usr/local/etc/oai'
sudo mkdir -m 0777 -p $PREFIX
cp ../../etc/spgw_c.conf $PREFIX
declare -A SPGWC_CONF
SPGWC_CONF[@INSTANCE@]=$INSTANCE
SPGWC_CONF[@PREFIX@]=$PREFIX
SPGWC_CONF[@PID_DIRECTORY@]='/var/run'
SPGWC_CONF[@SGW_INTERFACE_NAME_FOR_S11@]='eno1:s11'
SPGWC_CONF[@SGW_INTERFACE_NAME_FOR_S5_S8_CP@]='eno1:s5c'
SPGWC_CONF[@PGW_INTERFACE_NAME_FOR_S5_S8_CP@]='eno1:p5c'
SPGWC_CONF[@PGW_INTERFACE_NAME_FOR_SX@]='eno1:sxc'
SPGWC_CONF[@DEFAULT_DNS_IPV4_ADDRESS@]='8.8.8.8'
SPGWC_CONF[@DEFAULT_DNS_SEC_IPV4_ADDRESS@]='4.4.4.4'
for K in "${!SPGWC_CONF[@]}"; do
egrep -lRZ "$K" $PREFIX | xargs -0 -l sed -i -e "s|$K|${SPGWC_CONF[$K]}|g"
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${SPGWC_CONF[$K]}"
done
# prompt has been removed for easier Ctrl+C Ctrl+V
sudo ifconfig eno1:sxu 172.55.55.102 up # SPGW-U SXab interface
sudo ifconfig eno1:s1u 192.168.248.159 up # SPGW-U S1U interface
INSTANCE=1
PREFIX='/usr/local/etc/oai'
sudo mkdir -m 0777 -p $PREFIX
cp ../../etc/spgw_u.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@]='eno1:s1u'
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_SX@]='eno1:sxu'
SPGWU_CONF[@SGW_INTERFACE_NAME_FOR_SGI@]='eno1'
for K in "${!SPGWU_CONF[@]}"; do
egrep -lRZ "$K" $PREFIX | xargs -0 -l sed -i -e "s|$K|${SPGWU_CONF[$K]}|g"
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${SPGWU_CONF[$K]}"
done
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