Installation of UMTS and WiMax patches in NS 2-35

Source: Internet
Author: User
Tags linux mint

My operating system is Linux Mint Debian Mate edition,201403 version, Kernel edition 3.11-2-AMD64,GCC version 4.8.2.

First, install the NS-2.35

As of October 2014, this is the latest version of NS2.

First install a few packages: "sudo apt-get install build-essential Libxmu-dev", depending on a few packages to be installed.

Then download ns-allinone-2.35, unzip, copy the ns-allinone-2.35 folder to the main directory, I renamed to. ns-allinone-2.35, easy to hide;

On line 137th of/.ns-allinone-2.35/ns-2.35/linkstate/ls.h, add " this-> " before "Erase (Basemap::begin ()", instead

"Void Eraseall () {this->erase (Basemap::begin (), Basemap::end ());}" ;

Then run under the. ns-allinone-2.35 folder./install can be installed.

When the installation is complete, you need to include the following text in the. bashrc file in the home directory:

2 export PATH="$PATH:/home/suyangts/.ns-allinone-2.35/bin:/home/suyangts/.ns-allinone-2.35/ Tcl8.5.10/unix:/home/suyangts/.ns-allinone-2.35/tk8.5.10/unix"export Ld_library_path= " $LD _library_path:/home/suyangts/.ns-allinone-2.35/otcl-1.14,/home/suyangts/.ns-allinone-2.35/lib " export Tcl_library=""

Where/home/suyangts is my home directory.

Open the terminal and run "ns./.ns-allinone-2.35/ns-2.35/tcl/ex/simple.tcl", which will test a simple example.

Note that the end of the article complements the method of installing NS-2.35 into the/OPT directory under Debian 7. under Debian 7, the contents of. BASHRC cannot be added as mentioned above. In addition, you can install ns-2.35 in the previous step after modifying all files for UMTS, LTE, and WiMAX modules.

----------

As of April 2015, the download locations for the following two patches are difficult to find on the network. So, I use Baidu Network disk share their backup: Http://pan.baidu.com/s/1eQEknsQ Extract code 3XSV

----------

Second, install the UMTS patch

Thanks to Yotrew.blogspot.com's post, Patch NS2 to support UMTS, the link to the patch file Ns-2.35_eurane-1.12.diff is given, and the installation method and the solution to the error are described in detail. Handling is as follows:

1, download Ns-2.35_eurane-1.12.diff file, put in the/.ns-allinone-2.35/ns-2.35/directory;

2. Modify the makefile.in in this directory:

(1) Replace "ccopt= @[email protected]" in line 56th with "ccopt=-wall @[email protected]";

(2) Search "APPS/PBC.O", find the "APPS/PBC.O \" in line No. 336, add the following

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 \

(3) Search "@[email protected]", about 570 lines, on the above another line to add

TCL/LIB/NS-UMTS.TCL \

3. Modify the Packet.h file in folder common under this directory:

(1) Find the "static packet_t Pt_ntype = 73", probably in 200 rows; This must is the last one ", with"//"to comment it out;

(2) Under another line, insert

//umts-used by HDR_CMN class for tracing purposeStatic Constpacket_t Pt_um = the;Static Constpacket_t Pt_amda = About;Static Constpacket_t pt_ampa= the;Static Constpacket_t PT_AMPBPA = the;Static Constpacket_t pt_amba= the;Static Constpacket_t pt_ampbba= +;//used for tracking HARQ transmissions (MAC-HS PDUs)Static Constpacket_t pt_amda_h1= -;Static Constpacket_t pt_amda_h2= the;Static Constpacket_t pt_amda_h3=Bayi;//End UMTS//Coot PacketStatic Constpacket_t pt_coot= the;//Insert new packet types hereStaticpacket_t Pt_ntype = the;//This must is the last one

(3) Find the "endif//stl", which is about 400 lines, under which another line is inserted

//UMTSName_[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 trackingNAME_[PT_AMDA_H1]="harq_1"; NAME_[PT_AMDA_H2]="harq_2"; NAME_[PT_AMDA_H3]="Harq_3";//End UMTS//CootName_[pt_coot]="Coot";

The above inserted content must be in front of the "//Bell Labs (packmime OL)" line.

4, open the terminal in ns-2.35 directory, run "Patch-p1 < Ns-2.35_eurane-1.12.diff"; if there is no error message, run "./configure"; If there is no error message, run "make clean ", and then run" make ".

Third, install WiMax patch

Nsnam.isi.edu/nsnam/index.php/contributed_code from the NIST WiMax patch, the download location is www.nist.gov/itl/antd/emntg/ssm_tools.cfm , there is a link below the "Download Information" column on the right. You need to fill in some information before downloading.

Download down a ns-nist-wimax.tgz compressed document. It's a huge hole to install! If you unzip directly into the ns-2.35 directory and run the patch command to install, congratulations, you will be stunned by a lot of errors. So, just change the file.

Unzip the package and a prerelease041707.tgz package will appear. Re-unzip, there is a src-prerelease-041707 folder and two files.

