CN108777722B - Multi-system networking communication method and device, mobile terminal and storage medium - Google Patents

Multi-system networking communication method and device, mobile terminal and storage medium Download PDF

Info

Publication number
CN108777722B
CN108777722B CN201810380593.7A CN201810380593A CN108777722B CN 108777722 B CN108777722 B CN 108777722B CN 201810380593 A CN201810380593 A CN 201810380593A CN 108777722 B CN108777722 B CN 108777722B
Authority
CN
China
Prior art keywords
address
communication
network
communication system
external
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.)
Active
Application number
CN201810380593.7A
Other languages
Chinese (zh)
Other versions
CN108777722A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201810380593.7A priority Critical patent/CN108777722B/en
Publication of CN108777722A publication Critical patent/CN108777722A/en
Application granted granted Critical
Publication of CN108777722B publication Critical patent/CN108777722B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Abstract

The invention provides a multi-system networking communication method, a multi-system networking communication device, a mobile terminal and a storage medium, wherein the method comprises the following steps: when an IP allocation request sent by any communication system is received, forwarding the IP allocation request to a server, sending allocation IP information to the communication system, when an IP address request sent by the communication system or external equipment is received, inquiring a local IP address, and sending the local IP address to a sending end of the IP address request so as to control the sending end to send a data packet to the local IP address; the invention adopts a mode of replacing a target end to carry out MAC address response so as to control the sending end to send the data packet to the local IP address, and the data packet is sent to the communication system corresponding to the target IP address by obtaining the target IP address, thereby realizing the access of external equipment to the communication system under the local area network and facilitating the use of multi-system application programs.

Description

Multi-system networking communication method and device, mobile terminal and storage medium
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a multi-system networking communication method, apparatus, mobile terminal, and storage medium.
Background
With the advancement of science and technology, particularly with the rapid development of new-generation information communication technologies such as mobile internet, internet of things, big data, cloud computing and the like, and the guidance of upper-layer policy directions of the country, from perception of China to the latest internet +, it can be said that China and even the world are undergoing a new technological revolution. The change relates to a wide range of fields, and from industrial control, environmental monitoring, transportation, freight logistics and smart home, the times of everything interconnection can be realized in the near future, and after networking communication among multiple systems is realized, interconnection and intercommunication among multiple systems or between multiple systems and external equipment are required to be realized for realizing the everything interconnection and the smart home.
In the existing multi-system networking communication method, multi-system networking is performed through a router, and networking communication is performed between systems through a local area network.
In the existing multi-system networking communication method, because the IP distributed by each system is a subnet IP, a broadcast domain is only limited in a router, multicast and broadcast cannot be sent out of the router, and external equipment cannot access the system under the local area network, so that the use of application programs of multiple systems is limited.
Disclosure of Invention
Based on the above, the invention provides a multi-system networking communication method, device, mobile terminal and storage medium, which are used for solving the problem that in the prior art, an external device cannot access a system under a local area network.
In a first aspect, the present invention provides a multi-system networking communication method for communication between a plurality of communication systems and an external device, the method comprising:
when an IP allocation request sent by any communication system is received, forwarding the IP allocation request to a server so as to control the server to return allocation IP information, and sending the allocation IP information to the communication system so as to control the allocation of an external network IP address of the communication system;
when an IP address request sent by the communication system or the external equipment is received, a local IP address is inquired, and the local IP address is sent to a sending end of the IP address request, so that the sending end is controlled to send a data packet to the local IP address;
and inquiring a target IP address in the IP address request, and sending the data packet to the target IP address.
According to the multi-system networking communication method, the IP allocation request is forwarded to the server, so that the communication system is allocated to the external network IP address issued by the server, multicast and broadcast in a broadcast domain of the communication system can be sent to an external network, the local IP address is sent to the sending end, the MAC address response is carried out instead of a target end, the sending end is controlled to send the data packet to the local IP address, the data packet is sent to the communication system corresponding to the target IP address through the acquisition of the target IP address, the access of external equipment to the communication system under the local domain network is further achieved, and the use of multi-system application programs is facilitated.
Further, before the step when receiving an IP allocation request issued by any of the communication systems, the method includes:
the communication network interface is respectively in communication connection with the server and each communication system so as to respectively establish an external network and an internal local area network, and respectively control a communication network card of each communication system to respectively generate a communication network interface and a virtual network interface, wherein the communication network interface and the virtual network interface are respectively used for signal communication in the external network and the internal local area network;
respectively distributing a fixed IP to each virtual network port, and storing the corresponding relation among the fixed IP, the virtual network ports, the communication network card and the communication system;
and respectively inquiring the communication MAC address of each communication network card, and respectively carrying out MAC setting on the corresponding virtual network port according to the communication MAC address.
Further, after the step of allocating a fixed IP to each virtual network port, the method further includes:
judging whether the external network and the internal local area network are in the same network segment;
and if so, re-distributing the fixed IP on each virtual network port.
Further, before the step when receiving an IP allocation request issued by any of the communication systems, the method includes:
acquiring local network card data and inquiring a network card marking instruction;
acquiring a networking communication identifier in the network card marking instruction, and matching the networking communication identifier with the network card data;
and marking a local network card obtained by matching the networking communication identifier with the network card data as a control network card, wherein the control network card is used for controlling the forwarding of the IP allocation request and the sending of the data packet.
Further, the method further comprises:
and when the network communication between the control network card and the server is judged to be changed, deleting the corresponding relation between the communication system stored on the control network card and the distributed IP information.
Further, after the step of deleting the correspondence between the communication system and the distribution IP information stored on the control network card, the method further includes:
and when the communication connection with the external network IP address is judged, directly sending the IP allocation request to the external network IP address so as to re-allocate the IP address of the communication system.
Further, the step of querying the target IP address in the IP address request:
respectively acquiring a target MAC address in the IP address request and a locally stored ARP cache record;
and matching the target MAC address with the ARP buffer record to obtain a target IP address.
In a second aspect, the present invention provides a multi-system networking communication apparatus for communication between a plurality of communication systems and an external device, including:
the first allocation module is used for forwarding the IP allocation request to a server when receiving the IP allocation request sent by any communication system so as to control the server to return allocation IP information and send the allocation IP information to the communication system so as to control the allocation of an external network IP address of the communication system;
the query module is used for querying a local IP address when receiving an IP address request sent by the communication system or the external equipment, and sending the local IP address to a sending end of the IP address request so as to control the sending end to send a data packet to the local IP address;
and the sending module is used for inquiring the target IP address in the IP address request and sending the data packet to the target IP address.
The multi-system networking communication device is designed to forward the IP allocation request to the server through the first allocation module so that the communication system is allocated to the external network IP address issued by the server, thereby enabling both multicast and broadcast in the broadcast domain of the communication system to be sent to external networks, sending the local IP address to the design of the sending end through the query module so as to replace a target end to respond to the MAC address, so as to control the sending end to send the data packet to the local IP address, and to obtain the design of the target IP address through the sending module, so as to send the data packet to the communication system corresponding to the target IP address, and further, the access of the external equipment to the communication system under the local area network is realized, and the use of multi-system application programs is facilitated.
In a third aspect, the present invention provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to make the mobile terminal execute the foregoing multi-system networking communication method.
In a fourth aspect, the present invention provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method for multi-system networked communication.
Drawings
Fig. 1 is a flowchart of a multi-system networking communication method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a multi-system networking communication method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a data communication structure between an external device and a communication system according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a multi-system networking communication device according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a multi-system networking communication device according to a fourth embodiment of the present invention;
Detailed Description
In order to facilitate a better understanding of the invention, the invention will be further explained below with reference to the accompanying drawings of embodiments. Embodiments of the present invention are shown in the drawings, but the present invention is not limited to the preferred embodiments described above. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Referring to fig. 1, a flowchart of a multi-system networking communication method for communication between a plurality of communication systems and an external device according to a first embodiment of the present invention is shown, including steps S10 to S30.
Step S10, when receiving IP allocation request sent by any communication system, forwarding the IP allocation request to a server to control the server to return allocation IP information and send the allocation IP information to the communication system;
wherein, before step S10 is implemented, the method comprises:
the method comprises the steps of respectively obtaining information of each communication system (Slave) to form a local area network between the communication systems, selecting a control system (Host) from all the communication systems, wherein the control system is at least provided with two network interfaces, one network interface is used for being connected with an external network, namely being in communication connection with a server (DHCP server) to form external network communication, the other network interface is used for realizing internal network communication between the local area network and the communication systems, and each communication system is at least provided with one network interface used for realizing internal network communication between the local area network and the control system.
Specifically, in this embodiment, the Host runs a DHCP relay service. When the Slave sends a DHCP request to the Host system to apply for the allocation of the external network IP. The Host is used as a DHCP relay and is simulated to be the Host which applies for the IP of the external network from the external network (at the moment, the MAC address is still Slave). When the DHCP server in the external network receives the request, the DHCP server only records that the previous MAC address is the Host, so a new external network IP address is allocated to the Host. And the Host forwards the corresponding Slave, and the Slave is successfully allocated to the IP address of the external network at the moment, so that both the multicast and the broadcast in the broadcast domain of the Host can be sent to the external network.
In addition, it should be noted that, in terms of physical structure, the control system has at least two physical network cards. A network card is accessed to the external network and is physically connected with the external equipment in the same network segment. And the other network card is accessed into the intranet and is physically connected with the communication system inside in the same network segment.
Step S20, when receiving an IP address request sent by the communication system or the external device, querying a local IP address, and sending the local IP address to a sending end of the IP address request, so as to control the sending end to send a data packet to the local IP address;
the Host runs a service of an ARP proxy and is used for realizing data communication between the external equipment and the Slave so that the external equipment can realize access to a system in a local area network;
specifically, when the Slave needs to send data to the external device in the external network, the device MAC address of the external device obtained by ARP query is used according to the external network IP address obtained by being allocated in step S10, and when the IP address request is correspondingly sent according to the device MAC address obtained by the query, the Host responds instead of the gateway of the external device, and the local MAC address of the Host is returned to the corresponding Slave, so that the Slave considers that the Host is the gateway of the external device, and therefore sends a packet to the Host.
Further, in the present embodiment, when the external device in the external network needs to send a packet to the Slave, the communication MAC address of save is queried by ARP, with the external network IP address assigned in step S10. At this time, the Host responds instead of the Slave, and the foreign network device recognizes that the Host is the Slave, and transmits the packet to the Host.
Step S30, querying a target IP address in the IP address request, and sending the data packet to the target IP address. The Host stores the corresponding relationship between the external IP addresses of all Slave and the communication MAC addresses, so that the Host can forward the data packet to the corresponding Slave according to the target IP address, can directly communicate with the equipment in the external network, and can correspondingly forward the data packet to the external equipment according to the target IP address.
In the present embodiment, in terms of a topology, the external IPs of the control system, the communication system, and the external device are in the same network segment, so that compared with an implementation manner of a network bridge in the prior art: the bridge uses the MAC address of the link layer to determine the destination of the packet forwarding, and the present embodiment uses the IP address of the network layer to determine the destination of the packet forwarding.
In this embodiment, the Host is configured to specially interface an external network, forward a packet of the external network to the Slave, and take charge of network behavior control among multiple systems, so that the communication system is assigned to the external network IP address issued by the server by forwarding the IP assignment request to the server, and then multicast and broadcast in a broadcast domain of the communication system can be both sent to the external network, and the local IP address is sent to the sending end so as to replace the target end to perform MAC address response, so as to control the sending end to send the packet to the local IP address, and by obtaining the target IP address, the packet is sent to the communication system corresponding to the target IP address, and then the access of an external device to the communication system under the local network is achieved, the use of multi-system application programs is facilitated.
Referring to fig. 2, a flowchart of a multi-system networking communication method according to a second embodiment of the present invention is shown, where the method includes steps S11 to S71.
Step S11, performing communication connection with the server and each communication system respectively to establish an external network and an internal local area network respectively, and controlling a communication network card of each communication system to generate a communication network port and a virtual network port respectively;
wherein, the communication network port and the virtual network port are respectively used for signal communication in the external network and the internal local area network, specifically, the communication network port is used for applying for external network IP, for applying for external network IP and external communication, after the virtual network port distributes the fixed IP, the virtual network port is used for preventing the influence on the internal local area network when the external network connection condition changes, respectively obtains the information of each communication system (Slave) to form the local area network between the communication system and the communication system, and selects a control system (Host) in all the communication systems, the control system is at least provided with two network interfaces, one is used for being connected with the external network, namely, is in communication connection with a server (DHCP server) to form external network communication, the other is used for realizing intranet communication between the local area network and the communication system, each communication system is at least provided with one network interface, the method is used for realizing intranet communication with the control system in the local area network.
Specifically, when the Host forms an external network and a local network with the DHCP server and all the Slave, a stable communication mechanism is required between the Host and the Slave. In this embodiment, a sub-interface is used to enable a Slave network card to generate a virtual network port (sub-interface), where the virtual network port is used when the Host is connected without an external network, the Host and the Slave can still communicate with each other, and when the Host and the Slave are suddenly connected to the external network during the intranet communication, the original connection cannot be interrupted, and after the external network communication is cut off, the Host and the Slave cannot be interrupted, so that the structural stability between the multi-system networking communications is improved. In addition, it should be noted that, in terms of physical structure, the control system has at least two physical network cards. A network card is accessed to the external network and is physically connected with the external equipment in the same network segment. And the other network card is accessed into the intranet and is physically connected with the communication system inside in the same network segment.
Step S21, respectively allocating a fixed IP to each virtual network port, and storing the corresponding relationship among the fixed IP, the virtual network ports, the communication network card and the communication system;
the method comprises the steps that a Host is used for distributing a fixed IP to each virtual network port, so that the communication connection between the Host and the Slave is facilitated, and the stability of the communication connection between the Host and the Slave is improved;
preferably, after the step of respectively allocating a fixed IP to each virtual network port in step S21, the method further includes:
judging whether the external network and the internal local area network are in the same network segment;
if yes, re-distributing the fixed IP on each virtual network port;
wherein, the manner for re-allocating the fixed IP on each virtual network port may be: and sending intranet broadcast or other triggering mode notification.
Step S31, respectively inquiring the communication MAC address of each communication network card, and respectively carrying out MAC setting on the corresponding virtual network port according to the communication MAC address;
and respectively carrying out MAC setting design on the corresponding virtual network ports according to the communication MAC addresses so as to enable the MAC addresses of the virtual ports to be the same as the MAC addresses of the physical ports on the communication network card, thereby providing the accuracy of the Slave to send data.
Specifically, for example, after the virtual port is generated and the MAC is set, the communication network card of the Slave has two interfaces:
physical interface:
IP address: 10.0.0.3
MAC address: 22:22:22:22:22:22
Virtual interface (subinterface):
IP address: 192.168.0.2
MAC address: 22:22:22:22:22:22.
Step S41, when receiving IP allocation request sent by any communication system, forwarding the IP allocation request to the server to control the server to return allocation IP information, and sending the allocation IP information to the communication system to control the allocation of external network IP address of the communication system;
specifically, in this embodiment, the Host runs a DHCP relay service. When the Slave sends a DHCP request to the Host system to apply for the allocation of the external network IP. The Host is used as a DHCP relay and is simulated to be the Host which applies for the IP of the external network from the external network (at the moment, the MAC address is still Slave). When the DHCP server in the external network receives the request, the DHCP server only records that the previous MAC address is the Host, so a new external network IP address is allocated to the Host. And the Host forwards the corresponding Slave, and the Slave is successfully allocated to the IP address of the external network at the moment, so that both the multicast and the broadcast in the broadcast domain of the Host can be sent to the external network.
Step S51, when receiving an IP address request sent by the communication system or the external device, querying a local IP address, and sending the local IP address to a sending end of the IP address request, so as to control the sending end to send a data packet to the local IP address;
the Host runs a service of an ARP proxy and is used for realizing data communication between the external equipment and the Slave so that the external equipment can realize access to a system in a local area network;
specifically, when the Slave needs to send data to the external device in the external network, the device MAC address of the external device obtained by ARP query is used according to the external network IP address obtained by being allocated in step S10, and when the IP address request is correspondingly sent according to the device MAC address obtained by the query, the Host responds instead of the gateway of the external device, and the local MAC address of the Host is returned to the corresponding Slave, so that the Slave considers that the Host is the gateway of the external device, and therefore sends a packet to the Host.
Further, in the present embodiment, when the external device in the external network needs to send a packet to the Slave, the communication MAC address of save is queried by ARP, with the external network IP address assigned in step S10. At this time, the Host responds instead of the Slave, and the foreign network device recognizes that the Host is the Slave, and transmits the packet to the Host.
Referring to fig. 3, for example: when the external device needs to transmit a packet from 10.0.0.1 to 10.0.0.3, the external device inquires what the IP address of the device with MAC address 22:22:22:22:22 with ARP broadcast, and the Host response is 10.0.0.2, at which time the external device transmits the packet to Host.
Preferably, before step S51, the method includes:
acquiring local network card data and inquiring a network card marking instruction;
the Host acquires data of all local network cards and inquires a network card marking instruction set by a user, wherein the network card marking instruction is used for marking the instructed network cards.
Acquiring a networking communication identifier in the network card marking instruction, and matching the networking communication identifier with the network card data;
marking a local network card obtained by matching the networking communication identifier with the network card data as a control network card, wherein the control network card is used for controlling the forwarding of the IP allocation request and the sending of the data packet;
the control network card is specially used for DHCP relay and ARP proxy in the Host so as to prevent mutual interference between the network cards in the Host, and further, when the control system is additionally connected with other network cards, the other network cards cannot be influenced by the configuration of the scheme, can be normally used, and improves the distribution efficiency of the external network IP address of the Slave, namely the data transmission efficiency between the Slave and external setting.
Step S61, respectively obtaining a target MAC address in the IP address request and a locally stored ARP cache record;
the ARP cache records store the corresponding relation between the communication MAC addresses of all Slave and the IP addresses of the external network;
step S71, matching the target MAC address with the ARP buffer record to obtain a target IP address, and sending the data packet to the target IP address;
please continue to refer to fig. 3, wherein the Host queries the target IP address according to the ARP cache record and the target MAC address stored therein, and specifically, matches the MAC address 22:22:22:22:22:22 with the ARP cache record to obtain the target IP address 10.0.0.3, so that the data packet is forwarded to the Slave network card with the target IP address 10.0.0.3 through the internal network card.
Preferably, the method in this embodiment further includes:
when an IP address shielding instruction is received, inquiring shielding identification carried in the IP address shielding instruction, wherein the shielding identification comprises a shielding internal network and a shielding external network;
when the inquired shielding identification is a shielding external network, acquiring a shielding IP in the IP address shielding instruction, and respectively controlling each communication network card to perform shielding setting aiming at the shielding IP;
when the inquired shielding identification is a shielding internal network, acquiring a shielding MAC address carried in the shielding identification, and matching the shielding MAC address with all the communication MAC addresses;
marking the communication network card obtained by matching the shielding MAC address with all the communication MAC addresses as a shielding network card, acquiring the shielding IP, and controlling the shielding network card to shield the shielding IP;
the design of the shielding identification carried in the IP address shielding instruction is inquired through the Host, so that the Host can manage and control the network access behaviors of the whole multi-system communication architecture by configuring an external network interface and an internal network interface of the Host, such as uplink and downlink flow statistics and control, filtering of a certain malicious IP address and the like.
Preferably, the method in this embodiment further includes:
and when the network communication between the control network card and the server is judged to be changed, deleting the corresponding relation between the communication system stored on the control network card and the distributed IP information.
After the step of deleting the correspondence between the communication system stored on the control network card and the allocation IP information, the method further includes:
when judging that the communication connection with an external network IP address is realized, directly sending the IP allocation request to the external network IP address so as to re-allocate the IP address of the communication system;
specifically, when the Host senses the change of the external network, such as from non-networking to networking, from networking to disconnection, or from wired to wireless, the Host clears the original configuration, and when a new external network IP communication connection exists, the Host re-assists the Slave to allocate a new external network IP address.
The multiple systems in this embodiment refer to a master multiple slave multiple systems. The master system is only one designated system for external communication, i.e., the control system in the present embodiment, and the other internal systems are slave systems, i.e., the communication systems.
When the slave system sends out an IP allocation request, the IP allocation request is forwarded to the master system, and the master system processes and forwards the IP allocation request to the server for external IP allocation, so that the slave system and the master system acquire the IP allocated by the external IP server.
When the external device transmits data to the slave system, the master system first provides the MAC address of the slave system to the external device. When the external device sends data to the MAC address of the slave system, the data is received by the master system and forwarded to the slave system.
When the slave system transmits data to the external device, the master system first provides the MAC address of the external device to the slave system. When data is sent from the system to the MAC address of the external device, the data is received by the host system and forwarded to the external device.
In the embodiment, the main system replaces the external device and the slave system to respond and forward, so that the communication of the main system, the slave system and the external device in the same external IP network segment is realized, and the use of multi-system application programs is facilitated.
In this embodiment, the Host is configured to specially interface an external network, forward a packet of the external network to the Slave, and take charge of network behavior control among multiple systems, so that the communication system is assigned to the external network IP address issued by the server by forwarding the IP assignment request to the server, and then multicast and broadcast in a broadcast domain of the communication system can be both sent to the external network, and the local IP address is sent to the sending end so as to replace the target end to perform MAC address response, so as to control the sending end to send the packet to the local IP address, and by obtaining the target IP address, the packet is sent to the communication system corresponding to the target IP address, and then the access of an external device to the communication system under the local network is achieved, the use of multi-system application programs is facilitated.
Referring to fig. 4, a schematic structural diagram of a multi-system networking communication apparatus 100 according to a third embodiment of the present invention is shown, which is used for communication between multiple communication systems and external devices, and includes:
a first allocating module 10, configured to, when receiving an IP allocation request sent by any of the communication systems, forward the IP allocation request to a server, so as to control the server to return allocation IP information, and send the allocation IP information to the communication system, so as to control allocation of an external network IP address of the communication system;
the query module 20 is configured to query a local IP address when receiving an IP address request sent by the communication system or the external device, and send the local IP address to a sending end of the IP address request, so as to control the sending end to send a data packet to the local IP address;
and the sending module 11 is configured to query a target IP address in the IP address request, and send the data packet to the target IP address.
A virtual network port establishing module 12, configured to perform communication connection with the server and each of the communication systems respectively, so as to establish an external network and an internal local area network respectively, and control a communication network card of each of the communication systems to generate a communication network port and a virtual network port respectively, where the communication network port and the virtual network port are used for signal communication in the external network and the internal local area network respectively; respectively distributing a fixed IP to each virtual network port, and storing the corresponding relation among the fixed IP, the virtual network ports, the communication network card and the communication system; and respectively inquiring the communication MAC address of each communication network card, and respectively carrying out MAC setting on the corresponding virtual network port according to the communication MAC address.
A judging module 17, configured to judge whether the external network and the internal lan are in the same network segment; if so, re-allocating the fixed IP on each virtual network port, where the re-allocating the fixed IP on each virtual network port may be performed in a manner that: and sending intranet broadcast or other triggering mode notification.
The network card marking module 13 is configured to obtain local network card data and query a network card marking instruction; acquiring a networking communication identifier in the network card marking instruction, and matching the networking communication identifier with the network card data; and marking a local network card obtained by matching the networking communication identifier with the network card data as a control network card, wherein the control network card is used for controlling the forwarding of the IP allocation request and the sending of the data packet.
And a data deleting module 14, configured to delete the correspondence between the communication system and the IP information stored in the control network card when it is determined that the network communication with the server is changed.
And the second allocating module 15 is configured to, when it is determined that the communication connection with the external network IP address is established, directly send the IP allocation request to the external network IP address, so as to re-allocate the IP address of the communication system.
The query module 20 includes:
an obtaining unit 21, configured to obtain a target MAC address in the IP address request and an ARP cache record stored locally;
and the matching unit 22 is configured to match the target MAC address with the ARP cache record to obtain a target IP address.
The multi-system networking communication device 100 is designed to forward the IP allocation request to the server through the first allocation module 10, so that the communication system is allocated to the external network IP address issued by the server, thereby enabling both multicast and broadcast in the broadcast domain of the communication system to be sent to external networks, the local IP address is sent to the sender's design by the query module 20, so as to replace the target end to respond the MAC address to control the sending end to send the data packet to the local IP address, and the sending module 11 is used to obtain and design the target IP address, so as to send the data packet to the communication system corresponding to the target IP address, and further, the access of the external equipment to the communication system under the local area network is realized, and the use of multi-system application programs is facilitated.
Referring to fig. 5, a schematic structural diagram of a multi-system networking communication device 100a according to a fourth embodiment of the present invention is shown, where the fourth embodiment is substantially the same as the third embodiment, and a difference therebetween is that the multi-system networking communication device 100a further includes:
the shielding module 16 is configured to query a shielding identifier carried in an IP address shielding instruction when the IP address shielding instruction is received, where the shielding identifier includes a shielding inner network and a shielding outer network; when the inquired shielding identification is a shielding external network, acquiring a shielding IP in the IP address shielding instruction, and respectively controlling each communication network card to perform shielding setting aiming at the shielding IP;
the shielding module 16 is further configured to, when the queried shielding identifier is a shielding intranet, acquire a shielding MAC address carried in the shielding identifier, match the shielding MAC address with all the communication MAC addresses, mark the communication network card obtained by matching the shielding MAC address with all the communication MAC addresses as a shielding network card, acquire the shielding IP, and control the shielding network card to perform shielding setting for the shielding IP.
In this embodiment, by the design of the shielding module 16, the Host can manage and control the network access behavior of the entire multi-system communication architecture, such as statistics and control of uplink and downlink traffic, filtering of a malicious IP address, and the like, by configuring its own extranet interface and intranet interface.
The present embodiment also provides a storage medium having stored thereon a computer program that, when executed, comprises the steps of:
when an IP allocation request sent by any communication system is received, forwarding the IP allocation request to a server so as to control the server to return allocation IP information, and sending the allocation IP information to the communication system so as to control the allocation of an external network IP address of the communication system;
when an IP address request sent by the communication system or the external equipment is received, a local IP address is inquired, and the local IP address is sent to a sending end of the IP address request, so that the sending end is controlled to send a data packet to the local IP address;
and inquiring a target IP address in the IP address request, and sending the data packet to the target IP address. The storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above-described embodiments describe the technical principles of the present invention, and these descriptions are only for the purpose of explaining the principles of the present invention and are not to be construed as limiting the scope of the present invention in any way. Based on the explanations herein, those skilled in the art will be able to conceive of other embodiments of the present invention without inventive effort, which would fall within the scope of the present invention.

