zrp

所属分类:网络编程
开发工具:C/C++
文件大小:2605KB
下载次数:38
上传日期:2011-11-19 06:03:47
上 传 者nehal123455
说明:  implementation of ZRP routing protocol and its script for simulation

文件列表:
zrp\brp.cc (30776, 2000-12-02)
zrp\brp.h (5127, 2000-12-02)
zrp\doc\draft-ietf-manet-zone-zrp-03.txt (113117, 2000-12-02)
zrp\doc\ns-cmu.ps (142034, 2000-12-02)
zrp\doc\perkins.ps (305, 2000-12-02)
zrp\doc\robin\bib\biblio.bib (25707, 2000-12-02)
zrp\doc\robin\bib\biblio.bib~ (26042, 2000-12-02)
zrp\doc\robin\bib\biblio_01.tex (15367, 2000-12-02)
zrp\doc\robin\cornell\cornell.aux (2314, 2000-12-02)
zrp\doc\robin\cornell\cornell.cls (8922, 2000-12-02)
zrp\doc\robin\cornell\cornell.dtx (28689, 2000-12-02)
zrp\doc\robin\cornell\cornell.dtx~ (28487, 2000-12-02)
zrp\doc\robin\cornell\cornell.dvi (44396, 2000-12-02)
zrp\doc\robin\cornell\cornell.glo (0, 2000-12-02)
zrp\doc\robin\cornell\cornell.idx (23834, 2000-12-02)
zrp\doc\robin\cornell\cornell.ins (117, 2000-12-02)
zrp\doc\robin\cornell\cornell.log (2048, 2000-12-02)
zrp\doc\robin\cornell\cornell.ps (345837, 2000-12-02)
zrp\doc\robin\cornell\cornell.toc (1802, 2000-12-02)
zrp\doc\robin\cornell\cuphdabbrv.bst (19773, 2000-12-02)
zrp\doc\robin\cornell\cuphdalpha.bst (23115, 2000-12-02)
zrp\doc\robin\cornell\cuphdinitials.bst (17276, 2000-12-02)
zrp\doc\robin\cornell\cuphdplain.bst (20173, 2000-12-02)
zrp\doc\robin\cornell\cuphdunsrt.bst (17867, 2000-12-02)
zrp\doc\robin\thethesis\.nfs5F62 (538867, 2000-12-02)
zrp\doc\robin\thethesis\.nfs60BE.gz (74362, 2000-12-02)
zrp\doc\robin\thethesis\abstract.tex (1038, 2000-12-02)
zrp\doc\robin\thethesis\abstract.tex~ (174, 2000-12-02)
zrp\doc\robin\thethesis\acknowledge.tex (102, 2000-12-02)
zrp\doc\robin\thethesis\acknowledge.tex~ (89, 2000-12-02)
zrp\doc\robin\thethesis\conclusion.tex (477, 2000-12-02)
zrp\doc\robin\thethesis\conclusion.tex~ (264, 2000-12-02)
zrp\doc\robin\thethesis\cuphdabbrv.bst (19773, 2000-12-02)
zrp\doc\robin\thethesis\cuphdalpha.bst (23115, 2000-12-02)
zrp\doc\robin\thethesis\cuphdinitials.bst (17276, 2000-12-02)
zrp\doc\robin\thethesis\cuphdplain.bst (20173, 2000-12-02)
zrp\doc\robin\thethesis\cuphdunsrt.bst (17867, 2000-12-02)
zrp\doc\robin\thethesis\doabstract.tex (77, 2000-12-02)
zrp\doc\robin\thethesis\epilogue.tex (57, 2000-12-02)
... ...

