Tag Archives: aodv routing table

Collection of NS2 Reading Material [Tutorials and Documents] – Wired and Wireless

Hi Folks,

In this post i am posting a sea of (network simulator) NS2 reading material (files and resources) that i have collected over the years. Many of us researchers usually face the problem of finding good reading material on ns2 and usually just type ns2 in Google and hourly browse through hundreds of links that Google shows up. That may prove fruitful although its tiring and agonizing. (I have done that quite a lot now). Also we search for problems being faced by us when we carry out simulations and in the end we find no solutions. (NS2 problems will be like that for many years to come. 😦 ) As far as NS2 is concerned my personal experience is that you are on your own.

This post would somewhat enthrall you and you might eventually like it as it contains lots of reading materials and resources that could be of much help to budding researchers like me in the field of networking. This is just a small effort from my side to the little known NS2 Research Community.

Please leave comments, suggestions, and an encouraging word of thanks in the comments.

CATEGORY I) Learning NS2 (Tons of Introductory Tutorials and Presentations)

1. http://www.mediafire.com/view/3grw7npzv4arnj7/NS2_Exercises.pdf
2. http://www.mediafire.com/view/3grw7npzv4arnj7/NS2_Exercises.pdf
3. http://www.mediafire.com/view/ak2haa67o899yka/NS2_Source_Code_Analysis_Method.ppt
4. http://www.mediafire.com/view/8s3via5iw119hyi/Network_Simulation_and_Protocol_Implementation_Using_Network_Simulator_2.pdf
5. http://www.mediafire.com/view/k8gdmh2byer8b1s/Simulating_Networks_with_Network_Simulator_NS2.pdf
6. http://www.mediafire.com/view/wmxyf3emuib30kc/NS2_Tutorial_Part_II_-_Inteface_OTCL_Linkage.pdf
7. http://www.mediafire.com/view/6ycwpxrfnjeazee/NS2_Laboratory_-_Professor_Chansu_Yu.pdf
8. http://www.mediafire.com/view/di5vwln85cd3gat/ns2_for_the_Impatient.pdf
9. http://www.mediafire.com/view/qdwx2ghrdfm5zhd/NS_Tutorial_-_Padma_Haldar.ppt
10. http://www.mediafire.com/view/kcdbt9u9qv84icb/Wireless_world_in_NS.pptx
11. http://www.mediafire.com/view/0big047k7cbo3t3/Network_Simulator_Version_2_-_Abu.doc
12. http://www.mediafire.com/view/bdomhdewwi4k8bc/ns2_Tutorial_-_Haobo_Yu,_Nader_Salehi.pdf
13. http://www.mediafire.com/view/rw1yt9dqt3t5qpy/NS2_Tutorial_-_Sung_Park.pptx
14. http://www.mediafire.com/view/umi8ui999z3d77q/ns2_Tut.pdf
15. http://www.mediafire.com/view/tqy99nihjs0vhu5/Report_On_NS2.doc
16. http://www.mediafire.com/view/tqy99nihjs0vhu5/Report_On_NS2.doc
17. http://www.mediafire.com/view/yu5e8udx47isut0/Using_NS2.pdf
18. http://www.mediafire.com/view/u0vll0pgm73ffvk/Extensions_to_NS2_-_Notes_and_Documentation.pdf
19. http://www.mediafire.com/view/qxsdbv7e113zxgz/Introduction_to_ns2_-_Donald_C_Wunsch.pdf
20. http://www.mediafire.com/view/jal0eomo2xlk4dz/Marc_Greis_Tutorial.pdf
21. http://www.mediafire.com/view/pd04i7k1ktrwihe/NS2_Workshop.ppt
22. http://www.mediafire.com/view/43r77l1nsecg6cn/Intro_to_ns2__-_Gayatri.ppt
23. http://www.mediafire.com/view/my1cr878twyewoy/The_Network_Simulator_NS2_-_Claudia_Canali.pdf
24. http://www.mediafire.com/view/0o2yhxvb41u6n4b/NS_Internals.ppt
25. http://www.mediafire.com/view/b41kdglhubdcbp7/NS_Training_Course_-_ns_modules_-_Chau_Chi_Wang.pdf
26. http://www.mediafire.com/view/5alciaxhi0153eq/ns2_Laboratory_-_Chanso_Yu.pdf
27. http://www.mediafire.com/view/mntojpd59m3ahp4/3rd_NS2_Simulator_Workshop.pdf
28. http://www.mediafire.com/view/q80rwswwig46t47/NS_By_Examples.pdf
29. http://www.mediafire.com/view/g4ban3kiwbr6b4y/Introduction_to_Network_Simulator_-_Giovani_Neglia.pdf
30. http://www.mediafire.com/view/zxx77zilbmsnksc/NS2_Tutorial_-_Michael_Welzi.pdf
31. http://www.mediafire.com/view/96rd4e2h9952vk0/ns2_Tutorial_-_institut_fur_Telematik.pdf
32. http://www.mediafire.com/view/fgo0b09bcdcomhh/NS2_Tutorial_-_Chi_Heng_Ke.pptx
33. http://www.mediafire.com/view/sw60it08h6i1dia/NS2_Fundamentals.pdf
34. http://www.mediafire.com/view/vhbfdwyenceikyw/An_Introduction_to_NS,_NAM_and_OTCL_-_Paul_Meeneghan_and_Declan_Delaney.pdf
35. http://www.mediafire.com/view/9958z37icc6uhnl/Design_and_simulation_of_Network_Using_NS2.pdf
36. http://www.mediafire.com/view/7o8afovbnkrn17n/NS-2_Introduction_-_Bahador_Bakshi.pdf
37. http://www.mediafire.com/view/7opg8nz45dyqeco/Network_Simulator_-_Integrated_Communication_Systems_Group.pdf
38. http://www.mediafire.com/view/2vlqlqrly2s9l0k/How_to_use_ns2_-_Jae_Pil_Yoo.pdf
39. http://www.mediafire.com/view/aljlsmlu2zxz2so/Network_Performance_and_NS2_-_Mohammed_M_Kadhun.pdf
40. http://www.mediafire.com/view/tm7ep912y1d2sk2/ns2_Tutorial_-_Kameswari_Chebrolu.pdf
41. http://www.mediafire.com/view/ng4xzwsbsq4fydq/ns2_Simulator_for_Beginners.pdf
42. http://www.mediafire.com/view/n0bm6uh1abcf5pg/NS2_Tutorial.pdf
43. http://www.mediafire.com/view/8ja111fzd16w1zi/The_ns_manual.pdf
44. http://www.mediafire.com/view/854k7ck6bn4q8tp/IPAM_Tutorial_-_Network_Modeling_and_Traffic_Analysis_with_ns2.pdf
45. http://www.mediafire.com/view/3y16z7w4cx1dp9i/NS2_Introduction_-_Osman_Ghazali(2).pdf
46. http://www.mediafire.com/view/lbj2q4t4t9fw5t2/Wireless_world_in_NS2_-_Padma_Haldar.pdf

