CN111711571A - Ad hoc network on-demand routing method and device supporting IP transparent transmission and computer equipment - Google Patents

Ad hoc network on-demand routing method and device supporting IP transparent transmission and computer equipment Download PDF

Info

Publication number
CN111711571A
CN111711571A CN202010840670.XA CN202010840670A CN111711571A CN 111711571 A CN111711571 A CN 111711571A CN 202010840670 A CN202010840670 A CN 202010840670A CN 111711571 A CN111711571 A CN 111711571A
Authority
CN
China
Prior art keywords
mac address
hoc network
routing
upper computer
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010840670.XA
Other languages
Chinese (zh)
Other versions
CN111711571B (en
Inventor
邓昭彰
李卫军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Leading Wisdom Telecommunication and Technology Co Ltd
Original Assignee
Hunan Leading Wisdom Telecommunication and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Leading Wisdom Telecommunication and Technology Co Ltd filed Critical Hunan Leading Wisdom Telecommunication and Technology Co Ltd
Priority to CN202010840670.XA priority Critical patent/CN111711571B/en
Publication of CN111711571A publication Critical patent/CN111711571A/en
Application granted granted Critical
Publication of CN111711571B publication Critical patent/CN111711571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to an ad hoc network on-demand routing method and device supporting IP transparent transmission and computer equipment. The method comprises the following steps: receiving a data frame which is sent by a first upper computer and contains an IP address and a first MAC address; analyzing the data frame through the first ad hoc network node to obtain a first MAC address, inquiring whether a second MAC address corresponding to the second upper computer is in the global connection table, and if not, sending a routing request broadcast message through the first ad hoc network node according to an on-demand routing protocol; when the second ad hoc network node receives the routing request broadcast message and a local connection table corresponding to the second ad hoc network node contains a second MAC address, generating a routing response message and sending the routing response message to the first ad hoc network node; and establishing a routing table according to the transmission path of the routing response message, and forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table. By adopting the method, the networking flexibility of the ad hoc network system can be improved.

Description

Ad hoc network on-demand routing method and device supporting IP transparent transmission and computer equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to an ad hoc network on-demand routing method and apparatus supporting IP transparent transmission, and a computer device.
Background
The existing ad hoc network routing protocols are mainly divided into active routing protocols and on-demand routing protocols according to a routing establishment mode; according to the mode of service transmission, the method can be divided into an IP routing protocol and an IP transparent routing protocol. The active routing protocol utilizes a protocol control message periodically sent by the active routing protocol, and the active routing protocol supporting IP transparent transmission exists. Due to the characteristic of finding the route on demand, the on-demand routing protocol needs to design other mechanisms to realize IP transparent transmission.
Each node of the active routing protocol needs to record routing information of all nodes in the network, and each node needs to periodically send a protocol control message to maintain the routing information of the whole network, so that the protocol overhead is high.
The ad hoc network IP routing protocol forwards service messages based on IP addresses, when an ad hoc network system is interconnected with other upper computer terminals or other systems, complex IP address configuration is often required, and when the other systems do not allow network configuration, the ad hoc network system cannot be interconnected, and the network flexibility is poor.
Disclosure of Invention
Therefore, it is necessary to provide an ad hoc network on-demand routing method, apparatus and computer device supporting IP transparent transmission, which can solve the problem of poor network flexibility when the current ad hoc network systems are interconnected.
An ad hoc network on-demand routing method supporting IP transparent transmission, the method comprising:
receiving a data frame which is sent by a first upper computer and contains a first IP address and a first MAC address;
analyzing the data frame through a first ad hoc network node directly connected with the first upper computer to obtain a first MAC address of the data frame, and writing the first MAC address into a local connection table configured in advance;
inquiring whether a second MAC address corresponding to a second upper computer is in the global connection table, if not, sending a routing request broadcast message through a first ad hoc network node according to an on-demand routing protocol;
when the second ad hoc network node receives the routing request broadcast message and a local connection table corresponding to the second ad hoc network node contains a second MAC address, generating a routing response message and sending the routing response message to the first ad hoc network node; the local connection table stores the MAC address of the upper computer directly connected with the self-networking node;
and establishing a routing table according to the transmission path of the routing response message, and forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table.
In one embodiment, the method further comprises the following steps: if a second MAC address corresponding to a second upper computer is inquired in the global connection table, determining a second ad hoc network node according to the global connection table; and forwarding the data frame sent by the first upper computer to a second upper computer according to a routing table between the first ad hoc network node and the second ad hoc network node.
In one embodiment, the method further comprises the following steps: if the second MAC address corresponding to the second upper computer is inquired in the global connection table, updating the time field corresponding to the second MAC address in the global connection table to be the current time; wherein the global connection table comprises: a node field, a MAC address field and a time field; and the time field is used for judging whether the records corresponding to the MAC address field and the node field exceed the keep-alive time, and if so, deleting the records corresponding to the MAC address field and the node field.
In one embodiment, the method further comprises the following steps: and adding a second ad hoc network node into a node field of the global connection table, adding a second MAC address into the MAC address field, and updating the time field to the current time.
In one embodiment, the local connection table includes: a MAC address field and a time field; the routing table includes: a destination node field, a next hop node field, and a time field.
An ad hoc network on-demand routing apparatus supporting IP transparent transmission, the apparatus comprising:
the data receiving module is used for receiving a data frame which is sent by a first upper computer and contains a first IP address and a first MAC address;
the broadcast module is used for analyzing the data frame through a first ad hoc network node directly connected with the first upper computer to obtain a first MAC address of the data frame, and writing the first MAC address into a local connection table configured in advance; inquiring whether a second MAC address corresponding to a second upper computer is in the global connection table, if not, sending a routing request broadcast message through a first ad hoc network node according to an on-demand routing protocol;
the routing query module is used for generating a routing response message and sending the routing response message to the first ad hoc network node when the second ad hoc network node receives the routing request broadcast message and a local connection table corresponding to the second ad hoc network node contains a second MAC address; the local connection table stores the MAC address of the upper computer directly connected with the self-networking node;
and the data transmission module is used for establishing a routing table according to the transmission path of the routing response message and forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table.
In one embodiment, the route query module is further configured to determine a second ad hoc network node according to the global connection table if querying that a second MAC address corresponding to a second upper computer is in the global connection table; the data transmission module is also used for forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table between the first ad hoc network node and the second ad hoc network node.
In one embodiment, the system further includes a time-to-live detection module, configured to update a time field corresponding to a second MAC address in the global connection table to a current time if the second MAC address corresponding to the second upper computer is queried in the global connection table; wherein the global connection table comprises: a node field, a MAC address field and a time field; and the time field is used for judging whether the records corresponding to the MAC address field and the node field exceed the keep-alive time, and if so, deleting the records corresponding to the MAC address field and the node field.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a data frame which is sent by a first upper computer and contains a first IP address and a first MAC address;
analyzing the data frame through a first ad hoc network node directly connected with the first upper computer to obtain a first MAC address of the data frame, and writing the first MAC address into a local connection table configured in advance;
inquiring whether a second MAC address corresponding to a second upper computer is in the global connection table, if not, sending a routing request broadcast message through a first ad hoc network node according to an on-demand routing protocol;
when the second ad hoc network node receives the routing request broadcast message and a local connection table corresponding to the second ad hoc network node contains a second MAC address, generating a routing response message and sending the routing response message to the first ad hoc network node; the local connection table stores the MAC address of the upper computer directly connected with the self-networking node;
and establishing a routing table according to the transmission path of the routing response message, and forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a data frame which is sent by a first upper computer and contains a first IP address and a first MAC address;
analyzing the data frame through a first ad hoc network node directly connected with the first upper computer to obtain a first MAC address of the data frame, and writing the first MAC address into a local connection table configured in advance;
inquiring whether a second MAC address corresponding to a second upper computer is in the global connection table, if not, sending a routing request broadcast message through a first ad hoc network node according to an on-demand routing protocol;
when the second ad hoc network node receives the routing request broadcast message and a local connection table corresponding to the second ad hoc network node contains a second MAC address, generating a routing response message and sending the routing response message to the first ad hoc network node; the local connection table stores the MAC address of the upper computer directly connected with the self-networking node;
and establishing a routing table according to the transmission path of the routing response message, and forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table.
According to the method, the device, the computer equipment and the storage medium for routing the ad hoc network supporting IP transparent transmission on demand, the MAC addresses of the upper computers directly connected with the ad hoc network nodes are stored in the local connection table through configuring the global connection table, the local connection table and the routing table, the MAC addresses of the upper computers directly connected with the ad hoc network nodes are managed by the global connection table, so that when data frames are transmitted, only the MAC addresses in the data frames need to be analyzed, the data transmission routes in the ad hoc network system are inquired through the records of the form, data between the upper computers are transmitted through the ad hoc network system, the network access of the ad hoc network system is realized, IP address information is not needed, and the transmission mode of the IP transparent transmission is realized.
Drawings
Fig. 1 is an application scenario diagram of an ad hoc network on-demand routing method supporting IP transparent transmission in an embodiment;
FIG. 2 is a flow diagram illustrating an on-demand routing method for an ad hoc network supporting IP transparent transport in an embodiment;
FIG. 3 is a flow diagram illustrating the steps of route establishment in one embodiment;
FIG. 4 is a flow chart illustrating the data frame transmission step in one embodiment;
FIG. 5 is a block diagram of an on-demand routing apparatus of an ad hoc network supporting IP transparent transmission in one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The ad hoc network on-demand routing method supporting the IP transparent transmission can be applied to the application environment shown in FIG. 1. The first upper computer 102 and the second upper computer 104 are respectively connected with a first ad hoc network node 106 and a second ad hoc network node 108 in the ad hoc network system.
Specifically, on the ad hoc network device corresponding to the ad hoc network node, the network bridge is used for connecting the upper computer network with the ad hoc network system. One or more upper computers or other system terminals access the ad hoc network system through the Ethernet; after the data frame from the upper computer reaches the network bridge, the network bridge forwards the data frame to the ad hoc network on-demand routing protocol module, and the on-demand routing protocol determines whether to initiate a routing query process or directly forward the data frame according to whether a route reaching a data destination MAC address exists.
In one embodiment, as shown in fig. 2, an ad hoc network on-demand routing method supporting IP transparent transmission is provided, which is described by taking the application of the method to the ad hoc network system in fig. 1 as an example, and includes the following steps:
step 202, receiving a data frame which is sent by the first upper computer and contains the IP address and the first MAC address.
The source IP address and the source MAC address in the data frame are filled as the IP address and the first MAC address of the first upper computer, the target IP address and the target MAC address are filled as the IP address and the second MAC address of the second upper computer, and when the routing protocol is analyzed according to the requirement, only the target MAC address needs to be analyzed, so that IP transparent transmission is realized.
Step 204, analyzing the data frame through a first ad hoc network node directly connected with a first upper computer to obtain a first MAC address of the data frame, and writing the first MAC address into a preconfigured local connection table.
The global connection table is arranged in the ad hoc network system and used for maintaining the MAC address of an upper computer directly connected with the ad hoc network node in the current ad hoc network system, and the following table 1 shows that:
TABLE 1 Global connection Table
Figure 434780DEST_PATH_IMAGE001
Node _ ID is the self-organizing network Node ID number; and Mac _ address is the MAC address of the upper computer terminal connected with the ad hoc network node, and Last _ seen represents the latest access time.
And step 206, inquiring whether a second MAC address corresponding to the second upper computer is in the global connection table, if not, sending a routing request broadcast message through the first ad hoc network node according to the on-demand routing protocol.
The routing request broadcast is a broadcast sent by the ad hoc network node to other ad hoc network nodes in the ad hoc network system, wherein the other ad hoc network nodes are in communication connection with the ad hoc network node, and the other ad hoc network nodes can receive the broadcast.
And step 208, when the second ad hoc network node receives the routing request broadcast message and the local connection table corresponding to the second ad hoc network node contains the second MAC address, generating a routing response message and sending the routing response message to the first ad hoc network node.
The local connection table stores the MAC address of the upper computer directly connected with the self-networking node, and is shown as the following table:
TABLE 2 local connection Table
Figure 780311DEST_PATH_IMAGE002
When the self-networking node receives a data frame of an upper computer, no matter whether the data frame is unicast, broadcast or multicast, a source MAC address of the data frame is the MAC address of the upper computer, the local connection table maintenance module inquires whether an entry corresponding to the MAC address exists in a local connection table, if not, a local connection table entry corresponding to the MAC address is added, and Last _ seen time is set as current system time, and if yes, Last _ seen time of the local connection table entry corresponding to the MAC address is updated to be the current system time.
And step 210, establishing a routing table according to the transmission path of the routing response message, and forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table.
The routing table is shown in table 3:
table 3 routing table
Figure 868353DEST_PATH_IMAGE003
dest _ ID is the ID number of the target ad hoc network node; nexthop _ ID is the next hop node ID number to reach the destination node dest _ ID; last _ seen is the last update time of the routing table entry.
According to the method for routing the ad hoc network supporting IP transparent transmission on demand, the MAC addresses of the upper computers directly connected with the ad hoc network nodes are stored in the local connection table through configuring the global connection table, the local connection table and the routing table, the MAC addresses of the upper computers directly connected with the ad hoc network nodes are managed by the global connection table, so that when data frames are transmitted, only the MAC addresses in the data frames need to be analyzed, the inquiry of data transmission routes in the ad hoc network system is realized through the record of the form, the data between the upper computers are forwarded through the ad hoc network system, the network access of the ad hoc network system is realized, IP address information is not needed, and the transmission mode of IP transparent transmission is realized.
In one embodiment, the connection mode between the upper computer and the ad hoc network node may be a network bridge, and the connection relationship between the upper computer and the ad hoc network node is maintained by an on-demand routing protocol. Whether an on-demand routing query process is initiated to establish a route is determined according to the connection relation, after the route is established, a data frame is sent to a destination node according to the connection relation, the routing query process is initiated only when the upper computer has a service transmission requirement, the whole communication process does not depend on IP address configuration between the upper computer and ad hoc network equipment, only the IP addresses between the upper computers are required to be kept in the same network segment, and the whole ad hoc network looks like a large 'network bridge' to the upper computer user, so that the network flexibility and the user experience are effectively improved while the reduced routing protocol overhead is ensured.
In one embodiment, if a second MAC address corresponding to a second upper computer is queried in the global connection table, a second ad hoc network node is determined according to the global connection table, and a data frame sent by the first upper computer is forwarded to the second upper computer according to a routing table between the first ad hoc network node and the second ad hoc network node.
In this embodiment, the first upper computer and the second upper computer do not establish connection for the first time, so that connection does not need to be established again, and the data frame of the first upper computer can be directly forwarded to the second upper computer through the connection established last time.
In another embodiment, if a second MAC address corresponding to a second upper computer is queried in the global connection table, a time field corresponding to the second MAC address in the global connection table is updated to a current time; wherein the global connection table includes: a node field, a MAC address field and a time field; the time field is used for judging whether the records corresponding to the MAC address field and the node field exceed the keep-alive time, and if so, the records corresponding to the MAC address field and the node field are deleted.
In this embodiment, as shown in table 1, by setting the time field and setting the keep-alive time, when the record corresponding to the MAC address field and the node field exceeds the keep-alive time, the record is deleted, so that accumulation of data entries in the global connection table is avoided, and query efficiency is improved.
In another embodiment, a second ad hoc network node is added to a node field of the global connection table, a second MAC address is added to the MAC address field, and the time field is updated to the current time. Therefore, the global connection table is updated.
Also, as shown in table 2, the local connection table includes: a MAC address field and a time field; the routing table as shown in table 3 includes: a destination node field, a next hop node field, and a time field. In this embodiment, the keep-alive time may also be set to determine whether to delete the corresponding entry.
The advantageous effects of the present invention will be described below with reference to a specific example.
As shown in fig. 3, the steps of the ad hoc network on-demand routing method supporting IP transparent transmission are as follows:
(1) the upper computer A firstly sends a data frame to an on-demand routing protocol module of a direct-connected ad hoc network node through a network bridge, a source IP address and a source MAC address of the data frame are filled as an IP address and an MAC address of the upper computer A, and a destination IP address and a destination MAC address are filled as an IP address and an MAC address of the upper computer B.
(2) After receiving the data frame, the on-demand routing protocol module analyzes and acquires a destination MAC address of the data frame, and then inquires whether an entry corresponding to the MAC address exists in the global connection table according to the destination MAC address, wherein the entry does not exist because the upper computer A and the upper computer B communicate for the first time.
(3) Because the global connection table does not have an entry corresponding to the MAC address, the on-demand routing protocol module initiates a routing query process, and the source node broadcasts a routing request message RREQ to discover the route to the destination node, wherein the RREQ carries the MAC address of the upper computer A and the MAC address of the upper computer B.
(4) After receiving the route request broadcast message RREQ, other ad hoc network nodes query whether an entry corresponding to the MAC address of the upper computer B exists in the local connection table: if the RREQ message does not exist, establishing a reverse route reaching the source node according to the RREQ message, and then forwarding the RREQ message; if the route reply message RREP exists, the upper computer B is connected to the node, and the node is a route destination node, so that a route reply message RREP is replied to the source node; and adding the MAC address of the upper computer A and the source node _ id corresponding to the MAC address into the global connection table.
(5) And when the source node receives the route response message RREP, establishing a route reaching a destination node, adding the MAC address of the upper computer B and the destination node _ id corresponding to the MAC address into the global connection table, and establishing a bidirectional route.
(6) After the route is established, the source node sends the data frame to the next hop node corresponding to the route table entry nexthop _ id according to the newly established route, and after the data frame is forwarded one by one through the intermediate nodes, the data frame finally reaches the destination node and is sent to the upper computer B by the destination node.
(7) For the data frame subsequently sent by the upper computer a, because an entry corresponding to the destination MAC address already exists in the global connection table through the route establishment process of the previous step, the node _ id of the destination node is obtained according to the entry, then the routing table entry reaching the node _ id is inquired in the routing table, the data frame is sent to the node corresponding to the routing table entry nexthop _ id, and after the data frame is forwarded item by item through the intermediate node, the data frame finally reaches the destination node and is sent to the upper computer B by the destination node.
Specifically, as shown in fig. 4, br0 is a bridge device; the upper computer terminal or other systems are connected with the eth0 network equipment of the ad hoc network equipment through the Ethernet to access the ad hoc network system; after the data from the upper computer reaches the bridge, the bridge forwards the data to mesh0 according to the forwarding table; mesh0 is a virtual network device, runs ad hoc network routing protocol on demand, after the data from the bridge reaches mesh0, the routing protocol on demand decides whether to initiate routing inquiry or directly forward the data according to whether the route to the destination MAC address of the data exists; the wlan0 is a radio frequency network device responsible for sending data from the mesh0 to the air interface and sending data received from the air interface to the mesh 0.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, an ad hoc on-demand routing apparatus supporting IP transparent transmission is provided, including: a data receiving module 502, a broadcasting module 504, a route querying module 506, and a data transmitting module 508, wherein:
a data receiving module 502, configured to receive a data frame that includes an IP address and a first MAC address and is sent by a first upper computer;
a broadcast module 504, configured to analyze the data frame through a first ad hoc network node directly connected to the first upper computer, to obtain a first MAC address of the data frame, and write the first MAC address into a preconfigured global connection table; inquiring whether a second MAC address corresponding to a second upper computer is in the global connection table, if not, sending a routing request broadcast message through a first ad hoc network node according to an on-demand routing protocol;
a routing query module 506, configured to generate a routing response message and send the routing response message to the first ad hoc network node when the second ad hoc network node receives the routing request broadcast message and a local connection table corresponding to the second ad hoc network node includes a second MAC address; the local connection table stores the MAC address of the upper computer directly connected with the self-networking node;
and the data transmission module 508 is configured to establish a routing table according to the transmission path of the routing response packet, and forward the data frame sent by the first upper computer to the second upper computer according to the routing table.
In one embodiment, the route querying module 506 is further configured to determine a second ad hoc network node according to the global connection table if a second MAC address corresponding to a second upper computer is queried in the global connection table; the data transmission module 508 is further configured to forward the data frame sent by the first upper computer to the second upper computer according to the routing table between the first ad hoc network node and the second ad hoc network node.
In one embodiment, the system further includes a time-to-live detection module, configured to update a time field corresponding to a second MAC address in the global connection table to a current time if the second MAC address corresponding to the second upper computer is queried in the global connection table; wherein the global connection table comprises: a node field, a MAC address field and a time field; and the time field is used for judging whether the records corresponding to the MAC address field and the node field exceed the keep-alive time, and if so, deleting the records corresponding to the MAC address field and the node field.
In one embodiment, the data transmission module 508 is further configured to add a second ad hoc network node to the node field of the global connection table, add a second MAC address to the MAC address field, and update the time field to the current time.
In one embodiment, the local connection table includes: a MAC address field and a time field; the routing table includes: a destination node field, a next hop node field, and a time field.
For specific limitations of the ad hoc network on-demand routing device supporting the IP transparent transmission, reference may be made to the above limitations on the ad hoc network on-demand routing method supporting the IP transparent transmission, which are not described herein again. All or part of each module in the ad hoc network on-demand routing device supporting the IP transparent transmission can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an ad hoc network on-demand routing method supporting IP transparent transmission.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is provided, comprising a memory storing a computer program and a processor implementing the steps of the method in the above embodiments when the processor executes the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method in the above-mentioned embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An on-demand routing method of an ad hoc network supporting IP transparent transmission is characterized by comprising the following steps:
receiving a data frame which is sent by a first upper computer and contains an IP address and a first MAC address;
analyzing the data frame through a first ad hoc network node directly connected with the first upper computer to obtain a first MAC address of the data frame, and writing the first MAC address into a local connection table configured in advance;
inquiring whether a second MAC address corresponding to a second upper computer is in the global connection table, if not, sending a routing request broadcast message through a first ad hoc network node according to an on-demand routing protocol;
when the second ad hoc network node receives the routing request broadcast message and a local connection table corresponding to the second ad hoc network node contains a second MAC address, generating a routing response message and sending the routing response message to the first ad hoc network node; the local connection table stores the MAC address of the upper computer directly connected with the self-networking node;
and establishing a routing table according to the transmission path of the routing response message, and forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table.
2. The method of claim 1, further comprising:
if a second MAC address corresponding to a second upper computer is inquired in the global connection table, determining a second ad hoc network node according to the global connection table;
and forwarding the data frame sent by the first upper computer to a second upper computer according to a routing table between the first ad hoc network node and the second ad hoc network node.
3. The method of claim 1, further comprising:
if the second MAC address corresponding to the second upper computer is inquired in the global connection table, updating the time field corresponding to the second MAC address in the global connection table to be the current time; wherein the global connection table comprises: a node field, a MAC address field and a time field; and the time field is used for judging whether the records corresponding to the MAC address field and the node field exceed the keep-alive time, and if so, deleting the records corresponding to the MAC address field and the node field.
4. The method according to claim 3, wherein after forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table, the method further comprises:
and adding a second ad hoc network node into a node field of the global connection table, adding a second MAC address into the MAC address field, and updating the time field to the current time.
5. The method according to any of claims 1 to 4, wherein the local connection table comprises: a MAC address field and a time field;
the routing table includes: a destination node field, a next hop node field, and a time field.
6. An ad hoc network on-demand routing device supporting IP transparent transmission, the device comprising:
the data receiving module is used for receiving a data frame which is sent by a first upper computer and contains an IP address and a first MAC address;
the broadcast module is used for analyzing the data frame through a first ad hoc network node directly connected with the first upper computer to obtain a first MAC address of the data frame, and writing the first MAC address into a local connection table configured in advance; inquiring whether a second MAC address corresponding to a second upper computer is in the global connection table, if not, sending a routing request broadcast message through a first ad hoc network node according to an on-demand routing protocol;
the routing query module is used for generating a routing response message and sending the routing response message to the first ad hoc network node when the second ad hoc network node receives the routing request broadcast message and a local connection table corresponding to the second ad hoc network node contains a second MAC address; the local connection table stores the MAC address of the upper computer directly connected with the self-networking node;
and the data transmission module is used for establishing a routing table according to the transmission path of the routing response message and forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table.
7. The apparatus according to claim 6, wherein the route query module is further configured to determine a second ad hoc network node according to the global connection table if querying that a second MAC address corresponding to a second upper computer is in the global connection table; the data transmission module is also used for forwarding the data frame sent by the first upper computer to the second upper computer according to the routing table between the first ad hoc network node and the second ad hoc network node.
8. The apparatus according to claim 6, further comprising a time-to-live detection module, configured to update a time field corresponding to a second MAC address in the global connection table to a current time if the second MAC address corresponding to the second upper computer is queried in the global connection table; wherein the global connection table comprises: a node field, a MAC address field and a time field; and the time field is used for judging whether the records corresponding to the MAC address field and the node field exceed the keep-alive time, and if so, deleting the records corresponding to the MAC address field and the node field.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010840670.XA 2020-08-20 2020-08-20 Ad hoc network on-demand routing method and device supporting IP transparent transmission and computer equipment Active CN111711571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010840670.XA CN111711571B (en) 2020-08-20 2020-08-20 Ad hoc network on-demand routing method and device supporting IP transparent transmission and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010840670.XA CN111711571B (en) 2020-08-20 2020-08-20 Ad hoc network on-demand routing method and device supporting IP transparent transmission and computer equipment

Publications (2)

Publication Number Publication Date
CN111711571A true CN111711571A (en) 2020-09-25
CN111711571B CN111711571B (en) 2020-11-13

Family

ID=72547318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010840670.XA Active CN111711571B (en) 2020-08-20 2020-08-20 Ad hoc network on-demand routing method and device supporting IP transparent transmission and computer equipment

Country Status (1)

Country Link
CN (1) CN111711571B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866466A (en) * 2022-03-29 2022-08-05 深圳会当科技有限公司 Device communication method and device, electronic device and readable storage medium
CN115134271A (en) * 2021-03-22 2022-09-30 湖南智领通信科技有限公司 Fault detection method and device for IP transparent transmission ad hoc network and computer equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050157749A1 (en) * 2004-01-19 2005-07-21 Samsung Electronics Co., Ltd. System and method for communication with an external network in an IPv6 MANET network
CN101119322A (en) * 2007-09-11 2008-02-06 杭州华三通信技术有限公司 Packet processing method and node equipment in MESH network
CN101867519A (en) * 2010-06-03 2010-10-20 中国人民解放军91655部队 Dynamic area routing method and system for ad hoc network
CN102932257A (en) * 2012-12-04 2013-02-13 威胜集团有限公司 Electric power carrier communication routing method
US20130094398A1 (en) * 2011-09-10 2013-04-18 Arnab Das Methods systems, and devices for robustness improvement in a mobile ad hoc network using reputation-based routing
CN103781141A (en) * 2013-10-24 2014-05-07 深圳市金溢科技有限公司 Unicast routing forwarding method of vehicle ad-hoc network, chip and a communication system
CN104125619A (en) * 2013-04-25 2014-10-29 北京信威通信技术股份有限公司 Terminal ad hoc network routing method
CN104618245A (en) * 2014-12-23 2015-05-13 西安电子工程研究所 Cluster head coordination based MAC/ route integrated self-organization network design method
CN107645402A (en) * 2016-07-22 2018-01-30 新华三技术有限公司 A kind of route management method and device
CN107733793A (en) * 2017-11-28 2018-02-23 新华三技术有限公司 A kind of forwarding-table item maintaining method and device
CN109673035A (en) * 2019-02-14 2019-04-23 湖南智领通信科技有限公司 A kind of Route establishment and maintaining method suitable for wireless self-organization network
US20190281495A1 (en) * 2016-11-30 2019-09-12 Huawei Technologies Co., Ltd. Packet Forwarding Method and Apparatus

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050157749A1 (en) * 2004-01-19 2005-07-21 Samsung Electronics Co., Ltd. System and method for communication with an external network in an IPv6 MANET network
CN101119322A (en) * 2007-09-11 2008-02-06 杭州华三通信技术有限公司 Packet processing method and node equipment in MESH network
CN101867519A (en) * 2010-06-03 2010-10-20 中国人民解放军91655部队 Dynamic area routing method and system for ad hoc network
US20130094398A1 (en) * 2011-09-10 2013-04-18 Arnab Das Methods systems, and devices for robustness improvement in a mobile ad hoc network using reputation-based routing
CN102932257A (en) * 2012-12-04 2013-02-13 威胜集团有限公司 Electric power carrier communication routing method
CN104125619A (en) * 2013-04-25 2014-10-29 北京信威通信技术股份有限公司 Terminal ad hoc network routing method
CN103781141A (en) * 2013-10-24 2014-05-07 深圳市金溢科技有限公司 Unicast routing forwarding method of vehicle ad-hoc network, chip and a communication system
CN104618245A (en) * 2014-12-23 2015-05-13 西安电子工程研究所 Cluster head coordination based MAC/ route integrated self-organization network design method
CN107645402A (en) * 2016-07-22 2018-01-30 新华三技术有限公司 A kind of route management method and device
US20190281495A1 (en) * 2016-11-30 2019-09-12 Huawei Technologies Co., Ltd. Packet Forwarding Method and Apparatus
CN107733793A (en) * 2017-11-28 2018-02-23 新华三技术有限公司 A kind of forwarding-table item maintaining method and device
CN109673035A (en) * 2019-02-14 2019-04-23 湖南智领通信科技有限公司 A kind of Route establishment and maintaining method suitable for wireless self-organization network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115134271A (en) * 2021-03-22 2022-09-30 湖南智领通信科技有限公司 Fault detection method and device for IP transparent transmission ad hoc network and computer equipment
CN115134271B (en) * 2021-03-22 2023-07-25 湖南智领通信科技有限公司 Fault detection method and device for IP transparent transmission ad hoc network and computer equipment
CN114866466A (en) * 2022-03-29 2022-08-05 深圳会当科技有限公司 Device communication method and device, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN111711571B (en) 2020-11-13

Similar Documents

Publication Publication Date Title
Huhtonen Comparing AODV and OLSR routing protocols
US8064416B2 (en) Route selection in wireless networks
US7158497B2 (en) Methods and apparatus for supporting micro-mobility within a radio access network
US20080219237A1 (en) Multicast support by mobile routers in a mobile ad hoc network
US9906439B2 (en) Ad-hoc on-demand routing through central control
CN111711571B (en) Ad hoc network on-demand routing method and device supporting IP transparent transmission and computer equipment
US9197510B2 (en) Efficient network data dissemination
US20050157749A1 (en) System and method for communication with an external network in an IPv6 MANET network
JP2007159099A (en) Method and apparatus for discovering disjoint routes to multiple service nodes
CN103763750A (en) Method for fast achieving packet forwarding in wireless ad hoc network of TDMA protocol
JP2006279168A (en) Communication apparatus for configuring adhoc network, bridge apparatus, and communication system
CN111787593A (en) Data transmission method and node
US20080165692A1 (en) Method and system for opportunistic data communication
CN105530185A (en) Overlay routing network, routing method based on overlay routing network, and router
CN115941584A (en) High dynamic on-demand routing method for ad hoc network, communication node and storage medium
US20210045034A1 (en) Overlapping subdags in a rpl network
CN112867091B (en) Mesh gateway selection method and device based on active routing protocol
WO2023070633A1 (en) D2d communication method
CN110224931B (en) Information transmission method and device and computer equipment
CN111193667B (en) Routing method, leaf node and storage medium of ad hoc network
CN109922442B (en) Address resolution method for heterogeneous network of wireless multi-hop network and full-connection network
JP4564442B2 (en) Route search device
CN111917644B (en) Edge computing network routing method and device based on UDP (user Datagram protocol) layer
CN115550308B (en) 5GLAN networking method, device, computer equipment and storage medium
KR20050079459A (en) Secure router and method for routing thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant