Networking method and device between cloud computer and clients in local area network

By creating network namespaces and virtual Ethernet pairs in the router, configuring IP addresses and routing rules, the communication problem between the cloud and LAN devices is solved, achieving efficient traffic management and data forwarding, optimizing data transmission paths, and reducing network latency.

CN120692114BActive Publication Date: 2026-02-27QUANXUN HUIJU NETWORK TECH BEIJING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511188071.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2026-02-27
Estimated Expiration
2045-08-25

AI Technical Summary

Technical Problem

In cloud computing environments, the connection between cloud resources and local area network resources is isolated, which restricts data flow. How to effectively interconnect local networks and cloud services to ensure smooth and efficient data flow remains a technical challenge that needs to be solved.

Method used

By creating network namespaces and virtual Ethernet pairs in the router, configuring IP addresses and routing rules, and combining port splitting and routing forwarding rules, efficient traffic management and dynamic data forwarding between cloud computers and clients within the local area network can be achieved.

Benefits of technology

It enables flexible management and isolation of traffic in different network environments without adding extra equipment, optimizes data transmission paths, reduces network latency, and improves data flow efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120692114B_ABST
    Figure CN120692114B_ABST
Patent Text Reader

Abstract

The embodiment of the disclosure belongs to the technical field of wireless network, and particularly relates to a networking method and device between a cloud computer and a client in a local area network, which comprises the following steps: creating a network namespace and a virtual Ethernet pair in a router, and initializing a network environment; receiving a routing resource access request sent by the cloud computer, and forwarding the routing resource access request to a local area network interface or a wide area network interface through the virtual Ethernet pair; and receiving a data request sent by the client in the local area network, and forwarding the data request to the cloud computer through the wide area network interface and the virtual Ethernet pair. The high-efficiency forwarding mode of the virtual Ethernet pair makes the resource access and request in the cloud computing environment be able to switch between the local network and the cloud network more efficiently, and be able to adapt to the demand of large-scale distributed application.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of wireless network, in particular, to a networking method between a cloud computer and a client in a local area network, an apparatus and a computer readable storage medium storing a computer program. BACKGROUND

[0002] With the rapid development of cloud computing and virtualization technology, cloud services, especially cloud desktop services such as Ali Shadow, provide users with efficient and flexible remote desktop experience. The demand for data communication between cloud resources and local area network (LAN) devices is increasing, especially in terms of remote work, virtualization services and LAN device management. In the cloud computing environment, there is often isolation between cloud resources and local area network resources, which limits data flow. How to effectively interconnect local network and cloud services to ensure smooth and efficient data flow is still a technical problem to be solved. SUMMARY

[0003] Embodiments described herein provide a networking method between a cloud computer and a client in a local area network, an apparatus and a computer readable storage medium storing a computer program, which creates a virtual local area network, a network namespace and a virtual Ethernet interface, and combines port splitting and routing forwarding rules to solve the communication problem between the cloud and the local area network device, and to achieve efficient traffic management and dynamic data forwarding.

[0004] According to a first aspect of the present disclosure, a networking method between a cloud computer and a client in a local area network is provided, comprising: creating a network namespace and a virtual Ethernet pair in a router, initializing a network environment; receiving a routing resource access request issued by the cloud computer, forwarding the routing resource access request to a local area network interface or a wide area network interface through the virtual Ethernet pair; receiving a data request issued by the client in the local area network, forwarding the data request to the cloud computer through the wide area network interface and the virtual Ethernet pair.

[0005] In some embodiments of the present disclosure, creating a network namespace and a virtual Ethernet pair in a router, initializing a network environment comprises: creating a network namespace in the router, the network namespace is used to isolate network interfaces; creating two virtual Ethernet pairs, setting two virtual network interfaces of the virtual Ethernet pair in different network namespaces respectively; configuring IP addresses for each virtual Ethernet interface and starting all interfaces; and configuring default routes and network address translation rules in the network namespace.

[0006] In some embodiments of the present disclosure, receiving the routing resource access request issued by the cloud computer and forwarding the routing resource access request to the local area network interface or the wide area network interface through the virtual Ethernet pair comprises: creating a virtual local area network interface on the local router, adding a virtual Ethernet interface to the virtual local area network interface, and starting the virtual local area network interface; receiving and unpacking the network request issued by the cloud computer through the shadow plug-in, and forwarding the network request to the virtual local area network interface through the virtual Ethernet pair; and determining the forwarding path of the data packet according to the destination address of the network request.

[0007] In some embodiments of the present disclosure, determining the forwarding path of the data packet according to the destination address of the network request comprises: if the target of the request is an external network resource, forwarding through the wide area network interface to the external network; and if the target of the request is an internal network resource, forwarding through the local area network interface into the internal network.

[0008] In some embodiments of the present disclosure, receiving the routing resource access request issued by the cloud computer and forwarding the routing resource access request to the local area network interface or the wide area network interface further comprises: setting a port splitting rule for the traffic of the wide area network interface, and selecting different wide area network lines for forwarding according to the port number or protocol of the request.

[0009] In some embodiments of the present disclosure, receiving the data request issued by the client in the local area network and forwarding the data request to the cloud computer through the wide area network interface and the virtual Ethernet pair comprises: creating a virtual bridge interface, and binding a virtual Ethernet interface to the virtual bridge interface; configuring a port splitting rule for the routing, and distributing different types of traffic to specified target ports of the wide area network; sending the traffic of the wide area network interface to the network namespace, and continuing to forward to the shadow plug-in according to the configured routing rule; and based on the transparent proxy service of the shadow plug-in, forwarding the data packet to the cloud computer after encapsulation processing.

[0010] According to a second aspect of the present disclosure, a networking device between a cloud computer and a client in a local area network is provided. The device comprises at least one processor; and at least one memory storing a computer program. When the computer program is executed by the at least one processor, the device is caused to: create a network namespace and a virtual Ethernet pair in a router, and initialize a network environment; receive a routing resource access request issued by the cloud computer, and forward the routing resource access request to the local area network interface or the wide area network interface through the virtual Ethernet pair; and receive a data request issued by the client in the local area network, and forward the data request to the cloud computer through the wide area network interface and the virtual Ethernet pair.

[0011] According to a third aspect of the present disclosure, a computer-readable storage medium storing a computer program is provided, wherein the computer program, when executed by a processor, implements the steps of the networking method between a cloud computer and a client in a local area network according to the first aspect of the present disclosure.

[0012] The networking method and device between the cloud computer and the client in the local area network according to the embodiments of the present disclosure can flexibly manage and isolate the traffic in different network environments by introducing the network namespace and the virtual Ethernet pair in the router, so that the network topology is more flexible, and the traffic crossing or mutual interference between different networks is effectively prevented. The cloud computer and the client in the local area network can flexibly forward data requests through the wide area network interface or the local area network interface, so that the resources can be reasonably allocated without increasing additional complex devices, thereby optimizing the data transmission path, reducing the network delay, and improving the data flow efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below. It should be noted that the drawings described below only relate to some embodiments of the present disclosure, but not limit the present disclosure, wherein:

[0014] Figure 1 is a networking system architecture schematic diagram between the Ali shadowless and the iKuai router according to the embodiments of the present disclosure;

[0015] Figure 2 is an exemplary flow chart of the networking method between the cloud computer and the client in the local area network according to the embodiments of the present disclosure;

[0016] Figure 3 is a data flow diagram of the cloud computer accessing the routing resource according to the embodiments of the present disclosure;

[0017] Figure 4 is a data flow diagram of the client accessing the cloud computer resource according to the embodiments of the present disclosure;

[0018] Figure 5 is a schematic block diagram of the networking device between the cloud computer and the client in the local area network according to the embodiments of the present disclosure.

[0019] It should be noted that the elements in the drawings are schematic and not drawn to scale. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, but not all the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative labor also belong to the scope of protection of the present disclosure.

[0021] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this subject matter belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the specification and relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein. Additionally, terms such as "first" and "second" are used merely to distinguish one component (or portion of a component) from another.

[0022] Ali Shadow is a service that transfers computing resources and applications to the cloud through virtual desktop technology. In this way, users can access computing resources in the cloud through a browser or other terminal device without installing and running computationally intensive applications locally. Compared with traditional desktop virtualization solutions, Ali Shadow improves user experience by optimizing cloud desktop performance and providing seamless connectivity. iKuai router is a soft router that supports multiple network configurations, i.e., it implements traditional routing functions through software, and is widely used in various network architectures, providing rich traffic control, port shunting, routing configuration, and other functions suitable for enterprise-level or home network construction and management. By correctly configuring the iKuai router, users can achieve fine control of network traffic and optimize data forwarding paths.

[0023] Figure 1 is a networking system architecture diagram between Ali Shadow and iKuai router according to an embodiment of the present disclosure. Referring to Figure 1 , the iKuai router runs the Ali Shadow plug-in, which is used to process traffic encapsulation and forwarding. Terminal devices (terminal device 1, terminal device 2, etc.) can access Ali Shadow cloud computers (cloud computer 1, cloud computer 2, cloud computer 3, etc.) through the iKuai router. All hardware resources of Ali Shadow are centrally deployed in the cloud data center. The present embodiment aims to realize the interconnection and intercommunication between the cloud computer and the local router, ensure that the cloud computer accesses external networks and terminal devices in the local area network (LAN) through the WAN port of the local router, and terminal devices in the local area network can access the cloud computer through port shunting rules, ensure the correct forwarding of data flow between different networks, and avoid traffic conflicts.

[0024] To further illustrate the embodiments of the present disclosure, Figure 2 an exemplary flowchart of a networking method between a cloud computer and a client in a local area network according to an embodiment of the present disclosure is shown. In Figure 2 , at block S202, a network namespace and a virtual Ethernet pair are created in the router, and the network environment is initialized.

[0025] First, a network namespace is created in the router, for example, by the command ip netns add NS1, a network namespace named NS1 is created. The network namespace can isolate different network configurations, such as IP addresses, routing rules, etc., so that the network configurations in each namespace do not interfere with each other.

[0026] Then, two virtual Ethernet pairs are created, and the two virtual network interfaces of the virtual Ethernet pair are set in different network namespaces respectively. The virtual Ethernet pair is a pair of paired virtual network interfaces, which functions like a pipe, with data being transmitted from one end to the other end.

[0027] According to one embodiment of the present disclosure, two pairs of virtual interfaces are created: veth0 / veth1 and veth2 / veth3. The commands are as follows:

[0028] ip link add veth0 type veth peer name veth1

[0029] ip link add veth2 type veth peer name veth3

[0030] ip link set veth1 netns NS1

[0031] ip link set veth2 netns NS1

[0032] Among them, veth0 and veth1 are the first pair of interfaces, veth0 is connected to the network environment of the router, and veth1 is configured into the network namespace NS1. veth2 and veth3 are the second pair of interfaces, veth2 is set into the namespace NS1, and veth3 is connected to the network environment of the router. This means that veth1 and veth2 will act as network interfaces within the namespace NS1, and no longer as interfaces on the router.

[0033] IP addresses are configured for each virtual Ethernet interface, and all interfaces are started. Specifically, first, IP addresses are configured for veth0 and veth3 on the router:

[0034] # Configure IP address for veth0 on the router

[0035] ip addr add 10.20.20.1 / 24 dev veth0

[0036] ip link set veth0 up

[0037] # Configure IP address for veth3 on the router

[0038] ip addr add 10.30.20.1 / 24 dev veth3

[0039] ip link set veth3 up

[0040] Next, configure IP addresses for interfaces veth1 and veth2 within namespace NS1:

[0041] # Configure IP address for veth1 in namespace NS1

[0042] ip netns exec NS1 ip addr add 10.20.20.2 / 24 dev veth1

[0043] ip netns exec NS1 ip link set veth1 up

[0044] # Configure IP address for veth2 in namespace NS1

[0045] ip netns exec NS1 ip addr add 10.30.20.2 / 24 dev veth2

[0046] ip netns exec NS1 ip link set veth2 up

[0047] veth0 and veth1 are configured on the same subnet (10.20.20.0 / 24), ensuring they can communicate directly. veth2 and veth3 are configured on the same subnet (10.30.20.0 / 24), also ensuring they can communicate.

[0048] To ensure data is correctly forwarded between different network interfaces, configure default routes and network address translation rules within the network namespaces. First, configure a default route for the network interfaces within namespace NS1, enabling traffic within NS1 to be forwarded through the veth2 interface to the veth3 interface of the router:

[0049] # Configure default route within namespace NS1

[0050] ip netns exec NS1 ip route add default via 10.30.20.1 dev veth2

