AODV protocol-based multi-node ad hoc network transmission simulation method and simulation system

文档序号:1925233 发布日期:2021-12-03 浏览:13次 中文

阅读说明:本技术 基于aodv协议的多节点自组网传输的模拟方法及模拟系统 (AODV protocol-based multi-node ad hoc network transmission simulation method and simulation system ) 是由 何晨光 曲冠桥 叶亮 马琳 王雨 于 2021-09-03 设计创作,主要内容包括:基于AODV协议的多节点自组网传输的模拟方法及模拟系统,本发明涉及多节点自组网传输的模拟方法及模拟系统。本发明为了解决在真实节点受物理条件限制无法模拟出多节点通信时的通信情况并且利用仿真软件仿真的网络场景与真实物理世界相差较大的问题。过程为:一:使用四个真实的物理节点建立起仿真场景;二:在中继节点与服务器节点上运行指令传输的通信程序;三:屏蔽源节点与目的节点之间的路径,使源节点与目的节点在组网时不可互相发现;四:在源节点、中继节点、目的节点上运行能模拟多节点通信时跳数增加的AODV路由协议;五:在源节点、中继节点、目的节点上运行数据传输的通信程序。本发明用于多节点自组网传输的模拟领域。(The invention discloses an AODV protocol-based multi-node ad hoc network transmission simulation method and a simulation system, and relates to a multi-node ad hoc network transmission simulation method and a multi-node ad hoc network transmission simulation system. The invention aims to solve the problems that the real node is limited by physical conditions and cannot simulate the communication condition of multi-node communication, and the network scene simulated by simulation software is greatly different from the real physical world. The process is as follows: firstly, the method comprises the following steps: establishing a simulation scene by using four real physical nodes; II, secondly: running a communication program for instruction transmission on the relay node and the server node; thirdly, the method comprises the following steps: shielding a path between a source node and a destination node, so that the source node and the destination node cannot discover each other when networking; fourthly, the method comprises the following steps: the method comprises the steps that an AODV routing protocol capable of simulating hop count increase in multi-node communication is operated on a source node, a relay node and a destination node; fifthly: and running a communication program for data transmission on the source node, the relay node and the destination node. The invention is used in the field of simulation of multi-node ad hoc network transmission.)

1. The method for simulating the multi-node ad hoc network transmission based on the AODV protocol is characterized by comprising the following steps: the method comprises the following specific processes:

the method comprises the following steps: establishing a simulation scene by using four real physical nodes, wherein one node represents a communication source node, one node represents a communication destination node, one node represents a relay node in the source node and the destination node, and one node represents a server node for sending instructions to the relay node;

step two: running a communication program for instruction transmission on the relay node and the server node;

step three: shielding a path between a source node and a destination node, so that the source node and the destination node cannot discover each other when networking;

step four: the method comprises the steps that an AODV routing protocol capable of simulating hop count increase in multi-node communication is operated on a source node, a relay node and a destination node;

step five: and running a communication program for data transmission on the source node, the relay node and the destination node.

2. The method for simulating the transmission of a multi-node ad hoc network based on the AODV protocol according to claim 1, wherein: in the second step, a communication program for instruction transmission is operated on the relay node and the server node; the specific process is as follows:

step two, firstly: the server node transmits the instruction by using an instruction transmission communication program;

step two: the relay node receives the instruction using an instruction transmission communication program.

3. The method for simulating the transmission of a multi-node ad hoc network based on the AODV protocol according to claim 2, wherein: in the first step, the server node sends the instruction by using an instruction transmission communication program; the specific process is as follows:

when the server node has an instruction to be transmitted to the relay node, the server node calls time information to display the moment when the server node sends the information, and simultaneously sends the information to the relay node through the port and displays the IP address of the server node to send the instruction content to the IP address of the relay node;

the content of the sending instruction is hop count information and transmission delay information.

4. The method for simulating the transmission of a multi-node ad hoc network based on the AODV protocol according to claim 3, wherein: in the second step, the relay node receives the instruction by using an instruction transmission communication program; the specific process is as follows:

firstly, continuously monitoring the instruction received by the port with the same port number as that in the step two; secondly, after the port receives the instruction, the relay node stores the received hop count information and transmission delay information which need to be simulated in the relay node; finally, calling time information to display the moment when the relay node receives the information, and displaying the IP address of the relay node received from the IP address of the server node and the content of the received instruction;

the content of the received instruction is hop count information and transmission delay information.

5. The method for simulating the transmission of a multi-node ad hoc network based on the AODV protocol according to claim 4, wherein: in the fourth step, an AODV routing protocol capable of simulating hop count increase in multi-node communication is operated on a source node, a relay node and a destination node; the specific process is as follows:

step four, firstly: after the source node, the relay node and the destination node complete networking, the information of the destination node cannot be seen in a routing table of the source node;

step four and step two: the server node sends instruction information to the relay node, wherein the instruction information comprises hop count information and delay information for simulating multi-node communication;

the relay node stores hop count information and delay information for simulating multi-node communication;

step four and step three: the source node initiates communication to the destination node, judges whether the source node has a route to the destination node, if yes, the source node communicates with the destination node; if not, the source node sends route request information to the destination node; when the relay node receives the routing request information, whether the relay node has a route to a destination node or not is judged;

when the routing table of the relay node contains the route to the destination node, the relay node reads the hop count information required to be simulated, which is stored in the relay node, and creates a route reply packet, wherein the hop count information of the route reply packet is added with the hop count information required to be simulated; the relay node sends the route reply packet to the source node, and when the source node receives the route reply packet, the route establishment is completed;

and when the routing table of the relay node does not contain the route to the destination node, the relay node broadcasts the received route request information to other nodes.

6. The method for simulating the transmission of a multi-node ad hoc network based on the AODV protocol according to claim 5, wherein: in the fifth step, a communication program for data transmission is operated on the source node, the relay node and the destination node; the specific process is as follows:

step five, first: the source node transmits data by using a communication program of data transmission;

step five two: the relay node uses a communication program for data transmission to forward data;

step five and step three: the destination node receives data by using a communication program of data transmission;

step five and four: and completing the simulation of the transmission time delay during multi-node communication by comparing the time when the source node sends the information with the time when the destination node receives the information.

7. The method according to claim 6, wherein the method comprises: in the fifth step, the source node uses a communication program for data transmission to transmit data; the specific process is as follows:

step five is one: firstly, judging whether a scene needs to be subjected to multi-node communication simulation;

when the scene does not need to carry out multi-node communication simulation, ending;

when a scene needs to be subjected to multi-node communication simulation, a current node is appointed to serve as a source node and a relay node is appointed to be a next hop, and a fifth step and a second step are executed;

step five, two: inputting information to be transmitted to a destination node at a source node;

step five, step three: when the source node has no information to be transmitted to the destination node, executing the fifth step and the second step;

step five, step four: when the source node has information to be transmitted to the destination node, the source node calls time information to display the moment when the source node sends the information and sends the information to the relay node through the port; executing the fifth step;

step five, one step five: judging whether the source node sends information to the destination node for the first time, if so, executing the fifth step, the sixth step; if not, the source node transmits information to the destination node, and the fifth step, the first step and the seventh step are executed;

step five, step six: the source node finds and establishes a route of the destination node through a ping command by means of a routing protocol, transmits information to the destination node, and executes the fifth step, the sixth step and the seventh step;

step five, step one and step seven: and displaying the information content sent by the source node IP address to the relay node IP address and the information content sent by the source node, and executing the fifth step and the second step.

8. The method according to claim 7, wherein the method comprises: in the second step, the relay node uses a communication program for data transmission to forward data; the specific process is as follows:

step five, step two, step one: judging whether a scene needs to be subjected to multi-node communication simulation;

when the scene does not need to carry out multi-node communication simulation, ending;

when the scene needs to carry out multi-node communication simulation, the current node is appointed to serve as a relay node and the destination node is appointed to be the next hop, and the fifth step and the second step are executed;

step five, step two: reading simulation information of transmission delay sent by a server node stored in a relay node; continuously monitoring information received by the port with the same port number as the port in the fifth step, the fourth step;

