Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
cc40619d
Commit
cc40619d
authored
Aug 06, 2014
by
Lionel Gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5672
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
44dc3404
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
38 deletions
+63
-38
targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash
targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash
+37
-31
targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash
targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash
+8
-2
targets/PROJECTS/GENERIC-LTE-EPC/start_router.bash
targets/PROJECTS/GENERIC-LTE-EPC/start_router.bash
+5
-5
targets/PROJECTS/GENERIC-LTE-EPC/start_sgi.bash
targets/PROJECTS/GENERIC-LTE-EPC/start_sgi.bash
+13
-0
No files found.
targets/PROJECTS/GENERIC-LTE-EPC/start_enb.bash
View file @
cc40619d
...
...
@@ -100,7 +100,7 @@ VARIABLES="
ENB_IPV4_ADDRESS_FOR_S1_MME
\|\
ENB_INTERFACE_NAME_FOR_S1U
\|\
ENB_IPV4_ADDRESS_FOR_S1U
\|\
hard_
real_time"
real_time"
VARIABLES
=
$(
echo
$VARIABLES
|
sed
-e
's/\\r//g'
)
VARIABLES
=
$(
echo
$VARIABLES
|
tr
-d
' '
)
...
...
@@ -124,7 +124,7 @@ if [ ! -d $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME ]; then
mkdir
-m
777
-p
$THIS_SCRIPT_PATH
/OUTPUT/
$HOSTNAME
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
#rotate_log_file $ITTI_LOG_FILE
...
...
@@ -156,42 +156,48 @@ else
fi
if
[
x
$
hard_real_time
!=
"xyes
"
]
;
then
if
[
x
$
real_time
==
"xno
"
]
;
then
echo_warning
"USER MODE"
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
"
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
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
cd
$OPENAIR_TARGETS
/ARCH/EXMIMO/DRIVER/eurecom
&&
make clean
&&
make
||
exit
1
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
if
[
!
-f
/tmp/init_rt_done.tmp
]
;
then
echo_warning
"STARTING REAL TIME (RTAI)"
insmod /usr/realtime/modules/rtai_hal.ko
>
/dev/null 2>&1
insmod /usr/realtime/modules/rtai_sched.ko
>
/dev/null 2>&1
insmod /usr/realtime/modules/rtai_sem.ko
>
/dev/null 2>&1
insmod /usr/realtime/modules/rtai_fifos.ko
>
/dev/null 2>&1
insmod /usr/realtime/modules/rtai_mbx.ko
>
/dev/null 2>&1
touch
/tmp/init_rt_done.tmp
chmod
666 /tmp/init_rt_done.tmp
if
[
x
$real_time
==
"xhard"
]
;
then
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
cd
$OPENAIR_TARGETS
/ARCH/EXMIMO/DRIVER/eurecom
&&
make clean
&&
make
||
exit
1
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
if
[
!
-f
/tmp/init_rt_done.tmp
]
;
then
echo_warning
"STARTING REAL TIME (RTAI)"
insmod /usr/realtime/modules/rtai_hal.ko
>
/dev/null 2>&1
insmod /usr/realtime/modules/rtai_sched.ko
>
/dev/null 2>&1
insmod /usr/realtime/modules/rtai_sem.ko
>
/dev/null 2>&1
insmod /usr/realtime/modules/rtai_fifos.ko
>
/dev/null 2>&1
insmod /usr/realtime/modules/rtai_mbx.ko
>
/dev/null 2>&1
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
echo_warning
"REAL TIME FOUND STARTED (RTAI)"
if
[
x
$real_time
==
"xrt-preempt"
]
;
then
echo_fatal
"TODO RT-PREEMT"
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
pkill tshark
...
...
targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash
View file @
cc40619d
...
...
@@ -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_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
&
nohup
tshark
-i
$MME_INTERFACE_NAME_FOR_S6A
-f
"not port 22"
-w
$THIS_SCRIPT_PATH
/OUTPUT/
$HOSTNAME
/
$PCAP_S6A_LOG_FILE
&
if
[
x
$MME_INTERFACE_NAME_FOR_S1_MME
==
x
$MME_INTERFACE_NAME_FOR_S6A
]
;
then
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
...
...
targets/PROJECTS/GENERIC-LTE-EPC/start_router.bash
View file @
cc40619d
...
...
@@ -38,7 +38,7 @@
#Setting the EXTERNAL and INTERNAL interfaces for the network
#############################################################
declare
EXTIF
=
"eth1"
declare
INTIF
=
"eth
2
"
declare
INTIF
=
"eth
0
"
IPTABLES
=
/sbin/iptables
DEPMOD
=
/sbin/depmod
...
...
@@ -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
" 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
$INTIF
-o
$EXTIF
-m state --state NEW,ESTABLISHED,RELATED,INVALID -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
! --protocol sctp
-m state --state NEW,ESTABLISHED,RELATED,INVALID -j ACCEPT"
bash_exec
"modprobe 8021q"
...
...
@@ -208,8 +208,8 @@ do
NET
=
$((
$i
+
200
))
CIDR
=
'10.0.'
$NET
'.1/8'
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
$INTIF
.
$i
-o
$EXTIF
-m state --state NEW,ESTABLISHED,RELATED,INVALID -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
! --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 0 > /proc/sys/net/ipv4/conf/
$INTIF
.
$i
/rp_filter"
done
...
...
targets/PROJECTS/GENERIC-LTE-EPC/start_sgi.bash
View file @
cc40619d
...
...
@@ -90,5 +90,18 @@ source /tmp/source.txt
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
'/'
)
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment