Comparison between modifying the flooding routing protocol and mflood

Source: Internet
Author: User

Flooding improvement experiments have been ongoing recently. After two weeks, I finally made some progress. It may seem like a slight modification to Daniel, but it seems to me a success. I also summarized my experiences in my blog.

First of all, I learned how to modify the mflood routing protocol and wrote it again. It feels quite smooth. So I want to make some minor changes and try to optimize the effect. At that time, the idea was to use the distance between nodes as the routing parameter. If a node receives a packet forwarding packet from a node that is farther than itself, it will directly lose the packet. At first, I modified it on mflood. After the experiment, I found that there was no change. After two days, I want to know that the original node has no chance to compare the distance parameter, because everyone will forward the packet as soon as they receive it, and receive the forwarded packet, it will be discarded because the serial number is old, and the results certainly cannot implement the idea of self-distance parameters.

After thinking about it, I want to use the original flooding. That is to say, I first block all the functions related to serial number comparison in mflood, let him become the simplest routing protocol for receiving and forwarding. Run after modification. In this experiment, the number of forwarding times is used as the evaluation index. 4 nodes and 10 nodes were tested respectively. The result is as follows:

Next, I started to modify the flooding route and added a distance d parameter to the flooding header. the Recv function in the CC file adds the function for distance calculation and comparison, modifies the forward function, and updates the flooding header during forwarding. This process is painful. My c ++ programming foundation is very weak. As I have said before, read the code and wait until you write it, but find it very difficult, so I have been writing this part back and forth for several days, and it is crazy to end up failing to compile it during make. Finally, I found some inspiration in the protoname routing protocol written by a foreigner and Its extensions to the article, and finally wrote the successful code. Of course, for the sake of safety, I did not write a member function separately, because I am worried about errors, but it is not changed much, it can be written in the Recv function. Next, make is successful and the experiment is completed. (Same as above ).

 

 

We can see that the optimization is obvious. However, the optimization effect is not mflood prominent, and the mflood experiment results are now posted here:

As the number of nodes increases, I predict that the number of forwarding times will be close to that of mflood. Of course, I have not conducted any experiments yet. Next, I may try this experiment.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.