บทความ

กำลังแสดงโพสต์จาก กรกฎาคม, 2010

Install Ns-2.29 on Ubuntu 10.04

1. Installed the tcl, tk, gcc, g++ $ sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3 2. Copy ns-allinone-2.29.tar.gz in directory sudo cp -R ns-allinone-2.29.tar.gz /usr/src 3. Extract ns-allinone-2.29.tar.gz sudo tar xvfz ns-allinone-2.29.tar.gz sudo tar -jxvf ns-allinone-2.29.tbz 4. change ns-allinone-2.29 /otcl-1.13 CC = @CC@ to CC = gcc-4.3 5. Download & install some packages sudo apt-get install build-essential autoconf automake libxmu-dev 6. install NS2 sudo ./install 7. goto ns-2.29 sudo ./validate 8. test run ns2 ns % Reference : http://paulson.in/?p=29 www.scribd.com/doc/33039298/NS2-in-Ubuntu-10-by-Noor-Zaman www.techquark.com/2009/09/install-ns-2-on-ubuntu-9.04.html

Message Flow

Node-------------------------->Server HandShake Message BitField Message Interested Message Unchoke Message Request Message Piece Message Have Message Not Interested Message or Cancel Message Choke Message

UDP Protocol Position

./~ns-2.29/apps/udp -------------------------------------------------- ./~ns-2.29/tcl/lib/ns-default.tcl Agent/UDP set packetSize_ 1000 Agent/UDP instproc done { } { } Agent/UDP instproc process_data {from data} { } -------------------------------------------------- find . -name *UDP* -print ./doc/udp.tex ./tcl/ex/udpdata.tcl ./apps/udp.cc ./apps/udp.h ./apps/udp.o ---------------------------------------------------

Add UDP Protocol

bittorrent_connection.cc send_udp receive_udp Line 59 ---> tcl.eval("new Agent/TCP/FullTcp/Newreno); ------------------------------------------------------------- set udp [new Agent/UDP] $ns attach-agent $node_(0) $udp set null [new Agent/Null] $ns attach-agent $node_(i) $null $connect $udp $null $ap attach-agent $udp ------------------------------------------------------------- for { set i 0 } {$i { set udp($i) [new Agent/myUDP] $ns attach-agent $node_(0) $udp($i) $udp($i) set packetSize_$packetsize $udp($i) set_filename sd_foreman_$i }

Work

work 15/07/2010 เปลี่ยนจาก TCP เป็น UDP TCP ใช้ในการ control message ระหว่าง tracker, super node และ peer UDP ใช้ในการส่ง Video Streaming ระหว่าง peer ทำ Cluster โดย พิจารณาการเลือก super node แบบที่มีอยู่แล้ว