Claims (10)

1. A multi-system networking communication method for communication between a plurality of communication systems and an external device, the method comprising:
the communication network interface is respectively in communication connection with a server and each communication system so as to respectively establish an external network and an internal local area network, and respectively controls a communication network card of each communication system to respectively generate a communication network interface and a virtual network interface, wherein the communication network interface and the virtual network interface are respectively used for signal communication in the external network and the internal local area network;
when an IP allocation request sent by any communication system is received, forwarding the IP allocation request to a server so as to control the server to return allocation IP information, and sending the allocation IP information to the communication system so as to control the allocation of an external network IP address of the communication system;
when an IP address request sent by the communication system or the external equipment is received, a local IP address is inquired, and the local IP address is sent to a sending end of the IP address request, so that the sending end is controlled to send a data packet to the local IP address;
and inquiring a target IP address in the IP address request, and sending the data packet to the target IP address.
2. The method of multi-system networking according to claim 1, wherein said step when receiving an IP assignment request from any of said communication systems is preceded by the step of:
respectively distributing a fixed IP to each virtual network port, and storing the corresponding relation among the fixed IP, the virtual network ports, the communication network card and the communication system;
and respectively inquiring the communication MAC address of each communication network card, and respectively carrying out MAC setting on the corresponding virtual network port according to the communication MAC address.
3. The method of multi-system networking according to claim 2, wherein after the step of assigning a fixed IP to each of the virtual network ports, the method further comprises:
judging whether the external network and the internal local area network are in the same network segment;
and if so, re-distributing the fixed IP on each virtual network port.
4. The method of multi-system networking according to claim 1, wherein said step when receiving an IP assignment request from any of said communication systems is preceded by the step of:
acquiring local network card data and inquiring a network card marking instruction;
acquiring a networking communication identifier in the network card marking instruction, and matching the networking communication identifier with the network card data;
and marking a local network card obtained by matching the networking communication identifier with the network card data as a control network card, wherein the control network card is used for controlling the forwarding of the IP allocation request and the sending of the data packet.
5. The method of multi-system networking communications according to claim 4, further comprising:
and when the network communication between the control network card and the server is judged to be changed, deleting the corresponding relation between the communication system stored on the control network card and the distributed IP information.
6. The method according to claim 5, wherein after the step of deleting the correspondence between the communication system and the assigned IP information stored in the control network card, the method further comprises:
and when the communication connection with the external network IP address is judged, directly sending the IP allocation request to the external network IP address so as to re-allocate the IP address of the communication system.
7. The method of multi-system networking according to claim 1, wherein the step of querying the target IP address in the IP address request comprises:
respectively acquiring a target MAC address in the IP address request and a locally stored ARP cache record;
and matching the target MAC address with the ARP buffer record to obtain a target IP address.
8. A multi-system networking communication apparatus for communication between a plurality of communication systems and an external device, comprising:
the virtual network port establishing module is used for respectively carrying out communication connection with the server and each communication system so as to respectively establish an external network and an internal local area network, and respectively controlling a communication network card of each communication system to respectively generate a communication network port and a virtual network port, wherein the communication network port and the virtual network port are respectively used for signal communication in the external network and the internal local area network;
the first allocation module is used for forwarding the IP allocation request to a server when receiving the IP allocation request sent by any communication system so as to control the server to return allocation IP information and send the allocation IP information to the communication system so as to control the allocation of an external network IP address of the communication system;
the query module is used for querying a local IP address when receiving an IP address request sent by the communication system or the external equipment, and sending the local IP address to a sending end of the IP address request so as to control the sending end to send a data packet to the local IP address;
and the sending module is used for inquiring the target IP address in the IP address request and sending the data packet to the target IP address.
9. A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to cause the mobile terminal to perform the method of multi-system networked communication according to any of claims 1 to 7.
10. A storage medium having stored thereon a computer program, characterized in that the program, when being executed by a processor, is adapted to carry out the steps of the method of multi-system networked communication of one of the claims 1 to 7.
CN201810380593.7A 2018-04-25 2018-04-25 Multi-system networking communication method and device, mobile terminal and storage medium Active CN108777722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810380593.7A CN108777722B (en) 2018-04-25 2018-04-25 Multi-system networking communication method and device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810380593.7A CN108777722B (en) 2018-04-25 2018-04-25 Multi-system networking communication method and device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN108777722A CN108777722A (en) 2018-11-09
CN108777722B true CN108777722B (en) 2021-07-16

