AODV protocol improvement simulation based on ns2 and ns3

AODV improvements and simulation suggestions:

背景:研一暑假(2021.07)导师告诉我研究方向,并且发给我几十篇相关文献,还告诉我后面可能需要用到NS2做仿真。

At that time, I felt very confused, especially after reading the literature, I didn't know where to find the innovation points of the small paper. Later, after finding an innovative point, I didn’t know how to realize it. NS2 is particularly unfriendly to novices. No one in the laboratory has used ns2. It is completely necessary to go from 0 to 1. This is the most difficult and most confusing. Because ns2 no longer maintains and updates online learning materials, there are very few learning materials, so I wrote this article to give some reference opinions to fellow people on this road, so as to avoid detours. Recently, I have been busy submitting journals and looking for jobs. I will elaborate on the improvement of the network simulation protocol after a while, and I will write my improvement process and methods in the following articles.


1. Literature reading:

Maybe everyone thinks that literature reading is useless, so it is a big mistake, because only by reading a large number of literature can you know the hot spots in this direction, and the most important thing is to improve your knowledge and ability to write subsequent papers. After completing the paper experiment, I want to publish a good journal. Without this kind of reading accumulation and writing, it is very painful. However, literature reading will also take many detours. There are many points that are not used at all later, but you have to go. If you feel confused, it is best to ask your tutor to report the learning content. It is recommended to use documents. Let the instructor understand your learning direction more intuitively.

  1. Learn how to search documents
  2. Learn how to look at the division of literature and periodicals, that is, the quality of literature
  3. Make reading notes, which can be used later in opening questions or small papers
  4. Find the innovation point of your essay

2. Learn to simulate:

对于网络方向的,我觉得仿真真的很重要,我想给的建议是:如果要改进或者设计协议,能用matlab的,坚决不要用ns系列的仿真,因为真的会让你绝望。一定需要用到ns2的同学有以下建议:

  1. The ns2 environment must be installed first. This may be a bit difficult at first, but it is very simple after installing it once. I installed Ubuntu18.04 + ns-2.35 directly. There are many specific installation steps on the Internet, but you need to use Students of MAODV need to install ns2.26, because the higher version needs to change other source codes, which is more troublesome.
  2. Find a tutorial on the Internet and run an experiment according to the tutorial, including Tcl scripts, topology diagrams, AWK processing tr files, and learning how gnuplot draws pictures.
  3. After that, master the common shell commands, the meaning of each Tcl code, the method of AWK code processing data, master gnuplot to adjust the picture style, and learn gnuplot to actually draw beautiful images, so you don’t need to use matlab or originlab.
  4. After the above basics are completed, it is necessary to learn to write scripts by yourself. The most important thing is to write batch files by yourself. Many people actually run experiments again and again! Think about it, everyone, a general network simulation needs to be run about 50 times for each group, with at least 5 points in a graph, and 250 experiments for a graph, and it is enough to run manually again and again. Every time I finish modifying the source code, I just let it run for two days and two nights, and then draw the pictures by myself.

3. Routing protocol source code modification and improvement:

目前我改进的是路由协议,还没有改过跨层协议,导师要求我大论文第二个点设计一个跨层协议,后面如果设计出来了再和大家分享

Suggestions for improving routing protocols, taking the improvement of AODV protocol as an example:

  1. Learn to add protocols to ns2, it is best to add a few more, so that you can compare these few in the future.
  2. The main file to be changed by AODV is the aodv.cc file. The code has 1389 lines. It is not so easy to change. First of all, it must have the basis of C++ splitting objects, otherwise it will be difficult to change.
  3. The reason why I recommend that everyone who can use matlab never use ns is because the source code is difficult to change, there is no integrated IDE, and there is no one-click operation to find errors, only debug. Before improving aodv.cc, familiarize yourself with the principle and process of the aodv protocol, and then change the code in it.
  4. When changing the code, try to mark it well. After all, almost 2000 lines have been changed. How to change it varies from person to person. I will share my improvement for your reference when I have time later.

Guess you like

Origin blog.csdn.net/Lethe_01/article/details/124838060