CN109039849B - Multi-device common networking method, storage medium and multi-device all-in-one machine - Google Patents

Multi-device common networking method, storage medium and multi-device all-in-one machine Download PDF

Info

Publication number
CN109039849B
CN109039849B CN201810938044.7A CN201810938044A CN109039849B CN 109039849 B CN109039849 B CN 109039849B CN 201810938044 A CN201810938044 A CN 201810938044A CN 109039849 B CN109039849 B CN 109039849B
Authority
CN
China
Prior art keywords
equipment
network
local area
sharing
bridging
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
CN201810938044.7A
Other languages
Chinese (zh)
Other versions
CN109039849A (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.)
Hangzhou Kaizhi Technology Co ltd
Original Assignee
Hangzhou Kaizhi 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 Kaizhi Technology Co ltd filed Critical Hangzhou Kaizhi Technology Co ltd
Priority to CN201810938044.7A priority Critical patent/CN109039849B/en
Publication of CN109039849A publication Critical patent/CN109039849A/en
Application granted granted Critical
Publication of CN109039849B publication Critical patent/CN109039849B/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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L12/462LAN interconnection over a bridge based backbone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L12/462LAN interconnection over a bridge based backbone
    • H04L12/4625Single bridge functionality, e.g. connection of two networks over a single bridge
    • 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/5053Lease time; Renewal aspects

Abstract

The invention discloses a method for realizing common networking among multiple devices in an all-in-one machine, wherein the method comprises the following steps: monitoring that the external network interface of the hub is not connected with a network signal by first equipment and/or second equipment in the all-in-one machine; judging whether a first device in the all-in-one machine is connected with a network signal; if the first equipment is connected with a network signal through an external network cable or a wireless network, the first equipment calls the network sharing bridging function of the network card of the first equipment, and the network card is set as a gateway of a network sharing bridging local area network; and after the network card is set as a gateway of a network sharing bridging local area network by the first equipment, the first equipment informs the second equipment of IP updating to obtain an updated IP, so that the second equipment can surf the internet. In the embodiment of the invention, the network can be simultaneously and safely connected among the multiple devices in the all-in-one machine. In addition, the invention also provides a computer storage medium and a multi-device all-in-one machine.

Description

Multi-device common networking method, storage medium and multi-device all-in-one machine
Technical Field
The invention relates to the technical field of multi-device all-in-one machines, in particular to a method for realizing common networking among multiple devices in an all-in-one machine, a storage medium and a multi-device all-in-one machine
Background
The multi-device all-in-one machine integrates multiple devices, such as a device running a Windows system or a linux system and a device running an Android system, and the modules are independent from each other and are generally connected through an MCU (Micro Control Unit).
If one module has a networking requirement, a network cable needs to be externally connected to an Ethernet port of the module, and the module is connected to the router; if all the modules need to be networked, connecting a plurality of network cables to the corresponding modules from the router; or after one device is connected with the network, a shared wireless network is constructed through the network sharing function of the device, and the SSID, the encryption type and the password of the shared wireless network are informed to the other device, so that the other device can be connected with the internet through the shared wireless network.
The second device surfs the internet through the shared wireless network, the shared wireless network may have a risk of being invaded, and after the second device is connected to the wireless network, the second device does not know whether to connect the shared wireless network or other wireless networks, so that a user is inconvenient to perform corresponding security operations on the second device; if the first device is connected with an external network signal through a wireless network, and then a shared wireless network is correspondingly constructed, at this time, no matter the first device is on the internet or the second device is on the internet through the shared wireless network, only half of the broadband can be actually used, the internet speed is greatly influenced, signal interference among the wireless networks can be generated, and the internet experience of a user is seriously influenced.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for realizing the common networking among multiple devices in an all-in-one machine, a storage medium and the all-in-one machine of the multiple devices.
In order to solve the above technical problem, an embodiment of the present invention provides a method for implementing common networking among multiple devices in a unified device, where the method includes:
monitoring that the external network interface of the hub is not connected with a network signal by first equipment and/or second equipment in the all-in-one machine;
judging whether a first device in the all-in-one machine is connected with a network signal; if the first equipment is connected with a network signal through an external network cable or a wireless network, the first equipment calls a network sharing bridging function of a network card of the first equipment, and the network card is set as a gateway of a network sharing bridging local area network;
and after the network card is set as a gateway of a network sharing bridging local area network by the first equipment, the first equipment informs the second equipment of IP updating to obtain an updated IP, so that the second equipment can surf the internet.
Optionally, the first device is a device running a Windows system or a linux system, and the second device is a device running an Android system; or the like, or, alternatively,
the first equipment is equipment for operating an Android system, and the second equipment is equipment for operating a Windows system or a linux system.
Optionally, when the first device runs an Android system;
the first device calls a network sharing bridging function of a network card of the first device, sets the network card as a gateway of a network sharing bridging local area network, and comprises the following steps:
the first equipment sets network forwarding in the equipment, and forwards network signals connected with the wireless network card to the wired network card;
the first equipment calls a network sharing bridging function of a wired network card of the first equipment, sets a network sharing bridging local area network of the wired network card and establishes the network sharing bridging local area network;
after the network sharing bridging local area network is established, the wired network card is set as a gateway of the network sharing bridging local area network.
Optionally, when the first device runs a Windows system or a linux system;
the first device calls a network sharing bridging function of a network card of the first device, sets the network card as a gateway of a network sharing bridging local area network, and comprises the following steps:
the first equipment calls an ICS function of a wired network card of the first equipment, sets a network sharing bridging local area network of the wired network card and establishes the network sharing bridging local area network;
after the network sharing bridging local area network is established, the wired network card is set as a gateway of the network sharing bridging local area network.
Optionally, the method further includes:
and after the second equipment obtains the updated IP, the first equipment and the second equipment perform updated IP exchange to realize mutual communication between the first equipment and the second equipment.
Optionally, the method further includes:
when a first device in the all-in-one machine is not connected with a network signal, the first device and the second device respectively carry out IP privatization and respectively obtain respective privatized IP;
and respectively obtaining respective privatized IP at the first equipment and the second equipment, and carrying out updated IP exchange between the first equipment and the second equipment to realize mutual communication between the first equipment and the second equipment.
Optionally, the informing of the second device of IP update to obtain an updated IP is performed, so as to implement internet access of the second device, and the method includes:
the second equipment automatically updates after obtaining the notification of the first equipment, automatically obtains an IP address and realizes the surfing of the second equipment; or the like, or, alternatively,
and after obtaining the notification of the first equipment, the second equipment performs manual updating and manual allocation to obtain an IP address, so that the second equipment can surf the internet.
In addition, an embodiment of the present invention further provides a method for implementing common networking among multiple devices in an all-in-one machine, where the method includes:
monitoring a network signal connected with an external network interface of the hub by first equipment and/or second equipment in the all-in-one machine;
judging whether the current first equipment is provided with a gateway of a network sharing bridging local area network or not; if the current first equipment sets a gateway of the network sharing bridged local area network, the first equipment cancels the gateway of the network sharing bridged local area network;
the first equipment and the second equipment respectively update the IP, respectively acquire the updated IP and realize the surfing of the first equipment and the second equipment;
and the first equipment and the second equipment perform updated IP exchange to realize the mutual communication between the first equipment and the second equipment.
Optionally, the method further includes:
the current first equipment is not provided with a gateway of a network sharing bridging local area network, and the first equipment and the second equipment update the IP through an automatic acquisition mode to realize the surfing of the first equipment and the second equipment; or the like, or, alternatively,
and the first equipment and the second equipment update the IP through a manual setting mode, so that the first equipment and the second equipment surf the internet.
In addition, an embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, where the computer program is executed by a processor, and is configured to implement the method for mutual networking among multiple devices described in any one of the foregoing.
In addition, an embodiment of the present invention further provides an all-in-one machine with multiple devices, where the all-in-one machine includes: the concentrator is connected with the first equipment and the second equipment through network cables respectively;
monitoring that the external network interface of the hub is not connected with a network signal by first equipment and/or second equipment in the all-in-one machine;
judging whether a first device in the all-in-one machine is connected with a network signal; if the first equipment is connected with a network signal through an external network cable or a wireless network, the first equipment calls a network sharing bridging function of a network card of the first equipment, and the network card is set as a gateway of a network sharing bridging local area network;
and after the network card is set as a gateway of a network sharing bridging local area network by the first equipment, the first equipment informs the second equipment of IP updating to obtain an updated IP, so that the second equipment can surf the internet.
In addition, an embodiment of the present invention further provides an all-in-one machine with multiple devices, where the all-in-one machine includes: the concentrator is connected with the first equipment and the second equipment through network cables respectively;
monitoring a network signal connected with an external network interface of the hub by first equipment and/or second equipment in the all-in-one machine;
judging whether the current first equipment is provided with a gateway of a network sharing bridging local area network or not; if the current first equipment sets a gateway of the network sharing bridged local area network, the first equipment cancels the gateway of the network sharing bridged local area network;
the first equipment and the second equipment respectively update the IP, respectively acquire the updated IP and realize the surfing of the first equipment and the second equipment;
and the first equipment and the second equipment perform updated IP exchange to realize the mutual communication between the first equipment and the second equipment.
In the embodiment of the invention, when the hub is monitored to be not connected with a network signal and the first device is judged to be connected with the network signal, the first device carries out bridging setting through a network card of the first device and sets the network card as a gateway of the network sharing bridging local area network, the first device sends the gateway of the network sharing bridging local area network to the second device, and the second device redistributes the IP according to the gateway of the network sharing bridging local area network to realize the surfing of the second device. The bridging is established on the network card of the first device, and the second device bridges to safely surf the internet, so that the multiple devices of the multi-device all-in-one machine are connected with the network together, the internet surfing speed of the first device and the internet surfing speed of the second device are guaranteed, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for implementing common networking between multiple devices in a unified device according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for implementing common networking between multiple devices in a unified device according to another embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for implementing a common networking method between multiple devices in a unified device according to another embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for implementing common networking between multiple devices in a unified machine according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural composition diagram of the all-in-one machine in the embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example (b):
referring to fig. 1, fig. 1 is a schematic flowchart illustrating a method for implementing common networking among multiple devices in a unified device according to an embodiment of the present invention.
As shown in fig. 1, a method for implementing common networking between multiple devices in a unified machine, the method includes:
s11: monitoring that the external network interface of the hub is not connected with a network signal by first equipment and/or second equipment in the all-in-one machine;
in a specific implementation process, the all-in-one machine at least comprises a first device, a second device and a hub, wherein the first device is a device for running a Windows system or a linux system, and the second device is a device for running an Android system; or, the first device is a device running an Android system, and the second device is a device running a Windows system or a linux system.
When the first device is a device running a Windows system or a linux system and the second device is a device running an Android system, the first device is internally connected with a network cable, or a USB-to-RJ 45 connector is connected with a network cable to be connected with the hub, and the second device is internally connected with a network cable to be connected with the hub through an RJ 45.
The concentrator is provided with an external network port for connecting an external network cable, and when the external port is connected with the external network cable and the external network cable can be connected with a network signal, the concentrator transmits the network signal to two devices to realize one network cable, and a plurality of devices surf the internet; the first device, the second device and the hub form a local area network.
Specifically, the first device and/or the second device monitors whether the hub is connected with a network signal through an external network interface in real time; when the first device and/or the second device in the all-in-one machine monitors that the external network interface of the hub is not connected with the network signal, the next operation is required.
S12: judging whether a first device in the all-in-one machine is connected with a network signal; if the first equipment is connected with a network signal through an external network cable or a wireless network, the first equipment calls a network sharing bridging function of a network card of the first equipment, and the network card is set as a gateway of a network sharing bridging local area network;
in the specific implementation process of the invention, when the first device and/or the second device does not monitor the external network interface connection network signal of the hub, whether the first device in the all-in-one machine is connected with the network signal is judged, and when the first device is judged to be connected with the network signal through an external network cable (wired) or a wireless network, the first device calls the network sharing bridging function of the network card of the first device, and the network card is set as a gateway of a network sharing bridging local area network.
In the specific implementation process of the invention, when the first device is a device running a Windows system or a linux system; the first device calls a network sharing bridging function of a network card of the first device, sets the network card as a gateway of a network sharing bridging local area network, and comprises the following steps: the first equipment calls an ICS function of a wired network card of the first equipment, sets a network sharing bridging local area network of the wired network card and establishes the network sharing bridging local area network; after the network sharing bridging local area network is established, the wired network card is set as a gateway of the network sharing bridging local area network.
Specifically, when the first device is a device running a Windows system or a linux system, the first device has three network cards, which are a built-in wireless network card, a built-in USB network card, and an external RJ45 network card.
Specifically, in the specific implementation process of the present invention, when the first device is a device running a Windows system or a linux system, the wired network card bridged by the first device is a USB network card.
The process of setting network bridging includes changing adapter settings in my computer- > attribute- > control panel- > network and sharing center- > selecting the network adapter which can be currently connected to the internet, taking the current connection with WiFi for example: right key attribute- > share- > tick allows other network users to connect (N) through the computer's Internet connection, while selecting which network card the home network connection is through.
In the specific implementation process, a wired network card is selected to be arranged to establish the network sharing bridging local area network, and after the network sharing bridging local area network is established, the wired network is arranged as a gateway of the network sharing bridging local area network.
In the specific implementation process of the invention, when the first device is a device operating an Android system; the first device calls a network sharing bridging function of a network card of the first device, sets the network card as a gateway of a network sharing bridging local area network, and comprises the following steps: the first equipment sets network forwarding in the equipment, and forwards network signals connected with the wireless network card to the wired network card; the first equipment calls a network sharing bridging function of a wired network card of the first equipment, sets a network sharing bridging local area network of the wired network card and establishes the network sharing bridging local area network; after the network sharing bridging local area network is established, the wired network card is set as a gateway of the network sharing bridging local area network.
Specifically, when the first device is a device for operating an Android system, the first device is provided with two network cards, namely an internal wireless network card and an external RJ45 network card.
Specifically, in the specific implementation process of the present invention, when the first device is a device operating an Android system, the wired network card that is bridged by the first device is an RJ45 network card.
When the first equipment is equipment for operating an Android system, the first equipment is a network signal connected in a wireless network mode; setting network forwarding in an Android system, forwarding a WiFi network signal connected to an RJ45 network card, calling a network sharing function in the Android system, setting a network sharing bridging local area network of the RJ45 network card, and establishing the network sharing bridging local area network; after establishing the network sharing bridging local area network, setting the RJ45 network card as a gateway of the network sharing bridging local area network; the setting mode can be realized by the following codes:
cmds.push_back("ip rule del oif"+ap.interface);
cmds.push_back("ip rule del iif"+ap.interface);
cmds.push_back("ip route del"+dhcp.network+"/24dev"+ap.interface+"table 97");
cmds.push_back("ip route add"+dhcp.network+"/24proto static scope link dev"+ap.interface+"table 97");
cmds.push_back("ip rule add oif"+ap.interface+"pref 13000table 97");
cmds.push_back("ip rule add iif"+ap.interface+"pref 18000table eth0");
cmds.push_back("ip rule add iif"+ap.interface+"pref 18000table wlan0");
cmds.push_back("echo 1>/proc/sys/net/ipv4/ip_forward");
cmds.push_back("iptables-t nat-A natctrl_nat_POSTROUTING-o eth0-j MASQUERADE");
cmds.push_back("iptables-A natctrl_FORWARD-i eth0-o"+ap.interface+"-m state--state ESTABLISHED,RELATED-g natctrl_tether_counters");
cmds.push_back("iptables-A natctrl_FORWARD-i"+ap.interface+"-o eth0-m state--state INVALID-j DROP");
cmds.push_back("iptables-A natctrl_FORWARD-i"+ap.interface+"-o eth0-g natctrl_tether_counters");
cmds.push_back("iptables-A natctrl_tether_counters-i"+ap.interface+"-o eth0-j RETURN");
cmds.push_back("iptables-A natctrl_tether_counters-i eth0-o"+ap.interface+"-j RETURN");
cmds.push_back("iptables-t nat-A natctrl_nat_POSTROUTING-o wlan0-j MASQUERADE");
cmds.push_back("iptables-A natctrl_FORWARD-i wlan0-o"+ap.interface+"-m state--state ESTABLISHED,RELATED-g natctrl_tether_counters");
cmds.push_back("iptables-A natctrl_FORWARD-i"+ap.interface+"-o wlan0-m state--state INVALID-j DROP");
cmds.push_back("iptables-A natctrl_FORWARD-i"+ap.interface+"-o wlan0-g natctrl_tether_counters");
cmds.push_back("iptables-A natctrl_tether_counters-i"+ap.interface+"-o wlan0-j RETURN");
cmds.push_back("iptables-A natctrl_tether_counters-i wlan0-o"+ap.interface+"-j RETURN");
cmds.push_back("iptables-D natctrl_FORWARD-j DROP");
cmds.push_back("iptables-A natctrl_FORWARD-j DROP");
s13: and after the network card is set as a gateway of a network sharing bridging local area network by the first equipment, the first equipment informs the second equipment of IP updating to obtain an updated IP, so that the second equipment can surf the internet.
In a specific implementation process, after the network card is set as a gateway of a network sharing bridging local area network by the first device, the first device informs the second device of the set bridging network through a communication path between the first device and the second device, and the second device updates the IP; the IP updating can be performed in a mode of automatic updating, automatic IP acquisition, or manual updating by a user, manual IP setting and the like.
Specifically, the informing of the second device of IP update to obtain an updated IP to enable the second device to surf the internet includes: the second equipment automatically updates after obtaining the notification of the first equipment, automatically obtains an IP address and realizes the surfing of the second equipment; or after the second device obtains the notification of the first device, the second device performs manual update, and manually allocates the IP address to realize the internet access of the second device.
Specifically, the first device informs the second device of the need for IP update and some small data amount communication, including interactive IP and the like, through an MCU connected with the second device; besides the MCU, the MCU can also be directly connected through a data transmission line, so that the communication of small data volume is directly realized.
In the embodiment of the invention, when the hub is monitored to be not connected with a network signal and the first device is judged to be connected with the network signal, the first device carries out bridging setting through a network card of the first device and sets the network card as a gateway of the network sharing bridging local area network, the first device sends the gateway of the network sharing bridging local area network to the second device, and the second device redistributes the IP according to the gateway of the network sharing bridging local area network to realize the surfing of the second device. The bridging is established on the network card of the first device, and the second device bridges to safely surf the internet, so that the multiple devices of the multi-device all-in-one machine are connected with the network together, the internet surfing speed of the first device and the internet surfing speed of the second device are guaranteed, and the user experience is improved.
Example (b):
referring to fig. 2, fig. 2 is a flowchart illustrating a method for implementing common networking among multiple devices in a unified device according to another embodiment of the present invention.
As shown in fig. 2, a method for implementing common networking between multiple devices in a unified machine, the method includes:
s21: monitoring that the external network interface of the hub is not connected with a network signal by first equipment and/or second equipment in the all-in-one machine;
s22: judging whether a first device in the all-in-one machine is connected with a network signal; if not, entering S25;
s23: the first equipment calls a network sharing bridging function of a network card of the first equipment, and the network card is set as a gateway of a network sharing bridging local area network;
s24: after the first device sets the network card as a gateway of a network sharing bridging local area network, the first device informs the second device of IP updating to obtain an updated IP and realize the surfing of the second device;
specifically, the specific implementation manners of S21, S22, S23 and S24 may refer to the above embodiments, and are not described herein again.
S25: when a first device in the all-in-one machine is not connected with a network signal, the first device and the second device respectively carry out IP privatization and respectively obtain respective privatized IP;
in a specific implementation process, when neither the first device nor the second device is connected to the network signal, that is, the first device fails to detect that the router allocates the IP to the first device and the second device, the first device and the second device privatize an IP by default, for example: 169.254.133.25, the first two digits are fixed and the last two digits are random.
S26: and respectively obtaining respective privatized IP at the first equipment and the second equipment, and carrying out IP exchange between the first equipment and the second equipment to realize mutual communication between the first equipment and the second equipment.
Specifically, the first device and the second device inform the default privatized IP of the devices to the other side through the hub, and after the first device and the second device know the mutual IP, the first device, the second device and the hub form a local area network in the all-in-one machine, so that big data communication and access between the first device and the second device in the all-in-one machine are realized, and mutual communication and access are realized.
In the specific embodiment of the invention, the network card of the first device is bridged, and the second device is bridged to safely surf the internet, so that the multiple devices of the multi-device all-in-one machine are connected with the network together, the internet surfing speeds of the first device and the second device are ensured, and the user experience is improved; when any one of the devices in the device all-in-one machine is not connected with the network, IP exchange can be carried out through the concentrator, the function of mutual communication among the devices in the all-in-one machine is achieved, and the local area network in the all-in-one machine is constructed.
Example (b):
referring to fig. 3, fig. 3 is a flowchart illustrating a method for implementing common networking among multiple devices in a unified device according to another embodiment of the present invention.
As shown in fig. 3, a method for implementing common networking between multiple devices in a unified machine, the method includes:
s31: monitoring a network signal connected with an external network interface of the hub by first equipment and/or second equipment in the all-in-one machine;
in a specific implementation process, the all-in-one machine at least comprises a first device, a second device and a hub, wherein the first device is a device for running a Windows system or a linux system, and the second device is a device for running an Android system; or, the first device is a device running an Android system, and the second device is a device running a Windows system or a linux system.
When the first device is a device running a Windows system or a linux system and the second device is a device running an Android system, the first device is internally connected with a network cable, or a USB-to-RJ 45 connector is connected with a network cable to be connected with the hub, and the second device is internally connected with a network cable to be connected with the hub through an RJ 45.
The concentrator is provided with an external network port for connecting an external network cable, and when the external port is connected with the external network cable and the external network cable can be connected with a network signal, the concentrator transmits the network signal to two devices to realize one network cable, and a plurality of devices surf the internet; the first device, the second device and the hub form a local area network.
Specifically, the first device and/or the second device monitors whether the hub is connected with a network signal through an external network interface in real time; after the first device and/or the second device in the all-in-one machine monitors the external network interface connection network signal of the hub, the next operation is required.
S32: judging whether the current first equipment is provided with a gateway of a network sharing bridging local area network or not; if the current first equipment sets a gateway of the network sharing bridged local area network, the first equipment cancels the gateway of the network sharing bridged local area network;
in the specific implementation process of the invention, when monitoring the connection network signal of the external network interface of the hub, whether the current first device is provided with a gateway of a network sharing bridged local area network or not needs to be judged; and when judging that the current first equipment is provided with the gateway of the network sharing bridging local area network, the first equipment cancels the gateway of the network sharing bridging local area network.
Specifically, whether network bridging exists in equipment in the all-in-one machine or not is judged, network sharing internet surfing is carried out by adopting the network bridging, and the specific judgment mode is that when an external network interface of the concentrator is connected with a network signal, whether the equipment in the all-in-one machine can carry out external network communication or not is judged, if yes, the equipment in the all-in-one machine has the network bridging, and if not, the equipment does not have the network bridging.
When the network bridging exists in the internal equipment of the all-in-one machine, the equipment for providing the network bridging closes the network bridging and closes the network sharing function.
S33: the first equipment and the second equipment respectively update the IP, respectively acquire the updated IP and realize the surfing of the first equipment and the second equipment;
in the specific implementation process of the invention, after the first device in the all-in-one machine closes the network sharing, the second device can not be connected with the external network through the bridge connection of the first device, so as to realize communication; at this time, the first device and the second device in the all-in-one machine respectively perform IP updating operation with the network card connected with the concentrator, after the updating operation is performed again, the first device and the second device respectively obtain the updated IP, and the first device and the second device respectively surf the internet through the respectively updated IP, so that extranet connection and communication with the outside are realized.
S34: and the first equipment and the second equipment perform updated IP exchange to realize the mutual communication between the first equipment and the second equipment.
In the specific implementation process of the invention, after the first device and the second device in the all-in-one machine realize external communication, the first device and the second device exchange IP with each other, and a local area network in the all-in-one machine is formed among the first device, the second device and the hub, so that the functions of mutual access, communication and the like are realized between the first device and the second device.
In the embodiment of the invention, the all-in-one machine equipment can realize the communication of all equipment in the all-in-one machine to the external network through one external network interface in the hub, and can construct a local area network among the equipment in the all-in-one machine through the hub to realize the mutual communication, access and other operations among the equipment in the all-in-one machine in the local area network.
Example (b):
referring to fig. 4, fig. 4 is a flowchart illustrating a method for implementing common networking among multiple devices in a unified device according to a fourth embodiment of the present invention.
As shown in fig. 4, a method for implementing common networking between multiple devices in a unified machine, the method includes:
s41: first equipment and/or second equipment in all-in-one machine monitors external network interface connection network signals of hub
S42: judging whether the current first equipment is provided with a gateway of a network sharing bridging local area network or not; if not, the process goes to S46;
s43: the first equipment cancels a gateway of a network sharing bridged local area network;
s44: the first equipment and the second equipment respectively update the IP, respectively acquire the updated IP and realize the surfing of the first equipment and the second equipment;
s45: the first device and the second device perform updated IP exchange to realize the mutual communication between the first device and the second device;
in the implementation of the present invention, the specific implementation manners of S41, S42, S43, S44 and S45 may refer to the above embodiments, and are not described herein again.
S46: the first equipment and the second equipment update the IP through an automatic acquisition mode, so that the first equipment and the second equipment surf the internet; or the first device and the second device update the IP through a manual setting mode, so that the first device and the second device surf the internet.
In the specific implementation process of the invention, after the concentrator is connected with the network signal through the external interface, under the condition that no bridge connection exists between the devices in the all-in-one machine, the first device and the second device in the all-in-one machine can automatically acquire IP for updating the IP at the first time, so that the first device and the second device can communicate with the outside and surf the internet; or when the concentrator connects the external interface with the network signal, and under the condition that no bridging connection exists between the devices in the all-in-one machine, the first device and the second device in the all-in-one machine can update the IP in a mode of manually setting the IP at the first time, so that the first device and the second device can communicate with the outside, and the internet surfing is realized.
In the embodiment of the invention, the all-in-one machine equipment can realize the communication of all equipment in the all-in-one machine to the external network through one external network interface in the hub, and can construct a local area network among the equipment in the all-in-one machine through the hub to realize the mutual communication, access and other operations among the equipment in the all-in-one machine in the local area network.
Example (b):
in an embodiment of the present invention, a computer-readable storage medium is provided, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer-readable storage medium implements the network sharing method between multiple devices according to any one of the foregoing embodiments. The computer-readable storage medium includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random AcceSS memories), EPROMs (EraSable Programmable Read-Only memories), EEPROMs (Electrically EraSable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards. That is, a storage device includes any medium that stores or transmits information in a form readable by a device (e.g., a computer, a cellular phone), and may be a read-only memory, a magnetic or optical disk, or the like.
An embodiment of the present invention further provides a computer application program, which stores a computer program thereon, and is characterized in that when executed by a processor, the program implements any one of the above-mentioned methods for jointly networking among multiple devices.
Referring to fig. 5, fig. 5 is a schematic structural composition diagram of an all-in-one machine in the embodiment of the present invention.
As shown in fig. 5, an all-in-one machine of multiple devices includes: the system comprises a first device 11, a second device 12 and a hub 13, wherein the hub 13 is connected with the first device 11 and the second device 12 through network cables respectively; the first device 11 and/or the second device 12 in the all-in-one machine monitors that the external network interface of the hub 13 is not connected with a network signal; judging whether the first equipment 11 in the all-in-one machine is connected with a network signal; if the first device 11 is connected with a network signal through an external network cable or a wireless network, the first device 11 calls a network sharing bridging function of a network card of the first device, and the network card is set as a gateway of a network sharing bridging local area network; after the first device 11 sets the network card as a gateway of a network sharing bridged local area network, the second device 12 is informed to perform IP update to obtain an updated IP, so that the second device 12 can surf the internet.
In another embodiment, an all-in-one machine for multiple devices includes: a first device 11, a second device 12, and a hub 13, which is connected to the first device 11 and the second device 12 through network cables, respectively; the first device 11 and/or the second device 12 in the all-in-one machine monitors an external network interface connection network signal of the hub 13; judging whether the current first device 11 is provided with a gateway of a network sharing bridged local area network; if the current first device 11 sets a gateway of the tethering bridged lan, the first device 11 cancels the gateway of the tethering bridged lan; the first device 11 and the second device 12 respectively perform IP update, and respectively obtain updated IP, so as to implement internet access of the first device 11 and the second device 12; the first device 11 and the second device 12 perform updated IP exchange, so as to implement mutual communication between the first device 11 and the second device 12.
In the embodiment of the invention, when the hub is monitored to be not connected with a network signal and the first device is judged to be connected with the network signal, the first device carries out bridging setting through a network card of the first device and sets the network card as a gateway of the network sharing bridging local area network, the first device sends the gateway of the network sharing bridging local area network to the second device, and the second device redistributes the IP according to the gateway of the network sharing bridging local area network to realize the surfing of the second device. The bridging is established on the network card of the first device, and the second device bridges to safely surf the internet, so that the multiple devices of the multi-device all-in-one machine are connected with the network together, the internet surfing speed of the first device and the internet surfing speed of the second device are guaranteed, and the user experience is improved.
In the embodiment of the invention, the all-in-one machine equipment can realize the communication of all equipment in the all-in-one machine to the external network through one external network interface in the hub, and can construct a local area network among the equipment in the all-in-one machine through the hub to realize the mutual communication, access and other operations among the equipment in the all-in-one machine in the local area network.
In addition, the above detailed descriptions of the method for common networking among multiple devices, the storage medium, and the multi-device all-in-one machine provided in the embodiments of the present invention are provided, and a specific example should be used herein to explain the principle and the implementation of the present invention, and the descriptions of the above embodiments are only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for implementing co-networking between multiple devices within a unified engine, the method comprising:
monitoring that the external network interface of the hub is not connected with a network signal by first equipment and/or second equipment in the all-in-one machine;
judging whether a first device in the all-in-one machine is connected with a network signal; if the first equipment is connected with a network signal through an external network cable or a wireless network, the first equipment calls the network sharing bridging function of the wired network card of the first equipment, and the wired network card is set as a gateway of a network sharing bridging local area network;
after the first device sets the wired network card as a gateway of a network sharing bridging local area network, the first device informs the second device of IP updating to obtain an updated IP and realize the surfing of the second device;
the method further comprises the following steps:
when a first device in the all-in-one machine is not connected with a network signal, the first device and the second device respectively carry out IP privatization and respectively obtain respective privatized IP;
and respectively obtaining respective privatized IP at the first equipment and the second equipment, and carrying out IP exchange between the first equipment and the second equipment to realize mutual communication between the first equipment and the second equipment.
2. The method according to claim 1, wherein the first device is a device running a Windows system or a linux system, and the second device is a device running an Android system; or the like, or, alternatively,
the first equipment is equipment for operating an Android system, and the second equipment is equipment for operating a Windows system or a linux system.
3. The method for the common networking among the multiple devices according to claim 2, wherein when the first device is a device running an Android system;
the first device calls a network sharing bridging function of a wired network card of the first device, sets the wired network card as a gateway of a network sharing bridging local area network, and comprises the following steps:
the first equipment sets network forwarding in the equipment, and forwards network signals connected with the wireless network card to the wired network card;
the first equipment calls a network sharing bridging function of a wired network card of the first equipment, sets a network sharing bridging local area network of the wired network card and establishes the network sharing bridging local area network;
after the network sharing bridging local area network is established, the wired network card is set as a gateway of the network sharing bridging local area network.
4. The method for mutual networking among multiple devices according to claim 2, wherein when the first device is a device running a Windows system or a linux system;
the first device calls a network sharing bridging function of a wired network card of the first device, sets the wired network card as a gateway of a network sharing bridging local area network, and comprises the following steps:
the first equipment calls an ICS function of a wired network card of the first equipment, sets a network sharing bridging local area network of the wired network card and establishes the network sharing bridging local area network;
after the network sharing bridging local area network is established, the wired network card is set as a gateway of the network sharing bridging local area network.
5. The method for mutual networking among multiple devices according to claim 1, further comprising:
and after the second equipment obtains the updated IP, the first equipment and the second equipment perform updated IP exchange to realize mutual communication between the first equipment and the second equipment.
6. The method according to claim 1, wherein the informing of the second device of IP update to obtain an updated IP to enable the second device to surf the internet comprises:
the second equipment automatically updates after obtaining the notification of the first equipment, automatically obtains an IP address and realizes the surfing of the second equipment; or the like, or, alternatively,
and after obtaining the notification of the first equipment, the second equipment performs manual updating and manual allocation to obtain an IP address, so that the second equipment can surf the internet.
7. A method for implementing co-networking between multiple devices within a unified engine, the method comprising:
monitoring a network signal connected with an external network interface of the hub by first equipment and/or second equipment in the all-in-one machine;
judging whether the current first equipment is provided with a gateway of a network sharing bridging local area network or not; if the current first equipment sets a gateway of the network sharing bridged local area network, the first equipment cancels the gateway of the network sharing bridged local area network;
the first equipment and the second equipment respectively update the IP, respectively acquire the updated IP and realize the surfing of the first equipment and the second equipment;
the first device and the second device perform updated IP exchange to realize the mutual communication between the first device and the second device;
the method further comprises the following steps:
the current first equipment is not provided with a gateway of a network sharing bridging local area network, and the first equipment and the second equipment update the IP through an automatic acquisition mode to realize the surfing of the first equipment and the second equipment; or the like, or, alternatively,
and the first equipment and the second equipment update the IP through a manual setting mode, so that the first equipment and the second equipment surf the internet.
8. A computer storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements a method for mutual networking between multiple devices according to any one of claims 1 to 7.
9. An all-in-one machine of multiple devices, characterized in that, the all-in-one machine includes: the concentrator is connected with the first equipment and the second equipment through network cables respectively;
monitoring that the external network interface of the hub is not connected with a network signal by first equipment and/or second equipment in the all-in-one machine;
judging whether a first device in the all-in-one machine is connected with a network signal; if the first equipment is connected with a network signal through an external network cable or a wireless network, the first equipment calls the network sharing bridging function of the wired network card of the first equipment, and the wired network card is set as a gateway of a network sharing bridging local area network;
after the first device sets the wired network card as a gateway of a network sharing bridging local area network, the first device informs the second device of IP updating to obtain an updated IP and realize the surfing of the second device;
when a first device in the all-in-one machine is not connected with a network signal, the first device and the second device respectively carry out IP privatization and respectively obtain respective privatized IP;
and respectively obtaining respective privatized IP at the first equipment and the second equipment, and carrying out IP exchange between the first equipment and the second equipment to realize mutual communication between the first equipment and the second equipment.
10. An all-in-one machine of multiple devices, characterized in that, the all-in-one machine includes: the concentrator is connected with the first equipment and the second equipment through network cables respectively;
monitoring a network signal connected with an external network interface of the hub by first equipment and/or second equipment in the all-in-one machine;
judging whether the current first equipment is provided with a gateway of a network sharing bridging local area network or not; if the current first equipment sets a gateway of the network sharing bridged local area network, the first equipment cancels the gateway of the network sharing bridged local area network;
the first equipment and the second equipment respectively update the IP, respectively acquire the updated IP and realize the surfing of the first equipment and the second equipment;
the first device and the second device perform updated IP exchange to realize the mutual communication between the first device and the second device;
the current first equipment is not provided with a gateway of a network sharing bridging local area network, and the first equipment and the second equipment update the IP through an automatic acquisition mode to realize the surfing of the first equipment and the second equipment; or the like, or, alternatively,
and the first equipment and the second equipment update the IP through a manual setting mode, so that the first equipment and the second equipment surf the internet.
CN201810938044.7A 2018-08-16 2018-08-16 Multi-device common networking method, storage medium and multi-device all-in-one machine Active CN109039849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810938044.7A CN109039849B (en) 2018-08-16 2018-08-16 Multi-device common networking method, storage medium and multi-device all-in-one machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810938044.7A CN109039849B (en) 2018-08-16 2018-08-16 Multi-device common networking method, storage medium and multi-device all-in-one machine

Publications (2)

Publication Number Publication Date
CN109039849A CN109039849A (en) 2018-12-18
CN109039849B true CN109039849B (en) 2021-07-09

Family

ID=64630734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810938044.7A Active CN109039849B (en) 2018-08-16 2018-08-16 Multi-device common networking method, storage medium and multi-device all-in-one machine

Country Status (1)

Country Link
CN (1) CN109039849B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405367B (en) * 2020-03-11 2022-04-05 海信视像科技股份有限公司 Method for network sharing of system component based on multi-network switching scene and display equipment
CN112583661B (en) * 2020-12-02 2022-09-02 广州朗国电子科技股份有限公司 Method and device for sharing different networks, storage medium and all-in-one machine equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694080A (en) * 2005-06-02 2005-11-09 北京凌创超胜科技有限公司 Embedded network sharing device installed in mainframe

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888337B (en) * 2014-02-28 2017-06-13 广州视睿电子科技有限公司 The networking method and multisystem all-in-one of multisystem all-in-one
CN107017915A (en) * 2017-03-27 2017-08-04 广州视源电子科技股份有限公司 A kind of equipment and its method of work for realizing shared by multiple systems wireless network
CN107682162A (en) * 2017-10-13 2018-02-09 广州视源电子科技股份有限公司 Electronic equipment, network share method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694080A (en) * 2005-06-02 2005-11-09 北京凌创超胜科技有限公司 Embedded network sharing device installed in mainframe

Also Published As

Publication number Publication date
CN109039849A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN106605387B (en) Node, system and method for WAN control failover agents for vHGWs
EP2530900B1 (en) Network security parameter generation and distribution
US11445386B2 (en) Distributed Wi-Fi network visualization and troubleshooting
US9173117B2 (en) Enhancing a mobile backup channel to address a node failure in a wireline network
US8341289B2 (en) System and method for communication in a wireless mobile ad-hoc network
CN103812728B (en) A kind of network diagnosis method, system and router
CN110089089B (en) Network access method and equipment
KR101909400B1 (en) Method and system for managing network traffic
US10420155B2 (en) Distributed Wi-Fi setup systems and methods
CN110505316A (en) The distribution method and wireless routing device of internet protocol address
CN106470170B (en) Network switching method and device
CN109039849B (en) Multi-device common networking method, storage medium and multi-device all-in-one machine
JP2011188358A (en) Vpn device and ip communication apparatus
CN104184708A (en) Method of inhabiting MAC address attack in EVI (Ethernet Virtualization Interconnection) network and ED (edge device)
CN103220283B (en) The method of network share, equipment and system
CN106413127A (en) Method and system for connecting relay device with remote network management server, and the relay device
JP2011211490A (en) Vpn device, ip communication apparatus, and server device
US20230336377A1 (en) Packet forwarding method and apparatus, and network system
CN104869118B (en) A kind of method and system for realizing DDoS defence based on dynamic tunneling technique
CN107124478A (en) Network communication method, device and server
CN113438159B (en) Transmission method and device of segmented routing strategy and network transmission system
Cisco Configuring Interfaces
Cisco Configuring Interfaces
CN109548177B (en) Large-scale WiFi network management system and method
Cisco Configuring Interfaces

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