I. Objectives
Use the NS 2 script to simulate a simple wireless/wired hybrid Access Network (a wired node is a network segment and a wireless node is a network segment). Refer to the actual campus network.
The Wired/wireless nodes run the FTP application respectively, and upload the specified size of files to the FTP server on the Internet.
The arrival of data packets. Custom text files are generated for each TCP stream.
Therefore, the focus of this experiment is to compile a network. TCL script to generate a hybrid network of the above topology type, capture data, and generate a text file.
Ii. Several important issues
2.1 How do I set the link Delay Parameter?
A packet transmitted from the sending node to the receiving node in NS2. The process includes queuing, sending, and propagation. [5]
Queue latency (queueing delay): The sum of the transmission latency of all data packets in the queue
Transmission Daly: the time when the sending node completely sends the complete data packet = packet size/link bandwidth
Propagation delay is also the link delay in NS2. in wide area networks, it is generally in ms. The calculation method is propagation delay = D/S.
D is the physical distance between nodes, and s is the propagation rate of the link, which is about 2*10 ^ 8 --- 3*10 ^ 8. It depends on the physical media of the link, for example, S = 2*10 ^ 8
D = 100 m, so P-delay = 0.5 us, 0.5 microseconds
For the classification and interpretation of delay, see Computer Network: top-down methods and Internet features P25
2.2 how to monitor the arrival of data packets on a node
Two trace methods are supported in NS2. trace object and monitor object [see Chapter 23: trace and monitor supporting in document 2]
If you want to get the relevant information in a TCP stream, the flowmon model is a good choice, the specific script writing reference ns-2.30/Tcl/test/test-suite-simple.tcl,
Allows you to easily import statistics from data streams to files.
Iii. References
1. the reference materials behind the http://www.isi.edu/nsnam/ns/ of the official website of NS2.
2. The required manual for compiling TCL script in http://www.ecse.rpi.edu/Homepages/shivkuma/teaching/fall2002/ns-2/ns_doc.pdf
3, tutorial for the Network Simulator 'ns', The http://www.isi.edu/nsnam/ns/tutorial/ contains a few classic TCL script detailed annotation
4. Ns Simulator for beginners http://www-sop.inria.fr/members/Eitan.Altman/COURS-NS/n3.pdf
Http://www.isi.edu/nsnam/ns/doc/node89.html
Link delay in NS2.Code
6 ns2-type manual http://www.auto-nomos.de/ns2doku/class_flow.html
7 TCL programming http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
8 How to Use OTCL to manipulate C ++ object http://xiaoniu.blog.51cto.com/204677/116703 in NS2.