CATEGORY II) Reading Material on OTcl and Tcl Languages

1. http://www.mediafire.com/view/93fxhj23f8x3v5h/Interpreted_C++,_Object_Oriented_Tcl,_What_Next.pdf
2. http://www.mediafire.com/view/ap5eedimlscvdmt/Overloading_Comparison_Operators.pdf
3. http://www.mediafire.com/view/a2h1aqnxa33b1vo/TCP_Performance_Simulations_Using_ns2.pdf
4. http://www.mediafire.com/view/t4lxst4mh3wwsev/OTcl_-_Object_Tcl_Extensions.pdf
5. http://www.mediafire.com/view/vprs8t8zm0qe4c0/Tcl_Fundamentals.pdf
6. http://www.mediafire.com/view/u9ix6kp5van32dy/Introduction_to_MIT_Object_Tool_Command_Language_(OTCL)_Part_1.pdf
7. http://www.mediafire.com/view/80u028i48tq7233/Introduction_to_OTcl_1.pdf
8. http://www.mediafire.com/view/jdvp0hk4tkn0wf3/Tcl_and_ns2_Tutorial_Outline_OTcl_Basics.pdf
9. http://www.mediafire.com/view/zk5hbdgxx9d17v8/IEEE_802.11b_Ad_Hoc_Networks_-_Performance_Measurements.pdf
10. http://www.mediafire.com/view/p6m8xkg0j07k71w/TCL_OTCL.pdf
11. http://www.mediafire.com/view/t3ydkox86bbmqky/An_Introduction_to_NS,_Nam_and_OTcl_scripting.pdf
12. http://www.mediafire.com/view/3qubmw6m3599c9v/OTcl_-_The_User_Language.pdf
13. http://www.mediafire.com/view/cqf03edf73grkkm/Tcl_Basics.pdf
14. http://www.mediafire.com/view/14hz9ru2yeqs3j0/TCL_%26_OTCL.pdf
15. http://www.mediafire.com/view/o00157ttco35hi0/Practical_Programming_in_Tcl_and_Tk.pdf
16. http://www.mediafire.com/view/a8875v058butojp/Tcl_and_OTcl_for_ns.pdf
17. http://www.mediafire.com/view/vmkdgrs1xi5zco4/Objects_in_TCL.pdf
18. http://www.mediafire.com/view/1eg59u199e992ln/tcl_objects.pdf
19. http://www.mediafire.com/view/y3kbfxncfofyyzu/TclTk_Integration.pdf
20. http://www.mediafire.com/view/s949uv2mthbbely/Tcl_Tk_-_A_Developer’s_Guide.pdf