step five, step two and step three: when the port with the same port number as the port in the fifth step, the fourth step receives the information, the relay node calls the time information to display the moment when the relay node receives the information, and displays the information content received by the IP address of the relay node from the IP address of the source node and the port with the same port number as the port in the fifth step, the fourth step;

step five, step two and step four: the relay node can suspend for a corresponding time according to the transmission delay information simulated by the server node requirement, the information received in the fifth step and the third step is sent to the destination node through another port, and meanwhile, the time information is called to display the moment when the relay node sends the information received in the fifth step and the third step at the moment, and the information content sent by the IP address of the relay node to the IP address of the destination node and received in the fifth step and the third step is displayed.

9. The method according to claim 8, wherein the method comprises: in the third step, the destination node receives data by using a communication program for data transmission; the specific process is as follows:

step five, step three, step one: judging whether a scene needs to be subjected to multi-node communication simulation;

when the scene does not need to carry out multi-node communication simulation, ending;

when the scene needs to be subjected to multi-node communication simulation, the current node is appointed to serve as a destination node, and the fifth step, the third step and the second step are executed;

step five, step three, step two: continuously monitoring whether the port receives the information of the relay node;

step five, step three: if the port does not receive the information of the relay node, executing a fifth step, a second step;

if the port receives the information of the relay node, the destination node calls the time information to display the moment when the destination node receives the information, and displays the IP address of the destination node received from the IP address of the relay node and the information content received in the fifth step, the third step and the fourth step.

10. A multi-node ad hoc network transmission simulation system based on an AODV protocol is characterized in that: the system is configured to perform the method for simulating the transmission of the multi-node ad-hoc network based on the AODV protocol according to any one of claims 1 to 9.

Technical Field

The invention belongs to the field of ad hoc network communication, and relates to a simulation method and a simulation system for realizing multi-node ad hoc network transmission based on an AODV (Ad hoc on demand distance vector) protocol by utilizing a computer technology, a wireless communication and communication network technology and the like.

Background

With the rapid development of ad hoc networks and the rapid popularization of mobile intelligent terminals, research on node device communication in ad hoc networks is increasing. By deploying a routing protocol in the network, the nodes can send and receive information through the route established by the routing protocol. In such a decentralized distributed ad hoc network, the source node may send information to the destination node through other relay nodes without having to communicate with a central node (e.g., a base station). By doing so, the overhead of the network can be greatly reduced, the communication burden of the central node (such as a base station) is also reduced, and the occurrence of blocking is avoided to a certain extent. For example, in a vehicle ad hoc network, because the time delay sensitivity of the traffic information and the traffic information is not high, the vehicle node may relay and transmit the information to other vehicles through other vehicle nodes. Therefore, repeated acquisition of the same information from the base station by other vehicle nodes in the same road section is avoided, and the possibility of service congestion of the base station is reduced to a certain extent. Meanwhile, the broadcast or unicast of the information through the short-distance transmission technology also reduces the network overhead to a certain extent. Currently, the most common routing protocols are AODV routing protocol, DSDV routing protocol, DSR routing protocol, and the like. Among the three routing protocols, the AODV routing protocol is more widely used, since the AODV routing protocol is a shortest-path on-demand routing protocol.

In the ad hoc network, since there is no central node and information is relayed and transmitted by nodes on the route, it is very important to deploy a proper routing protocol in the ad hoc network. Before formally deploying a routing protocol into a network, it is necessary to verify whether the routing protocol can operate properly. If the routing protocol cannot normally run in a large-scale node, the subsequent deployment and application of the routing protocol in a large-scale network are greatly influenced. It is an indispensable ring to simulate the performance of multi-node communication before protocol deployment.

Currently, there are two general categories of authentication of routing protocols prior to deployment. One is protocol operation and communication simulation based on simulation software; one is direct deployment and verification on real nodes.