1. Copy the WiMAX folder in src-prerelease-041707 to the ns-2.35 folder.

2. Create a WiMAX folder in the Ns-2.35/tcl folder.

3. Copy the Ns-wimax.tcl file under the Src-prerelease-041707/tcl/lib directory to the Ns-2.35/tcl/lib directory.

4. Copy the Mac-stats.h file under the Src-prerelease-041707/mac directory to the Ns-2.35/mac directory.

5. Edit the Makefile.in file in the ns-2.35 directory:

(1) on the 68th line of the "@[email protected] \" line above, another line, add

-i./wimax \

(2) on the No. 378 line of the "@[email protected]" line above, another line, add

WIMAX/OFDMPHY.O wimax/mac802_16pkt.o wimax/serviceflowqos.o wimax/serviceflow.o wimax/serviceflowhandler.o wimax/ CONNECTION.O wimax/connectionmanager.o wimax/peernode.o wimax/mac802_16.o wimax/mac802_16ss.o wimax/mac802_16BS.o WIMAX/SDUCLASSIFIER.O wimax/destclassifier.o wimax/mac802_16timer.o wimax/wimaxneighborentry.o wimax/neighbordb.o WIMAX/SCHEDULING/WIMAXSCHEDULER.O WIMAX/SCHEDULING/BSSCHEDULER.O WIMAX/SCHEDULING/SSSCHEDULER.O wimax/scheduling/ ULSUBFRAMETIMER.O WIMAX/SCHEDULING/DLSUBFRAMETIMER.O WIMAX/SCHEDULING/BURST.O WIMAX/SCHEDULING/CONTENTIONSLOT.O WIMAX/SCHEDULING/CONTENTIONREQUEST.O WIMAX/SCHEDULING/CONTENTIONTIMER.O WIMAX/SCHEDULING/DLBURST.O wimax/ SCHEDULING/ULBURST.O WIMAX/SCHEDULING/FRAMEMAP.O WIMAX/SCHEDULING/PHYPDU.O WIMAX/SCHEDULING/PROFILE.O wimax/ SCHEDULING/SUBFRAME.O WIMAX/SCHEDULING/SCANNINGSTATION.O WIMAX/SCHEDULING/WIMAXCTRLAGENT.O \

(3) on the No. 570 line of "@[email protected]" above, another line, add

TCL/LIB/NS-WIMAX.TCL \

6. Edit the Packet.h file in the Ns-2.35/common directory:

(1) on the No. 202 line of "//Insert new packet types here", another row, add

// WiMAX Packets Static Const ;

Be sure to "//static packet_t Pt_ntype = 73; This must is the last one "before this line. The parameter "62" does not necessarily mean ...

(2) on the No. 400 line "#endif//stl" section, No. 460 line, "//DCCP" block, add

// WIMAX Name_[pt_wimaxbs]="wimaxctrl";

In "name_[pt_ntype]=" undefined "; "In the front.

7. Edit the Ns-packet.tcl file in the Ns-2.35/tcl/lib directory, find the 188th line "# Other:" section, under "HDLC # High Level Data Link Control", another line, add

802_16   # Wimax

8, edit the Ns-2.35/tcl/lib directory under the NS-LIB.TCL, in the approximate No. 218 line "source. /mcast/ns-lms.tcl "Under, another line, add

# Wimaxsource NS-WIMAX.TCL

9, open the terminal in the ns-2.35 directory, run "./configure"; If there is no error message, run "make clean" and run "make" last.

10, test: terminal switch to Ns-2.35/tcl/wimax directory, run "ns WIMAX1.TCL".

Iv. installing NS-2.35 to/opt directory under Debian 7 Wheezy

1, ns-allinone-2.35 the entire directory after decompression through the # CP-RF ns-allinone-2.35//opt/copy to/opt;

Can be extracted from the ns-allinone-2.35 have not performed the installation after the completion of the above two or three-step modification does not perform configure and make, directly copied to/OPT and then installed together.

2, # cd/opt, then # chmod-r 755 ns-allinone-2.35; This makes the files in the folder readable and executable;

3. # CD./ns-allinone-2.35, #./install, installation;

4. Edit your own. BASHRC and add the following lines:

 # Enable network simulator 2  # Ld_library_ Pathexport ld_library_path  =/home/suyangts/.ns-allinone-2.35 /otcl-< Span style= "color: #800080;" >1.14 :/home/suyangts/.ns-allinone-2.35 / lib# tcl_libraryexport tcl_library  =/home/suyangts/.ns-allinone-2.35 /tcl8. 5.10 /library# pathpath  = $PATH:/home/ Suyangts/.ns-allinone-2.35 /bin:/home/suyangts/.ns-allinone-2.35 /tcl8. 5.10 /unix:/home/suyangts/.ns-allinone-2.35 /tk8. 5.10 /unix 

5. Log out or $source. BASHRC, enter NS to see if a percent sign appears. NS is available if it appears. Exit exits.

Installation of UMTS and WiMax patches in NS 2-35

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.