2009-03-06
공개 자료


NS-2 Simulator for IEEE802.16 MAC

Thank you for your interest in IEEE802.16 MAC simulator.
You can download the ns-2 simulator for IEEE802.16 MAC at the following link:
http://cnlab.kaist.ac.kr/802.16/ieee802.16.html.
The presentation material for the NS-2 tutorial by Korean Institute of Communication and Sciences () (Aug. 2, 2006) is also available.



한국통신학회(KICS) 초보자를 위한 NS-2 시뮬레이션 강좌 자료

2007년 1월 17일에 한국과학기술회관에서 열렸던 초보자를 위한 NS-2 시뮬레이션 강좌의 Session 4: NS-2 Internal Structure and Extension 자료입니다.

  • 예제



  • 한국통신학회(KICS) 초보자를 위한 NS-2 시뮬레이션 강좌 자료

    2008년 1월 28일에 국민대학교에서 열렸던 초보자를 위한 NS-2 시뮬레이션 강좌의 Session 3: NS-2 Internal Structure and Extension 자료입니다.

  • 예제
  • tcldebug 설치시 configure에서 문제 발생시 참조
  • 这部分不错,不过好像是2.31版本的。跟俺的2.33有点……区别

    Tags: ,,,.

    有些朋友好像对 开发很感兴趣,我就把我用搭建开发平台的过程说一下吧,经验和大家共享。
    一、我的开发环境:Mware 6.5 + Fedora Core 8 + NS 2.31+ +
        用的是 Europa 版本的。这个版本直接装好了插件。也可以用Fedora内自带的在单独装上插件就行了,是一个TCL和Ruby的插件,实际上我只用它的高亮显示Tcl关键字的功能,不装也可以。我的NS安装路径为~/ns--2.31/ns-2.31/
    二、过程摘要:
    1.装好VMware和linux
    2.装好。配置好环境变量。
    a) 运行在目录下运行 ./configure –enable-
    3.安装好
    4.安装插件(可选)
    5.新建C++ makefile工程 workspace指定到 ~/ns--2.31/ns-2.31
    6.设置
    a) 把ns目录下所有文件夹添加为source文件夹
    b) 设定Run配置:添加ns可执行文件和变量(tcl脚本的位置)
    7.运行 在console中可以看到结果
    如果你已经知道怎么做了,那就开始吧。如果不清楚那就接着看下面的详细步骤
    三、详细步骤:
        1-4 网上有大量资料可以参考,我简单的说几点:
            a) VMware 6.5不要装FC7。因为vmware-tools和FC7的内核似乎不兼容,需要将FC7内核升级到2.6.23以上。所以还是装FC8。或者用VMware5.5也行。
            b) ./configure –enable-在make文件中加入-g属性 然后重新编译一下ns
            c) 需要安装JAVA虚拟机。简单的方式是安装linux时完全安装一下,FC8中已经把开发环境都配置好了
    现在假设你已经安装好了所有需要的软件,NS可以正常运行,那么把NS导入到中就可以了。具体步骤如下:
            a) 新建C++ makefile工程:在Project Explorer中右键,新建C++工程;
            b) 设置工程属性:注意位置是ns的安装目录,类型是makefile project,tool chain选linux GCC;
            c) 完成
            d) 在工程名上右键,选properties;
            e) 在C/C++ General -> paths and symbols中选则source location;添加NS目录下所有文件夹为source;这是为了可以从大纲视图看代码;
            f) 设置Run:双击C/C++ Local Application, 新建一个Run配置;C/C++ Application中选择目录下的ns可执行文件。enable-后这个文件变大为10几M了。
            g) 设置Arguments;把你所要仿真的tcl脚本添加进去。相当于在终端中输入ns yourTcl.tcl
            h) 运行。如果没有设定变量,相当于直接运行ns。Console中提示符变为%; 我们可以测试一下输入
    puts “Hello
    输出Hello
    安装结束。Enjoy it!
    四、的作用(欢迎大家讨论)
    1.
        调试C++也是调用GDB,相当于一个可视化的GDB调试环境;使用时设定断点,点按钮即可。
    2.查找代码
        在项目中查找代码的作用我认为非常管用,你可以查一个关键字或者类名,看它在那定义的。只需要在变量名上ctrl+左键单击,就自动打开定义文件。感觉很爽 ^_^ 看代码会省很多事。
    3.CVS
        写代码的时候还是用用这些代码管理软件比较好。省得改错了代码时想回都回不去,欲哭无泪啊。
    4 ……希望大家在使用中自己多多发现
        我也是一个的新手,希望大家多多发现编程上的技巧,相互交流,有了发现也告诉我一声啊。^_^

     

    [via]

    ^^^^^^^^^^^^^^^^^^

    用ubuntu8.04 直接

    sudo apt-get 发现默认安装的版本是3.2.2版本

    只支持3.3版本以上

    只好再找教程

    Eclipse 3.4 Ganymede on Ubuntu 8.04 Hardy Heron

    Ubuntu Hardy Heron does not have Eclipse 3.4 Ganymede in its deposits. Indeed the Aptitude eclipse installation will Eclipse 3.2 on your system.

    To Eclipse Ganymede, it must be done manually.

    JavaJava installation

    By default, Ubuntu comes with a free Java interpreter: gij, so if you want to use the Sun Microsystems Java™ Development Kit (JDK), you will need to it.

    Java is available in the depots. You have a choice between two versions: Java5 and Java6.

    • Java5 is available in multiverse deposits for all versions of Ubuntu currently supported.
    • Java6 is available in multiverse deposits since Feisty. For Edgy and Dapper you’ve gor to check the backports multiverse deposits.

    You can the following packages according to your needs:

    The above list is the list of available packages for Java6. For the Java5 packages list, simply replace "java6" by "java5".

    For example to the Java6 JRE execute the following commands:

    sudo apt-get sun-java6-jre sun-java6-plugin sun-java6-fonts

    Eclipse 3.4 Ganymede installation

    Download the version that suits you on the official website.

    For example IDE for Java Developers (-java-ganymede-linux-gtk.tar.gz):

    wget http://download..org/technology/epp/downloads/release/ganymede/R/-java-ganymede-linux-gtk.tar.gz
    tar xzvf -java-ganymede-linux-gtk.tar.gz
    mv eclipse3.4

    You should be ready to launch

    eclipse3.4/

    Wait for your eclipse 3.4 Ganymede to start, and go to Windows -> Preferences. Find Java -> Installed JREs. You should see the list of the JREs known by . If the Sun Microsystems JREs doesn’t appear, you’ll have to show it to eclipse. To do this, Click the “Search” button and select the /usr/lib/jvm/ path. should find JREs intalled on your system and list them. Just select the one that you want to use, and you’re ready to program on your nice new Eclipse 3.4 Ganymede ;)

    [via]

    不过我装的版本是http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/ganymede/SR2/eclipse-cpp-ganymede-SR2-linux-gtk.tar.gz

     

    加图标

    2、安装
    (1)把-SDK-3.3解压到某个目录中,俺解压到的是/opt下,得到/opt/目录
    如果想把目录的更改为root拥有,可以执行下面的命令
    sudo chown -R root:root /opt/
    当然也可以不用。
    (2)在/usr/bin目录下创建一个启动脚本,执行下面的命令来创建:
    sudo vi /usr/bin/
    如果不熟悉vi命令的可以用自带的简单文本编辑器gedit,用下面的命令来创建:
    sudo gedit /usr/bin/
    然后在该文件中添加以下内容:
    #!/bin/sh
    export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
    export ECLIPSE_HOME="/opt/"
    $ECLIPSE_HOME/ $*
    (3)让修改该脚本的权限,让它变成可执行,执行下面的命令:
    sudo chmod +x /usr/bin/
    3、在桌面或者gnome菜单中添加启动图标
    (1)在桌面或者启动面板上添加图标:
    在桌面(右键单击桌面->创建启动器)或面板(右键单击面板->添加到面板 ->定制应用程序启动器)上创建一个新的启动器,然后添加下列数据:
    名称: Platform
    命令:
    图标: /opt//icon.xpm
    (2)在Applications(应用程序)菜单上添加一个图标
    用文本编辑器在/usr/share/applications目录里新建一个名为.desktop的启动器,如下面的命令:
    sudo vi /usr/share/applications/.desktop
    或者
    sudo gedit /usr/share/applications/.desktop
    然后在文件中添加下列内容:
    [Desktop Entry]
    Encoding=UTF-8
    Name= Platform
    Comment= IDE
    Exec=
    Icon=/opt//icon.xpm
    Terminal=false
    StartupNotify=true
    Type=Application
    Categories=Application;Development;
    保存文件。完成整个安装过程。可以双击桌面的图标来运行

    [via]

    Tags: ,,,,,.
    2009-03-05

    [簡介]

    The goal of [1] project is to develop supporting tools that enable creating, analyzing and visualizing NS-2 simulation scripts and traces automatically.

    is a drag-and-drop GUI and easy to use in undergraduate and graduate networking courses. makes NS-2 simulation development and analysis faster and easier for students and researchers without losing the flexibility or expressiveness gained by writing a script.

    [特色]

    1. Nodes, simplex/duplex links and LANs

    2. Agents: TCP, UDP, TCPSink, TCP/Fack, TCP/FullTcp, TCP/Newreno, TCP/Reno, TCP/Sack1, TCPSink, TCPSink/Sack1, TCPSink/DelAck, TCPSink/Sack1/DelAck, TCP/Vegas, Null Agent

    3. Applications/Traffic: FTP, Telent, Http/Server, Http/Client, Http/Cache, webtraf, Traffic/CBR, Traffic/Pareto, Traffic/Exponential

    4. Services: Multicast, Packet Scheduling, RED, DiffServ

    5. Creating "Groups" concept to compensate for "loops"

    6. Scenario generator

    7. Link Monitors

    8. Loss Models

    9. Routing Protocols

    [準備工具]

    由於是由Java所開發的,因此在實行之前必需先安裝可執行JVM,此軟體可到Sun的網站下載,而筆者所使用的是jre-1_5_0_03-windows-i586-p.exe。

    安裝完後,接著就是下載,下載網址是http://www.mnlab.cs.depaul.edu/projects/nsbench/download/nsBench-1.0b3.jar

    [執行]

    作者所使用的環境是windows xp + cygwin + .28,的軟體-1.0b3.jar是放在c:\cygwin\home\smallko\下。執行的方法為:

    1. 打開一個cygwin的視窗。

    2. $cd

    3. $java -jar -1.0b3.jar

    4. 就會出現底下的視窗。

    [via]

    终于有跟一样的gui环境了 强的

    Tags: ,,.
    2008-11-18

    This is an example of the --2.33 installation for .
    Download the most recent Ns-2--2.33 from Sourceforge.
    Suppose that there is “ns--2.33.tar.gz” in current directory (e.g. “~/” for me is “/home/mm”).
    All steps are done in Terminal, so open a terminal in Accessories/Terminal.
    To extract the file:
    tar xvfz ./ns--2.33.tar.gz
    Go into extracted directory:
    cd ns--2.33
    Download required packages:
    sudo apt-get build-essential autoconf automake libxmu-dev
    Start installation:
    ./
    Set environment parameter:
    gedit ~/.bashrc
    Then at the last line, append the following text with changing “/your/path” to the directory that contains “ns--2.33″. (e.g. “/home/jimey/” )

    # LD_LIBRARY_PATH
    OTCL_LIB=/home/jimey/ns--2.33/otcl-1.13
    NS2_LIB=/home/jimey/ns--2.33/lib
    X11_LIB=/usr/X11R6/lib
    USR_LOCAL_LIB=/usr/local/lib
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
    # TCL_LIBRARY
    TCL_LIB=/home/jimey/ns--2.33/tcl8.4.18/library
    USR_LIB=/usr/lib
    export TCL_LIBRARY=$TCL_LIB:$USR_LIB
    # PATH
    XGRAPH=/home/jimey/ns--2.33/bin:/home/jimey/ns--2.33/tcl8.4.18/unix:/home/jimey/ns--2.33/tk8.4.18/unix
    NS=/home/jimey/ns--2.33/ns-2.33/
    NAM=/home/jimey/ns--2.33/nam-1.13/
    PATH=$PATH:$XGRAPH:$NS:$NAM

    Let it take effect immediately:

    $ source ~/.bashrc

    [via]

    Tags: ,,,.