freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

networksimulationandanalysis---usingns2-在線瀏覽

2024-12-15 15:20本頁面
  

【正文】 set BA [$ns_ node ] $ns_ nodeconfig wiredRouting OFF set MH(0) [$ns_ node ] $MH(0) randommotion 0 $MH(0) set basestation [AddrParams addr2id [$BA nodeaddr]] $BA set X_ $BA set Y_ $BA set Z_ $MH(0) set X_ $MH(0) set Y_ $MH(0) set Z_ $ns_ duplexlink $W(0) $BA 10Mb 10ms DropTail set udp [new Agent/UDP] $ns_ attachagent $W(0) $udp set null [new Agent/Null] $ns_ attachagent $MH(0) $null $ns_ connect $udp $null set cbr [new Application/Traffic/CBR] $cbr attachagent $udp $cbr set type_ CBR $cbr set packet_size_ 1000 $cbr set rate_ 1Mb $cbr set random_ false $ns_ at $cbr start $ns_ at $cbr stop $ns_ at $MH(0) reset。 $ns_ at $W(0) reset $ns_ at stop $ns_ at $ns_ halt proc stop {} { global ns_ tracefd close $tracefd } $ns_ run W(0) BA MH(0) IEEE for the ns2 simulator ? An IEEE EDCA and CFB Simulation Model for ns2 – =136544 – $tar xvfz – $cp –r 802_11e ~/– open README and follow the steps to install – $make clean。 make modify the original C++ code ? queue/ void DropTail::enque(Packet* p) { hdr_ip* iph=hdr_ip::access(p)。 int size= cmhsize()。 if (summarystats) { Queue::updateStats(qib_?q_byteLength():q_length())。 if ((!qib_ amp。 (q_length() + 1) = qlim_) || (qib_ amp。 (q_byteLength() + hdr_cmn::access(p)size()) = qlimBytes)){ // if the queue would overflow if we added this packet... if (drop_front_) { /* remove from head of queue */ q_enque(p)。 drop(pp)。 } } else { q_enque(p)。 make depend。 number of mobilenodes set num_wired_nodes 2 set opt(x) 670 。 y coordinate of topology set opt(ftp1start) set opt(stop) 250 。 number of domains lappend cluster_num 2 1 1 。 number of nodes in each cluster AddrParams set nodes_num_ $eilastlevel 。 hierarchical addresses for {set i 0} {$i $num_wired_nodes} {incr i} { set W($i) [$ns_ node [lindex $temp $i]] } $ns_ nodeconfig mobileIP ON \ adhocRouting DSDV \ llType LL \ macType Mac/802_11 \ ifqType Queue/DropTail/PriQueue \ ifqLen 50 \ antType Antenna/OmniAntenna \ propType Propagation/TwoRayGround \ phyType Phy/WirelessPhy \ channelType Channel/WirelessChannel \ topoInstance $topo \ wiredRouting ON \ agentTrace ON \ routerTrace OFF \ macTrace OFF Create Home Agent and Foreign Agent set HA [$ns_ node ] set FA [$ns_ node ] $HA set X_ $HA set Y_ $HA set Z_ $FA set X_ $FA set Y_ $FA set Z_ create links between wired and BaseStation nodes $ns_ duplexlink $W(0) $W(1) 5Mb 2ms DropTail $ns_ duplexlink $W(1) $HA 5Mb 2ms DropTail $ns_ duplexlink $W(1) $FA 5Mb 2ms DropTail $ns_ duplexlinkop $W(0) $W(1) orient down $ns_ duplexlinkop $W(1) $HA orient leftdown $ns_ duplexlinkop $W(1) $FA orient rightdown create a mobilenode (in the domain of the HA) that is moving between HA and FA. $ns_ nodeconfig wiredRouting OFF set MH [$ns_ node ] set HAaddress [AddrParams addr2id [$HA nodeaddr]] [$MH set regagent_] set home_agent_ $HAaddress $MH set Z_ $MH set Y_ $MH set X_ MH starts to move towards FA $ns_ at $MH setdest goes back to HA $ns_ at $MH setdest Define initial node position in nam $ns_ initial_node_pos $MH 20 set tcp1 [new Agent/TCP] $tcp1 set class_ 2 set sink1 [new Agent/TCPSink] $ns_ attachagent $W(0) $tcp1 $ns_ attachagent $MH $sink1 $ns_ connect $tcp1 $sink1 set ftp1 [new Application/FTP] $ftp1 attachagent $tcp1 $ns_ at $opt(ftp1start) $ftp1 start $ns_ at $opt(stop).0 $MH reset。 $ns_ at $opt(stop).0 $FA reset。 $ns_ halt $ns_ at $opt(stop).0001 finish proc finish {} { global ns_ tracefd namtrace close $tracefd close $namtrace exec rm f exec awk f exec xgraph amp。 } puts Starting Simulation... $ns_ run How to measure the loss rate, delay, jitter, throughput? 1. nsBench 2. Write the tcl script yourself set ns [new Simulator] 針對不同的資料流定義不同的顏色,這是要給 NAM用的 $ns color 1 Blue $ns color 2 Red 開啟一個 NAM 記錄檔 set nf [open w] $ns namtraceall $nf 開啟一個模擬過程記錄檔,用來記錄封包傳送的過程 set nd [open w] $ns traceall $nd 定義一個結(jié)束的程序 proc finish {} { global ns nf nd $ns flushtrace close $nf close $nd 以背景執(zhí)行的方式去執(zhí)行 NAM exec nam amp。 $ns detachagent $d $sink 在模擬環(huán)境中, 5秒後去呼叫 finish來結(jié)束模擬 (這樣要注意模擬環(huán)境中 的 5秒並不一定等於實際模擬的時間 $ns at finish 執(zhí)行模擬 $ns run + 1 2 cbr 1000 2 0 0 1 2 cbr 1000 2 0 0 + 1 2 cbr 1000 2 1 1 1 2 cbr 1000 2 1 1 r 1 2 cbr 1000 2 0 0 + 2 3 cbr 1000 2 0 0 2 3 cbr 1000 2 0 0 + 1 2 cbr 1000 2 2 2 1 2 cbr 1000 2 2 2 r 1 2 cbr 1000 2 1 1 + 2 3 cbr 1000 2 1 1 2 3 cbr 1000 2 1 1 + 1 2 cbr 1000 2 3 3 1 2 cbr 1000 2 3 3 r 1 2 cbr 1000 2 2 2 + 2 3 cbr 1000 2 2 2 2 3 cbr 1000 2 2 2 + 1 2 cbr 1000 2 4 4 1 2 cbr 1000 2 4 4 r 1 2 cbr 1000 2 3 3 + 2 3 cbr 1000 2 3 3 2 3 cbr 1000 2 3 3 r 2 3 cbr 1000 2 0 0 ……………………………………………… sequence_number: 對於同一條 flow而言 , 這個 flow所產(chǎn)生的第一個 packet,它的 sequence number 就是 0,第二個 flow所產(chǎn)生的 packet,就是 1,以此類推 packet_id: 這是對於整個系統(tǒng)而言 , 整個系統(tǒng)中所產(chǎn)生的第一個 packe
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1