Commit 0115c5cd authored by Binh Nguyen's avatar Binh Nguyen

Add scripts to set IP on EPC nodes

parent c51aff11
#!/bin/bash
source ../simeca_constants.sh
#Replace hostname
sudo ./replace_hostname.sh
#Clean up ip route
sudo ./set_ip.sh
#
#Start components for ATT-demo.
#Run this on MF (MME) node.
......
#!/bin/bash
hn=$(hostname) ;
sudo sed -i "s/.*127.0.0.1.*/127.0.0.1 localhost loghost $hn/" /etc/hosts
#!/bin/bash
source ../simeca_constants.sh
#domain=$(hostname | awk '{print $2"."$3"."$4"."$5}')
for i in $HOSTS
do
echo "Replacing hostname of host $i"
ssh -o StrictHostKeyChecking=no $i.$domain -t -t "sudo /usr/local/src/simeca/SCRIPTS/replace_host_local.sh"
done
#!/bin/bash
source ../simeca_constants.sh
for i in enb2 enb3
do
ssh -o StrictHostKeyChecking=no $i.$domain -t -t "cd /usr/local/src/simeca/SCRIPTS; sudo ./set_ip_enb.sh"
done
cd /usr/local/src/simeca/SCRIPTS
sudo ./set_ip_mme.sh
#!/bin/bash
sudo ip route | grep "10." | awk '{system("sudo ip route del " $1)}'
#!/bin/bash
sudo ip route | grep -v "default\|155\|eth0" | awk '{system("sudo ip route del " $1)}'
mgmt=$(/usr/local/src/simeca/start_scripts/get_interface_map.pl | grep "mgmt" | awk '{print $3}')
netd=$(/usr/local/src/simeca/start_scripts/get_interface_map.pl | grep "net-d" | awk '{print $3}')
sudo ip route add 192.168.4.0/24 dev $netd
sudo ip route add 192.168.254.0/24 dev $mgmt
......@@ -31,10 +31,10 @@ ssh -o StrictHostKeyChecking=no client1.$domain -t -t "cd $EPC; sudo $EPC/start_
#Restart OAI enodeb
ssh -o StrictHostKeyChecking=no penb1.$domain "sudo $EPC/penb.kill.sh; /usr/local/src/airinterface/openairinterface5g/SCRIPTS/run_lte_soft_modem.sh" || {
echo "Could not restart OAI eNodeB!"
exit 1
}
#ssh -o StrictHostKeyChecking=no penb1.$domain "sudo $EPC/penb.kill.sh; /usr/local/src/airinterface/openairinterface5g/SCRIPTS/run_lte_soft_modem.sh" || {
# echo "Could not restart OAI eNodeB!"
# exit 1
#}
exit 0
#!/bin/bash
###############MODIFY THIS FIRST!##################
UE_ID="312" #UE13
UE_ID="311" #UE12
###################################################
......@@ -20,3 +20,4 @@ HSS_PROVISION="$SIMECA_PATH/hss_provision"
EPC="$SIMECA_PATH/epc"
XML="$SIMECA_PATH/xml"
DATA="$SIMECA_PATH/data"
HOSTS="client1 enb2 enb3 epc access1 access2 access3 tor hsw1 server1"
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