Software-based protocols are mostly based on emulation software NS-2(Network Simulator version 2) or OMNeT + +. The method based on simulation software verification is that a multi-node communication scene is established first, a transmission model and an access protocol are called in the communication scene, and after a routing protocol is operated, an information transmission path is established between nodes and information transmission is completed. But the models and parameters used by the software in the simulation are simpler and outdated. Exemplified here by NS-2. The channel model commonly used by the NS-2 software is a two-ray ground reflection model, although the interference influence of the reflected signal is considered, the influence is simpler than that of the actual multipath signal, and because the simulation software only builds a simple communication scene only including the set node and ignores the complex movement of the node, the attribute of the node, the interference of other electromagnetic signals in the real world and the like, the communication performance of the node under the real condition cannot be well reflected by the verification of the protocol by using the simulation software. Meanwhile, due to the fact that the development time of the NS-2 software is long, communication parameters such as antenna parameters and task queues defined by the software during simulated communication are outdated compared with specific parameters used in the prior art, and the communication performance of the current mainstream communication technology cannot be well reflected. Although the verification of the routing protocol based on the simulation software is simple in operation, the reliability is not high because the communication performance in the real world cannot be reflected well. It is important to perform protocol authentication using real nodes.

The routing protocol is transplanted to the real nodes, although the communication condition in the real world can be better reflected, when the target ad hoc network is a large ad hoc network, such as a vehicle-mounted ad hoc network, and a massive internet of things, a small number of real nodes are not enough to display the communication performance of the large ad hoc network. If a large number of protocols are transplanted to the real nodes, not only the cost is wasted, but also the significance of the relocation after the protocol verification is lost. Therefore, how to verify the running condition of the routing protocol in multiple nodes on a real node is a problem worthy of research in the field of ad hoc network communication.

When the AODV routing protocol establishes a route, the routing information has certain survival time, and the survival time of the routing information is reduced by one every time the routing information is forwarded. When the routing information is forwarded to zero for a plurality of times, the routing information is discarded by the node, and then the routing information is invalid, the route cannot be successfully established, if the source node still needs to establish the route to the destination node again, the source node needs to send the routing information to the destination node again, and at this time, the routing overhead is improved. In the ad hoc network of the multi-node, when the node increases, the probability that the routing information is forwarded for many times is greatly improved, so whether the route simulating the multi-hop number can be successfully established or not is necessary when the routing protocol is verified in the multi-node communication.

Meanwhile, for multi-node communication, when the number of relay nodes in the source node and the destination node is increased, the transmission delay between the source node and the destination node is increased. The existing time of the route after the route is established is limited, and the link breaking of the route can be caused if the node leaves or is damaged. As the transmission delay increases, the route may fail due to a timeout or a broken link. It is also important to verify whether the routing protocol simulates the stability of the route during the multi-node long-delay communication.

Disclosure of Invention

The invention aims to solve the problems that a real node cannot simulate the communication condition when communicating with multiple nodes under the limitation of physical conditions and the network scene simulated by simulation software has a large difference with the real physical world, and provides a simulation method and a simulation system for multi-node ad hoc network transmission based on an AODV protocol.

The method for simulating the multi-node ad hoc network transmission based on the AODV protocol comprises the following specific processes:

the method comprises the following steps: establishing a simulation scene by using four real physical nodes, wherein one node represents a communication source node, one node represents a communication destination node, one node represents a relay node in the source node and the destination node, and one node represents a server node for sending instructions to the relay node;

step two: running a communication program for instruction transmission on the relay node and the server node;

step three: shielding a path between a source node and a destination node, so that the source node and the destination node cannot discover each other when networking;

step four: the method comprises the steps that an AODV routing protocol capable of simulating hop count increase in multi-node communication is operated on a source node, a relay node and a destination node;

step five: and running a communication program for data transmission on the source node, the relay node and the destination node.

The simulation system of the multi-node ad hoc network transmission based on the AODV protocol is used for executing the simulation method of the multi-node ad hoc network transmission based on the AODV protocol.

The invention has the beneficial effects that:

the invention provides a simulation method and a simulation system for multi-node ad hoc network transmission based on an AODV protocol by utilizing real nodes, which mainly simulate the transmission delay and hop count of multi-node communication. A real relay node is deployed between a real source node and a real destination node, an instruction is sent to the real relay node through an external server, the real relay node is simulated into a plurality of virtual relay nodes, and then the condition that relay transmission is carried out between the real source node and the real destination node by using multiple nodes is simulated. The method can effectively simulate the communication condition during multi-node communication, and verify the subsequent routing protocol which is to be deployed in the nodes in a large area. The method solves the problems that the real node is limited by physical conditions and cannot simulate the communication condition of multi-node communication and the network scene simulated by simulation software is greatly different from the real physical world.

