Commit e90b9e1f authored by Lionel Gauthier's avatar Lionel Gauthier

testbench with distincts 2 hosts (1UE 1 eNB) with ethernet emulation execution mode of oaisim

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4595 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent c5a3b8a9
......@@ -5,18 +5,17 @@ THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/env_802dot21.bash
###########################################################
cd $OPENAIR_TARGETS/SIMU/USER
###############################
# COMPILE oaisim
###############################
echo_success "\n###############################"
echo_success "# Check installed utils and libs"
echo_success "###############################"
test_command_install_package "gccxml" "gccxml" "--force-yes"
test_command_install_package "iptables" "iptables"
test_command_install_package "ip" "iproute"
test_install_package "openssl"
test_install_package "libblas-dev"
# for itti analyser
test_install_package "libgtk-3-dev"
test_install_package "libxml2"
test_install_package "libxml2-dev"
test_install_package "libforms-bin" "--force-yes"
......@@ -29,67 +28,54 @@ test_install_package linux-headers-`uname -r`
test_install_asn1c_4_rrc_cellular
#make clean > /dev/null
#make cleancell >/dev/null
echo_success "Executing: make oaisim NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 Rel10=1 -j`grep -c ^processor /proc/cpuinfo `"
cd $OPENAIR_TARGETS/SIMU/USER
make oaisim NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 Rel10=1 -j`grep -c ^processor /proc/cpuinfo `
if [[ $? -eq 2 ]] ; then
exit 1
fi
###############################
# COMPILE LTE_RAL_UE
###############################
echo_success "Compiling Radio Access Layer UE (RAL)"
cd $OPENAIR3_DIR/RAL-LTE/LTE_RAL_UE
make all
###############################
# COMPILE LTE_RAL_ENB
###############################
echo_success "Compiling Radio Access Layer eNB (RAL)"
cd $OPENAIR3_DIR/RAL-LTE/LTE_RAL_ENB
make all
###############################
# COMPILE rrm_std_cellular
###############################
echo_success "Compiling RRM"
echo_success "\n###############################"
echo_success "# COMPILE oaisim"
echo_success "###############################"
cd $OPENAIR_TARGETS/SIMU/USER
make rrm_std_cellular
#make clean > /dev/null
#make cleancell >/dev/null
echo_success "Executing: make oaisim NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 USER_MODE=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 Rel10=1 -j`grep -c ^processor /proc/cpuinfo `"
make oaisim NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 USER_MODE=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 Rel10=1 -j`grep -c ^processor /proc/cpuinfo `
#make oaisim NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 USER_MODE=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 Rel10=1
if [[ $? -eq 2 ]] ; then
exit 1
fi
###############################
# COMPILE IP kernel drivers
###############################
echo_success "\n###############################"
echo_success "# COMPILE IP kernel drivers"
echo_success "###############################"
echo_success "Compiling IP Drivers"
cd $OPENAIR2_DIR
make naslite_netlink_ether.ko
cd $OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/
make
###############################
# COMPILE MIH-F
###############################
echo_success "\n###############################"
echo_success "# COMPILE MIH-F"
echo_success "###############################"
cd $ODTONE_ROOT
b2 --boost-root=$BOOST_ROOT
###############################
# COMPILE MIH-USER
###############################
echo_success "\n###############################"
echo_success "# COMPILE MIH-USER"
echo_success "###############################"
cd $ODTONE_ROOT/app/lte_test_user/
b2 --boost-root=$BOOST_ROOT linkflags=-lrt
echo_success "\n###############################"
echo_success "# COMPILE ITTI ANALYSER"
echo_success "###############################"
cd $OPENAIR_HOME/common/utils/itti_analyzer
if [ ! -f $OPENAIR_HOME/common/utils/itti_analyzer/Makefile ]
then
./configure
fi
make install
#!/bin/bash
# +-----------+ +------+ +-----------+
# | eNB +------+ | ovs | VLAN 1+------+ MME |
# | |cpenb0+------------------+cpmme0| |
# | +------+ |bridge| +------+ |
# | |upenb0+-------+ | | |
# +-----------+------+ | | | +-----------+
# +---|--+ |
# | +-----------+
# | | S+P-GW |
# | VLAN2 +------+ +-------+
# +----------+upsgw0| |eth0 +---Internet access
# +------+ +-------+
# | |
# +-----------+
#
###########################################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/env_802dot21.bash
###########################################################
###########################################################
IPTABLES=/sbin/iptables
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
declare -x OPENAIR_DIR=""
declare -x OPENAIR1_DIR=""
declare -x OPENAIR2_DIR=""
declare -x OPENAIR3_DIR=""
declare -x OPENAIR_TARGETS=""
###########################################################
set_openair
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
##################################################
# LAUNCH eNB executable
##################################################
declare MAKE_IP_DRIVER_TARGET="oai_nw_drv.ko"
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim USE_MME=R10"
declare IP_DRIVER_NAME="oai_nw_drv"
declare LTEIF="oai0"
ENB_IPv4="10.0.0.1"
ENB_IPv6="2001:1::1"
ENB_IPv6_CIDR=$ENB_IPv6"/64"
ENB_IPv4_CIDR=$ENB_IPv4"/24"
#------------------------------------------------
declare -a NAS_IMEI=( 3 9 1 8 3 6 6 2 0 0 0 0 0 0 )
echo "Bringup UE interface"
rmmod -f $IP_DRIVER_NAME > /dev/null 2>&1
cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET ....." $green
# bash_exec "make --directory=$OPENAIR_TARGETS/SIMU/EXAMPLES/VIRT_EMUL_1eNB $MAKE_LTE_ACCESS_STRATUM_TARGET "
bash_exec "make --directory=$OPENAIR2_DIR $MAKE_IP_DRIVER_TARGET "
#bash_exec "make --directory=$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL "
bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=${NAS_IMEI[0]},${NAS_IMEI[1]},${NAS_IMEI[2]},${NAS_IMEI[3]},${NAS_IMEI[4]},${NAS_IMEI[5]},${NAS_IMEI[6]},${NAS_IMEI[7]},${NAS_IMEI[8]},${NAS_IMEI[9]},${NAS_IMEI[10]},${NAS_IMEI[11]},${NAS_IMEI[12]},${NAS_IMEI[13]}"
#bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/UE_LTE/$IP_DRIVER_NAME.ko"
bash_exec "ip route flush cache"
#bash_exec "ip link set $LTEIF broadcast ff:ff:ff:ff:ff:ff"
bash_exec "ip link set $LTEIF up"
sleep 1
bash_exec "ip addr add dev $LTEIF $ENB_IPv4_CIDR"
bash_exec "ip addr add dev $LTEIF $ENB_IPv6_CIDR"
sleep 1
bash_exec "sysctl -w net.ipv4.conf.all.log_martians=1"
assert " `sysctl -n net.ipv4.conf.all.log_martians` -eq 1" $LINENO
echo " Disabling reverse path filtering"
bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0"
assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
bash_exec "ip route flush cache"
# please add table 200 lte in/etc/iproute2/rt_tables
ip rule add fwmark 5 table lte
ip route add default dev $LTEIF table lte
# start MIH-F
xterm -hold -e $ODTONE_ROOT/dist/odtone-mihf --log 4 --conf.file $ODTONE_ROOT/dist/odtone.conf &
wait_process_started odtone-mihf
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l7 -u0 -M0 -p2 -g1 -D eth2 \
--enb-ral-listening-port 1234\
--enb-ral-link-id enb_lte_link\
--enb-ral-ip-address 127.0.0.1\
--enb-mihf-remote-port 1025\
--enb-mihf-ip-address 127.0.0.1\
--enb-mihf-id mihf1_enb
#!/bin/bash
###########################################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/env_802dot21.bash
###########################################################
###########################################################
IPTABLES=/sbin/iptables
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
declare -x OPENAIR_DIR=""
declare -x OPENAIR1_DIR=""
declare -x OPENAIR2_DIR=""
declare -x OPENAIR3_DIR=""
declare -x OPENAIR_TARGETS=""
###########################################################
set_openair
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
##################################################
# LAUNCH UE executable
##################################################
declare MAKE_IP_DRIVER_TARGET="oai_nw_drv.ko"
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim USE_MME=R10"
declare IP_DRIVER_NAME="oai_nw_drv"
declare LTEIF="oai0"
UE_IPv4="10.0.0.8"
UE_IPv6="2001:1::8"
UE_IPv6_CIDR=$UE_IPv6"/64"
UE_IPv4_CIDR=$UE_IPv4"/24"
#------------------------------------------------
declare -a NAS_IMEI=( 3 9 1 8 3 6 7 3 0 2 0 0 0 0 )
echo "Bringup UE interface"
rmmod -f $IP_DRIVER_NAME > /dev/null 2>&1
cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET ....." $green
# bash_exec "make --directory=$OPENAIR_TARGETS/SIMU/EXAMPLES/VIRT_EMUL_1eNB $MAKE_LTE_ACCESS_STRATUM_TARGET "
bash_exec "make --directory=$OPENAIR2_DIR $MAKE_IP_DRIVER_TARGET "
#bash_exec "make --directory=$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL "
bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=${NAS_IMEI[0]},${NAS_IMEI[1]},${NAS_IMEI[2]},${NAS_IMEI[3]},${NAS_IMEI[4]},${NAS_IMEI[5]},${NAS_IMEI[6]},${NAS_IMEI[7]},${NAS_IMEI[8]},${NAS_IMEI[9]},${NAS_IMEI[10]},${NAS_IMEI[11]},${NAS_IMEI[12]},${NAS_IMEI[13]}"
#bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/UE_LTE/$IP_DRIVER_NAME.ko"
bash_exec "ip route flush cache"
#bash_exec "ip link set $LTEIF broadcast ff:ff:ff:ff:ff:ff"
bash_exec "ip link set $LTEIF up"
sleep 1
bash_exec "ip addr add dev $LTEIF $UE_IPv4_CIDR"
bash_exec "ip addr add dev $LTEIF $UE_IPv6_CIDR"
sleep 1
bash_exec "sysctl -w net.ipv4.conf.all.log_martians=1"
assert " `sysctl -n net.ipv4.conf.all.log_martians` -eq 1" $LINENO
echo " Disabling reverse path filtering"
bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0"
assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
bash_exec "ip route flush cache"
# please add table 200 lte in file /etc/iproute2/rt_tables
ip rule add fwmark 5 table lte
ip -4 route add default dev $LTEIF table lte
ip -6 route add default dev $LTEIF table lte
# start MIH-F
xterm -hold -e $ODTONE_ROOT/dist/odtone-mihf --log 4 --conf.file $ODTONE_ROOT/dist/odtone.conf &
wait_process_started odtone-mihf
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l7 -u1 -b0 -M1 -p2 -g1 -D eth2 \
--ue-ral-listening-port 1234\
--ue-ral-link-id ue_lte_link\
--ue-ral-ip-address 127.0.0.1\
--ue-mihf-remote-port 1025\
--ue-mihf-ip-address 127.0.0.1\
--ue-mihf-id mihf2_ue
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