12/02/2000 This README is part of the zrp tarball available at http://www.ee.cornell.edu/~robin/ 1. Introduction ---------------- This is a new routing agent for ns, which implements the Zone Routing Protocol. 2. How to install ---------------- First install a copy of ns-allinone-2.1b6a (notice the a. I did not try this installation with anything else). You can get one at ftp://ftp.isi.edu/nsnam/. Let's say you installed it in the directory /to_be/or_not_to_be. Once ns-allinone-2.1b6a installed successfully, move the zrp directory where this README is to: /to_be/or_not_to_be/ns-allinone-2.1b6/ns-2.1b6/ > mv zrp /to_be/or_not_to_be/ns-allinone-2.1b6/ns-2.1b6/ Go to zrp > cd /to_be/or_not_to_be/ns-allinone-2.1b6/ns-2.1b6/zrp Install zrp > install_zrp If the script doesn't work read it and do the same by hand. go back to /to_be/or_not_to_be/ns-allinone-2.1b6/ns-2.1b6/ >cd /to_be/or_not_to_be/ns-allinone-2.1b6/ns-2.1b6/ edit the file Makefile. Look for "aodv" in it: The first and only hit should be the line: aodv/aodv_logs.o aodv/aodv.o \ add zrp/zrp.o \ right after it. You will get something like: dsr/dsragent.o dsr/hdr_sr.o dsr/mobicache.o dsr/path.o \ dsr/requesttable.o dsr/routecache.o \ aodv/aodv_logs.o aodv/aodv.o \ zrp/zrp.o \ ns-process.o \ satgeometry.o sathandoff.o satlink.o satnode.o \ Then look for mac-802_3, the first and only hit should be the line: mac-802_3.o \ add mac-null.o \ right after it. You will get: channel.o mac.o ll.o \ mac-802_11.o \ mac-802_3.o \ mac-null.o \ mip.o mip-reg.o gridkeeper.o \ propagation.o tworayground.o antenna.o omni-antenna.o \ Save the Makefile. You are always in /to_be/or_not_to_be/ns-allinone-2.1b6/ns-2.1b6/. Type make: > make That's it! The ZRP routing agent is added. (when I tried this installation I got some warning messages about IP_BROADCAST , I just ignored them and all went ok.) 3. An example -------------- Once the ZRP routing agent installed, you can go to zrp/example: >cd /to_be/or_not_to_be/ns-allinone-2.1b6/ns-2.1b6/zrp/example and type >ns example.tcl the simulation will run, displaying numbers growing towards 10 (it stays about 40 seconds on the 0.0000, it's normal). When the simulation ends, start MATLAB from zrp/example and type >> drawquery(-1,-1,0:19) This will draw the ZRP query obtained when node 12 looks for a route to node 3. The Zone Radius is 3 in this example, the colors vary with the distance in hops from the source of the query, 53, the red circles indicate re-bordercasting nodes. 3 is unreachable in this example. You should get something which looks like example.jpg. The bordercast trees are not perfect because BRP is broadcasting. If you want crystal cleat bordercast tree, set BRP_USES_BROADCAST to 0 in zrp.h, recompile ns and rerun the example. 4.What can I find in this tarball? ---------------------------------- The main components of the ZRP are in the zrp directory: (please read zrp/doc/zrp.ps for more complete information) --------------------[zrp directory] *zrp.{cc,h} Is the conductor of the whole protocol. Also in zrp.h are defined most of the parameters for the ZRP. *nbd.{cc,h} Is the neighbor discovery protocol, also called NDP in the founding papers. *iarp_efficient.{cc,h} Is the first version of the IARP. It is event-triggered, and the link state update packets contain information about one link only. It features a nice Dijkstra algorithm to compute the routing tables, and a complicated link state table with partial_states, my_full_states and given_full_states. It works well with Mac/NULL, otherwise when the topology gets too dense or the zone radius too large, some packets are dropped and you get an incomplete routing table. *iarp.{cc,h} The second version of the IARP, which was first developped to be a timer-based IARP, then modified to become convertible to event-triggered. The choice is made by setting some #defines in zrp.h: Event-triggered if: #define EVENT_TRIGGERED 1 #define PERIODIC_UPDATES 0 Timer-based if: #define EVENT_TRIGGERED 0 #define PERIODIC_UPDATES 1 -Timer-based: Works well, (with broadcast_level set to RELIABLE_BROADCAST in zrp.h, otherwise the ifqueues everywhere in the network grow exponentially), but creates more traffic than the event-triggered IARPs. -Event-triggered: Has the same problem of bandwidth than iarp.old. The differences between the two are: 1.the new is somewhat simpler than the old (No Dijkstra, no fancy link state table) 2.the new is a bit less efficient than the old because its link state packets are bigger: they always contain the list of neighbors of the node they are reporting about. *brp.{cc,h} Is an implementation of the bordercast protocol. It is used exclusively to bordercast IERP's route_requests, in the following way: 1.IERP initiates a route_request, gives the corresponding packet to BRP using the function BRP::bordercast_initiate. The latter does some initializations, in particular computes the bordercast_tree, then calls BRP::bordercast_transmit for transmission. 2.When ZRP receives a route_request, it sends it to BRP first, through BRP::rcv.This function calls then the ProcessQueryTimer, which computes the bordercast_tree, rooted at the node which last bordercasted, and then gives the packet to IERP. 3.If IERP has no route to destination, it gives back the packet to BRP, but directly through BRP::bordercast_transmit this time. Once there, the packet is forwarded and duplicated further if BRP considers it to be relevant. So the query propagation can be terminated either by IERP, if a route is found, or BRP. *ierp.{cc,h} It is an adaptation of the aodv code that can be found in ns-2.1b6/aodv. I use aodv as an IERP. Notice how I tuned AODV's constants in zrp.h. *zrp_packet.h Contains the ZRP packet headers specifications. *ierp_logs.cc Contains functions I religiously adapted from the AODV code, without understanding them. --------------------[support_code directory] In this directory you will find all the files where little changes had to me made to add the new ZRP agent, as well as some modified code you might find useful. *cmu_trace.{cc,h} Contains the formatting function to trace ZRP events in the ns trace file. *arp.corr.{cc,h} Is an arp which never drops packets. The default one, shipped with ns-allinone, does drop packets. It is normal, advertised in the ns manual, and corresponds to reality. However it is annoying when you try to debug an IARP. *arp.shortcut.cc Use arp.nature.h as an arp.h with this one. It will give you the MAC address of the node you try to reach instantly, without doing any query. This is possible because in NS IP addresses and MAC addresses are the same. *arp.nature.{cc.h} This one is the normal arp. It is just there for your convenience: -If you want to try the watertight one, do: > cp arp.corr.{h,cc} arp.{h,cc} -And when you are tired of it and want to go back to the normal arp: > cp arp.nature.{h,cc} arp.{h,cc} *ns-lib.tcl, ns-mobilenode.tcl, ns-packet.tcl, packet.h Contain the little additions needed to add a new routing agent to ns. *priqueue.cc, priqueue.h, queue.cc, queue.h There is a bug in the original version of priqueue.cc, these files correct it. *rttable.h Contains the definitions for some list structures I used. *rtqueue.h Contains a minor TIME_FACTOR related modification. (see "About the bandwidth" below.) *mac-null.cc This is a MAC protocol ignoring collisions, which will allow you to get an infinite bandwidth. The bandwidth of the MAC 802.11 in NS is too small for the efficient and event driven IARPs to work properly. --------------------[matlab directory] Contains some MATLAB pre and post processing functions. --------------------[scripts directory] Contains the scripts I developped, mainly to run simulations and prepare scenarios. Their style is poor, a bastardized mix of shell scripts and C++ short programs. My /to_be/or_not_to_be/ is /temp, the scripts are all stored in /tmp/test/scripts/, and my simulation directories (such as "example") are in /tmp/test. This might be useful if you decided to adapt these scripts to your work environment. My opinion is that you will waste less time developping your own scripts. 7. About the bandwidth ----------------------- As I said I would need the wireless nodes to have a greater bandwidth. There is a "Mac set bandwidth_ 10000000" command that you can intergrate to your tcl script, and which actually changes the bandwidth_ variable of the mac class. However, the DSSS_SlotTime hard-coded in mac-802_11.h: mac-802_11.h: /* * IEEE 802.11 Spec, section 15.3.2 * - default values for the DSSS PHY MIB */ #define DSSS_CWMin 31 #define DSSS_CWMax 1023 #define DSSS_SlotTime 0.000020 // 20us #define DSSS_CCATime 0.000015 // 15us #define DSSS_RxTxTurnaroundTime 0.000005 // 5us #define DSSS_SIFSTime 0.000010 // 10us #define DSSS_PreambleLength 144 // 144 bits #define DSSS_PLCPHeaderLength 48 // 48 bits is used (see mac-timers.cc, line 227) for the backoff of the MAC protocol. So, "Mac set bandwidth\_" seems to change only one of many parameters defining the actual bandwidth of the mobilenode. I don't know if the default parameters found in NS-2.1b6 form a coherent set, and if they do which bandwidth they achieve (I suspect it is 1 or 2Mb/s). To get a greater bandwidth one would need to know which parameters to change in the CMU model, and at which coherent values one should set them. I did a search on the mailing list for 802\_11 on the mailing list and discovered that mac-802\_11.cc had other bugs (That may be corrected in NS-2.1b7), and was therefore happy to find the mac-null.cc program, a Mac layer giving me infinite bandwidth. 8. Who works on the ZRP? ----------------------- At Cornell, in the Electrical and Computer Engineering Department: Prof. Zygmunt J. Haas and Marc Pearlman, a Ph.D. candidate, designed the protocol, Marc wrote OPNET models of it. Prince Samar, a Ph.D. student, is interested in it. Robin Poss (me), a Meng student, adapted Marc's OPNET model to ns. haas@ee.cornell.edu pearlman@ee.cornell.edu samar@ece.cornell.edu rgp5@cornell.edu Li Li, a Ph.D. candidate in the Computer Science Department at Cornell, gave me his own adaptation of Marc's OPNET model to ns when mine wouldn't work, as well as the mac-null.cc file. lili@cs.cornell.edu 9. Documentation ---------------- 1. Papers about the ZRP: http://www.ee.cornell.edu/~haas/Publications/perkins.ps http://www.ee.cornell.edu/~haas/Publications/sigcomm***.ps Full descriptions, more papers at http://www.ee.cornell.edu/~haas/wnlprojects.html#RWN 2. Websites The Wireless Networks Laboratory at Cornell http://www.ee.cornell.edu/~haas/wnl.html The main NS page http://www.isi.edu/nsnam/ns/ The NS manual on line http://www.isi.edu/nsnam/ns/doc/index.html The NS-users searchable mailing list achive, excellent source of information http://www.isi.edu/nsnam/htdig/search.html You will get the most up to date and exhaustive information about a certain topic in ns with the command: find /to_be/or_not_to_be/ns-allinone-2.1b6/ns-2.1b6/ -exec echo {} \; -exec grep 'topic' {} \; > info (type it in one line) The wireless part of NS was mostly developped by the CMU Monarch group: http://www.monarch.cs.cmu.edu/ And they wrote a manual about it: ftp://ftp.monarch.cs.cmu.edu/pub/monarch/wireless-sim/ns-cmu.ps A database of implemented algorithms: http://hissa.nist.gov/dads/terms.html Learn sed and grep: http://www.pegasus.rutgers.edu/~elflord/unix/intro.html 10. Questions & suggestions --------------------------- You can send your questions to the NS mailing list (subscribe first, see the ns page on how to do that) at ns-users@ISI.EDU . Or send them to me, rgp5@cornell.edu. Don't miss the zrp/doc directory.

近期下载者

相关文件


收藏者