CN117692295A - Gateway networking method, device, equipment and medium - Google Patents

Gateway networking method, device, equipment and medium Download PDF

Info

Publication number
CN117692295A
CN117692295A CN202311842235.0A CN202311842235A CN117692295A CN 117692295 A CN117692295 A CN 117692295A CN 202311842235 A CN202311842235 A CN 202311842235A CN 117692295 A CN117692295 A CN 117692295A
Authority
CN
China
Prior art keywords
gateway
gateways
networking
network
identification information
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.)
Pending
Application number
CN202311842235.0A
Other languages
Chinese (zh)
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.)
Hangzhou Chengfeng Erlai Digital Technology Co ltd
Original Assignee
Hangzhou Chengfeng Erlai Digital 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 Hangzhou Chengfeng Erlai Digital Technology Co ltd filed Critical Hangzhou Chengfeng Erlai Digital Technology Co ltd
Publication of CN117692295A publication Critical patent/CN117692295A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a gateway networking method, which relates to the technical field of gateways and is used for solving the problem that the data transmission of the existing gateway can be blocked by a firewall of a switch, and the method comprises the following steps: the gateways synchronize respective identification information through a wireless network, and preliminary connection among the gateways is established; the gateways synchronized with the identification information are actively identified through a wired network, active gateways are screened out, and the screened gateways are marked with each other; according to the election protocol, electing a central gateway of each networking network from the screened gateways; and using the central gateway as a central node of networking to carry out gateway networking so as to establish connection between different gateways. The invention also discloses a gateway networking device, electronic equipment and a computer storage medium. According to the invention, gateway information synchronization is carried out through wireless transmission, and networking is carried out by combining a limited network, so that information transmission among gateways is not blocked by a switch firewall.

Description