Drawings

FIG. 1 is a schematic diagram of a network topology constructed using four real nodes;

fig. 2 is a schematic diagram of a network topology in which hop count simulation information and transmission delay simulation information are added;

FIG. 3 is a flow chart of a server node sending instructions;

fig. 4 is a flow chart of a relay node receiving an instruction;

FIG. 5 is a flow chart of an implementation method for hop count increase based on AODV routing protocol;

FIG. 6 is a flow chart of a source node sending data;

fig. 7 is a flow chart of relay node forwarding data;

FIG. 8 is a flow chart of a destination node receiving data;

FIG. 9 is a diagram of server node send instruction information;

fig. 10 is a diagram of a relay node receiving instruction information;

FIG. 11 is a diagram of data information sent at a source node;

fig. 12 is a diagram of hop counts observed in a destination node in a source node before adding an instruction to a relay node;

fig. 13 is a diagram of hop counts observed in a destination node in a source node after adding an instruction to a relay node;

fig. 14 is a diagram of forwarding data information at a relay node;

fig. 15 is a diagram of a destination node receiving data information.

Detailed Description

The first embodiment is as follows: the method for simulating the multi-node ad hoc network transmission based on the AODV protocol comprises the following specific processes:

the method comprises the following steps: establishing a simulation scene by using four real physical nodes, wherein one node represents a communication source node, one node represents a communication destination node, one node represents a relay node in the source node and the destination node, and one node represents a server node for sending instructions to the relay node;

the specific topology and information flow are shown in fig. 1;

step two: running a communication program for instruction transmission on the relay node and the server node;

step three: shielding a path between a source node and a destination node, so that the source node and the destination node cannot discover each other when networking;

step four: the method comprises the steps that an AODV routing protocol capable of simulating hop count increase in multi-node communication is operated on a source node, a relay node and a destination node; after a source node, a relay node and a destination node are networked, the specific network topology and information flow are shown in fig. 1;

step five: and running a communication program for data transmission on the source node, the relay node and the destination node.

The source node sends information to the destination node by using a communication program of data transmission through the relay node, when the server does not send an instruction simulating hop count and transmission delay to the relay node, the information is directly forwarded to the destination node by the relay node, the hop count of the destination node is displayed in a routing table of the source node as two hops, and the transmission delay is close to zero second;

inputting hop count and transmission delay to be simulated on a server node, and sending the hop count and the transmission delay to a relay node through a communication program for instruction transmission; the step uses a real physical node between a source node and a destination node to simulate the condition of a plurality of relay nodes; at this time, the specific network topology and information flow are as shown in fig. 2;

at the moment, the source node sends information to the destination node again through the data transmission communication program, and the routing protocol running on the relay node reads the hop count required to be simulated and recorded by the relay node; meanwhile, a data transmission communication program running on the relay node can also read the transmission delay which is recorded by the relay node and needs to be simulated, and then the hop count and the transmission delay of multiple relay nodes when the source node communicates with the destination node are simulated. Displaying the hop count of the destination node in a source node routing table and adding corresponding hop count information required to be simulated; and the time difference between the information receiving time displayed on the data transmission communication program interface of the destination node and the information sending time displayed on the data transmission communication program interface of the source node is the transmission delay information sent by the server node.

The invention has the significance that the simulation of the routing hop count and the transmission delay of data communication when the routing protocol is communicated in the multi-node ad hoc network is finished by using a small number of real physical nodes. The method can effectively verify whether the route can be established and kept stable during multi-node communication, reflects the communication condition of the real world nodes when verifying the feasibility of the routing protocol, and saves the cost to a certain extent.

The second embodiment is as follows: the second step is that a communication program for instruction transmission is executed on the relay node and the server node; the specific process is as follows:

step two, firstly: the server node transmits the instruction by using an instruction transmission communication program;

step two: the relay node receives the instruction using an instruction transmission communication program.

Other steps and parameters are the same as those in the first embodiment.

