Clone
1
VirtualEmul3NodesIPv4
Cedric Roux edited this page 2016-01-17 19:13:39 +01:00

---+ Less simple 3 Node IPv4 Virtual Network on a single machine (EXAMPLES/VIRTUAL_EMUL_3_NODES_IPv4) This example presents a 3 node network running on a single machine using OpenAir emulation with virtualization. It can be run with layer 2 protocols in user-space or real-time. The emulation sets up one clusterhead (10.0.1.1) and two nodes (10.0.1.2,10.0.1.3) with two radio bearers each:

  • 10.0.1.2 has RB 12(DL)/4(UL) mapped to DSCP 0 and RB 13(DL)/5(UL) mapped to DSCP 4
  • 10.0.1.3 has RB 20(DL)/4(UL) mapped to DSCP 0 and RB 21(DL)/5(UL) mapped to DSCP 4
    ---+++ Compiling the code
    The Makefile has 4 rules (kernclean,userclean,kern,user) which compile the kernel and user-space versions of this emulation. The two with "clean" just clean the directories before compiling. You have to do this the first time you compile either of the two versions.

To compile a user emulation just do

# make userclean To compile a kernel emulation just do # make kernclean ---+++ Running the emulation There are two scripts for running the emulation (start_user and start_kern). These initialize the radio emulation (3 instances), setup the network interfaces (3 instances). The topology file for the emulation is in SIMULATION/TOPOLOGIES/virtual3nodes.top The user-mode script (start_user) is as follows: cd $OPENAIR2_DIR

%Stop simulation if one is running SIMULATION/USER_TOOLS/RT_EMUL_LAUNCHER/rt_emul 2

%Load kernel modules sudo make remove_emul sudo make install_emul sudo insmod NAS/DRIVER/MESH/nasmesh.ko

Clusterhead

sudo ifconfig nasmesh0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255

UE 1

sudo ifconfig nasmesh1 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255

UE 2

sudo ifconfig nasmesh2 10.0.3.3 netmask 255.255.255.0 broadcast 10.0.3.255

Classification rules

CH <-> UE1 on DSCP 0 (RB 12)

$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 12

CH <-> UE1 on DSCP 4 (RB 13)

$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z4 -s 10.0.1.1 -t 10.0.1.2 -r 13

CH <-> UE2 on DSCP 0 (RB 20)

$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 20

CH <-> UE2 on DSCP 4 (RB 21)

$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z4 -s 10.0.1.1 -t 10.0.1.3 -r 21

UE1 <-> CH on DSCP 0 (RB 4)

$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i1 -z0 -s 10.0.2.2 -t 10.0.2.1 -r 4

UE1 <-> CH on DSCP 4 (RB 5)

$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i1 -z4 -s 10.0.2.2 -t 10.0.2.1 -r 5

UE2 <-> CH on DSCP 0 (RB 4)

$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i2 -z0 -s 10.0.3.3 -t 10.0.3.1 -r 4

UE2 <-> CH on DSCP 4 (RB 5)

$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i2 -z4 -s 10.0.3.3 -t 10.0.3.1 -r 5

SIMULATION/USER_TOOLS/LAYER2SIM/mac_sim -m0 -t SIMULATION/TOPOLOGIES/virtual3nodes.top

-- User.RaymondKnopp - 10 Jul 2008