Family

ID=64026693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810380593.7A Active CN108777722B (en) 2018-04-25 2018-04-25 Multi-system networking communication method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN108777722B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672613B (en) * 2018-12-12 2021-06-18 北京数码视讯软件技术发展有限公司 Self-adaptive access method and device and electronic equipment
CN109819064B (en) * 2019-01-29 2021-11-23 广州视源电子科技股份有限公司 Method for communication between modules, operating system module and conference panel
CN110611897B (en) * 2019-08-12 2023-03-24 北京遥测技术研究所 Shipborne self-organizing network communication system and data analysis and forwarding method thereof
CN112995733B (en) * 2019-12-17 2022-11-08 海信视像科技股份有限公司 Display device, device discovery method and storage medium
CN112995113B (en) * 2019-12-17 2022-06-14 海信视像科技股份有限公司 Display device, port control method and storage medium
CN111372102B (en) * 2020-02-06 2022-10-28 视联动力信息技术股份有限公司 Data transmission method, device, terminal equipment and storage medium
CN111385631B (en) * 2020-03-04 2022-05-24 海信视像科技股份有限公司 Display device, communication method and storage medium
WO2021184291A1 (en) * 2020-03-19 2021-09-23 西安诺瓦星云科技股份有限公司 Data transmission method, apparatus and system
CN113032659B (en) * 2021-03-12 2023-08-04 北京百度网讯科技有限公司 Information processing method for device information, electronic device and medium
CN113194017B (en) * 2021-04-08 2022-08-16 广州极飞科技股份有限公司 Device communication control method, device, system and storage medium
CN115334042A (en) * 2021-04-25 2022-11-11 中国移动通信有限公司研究院 Data transmission method, device and system and communication equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515882A (en) * 2008-02-20 2009-08-26 深圳华为通信技术有限公司 Method, device and system for communication between local area network and public network
CN102404417A (en) * 2011-11-09 2012-04-04 深圳市共进电子股份有限公司 Method and device for accessing external network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101459692A (en) * 2008-12-26 2009-06-17 深圳市迪威新软件技术有限公司 NAT traversing system and method for meeting television
CN102082837A (en) * 2010-12-31 2011-06-01 华为技术有限公司 Method and device for distributing public network address for IP (Internet protocol) terminal
CN102209124B (en) * 2011-06-08 2014-03-12 杭州华三通信技术有限公司 Method for communication between private network and public network and network address translation equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515882A (en) * 2008-02-20 2009-08-26 深圳华为通信技术有限公司 Method, device and system for communication between local area network and public network
CN102404417A (en) * 2011-11-09 2012-04-04 深圳市共进电子股份有限公司 Method and device for accessing external network

Also Published As

Publication number Publication date
CN108777722A (en) 2018-11-09

Similar Documents

Publication Publication Date Title
CN108777722B (en) Multi-system networking communication method and device, mobile terminal and storage medium
CN102859973B (en) Method, apparatus and system for address resolution
JP2016540448A (en) Virtual extended LAN communication method, apparatus, and system
CN102143247B (en) Method for allocating and configuring address, address allocation server and host machine
CN105245629B (en) Host communication method based on DHCP and device
CA2510053C (en) Power saving in wireless packet based networks
CN106559292A (en) A kind of broad band access method and device
US10785158B1 (en) System and method for provisioning both IPV4 and IPV6 internet service and load balancer service
CN101442425A (en) Gateway management method, address distribution method and apparatus, system
CN101883158A (en) Method and client for acquiring VLAN (Virtual Local Area Network) IDs (Identifiers) and network protocol addresses
CN112654049B (en) Method, system, node and medium for configuring a wireless communication coverage extension system
CN102118453B (en) Method, service device, client and communication system for automatic configuration of IP address
CN108429824B (en) Address allocation method and device
CN105471748A (en) Application shunting method and device
CN110098988B (en) Method and system for processing internet protocol packets
CN112714027B (en) Method and system for accessing terminal equipment of Internet of things to gateway
CN105472048A (en) Address allocating method, information aggregation method and related equipment
CN106878481B (en) Method, device and system for acquiring Internet Protocol (IP) address
CN111385373B (en) Fast duplicate address detection for range of link local addresses
CN103763195A (en) Method and device for transmitting message
CN108667957B (en) IP address allocation method, first electronic device and first server
KR102219270B1 (en) Method for processing traffic based on sdn
CN104104749A (en) Method and device for allocating tunnel IP addresses
CN106878479B (en) Address allocation method and device
EP3503484A1 (en) Message transmission method, device and network 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
GR01 Patent grant
GR01 Patent grant