Commit d428222d authored by Lionel Gauthier's avatar Lionel Gauthier

Clean


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7379 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e179ab0e
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR=~/Openair/openair1
export OPENAIR2_DIR=~/Openair/openair2
export OPENAIR3_DIR=~/Openair/openair3
export OPENAIR3_HOME=~/Openair/openair3
echo Clusterhead address is $CH1_IN6_ADDR
#echo Launching AS and RF
#./start_openair.sh 8 0
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH
#CH1<-> MR1 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH1_IN6_ADDR -y $MR1_IN6_ADDR -r 12
#CH1<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_IN -m $MR1_LABEL_OUT -r 13
#CH1<->MR1 - For com between MN1 and MN3 - MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MN3_CH1_MR1_MN1 -m $MN1_MR1_CH1_MN3 -r 13
#CH1<-> MR1 multicast (rajout THC)
echo EADS Multicast for CH1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 12
#CH1<-> MR2 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x $CH1_IN6_ADDR -y $MR2_IN6_ADDR1 -r 20
#CH1<-> MR2 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -l $MR2_CH1_LABEL_IN -m $MR2_CH1_LABEL_OUT -r 21
#CH1<-> MR2 (MPLS PMIP signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -l $CH1_MR2_CH2_LABEL_OUT -m $CH1_MR2_CH2_LABEL_IN -r 21
#CH1<-> MR2 - For com between MN1 and MN3 - (MPLS signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MN1_CH1_MR2_MN3 -m $MN3_MR2_CH1_MN1 -r 21
#CH1<-> MR2 multicast EADS (rajout THC)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 20
#CH Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -x $CH1_IN6_ADDR -y ff02::1 -r 3
#CH<-> MR1 Imulticast
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x ff3e:30:2001:660:5502:ffff:e000:3737 -y $MR1_IN_ADDR -r 14
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.2 -t 224.0.55.55 -r 12
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.1 -t 224.0.55.55 -r 12
#CH<-> MR2 (IP Signaling)
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH_ADDR -y $MR2_IN_ADDR -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.1 -t 224.0.66.66 -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.3 -t 224.0.66.66 -r 20
#CH<-> MR2 (MPLS user-plane bearer)
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.1/24 dev nasmesh0
sudo ip -6 addr add $CH1_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" > /sys/mpls/debug
#echo Multicast state launched with config_ch1
#xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch1 &
#xterm -hold -e ./mac_sim -m0 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top &
#!/bin/bash
source params.sh
sudo ./ch_conf_nas.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
xterm -hold -e "cd /homes/foubert/Openair/openair2/SIMULATION/USER_TOOLS/LAYER2_SIM ; ./mac_sim -m0 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top"
#watch -n .1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
#./stop_rf.sh
sleep 2
./del_mpls.sh
#sleep 2
#./del_mpls.sh
#!/bin/bash
#Script by Irina Dumitrascu (dumitrascu.irina@gmail.com) and Adrian Popa (adrian.popa.gh@gmail.com)
#June 2006
#Released under GPL
#Added by phil, Huu Nghia, 8 July 08
echo Deleting all mpls - xc settings
xc_output="`mpls xc show | cut -c 9-75`"
number_of_lines=`echo $xc_output|wc -l`
for i in `seq 1 $number_of_lines`
do
xc_output_line="`echo $xc_output| head -$i | tail -1`"
echo Deleting: mpls xc del $xc_output_line
mpls xc del $xc_output
#increment i
i=`expr $i+1`
done
echo Deleting all mpls - ip route settings
nr_of_lines=` ip route show |grep mpls |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`ip route show |grep mpls |head -1`
echo Deleting: ip route del $output
ip route del $output
i=`expr $i+1`
done
var1=`ip route show table 1`
if [ ! -z "$var1" ]; then
ip route del table 1
#var1=`ip route show table 1`
#ip route del $var1 table 1
ip route flush table 1
echo "clearing ip route table 1"
fi
var1=`ip route show table 2`
if [ ! -z "$var1" ]; then
ip route del table 2
# var1=`ip route show table 2`
# ip route del $var1 table 2
ip route flush table 2
echo "clearing ip route table 2"
fi
#echo Flushing iptables chains
#iptables -F
#echo Flushing iptables -t nat
#iptables -t nat -F
#echo Flushing iptables -t mangle
#iptables -t mangle -F
echo Deleting all mpls - nhlfe settings
nr_of_lines=` mpls nhlfe show |grep key |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls nhlfe show |grep key |cut -c 17-26 |head -1`
echo Deleting: mpls nhlfe del key $output
mpls nhlfe del key $output
i=`expr $i+1`
done
echo Deleting all mpls - labelspace settings
nr_of_lines=`mpls labelspace show |grep -v "labelspace -1" |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls labelspace show |grep -v "labelspace -1"|cut -c 17-37 |head -1`
echo Deleting: mpls labelspace set $output -1
mpls labelspace set $output -1
i=`expr $i+1`
done
echo Deleting all mpls - ilm settings
nr_of_lines=`mpls ilm show |grep ILM |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls ilm show |grep ILM |cut -c 10-37 |head -1`
echo Deleting: mpls ilm del $output
mpls ilm del $output
i=`expr $i+1`
done
var1=`tc qdisc show |grep eth0 |grep htb`
if [ ! -z "$var1" ]; then
tc qdisc del dev eth0 root
echo "tc clear eth0"
fi
var2=`tc qdisc show |grep eth3 |grep htb`
if [ ! -z "$var2" ]; then
tc qdisc del dev eth3 root
echo "tc clear eth3"
fi
var3=`tc qdisc show |grep eth1 |grep htb`
if [ ! -z "$var3" ]; then
tc qdisc del dev eth1 root
echo "tc clear eth1"
fi
var4=`tc qdisc show |grep eth2 |grep htb`
if [ ! -z "$var4" ]; then
tc qdisc del dev eth2 root
echo "tc clear eth2"
fi
#!/bin/bash
#Script by Lamia Romdhani
#June 2008
echo Setting MPLS
sudo modprobe mpls6
echo Number of params = $#
if [ $# -eq 3 ]; then
LABEL_IN=$1
IP_NEXT_HOP=$2
LABEL_OUT=$3
echo "IP Next Hop is $IP_NEXT_HOP"
echo 'Starting mpls'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $LABEL_IN labelspace 0 proto ipv6
var=`mpls nhlfe add key 0 instructions push gen $LABEL_OUT nexthop nasmesh0 ipv6 $IP_NEXT_HOP |grep key | cut -c 17-26`
sudo mpls xc add ilm_label gen $LABEL_IN ilm_labelspace 0 nhlfe_key $var
else
echo usage: mpls_nas.sh LABEL_IN IP_NEXT_HOP LABEL_OUT
fi
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
#echo Launching AS and RF
#./start_openair.sh 8 8
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
#sudo ifconfig eth2 10.0.1.3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.3
sudo ip -6 addr add $MR1_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR1_IN6_ADDR -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN1_MR1_CH1_MN3 -m $MN3_CH1_MR1_MN1 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 4
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
#echo Multicast state launched with config_mr1
#xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr1 &
#xterm -hold -e ./mac_sim -m0 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top &
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr1
echo "0" > /sys/mpls/debug
# MN1 <-> MN3
echo 'MN3->MN1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MN3_CH1_MR1_MN1 labelspace 0 proto ipv6
echo 'MN1->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN1_MR1_CH1_MN3 nexthop nasmesh0 ipv6 $CH1_IN6_ADDR | grep key |cut -c 17-26`
echo "Creating routes from MN1 to MN3"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
sudo ip -6 route add $MN1_IN6_ADDR/128 dev eth2
# MN1 <-> MN2
echo 'MN2->MN1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MR1_LABEL_IN labelspace 0 proto ipv6
echo 'MN1->MN2'
var=`mpls nhlfe add key 0 instructions push gen $MR1_LABEL_OUT nexthop nasmesh0 ipv6 $CH1_IN6_ADDR | grep key |cut -c 17-26`
echo "Creating routes from MN1 to MN2"
sudo ip -6 route add $MN2_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas.sh
./mr1_mpls_nas.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth2
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
#watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
xterm -hold -e "cd /homes/foubert/Openair/openair2/SIMULATION/USER_TOOLS/LAYER2_SIM ; ./mac_sim -m1 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top"
#./stop_rf.sh
sleep 2
./del_mpls.sh
#sleep 2
#./del_mpls.sh
#!/bin/bash
source params.sh
sleep 1
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
#echo Launching AS and RF
#./start_openair.sh 8 9
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.4
#sudo ifconfig eth3 10.0.3.3
sudo ip -6 addr add $MR2_IN6_ADDR1/64 dev nasmesh0
sudo ip -6 addr add $MR2_IN6_ADDR2/64 dev nasmesh0
# Com between MR2 <-> CH1
echo Classification rules for MR2- Cluster 1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR2_IN6_ADDR1 -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR2- Cluster 1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH1_LABEL_OUT -m $MR2_CH1_LABEL_IN -r 5
echo Classification rules for MR2- Cluster 1 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH1_MR2_CH2_LABEL_IN -m $CH1_MR2_CH2_LABEL_OUT -r 5
echo Classification rules for MR2- Cluster 1 - MPLS for com between MN3 and MN1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN3_MR2_CH1_MN1 -m $MN1_CH1_MR2_MN3 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 4
# Com between MR2 <-> CH2
#echo Classification rules for MR2 -Cluster 2 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x ff02::1 -y ff02::1 -r 11
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -x $MR2_IN6_ADDR2 -y $CH2_IN6_ADDR -r 12
#echo Classification rules for MR2 -Cluster 2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MR2_CH2_LABEL_OUT -m $MR2_CH2_LABEL_IN -r 13
#echo Classification rules for MR2- Cluster 2 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -l $CH2_MR2_CH1_LABEL_IN -m $CH2_MR2_CH1_LABEL_OUT -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -l $MN3_MR2_CH2_MN2 -m $MN2_CH2_MR2_MN3 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c32 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c33 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 12
#echo Multicast state launched with config_mr2
#xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mesh &
#xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mn3 &
#xterm -hold -e ./mac_sim -m0 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top &
#!/bin/bash
source params.sh
sleep 1
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 5 9
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.4
sudo ifconfig eth0 10.0.3.3
sudo ip -6 addr add $MR2_IN6_ADDR1/64 dev nasmesh0
sudo ip -6 addr add $MR2_IN6_ADDR2/64 dev nasmesh0
# Com between MR2 <-> CH1
echo Classification rules for MR2- Cluster 1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR2_IN6_ADDR1 -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR2- Cluster 1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH1_LABEL_OUT -m $MR2_CH1_LABEL_IN -r 5
echo Classification rules for MR2- Cluster 1 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH1_MR2_CH2_LABEL_IN -m $CH1_MR2_CH2_LABEL_OUT -r 5
echo Classification rules for MR2- Cluster 1 - MPLS for com between MN3 and MN1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN3_MR2_CH1_MN1 -m $MN1_CH1_MR2_MN3 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 4
# Com between MR2 <-> CH2
#echo Classification rules for MR2 -Cluster 2 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x ff02::1 -y ff02::1 -r 11
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -x $MR2_IN6_ADDR2 -y $CH2_IN6_ADDR -r 12
#echo Classification rules for MR2 -Cluster 2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MR2_CH2_LABEL_OUT -m $MR2_CH2_LABEL_IN -r 13
#echo Classification rules for MR2- Cluster 2 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -l $CH2_MR2_CH1_LABEL_IN -m $CH2_MR2_CH1_LABEL_OUT -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -l $MN3_MR2_CH2_MN2 -m $MN2_CH2_MR2_MN3 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c32 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c33 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 12
echo Multicast state launched with config_mr2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mesh &
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mn3 &
#!/bin/bash
# Author: Lamia Romdhani
#June 2008
source params.sh
sudo modprobe mpls6
echo Starting routing ...
echo No MPLS debug
echo "0" >/sys/mpls/debug
#MN1->MN2
./mpls_nas.sh $MR2_CH1_LABEL_IN $CH2_IN6_ADDR $MR2_CH2_LABEL_OUT
#MN2->MN1
./mpls_nas.sh $MR2_CH2_LABEL_IN $CH1_IN6_ADDR $MR2_CH1_LABEL_OUT
#CH1->CH2
./mpls_nas.sh $CH1_MR2_CH2_LABEL_OUT $CH2_IN6_ADDR $CH2_MR2_CH1_LABEL_IN
#CH2->CH1
./mpls_nas.sh $CH2_MR2_CH1_LABEL_OUT $CH1_IN6_ADDR $CH1_MR2_CH2_LABEL_IN
#MN3->MN1
var=`mpls nhlfe add key 0 instructions push gen $MN3_MR2_CH1_MN1 nexthop nasmesh0 ipv6 $CH1_IN6_ADDR |grep key | cut -c 17-26`
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
sudo ip -6 route add $MN3_IN6_ADDR/128 dev eth3
#MN1->MN3
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN1_CH1_MR2_MN3 labelspace 0 proto ipv6
#MN3->MN2
var=`mpls nhlfe add key 0 instructions push gen $MN3_MR2_CH2_MN2 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
sudo ip -6 route add $MN2_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
#MN2->MN3
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN2_CH2_MR2_MN3 labelspace 0 proto ipv6
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas.sh
./mr2_mpls_nas.sh
sudo sysctl -w net.ipv6.conf.eth3.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth3 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth3
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
#watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
xterm -hold -e "cd /homes/foubert/Openair/openair2/SIMULATION/USER_TOOLS/LAYER2_SIM ; ./mac_sim -m2 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_3nodes.top"
#./stop_rf.sh
sleep 2
./del_mpls.sh
#sleep 2
#./del_mpls.sh
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_outdoor.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_parking.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_parking.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 1 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 4
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 5
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 8 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.2.5
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 4
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 5
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 6 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.2.5
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 12
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 13
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr3
echo "0" > /sys/mpls/debug
echo 'MN1->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
echo 'MN2->MN1'
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
sudo ip -6 route add $MN2_IN6_ADDR/128 dev $ETH_MR3
echo 'MN3->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN3_CH2_MR3_MN2 labelspace 0 proto ipv6
echo 'MN2->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN2_MR3_CH2_MN3 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr3
echo "0" > /sys/mpls/debug
echo 'MN1->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
echo 'MN2->MN1'
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
sudo ip -6 route add $MN2_IN6_ADDR/128 dev $ETH_MR3
echo 'MN3->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN3_CH2_MR3_MN2 labelspace 0 proto ipv6
echo 'MN2->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN2_MR3_CH2_MN3 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca_outdoor.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca_parking.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
MR1_IN_ADDR=10.0.1.3
MR1_IN6_ADDR=2001:10:0:1:7856:3412:0:2
MR1_EG_ADDR=192.168.9.1
MR1_EG6_ADDR=2001:660:5502::100
# Flow CH1->MR1
MR1_LABEL_IN=1001
# Flow MR1->CH1
MR1_LABEL_OUT=1000
ETH_MR1=eth0
MR2_IN_ADDR=10.0.1.4
MR2_IN6_ADDR1=2001:10:0:1:7856:3412:0:3
MR2_IN6_ADDR2=2001:10:0:2:7856:3412:0:3
MR2_EG6_ADDR=2001:660:5502::300
ETH_MR2=eth0
# Flow CH1->MR2
MR2_CH1_LABEL_IN=2000
# Flow MR2->CH1
MR2_CH1_LABEL_OUT=2001
# Flow CH2->MR2
MR2_CH2_LABEL_IN=3001
# Flow MR2->CH2
MR2_CH2_LABEL_OUT=3000
MR3_IN_ADDR=10.0.1.5
MR3_IN6_ADDR=2001:10:0:2:7856:3412:0:2
MR3_EG_ADDR=192.168.10.1
MR3_EG6_ADDR=2001:660:5502::200
# Flow CH2->MR3
MR3_LABEL_IN=4000
# Flow MR3->CH2
MR3_LABEL_OUT=4001
ETH_MR3=eth2
CH1_IN_ADDR=10.0.1.1
CH2_IN_ADDR=10.0.1.2
CH1_IN6_ADDR=2001:10:0:1:7856:3412:0:1
CH2_IN6_ADDR=2001:10:0:2:7856:3412:0:1
## Communication between the CHs
CH1_MR2_CH2_LABEL_IN=8001
CH1_MR2_CH2_LABEL_OUT=8000
CH2_MR2_CH1_LABEL_IN=9001
CH2_MR2_CH1_LABEL_OUT=9000
## Com between MN1 and MN3
MN1_MR1_CH1_MN3=1500
MN3_CH1_MR1_MN1=1501
MN1_CH1_MR2_MN3=2500
MN3_MR2_CH1_MN1=2501
## Com between MN2 and MN3
MN3_MR2_CH2_MN2=3500
MN2_CH2_MR2_MN3=3501
MN3_CH2_MR3_MN2=4500
MN2_MR3_CH2_MN3=4501
#MN1_IN6_ADDR=2001:660:5502::20
#MN2_IN6_ADDR=2001:660:5502::25
#MN1_IN6_ADDR=2001:660:5502::110
MN1_IN6_ADDR=2001:660:5502:0:211:43ff:fe74:77bb
MN1_IN_ADDR=192.168.9.2
MN2_IN6_ADDR=2001:660:5502::210
#MN3_IN6_ADDR=2001:660:5502::310
#MN3_IN6_ADDR=2001:660:5502:0:240:8cff:fe77:9b79
MN3_IN6_ADDR=2001:660:5502:0:218:8bff:feb0:50aa
MN2_IN_ADDR=192.168.10.2
# Put the right OPENAIR3 path here
OPENAIR3_HOME=~/Openair/openair3
OPENAIR3_PMIP6D_PATH=$OPENAIR3_HOME/pmip6d
OPENAIR3_SCRIPTS_PATH=$OPENAIR3_HOME/scripts
REFLECTOR_DIR=$OPENAIR3_HOME/EXAMPLES/BARCA_TRIALS/REFLECTOR
# Put the right OPENAIR2 path here
#OPENAIR2_DIR=~/openair2_r234/openair2/
OPENAIR2_DIR=~/Openair/openair2
if [ "$1" == "" ]; then
echo "Please provide a TX power level (0-8)"
exit
fi
if [ "$2" == "" ]; then
echo "Please provide a Node ID (0-7 for CH, 8-15 for MR/UE)"
exit
fi
if [ "$OPENAIR1_DIR" == "" ] ; then
echo "Please set OPENAIR1_DIR environment variable"
exit
else
echo "OPENAIR1_DIR Set to $OPENAIR1_DIR"
fi
cd $OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF
source ./txgains.sh
case $1 in
0)
CBMIMO1_POWER=$CBMIMO1_m20_dBm
echo "Configuring CBMIMO1 for -20dBm ($CBMIMO1_POWER)"
;;
1)
CBMIMO1_POWER=$CBMIMO1_m15_dBm
echo Configuring CBMIMO1 for -15dBm
;;
2)
CBMIMO1_POWER=$CBMIMO1_m10_dBm
echo Configuring CBMIMO1 for -10dBm
;;
3)
CBMIMO1_POWER=$CBMIMO1_m5_dBm
echo Configuring CBMIMO1 for -5dBm
;;
4)
CBMIMO1_POWER=$CBMIMO1_0_dBm
echo Configuring CBMIMO1 for 0dBm
;;
5)
CBMIMO1_POWER=$CBMIMO1_5_dBm
echo Configuring CBMIMO1 for 5dBm
;;
6)
CBMIMO1_POWER=$CBMIMO1_10_dBm
echo Configuring CBMIMO1 for 10dBm
;;
7)
CBMIMO1_POWER=$CBMIMO1_15_dBm
echo Configuring CBMIMO1 for 15dBm
;;
8)
CBMIMO1_POWER=$CBMIMO1_20_dBm
echo Configuring CBMIMO1 for 20dBm
;;
*)
echo Invalid TX power
exit
esac
echo Removing openair_rf,openair_l2 and openair_rrc modules
sudo rmmod -f openair_rrc
sudo rmmod -f openair_l2
sudo rmmod -f openair_rf
sudo insmod $OPENAIR1_DIR/ARCH/CBMIMO1/DEVICE_DRIVER/openair_rf_l2.ko
OARF_RET=`lsmod | grep -e openair_rf`
if [ "$OARF_RET" = "" ]; then
echo Error loading openair1 module
exit
fi
sudo insmod $OPENAIR2_DIR/LAYER2/openair_layer2.ko
OA2_RET=`lsmod | grep -e openair_l2`
if [ "$OA2_RET" = "" ]; then
echo Error loading openair2 module
exit
fi
sudo insmod $OPENAIR2_DIR/RRC/MESH/openair_RRC.ko
OARRC_RET=`lsmod | grep -e openair_rrc`
if [ "$OARRC_RET" = "" ]; then
echo Error loading openair RRC module
exit
fi
OA_DEV="/dev/openair0"
if [ -c "$OA_DEV" ]; then
echo "$OA_DEV exists"
else
echo "creating $OA_DEV"
sudo mknod $OA_DEV c 127 0
sudo chmod a+rw /dev/openair0
fi
./openair_rf_cbmimo1 1 0
./openair_rf_cbmimo1 1 6 $CBMIMO1_POWER
if [ $2 -lt "8" ]; then
./openair_rf_cbmimo1 1 1 1 $2
elif [ $2 -lt "16" ]; then
./openair_rf_cbmimo1 1 3 1 $2
else
echo Illegal Node ID, exiting
exit
fi
sleep 1
# Watch the status of the radio to check for hardware exit event
#OA1_STATE=`cat /proc/openair1/openair1_state`
#while [ "$OA1_STATE" != "EXITED" ]; do
# OA1_STATE=`cat /proc/openair1/openair1_state`
# sleep .5
#done
#./openair_rf_cbmimo1 1 4 1
#echo CBMIMO1 Hardware exit, restarting ...
cd $OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF
echo STOP STARTS...
./openair_rf_cbmimo1 1 4 1
sleep 2
echo STOP RF DONE
sudo killall chbch_scope
echo STOP CHBCH SCOPE DONE
sudo killall sach_scope
echo STOP_SACH SCOPE DONE
sleep 1
sudo rmmod nasmesh
sleep 1
echo REMOVE NASMESH MODULE DONE
sudo rmmod openair_rrc
sleep 1
echo REMOVE RRC MODULE DONE
sudo rmmod openair_l2
sleep 1
echo REMOVE LAYER2 MODULE DONE
sudo rmmod openair_rf
echo REMOVE RF MODULE DONE
echo STOP FINISHED SUCCESSFULLY
# Configuration file of CH1 (SP4-Wimaxhead1)
# side linked to MR1 (Chorist Edge 1) : name of interface, IPv4, TTL
int_1=nasmesh0
ipv_1=4
ttl_1=65
# side linked to MR2 (SP4-Wimaxrelay-2) : name of interface, IPv4, TTL
int_2=nasmesh0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.30.10.10,226.40.10.10
groupes=226.30.10.11,226.40.10.11
groupes=226.30.10.12,226.40.10.12
groupes=226.30.10.13,226.40.10.13
groupes=226.30.10.14,226.40.10.14
groupes=226.30.10.15,226.40.10.15
#Port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
# Configuration file of CH1 (SP4-Wimaxhead2)
# side linked to MR2 (SP4-Wimaxrelay-2) : name of interface, IPv4, TTL
int_1=nasmesh0
ipv_1=4
ttl_1=65
# side linked to MR3 (SP4-Edge2) : name of interface, IPv4, TTL
int_2=nasmesh0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.50.10.10,226.30.10.10
groupes=226.50.10.11,226.30.10.11
groupes=226.50.10.12,226.30.10.12
groupes=226.50.10.13,226.30.10.13
groupes=226.50.10.14,226.30.10.14
groupes=226.50.10.15,226.30.10.15
#Port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
# Configuration file of MN1 (Dieppe)
# side linked to EADS End-users (Wifi side) : name of interface, IPv4, TTL
int_1=wifi0
ipv_1=4
ttl_1=65
# side linked to MR1 (CHORIST-Edge1): name of interface, IPv4, TTL
int_2=eth0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=224.0.55.55,224.0.66.66
groupes=226.10.10.10,226.20.10.10
groupes=226.10.10.11,226.20.10.11
groupes=226.10.10.12,226.20.10.12
groupes=226.10.10.13,226.20.10.13
groupes=226.10.10.14,226.20.10.14
groupes=226.10.10.15,226.20.10.15
#Port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
# Configuration file of MN2 (Sarlat)
# side linked to MR3 (CHORIST-Edge2) : name of interface, IPv4, TTL
int_2=eth0
ipv_2=4
ttl_2=65
# side linked to EADS End-users (Wifi side) : name of interface, IPv4, TTL
int_1=wifi0
ipv_1=4
ttl_1=65
#multicast group label on side 1 then group label on side 2
groupes=226.20.10.10,226.10.10.10
groupes=226.20.10.11,226.10.10.11
groupes=226.20.10.12,226.10.10.12
groupes=226.20.10.13,226.10.10.13
groupes=226.20.10.14,226.10.10.14
groupes=226.20.10.15,226.10.10.15
#Port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
# Configuration file MR1 (Chorist-Edge1)
# side linked to MN1 (DIEPPE) : name of interface, IPv4, TTL
int_1=eth0
ipv_1=4
ttl_1=65
# side linked to CH1 (SP4-Wimaxhead1) : name of interface, IPv4, TTL
int_2=nasmesh0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.20.10.10,226.30.10.10
groupes=226.20.10.11,226.30.10.11
groupes=226.20.10.12,226.30.10.12
groupes=226.20.10.13,226.30.10.13
groupes=226.20.10.14,226.30.10.14
groupes=226.20.10.15,226.30.10.15
# different port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
# Configuration file MR2 (SP4-Wimaxrelay-2)
# side linked to CH1 (SP4-Wimaxhead1) : name of interface, IPv4, TTL
int_1=nasmesh0
ipv_1=4
ttl_1=65
# side linked to CH1 (SP4-Wimaxhead2) : name of interface, IPv4, TTL
int_2=nasmesh0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.40.10.10,226.50.10.10
groupes=226.40.10.11,226.50.10.11
groupes=226.40.10.12,226.50.10.12
groupes=226.40.10.13,226.50.10.13
groupes=226.40.10.14,226.50.10.14
groupes=226.40.10.15,226.50.10.15
# different port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
# Configuration file MR3 (Chorist-Edge2)
# side linked to CH2 (SP4-Wimaxhead2) : name of interface, IPv4, TTL
int_1=nasmesh0
ipv_1=4
ttl_1=65
# side linked to MN2 (SARLAT) : name of interface, IPv4, TTL
int_2=eth0
ipv_2=4
ttl_2=65
#multicast group label on side 1 then group label on side 2
groupes=226.30.10.10,226.20.10.10
groupes=226.30.10.11,226.20.10.11
groupes=226.30.10.12,226.20.10.12
groupes=226.30.10.13,226.20.10.13
groupes=226.30.10.14,226.20.10.14
groupes=226.30.10.15,226.20.10.15
# different port ranges
ports=1234,1234
ports=6300,6308
ports=6340,6348
ports=6360,6368
#!/usr/bin/perl -w
use Switch;
$dir = $ARGV[0];
$file = $ARGV[1];
$nb_groupes = `grep groupes $ARGV[0]|wc -l|sed \'s/ //g\'`;
$nb_plages = `grep port $ARGV[0]|wc -l|sed \'s/ //g\'`;
chomp($nb_plages);
chomp($nb_groupes);
#les structures dans lesquelles on stocke les données
@groupes=();
@ports=();
@int_1=();
@int_2=();
@ipv_1=();
@ipv_2=();
@ttl_1=();
@ttl_2=();
#on compte le nombre de lignes, pour signaler l'erreur
$num_ligne = 0;
open(fFile, "< $file") or die "cannot open file $file";
while($line = <fFile>){
$num_ligne++;
#on ignore les lignes commentées ou vides
if ((substr ($line,0,1) ne "#") && ($line =~ /=/)) {
@ligne=split("=", $line);
#si l'argument est vide, alors le programme sort avec une erreur
chomp($ligne[1]);
if(!length($ligne[1])){
printf "Erreur dans le fichier de conf à la ligne $num_ligne.\n";
exit;
}
#on met les données dans les structures adéquates
switch ($ligne[0]){
case "int_1" {push(@int_1,$ligne[1])}
case "int_2" {push(@int_2,$ligne[1])}
case "ipv_1" {push(@ipv_1,$ligne[1])}
case "ipv_2" {push(@ipv_2,$ligne[1])}
case "ttl_1" {push(@ttl_1,$ligne[1])}
case "ttl_2" {push(@ttl_2,$ligne[1])}
case "groupes" {push(@groupes,$ligne[1])}
case "ports" {push(@ports,$ligne[1])}
}
}
}
close(fFile);
#On construit la commande et on l'affiche
$commande = "$dir/reflector $int_1[0] $int_2[0] $ipv_1[0] $ipv_2[0] $ttl_1[0] $ttl_2[0]";
#on rajoute le nb de groupes et les groupes
$commande = $commande." ".@groupes;
foreach $groupe (@groupes){
@couple = split (",", $groupe);
$commande = $commande." $couple[0] $couple[1]";
}
#on rajoute le nb de ports et les ports
$commande = $commande." ".@ports;
foreach $port (@ports){
@couple = split (",", $port);
$commande = $commande." $couple[0] $couple[1]";
}
$commande = $commande."\n";
system($commande);
#!/bin/bash
source params.sh
sleep 1
echo Clusterhead address is $CH1_IN6_ADDR
echo Launching AS and RF
./start_openair.sh 8 0
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH
#CH1<-> MR1 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH1_IN6_ADDR -y $MR1_IN6_ADDR -r 12
#CH1<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_IN -m $MR1_LABEL_OUT -r 13
## Est ce bon ?
#CH1<->MR1 - For com between MN1 and MN3 - MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MN3_CH1_MR1_MN1 -m $MN1_MR1_CH1_MN3 -r 13
#CH1<-> MR1 multicast (rajout THC)
echo EADS Multicast for CH1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 12
#CH1<-> MR2 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x $CH1_IN6_ADDR -y $MR2_IN6_ADDR1 -r 20
#CH1<-> MR2 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -l $MR2_CH1_LABEL_IN -m $MR2_CH1_LABEL_OUT -r 21
#CH1<-> MR2 (MPLS PMIP signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -l $CH1_MR2_CH2_LABEL_OUT -m $CH1_MR2_CH2_LABEL_IN -r 21
#CH1<-> MR2 - For com between MN1 and MN3 - (MPLS signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MN1_CH1_MR2_MN3 -m $MN3_MR2_CH1_MN1 -r 21
#CH1<-> MR2 multicast EADS (rajout THC)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 20
#CH Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -x $CH1_IN6_ADDR -y ff02::1 -r 3
#CH<-> MR1 Imulticast
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x ff3e:30:2001:660:5502:ffff:e000:3737 -y $MR1_IN_ADDR -r 14
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.2 -t 224.0.55.55 -r 12
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.1 -t 224.0.55.55 -r 12
#CH<-> MR2 (IP Signaling)
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH_ADDR -y $MR2_IN_ADDR -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.1 -t 224.0.66.66 -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.3 -t 224.0.66.66 -r 20
#CH<-> MR2 (MPLS user-plane bearer)
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.1/24 dev nasmesh0
sudo ip -6 addr add $CH1_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" > /sys/mpls/debug
echo Multicast state launched with config_ch1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch1 &
#!/bin/bash
source params.sh
sleep 1
echo Clusterhead address is $CH1_IN6_ADDR
echo Launching AS and RF
./start_openair.sh 6 0
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH
#CH1<-> MR1 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH1_IN6_ADDR -y $MR1_IN6_ADDR -r 12
#CH1<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_IN -m $MR1_LABEL_OUT -r 13
## Est ce bon ?
#CH1<->MR1 - For com between MN1 and MN3 - MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MN3_CH1_MR1_MN1 -m $MN1_MR1_CH1_MN3 -r 13
#CH1<-> MR1 multicast (rajout THC)
echo EADS Multicast for CH1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 12
#CH1<-> MR2 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x $CH1_IN6_ADDR -y $MR2_IN6_ADDR1 -r 20
#CH1<-> MR2 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -l $MR2_CH1_LABEL_IN -m $MR2_CH1_LABEL_OUT -r 21
#CH1<-> MR2 (MPLS PMIP signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -l $CH1_MR2_CH2_LABEL_OUT -m $CH1_MR2_CH2_LABEL_IN -r 21
#CH1<-> MR2 - For com between MN1 and MN3 - (MPLS signaling bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MN1_CH1_MR2_MN3 -m $MN3_MR2_CH1_MN1 -r 21
#CH1<-> MR2 multicast EADS (rajout THC)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 20
#CH Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -x $CH1_IN6_ADDR -y ff02::1 -r 3
#CH<-> MR1 Imulticast
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x ff3e:30:2001:660:5502:ffff:e000:3737 -y $MR1_IN_ADDR -r 14
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.2 -t 224.0.55.55 -r 12
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.0.1 -t 224.0.55.55 -r 12
#CH<-> MR2 (IP Signaling)
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH_ADDR -y $MR2_IN_ADDR -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.1 -t 224.0.66.66 -r 20
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.0.3 -t 224.0.66.66 -r 20
#CH<-> MR2 (MPLS user-plane bearer)
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.1/24 dev nasmesh0
sudo ip -6 addr add $CH1_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" > /sys/mpls/debug
echo Multicast state launched with config_ch1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch1 &
#!/bin/bash
source params.sh
sudo ./ch1_conf_nas_barca_outdoor.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
watch -n .1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
source params.sh
sudo ./ch1_conf_nas_barca_outdoor.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
watch -n .1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
source params.sh
sudo ./ch1_conf_nas_barca_parking.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
watch -n .5 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
source params.sh
sudo ./ch1_conf_nas_barca_parking.sh
# MN1 -> MN2
sudo ./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
# MN2 -> MN1
sudo ./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
# MN1 -> MN3
sudo ./mpls_nas.sh $MN1_MR1_CH1_MN3 $MR2_IN6_ADDR1 $MN1_CH1_MR2_MN3
# MN3 -> MN1
sudo ./mpls_nas.sh $MN3_MR2_CH1_MN1 $MR1_IN6_ADDR $MN3_CH1_MR1_MN1
# CH1 -> CH2
#echo 'CH2->MR2->CH1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH1_MR2_CH2_LABEL_IN labelspace 0 proto ipv6
#echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH1_MR2_CH2_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR1 | grep key |cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $CH2_IN6_ADDR/128 via $MR2_IN6_ADDR1 mpls $var
echo 0 > /sys/mpls/debug
# PMIP
#echo /openair3/pmip6d/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -c -L $CH1_IN6_ADDR -A $CH2_IN6_ADDR" &
watch -n .5 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
source params.sh
sleep 1
echo ClusterHead address is $CH2_IN6_ADDR
echo Launching AS and RF
./start_openair.sh 8 1
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH2
#CH2 Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH2_IN6_ADDR -y ff02::1 -r 3
#CH2<-> MR2 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $CH2_IN6_ADDR -y $MR2_IN6_ADDR2 -r 20
#CH<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH2_LABEL_IN -m $MR2_CH2_LABEL_OUT -r 21
#CH2<-> MR2 MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH2_MR2_CH1_LABEL_OUT -m $CH2_MR2_CH1_LABEL_IN -r 21
#CH2<-> MR2 MPLS Signaling - For com between MN3 and MN2
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN2_CH2_MR2_MN3 -m $MN3_MR2_CH2_MN2 -r 21
#CH2<-> MR2 Imulticast
echo EADS Multicast for MR2
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 20
#CH2<-> MR3 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x $CH2_IN6_ADDR -y $MR3_IN6_ADDR -r 28
#CH2<-> MR3 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MR3_LABEL_IN -m $MR3_LABEL_OUT -r 29
#CH2<-> MR3 (MPLS for com between MN2 and MN3)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MN3_CH2_MR3_MN2 -m $MN2_MR3_CH2_MN3 -r 29
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 28
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.2/24 dev nasmesh0
sudo ip -6 addr add $CH2_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" >/sys/mpls/debug
echo Multicast state launched with config_ch2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch2 &
#!/bin/bash
source params.sh
sleep 1
echo ClusterHead address is $CH2_IN6_ADDR
echo Launching AS and RF
./start_openair.sh 8 1
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH2
#CH2 Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH2_IN6_ADDR -y ff02::1 -r 3
#CH2<-> MR2 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $CH2_IN6_ADDR -y $MR2_IN6_ADDR2 -r 20
#CH<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH2_LABEL_IN -m $MR2_CH2_LABEL_OUT -r 21
#CH2<-> MR2 MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH2_MR2_CH1_LABEL_OUT -m $CH2_MR2_CH1_LABEL_IN -r 21
#CH2<-> MR2 MPLS Signaling - For com between MN3 and MN2
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN2_CH2_MR2_MN3 -m $MN3_MR2_CH2_MN2 -r 21
#CH2<-> MR2 Imulticast
echo EADS Multicast for MR2
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 20
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 20
#CH2<-> MR3 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x $CH2_IN6_ADDR -y $MR3_IN6_ADDR -r 28
#CH2<-> MR3 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -l $MR3_LABEL_IN -m $MR3_LABEL_OUT -r 29
#CH2<-> MR3 (MPLS for com between MN2 and MN3)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MN3_CH2_MR3_MN2 -m $MN2_MR3_CH2_MN3 -r 29
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 28
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 28
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add 10.0.0.2/24 dev nasmesh0
sudo ip -6 addr add $CH2_IN6_ADDR/64 dev nasmesh0
echo No MPLS debug
echo "0" >/sys/mpls/debug
echo Multicast state launched with config_ch2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_ch2 &
#!/bin/bash
#CH2_NAS.SH
#Cluster Head (2)– with NAS_MPLS_PMIP working
#Phil, 25 july 08
source params.sh
./ch2_conf_nas_barca_outdoor.sh
#MN1->MN2
./mpls_nas.sh $MR2_CH2_LABEL_OUT $MR3_IN6_ADDR $MR3_LABEL_IN
#MN2->MN1
./mpls_nas.sh $MR3_LABEL_OUT $MR2_IN6_ADDR2 $MR2_CH2_LABEL_IN
#CH1->MR2->CH2
echo 'CH1->MR2->CH2'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH2_MR2_CH1_LABEL_IN labelspace 0 proto ipv6
echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH2_MR2_CH1_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR2 | grep key |cut -c 17-26`
echo "Creating routes from CH2 to CH1"
sudo ip -6 route add $CH1_IN6_ADDR/128 via $MR2_IN6_ADDR2 mpls $var
#MN3->MN2
./mpls_nas.sh $MN3_MR2_CH2_MN1 $MR3_IN6_ADDR $MN3_CH2_MR3_MN2
#MN2->MN3
./mpls_nas.sh $MN2_MR3_CH2_MN3 $MR2_IN6_ADDR2 $MN1_CH2_MR2_MN3
echo $OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR -A $CH1_IN6_ADDR
#sudo xterm -hold -e "$OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR -A $CH1_IN6_ADDR" &
watch -n .1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
#CH2_NAS.SH
#Cluster Head (2)– with NAS_MPLS_PMIP working
#Phil, 25 july 08
source params.sh
./ch2_conf_nas_barca_parking.sh
echo "0" > /sys/mpls/debug
#MN1->MN2
./mpls_nas.sh $MR2_CH2_LABEL_OUT $MR3_IN6_ADDR $MR3_LABEL_IN
#MN2->MN1
./mpls_nas.sh $MR3_LABEL_OUT $MR2_IN6_ADDR2 $MR2_CH2_LABEL_IN
echo "0" > /sys/mpls/debug
#CH1->MR2->CH2
echo 'CH1->MR2->CH2'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $CH2_MR2_CH1_LABEL_IN labelspace 0 proto ipv6
echo 'CH1->MR2->CH2'
var=`mpls nhlfe add key 0 instructions push gen $CH2_MR2_CH1_LABEL_OUT nexthop nasmesh0 ipv6 $MR2_IN6_ADDR2 | grep key |cut -c 17-26`
echo "Creating routes from CH2 to CH1"
sudo ip -6 route add $CH1_IN6_ADDR/128 via $MR2_IN6_ADDR2 mpls $var
#MN3->MN2
./mpls_nas.sh $MN3_MR2_CH2_MN1 $MR3_IN6_ADDR $MN3_CH2_MR3_MN2
#MN2->MN3
./mpls_nas.sh $MN2_MR3_CH2_MN3 $MR2_IN6_ADDR2 $MN1_CH2_MR2_MN3
echo $OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR -A $CH1_IN6_ADDR
#sudo xterm -hold -e "$OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR -A $CH1_IN6_ADDR" &
watch -n .5 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats ; cat /proc/openair1/openair1_state"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
#Script by Irina Dumitrascu (dumitrascu.irina@gmail.com) and Adrian Popa (adrian.popa.gh@gmail.com)
#June 2006
#Released under GPL
#Added by phil, Huu Nghia, 8 July 08
echo Deleting all mpls - xc settings
xc_output="`mpls xc show | cut -c 9-75`"
number_of_lines=`echo $xc_output|wc -l`
for i in `seq 1 $number_of_lines`
do
xc_output_line="`echo $xc_output| head -$i | tail -1`"
echo Deleting: mpls xc del $xc_output_line
mpls xc del $xc_output
#increment i
i=`expr $i+1`
done
echo Deleting all mpls - ip route settings
nr_of_lines=` ip route show |grep mpls |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`ip route show |grep mpls |head -1`
echo Deleting: ip route del $output
ip route del $output
i=`expr $i+1`
done
var1=`ip route show table 1`
if [ ! -z "$var1" ]; then
ip route del table 1
#var1=`ip route show table 1`
#ip route del $var1 table 1
ip route flush table 1
echo "clearing ip route table 1"
fi
var1=`ip route show table 2`
if [ ! -z "$var1" ]; then
ip route del table 2
# var1=`ip route show table 2`
# ip route del $var1 table 2
ip route flush table 2
echo "clearing ip route table 2"
fi
#echo Flushing iptables chains
#iptables -F
#echo Flushing iptables -t nat
#iptables -t nat -F
#echo Flushing iptables -t mangle
#iptables -t mangle -F
echo Deleting all mpls - nhlfe settings
nr_of_lines=` mpls nhlfe show |grep key |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls nhlfe show |grep key |cut -c 17-26 |head -1`
echo Deleting: mpls nhlfe del key $output
mpls nhlfe del key $output
i=`expr $i+1`
done
echo Deleting all mpls - labelspace settings
nr_of_lines=`mpls labelspace show |grep -v "labelspace -1" |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls labelspace show |grep -v "labelspace -1"|cut -c 17-37 |head -1`
echo Deleting: mpls labelspace set $output -1
mpls labelspace set $output -1
i=`expr $i+1`
done
echo Deleting all mpls - ilm settings
nr_of_lines=`mpls ilm show |grep ILM |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls ilm show |grep ILM |cut -c 10-37 |head -1`
echo Deleting: mpls ilm del $output
mpls ilm del $output
i=`expr $i+1`
done
var1=`tc qdisc show |grep eth0 |grep htb`
if [ ! -z "$var1" ]; then
tc qdisc del dev eth0 root
echo "tc clear eth0"
fi
var2=`tc qdisc show |grep eth3 |grep htb`
if [ ! -z "$var2" ]; then
tc qdisc del dev eth3 root
echo "tc clear eth3"
fi
var3=`tc qdisc show |grep eth1 |grep htb`
if [ ! -z "$var3" ]; then
tc qdisc del dev eth1 root
echo "tc clear eth1"
fi
var4=`tc qdisc show |grep eth2 |grep htb`
if [ ! -z "$var4" ]; then
tc qdisc del dev eth2 root
echo "tc clear eth2"
fi
#!/bin/bash
#Script by Lamia Romdhani
#June 2008
echo Setting MPLS
sudo modprobe mpls6
echo Number of params = $#
if [ $# -eq 3 ]; then
LABEL_IN=$1
IP_NEXT_HOP=$2
LABEL_OUT=$3
echo "IP Next Hop is $IP_NEXT_HOP"
echo 'Starting mpls'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $LABEL_IN labelspace 0 proto ipv6
var=`mpls nhlfe add key 0 instructions push gen $LABEL_OUT nexthop nasmesh0 ipv6 $IP_NEXT_HOP |grep key | cut -c 17-26`
sudo mpls xc add ilm_label gen $LABEL_IN ilm_labelspace 0 nhlfe_key $var
else
echo usage: mpls_nas.sh LABEL_IN IP_NEXT_HOP LABEL_OUT
fi
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 8 8
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.1.3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.3
sudo ip -6 addr add $MR1_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR1_IN6_ADDR -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN1_MR1_CH1_MN3 -m $MN3_CH1_MR1_MN1 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 4
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr1 &
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 6 8
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.1.3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.3
sudo ip -6 addr add $MR1_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR1_IN6_ADDR -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN1_MR1_CH1_MN3 -m $MN3_CH1_MR1_MN1 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 4
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr1 &
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 0 8
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.1.3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.3
sudo ip -6 addr add $MR1_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR1_IN6_ADDR -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN1_MR1_CH1_MN3 -m $MN3_CH1_MR1_MN1 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR1_IN_ADDR -t 226.30.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH1_IN_ADDR -t 226.30.10.15 -r 4
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr1
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr1 &
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr1
echo "0" > /sys/mpls/debug
# MN1 <-> MN3
echo 'MN3->MN1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MN3_CH1_MR1_MN1 labelspace 0 proto ipv6
echo 'MN1->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN1_MR1_CH1_MN3 nexthop nasmesh0 ipv6 $CH1_IN6_ADDR | grep key |cut -c 17-26`
echo "Creating routes from MN1 to MN3"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
sudo ip -6 route add $MN1_IN6_ADDR/128 dev eth0
# MN1 <-> MN2
echo 'MN2->MN1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MR1_LABEL_IN labelspace 0 proto ipv6
echo 'MN1->MN2'
var=`mpls nhlfe add key 0 instructions push gen $MR1_LABEL_OUT nexthop nasmesh0 ipv6 $CH1_IN6_ADDR | grep key |cut -c 17-26`
echo "Creating routes from MN1 to MN2"
sudo ip -6 route add $MN2_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_outdoor.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_outdoor.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_parking.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_parking.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr1_conf_nas_barca_room_nopmip.sh
./mr1_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR1_EG6_ADDR -E $MR1_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
source params.sh
sleep 1
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 8 9
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.4
sudo ifconfig eth0 10.0.3.3
sudo ip -6 addr add $MR2_IN6_ADDR1/64 dev nasmesh0
sudo ip -6 addr add $MR2_IN6_ADDR2/64 dev nasmesh0
# Com between MR2 <-> CH1
echo Classification rules for MR2- Cluster 1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR2_IN6_ADDR1 -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR2- Cluster 1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH1_LABEL_OUT -m $MR2_CH1_LABEL_IN -r 5
echo Classification rules for MR2- Cluster 1 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH1_MR2_CH2_LABEL_IN -m $CH1_MR2_CH2_LABEL_OUT -r 5
echo Classification rules for MR2- Cluster 1 - MPLS for com between MN3 and MN1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN3_MR2_CH1_MN1 -m $MN1_CH1_MR2_MN3 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 4
# Com between MR2 <-> CH2
#echo Classification rules for MR2 -Cluster 2 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x ff02::1 -y ff02::1 -r 11
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -x $MR2_IN6_ADDR2 -y $CH2_IN6_ADDR -r 12
#echo Classification rules for MR2 -Cluster 2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MR2_CH2_LABEL_OUT -m $MR2_CH2_LABEL_IN -r 13
#echo Classification rules for MR2- Cluster 2 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -l $CH2_MR2_CH1_LABEL_IN -m $CH2_MR2_CH1_LABEL_OUT -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -l $MN3_MR2_CH2_MN2 -m $MN2_CH2_MR2_MN3 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c32 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c33 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 12
echo Multicast state launched with config_mr2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mesh &
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mn3 &
#!/bin/bash
source params.sh
sleep 1
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 5 9
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.4
sudo ifconfig eth0 10.0.3.3
sudo ip -6 addr add $MR2_IN6_ADDR1/64 dev nasmesh0
sudo ip -6 addr add $MR2_IN6_ADDR2/64 dev nasmesh0
# Com between MR2 <-> CH1
echo Classification rules for MR2- Cluster 1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR2_IN6_ADDR1 -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR2- Cluster 1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH1_LABEL_OUT -m $MR2_CH1_LABEL_IN -r 5
echo Classification rules for MR2- Cluster 1 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -l $CH1_MR2_CH2_LABEL_IN -m $CH1_MR2_CH2_LABEL_OUT -r 5
echo Classification rules for MR2- Cluster 1 - MPLS for com between MN3 and MN1
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -l $MN3_MR2_CH1_MN1 -m $MN1_CH1_MR2_MN3 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.10 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.11 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.12 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.13 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.14 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -s $MR2_IN_ADDR -t 226.40.10.15 -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c16 -i0 -z0 -s $CH1_IN_ADDR -t 226.40.10.15 -r 4
# Com between MR2 <-> CH2
#echo Classification rules for MR2 -Cluster 2 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c17 -i0 -z0 -x ff02::1 -y ff02::1 -r 11
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c18 -i0 -z0 -x $MR2_IN6_ADDR2 -y $CH2_IN6_ADDR -r 12
#echo Classification rules for MR2 -Cluster 2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c19 -i0 -z0 -l $MR2_CH2_LABEL_OUT -m $MR2_CH2_LABEL_IN -r 13
#echo Classification rules for MR2- Cluster 2 - MPLS PMIP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c20 -i0 -z0 -l $CH2_MR2_CH1_LABEL_IN -m $CH2_MR2_CH1_LABEL_OUT -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c21 -i0 -z0 -l $MN3_MR2_CH2_MN2 -m $MN2_CH2_MR2_MN3 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c22 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c23 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c24 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c25 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c26 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c27 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c28 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c29 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c30 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c31 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c32 -i0 -z0 -s $MR2_IN_ADDR -t 226.50.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c33 -i0 -z0 -s $CH2_IN_ADDR -t 226.50.10.15 -r 12
echo Multicast state launched with config_mr2
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mesh &
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr2_mn3 &
#!/bin/bash
# Author: Lamia Romdhani
#June 2008
source params.sh
modprobe mpls6
echo Starting routing ...
echo No MPLS debug
echo "0" >/sys/mpls/debug
#MN1->MN2
./mpls_nas.sh $MR2_CH1_LABEL_IN $CH2_IN6_ADDR $MR2_CH2_LABEL_OUT
#MN2->MN1
./mpls_nas.sh $MR2_CH2_LABEL_IN $CH1_IN6_ADDR $MR2_CH1_LABEL_OUT
#CH1->CH2
./mpls_nas.sh $CH1_MR2_CH2_LABEL_OUT $CH2_IN6_ADDR $CH2_MR2_CH1_LABEL_IN
#CH2->CH1
./mpls_nas.sh $CH2_MR2_CH1_LABEL_OUT $CH1_IN6_ADDR $CH1_MR2_CH2_LABEL_IN
#MN3->MN1
var=`mpls nhlfe add key 0 instructions push gen $MN3_MR2_CH1_MN1 nexthop nasmesh0 ipv6 $CH1_IN6_ADDR |grep key | cut -c 17-26`
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
sudo ip -6 route add $MN3_IN6_ADDR/128 dev eth0
#MN1->MN3
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MN1_CH1_MR2_MN3 labelspace 0 proto ipv6
#MN3->MN2
var=`mpls nhlfe add key 0 instructions push gen $MN3_MR2_CH2_MN2 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
sudo ip -6 route add $MN2_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
#MN2->MN3
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MN2_CH2_MR2_MN3 labelspace 0 proto ipv6
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_outdoor.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_outdoor.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_parking.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
#Lamia, Philippe huu nghia, 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr2_conf_nas_barca_parking.sh
./mr2_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR2_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_IN6_ADDR -N $MR2_EG6_ADDR -E $MR2_IN6_ADDR1" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 1 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 4
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 5
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 8 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.2.5
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 4
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 5
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 5
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
#!/bin/bash
source params.sh
sleep 1
export OPENAIR1_DIR
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Launching AS and RF
./start_openair.sh 6 10
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
sudo ifconfig eth0 10.0.2.5
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 10.0.0.5
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 12
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MN2_MR3_CH2_MN3 -m $MN3_CH2_MR3_MN2 -r 13
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 13
echo EADS Multicast for MR3
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c3 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c4 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.10 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c5 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c6 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.11 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c7 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c8 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.12 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c9 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c10 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.13 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c11 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c12 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.14 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c13 -i0 -z0 -s $MR3_IN_ADDR -t 226.30.10.15 -r 12
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c14 -i0 -z0 -s $CH2_IN_ADDR -t 226.30.10.15 -r 12
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c15 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Multicast state launched with config_mr3
xterm -hold -e /usr/bin/perl $REFLECTOR_DIR/reflector_launch.pl $REFLECTOR_DIR $REFLECTOR_DIR/config_mr3 &
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr3
echo "0" > /sys/mpls/debug
echo 'MN1->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
echo 'MN2->MN1'
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
sudo ip -6 route add $MN2_IN6_ADDR/128 dev $ETH_MR3
echo 'MN3->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN3_CH2_MR3_MN2 labelspace 0 proto ipv6
echo 'MN2->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN2_MR3_CH2_MN3 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe, Hicham 18 Feb 2009
source params.sh
sudo modprobe mpls6
echo Setting MPLS for mr3
echo "0" > /sys/mpls/debug
echo 'MN1->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
echo 'MN2->MN1'
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
sudo ip -6 route add $MN2_IN6_ADDR/128 dev $ETH_MR3
echo 'MN3->MN2'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MN3_CH2_MR3_MN2 labelspace 0 proto ipv6
echo 'MN2->MN3'
var=`mpls nhlfe add key 0 instructions push gen $MN2_MR3_CH2_MN3 nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN3_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca_outdoor.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#Phil, Lamia 10 Oct 08
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
./mr3_conf_nas_barca_parking.sh
./mr3_mpls_nas_barca.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth0 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth0
#sudo xterm -hold -e "$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR" &
watch -n1 "cat /proc/openair2/lchan_stats ; cat /proc/openair1/bch_stats"
./stop_rf.sh
./del_mpls.sh
sleep 2
./del_mpls.sh
#!/bin/bash
MR1_IN_ADDR=10.0.1.3
MR1_IN6_ADDR=2001:10:0:1:7856:3412:0:2
MR1_EG_ADDR=192.168.9.1
MR1_EG6_ADDR=2001:660:5502::100
# Flow CH1->MR1
MR1_LABEL_IN=1001
# Flow MR1->CH1
MR1_LABEL_OUT=1000
ETH_MR1=eth0
MR2_IN_ADDR=10.0.1.4
MR2_IN6_ADDR1=2001:10:0:1:7856:3412:0:3
MR2_IN6_ADDR2=2001:10:0:2:7856:3412:0:3
MR2_EG6_ADDR=2001:660:5502::300
ETH_MR2=eth0
# Flow CH1->MR2
MR2_CH1_LABEL_IN=2000
# Flow MR2->CH1
MR2_CH1_LABEL_OUT=2001
# Flow CH2->MR2
MR2_CH2_LABEL_IN=3001
# Flow MR2->CH2
MR2_CH2_LABEL_OUT=3000
MR3_IN_ADDR=10.0.1.5
MR3_IN6_ADDR=2001:10:0:2:7856:3412:0:2
MR3_EG_ADDR=192.168.10.1
MR3_EG6_ADDR=2001:660:5502::200
# Flow CH2->MR3
MR3_LABEL_IN=4000
# Flow MR3->CH2
MR3_LABEL_OUT=4001
ETH_MR3=eth2
CH1_IN_ADDR=10.0.1.1
CH2_IN_ADDR=10.0.1.2
CH1_IN6_ADDR=2001:10:0:1:7856:3412:0:1
CH2_IN6_ADDR=2001:10:0:2:7856:3412:0:1
## Communication between the CHs
CH1_MR2_CH2_LABEL_IN=8001
CH1_MR2_CH2_LABEL_OUT=8000
CH2_MR2_CH1_LABEL_IN=9001
CH2_MR2_CH1_LABEL_OUT=9000
## Com between MN1 and MN3
MN1_MR1_CH1_MN3=1500
MN3_CH1_MR1_MN1=1501
MN1_CH1_MR2_MN3=2500
MN3_MR2_CH1_MN1=2501
## Com between MN2 and MN3
MN3_MR2_CH2_MN2=3500
MN2_CH2_MR2_MN3=3501
MN3_CH2_MR3_MN2=4500
MN2_MR3_CH2_MN3=4501
#MN1_IN6_ADDR=2001:660:5502::20
#MN2_IN6_ADDR=2001:660:5502::25
MN1_IN6_ADDR=2001:660:5502::110
MN1_IN_ADDR=192.168.9.2
MN2_IN6_ADDR=2001:660:5502::210
MN3_IN6_ADDR=2001:660:5502::310
MN2_IN_ADDR=192.168.10.2
# Put the right OPENAIR3 path here
OPENAIR3_HOME=/root/openair_trials_2/openair3
OPENAIR3_PMIP6D_PATH=$OPENAIR3_HOME/pmip6d
OPENAIR3_SCRIPTS_PATH=$OPENAIR3_HOME/scripts
REFLECTOR_DIR=$OPENAIR3_HOME/EXAMPLES/BARCA_TRIALS/REFLECTOR
# Put the right OPENAIR2 path here
#OPENAIR2_DIR=~/openair2_r234/openair2/
OPENAIR2_DIR=/root/openair_trials_2/openair2
if [ "$1" == "" ]; then
echo "Please provide a TX power level (0-8)"
exit
fi
if [ "$2" == "" ]; then
echo "Please provide a Node ID (0-7 for CH, 8-15 for MR/UE)"
exit
fi
if [ "$OPENAIR1_DIR" == "" ] ; then
echo "Please set OPENAIR1_DIR environment variable"
exit
else
echo "OPENAIR1_DIR Set to $OPENAIR1_DIR"
fi
cd $OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF
source ./txgains.sh
case $1 in
0)
CBMIMO1_POWER=$CBMIMO1_m20_dBm
echo "Configuring CBMIMO1 for -20dBm ($CBMIMO1_POWER)"
;;
1)
CBMIMO1_POWER=$CBMIMO1_m15_dBm
echo Configuring CBMIMO1 for -15dBm
;;
2)
CBMIMO1_POWER=$CBMIMO1_m10_dBm
echo Configuring CBMIMO1 for -10dBm
;;
3)
CBMIMO1_POWER=$CBMIMO1_m5_dBm
echo Configuring CBMIMO1 for -5dBm
;;
4)
CBMIMO1_POWER=$CBMIMO1_0_dBm
echo Configuring CBMIMO1 for 0dBm
;;
5)
CBMIMO1_POWER=$CBMIMO1_5_dBm
echo Configuring CBMIMO1 for 5dBm
;;
6)
CBMIMO1_POWER=$CBMIMO1_10_dBm
echo Configuring CBMIMO1 for 10dBm
;;
7)
CBMIMO1_POWER=$CBMIMO1_15_dBm
echo Configuring CBMIMO1 for 15dBm
;;
8)
CBMIMO1_POWER=$CBMIMO1_20_dBm
echo Configuring CBMIMO1 for 20dBm
;;
*)
echo Invalid TX power
exit
esac
echo Removing openair_rf,openair_l2 and openair_rrc modules
sudo rmmod -f openair_rrc
sudo rmmod -f openair_l2
sudo rmmod -f openair_rf
sudo insmod $OPENAIR1_DIR/ARCH/CBMIMO1/DEVICE_DRIVER/openair_rf_l2.ko
OARF_RET=`lsmod | grep -e openair_rf`
if [ "$OARF_RET" = "" ]; then
echo Error loading openair1 module
exit
fi
sudo insmod $OPENAIR2_DIR/LAYER2/openair_layer2.ko
OA2_RET=`lsmod | grep -e openair_l2`
if [ "$OA2_RET" = "" ]; then
echo Error loading openair2 module
exit
fi
sudo insmod $OPENAIR2_DIR/RRC/MESH/openair_RRC.ko
OARRC_RET=`lsmod | grep -e openair_rrc`
if [ "$OARRC_RET" = "" ]; then
echo Error loading openair RRC module
exit
fi
OA_DEV="/dev/openair0"
if [ -c "$OA_DEV" ]; then
echo "$OA_DEV exists"
else
echo "creating $OA_DEV"
sudo mknod $OA_DEV c 127 0
sudo chmod a+rw /dev/openair0
fi
./openair_rf_cbmimo1 1 0
./openair_rf_cbmimo1 1 6 $CBMIMO1_POWER
if [ $2 -lt "8" ]; then
./openair_rf_cbmimo1 1 1 1 $2
elif [ $2 -lt "16" ]; then
./openair_rf_cbmimo1 1 3 1 $2
else
echo Illegal Node ID, exiting
exit
fi
sleep 1
# Watch the status of the radio to check for hardware exit event
#OA1_STATE=`cat /proc/openair1/openair1_state`
#while [ "$OA1_STATE" != "EXITED" ]; do
# OA1_STATE=`cat /proc/openair1/openair1_state`
# sleep .5
#done
#./openair_rf_cbmimo1 1 4 1
#echo CBMIMO1 Hardware exit, restarting ...
cd $OPENAIR1_DIR/USERSPACE_TOOLS/OPENAIR_RF
echo STOP STARTS...
./openair_rf_cbmimo1 1 4 1
sleep 2
echo STOP RF DONE
sudo killall chbch_scope
echo STOP CHBCH SCOPE DONE
sudo killall sach_scope
echo STOP_SACH SCOPE DONE
sleep 1
sudo rmmod nasmesh
sleep 1
echo REMOVE NASMESH MODULE DONE
sudo rmmod openair_rrc
sleep 1
echo REMOVE RRC MODULE DONE
sudo rmmod openair_l2
sleep 1
echo REMOVE LAYER2 MODULE DONE
sudo rmmod openair_rf
echo REMOVE RF MODULE DONE
echo STOP FINISHED SUCCESSFULLY
Cluster Head (1) – with NAS_MPLS_PMIP working
CH1_NAS.SH
#!/bin/bash
#Phil, 25 july 08
source params.sh
./ch1_conf_nas.sh
#MN1MN2
./ch1_mpls_nas.sh $MR1_LABEL_OUT $MR2_IN_ADDR $MR2_LABEL_IN
#MN2MN1
./ch1_mpls_nas.sh $MR2_LABEL_OUT $MR1_IN_ADDR $MR1_LABEL_IN
echo /openair3/pmip6d/pmip6d -c -L $CH1_ADDR
/openair3/pmip6d/pmip6d -c -L $CH1_ADDR
./ch1_del_mpls.sh
CH1_CONF_NAS.SH
#!/bin/bash
source params.sh
echo Clusterhead address is $CH_ADDR
# Installing NASMESH driver
rmmod -f nasmesh
insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH
#CH1<-> MR1 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $CH1_ADDR -y $MR1_IN_ADDR -r 12
#CH1<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_IN -m $MR1_LABEL_OUT -r 13
#CH1<-> MR2 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH_ADDR -y $MR2_IN_ADDR -r 20
#CH1<-> MR2 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_LABEL_IN -m $MR2_LABEL_OUT -r 21
#CH1 Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH1_ADDR -y ff02::1 -r 3
echo Configuring interfaces on CH
# Setup IPv4 multicast route for openair emulation
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
# Bring up openair NASMESH device and set IPv6 address
ifconfig nasmesh0 up
ip addr add 10.0.0.1/24 dev nasmesh0
ip -6 addr add $CH1_ADDR/64 dev nasmesh0
echo nasmesh0 is $CH1_ADDR
echo No MPLS debug
echo "0" >/sys/mpls/debug
sleep 1
echo Launching AS simulator
export OPENAIR2_DIR
xterm -hold -e sh start_openair2_ch1.sh &
sleep 1
CH1_MPLS_NAS.SH
#!/bin/bash
#Script by Lamia Romdhani
#June 2008
echo Setting MPLS for CH
modprobe mpls6
echo Number of params = $#
if [ $# -eq 3 ]; then
LABEL_IN=$1
IP_NEXT_HOP=$2
LABEL_OUT=$3
echo "IP Next Hop is $IP_NEXT_HOP"
echo 'Starting mpls'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $LABEL_IN labelspace 0 proto ipv6
var=`mpls nhlfe add key 0 instructions push gen $LABEL_OUT nexthop nasmesh0 ipv6 $IP_NEXT_HOP |grep key | cut -c 17-26`
mpls xc add ilm_label gen $LABEL_IN ilm_labelspace 0 nhlfe_key $var
else
echo usage: ch1_mpls_dyntest_nas.sh LABEL_IN IP_NEXT_HOP LABEL_OUT
fi
Cluster Head (2)– with NAS_MPLS_PMIP working
CH2_NAS.SH
#!/bin/bash
#Phil, 25 july 08
source params.sh
./ch2_conf_nas.sh
#MN1MN2
./ch2_mpls_nas.sh $MR2_CH2_LABEL_OUT $MR3_IN_ADDR $MR2_LABEL_IN
#MN2MN1
./ch_mpls_nas.sh $MR2_LABEL_OUT $MR2_IN_ADDR $MR2_CH2_LABEL_IN
echo /openair3/pmip6d/pmip6d -c -L $CH2_ADDR
/openair3/pmip6d/pmip6d -c -L $CH2_ADDR
./ch2_del_mpls.sh
CH2_CONF_NAS.SH
#!/bin/bash
source params.sh
echo Clusterhead address is $CH2_ADDR
# Installing NASMESH driver
rmmod -f nasmesh
insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH2
#CH2<-> MR2 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $CH2_ADDR -y $MR2_IN_ADDR -r 12
#CH<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR2_CH2_LABEL_IN -m $MR2_CH2_LABEL_OUT -r 13
#CH2<-> MR3 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH2_ADDR -y $MR3_IN_ADDR -r 20
#CH2<-> MR3 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_IN -m $MR3_LABEL_OUT -r 21
#CH2 Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH2_ADDR -y ff02::1 -r 3
echo Configuring interfaces on CH2
# Setup IPv4 multicast route for openair emulation
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
# Bring up openair NASMESH device and set IPv6 address
ifconfig nasmesh0 up
ip addr add 10.0.0.1/24 dev nasmesh0
ip -6 addr add $CH2_ADDR/64 dev nasmesh0
echo nasmesh0 is $CH2_ADDR
echo No MPLS debug
echo "0" >/sys/mpls/debug
sleep 1
echo Launching AS simulator
export OPENAIR2_DIR
xterm -hold -e sh start_openair2_ch2.sh &
sleep 1
CH2_MPLS_NAS.SH
#!/bin/bash
#Script by Lamia Romdhani
#June 2008
echo Setting MPLS for CH2
modprobe mpls6
echo Number of params = $#
if [ $# -eq 3 ]; then
LABEL_IN=$1
IP_NEXT_HOP=$2
LABEL_OUT=$3
echo "IP Next Hop is $IP_NEXT_HOP"
echo 'Starting mpls'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $LABEL_IN labelspace 0 proto ipv6
var=`mpls nhlfe add key 0 instructions push gen $LABEL_OUT nexthop nasmesh0 ipv6 $IP_NEXT_HOP |grep key | cut -c 17-26`
mpls xc add ilm_label gen $LABEL_IN ilm_labelspace 0 nhlfe_key $var
else
echo usage: ch_mpls_dyntest_nas.sh LABEL_IN IP_NEXT_HOP LABEL_OUT
fi
MR1_NAS.SH
source params.sh
sysctl -w net.ipv6.conf.all.forwarding=1
$OPENAIR3_SCRIPTS_PATH/mr1_conf_nas.sh
$OPENAIR3_SCRIPTS_PATH/mr1_mpls_nas.sh
sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
ifconfig eth0 promisc
ip -6 addr add $MR1_EG_ADDR/64 dev eth0
$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH1_ADDR -N $MR1_EG_ADDR -E $MR1_IN_ADDR
$OPENAIR3_SCRIPTS_PATH/mr1_del_mpls.sh
MR1_CONF_NAS.SH
source params.sh
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Installing NASMESH Driver
rmmod -f nasmesh
insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x02000000
echo Classifcation rule for DTCH-Broadcast - reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Configuring interfaces on mr1
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth4
ifconfig nasmesh0 up
ifconfig namsesh0 10.0.1.2
ip -6 addr add 2001:10:0:1:7856:3412:0:2/64 dev nasmesh0
echo Launching AS simulator
xterm -hold -e sh start_openair2_mr1.sh &
#echo "Waiting for Router ADV from CH (DTCH Broadcast test)"
#IPv6ADR=`ip addr show dev nasmesh0 | grep -e inet6 | egrep -v fe80 | cut -d " " -f6 | cut -d "/" -f1`
#while [ -z $IPv6ADR ] ; do
# sleep 1
# IPv6ADR=`ip addr show dev nasmesh0 | grep -e inet6 | egrep -v fe80 | cut -d " " -f6 | cut -d "/" -f1`
#done
#echo Got Router ADV : IPv6 address is $IPv6ADR
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $IPv6ADR -y $CH1_ADDR -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x 2001:10:0:1:7856:3412:0:2 -y $CH1_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
echo eth0 is $MR1_EG_ADDR
#echo Starting routing ...
#echo No MPLS debug
#echo "1" >/sys/mpls/debug
MR1_MPLS_NAS.SH
#!/bin/bash
# Script by Lamia Romdhani, Nghia, Philippe 08 july 2008
# June 2008
source params.sh
modprobe mpls6
echo Setting MPLS for mr1
echo "0" > /sys/mpls/debug
echo 'MN2->MN1'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $MR1_LABEL_IN labelspace 0 proto ipv6
echo 'MN1->MN2'
var=`mpls nhlfe add key 0 instructions push gen $MR1_LABEL_OUT nexthop nasmesh0 ipv6 $CH1_ADDR | grep key |cut -c 17-26`
echo "Creating routes"
ip -6 route add $MN2_ADDR/128 via $CH1_ADDR mpls $var
ip -6 route add $MN1_ADDR/128 dev eth0
Mobile Router 2 – with NAS_MPLS_PMIP working
MR2_NAS.SH
source params.sh
sysctl -w net.ipv6.conf.all.forwarding=1
$OPENAIR3_SCRIPTS_PATH/mr2_del_mpls.sh
$OPENAIR3_SCRIPTS_PATH/mr2_conf_nas.sh
#$OPENAIR3_SCRIPTS_PATH/mr2_mpls_nas.sh
#MN1MN2
$OPENAIR3_SCRIPTS_PATH/mr2_mpls_nas.sh $MR2_CH1_LABEL_IN $CH2_IN_ADDR $MR2_CH2_LABEL_OUT
#MN2MN1
$OPENAIR3_SCRIPTS_PATH/mr2_mpls_nas.sh $MR2_CH2_LABEL_IN $CH1_IN_ADDR $MR1_CH1_LABEL_OUT
#/etc/init.d/radvd status
#/etc/init.d/radvd start
#radvdump
sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
ifconfig eth0 promisc
ip -6 addr add $MR2_EG_ADDR/64 dev eth0
$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH_ADDR -N $MR2_EG_ADDR -E $MR2_IN_ADDR
$OPENAIR3_SCRIPTS_PATH/mr2_del_mpls.sh
MR2_CONF_NAS.SH
source params.sh
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Installing NASMESH Driver
rmmod -f nasmesh
insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast -reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Configuring interfaces on mr2
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth2
ifconfig nasmesh0 up
ifconfig nasmesh0 10.0.0.3
ip -6 addr add 2001:10:0:1:7856:3412:0:3/64 dev nasmesh0
echo Launching AS simulator
xterm -hold -e sh start_openair2_mr2.sh &
#echo Waiting for Router ADV from CH
#IPv6ADR=`ip addr show dev nasmesh0 | grep -e inet6 | egrep -v fe80 | cut -d " " -f6 | cut -d "/" -f1`
#while [ -z $IPv6ADR ] ; do
# sleep 1
# IPv6ADR=`ip addr show dev nasmesh0 | grep -e inet6 | egrep -v fe80 | cut -d " " -f6 | cut -d "/" -f1`
#done
#echo Got Router ADV : IPv6 address is $IPv6ADR
echo Classification rules for MR2 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $IPv6ADR -y $CH_ADDR -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x 2001:10:0:1:7856:3412:0:3 -y $CH_ADDR -r 4
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x 2001:10:0:1::9a03 -y 2001:10:0:1::1 -r 4
echo Classification rules for MR2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR2_LABEL_OUT -m $MR2_LABEL_IN -r 5
echo eth0 is $MR1_EG_ADDR
MR2_MPLS_NAS.SH
#!/bin/bash
#Script by Lamia Romdhani
#September 2008
echo No MPLS debug
echo "0" >/sys/mpls/debug
echo Setting MPLS for CH
modprobe mpls6
echo Number of params = $#
if [ $# -eq 3 ]; then
LABEL_IN=$1
IP_NEXT_HOP=$2
LABEL_OUT=$3
echo "IP Next Hop is $IP_NEXT_HOP"
echo 'Starting mpls'
mpls labelspace set dev nasmesh0 labelspace 0
mpls ilm add label gen $LABEL_IN labelspace 0 proto ipv6
var=`mpls nhlfe add key 0 instructions push gen $LABEL_OUT nexthop nasmesh0 ipv6 $IP_NEXT_HOP |grep key | cut -c 17-26`
mpls xc add ilm_label gen $LABEL_IN ilm_labelspace 0 nhlfe_key $var
else
echo usage: ch_mpls_dyntest_nas.sh LABEL_IN IP_NEXT_HOP LABEL_OUT
fi
Mobile Router 3 – with NAS_MPLS_PMIP working
MR3_NAS.SH
source params.sh
sysctl -w net.ipv6.conf.all.forwarding=1
$OPENAIR3_SCRIPTS_PATH/mr3_del_mpls.sh
$OPENAIR3_SCRIPTS_PATH/mr3_conf_nas.sh
$OPENAIR3_SCRIPTS_PATH/mr3_mpls_nas.sh
#/etc/init.d/radvd status
#/etc/init.d/radvd start
#radvdump
sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
ifconfig eth0 promisc
ip -6 addr add $MR3_EG_ADDR/64 dev eth0
$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_ADDR -N $MR3_EG_ADDR -E $MR3_IN_ADDR
$OPENAIR3_SCRIPTS_PATH/mr3_del_mpls.sh
MR3_CONF_NAS.SH
source params.sh
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Installing NASMESH Driver
rmmod -f nasmesh
insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast -reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Configuring interfaces on mr3
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth2
ifconfig nasmesh0 up
ifconfig nasmesh0 10.0.0.3
ip -6 addr add 2001:10:0:1:7856:3412:0:3/64 dev nasmesh0
echo Launching AS simulator
xterm -hold -e sh start_openair2_mr3.sh &
#echo Waiting for Router ADV from CH
#IPv6ADR=`ip addr show dev nasmesh0 | grep -e inet6 | egrep -v fe80 | cut -d " " -f6 | cut -d "/" -f1`
#while [ -z $IPv6ADR ] ; do
# sleep 1
# IPv6ADR=`ip addr show dev nasmesh0 | grep -e inet6 | egrep -v fe80 | cut -d " " -f6 | cut -d "/" -f1`
#done
#echo Got Router ADV : IPv6 address is $IPv6ADR
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $IPv6ADR -y $CH2_ADDR -r 4
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x 2001:10:0:1:7856:3412:0:3 -y $CH2_ADDR -r 4
#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x 2001:10:0:1::9a03 -y 2001:10:0:1::1 -r 4
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 5
echo eth0 is $MR1_EG_ADDR
MR3_MPLS_NAS.SH
#!/bin/bash
# Author: Lamia Romdhani
#June 2008
source params.sh
modprobe mpls6
echo Starting routing ...
echo No MPLS debug
echo "0" >/sys/mpls/debug
echo Setting MPLS for mr2
echo 'MN2->MN1'
# add label 3000 and forward the packets to mr2, for destination MN1
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_ADDR |grep key | cut -c 17-26`
ip -6 route add $MN1_ADDR/128 via $CH2_ADDR mpls $var
ip -6 route add $MN2_ADDR/128 dev eth0
echo 'MN1->MN2'
#pop label 1003 and do Ip lookup.
mpls labelspace set dev nasmesh0 labelspace 0
# MR3_LABEL_IN is 1003
mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
#!/bin/bash
source params.sh
echo Clusterhead address is $CH_ADDR
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH
#CH1<-> MR1 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $CH1_IN6_ADDR -y $MR1_IN6_ADDR -r 12
#CH1<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_IN -m $MR1_LABEL_OUT -r 13
#CH1<-> MR2 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH1_IN6_ADDR -y $MR2_IN6_ADDR1 -r 20
#CH1<-> MR2 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH1_LABEL_IN -m $MR2_CH1_LABEL_OUT -r 21
#CH1 Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH1_IN6_ADDR -y ff02::1 -r 3
echo Configuring interfaces on CH
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add $CH1_IN_ADDR/24 dev nasmesh0
sudo ip -6 addr add $CH1_IN6_ADDR/64 dev nasmesh0
echo nasmesh0 is $CH1_IN6_ADDR
echo No MPLS debug
sudo sh -c 'echo "0" >/sys/mpls/debug'
sleep 1
echo Launching AS simulator
export OPENAIR2_DIR
xterm -hold -e sh start_openair2_ch1.sh &
sleep 1
#Cluster Head (1) – with NAS_MPLS_PMIP working
#!/bin/bash
#Phil, 25 july 08
source params.sh
./ch1_conf_nas.sh
#MN1MN2
./mpls_nas.sh $MR1_LABEL_OUT $MR2_IN6_ADDR1 $MR2_CH1_LABEL_IN
#MN2MN1
./mpls_nas.sh $MR2_CH1_LABEL_OUT $MR1_IN6_ADDR $MR1_LABEL_IN
#echo $OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH1_IN6_ADDR
#$OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH1_IN6_ADDR
#./del_mpls.sh
#!/bin/bash
source params.sh
echo Clusterhead address is $CH2_IN6_ADDR
# Installing NASMESH driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x01000000
echo Classification rules for CH2
#CH2<-> MR2 IP Signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $CH2_IN6_ADDR -y $MR2_IN6_ADDR2 -r 20
#CH<-> MR1 MPLS user-plane bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR2_CH2_LABEL_IN -m $MR2_CH2_LABEL_OUT -r 21
#CH2<-> MR3 (IP Signaling)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $CH2_IN6_ADDR -y $MR3_IN6_ADDR -r 28
#CH2<-> MR3 (MPLS user-plane bearer)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR3_LABEL_IN -m $MR3_LABEL_OUT -r 29
#CH2 Broadcast (transmission of Router ADV)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x $CH2_IN6_ADDR -y ff02::1 -r 3
echo Configuring interfaces on CH2
# Bring up openair NASMESH device and set IPv6 address
sudo ifconfig nasmesh0 up
sudo ip addr add $CH2_IN_ADDR/24 dev nasmesh0
sudo ip -6 addr add $CH2_IN6_ADDR/64 dev nasmesh0
echo nasmesh0 is $CH2_IN6_ADDR
echo No MPLS debug
sudo sh -c 'echo "0" >/sys/mpls/debug'
sleep 1
echo Launching AS simulator
export OPENAIR2_DIR
xterm -hold -e sh start_openair2_ch2.sh &
sleep 1
#Cluster Head (2)– with NAS_MPLS_PMIP working
#CH2_NAS.SH
#!/bin/bash
#Phil, 25 july 08
source params.sh
./ch2_conf_nas.sh
#MN1MN2
./mpls_nas.sh $MR2_CH2_LABEL_OUT $MR3_IN6_ADDR $MR3_LABEL_IN
#MN2MN1
./mpls_nas.sh $MR3_LABEL_OUT $MR2_IN6_ADDR2 $MR2_CH2_LABEL_IN
#echo $OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR
#$OPENAIR3_HOME/pmip6d/pmip6d -c -L $CH2_IN6_ADDR
#./del_mpls.sh
#!/bin/bash
#Script by Irina Dumitrascu (dumitrascu.irina@gmail.com) and Adrian Popa (adrian.popa.gh@gmail.com)
#June 2006
#Released under GPL
#Added by phil, Huu Nghia, 8 July 08
echo Deleting all mpls - xc settings
xc_output="`mpls xc show | cut -c 9-75`"
number_of_lines=`echo $xc_output|wc -l`
for i in `seq 1 $number_of_lines`
do
xc_output_line="`echo $xc_output| head -$i | tail -1`"
echo Deleting: mpls xc del $xc_output_line
mpls xc del $xc_output
#increment i
i=`expr $i+1`
done
echo Deleting all mpls - ip route settings
nr_of_lines=` ip route show |grep mpls |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`ip route show |grep mpls |head -1`
echo Deleting: ip route del $output
ip route del $output
i=`expr $i+1`
done
var1=`ip route show table 1`
if [ ! -z "$var1" ]; then
ip route del table 1
#var1=`ip route show table 1`
#ip route del $var1 table 1
ip route flush table 1
echo "clearing ip route table 1"
fi
var1=`ip route show table 2`
if [ ! -z "$var1" ]; then
ip route del table 2
# var1=`ip route show table 2`
# ip route del $var1 table 2
ip route flush table 2
echo "clearing ip route table 2"
fi
#echo Flushing iptables chains
#iptables -F
#echo Flushing iptables -t nat
#iptables -t nat -F
#echo Flushing iptables -t mangle
#iptables -t mangle -F
echo Deleting all mpls - nhlfe settings
nr_of_lines=` mpls nhlfe show |grep key |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls nhlfe show |grep key |cut -c 17-26 |head -1`
echo Deleting: mpls nhlfe del key $output
mpls nhlfe del key $output
i=`expr $i+1`
done
echo Deleting all mpls - labelspace settings
nr_of_lines=`mpls labelspace show |grep -v "labelspace -1" |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls labelspace show |grep -v "labelspace -1"|cut -c 17-37 |head -1`
echo Deleting: mpls labelspace set $output -1
mpls labelspace set $output -1
i=`expr $i+1`
done
echo Deleting all mpls - ilm settings
nr_of_lines=`mpls ilm show |grep ILM |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls ilm show |grep ILM |cut -c 10-37 |head -1`
echo Deleting: mpls ilm del $output
mpls ilm del $output
i=`expr $i+1`
done
var1=`tc qdisc show |grep eth0 |grep htb`
if [ ! -z "$var1" ]; then
tc qdisc del dev eth0 root
echo "tc clear eth0"
fi
var2=`tc qdisc show |grep eth3 |grep htb`
if [ ! -z "$var2" ]; then
tc qdisc del dev eth3 root
echo "tc clear eth3"
fi
var3=`tc qdisc show |grep eth1 |grep htb`
if [ ! -z "$var3" ]; then
tc qdisc del dev eth1 root
echo "tc clear eth1"
fi
var4=`tc qdisc show |grep eth2 |grep htb`
if [ ! -z "$var4" ]; then
tc qdisc del dev eth2 root
echo "tc clear eth2"
fi
#!/bin/bash
#Huu-Nghia, Philippe, Lamia 28 june 2008
#echo Deleting MN1 autoconfigured addresse
#$OPENAIR3_SCRIPTS_PATH/mn1_del.sh
#ip -6 route add 2001:660:5502::25/128 via 2001:660:5502::10 dev eth0
ip -6 addr del 2001:660:5502::15/64 dev eth0
ip -6 addr add 2001:660:5502::15/64 dev eth0
#!/bin/bash
#Script by Lamia Romdhani
#June 2008
echo Setting MPLS
sudo modprobe mpls6
echo Number of params = $#
if [ $# -eq 3 ]; then
LABEL_IN=$1
IP_NEXT_HOP=$2
LABEL_OUT=$3
echo "IP Next Hop is $IP_NEXT_HOP"
echo 'Starting mpls'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $LABEL_IN labelspace 0 proto ipv6
var=`mpls nhlfe add key 0 instructions push gen $LABEL_OUT nexthop nasmesh0 ipv6 $IP_NEXT_HOP |grep key | cut -c 17-26`
sudo mpls xc add ilm_label gen $LABEL_IN ilm_labelspace 0 nhlfe_key $var
else
echo usage: mpls_nas.sh LABEL_IN IP_NEXT_HOP LABEL_OUT
fi
source params.sh
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast -reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Configuring interfaces on mr1
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 $MR1_IN_ADDR
sudo ip -6 addr add $MR1_IN6_ADDR/64 dev nasmesh0
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth1
echo Launching AS simulator
xterm -hold -e sh start_openair2_mr1.sh &
echo Classification rules for MR1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR1_IN6_ADDR -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR1_LABEL_OUT -m $MR1_LABEL_IN -r 5
#!/bin/bash
#Script by Irina Dumitrascu (dumitrascu.irina@gmail.com) and Adrian Popa (adrian.popa.gh@gmail.com)
#June 2006
#Released under GPL
#Added by phil, Huu Nghia, 8 July 08
ip -6 route del $MN2_ADDR/128 via $CH_ADDR
ip -6 route del $MN1_ADDR/128 dev eth0
echo Deleting all mpls - xc settings
xc_output="`mpls xc show | cut -c 9-75`"
number_of_lines=`echo $xc_output|wc -l`
for i in `seq 1 $number_of_lines`
do
xc_output_line="`echo $xc_output| head -$i | tail -1`"
echo Deleting: mpls xc del $xc_output_line
mpls xc del $xc_output
#increment i
i=`expr $i+1`
done
echo Deleting all mpls - ip route settings
nr_of_lines=` ip route show |grep mpls |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`ip route show |grep mpls |head -1`
echo Deleting: ip route del $output
ip route del $output
i=`expr $i+1`
done
var1=`ip route show table 1`
if [ ! -z "$var1" ]; then
ip route del table 1
#var1=`ip route show table 1`
#ip route del $var1 table 1
ip route flush table 1
echo "clearing ip route table 1"
fi
var1=`ip route show table 2`
if [ ! -z "$var1" ]; then
ip route del table 2
# var1=`ip route show table 2`
# ip route del $var1 table 2
ip route flush table 2
echo "clearing ip route table 2"
fi
#echo Flushing iptables chains
#iptables -F
#echo Flushing iptables -t nat
#iptables -t nat -F
#echo Flushing iptables -t mangle
#iptables -t mangle -F
echo Deleting all mpls - nhlfe settings
nr_of_lines=` mpls nhlfe show |grep key |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls nhlfe show |grep key |cut -c 17-26 |head -1`
echo Deleting: mpls nhlfe del key $output
mpls nhlfe del key $output
i=`expr $i+1`
done
echo Deleting all mpls - labelspace settings
nr_of_lines=`mpls labelspace show |grep -v "labelspace -1" |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls labelspace show |grep -v "labelspace -1"|cut -c 17-37 |head -1`
echo Deleting: mpls labelspace set $output -1
mpls labelspace set $output -1
i=`expr $i+1`
done
echo Deleting all mpls - ilm settings
nr_of_lines=`mpls ilm show |grep ILM |wc -l`
for i in `seq 1 $nr_of_lines `
do
output=`mpls ilm show |grep ILM |cut -c 10-37 |head -1`
echo Deleting: mpls ilm del $output
mpls ilm del $output
i=`expr $i+1`
done
var1=`tc qdisc show |grep eth0 |grep htb`
if [ ! -z "$var1" ]; then
tc qdisc del dev eth0 root
echo "tc clear eth0"
fi
var2=`tc qdisc show |grep eth3 |grep htb`
if [ ! -z "$var2" ]; then
tc qdisc del dev eth3 root
echo "tc clear eth3"
fi
var3=`tc qdisc show |grep eth1 |grep htb`
if [ ! -z "$var3" ]; then
tc qdisc del dev eth1 root
echo "tc clear eth1"
fi
var4=`tc qdisc show |grep eth2 |grep htb`
if [ ! -z "$var4" ]; then
tc qdisc del dev eth2 root
echo "tc clear eth2"
fi
#!/bin/bash
# Author: Lamia Romdhani
#June 2008
source params.sh
sudo modprobe mpls6
echo Starting routing ...
echo No MPLS debug
sudo sh -c 'echo 0 >/sys/mpls/debug'
echo 'MN1->MN2'
var=`mpls nhlfe add key 0 instructions push gen $MR1_LABEL_OUT nexthop nasmesh0 ipv6 $CH1_IN6_ADDR | grep key |cut -c 17-26`
echo "Creating routes"
echo Setting MPLS for mr1
echo 'MN2->MN1'
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR1_LABEL_IN labelspace 0 proto ipv6
sudo ip -6 route add $MN1_IN6_ADDR/128 dev eth1
sudo ip -6 route add $MN2_IN6_ADDR/128 via $CH1_IN6_ADDR mpls $var
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
#./del_mpls.sh
./mr1_conf_nas.sh
./mr1_mpls_nas.sh
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth1 promisc
sudo ip -6 addr add $MR1_EG6_ADDR/64 dev eth1
#$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR
#./del_mpls.sh
source params.sh
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast -reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 3
echo Configuring interfaces on mr2
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 $MR2_IN_ADDR
sudo ip -6 addr add $MR2_IN6_ADDR1/64 dev nasmesh0
sudo ip -6 addr add $MR2_IN6_ADDR2/64 dev nasmesh0
echo Launching AS simulator
xterm -hold -e sh start_openair2_mr2.sh &
echo Classification rules for MR2- Cluster 1 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR2_IN6_ADDR1 -y $CH1_IN6_ADDR -r 4
echo Classification rules for MR2- Cluster 1 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR2_CH1_LABEL_OUT -m $MR2_CH1_LABEL_IN -r 5
echo Classification rules for MR2 -Cluster 2 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -x $MR2_IN6_ADDR2 -y $CH2_IN6_ADDR -r 12
echo Classification rules for MR2 -Cluster 2 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -l $MR2_CH2_LABEL_OUT -m $MR2_CH2_LABEL_IN -r 13
source params.sh
sysctl -w net.ipv6.conf.all.forwarding=1
./del_mpls.sh
./mr2_conf_nas.sh
#MN1MN2
./mpls_nas.sh $MR2_CH1_LABEL_IN $CH2_IN6_ADDR $MR2_CH2_LABEL_OUT
#MN2MN1
./mpls_nas.sh $MR2_CH2_LABEL_IN $CH1_IN6_ADDR $MR2_CH1_LABEL_OUT
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
source params.sh
export OPENAIR2_DIR
#echo "0" >/proc/sys/net/ipv6/conf/all/forwarding
echo Installing NASMESH Driver
sudo rmmod -f nasmesh
sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko nas_IMEI=0x12345678,0x03000000
echo Classifcation rule for DTCH-Broadcast -reception of Router ADV
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -x ff02::1 -y ff02::1 -r 11
echo Configuring interfaces on mr3
sudo ifconfig nasmesh0 up
sudo ifconfig nasmesh0 $MR3_IN_ADDR
sudo ip -6 addr add $MR3_IN6_ADDR/64 dev nasmesh0
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth3
echo Launching AS simulator
sudo xterm -hold -e sh start_openair2_mr3.sh &
echo Classification rules for MR3 - Default DTCH UL for L3 signaling
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -x $MR3_IN6_ADDR -y $CH2_IN6_ADDR -r 12
echo Classification rules for MR3 - MPLS User-plane Bearer
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -l $MR3_LABEL_OUT -m $MR3_LABEL_IN -r 13
#!/bin/bash
# Author: Lamia Romdhani
#June 2008
source params.sh
sudo modprobe mpls6
echo Starting routing ...
echo No MPLS debug
sudo sh -c 'echo 0 >/sys/mpls/debug'
echo Setting MPLS for mr3
echo 'MN1->MN2'
#pop label 4000 and do Ip lookup.
sudo mpls labelspace set dev nasmesh0 labelspace 0
sudo mpls ilm add label gen $MR3_LABEL_IN labelspace 0 proto ipv6
echo 'MN2->MN1'
# add label 3000 and forward the packets to mr2, for destination MN1
var=`mpls nhlfe add key 0 instructions push gen $MR3_LABEL_OUT nexthop nasmesh0 ipv6 $CH2_IN6_ADDR |grep key | cut -c 17-26`
echo "Creating routes"
sudo ip -6 route add $MN1_IN6_ADDR/128 via $CH2_IN6_ADDR mpls $var
sudo ip -6 route add $MN2_IN6_ADDR/128 dev eth3
source params.sh
sudo sysctl -w net.ipv6.conf.all.forwarding=1
#./del_mpls.sh
./mr3_conf_nas.sh
./mr3_mpls_nas.sh
#/etc/init.d/radvd status
#/etc/init.d/radvd start
#radvdump
sudo sysctl -w net.ipv6.conf.eth0.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.nasmesh0.proxy_ndp=1
sudo ifconfig eth3 promisc
sudo ip -6 addr add $MR3_EG6_ADDR/64 dev eth3
#$OPENAIR3_PMIP6D_PATH/pmip6d -m -s -L $CH2_IN6_ADDR -N $MR3_EG6_ADDR -E $MR3_IN6_ADDR
#./del_mpls.sh
#!/bin/bash
MR1_IN_ADDR=10.0.1.3
MR1_IN6_ADDR=2001:10:0:1:7856:3412:0:2
MR1_EG_ADDR=10.0.2.3
MR1_EG6_ADDR=2001:660:5502::10
# Flow CH1->MR1
MR1_LABEL_IN=1001
# Flow MR1->CH1
MR1_LABEL_OUT=1000
MR2_IN_ADDR=10.0.1.4
MR2_IN6_ADDR1=2001:10:0:1:7856:3412:0:3
MR2_IN6_ADDR2=2001:10:0:2:7856:3412:0:3
MR2_EG6_ADDR=2001:660:5502::30
# Flow CH1->MR2
MR2_CH1_LABEL_IN=2000
# Flow MR2->CH1
MR2_CH1_LABEL_OUT=2001
# Flow CH2->MR2
MR2_CH2_LABEL_IN=3001
# Flow MR2->CH2
MR2_CH2_LABEL_OUT=3000
MR3_IN_ADDR=10.0.1.5
MR3_IN6_ADDR=2001:10:0:2:7856:3412:0:2
MR3_EG6_ADDR=2001:660:5502::15
# Flow CH2->MR3
MR3_LABEL_IN=4000
# Flow MR3->CH2
MR3_LABEL_OUT=4001
CH1_IN_ADDR=10.0.1.1
CH2_IN_ADDR=10.0.1.2
CH1_IN6_ADDR=2001:10:0:1:7856:3412:0:1
CH2_IN6_ADDR=2001:10:0:2:7856:3412:0:1
MN1_IN6_ADDR=2001:660:5502::20
MN2_IN6_ADDR=2001:660:5502::25
# Put the right OPENAIR3 path here
OPENAIR3_HOME=~/openair3
OPENAIR3_PMIP6D_PATH=$OPENAIR3_HOME/pmip6d
OPENAIR3_SCRIPTS_PATH=$OPENAIR3_HOME/scripts
# Put the right OPENAIR2 path here
OPENAIR2_DIR=~/openair2_r220/
source params.sh
cd $OPENAIR2_DIR/SIMULATION/USER_TOOLS/LAYER2_SIM
./mac_sim -m0 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_5nodes.top
source params.sh
cd $OPENAIR2_DIR/SIMULATION/USER_TOOLS/LAYER2_SIM
./mac_sim -m1 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_5nodes.top
#!/bin/bash
source params.sh
cd $OPENAIR2_DIR/SIMULATION/USER_TOOLS/LAYER2_SIM
./mac_sim -m2 -t $OPENAIR2_DIR/SIMULATION/TOPOLOGIES/eth_5nodes.top
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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