CATEGORY III) Reading Material on Perl and Awk Scripting Languages

1. http://www.mediafire.com/view/armp5z7biteorb6/Awk_Cheat_Sheet.pdf
2. http://www.mediafire.com/view/armp5z7biteorb6/Awk_Cheat_Sheet.pdf
3. http://www.mediafire.com/view/armp5z7biteorb6/Awk_Cheat_Sheet.pdf
4. http://www.mediafire.com/view/djqc59am0a6fc40/Learn_Perl_by_Examples_-_Perl_Handbook_for_Beginners_-_Basics_of_Perl_Scripting_Language.pdf
5. http://www.mediafire.com/view/px4bbrd31ii9nez/A_Quick,_Painless_Introduction_to_the_Perl_Scripting_Language.pdf
6. http://www.mediafire.com/view/qs5mx7mzos9317a/The_Awk_manual.pdf
7. http://www.mediafire.com/view/a5sm1k24ej0cdzo/Effective_Awk_Programming.pdf
8. http://www.mediafire.com/view/3n5zhicunp5xngk/Perl_Tutorial_for_Beginners.pdf
9. http://www.mediafire.com/view/g26q3frpsdjmzwh/Learning_Perl_-_O_Reilly.pdf
10. http://www.mediafire.com/view/rh7nxiphm4iwr76/Perl_5_Tutorial_-_1st_Edition.pdf

CATEGORY IV) NS2 Reading Material on Wireless Simulations and MANETs