[0051] The routing rule indicates that any traffic originating from within NS1 will be forwarded through the veth2 interface to the veth3 interface of the router if the destination is not within NS1 (i.e., to the external network). 10.30.20.1 is the IP address of the interface on the router that communicates with the namespace.

[0052] Next, configure the NAT (Network Address Translation) rule to ensure that devices within the namespace can access the external network through the router. Use the following command to configure the NAT translation on the router:

[0053] # Configure the NAT translation rule to ensure proper forwarding of traffic

[0054] iptables -t nat -A POSTROUTING -o veth3 -j MASQUERADE

[0055] The NAT translation rule indicates that when traffic from NS1 enters the router's veth3 interface through veth2, the source IP is translated to the IP address of veth3, ensuring that the traffic can correctly pass through the external network.

[0056] After completing the above configuration, you can check the interface and routing configuration using the following commands:

[0057] # View the status of network interfaces on the router

[0058] ip addr show

[0059] # View the status of network interfaces within the namespace NS1

[0060] ip netns exec NS1 ip addr show

[0061] # View the routing configuration on the router

[0062] ip route show

[0063] # View the routing configuration within the namespace

[0064] ip netns exec NS1 ip route show

[0065] With these commands, the IP address and routing rules are configured for the interfaces within the network namespace, ensuring that traffic can be correctly forwarded and communicated with the external network. By configuring the NAT rule, it ensures that the devices in the internal network can access the external network through the external network interface.

[0066] Subsequently, in block S104, a routing resource access request issued by the cloud computer is received, and the routing resource access request is forwarded to the local area network interface or the wide area network interface through the virtual Ethernet pair.

[0067] First, on the local router, a virtual local area network interface is created, a virtual Ethernet interface is added to the virtual local area network interface, and the virtual local area network interface is started. For example, add the virtual Ethernet interface veth3 to the created virtual local area network interface lan2:

[0068] ip link add lan2 type bridge

[0069] ip link set veth3 master lan2

[0070] ip link set lan2 up

[0071] Wherein, lan2 is the created virtual local area network interface, which is used to connect multiple virtual interfaces together to form a virtual network. veth3 establishes a connection with lan2 interface to ensure that data can be transmitted to the virtual local area network.

[0072] When the cloud computer or other clients issue network requests, the network request issued by the cloud computer is received and unpacked through the shadowless plug-in, and the network request is forwarded to the virtual local area network interface through the virtual Ethernet pair. Assuming that the shadowless plug-in sends a request through the virtual Ethernet interface veth0, the request is forwarded through the network namespace NS1 and sent to lan2 to enter the target network. According to the destination address of the network request, the forwarding path of the data packet is determined. If the target of the request is an external network resource, it is forwarded to the external network through the wide area network interface; if the target of the request is an internal network resource, it is forwarded through the local area network interface and enters the internal network.

[0073] For external network access, port splitting rules can be set for the traffic of the wide area network interface, and different wide area network lines are selected for forwarding according to the port number or protocol of the request:

[0074] #iKuai internal port splitting implementation, first mark connmark, then mark the line skbmark based on connmark

[0075] iptables -t mangle -A STREAM_IPPORT_NEW -p tcp -m multiport --sports80,443 -j NTH_CONNMARK --set-mark 6000001

[0076] ik_cntl new_tc mark_rule add id 6000001 connmark 6000001 skbmark10001

[0077] # According to the mark to select WAN port line to forward

[0078] ip rule add fwmark 10001 table wan1

[0079] ip route add default via 192.168.1.1 dev wan1 table wan1

[0080] Among them, the iptables is configured with port shunt rules, and the traffic accessing ports 80 and 443 is marked, and the traffic is directed to a specific WAN port (for example, wan1) for forwarding according to the mark. The ip rule add is used to route specific traffic (such as traffic from the internal network 10.20.20.0 / 24) to a specific routing table (table wan1 in this case). The ip route add is used to configure the routing of different WAN ports, ensuring that different traffic is forwarded according to the port shunt rules to select the appropriate line.