The third concrete implementation mode: the difference between the first embodiment and the second embodiment is that in the first step, the server node sends the instruction by using an instruction transmission communication program; the specific process is as follows:

the communication program of instruction transmission requires the server node to send a transmission instruction to the relay node, wherein the instruction comprises hop count information and transmission delay information;

when the server node has an instruction to be transmitted to the relay node, the server node calls time information to display the moment when the server node sends the information, and simultaneously sends the information to the relay node through the port and displays the IP address of the server node to send the instruction content to the IP address of the relay node;

the content of the sending instruction is hop count information and transmission delay information.

The specific flow chart is shown in fig. 3.

Other steps and parameters are the same as those in the first or second embodiment.

The fourth concrete implementation mode: the second step is that the relay node receives the instruction by using an instruction transmission communication program; the specific process is as follows:

the communication program for instruction transmission continuously monitors the instruction received by the port with the same port number in the step two; secondly, after the port receives the instruction, the relay node stores the received hop count information and transmission delay information which need to be simulated in the relay node; finally, calling time information to display the moment when the relay node receives the information, and displaying the IP address of the relay node received from the IP address of the server node and the content of the received instruction;

the content of the received instruction is hop count information and transmission delay information.

The specific flow chart is shown in fig. 4.

Other steps and parameters are the same as those in one of the first to third embodiments.

The fifth concrete implementation mode: the difference between this embodiment and one of the first to the fourth embodiments is that in the fourth step, an AODV routing protocol capable of simulating increase of hop count during multi-node communication is run on the source node, the relay node, and the destination node; the specific process is as follows:

step four, firstly: after the source node, the relay node and the destination node complete networking, the information of the destination node cannot be seen in a routing table of the source node; this is because the paths between the source node and the destination node are already shielded, they cannot discover each other when networking, and there is no route to the destination node in the source node routing table.

Step four and step two: the server node sends instruction information to the relay node, wherein the instruction information comprises hop count information and delay information for simulating multi-node communication;

the relay node stores hop count information and delay information for simulating multi-node communication;

step four and step three: the source node initiates communication to the destination node, judges whether the source node has a route to the destination node, if yes, the source node communicates with the destination node; if not, the source node sends route request information to the destination node; when the relay node receives the routing request information, whether the relay node has a route to a destination node or not is judged;

when the routing table of the relay node contains a route to a destination node, the relay node reads the hop count information required to be simulated, which is stored in the relay node, and creates a routing reply packet, wherein the hop count information of the routing reply packet is added with the hop count information required to be simulated (the hop count information of the routing reply packet is the hop count information required to be simulated on the basis of the original hop count information); the relay node sends the route reply packet to the source node, and when the source node receives the route reply packet, the route establishment is completed;

when the routing table of the relay node does not contain the route to the destination node, the relay node broadcasts the received route request information to other nodes;

the phrase "broadcast to other nodes" means that if the relay node itself does not have a route to the destination node, it will broadcast the received route request message to other nodes, and the new node becomes the relay node, and it will then determine whether it has a route to the destination node, if so, it will establish, if not, it will broadcast to other nodes, and so on until the destination node is found or until a node containing a route to the destination node is found;

because the route request information has survival time, if the route is not found after being broadcasted for many times, the route request information is discarded, and the original node either sends the route request information again or does not find the destination node any more;

and observing the information of the destination node in the routing table of the source node to discover the hop count of the source node to the destination node, which is increased by the hop count information of the multi-node communication to be simulated, and completing the hop count simulation of the multi-node communication.

The specific flow of the method for implementing the increase of the simulated hop count based on the AODV routing protocol is shown in fig. 5.

Other steps and parameters are the same as in one of the first to fourth embodiments.

The sixth specific implementation mode: the difference between this embodiment and one of the first to fifth embodiments is that, in the fifth step, a communication program for data transmission is executed on the source node, the relay node, and the destination node; the specific process is as follows:

step five, first: the source node transmits data by using a communication program of data transmission;

step five two: the relay node uses a communication program for data transmission to forward data;

step five and step three: the destination node receives data by using a communication program of data transmission;