1. http://www.mediafire.com/view/a4lds3w4p2962w9/NS2_Wireless_Simulation_Tutorial_-_Zhibin_Hu.pdf
2. http://www.mediafire.com/view/w5vv75272q3p7sz/Radio_Propagation_Models_Implemented_in_NS2.pdf
3. http://www.mediafire.com/view/o84fi16fi65j11j/Simulation_of_Networks_of_Queues_in_NS2.pdf
4. http://www.mediafire.com/view/tkbtfp2mizdfrdu/Effects_of_Detail_in_Wireless_Network_Simulation.pdf
5. http://www.mediafire.com/view/n3jelnj2o80mfo9/MANET_Extensions_to_NS2.pdf
6. http://www.mediafire.com/view/kngl9liwqnmdr16/New_Implementation_in_ns2_for_wireless_routing.pdf
7. http://www.mediafire.com/view/tm49gbxdso1g4wm/NS2_Tutorial_-_Wireless_Network_Lab.pdf
8. http://www.mediafire.com/view/53qkvdd23z6zqwr/Directed_Diffusion_for_Wireless_Sensor_Networking.pdf
9. http://www.mediafire.com/view/81at8tdfwgkbmc5/A_Survey_of_Network_Simulators_Supporting_Wireless_Networks.pdf
10. http://www.mediafire.com/view/2g1849e04geuadu/Design_and_Simulation_of_Wireless_Network_using_NS2.pdf
11. http://www.mediafire.com/view/d2heucd213mq8xq/NS2_Tutorial_-_Running_Simulations_-_Mathias.pdf
12. http://www.mediafire.com/view/p74wkc6g64rsc61/AdHoc_Networking_-_Christian_Bettsetter.pdf

CATEGORY V) NS2 Tutorials and Reading Material on Implementing Ad Hoc Routing Protocols in MANETs

1. http://www.mediafire.com/view/mnujyehjd7ff3vn/Sample_Coding_Wireless_NS2.docx
2. http://www.mediafire.com/view/s9plgl7rocbkpg8/Implementing_a_Routing_Agent_with_manually_configured_routing_table_(Static_Table).pdf
3. http://www.mediafire.com/view/r84smueu0rwe4m7/How_to_implement_protocol_in_NS2_-_Shi_Feng_Yan.pdf
4. http://www.mediafire.com/view/r7g8ulgr2uo7iub/Analysis_of_DSR_in_ns2.pdf
5. http://www.mediafire.com/view/d99yemfp29w9fm9/Simulation_of_MANET_Routing_Protocols.pdf
6. http://www.mediafire.com/view/vs32ypkg5sdx43o/Implementing_a_MANET_Unicast_Routing_Protocol_for_MANETs.pdf
7. http://www.mediafire.com/view/7ca1rs2uzoqrwez/A_Tutorial_on_the_Implementation_of_AODV_protocol_in_NS2_-_Mubashir_Husain_Rehmani.pdf
8. http://www.mediafire.com/view/8zo9vb0341p6wn4/TCP_over_Ad_hoc_networks.pdf
9. http://www.mediafire.com/view/owv51txu105q1d9/Implementation_and_Performance_Evaluation_of_MFlood_Protocols_for_Wireless_Ad_Hoc_Networks.pdf
10. http://www.mediafire.com/view/owv51txu105q1d9/Implementation_and_Performance_Evaluation_of_MFlood_Protocols_for_Wireless_Ad_Hoc_Networks.pdf
11. http://www.mediafire.com/view/nq3x73kbrnnucj1/An_Overview_of_MANETs_Simulation.pdf
12. http://www.mediafire.com/view/kb2vj7wpu1e5dj3/Implementing_GPSR_routing_protocol.pdf
13. http://www.mediafire.com/view/fzqjftfii4di3pu/Tutorial_for_Simulation-based_Performance_Analysis_of_MANET_Routing_Protocols_in_ns-2_-_Kartik.doc
14. http://www.mediafire.com/view/64b05satg1300jy/How_to_Add_a_New_Protocol_in_NS2_-_Xu_Leiming.ppt
15. http://www.mediafire.com/view/r5dx1ir4u1fgtg8/Design_Routing_Protocol_Performance_Comparison_in_ns2_-_AODV_comparing_to_DSR_as_Example.pdf
16. http://www.mediafire.com/view/hy2qhqh41lgw2ay/Porting_AODVUU_Implementation_to_NS2_and_Enabling_Trace_Based_Simulations.pdf
17. http://www.mediafire.com/view/uie4di69lqpf6du/Performance_Analysis_of_Reliable_Multicast_routing_protocols.pdf
18. http://www.mediafire.com/view/caryqtwb33yjd6t/On_Demand_Routing_in_Multihop_wireless_mobile_ad_hoc_networks.pdf
19. http://www.mediafire.com/view/dn01puy5okws0ol/Performance_Evaluation_of_Ad_Hoc_Routing_Protocols.doc
20. http://www.mediafire.com/view/fg2ac65tdk6ugvq/MANET_Implementation_and_Test_-_Jaehoon_Jeong.pdf
21. http://www.mediafire.com/view/6z0arhz5y2qc299/Inspect_-_A_Visual_and_Analysis_for_NS2_Wireless_Simulations.pdf
22. http://www.mediafire.com/view/kbn2f94t8bc4889/Mobile_Ad_Hoc_Network_Routing_Protocols_-_Methodologies_and_Applications.pdf
23. http://www.mediafire.com/view/37ste5ym1f3dc6c/Temporaly_Ordered_Routing_Algorithm.pdf
24. http://www.mediafire.com/view/8zat9z37x48eibv/Introduction_to_Geographic_Greedy_Forwarding.pdf
25. http://www.mediafire.com/view/k1k9nhhgf9yt7eb/Survey_of_Routing_Protocols_in_Wireless_Body_Sensor_Networks.pdf

CATEGORY VI) NS2 Tutorials and Material on 802.11 Interface

1. http://www.mediafire.com/view/mur276gx5367rq5/Wireless_Routing_in_NS2.pdf
2. http://www.mediafire.com/view/a148kxg7l9c1gqt/Effects_of_Detail_in_Wireless_Network_Simulations.pdf
3. http://www.mediafire.com/view/1xmfino42djv0n1/Understanding_the_Implementation_of_IEEE_802.11_Standard_in_NS-2_-_Ke_Liu.pdf
4. http://www.mediafire.com/view/5ftc1lz3dxw37xm/Simulate_802.11b_within_NS2_-_Wu_Xiuchao.pdf
5. http://www.mediafire.com/view/h5rnc2mbjb7j9fg/A_Tutorial_of_802.11_Implementation_in_ns2_-_Yue_Wang.pdf
6. http://www.mediafire.com/view/dycvfhsstnwb6wn/A_Tutorial_on_Wireless_Implementation_in_ns2.pdf
7. http://www.mediafire.com/view/4v98nai3ljaqipv/Realistic_802.11b_in_ns2_(Simulation_vs_Real).pdf
8. http://www.mediafire.com/view/cysv4y4l71msw3r/IEEE-802.11_Overview_-_Mustafa_Ergen.ppt
9. http://www.mediafire.com/view/smv0k45qr56f57q/Basic_802.11_Statistics_-_Evan_Jones.pdf
10. http://www.mediafire.com/view/45p83tqcuk7iwep/NS2_Module_for_IEEE_802.22_Standard.pdf
11. http://www.mediafire.com/view/kx9l0lf2pkwxvm7/ANSI_IEEE_Std_802.11.pdf
12. http://www.mediafire.com/view/2i0yl855q5idq0a/Adding_Multiple_Interface_Support_in_NS2.pdf
13. http://www.mediafire.com/view/97o14958iha21ah/Simulation_of_Wireless_Multi-_Networks_in_NS-2.pdf

CATEGORY VII) NS2 Tips and Tricks (My Favorite 🙂 )

