2014年1月4日 星期六

Patch NS2 to Support UMTS

Patch NS2 to Support UMTS(3G)
1. Download EURANE module file
    go to http://eurane.ti-wmc.nl/
    ex. ns-2.30_eurane-1.12.diff.gz
    if your ns2 version is 2.35, patch file in here(ns-2.35_eurane-1.12.diff).[1]
2. Decompress EURANE module file to ns2's home directory
3. run patch
  Change directory to ns2's home directory
  $  patch -p1 < ns-2.30_eurane-1.12.diff  <enter>
4. make or install
5. Download testscripts from http://eurane.ti-wmc.nl/
    ex.test_tcp.tcl (need idealtrace and SNRBLERMatrix.gz files)
6. run ns

ps1. If it have some problem,you modified some file by yourself.
[Makefile.in]
-CCOPT  = @V_CCOPT@
+CCOPT  = -Wall @V_CCOPT@

        apps/pbc.o \
+       umts/am.o umts/classifier-sport.o umts/demuxer.o \
+       umts/demuxerRtModule.o  umts/networkInterface.o \
+       umts/nif-classifier.o  umts/tcs.o umts/um.o \
+       umts/umtslink.o umts/umtstrace.o \
+       umts/hsdpalink.o umts/um-hs.o \
+       umts/umts-timers.o umts/virtual_umtsmac.o \
+       umts/am-hs.o \
+       umts/umts-queue.o umts/dummy_drop_tail.o \
+       umts/error_model.o tools/coot.o \

        tcl/lib/ns-qsnode.tcl \
+       tcl/lib/ns-umts.tcl \
        @V_NS_TCL_LIB_STL@

[common/packet.h]
-static packet_t       PT_NTYPE = 73; // This MUST be the LAST one
+
+// UMTS - used by hdr_cmn class for tracing purpose
+static const packet_t PT_UM = 73;
+static const packet_t PT_AMDA = 74;
+static const packet_t PT_AMPA= 75;
+static const packet_t PT_AMPBPA = 76;
+static const packet_t PT_AMBA= 77;
+static const packet_t PT_AMPBBA= 78;
+// Used for tracking HARQ transmissions (MAC-hs PDUs)
+static const packet_t PT_AMDA_H1= 79;
+static const packet_t PT_AMDA_H2= 80;
+static const packet_t PT_AMDA_H3= 81;
+       // End UMTS
+// COOT packet
+static const packet_t PT_COOT= 82;
+
+// insert new packet types here
+static packet_t       PT_NTYPE = 83; // This MUST be the LAST one

 #endif //STL
+               // UMTS
+               name_[PT_UM] = "UM";
+                name_[PT_AMDA] = "AM_Data";
+                name_[PT_AMPA] = "AM_Pos_Ack";
+                name_[PT_AMPBPA] = "AM_Piggyback_Ack";
+                name_[PT_AMBA] = "AM_Bitmap_ack";
+                name_[PT_AMPBBA] = "AM_Piggyback_Back";
+               // For HARQ transmission tracking
+               name_[PT_AMDA_H1] = "HARQ_1";
+               name_[PT_AMDA_H2] = "HARQ_2";
+               name_[PT_AMDA_H3] = "HARQ_3";
+               // End UMTS


+               // coot
+               name_[PT_COOT]="coot";
+
                // Bell Labs (PackMime OL)

2014年1月3日 星期五

NS2 traffic files generated using VANETMobiSim(on Windows)

What is VanetMobiSim?
VanetMobiSim is tool of mobility modeling.
site:http://vanet.eurecom.fr/

Install VANETMobiSim & Generate a NS2 traffic files

1. Download VanetMobiSim sources and VanetMobiSim binaries
go to http://vanet.eurecom.fr/
download VanetMobiSim sources file
  (ex. VanetMobiSim 1.1 sources file and VanetMobiSim 1.1 binaries)

2. Downlaod CanuMobiSim
go to  http://canu.informatik.uni-stuttgart.de/mobisim/downloads/
download CanuMobiSim(ex. CanuMobiSim v1.3.4)

3 Download Apache Ant
go to http://ant.apache.org/bindownload.cgi
downloasd Apache Ant (ex. apache-ant-1.9.3-bin.zip )

4. Decompress apache-ant-x.zip to a folder
  ex. E:\VanetMobSim\ant

5. Set system variable
 (1) Add a variable "ant_home"




 (2) Add "%ant_home%\bin" to "PATH" variable



6. Decompress VanetMobiSim sources to a folder
    ex. E:\VanetMobSim\VanetMobiSim-1.1

7. Decompress CanuMobiSim, then copy "src" folder in CanuMobiSim_1_3_4_src to VanetMobiSim sources  folder
    ex. E:\VanetMobSim\CanuMobiSim_1_3_4_src
    copy E:\VanetMobSim\CanuMobiSim_1_3_4_src\src to E:\VanetMobSim\VanetMobiSim-1.1


8. open "Command Prompt" window(cmd.exe)
    (1) cd E:\VanetMobSim\VanetMobiSim-1.1
    (2) "ant patch" <enter>
9. copy VanetMobiSim binaries to sample folder in VanetMobiSim sources  folder
  copy VanetMobiSim-1.1.jar ex. E:\VanetMobSim\VanetMobiSim-1.1\samples

10. run java -jar VanetMobiSim-1.1.jar xmlfile.xml
  ex. java -jar VanetMobiSim-1.1.jar IDM_LC.xml

11. Generate NS2 traffic
  (1) modify configuration in "IDM_LC.xml"
    <!-- <extension class="de.uni_stuttgart.informatik.canu.mobisim.extensions.NSOutput" output="ns_trace.txt"/>-->
    remove <!-- ... --> ,as above
   

 (2) re-run java -jar VanetMobiSim-1.1.jar IDM_LC.xml
 (3) the ns_trace.txt is generated in the folder which is a NS2 NS2 traffic