[0081] Figure 3 is a data flow diagram of cloud computer access routing resources according to an embodiment of the present disclosure. Referring to Figure 3As shown, data flow 1 represents a request from the Ali Shadow Cloud computer, data flow 2 represents the unpacking of the request by the Shadow plug-in, and the normal network request is sent to veth0. Data flow 3 represents forwarding through the NS1 space and sending to lan2. This means that the data packet is forwarded through the interface veth2 in the namespace NS1 and finally sent to the lan2 interface, which is a bridge device of the internal network, connecting veth2 and the external network. Data flow 4 represents the selection of the route, if it is an external network address, it is normally forwarded from the WAN port, if it is an internal network resource, it is forwarded from the LAN port, ensuring that the data packet reaches the target resource through the internal network. Data flow 5 represents forwarding to the WAN port, and the router can configure port splitting rules to select specific WAN port lines for forwarding. In order to optimize routing and load balancing, port splitting of WAN port traffic can be performed, that is, according to the port number or protocol of the request, the router can select different WAN port lines for forwarding.

[0082] In block S106, a data request from a client in the local area network is received, and the data request is forwarded to the cloud computer through the wide area network interface and the virtual Ethernet.

[0083] First, a virtual bridge interface is created, and a virtual Ethernet interface is bound to the virtual bridge interface. For example, a virtual bridge interface wan99 is created, and a virtual Ethernet interface veth0 is added to the bridge:

[0084] #! / bin / bash

[0085] interface=wan99

[0086] # Create a virtual bridge interface

[0087] brctl addbr $interface

[0088] # Add veth0 interface to the bridge interface

[0089] brctl addif $interface veth0

[0090] # Start the bridge interface

[0091] ifconfig $interface up

[0092] # Add routing rules to ensure data forwarding through the WAN port

[0093] iproute_ipt_rule_add $interface

[0094] brctl addif wan99 veth0

[0095] Then, configure the port shunting rule of the route to assign different types of traffic to the specified wide-area network target port:

[0096] # iKuai internal port shunting implementation, first mark connmark, then mark the line skbmark based on connmark

[0097] iptables -t mangle -A STREAM_IPPORT_NEW -p tcp -m multiport --sports80,443 -j NTH_CONNMARK --set-mark 6000002

[0098] ik_cntl new_tc mark_rule add id 6000002 connmark 6000002 skbmark10002

[0099] # Select WAN port line for forwarding according to the mark

[0100] ip rule add fwmark 10002 table wan99

[0101] ip route add default via 192.168.1.1 dev wan99 table wan99

[0102] When the shunting rule is configured, send the wide-area network interface traffic to the network namespace, and continue forwarding to the shadow plug-in according to the configured routing rule. After the data stream enters the wan99 interface, it is forwarded to the veth1 interface in the network namespace NS1:

[0103] ip netns exec NS1 ip link set veth1 up

[0104] ip netns exec NS1 ip route add default via 10.10.10.1 dev veth1

[0105] Once the traffic enters the namespace NS1, it continues to be forwarded according to the configured routing rules, and the specific traffic enters the proxy service program of the Shadowless plug-in:

[0106] #! / bin / bash

[0107] # Set rules in the PREROUTING chain to direct traffic to the Morty chain

[0108] iptables -t mangle -A PREROUTING -i veth3 -j Morty

[0109] # In the Morty chain, forward TCP traffic through TPROXY to the proxy service

[0110] iptables -t mangle -A Morty -i veth3 -p tcp -j TPROXY --on-ip127.0.0.1 --on-port 5004 --tproxy-mark $markid

[0111] # Perform the same operation for UDP traffic

[0112] iptables -t mangle -A Morty -i veth3 -p udp -j TPROXY --on-ip127.0.0.1 --on-port 5004 --tproxy-mark $markid

[0113] The TPROXY rule of iptables is used to capture incoming TCP and UDP traffic and forward it to the local proxy service (such as 127.0.0.1:5004) for processing. The Morty chain is a chain configured to capture and process specific traffic, and tproxy-mark is used to mark the traffic and ensure that it is processed correctly. Finally, through the transparent proxy service of the Shadowless plug-in, the packet is encapsulated and forwarded to the cloud computer. Ali Shadowless Service provides virtual desktop resources to clients according to request content.

