Commit cc40619d authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5672 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 44dc3404
...@@ -100,7 +100,7 @@ VARIABLES=" ...@@ -100,7 +100,7 @@ VARIABLES="
ENB_IPV4_ADDRESS_FOR_S1_MME\|\ ENB_IPV4_ADDRESS_FOR_S1_MME\|\
ENB_INTERFACE_NAME_FOR_S1U\|\ ENB_INTERFACE_NAME_FOR_S1U\|\
ENB_IPV4_ADDRESS_FOR_S1U\|\ ENB_IPV4_ADDRESS_FOR_S1U\|\
hard_real_time" real_time"
VARIABLES=$(echo $VARIABLES | sed -e 's/\\r//g') VARIABLES=$(echo $VARIABLES | sed -e 's/\\r//g')
VARIABLES=$(echo $VARIABLES | tr -d ' ') VARIABLES=$(echo $VARIABLES | tr -d ' ')
...@@ -124,7 +124,7 @@ if [ ! -d $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME ]; then ...@@ -124,7 +124,7 @@ if [ ! -d $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME ]; then
mkdir -m 777 -p $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME mkdir -m 777 -p $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME
fi fi
if [ x$hard_real_time != "xyes" ]; then if [ x$real_time != "xhard" ]; then
ITTI_LOG_FILE=$THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/itti_enb_ue.$HOSTNAME.log ITTI_LOG_FILE=$THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/itti_enb_ue.$HOSTNAME.log
#rotate_log_file $ITTI_LOG_FILE #rotate_log_file $ITTI_LOG_FILE
...@@ -156,42 +156,48 @@ else ...@@ -156,42 +156,48 @@ else
fi fi
if [ x$hard_real_time != "xyes" ]; then if [ x$real_time == "xno" ]; then
echo_warning "USER MODE" echo_warning "USER MODE"
make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET -j`grep -c ^processor /proc/cpuinfo ` || exit 1 make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET -j`grep -c ^processor /proc/cpuinfo ` || exit 1
bash_exec "ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE" bash_exec "ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE"
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l9 -u0 -b1 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -D $EMULATION_DEV_ADDRESS -K $ITTI_LOG_FILE --enb-conf $CONFIG_FILE_ENB 2>&1 | tee $STDOUT_LOG_FILE gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l9 -u0 -b1 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -D $EMULATION_DEV_ADDRESS -K $ITTI_LOG_FILE --enb-conf $CONFIG_FILE_ENB 2>&1 | tee $STDOUT_LOG_FILE
else else
echo_warning "HARD REAL TIME MODE" if [ x$real_time == "xhard" ]; then
PATH=$PATH:/usr/realtime/bin echo_warning "HARD REAL TIME MODE"
PATH=$PATH:/usr/realtime/bin
#make --directory=$OPENAIR_TARGETS/RT/USER drivers || exit 1
# 2 lines below replace the line above #make --directory=$OPENAIR_TARGETS/RT/USER drivers || exit 1
cd $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom && make clean && make || exit 1 # 2 lines below replace the line above
cd $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT && make clean && make || exit 1 cd $OPENAIR_TARGETS/ARCH/EXMIMO/DRIVER/eurecom && make clean && make || exit 1
cd $THIS_SCRIPT_PATH cd $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT && make clean && make || exit 1
cd $THIS_SCRIPT_PATH
make --directory=$OPENAIR_TARGETS/RT/USER $MAKE_LTE_ACCESS_STRATUM_TARGET_RT -j`grep -c ^processor /proc/cpuinfo ` || exit 1
make --directory=$OPENAIR_TARGETS/RT/USER $MAKE_LTE_ACCESS_STRATUM_TARGET_RT -j`grep -c ^processor /proc/cpuinfo ` || exit 1
if [ ! -f /tmp/init_rt_done.tmp ]; then
echo_warning "STARTING REAL TIME (RTAI)" if [ ! -f /tmp/init_rt_done.tmp ]; then
insmod /usr/realtime/modules/rtai_hal.ko > /dev/null 2>&1 echo_warning "STARTING REAL TIME (RTAI)"
insmod /usr/realtime/modules/rtai_sched.ko > /dev/null 2>&1 insmod /usr/realtime/modules/rtai_hal.ko > /dev/null 2>&1
insmod /usr/realtime/modules/rtai_sem.ko > /dev/null 2>&1 insmod /usr/realtime/modules/rtai_sched.ko > /dev/null 2>&1
insmod /usr/realtime/modules/rtai_fifos.ko > /dev/null 2>&1 insmod /usr/realtime/modules/rtai_sem.ko > /dev/null 2>&1
insmod /usr/realtime/modules/rtai_mbx.ko > /dev/null 2>&1 insmod /usr/realtime/modules/rtai_fifos.ko > /dev/null 2>&1
touch /tmp/init_rt_done.tmp insmod /usr/realtime/modules/rtai_mbx.ko > /dev/null 2>&1
chmod 666 /tmp/init_rt_done.tmp touch /tmp/init_rt_done.tmp
chmod 666 /tmp/init_rt_done.tmp
else
echo_warning "REAL TIME FOUND STARTED (RTAI)"
fi
cd $OPENAIR_TARGETS/RT/USER
bash ./init_exmimo2.sh
echo_warning "STARTING SOFTMODEM..."
#cat /dev/rtf62 > $STDOUT_LOG_FILE &
gdb --args ./lte-softmodem -K $ITTI_LOG_FILE -V -O $CONFIG_FILE_ENB 2>&1
cd $THIS_SCRIPT_PATH
else else
echo_warning "REAL TIME FOUND STARTED (RTAI)" if [ x$real_time == "xrt-preempt" ]; then
echo_fatal "TODO RT-PREEMT"
fi
fi fi
cd $OPENAIR_TARGETS/RT/USER
bash ./init_exmimo2.sh
echo_warning "STARTING SOFTMODEM..."
#cat /dev/rtf62 > $STDOUT_LOG_FILE &
gdb --args ./lte-softmodem -K $ITTI_LOG_FILE -V -O $CONFIG_FILE_ENB 2>&1
cd $THIS_SCRIPT_PATH
fi fi
pkill tshark pkill tshark
......
...@@ -335,8 +335,14 @@ MME_INTERFACE_NAME_FOR_S6A=`ip route get $HSS_IP | grep $HSS_IP | cut -d ' ' -f ...@@ -335,8 +335,14 @@ MME_INTERFACE_NAME_FOR_S6A=`ip route get $HSS_IP | grep $HSS_IP | cut -d ' ' -f
echo_success "MME_INTERFACE_NAME_FOR_S1_MME : $MME_INTERFACE_NAME_FOR_S1_MME" echo_success "MME_INTERFACE_NAME_FOR_S1_MME : $MME_INTERFACE_NAME_FOR_S1_MME"
echo_success "MME_INTERFACE_NAME_FOR_S6A : $MME_INTERFACE_NAME_FOR_S6A" echo_success "MME_INTERFACE_NAME_FOR_S6A : $MME_INTERFACE_NAME_FOR_S6A"
nohup tshark -i $MME_INTERFACE_NAME_FOR_S1_MME -f "not port 22" -w $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$PCAP_S1C_LOG_FILE & if [ x$MME_INTERFACE_NAME_FOR_S1_MME == x$MME_INTERFACE_NAME_FOR_S6A ]; then
nohup tshark -i $MME_INTERFACE_NAME_FOR_S6A -f "not port 22" -w $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$PCAP_S6A_LOG_FILE & nohup tshark -i $MME_INTERFACE_NAME_FOR_S1_MME -f "not port 22" -w $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$PCAP_S1C_LOG_FILE &
else
nohup tshark -i $MME_INTERFACE_NAME_FOR_S1_MME -f "not port 22" -w $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$PCAP_S1C_LOG_FILE &
nohup tshark -i $MME_INTERFACE_NAME_FOR_S6A -f "not port 22" -w $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$PCAP_S6A_LOG_FILE &
fi
wait_process_started tshark
cd $OPENAIRCN_DIR/$OBJ_DIR cd $OPENAIRCN_DIR/$OBJ_DIR
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#Setting the EXTERNAL and INTERNAL interfaces for the network #Setting the EXTERNAL and INTERNAL interfaces for the network
############################################################# #############################################################
declare EXTIF="eth1" declare EXTIF="eth1"
declare INTIF="eth2" declare INTIF="eth0"
IPTABLES=/sbin/iptables IPTABLES=/sbin/iptables
DEPMOD=/sbin/depmod DEPMOD=/sbin/depmod
...@@ -187,8 +187,8 @@ echo "1" > /proc/sys/net/ipv4/conf/$EXTIF/proxy_arp ...@@ -187,8 +187,8 @@ echo "1" > /proc/sys/net/ipv4/conf/$EXTIF/proxy_arp
echo "1" > /proc/sys/net/ipv4/conf/$INTIF/proxy_arp echo "1" > /proc/sys/net/ipv4/conf/$INTIF/proxy_arp
echo " FWD: Allow all connections OUT and only existing and related ones IN" echo " FWD: Allow all connections OUT and only existing and related ones IN"
bash_exec "iptables -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT" bash_exec "iptables -A FORWARD -i $EXTIF -o $INTIF ! --protocol sctp -m state --state ESTABLISHED,RELATED -j ACCEPT"
bash_exec "iptables -A FORWARD -i $INTIF -o $EXTIF -m state --state NEW,ESTABLISHED,RELATED,INVALID -j ACCEPT" bash_exec "iptables -A FORWARD -i $INTIF -o $EXTIF ! --protocol sctp -m state --state NEW,ESTABLISHED,RELATED,INVALID -j ACCEPT"
bash_exec "modprobe 8021q" bash_exec "modprobe 8021q"
...@@ -208,8 +208,8 @@ do ...@@ -208,8 +208,8 @@ do
NET=$(( $i + 200 )) NET=$(( $i + 200 ))
CIDR='10.0.'$NET'.1/8' CIDR='10.0.'$NET'.1/8'
bash_exec "ip -4 addr add $CIDR dev $INTIF.$i" bash_exec "ip -4 addr add $CIDR dev $INTIF.$i"
bash_exec "iptables -A FORWARD -i $EXTIF -o $INTIF.$i -m state --state ESTABLISHED,RELATED -j ACCEPT" bash_exec "iptables -A FORWARD -i $EXTIF -o $INTIF.$i ! --protocol sctp -m state --state ESTABLISHED,RELATED -j ACCEPT"
bash_exec "iptables -A FORWARD -i $INTIF.$i -o $EXTIF -m state --state NEW,ESTABLISHED,RELATED,INVALID -j ACCEPT" bash_exec "iptables -A FORWARD -i $INTIF.$i -o $EXTIF ! --protocol sctp -m state --state NEW,ESTABLISHED,RELATED,INVALID -j ACCEPT"
bash_exec "echo 1 > /proc/sys/net/ipv4/conf/$INTIF.$i/proxy_arp" bash_exec "echo 1 > /proc/sys/net/ipv4/conf/$INTIF.$i/proxy_arp"
bash_exec "echo 0 > /proc/sys/net/ipv4/conf/$INTIF.$i/rp_filter" bash_exec "echo 0 > /proc/sys/net/ipv4/conf/$INTIF.$i/rp_filter"
done done
......
...@@ -90,5 +90,18 @@ source /tmp/source.txt ...@@ -90,5 +90,18 @@ source /tmp/source.txt
declare PGW_IPV4_NETMASK_FOR_SGI=$( echo $PGW_IPV4_ADDR_FOR_SGI | cut -f2 -d '/') declare PGW_IPV4_NETMASK_FOR_SGI=$( echo $PGW_IPV4_ADDR_FOR_SGI | cut -f2 -d '/')
PGW_IPV4_ADDR_FOR_SGI=$( echo $PGW_IPV4_ADDR_FOR_SGI | cut -f1 -d '/') PGW_IPV4_ADDR_FOR_SGI=$( echo $PGW_IPV4_ADDR_FOR_SGI | cut -f1 -d '/')
bash_exec "iptables -P INPUT ACCEPT"
bash_exec "iptables -F INPUT"
bash_exec "iptables -P OUTPUT ACCEPT"
bash_exec "iptables -F OUTPUT"
bash_exec "iptables -P FORWARD ACCEPT"
bash_exec "iptables -F FORWARD"
bash_exec "iptables -t nat -F"
bash_exec "iptables -t mangle -F"
bash_exec "iptables -t filter -F"
bash_exec "iptables -t raw -F"
bash_exec "iptables -A OUTPUT -o eth1 --protocol sctp -j DROP"
create_sgi_vlans create_sgi_vlans
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