1. http://www.mediafire.com/view/dkh5djq1xqw8ahm/How_to_change_transmiision_range_in_NS2.pdf
2. http://www.mediafire.com/view/mj6615qba6zka93/Improvements_on_MAC_802-11_simulation.pdf
3. http://www.mediafire.com/view/37157by3g3h7ybg/Learning_Timers_NS2.pdf
4. http://www.mediafire.com/view/adnjo27v9e64nrq/Pedro_Vale_Estrela_-_Assorted_NS2_Tips.pdf
5. http://www.mediafire.com/view/3nauc6666m39fuc/Simulate_Random_MAC_Protocol_in_NS2_(Part_I).pdf
6. http://www.mediafire.com/view/uvumf7dk4jjo2je/Simulate_Random_MAC_Protocol_in_NS2_(Part_II).pdf
7. http://www.mediafire.com/view/c9cb79obrx1joab/Simulate_Random_MAC_Protocol_in_NS2_(Part_III)_-_Pearls_in_Life.pdf
8. http://www.mediafire.com/view/oqn7ncylyh327a2/Simulate_Random_MAC_Protocol_in_NS2_(Part_IV).pdf
9. http://www.mediafire.com/view/k37pvk4y9y9qi4s/Cross_Layer_Access_in_NS2.pdf
10. http://www.mediafire.com/view/3369jfcr9bu0jfq/Turn_off_ARP_in_ns2.pdf
11. http://www.mediafire.com/view/idcakr7irci8r8g/Kie_Liu’s_NS2_Code.pdf
12. http://www.mediafire.com/view/dy9cccs55tmk417/Routing_Performance_Analysis_from_Trace_Files.pdf
13. http://www.mediafire.com/view/bjav6m2mx58507k/Timer_Usage.pdf
14. http://www.mediafire.com/view/1ws1o8st66tbwga/Enhanced_Carrier_Sensing_ns2.pdf
15. http://www.mediafire.com/view/in4din9q451nnfa/Turn_off_energy_log_in_ns2.pdf
16. http://www.mediafire.com/view/qdjvl3mmm32c7qe/Understanding_Headers_and_Addresses_in_ns2.pdf
17. http://www.mediafire.com/view/ebchhqbgs9xn7n5/Adding_new_application_and_agent.doc
18. http://www.mediafire.com/view/zu99seoyud6r77v/How_to_-_Wireless_Network_Emulation_Using_ns2_and_User_Mode_Linux.pdf
19. http://www.mediafire.com/view/xcih8h8oo7lmvdc/Timers.pdf
20. http://www.mediafire.com/view/62vr7ncz0lna16n/ns2_Adding_Modules.pdf
21. http://www.mediafire.com/view/f7u045e13ly49e5/Energy_model_update_in_NS-2.pdfhttp://www.mediafire.com/view/f7u045e13ly49e5/Energy_model_update_in_NS-2.pdf
22. http://www.mediafire.com/view/f9an42la2sx3avz/Myth_of_Power_Control_in_Routing.pdf
23. http://www.mediafire.com/view/sh3l01u6y5powk7/Timers_ns2.pdf
24. http://www.mediafire.com/view/vyx7k3lcqhu7w17/Finding_Node_Position,Velocity_and_Speed_in_NS2.34_Mano.pdf
25. http://www.mediafire.com/view/a5m9yk4wkf6zaaz/NS2_Simple_Method_to_Analyze_Traces_-_Causal_Nexus.pdf
26. http://www.mediafire.com/view/567gj7rjx1ugq66/How_to_get_Neighbor_Nodes_of_a_Mobile_Node_in_Wireless_Simulations.pdf
27. http://www.mediafire.com/view/pgvmmjw58fx16lm/Routing_Table_Print_in_AODV.pdf
28. http://www.mediafire.com/view/8i13xwyhseevlle/NS2_SetDest_Acceleration_Enhancement.pdf
29. http://www.mediafire.com/view/lwh59dx1rnl5bqy/Improvements_on_MAC_802.11_Simulation_when_link_loss_ration_or_contention_is_considered.pdf
30. http://www.mediafire.com/view/1bhq4b5gyp12j1r/Obtaining_Node_Position_and_Energy_Dynamically_in_ns2.pdf
31. http://www.mediafire.com/view/woktraus2d2yx3u/Timer_Usage_in_ns2.pdf
32. http://www.mediafire.com/view/locmlkm8lxymoso/How_to_Recompile_Network_ns2.pdf
33. http://www.mediafire.com/view/oe2cbwwix8x860v/ECS_-_An_Enhanced_Carrier_Sensing_Mechanism_in_ns2.pdf
34. http://www.mediafire.com/view/h57yiso5ezah41n/Dynamic_Transmission_Power_Control_in_ns2.pdf
35. http://www.mediafire.com/view/p80lbtsib834nq7/How_to_patch_GPSR_routing_to_ns-2.34_-_Page_2.pdf
36. http://www.mediafire.com/view/gaednxjkk18l8nt/How_to_patch_GPSR_routing_to_ns-2.34_-_Page_3.pdf
37. http://www.mediafire.com/view/lbjh55hm3ho5m8y/Bryan’s_NS-2_Dynamic_Source_Routing_FAQ.pdf