[0114] Figure 4 is a data flow diagram of a client accessing cloud computer resources according to embodiments of the present disclosure. Referring to Figure 4As shown, data flow 1 represents a request from a LAN PC. In data flow 2, the user configures port routing rules to route the specified traffic to the designated WAN port. Data flow 3 represents traffic from the WAN interface being sent to veth1 in the NS1 namespace. Data flow 4 represents the data flow being forwarded through the NS1 namespace. Data flow 5 represents specific traffic entering the proxy service program of the Wuying plugin. Data flow 6 represents the data packet being encapsulated and processed by the proxy service of the Wuying plugin before being sent to Alibaba Wuying. The entire process begins with a request from a terminal device within the LAN, goes through port routing, data forwarding to the NS1 namespace, encapsulation and proxy service processing by the Wuying plugin, and finally sends the data request to Alibaba Wuying Cloud.

[0115] Figure 5 This is a schematic block diagram of a networking device between a cloud computer and a client within a local area network, according to embodiments of the present disclosure. Figure 5 As shown, the device 500 may include a processor 510 and a memory 520 storing a computer program. When the computer program is executed by the processor 510, the device 500 is made capable of performing actions such as... Figure 2 The steps of the method are shown. In one example, device 500 can be a computer device or a cloud computing node. Device 500 can create a network namespace and a virtual Ethernet pair in a router to initialize the network environment; receive routing resource access requests from the cloud computer and forward the routing resource access requests to the LAN interface or WAN interface via the virtual Ethernet pair; receive data requests from clients within the LAN and forward the data requests to the cloud computer via the WAN interface and the virtual Ethernet pair.

[0116] In embodiments of this disclosure, device 500 can create a network namespace in a router, the network namespace being used to isolate network interfaces; create two virtual Ethernet pairs, setting the two virtual network interfaces of the virtual Ethernet pairs in different network namespaces; configure an IP address for each virtual Ethernet interface and start all interfaces; and configure default routes and network address translation rules in the network namespace.

[0117] In the embodiments of this disclosure, the device 500 can create a virtual local area network (VLAN) interface on a local router, add a virtual Ethernet interface to the VLAN interface, and start the VLAN interface; receive and unpack network requests sent from the cloud computer through the Wuying plugin, forward the network requests to the VLAN interface via the virtual Ethernet pair; and determine the forwarding path of the data packets according to the destination address of the network requests.

[0118] In the embodiments of this disclosure, the device 500 can set port routing rules for the traffic of the wide area network interface, and select different wide area network lines for forwarding according to the requested port number or protocol.

[0119] In the embodiments of the present disclosure, the device 500 can create a virtual bridge interface, bind a virtual Ethernet interface to the virtual bridge interface, configure a port splitting rule of a route to distribute different types of traffic to a specified wide area network target port, send traffic of the wide area network interface to the network namespace, continue forwarding to the shadowless plug-in according to the configured routing rule, and forward the packet to the cloud computer after encapsulation processing by the transparent proxy service of the shadowless plug-in.

[0120] In the embodiments of the present disclosure, the processor 510 can be, for example, a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a processor based on a multi-core processor architecture, etc. The memory 520 can be any type of memory implemented using data storage technology, including but not limited to random access memory, read-only memory, semiconductor-based memory, flash memory, disk storage, etc.

[0121] In addition, in the embodiments of the present disclosure, the device 500 can also include an input device 530, such as a keyboard, a mouse, etc. In addition, the device 500 can also include an output device 540, such as a display, etc.

[0122] In other embodiments of the present disclosure, a computer readable storage medium storing a computer program is also provided, wherein the computer program can implement the steps of the networking method between the cloud computer and the client in the local area network when executed by a processor. Figure 2 The cloud computer and the client in the local area network are shown.

[0123] In summary, according to the networking method and device between the cloud computer and the client in the local area network according to the embodiments of the present disclosure, by introducing the network namespace and the virtual Ethernet pair in the router, the traffic in different network environments can be flexibly managed and isolated, the network topology is more flexible, and the cross or mutual interference of traffic between different networks is effectively prevented. The cloud computer and the client in the local area network can flexibly forward data requests through the wide area network interface or the local area network interface, can reasonably allocate resources without increasing additional complex devices, thereby optimizing the data transmission path, reducing network delay, and improving data flow efficiency.

[0124] The diagrams of the flowcharts and block diagrams in the drawings show the architecture, functionality, and operation of possible implementations of apparatuses and methods according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams can represent a module, a segment, or a portion of code which comprises one or more executable instructions for implementing the specified logical functions. In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession can in fact be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or acts or combinations thereof, or can be implemented by a combination of dedicated hardware and computer instructions.