step five and four: and completing the simulation of the transmission time delay during multi-node communication by comparing the time when the source node sends the information with the time when the destination node receives the information.

Other steps and parameters are the same as those in one of the first to fifth embodiments.

The seventh embodiment: the difference between this embodiment and the first to sixth embodiments is that in the fifth and sixth steps, the source node uses a communication program for data transmission to transmit data; the specific process is as follows:

step five is one: the communication program of data transmission (the transmission of the source node, the relay node and the destination node of the invention uses the communication program of data transmission; the transmission of the server and the relay node of the invention uses the communication program of command transmission; at the same time, two sets of communication programs are operated in the relay node); firstly, judging whether a scene needs to be subjected to multi-node communication simulation;

when the scene does not need to carry out multi-node communication simulation, the simulation is finished (the simulation process is finished, and the nodes carry out other functions of the nodes);

when a scene needs to be subjected to multi-node communication simulation, a communication program for data transmission can designate a current node as a source node and a relay node as a next hop, and a fifth step and a second step are executed;

step five, two: the communication program of data transmission requires the input of information to be transmitted to the destination node at the source node;

step five, step three: when the source node has no information to be transmitted to the destination node, executing the fifth step and the second step;

step five, step four: when the source node has information to be transmitted to the destination node, the source node calls time information to display the moment when the source node sends the information and sends the information to the relay node through the port; executing the fifth step;

step five, one step five: judging whether the source node sends information to the destination node for the first time, if so, executing the fifth step, the sixth step; if not, the source node transmits information to the destination node, and the fifth step, the first step and the seventh step are executed;

step five, step six: the source node finds and establishes a route of the destination node through a ping command by means of a routing protocol, transmits information to the destination node, and executes the fifth step, the sixth step and the seventh step;

step five, step one and step seven: displaying the information content sent by the source node IP address to the relay node IP address and the information content sent by the source node by a communication program of data transmission, and executing the fifth step and the second step; the specific flow of this step is shown in fig. 6.

Other steps and parameters are the same as those in one of the first to sixth embodiments.

The specific implementation mode is eight: the difference between this embodiment and the first to seventh embodiments is that, in the second step, the relay node uses a communication program for data transmission to forward data; the specific process is as follows:

step five, step two, step one: a communication program for data transmission firstly judges whether a scene needs to be subjected to multi-node communication simulation;

when the scene does not need to carry out multi-node communication simulation, the simulation is finished (the simulation process is finished, and the nodes carry out other functions of the nodes);

when the scene needs to carry out multi-node communication simulation, a communication program for data transmission can designate the current node to be a relay node and designate a destination node as a next hop, and a fifth step and a second step are executed;

step five, step two: reading simulation information of transmission delay sent by a server node stored in a relay node; the communication program of data transmission continuously monitors the information received by the port with the same port number in the fifth step, the fourth step;

step five, step two and step three: when the port with the same port number as the port in the fifth step, the fourth step receives the information, the relay node calls the time information to display the moment when the relay node receives the information, and displays the information content (the information transmitted by the source node and the information received by the port with the same port number as the port in the fifth step, the fourth step) that the relay node IP address receives from the source node IP address and the port with the same port number as the port in the fifth step;

step five, step two and step four: after the port receives the information, the relay node can suspend for a corresponding time according to the transmission delay information which is required to be simulated by the server node, the information received in the fifth step, the third step is sent to the destination node through another port, and meanwhile, the time information is called to display the moment when the relay node sends the information received in the fifth step, the third step and the fifth step, the IP address of the relay node is sent to the IP address of the destination node, and the information content received in the fifth step, the third step and the fifth step is displayed; the specific flow of this step is shown in fig. 7.

Other steps and parameters are the same as those in one of the first to seventh embodiments.

The specific implementation method nine: the difference between this embodiment and the first to eighth embodiment is that, in the fifth step, the destination node uses a communication procedure of data transmission to receive data; the specific process is as follows:

step five, step three, step one: a communication program for data transmission of data transmission firstly judges whether a scene needs to be subjected to multi-node communication simulation;

when the scene does not need to carry out multi-node communication simulation, the simulation is finished (the simulation process is finished, and the nodes carry out other functions of the nodes);