Gateway networking method, device, equipment and medium
Technical Field
The present invention relates to the field of gateway technologies, and in particular, to a method, an apparatus, a device, and a medium for gateway networking, where wireless transmission and wired transmission are combined and not blocked by a switch firewall.
Background
With the popularization of smart home and internet of things, the demand for gateway and gateway interconnection is accompanied. The interaction between different existing gateways is mainly achieved through the cloud, namely, the gateway sends information such as flow and the like to the cloud, and the cloud forwards the information to another gateway.
The hidden danger of information loss is caused by interaction between gateways by means of the cloud, and the influence of network fluctuation and cloud processing capacity on data transmission speed is large. Therefore, in order to realize interconnection and interworking between gateways without passing through a cloud, two gateway interconnection methods exist in the prior art: one is to manually configure gateway communication paths, and the other is to perform mutual discovery and networking of gateways in a wired communication manner in a network environment where an ethernet broadcast packet is reachable. The former is labor intensive, high in operation and maintenance costs, and requires reconfiguration when adding or subtracting gateways. The latter must forward the data packet through the switch, which is limited by the firewall of the switch, and the forwarding of the wire broadcasting or wire multicasting in different wire network environments can be blocked by the firewall, resulting in networking failure between the gateways. Therefore, a gateway networking method capable of realizing automatic configuration between gateways and avoiding data forwarding from being blocked by a switch firewall is needed.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the invention is to provide a gateway networking method, which synchronizes gateway information through a wireless network and identifies active gateways through a wired network so as to ensure that gateway networking information can be achieved.
One of the purposes of the invention is realized by adopting the following technical scheme:
a gateway networking method, comprising the steps of:
the gateways synchronize respective identification information through a wireless network, and preliminary connection among the gateways is established;
the gateways synchronized with the identification information are actively identified through a wired network, active gateways are screened out, and the screened gateways are marked with each other;
according to the election protocol, electing a central gateway of each networking network from the screened gateways;
and using the central gateway as a central node of networking to carry out gateway networking so as to establish connection between different gateways.
Further, the identification information includes a physical address and a logical address of the gateway itself.
Further, the gateways synchronize respective identification information through the wireless network, and establish preliminary connection between the gateways, including:
the gateway reads the self identification information and constructs a data packet containing the identification information;
the gateway broadcasts the data packet through a wireless network;
the gateway continuously acquires data packets broadcast by other gateways;
and the gateway stores and marks corresponding data according to the sending gateway of the data packet.
In order to further avoid interception of data by the switch firewall, active identification is performed through unicast of the wired network, so that the switch firewall is ensured not to influence data transmission of active identification;
further, the gateways synchronized with the identification information are actively identified through a wired network, active gateways are screened out, and the screened gateways are marked with each other; the method comprises the following steps:
the gateway sends a detection signal to the gateway of the synchronized identification information through a wired network TCP/IP;
acquiring a feedback result of the detection signal;
if the feedback result is obtained or the obtaining time of the feedback result is within the preset obtaining time, marking the gateway as an active gateway; otherwise, no marking or marking as a non-communicable gateway is performed.
Further, selecting a central gateway from the screened gateways, including:
initializing a gateway state, transmitting a heartbeat packet to a marked active gateway through UDP, and updating the on-line state of the active gateway according to the feedback result of the heartbeat packet;
when the online state is kept stable, election is entered: and selecting the gateway with the largest MAC address as a main gateway, and synchronizing the main gateway information to other gateways in the networking network where the main gateway is located.
Further, in order to automatically adjust the size of the network by using the gateway, the gateway is used as a central node of the network to perform gateway networking, so that different gateways are connected, and the method further comprises the following steps:
the gateway obtains preset forwarding times;
the gateway carries out state forwarding of the direct-connection neighbor node and carries out networking with the gateway which receives the state forwarding data;
and stopping forwarding when the forwarding times reach the preset forwarding times, completing gateway networking and continuing networking of other gateways to form one or more gateway networking networks.
The second objective of the present invention is to provide a gateway networking device.
The second purpose of the invention is realized by adopting the following technical scheme:
a gateway networking device, comprising:
the information synchronization module is used for the gateways to synchronize the respective identification information through the wireless network and establish preliminary connection between the gateways;
the screening module is used for carrying out active identification on the gateways synchronized with the identification information through a wired network, screening out active gateways and marking the screened gateways with each other;
the networking module is used for selecting the central gateway of each networking network from the screened gateways according to the selection protocol; and the central gateway is used as a central node of networking to carry out gateway networking so as to establish connection between different gateways.
It is a third object of the present invention to provide an electronic device for performing one of the objects of the present invention, which includes a processor, a storage medium, and a computer program stored in the storage medium, the computer program implementing the gateway networking method when executed by the processor.
It is a fourth object of the present invention to provide a computer readable storage medium storing one of the objects of the present invention, having stored thereon a computer program which, when executed by a processor, implements the gateway networking method described above.
Compared with the prior art, the invention has the beneficial effects that:
the invention makes different gateways find each other through carrying out gateway preliminary communication interaction on the wireless network broadcast, avoids packet loss of broadcast data packets caused by network strategies, is applicable to various network environments, especially to the cable network environment where the broadcast is not reachable, and can make the gateway complete networking in the cable network environment where the broadcast is not reachable; the specific networking is performed through the wired network, the networking can be realized without cloud, and manual configuration is not needed; furthermore, the invention combines the unicast of the wired network to carry out the data intercommunication among the gateways, and can better avoid the data transmission from being forbidden by the network security policy and identify the active gateway on the basis of the identification of the gateway carried out by the wireless network.
Drawings
Fig. 1 is a flowchart of a gateway networking method according to the first embodiment;
fig. 2 is a schematic flow chart of gateway wireless broadcast information synchronization according to the first embodiment;
FIG. 3 is a flow chart of active identification of the first embodiment;
fig. 4 is a schematic diagram of a gateway election process according to the first embodiment;
FIG. 5 is a schematic diagram of a network under the one-time forwarding restriction of the second embodiment;
fig. 6 is a schematic diagram of a network under the secondary forwarding constraint according to the second embodiment
Fig. 7 is a block diagram of the gateway networking device of the third embodiment;
fig. 8 is a block diagram of the electronic device of the fourth embodiment.
Detailed Description
The invention will now be described in more detail with reference to the accompanying drawings, to which it should be noted that the description is given below by way of illustration only and not by way of limitation. Various embodiments may be combined with one another to form further embodiments not shown in the following description.
Example 1
An embodiment provides a gateway networking method combining a wireless network and a wired network, which aims to identify gateways through the wireless network, identify gateway usability through combining the wired network, and finally realize gateway networking.
A Gateway (Gateway), also known as Gateway, protocol converter or Gateway host, is a network device or software that is capable of connecting networks of different protocols or different architectures so that they can communicate with each other and share resources. The gateway may be used for connection between a Wide Area Network (WAN) and a Local Area Network (LAN) or between local area networks.
The gateway and the gateway have the interconnection and intercommunication requirements, and if the gateway and the gateway can sense the existence of the other party, the direct intercommunication of data can be realized.
The wireless network is a communication network between the mobile phone and the gateway, and a wired network is used for communication between the gateway and the gateway. The reason why the gateway cannot use the wireless network for communication with the gateway is that: as distance increases, both throughput and network quality of the wireless network are unstable, so wired network communication is used between gateways to increase stability.
Various limitations of the wired network, such as broadcast isolation, multicast isolation, etc., can be skipped by broadcasting the data packets over the wireless network, resulting in broadcast packets and multicast packets that are not guaranteed to be reachable. The wireless network does not depend on transmission media such as network cables, and the reliability of transmission is higher.
In summary, the embodiment broadcasts the information of the gateways through the wireless network, ensures that the interaction between the gateways is not blocked by the switch, and realizes the subsequent networking work by combining with the wired network. Specifically, referring to fig. 1, a gateway networking method, where a network of the gateway networking includes at least two gateways, and the gateway networking includes the following steps:
s1, the gateways synchronize respective identification information through a wireless network, and preliminary connection among the gateways is established;
the gateways in this embodiment are all gateways supporting wireless communication and wired network communication. The identification information mentioned above refers to unique information that can enable the neighboring gateway to recognize, for example, the address of the gateway, the gateway type, etc. The physical address (MAC address) of each gateway is unique and not impersonatable, so the physical address can be used as identification information of the gateway in the local area network; the logical address (IP address) of the gateway is also unique in the whole network, so that the IP address can be used as unique information for identifying a gateway in the network, in addition, the IP and the MAC can be bound, and by binding a specific IP address with a specific MAC address, the authorized device can access network resources, thereby preventing the IP address from being counterfeited or changed, and enabling the gateway to be more easily identified. Therefore, in this embodiment, the identification information selects the physical address MAC and the logical address IP of the gateway itself, so that the gateway has unique identification information in the local area network and the whole network, and can be identified and recorded by other neighboring gateways.
Referring to fig. 2, the two gateway wireless broadcast information synchronization process S1 specifically includes:
the gateway reads the self identification information and constructs a data packet containing the identification information;
the gateway broadcasts the data packet through a wireless network;
the gateway continuously acquires data packets broadcast by other gateways;
and the gateway stores and marks corresponding data according to the sending gateway of the data packet.
The process of the gateway reading the own information and broadcasting and receiving the data packet belongs to the conventional technical means of wireless network transmission, so the specific principle and process are not repeated in this embodiment. It should be noted that, fig. 2 only illustrates a wireless broadcast synchronization process between two gateways, and when the number of gateways exceeds two, the gateways may perform information synchronization two by two, or may broadcast self identification information to all adjacent gateways to achieve information synchronization.
Table 1 shows that the broadcast packet format and content only need to contain the necessary transmission data, and do not need to transmit too much data, and do not occupy much gateway memory space.
TABLE 1
Keyword(s) Bytes Value of Interpretation of the drawings
Type 1 Wireless The packet type is a radio broadcast packet
Len 1 10 Length of Value field
Value 10 IP/MAC Gateway IP address and MAC address
Through the wireless broadcasting synchronous information process of S1, the synchronization of the information between the gateways can be ensured, and the information is not limited by the security policy of the switch.
The specific mode of wireless transmission in S1 is not limited in this embodiment, and synchronization of gateway information can be achieved through protocols such as bluetooth BLE and WIFI, and selection can be performed according to actual scenes.
S2, the gateways synchronized with the identification information are subjected to active identification through a wired network, active gateways are screened out, and the screened gateways are marked with each other;
it should be noted that steps S1 and S2 may be performed simultaneously, so long as the gateways have synchronized their respective identification information, the steps S2 may be performed, and the wired communication and the wireless communication may not affect each other, thereby increasing the networking efficiency.
The purpose of S2 is to ensure the activity of the gateway, and the wireless network is limited by network fluctuation and signal instability, and active identification is performed through the wireless network, that is, misjudgment is easy to occur when the communication performance of the gateway is ensured, so that the embodiment selects the limited network for active identification. In addition, in order to avoid the blocking of the switch security policy to the wire broadcasting and the wire multicasting forwarding, the wire unicasting is not blocked by the security policy of the switch firewall, so in this embodiment, the active identification is performed through the wire network unicasting, so as to ensure that the switch firewall does not affect the data transmission of the active identification.
Specifically, referring to fig. 3, the gateways synchronized with the identification information perform active identification through a wired network, active gateways are screened out, and the screened gateways are marked with each other; the method comprises the following steps:
the gateway sends a detection signal to the gateway of the synchronized identification information through a wired network TCP/IP;
acquiring a feedback result of the detection signal;
if the feedback result is obtained or the obtaining time of the feedback result is within the preset obtaining time, marking the gateway as an active gateway; otherwise, no marking or marking as a non-communicable gateway is performed.
In this embodiment, the corresponding gateway may be marked as an active gateway when feedback is received, or a preset acquisition time may be set, for example, 10 seconds, and when the feedback time is too long, active marking is not performed.
In this embodiment, the detection signal is implemented by sending a sniffing packet, and in practical application, other modes may be used, which only needs to ensure that the signal can be received and fed back by the neighboring gateway.
Since the IP addresses of other gateways are already stored in S1, in step S2, the gateway can perform data transmission through the address.
Tables 2 and 3 show the format of the sniff packet and the response packet format without the need to transmit too much data.
Table 2 sniff packet format
Keyword(s) Bytes Value of Interpretation of the drawings
Type 1 Probe The packet type is sniffing packets
Len 1 0 Length of Value field
Value 0 Without any means for
Table 3 sniff response packet format
Keyword(s) Bytes Value of Interpretation of the drawings
Type 1 ProbeResponse The data packet type is the corresponding packet of the sniffing data packet
Len 1 0 Length of Value field
Value 0 Without any means for
S3, selecting a central gateway of each networking network from the selected gateways according to an election protocol;
the election protocol of S3 is mainly used to elect a central AP (wireless access point) node, and all the other subsequent APs communicate with the central AP, and then the central AP forwards the traffic.
In this embodiment, the election of the central gateway is implemented through UDP communication, specifically, please refer to an election process shown in fig. 4, to elect the central gateway from the screened gateways, including:
initializing a gateway state, transmitting a heartbeat packet to a marked active gateway through UDP, and updating the on-line state of the active gateway according to the feedback result of the heartbeat packet;
gateway state initialization: the gateway sends the heartbeat packet to all active neighbor gateways through UDP; after receiving UDP heartbeat packets, the gateway updates the online state of all active neighbor gateways; all active neighbor gateways have not changed for 60 seconds and the gateway enters the election state.
When the online state is kept stable, election is entered: and selecting the gateway with the largest MAC address as a main gateway, and synchronizing the main gateway information to other gateways in the networking network where the main gateway is located.
Election state: if the gateway is not the gateway with the largest MAC address, the gateway selects the gateway with the largest MAC address in the active neighbor as the main gateway. The gateway sends the election packet over UDP to all active neighbors. If the gateway is the gateway with the largest MAC, the gateway sends the selected packet to all active neighbors. The gateway receives the winning packet, sends a winning confirmation packet to the main gateway, and enters an election success state. And the gateway with the maximum MAC address receives the selection confirmation packets of all the gateways, enters the successful selection state, and enters the initialization state after the time-out of 60 seconds is over otherwise.
The embodiment of determining that the gateway is stable in the online state is set to be unchanged within 60 seconds, and may be set according to the gateway condition and the network stability during actual use, and is not limited to the above-mentioned determination time standard. The judgment of the stable online state is needed to ensure that data transmission can be achieved during election, such as an election package, a confirmation package and the like, so that the success of the election is ensured, and the problem that a gateway does not receive an election result or fails to vote for the election due to unstable online state can be avoided.
UDP communication is a conventional technical means, and this embodiment is not limited thereto. The gateway with the largest MAC address is selected as the central gateway, and has the following advantages: the unique gateway can be selected quickly, and the MAC address is unique, so that the data packet exchange can be reduced, and the transmission speed is high. In addition, the election mode is simple in logic, and the situation of reselection of the main gateway caused by unstable network is eliminated.
And S4, using the central gateway as a central node of networking to carry out gateway networking so as to enable different gateways to establish connection.
S4 belongs to a conventional process of gateway networking, and is not described in detail, in this embodiment, all active gateways form a group of gateways, and data forwarding is performed between the gateways through a central node.
In summary, the method described in this embodiment avoids the security policy of the switch by using the wireless network, so that the gateway itself identification information cannot be shielded during synchronization, and the requirement of pure information synchronization on timeliness and feedback is low, so that the synchronization of information cannot be affected even if the wireless network signal is unstable. When networking, unicast through the wired network is not blocked by the security policy of the switch, and the stability of information transmission is ensured. Compared with a method for networking a gateway by only relying on a wireless network, the method of the embodiment has higher stability of transmission, does not need to pass through a cloud, can synchronously carry out information synchronization and networking, and has high efficiency. Compared with the method of networking the gateways by only relying on the wired network, the method can ensure that the information synchronization between the gateways is not shielded by the firewall (security policy) of the switch, and the wired unicast can further ensure that the data transmission is reachable. The method can ensure that the gateway is not influenced by the security policy of the wired network when the gateway is networked in the wired network environment, and is applicable to networking in all wired network environments.
Example two
The second embodiment is based on the first embodiment, and the control of the networking range is realized by setting the forwarding times.
Specifically, the gateway networking is performed by using the central gateway as a central node of the networking, so that different gateways establish connection, and the method further comprises:
the gateway obtains preset forwarding times;
the gateway carries out state forwarding of the direct-connection neighbor node and carries out networking with the gateway which receives the state forwarding data;
and stopping forwarding when the forwarding times reach the preset forwarding times, completing gateway networking and continuing networking of other gateways to form one or more gateway networking networks.
The embodiment enables the gateway to automatically adjust the size of all networks by setting only one number. The method does not need to be manually adjusted by an administrator, reduces operation and maintenance cost, and can rapidly realize the increase or decrease of the gateway.
An exemplary description of the method described in this embodiment is given below by way of weights.
a. The wireless broadcast data packet is provided with an initial value forwarding weight value n.
b. The gateway can forward the direct connection neighbor state to the adjacent gateway through the wired network, and the weight n is reduced by 1 every time the direct connection neighbor state is forwarded.
c. If n < = 0, this neighbor information is not forwarded any more. The size of the networking range can be effectively controlled by controlling the size of the weight n.
Referring to fig. 5, when the weight n=1, only the wireless broadcast direct gateway will be networked, i.e. two smaller networks in the figure.
Referring to fig. 6, when the weight n=2, the gateways separated by one gateway will be networked, i.e. a larger network in the figure.
The size of the networking can be controlled by controlling the size of the weight n, and the number of wired forwarding packets among the devices can be controlled. The larger the network, the more packets are wire-forwarded and vice versa.
Example III
An embodiment III discloses a device corresponding to the gateway networking method of the above embodiment, which is a virtual device structure of the above embodiment, and referring to FIG. 7, including:
the information synchronization module 210 is configured to synchronize respective identification information of the gateways through the wireless network, and establish a preliminary connection between the gateways;
the screening module 220 is configured to perform active identification on the gateways synchronized with the identification information through a wired network, screen out active gateways, and mark the screened gateways with each other;
the networking module 230 is configured to elect a central gateway of each networking network from the screened gateways according to an election protocol; and the central gateway is used as a central node of networking to carry out gateway networking so as to establish connection between different gateways.
Preferably, the identification information includes a physical address and a logical address of the gateway itself.
Preferably, the gateways synchronize respective identification information through the wireless network, and establish preliminary contact between the gateways, including:
the gateway reads the self identification information and constructs a data packet containing the identification information;
the gateway broadcasts the data packet through a wireless network;
the gateway continuously acquires data packets broadcast by other gateways;
and the gateway stores and marks corresponding data according to the sending gateway of the data packet.
Preferably, the active identification is performed through wired network unicast to ensure that the switch firewall does not affect the data transmission of the active identification.
Preferably, the gateways synchronized with the identification information are actively identified through a wired network, active gateways are screened out, and the screened gateways are marked with each other; the method comprises the following steps:
the gateway sends a detection signal to the gateway of the synchronized identification information through a wired network TCP/IP;
acquiring a feedback result of the detection signal;
if the feedback result is obtained or the obtaining time of the feedback result is within the preset obtaining time, marking the gateway as an active gateway; otherwise, no marking or marking as a non-communicable gateway is performed.
Preferably, according to an election protocol, electing a central gateway from the screened gateways comprises:
initializing a gateway state, transmitting a heartbeat packet to a marked active gateway through UDP, and updating the on-line state of the active gateway according to the feedback result of the heartbeat packet;
when the online state is kept stable, election is entered: and selecting the gateway with the largest MAC address as a main gateway, and synchronizing the main gateway information to other gateways in the networking network where the main gateway is located.
Preferably, the gateway networking is performed by using the central gateway as a central node of the networking, so that different gateways establish connection, and the method further comprises:
the gateway obtains preset forwarding times;
the gateway carries out state forwarding of the direct-connection neighbor node and carries out networking with the gateway which receives the state forwarding data;
and stopping forwarding when the forwarding times reach the preset forwarding times, completing gateway networking and continuing networking of other gateways to form one or more gateway networking networks.
Example IV
Fig. 8 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention, and as shown in fig. 8, the electronic device includes a processor 310, a memory 320, an input device 330 and an output device 340; the number of processors 310 in the computer device may be one or more, one processor 310 being taken as an example in fig. 8; the processor 310, the memory 320, the input device 330 and the output device 340 in the electronic device may be connected by a bus or other means, in fig. 8 by way of example.
The memory 320 is used as a computer readable storage medium, and may be used to store a software program, a computer executable program, and modules, such as program instructions/modules corresponding to the gateway networking method in the embodiment of the present invention (for example, the information synchronization module 210, the screening module 220, and the networking module 230 in the elbow networking method device). The processor 310 executes various functional applications of the electronic device and data processing by executing software programs, instructions and modules stored in the memory 320, that is, implements the gateway networking method of the first to second embodiments.
Memory 320 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 320 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 320 may further include memory located remotely from processor 310, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 330 may be used to receive input user identity information, gateway information, and the like. The output device 340 may include a display device such as a display screen.
Example five
The fifth embodiment of the present invention also provides a storage medium containing computer executable instructions, where the storage medium may be used for a computer to perform a gateway networking method, where the method includes:
the gateways synchronize respective identification information through a wireless network, and preliminary connection among the gateways is established;
the gateways synchronized with the identification information are actively identified through a wired network, active gateways are screened out, and the screened gateways are marked with each other;
according to the election protocol, electing a central gateway of each networking network from the screened gateways;
and using the central gateway as a central node of networking to carry out gateway networking so as to establish connection between different gateways.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the method operations described above, and may also perform the related operations in the gateway-based networking method provided in any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing an electronic device (which may be a mobile phone, a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the gateway networking method device, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
It will be apparent to those skilled in the art from this disclosure that various other changes and modifications can be made which are within the scope of the invention as defined in the appended claims.

Claims (10)

1. A gateway networking method, wherein the gateway networking network comprises at least two gateways, and the gateway networking method comprises the following steps:
the gateways synchronize respective identification information through a wireless network, and preliminary connection among the gateways is established;
the gateways synchronized with the identification information are actively identified through a wired network, active gateways are screened out, and the screened gateways are marked with each other;
according to the election protocol, electing a central gateway of each networking network from the screened gateways;
and using the central gateway as a central node of networking to carry out gateway networking so as to establish connection between different gateways.
2. The gateway networking method of claim 1, wherein the identification information comprises a physical address and a logical address of the gateway itself.
3. The gateway networking method of claim 1 or 2, wherein the gateways synchronize respective identification information through the wireless network to establish preliminary contact between the gateways, comprising:
the gateway reads the self identification information and constructs a data packet containing the identification information;
the gateway broadcasts the data packet through a wireless network;
the gateway continuously acquires data packets broadcast by other gateways;
and the gateway stores and marks corresponding data according to the sending gateway of the data packet.
4. The gateway networking method of claim 1, wherein the active identification is performed by wire network unicast to ensure that the switch firewall does not affect data transmission of the active identified data transmission.
5. The gateway networking method according to claim 1 or 4, wherein the gateways synchronized with the identification information are actively identified through a wired network, active gateways are screened out, and the screened gateways are marked with each other; the method comprises the following steps:
the gateway sends a detection signal to the gateway of the synchronized identification information through a wired network TCP/IP;
acquiring a feedback result of the detection signal;
if the feedback result is obtained or the obtaining time of the feedback result is within the preset obtaining time, marking the gateway as an active gateway; otherwise, no marking or marking as a non-communicable gateway is performed.
6. The gateway networking method of claim 1, wherein electing a center gateway from among the screened gateways according to an election protocol comprises:
initializing a gateway state, transmitting a heartbeat packet to a marked active gateway through UDP, and updating the on-line state of the active gateway according to the feedback result of the heartbeat packet;
when the online state is kept stable, election is entered: and selecting the gateway with the largest MAC address as a main gateway, and synchronizing the main gateway information to other gateways in the networking network where the main gateway is located.
7. The gateway networking method of claim 1, wherein the gateway networking is performed by using the central gateway as a central node of the networking, so that different gateways establish a connection, further comprising:
the gateway obtains preset forwarding times;
the gateway carries out state forwarding of the direct-connection neighbor node and carries out networking with the gateway which receives the state forwarding data;
and stopping forwarding when the forwarding times reach the preset forwarding times, completing gateway networking and continuing networking of other gateways to form one or more gateway networking networks.
8. A gateway networking device, comprising:
the information synchronization module is used for the gateways to synchronize the respective identification information through the wireless network and establish preliminary connection between the gateways;
the screening module is used for carrying out active identification on the gateways synchronized with the identification information through a wired network, screening out active gateways and marking the screened gateways with each other;
the networking module is used for selecting a central gateway from the screened gateways according to the selection protocol; and the central gateway is used as a central node of networking to carry out gateway networking so as to establish connection between different gateways.
9. An electronic device comprising a processor, a storage medium and a computer program stored in the storage medium, characterized in that the computer program, when executed by the processor, implements the gateway networking method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the gateway networking method of any of claims 1 to 7.
CN202311842235.0A 2023-12-26 2023-12-28 Gateway networking method, device, equipment and medium Pending CN117692295A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311810193 2023-12-26
CN2023118101932 2023-12-26

Publications (1)

Publication Number Publication Date
CN117692295A true CN117692295A (en) 2024-03-12

Family

ID=90137151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311842235.0A Pending CN117692295A (en) 2023-12-26 2023-12-28 Gateway networking method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117692295A (en)

Similar Documents

Publication Publication Date Title
US11201814B2 (en) Configuration of networks using switch device access of remote server
US10142342B2 (en) Authentication of client devices in networks
US9813291B2 (en) Shortest path bridging (SPB) configuration of networks using client device access of remote
US20120201246A1 (en) Multicast Traffic Management in a Network Interface
WO2013044821A1 (en) Learning a mac address
CN102801623B (en) Multi-access data transmitting method and device
US9060322B2 (en) Method and system for preventing loops in mesh networks
CN106487583B (en) Method for establishing network connection and local area network system
US20150271016A1 (en) Configuration of networks with server cluster device
EP3849141A1 (en) Stacking-port configuration using zero-touch provisioning
Kärkkäinen et al. Enabling ad-hoc-style communication in public wlan hot-spots
CN112654049A (en) Method for configuring wireless communication coverage extension system and wireless communication coverage extension system for implementing same
CN114172750B (en) Network communication method, device and storage medium based on encryption mechanism
US10911411B2 (en) Extending public WiFi hotspot to private enterprise network
KR20170076064A (en) Method, apparatus and computer program for subnetting of software defined network
JP4844159B2 (en) Wireless device, network, and communication method
CN105188052B (en) A kind of method, system and the wireless access point of access network
CN111163463A (en) Method, device, equipment and storage medium for accessing wireless equipment to router
CN107613033B (en) Distributed virtual local area network implementation system and method suitable for mobile wireless node
CN117692295A (en) Gateway networking method, device, equipment and medium
CN103188662B (en) A kind of method and device verifying WAP (wireless access point)
JP6976199B2 (en) Information processing server and information processing method
CN112738907B (en) Wireless network system
CN108260179B (en) Access point AP access control method and device
JP2005229484A (en) Radio terminal supervisory and control method/program/program recording medium/apparatus/system

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