[0125] Unless the context clearly indicates otherwise, as used herein and in the appended claims, the singular form "a," "an," and "the" include plural references unless the context clearly dictates otherwise. Accordingly, the use of the articles "a," "an," and "the" as well as grammatical changes in the context of this document are understood to be taken as indicative of a particular terminology and should not be taken as limiting. Similarly, the words "comprise," "comprises," and "comprising," and the like, when used in the context of this document, are understood to be taken as inclusive or open-ended terms, and should not be taken as limiting. Likewise, the terms "include," "including," and "comprise," "comprising," and the like, when used in the context of this document, are understood to be taken as inclusive or open-ended terms, and should not be taken as limiting. Also, the use of the term "example" when used in the context of this document, particularly with respect to a term or phrase, means that a description of the term or phrase is provided as an example and should not be taken as limiting.

[0126] Further aspects and ranges are apparent from the description provided herein. It should be understood that the various aspects of the application can be practiced alone or in combination with one or more other aspects. It should also be understood that the description and specific examples herein are intended to be illustrative only and are not intended to limit the scope of the present application.

[0127] The foregoing detailed description of the application has been presented for purposes of clarity and description. It is apparent to those skilled in the art that many modifications and variations could be made to the embodiments of the present application without deviating from the spirit and scope of the present application. The present application is defined by the following claims.

Claims

1. A networking method between a cloud computer and a client within a local area network, characterized in that, include: Create network namespaces and virtual Ethernet pairs in the router to initialize the network environment; The system receives routing resource access requests from the cloud computer and forwards these requests to a LAN or WAN interface via the virtual Ethernet pair. This includes: creating a virtual LAN interface on the local router, adding a virtual Ethernet interface to the virtual LAN interface, and starting the virtual LAN interface; receiving and unpacking network requests from the cloud computer using a plugin, and forwarding these requests to the virtual LAN interface via the virtual Ethernet pair; determining the forwarding path of the data packets based on the destination address of the network requests; and... The system receives data requests from clients within the local area network (LAN) and forwards these requests to the cloud computer via the WAN interface and the virtual Ethernet pair. This includes: creating a virtual bridge interface and binding a virtual Ethernet interface to the virtual bridge interface; configuring port routing rules to allocate different types of traffic to designated WAN target ports; sending the traffic from the WAN interface to the network namespace and forwarding it to the Wuying plugin according to the configured routing rules; and encapsulating and processing the data packets before forwarding them to the cloud computer based on the transparent proxy service of the Wuying plugin.

2. The networking method between a cloud computer and a client within a local area network according to claim 1, characterized in that, The steps of creating network namespaces and virtual Ethernet pairs in the router and initializing the network environment include: Create a network namespace in the router, which is used to isolate network interfaces; Create two virtual Ethernet pairs and set the two virtual network interfaces of the virtual Ethernet pairs in different network namespaces; Configure an IP address for each virtual Ethernet interface and start all interfaces; and Configure default routes and network address translation rules in the network namespace.

3. The networking method between a cloud computer and a client within a local area network according to claim 1, characterized in that, Determining the forwarding path of data packets based on the destination address of the network request includes: If the target of the request is an external network resource, it will be forwarded to the external network through the WAN interface; If the target of the request is an intranet resource, it will be forwarded through the LAN interface and enter the intranet.

4. The networking method between a cloud computer and a client within a local area network according to claim 3, characterized in that, The step of receiving the routing resource access request from the cloud computer and forwarding the routing resource access request to the LAN interface or WAN interface via the virtual Ethernet pair further includes: Configure port routing rules for WAN interface traffic, and select different WAN lines for forwarding based on the requested port number or protocol.

5. A networking device for connecting a cloud computer and a client within a local area network, characterized in that, The device includes: At least one processor; and At least one memory storing a computer program; When the computer program is executed by the at least one processor, the device performs the steps of the networking method between the cloud computer and the client in the local area network according to any one of claims 1 to 4.

6. A computer-readable storage medium storing a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the networking method between the cloud computer and the client in the local area network according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Dedicated network line connection method and device

    CN107968849A

  • Multi-tenant communication isolation method and hybrid networking method

    CN114640554A