ns2_新手入门简介课件NS2tutorialChihHeng,Ke(柯志亨)PhdCandidate,EEDepartment,NCKUEmail:******@:******@Skype:smallko2001AgendaNS2setupnsBenchHowtomeasurethelossrate,throughput,delay,jitter?ParsethetracefileModifytheC++codesHowtousethegnuplottodrawthesimulationresults?TracetheC++(workwithQoSsupport---EDCF)Myresearch:videoandaudiosimulationsNS2setup---版本NS2的安裝路徑設定NAM安裝多個NS2版本nsBench直接展示操作介紹tracefileformat介紹如何使用awk來分析tracefile如何使用gnuplot來畫圖介紹如何安裝mudp,mudpsink,mtcpsink來量測UDP或TCP的Throughput,Delay,Jitter,LossRate(不需要再分析原本的tracefile)(DCF)(EDCF)/#globalsandflagssetns[newSimulator]#numberofnodessetnum_wired_nodes1setnum_mobile_nodes1setnum_bs_nodes1;#numberofbasestationssetnum_nodes[expr$num_wired_nodes+$num_mobile_nodes+$num_bs_nodes]setbs_id$num_wired_nodes#Parameterforwirelessnodessetopt(chan)Channel/WirelessChannel;#channeltypesetopt(prop)Propagation/TwoRayGround;#radio-if)Phy/WirelessPhy;#networkinterfacetypesetopt(mac)Mac/802_11e;#MACtypesetopt(ifq)Queue/DTail/PriQ ;#interfacequeuetypesetopt(ifqlen)50setopt(ll)LL;#linklayertypesetopt(ant)Antenna/OmniAntenna;#antennamodelsetopt(ifqlen)50;#maxpacketinifqsetopt(adhocRouting)NOAH;#routingprotocolsetopt(x) 670 ;#Xdimensionofthetopographysetopt(y) 670 ;#Ydimensionofthetopography#smallkoaddthefollowingtwolinesMac/802_11esetdataRate_1MbMac/#setupforhierarchicalrouting#(neededforroutingoverabasestation)$nsnode-config-addressTypehierarchicalAddrParamssetdomain_num_2;#domainnumberlappendcluster_num11;#clusternumberforeachdomainAddrParamssetcluster_num_$cluster_numlappendeilastlevel$num_wired_nodes[expr$num_mobile_nodes+$num_bs_nodes];#numberofnodesforeachclusterAddrParamssetnodes_num_$eilastlevel#Openthenamtracefilesetnf[]$nsnamtrace-all-wireless$nf$opt(x)$opt(y)setntr[]$nstrace-al
ns2 新手入门简介课件 来自淘豆网www.taodocs.com转载请标明出处.