create new tag
, view all tags

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 ( and two nodes (, with two radio bearers each:
  • has RB 12(DL)/4(UL) mapped to DSCP 0 and RB 13(DL)/5(UL) mapped to DSCP 4
  • 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
The user-mode script (start_user) is as follows:

%Stop simulation if one is running

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

# Clusterhead
 sudo ifconfig nasmesh0 netmask broadcast

# UE 1
 sudo ifconfig nasmesh1 netmask broadcast

# UE 2
 sudo ifconfig nasmesh2 netmask broadcast

# Classification rules
# CH <-> UE1 on DSCP 0 (RB 12)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s -t -r 12
# CH <-> UE1 on DSCP 4 (RB 13)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z4 -s -t -r 13

# CH <-> UE2 on DSCP 0 (RB 20)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s -t -r 20 
# CH <-> UE2 on DSCP 4 (RB 21)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z4 -s -t -r 21

# UE1 <-> CH on DSCP 0 (RB 4)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i1 -z0 -s -t -r 4 
# UE1 <-> CH on DSCP 4 (RB 5)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i1 -z4 -s -t -r 5

# UE2 <-> CH on DSCP 0 (RB 4)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i2 -z0 -s -t -r 4
# UE2 <-> CH on DSCP 4 (RB 5)
$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i2 -z4 -s -t -r 5


-- RaymondKnopp - 10 Jul 2008
Topic revision: r2 - 10 Jul 2008 - RaymondKnopp
Copyright 2004-2010 Institut Eurecom & all contributing authors.