when the scene needs to carry out multi-node communication simulation, a communication program for data transmission can designate the current node to serve as a destination node, and the fifth step, the third step and the second step are executed;

step five, step three, step two: a communication program for data transmission continuously monitors whether the port (the port on the same port number in the fifth step, the second step and the fourth step) receives the information of the relay node;

step five, step three: if the port does not receive the information of the relay node, executing a fifth step, a second step;

if the port receives the information of the relay node, the destination node calls time information to display the moment when the destination node receives the information, and displays the IP address of the destination node received from the IP address of the relay node and the information content received in the fifth step, the third step and the fourth step; the specific flow of this step is shown in fig. 8.

Other steps and parameters are the same as those in one to eight of the embodiments.

The detailed implementation mode is ten: the system is used for executing the simulation method of the multi-node ad hoc network transmission based on the AODV protocol in one of the first embodiment to the ninth embodiment.

The following examples were used to demonstrate the beneficial effects of the present invention:

the first embodiment is as follows:

fig. 9 to 15 explain:

the IP address of the server node is 10.10.10.3

The IP address of the relay node is 10.10.10.4

The IP address of the source node is 10.10.10.5

The IP address of the destination node is 10.10.10.6

Fig. 9 shows that the server node sends instruction information to the relay node (10.10.10.4), and the specific instruction content is that the hop count is increased by 26 hops and the transmission delay is increased by 7 seconds.

Fig. 10 shows that the relay node receives the instruction information sent by the server node (10.10.10.3) in fig. 9, and the specific instruction content is that the hop count is increased by 26 hops and the transmission delay is increased by 7 seconds.

Fig. 11 shows a process of manually inputting data information using a keypad in the source node (10.10.10.5) and transmitting the information to the relay node (10.10.10.4), and a part of the transmission process is shown in table 1.

Table 1 source node partial transmit procedure

Time of transmission Data content
…… ……
15 hours, 40 minutes and 22 seconds quiz2
15 hours, 40 minutes and 41 seconds quiz3
15 hours, 41 minutes and 1 second quiz4
…… ……

Fig. 12 shows the hop count (the hop count information is shown as HC in the table) of the source node (10.10.10.5) from the destination node (10.10.10.6) before the relay node adds the instruction, and it can be seen that, when the analog hop count information is not performed, the hop count of the source node (10.10.10.5) from the destination node (10.10.10.6) is 2 hops (this is because there is one relay node on the route between the source node and the destination node, so the hop count is two hops).

Fig. 13 shows the hop count (the hop count information is shown as HC in the table) of the source node (10.10.10.5) from the destination node (10.10.10.6) after the relay node adds the instruction, and it can be seen that when the simulated hop count information is 26 hops, the hop count of the source node (10.10.10.5) from the destination node (10.10.10.6) is 28 hops, and by comparing the hop counts of the source node from the destination node in fig. 12 and fig. 13, it can be seen that the hop count information is increased by 26 hops at this time, that is, the hop count information successfully simulates 26 hops required for simulation.

Fig. 14 is a process of receiving data information from the source node (10.10.10.5) at the relay node and forwarding the data information to the destination node (10.10.10.6) after a delay time of 7 seconds, and part of the forwarding process is shown in table 2.

Table 2 relay node partial forwarding procedure

Fig. 15 shows the reception of the data message (originally from the artificial input of the source node 10.10.10.5) delayed and forwarded from the relay node (10.10.10.4) at the destination node, and part of the reception process is shown in table 3.

Table 3 destination node partial receive procedure

Receiving time Receiving content
…… ……
15 hours, 40 minutes and 29 seconds quiz2
15 hours, 40 minutes and 48 seconds quiz3
15 hours, 41 minutes and 8 seconds quiz4
…… ……

By comparing the sending time of the same data message in table 1 and table 3 in the source node with the receiving time in the destination node, it can be found that the transmission delay is increased by 7 seconds at this time, i.e. the 7-second transmission delay required to be simulated is simulated successfully.

The present invention is capable of other embodiments and its several details are capable of modifications in various obvious respects, all without departing from the spirit and scope of the present invention.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种路由表创建方法、PE设备、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!