CATEGORY VIII) NS2 Miscellaneous Reading Material

1. http://www.mediafire.com/view/3y75e86vej79hmp/xgraph_utitlity_of_ns2(2).pdf
2. http://www.mediafire.com/view/aqzc6u7gm4uz9hs/Integration_of_NS_BGP_with_NS-2.34(2).pdf
3. http://www.mediafire.com/view/qcw3j0nca1y0j39/Using_Ns2(2).doc
4. http://www.mediafire.com/view/12zlrnvqint08pj/Trace_Analyzer_for_NS-2(2).pdf
5. http://www.mediafire.com/view/mbasaywr7e9qccy/Using_NSG_Wired(2).doc
6. http://www.mediafire.com/view/ejeaxfiweheftbq/BonnMotion_Docu(2).pdf

I shall strive to keep on updating this list as soon as I stumble upon new material. I shall constantly update this list. If you have any other document related to ns2 which u need to share (please do not hide any document if you have downloaded it from the internet) please post it in the comments.

Expand this list as much as possible and lets help each other !!.

Disclaimer: All these files are not mine and i have just collected them from the internet. If you have any issues regarding this post or any material that has been uploaded just throw a comment and i shall remove that link.

[How To] Display Routing Table of AODV in ns-2.34

Hi Folks,

In this post I shall tell about how to display routing table of nodes while using AODV protocol. I read various tutorials online but most of them failed to exactly display the routing tables or were unable to exactly specify where to put the print_routing_table() function. And by using these methods I kept getting segmentation faults or huge files displaying routing tables even when the node count was 5 with only 1 traffic source. However i have used some of those tutorials and modded them to work fine “cuz u know no one writes code from scratch”. My grandfather did that and he is old by now.

Let’s begin:

Step 1) Open file aodv_rtable.h . Go to class aodv_rtable and in its public scope declare a member function

void rt_display(nsaddr_t id);

Step 2) Open file aodv_rtable.cc . Go to end and type this (read copy-paste 🙂 )

void
aodv_rtable::rt_display(nsaddr_t id)
{
FILE *dumpFile;
dumpFile = fopen("rtable.txt", "a+");
aodv_rt_entry *rt = rthead.lh_first;
for(; rt; rt = rt->rt_link.le_next) {
// You can add more route table entries if you want to. See aodv_rtable.h for more entries.
fprintf(dumpFile, "NODE: %d \t %f \t %d \t %d \t %d \t %d \t %.4f \t %d \n", id, CURRENT_TIME,
rt->rt_dst, rt->rt_nexthop, rt->rt_hops, rt->rt_seqno, rt->rt_expire, rt->rt_flags);
}
fclose(dumpFile);
}

Step 3) (Important One) Open file aodv.cc . Go to the function
AODV::rt_update(aodv_rt_entry *rt, .... )

At the end of inside this function call the rt_display() function as:

rtable.rt_display(index);

Step 4) Compile using make and sudo make install inside the ns-2.34 directory.

Step 5) run your tcl file (here is the file if u want to test). The rtable.txt should look like this rtable.txt  ..