A gateway configuration method, system and medium

By configuring multiple distributed gateway ports and forwarding strategies in the SDN network, the problem of single gateway port limitation in the existing technology is solved, enabling the router to connect to multiple external networks at the same time and improving network reliability.

CN118353837BActive Publication Date: 2024-10-18JINAN INSPUR DATA TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410778262.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-10-18
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

In the existing technology, all subnets in the SDN network connect to external networks through the distributed gateway port of the same router, which limits the use scenarios and network scale of the router, and cannot connect to multiple external networks at the same time, resulting in insufficient scalability and reliability. .

Method used

By configuring multiple distributed gateway ports in the distributed network and configuring corresponding distributed gateway ports for each subnetwork according to the forwarding policy, the router can connect to multiple external networks at the same time and send data packets to different external networks respectively. , achieve load balancing and improve reliability.

Benefits of technology

It improves the coverage and scalability of the SDN network, optimizes the load balancing service of the router, avoids the collapse problem caused by a single gateway port failure, reduces the load pressure of the router, and improves the reliability of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118353837B_ABST
    Figure CN118353837B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of communication technology, and discloses a gateway configuration method, system and medium. The method comprises: configuring distributed gateways in a distributed network, and creating distributed gateway ports corresponding to each distributed gateway in a router running in the distributed network according to the forwarding rules corresponding to each distributed gateway; obtaining several sub-networks connected to the router and the corresponding forwarding strategies, and configuring corresponding distributed gateway ports for each sub-network according to the forwarding strategies to instruct the router to forward data packets of each sub-network to each external network through the corresponding distributed gateway ports. Through the scheme of the present invention, the coverage of the SDN network is improved, the problem of causing router crash is avoided, and the reliability of the SDN network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a gateway configuration method, system and medium. Background Art

[0002] With the development of cloud computing technology, SDN (Software-Defined Networking) networks have been increasingly widely used. Neutron (an open source network component) is usually used as a manager to manage the entire SDN network, and OVN (Open Virtual Network, an open source project that implements Neutron) is used as a driver to implement specific SDN network functions, so that all subnets in the SDN network are connected to the external network through the distributed gateway ports set by the router. In related technologies, all devices in the subnet use the same distributed gateway port in the same router to connect to the same external network, which greatly limits the use scenarios of the router and the network scale.

[0003] Therefore, it is urgent to propose a gateway configuration method to solve the above problems. Summary of the invention

[0004] In view of this, the present invention proposes a gateway configuration method, system and medium.

[0005] Based on the above purpose, an embodiment of the present invention provides a gateway configuration method, which is applied to a distributed network and specifically includes the following steps:

[0006] Configure distributed gateways in the distributed network, and create distributed gateway ports corresponding to each of the distributed gateways in a router running in the distributed network according to a forwarding rule corresponding to each of the distributed gateways;

[0007] Acquire several sub-networks connected to the router and corresponding forwarding strategies, and configure corresponding distributed gateway ports for each sub-network according to the forwarding strategies to instruct the router to forward data packets of each sub-network to each external network through the corresponding distributed gateway ports.

[0008] In some implementations, the step of configuring a distributed gateway in the distributed network includes:

[0009] A creation interface is called to receive distributed gateway information corresponding to each of the external networks, and each of the distributed gateway information is stored in an external gateway configuration list according to a preset list format to configure a distributed gateway in the distributed network.

[0010] In some implementations, the step of creating a distributed gateway port corresponding to each of the distributed gateways in a router running in the distributed network according to the forwarding rule corresponding to each of the distributed gateways includes:

[0011] Obtaining a forwarding rule corresponding to the distributed gateway, and analyzing the forwarding rule to determine whether there is a conversion port with a transmission node attribute set in the router;

[0012] In response to the existence of a conversion port set with a transmission node attribute, a distributed gateway corresponding to the conversion address of the conversion port in the external gateway configuration list is queried, and a distributed gateway port corresponding to the distributed gateway is created in a router running in the distributed network according to the conversion address.

[0013] In some implementations, the gateway configuration method further includes:

[0014] In response to the existence of a plurality of the distributed gateways in the external gateway configuration list, a plurality of conversion address ports corresponding to the number of the distributed gateways and corresponding to the conversion addresses are created on the router.

[0015] In some implementations, the step of configuring a distributed gateway in the distributed network further includes:

[0016] In response to calling a creation interface to configure a newly added distributed gateway of a router running in the distributed network, a translation address record corresponding to the newly added distributed gateway is created in an address translation list to instruct the router to forward data packets of the corresponding subnet to the destination network address through the newly added distributed gateway.

[0017] In some implementations, the gateway configuration method further includes:

[0018] In response to a change in network resources, obtaining a changed forwarding strategy, and analyzing the changed forwarding strategy to determine a distributed gateway port corresponding to the changed network resource;

[0019] A forwarding rule corresponding to the changed network resource is generated according to the determined distributed gateway port.

[0020] In some implementations, the gateway configuration method further includes:

[0021] In response to creating a load balancing service and the router being configured with a plurality of distributed gateways and a plurality of the distributed gateway ports, a virtual address is applied for the external network corresponding to each distributed gateway on the router to provide a load balancing service to each of the external networks.

[0022] In some implementations, the gateway configuration method further includes:

[0023] In response to the router receiving the data packets sent by each of the external networks, the router forwards the data packets sent by each of the external networks to each of the sub-networks through each of the corresponding distributed gateway ports according to the forwarding strategy.

[0024] In some implementations, the step of configuring a corresponding distributed gateway port for each sub-network includes:

[0025] The same distributed gateway port is configured for each device located in the same sub-network.

[0026] In some implementations, the step of configuring a corresponding distributed gateway port for each sub-network further includes:

[0027] Different distributed gateway ports are configured for each device located in the same sub-network.

[0028] In some implementations, the distributed gateway information includes a distributed gateway identifier, a conversion address, and a conversion identifier.

[0029] In some implementations, the translation address record includes an external gateway port field.

[0030] In some implementations, the network resource change includes creating a new subnet and connecting the new subnet to the router, or adding a new device to the current subnet and connecting the new device to the router.

[0031] Another aspect of the embodiment of the present invention further provides a gateway configuration system, characterized in that it includes:

[0032] A creation unit, configured to configure a distributed gateway in the distributed network, and to create a distributed gateway port corresponding to each of the distributed gateways in a router running in the distributed network according to a forwarding rule corresponding to each of the distributed gateways;

[0033] A configuration unit is used to obtain several sub-networks and forwarding strategies connected to the router, and configure a corresponding distributed gateway port for each sub-network according to the forwarding strategy to instruct the router to forward data packets of each sub-network to each external network through the corresponding distributed gateway port.

[0034] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program that implements the above method steps when executed by a processor.

[0035] The present invention has at least the following beneficial technical effects:

[0036] The gateway configuration method of the present invention is applied to a distributed network, and can enable the distributed network to configure multiple distributed gateways according to user needs by calling the creation interface and configuring forwarding rules, and configure different distributed gateway ports for different sub-networks associated in the router by configuring the forwarding strategy, thereby further achieving the purpose of connecting multiple external networks at the same time through the same router and sending data packets of multiple sub-networks to different external networks respectively, improving the coverage of the SDN network, optimizing the load balancing service in the router, avoiding the problem of a sub-router crash caused by a single gateway port failure or blockage, reducing the load pressure of the router, and improving the reliability of the SDN network.

[0037] In addition, the present invention also provides a gateway configuration system and a computer-readable storage medium, which can also achieve the above-mentioned technical effects and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A schematic diagram of an embodiment of configuring an external network for a router in the related art;

[0040] Figure 2 A schematic diagram of an embodiment of the relationship and location of various resources in an SDN network supporting the setting of multiple distributed gateway ports;

[0041] Figure 3 A block diagram of an embodiment of a gateway configuration method provided by the present invention;

[0042] Figure 4 A schematic diagram of an embodiment of a gateway configuration method provided by the present invention;

[0043] Figure 5 A schematic diagram of an embodiment of a gateway configuration system provided by the present invention;

[0044] Figure 6 A schematic diagram of the structure of an embodiment of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0045] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0046] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.

[0047] External network is a term in Neutron, which can be directly connected to the underlay network (physical network responsible for transmitting data packets). The IP (Internet Protocol) and VLAN (Virtual Local Area Network) in the external network are directly exposed to other external networks that are not controlled by Neutron, which means that the external network can directly communicate and interact with other networks. In contrast to the external network is the tenant network, which is not exposed to the outside world and is only used by specific tenants or users.

[0048] In the related art, it is provided to configure corresponding floating IPs for virtual machines under all subnets in the SDN network one by one to achieve the purpose of connecting to the external network. However, floating IPs usually come from the same external network, which will cause IP address conflicts and routing problems. When multiple subnets use the same network segment, the configuration of routing rules and network policies becomes complicated. In addition, there is only one distributed gateway port (i.e., the port connecting the router and the external network) in the related art, which means that all subnets can only communicate with the external network through one gateway port, which limits the scalability and reliability of the SDN network, and because all traffic is concentrated on one gateway port, the risk of single point failure is increased. If different external networks are configured through multiple routers to achieve the connection between each subnet and the external network, the traffic in the SDN network will need to rely on an external physical gateway for forwarding, which greatly limits the usage scenarios and network scale.

[0049] Figure 1 FIG. 1 is a schematic diagram of an embodiment of configuring an external network for a router in the related art. Figure 1 In the network shown, there are two subnets with network segments of 10.1.1.0 / 24 and 20.1.1.0 / 24. Both subnets are connected to the external network with network segment of 100.1.1.0 / 24 through the same SNAT (Source Network Address Translation) router with IP address 10.15.36.25. Figure 1 When the four VMs (virtual machines) in the network want to communicate with other networks, such as the network with the network segment 200.1.1.0 / 24, they must first be forwarded to the 200.1.1.0 / 24 network through the router and then through the external gateway 100.1.1.254. During the forwarding process, the message will be SNATed and DNATed on the router. That is to say, when the virtual machines in the two subnets with the network segments 10.1.1.0 / 24 and 20.1.1.0 / 24 communicate with the external network, NAT (Network Address Translation) is actually performed on the router, and the IP address used for address conversion comes from the external network segment 100.1.1.0 / 24. From the above, it can be seen that the method of configuring only one external network on the router in the related technology has the following two problems:

[0050] (1) When the two subnets with network segments 10.1.1.0 / 24 and 20.1.1.0 / 24 communicate with the outside world, they must be forwarded through the external gateway 100.1.1.254. Even if the destination network and the external network are connected in the same physical network, they still need to be forwarded to the destination address through the external gateway 100.1.1.254.

[0051] (2) If the subnet with the network segment 10.1.1.0 / 24 has been configured to connect to the Internet through the external network 100.1.1.0 / 24 after NAT, then the subnet with the network segment 20.1.1.0 / 24 cannot connect to the Internet through another external network 200.1.1.0 / 24 after NAT.

[0052] Although the above problems can be solved by configuring static routes in ordinary physical networks, they cannot be solved in the native Neutron and OVN combined SDN system. Because in SDN networks, it is possible to intervene in the forwarding path by configuring static routes, but it only intervenes in the forwarding traffic between different subnets under its router (east-west direction), and for north-south traffic (that is, traffic that needs to be forwarded through external networks / distributed gateways), in this virtualized SDN network environment, it is not possible to configure multiple distributed gateway ports for the router. Because whether it is Neutron or OVN, it is impossible to set two or more external networks as the external gateway of the router in the same router at the same time.

[0053] Figure 2FIG. 1 is a schematic diagram of an embodiment of the relationship and location of various resources in an SDN network supporting the setting of multiple distributed gateway ports. Figure 2 As shown in the figure, after the subnet is associated with the router, the corresponding subnet gateway port, also known as the logical routing port (LRP), is automatically created to forward traffic across subnets. When the router is configured with a distributed gateway (external network) and SNAT is enabled, a new SNAT port is automatically created on the router. This port is used as a network address translation port when the device in the subnet communicates with the outside world. In addition, when the router is configured with a distributed gateway (external network), a distributed gateway port will be created. This distributed gateway port also creates a logical routing port (LRP) under the router, and together with a logical routing port on the distributed gateway, it forms a device pair to forward traffic in the subnet under the router to the distributed gateway (external network). Although the subnet gateway port and the distributed gateway port belong to the same LRP, the distributed gateway port has a gateway_chassis attribute that the subnet gateway port does not have. The gateway_chassis consists of one or more chassis (transmission nodes in the network) with priority configuration. When the router configures a distributed gateway (external network) corresponding to the distributed gateway port, a binding port is also created in the corresponding chassis, that is, the distributed gateway port in the router is bound to the corresponding chassis. The north-south traffic will eventually be forwarded to the corresponding chassis through the distributed gateway port in an overlay (tunnel) manner to complete the last step of forwarding from the SDN network to the physical network. In other words, the gateway_chassis attribute can indicate to the router which physical node (chassis with a higher priority) forwards the north-south traffic. However, in the related technology, only one distributed gateway port can be created in each router, resulting in the inability to set two or more external networks as distributed gateways on the same router at the same time. However, with the diversification of SDN network communication requirements and higher requirements for north-south communication, in many scenarios, the related technology's method of communicating with the external network through only one gateway port cannot meet most communication requirements. For example, in a scenario where two subnets of network segments 10.1.1.0 / 24 and 20.1.1.0 / 24 communicate with the Internet through external gateways A and B respectively, the relevant technology cannot achieve that virtual machine VM1 communicates with the Internet after IP conversion through the SNAT IP address 200.1.1.100, while virtual machine VM2 communicates with the Internet after IP conversion through the SNAT IP address 100.1.1.22.

[0054] In order to solve the above problems, the present invention proposes a gateway configuration method, which realizes setting multiple distributed gateway ports in the same router, so that all subnets in the SDN network can be connected to multiple different external networks at the same time through only one router, and data packets can be sent to different external networks or subnets according to routing decisions, thereby improving the scalability, flexibility and reliability of the SDN network.

[0055] Based on the above purpose, the first aspect of the embodiment of the present invention provides an embodiment of a gateway configuration method. Figure 3 As shown, the gateway configuration method is applied to a distributed network, which includes the following steps:

[0056] Step S100: configuring distributed gateways in the distributed network, and creating distributed gateway ports corresponding to each distributed gateway in a router running in the distributed network according to a forwarding rule corresponding to each distributed gateway.

[0057] In some embodiments, by optimizing the creation interface of the distributed gateway port in the router running in the distributed network, it is possible to receive the external distributed gateway information configured by the user in the form of a list, and each item of data in the list includes three kinds of information: distributed gateway ID (Identity document, identifier), SNAT identifier (i.e. conversion identifier) ​​and SNAT IP address (i.e. conversion address). The SNAT identifier is used to determine whether the distributed gateway has SNAT enabled. The above creation interface provides an API interface for users to configure multiple external gateways, allowing users to configure multiple distributed gateways on the same router.

[0058] In some embodiments, a distributed gateway port is created only when there is a conversion port with a transmission node attribute set, that is, a distributed gateway port is created only when there is a gateway_chassis attribute or a HA_chassiss_group (HA refers to HighAvailable) attribute that is assigned to certain conversion ports of the router. The transmission node attribute is set according to the forwarding rules configured by the user on the router. It is possible to set the distributed gateway port of the router according to user needs, avoid the router generating a distributed gateway port by default after setting the distributed gateway, and improve the flexibility of the router.

[0059] In some embodiments, Figure 4 Schematic diagram of an embodiment of the gateway configuration method provided by the present invention. In an example, Figure 4As shown in the figure, the configured forwarding rules include: By default, all north-south traffic is forwarded through external network B, and the sent data packets are translated through SNAT IP address 200.1.1.100. The data packets of destination network AB0.0 / 16 are sent from external network A and translated through SNAT IP address 100.1.1.22. Therefore, a distributed gateway port B corresponding to external network B is created in the router according to SNAT IP address 200.1.1.100, and a distributed gateway port A corresponding to external network A is created in the router according to SNAT IP address 100.1.1.22.

[0060] In some embodiments, the present invention configures the corresponding relationship between the subnet, the router and the distributed gateway in the database from subnet: router: distributed gateway = N: 1: 1 to subnet: router: distributed gateway = N: 1: M. When multiple distributed gateways and static routes are configured on the router, if it is determined that the router has a need to communicate with the outside world through multiple external gateways, a NAT port will be automatically created on the router. Different from the related art, the number of NAT ports created by the router of the present invention is not fixed, and its number corresponds to the number of distributed gateways to ensure that all subnets connected to the router can communicate with the outside world through the configured multiple distributed gateways.

[0061] Step S200, obtaining several sub-networks connected to the router and corresponding forwarding strategies, and configuring corresponding distributed gateway ports for each sub-network according to the forwarding strategies to instruct the router to forward data packets of each sub-network to each external network through the corresponding distributed gateway ports.

[0062] In some embodiments, a gw_port field (i.e., external gateway port field) is added to the NAT table of the OVN northbound database. The OVN Northbound DB is the interface between OVN and CMS (Content Management System). The gw_port field is associated with the UUID (Universally Unique Identifier) ​​in the Logical_Router_Port table of the OVN northbound database. Whenever an external network is set as a distributed gateway of the router, a NAT record (i.e., conversion address record table) is added to the NAT table. Unlike the related art that only supports setting one NAT record, the router of the present invention supports setting multiple NAT records. The gw_port field in each NAT record can be empty, indicating that this external network has no external gateway (that is, no Figure 4The gw_port field can also be non-empty, indicating that this external network can forward the data packet to the next hop, and the data packet is forwarded to the destination network address by external gateway A or external gateway B.

[0063] In one example, Figure 4 Take the forwarding strategy as an example to explain: Figure 4 The forwarding strategies for the three traffic flows shown are as follows:

[0064] (1) Distributed gateway port IP: 200.1.1.100, local network segment or virtual machine IP: 20.1.1.0 / 24, NAT port type: SNAT;

[0065] (2) Distributed gateway port IP: 100.1.1.15, local network segment or virtual machine IP: 10.1.1.20, NAT port type: SNAT+DNAT;

[0066] (3) Distributed gateway port IP: 200.1.1.100, local network segment or virtual machine IP: 10.1.1.0 / 24, NAT port type: SNAT.

[0067] Then generate the corresponding NAT port according to the above forwarding strategy to make the forwarding strategy effective for the router.

[0068] In some implementations, when a router is configured with multiple distributed gateway ports, and network resources in the entire SDN network change, such as a new sub-network is created and connected to the router, or a virtual machine or a network segment is added to the sub-network and connected to the router, the distributed gateway port corresponding to the changed network resource is determined according to the forwarding policy set by the user for the changed network resource, that is, the new sub-network, the newly added virtual machine or the newly added network segment needs to forward data packets to the external network through which distributed gateway port. The forwarding rules corresponding to the changed network resources are generated according to the distributed gateway ports in the forwarding policy after it takes effect.

[0069] In an example, the generated forwarding rules are described by taking the above three forwarding strategies as an example. The generated forwarding rules are as follows:

[0070] (1) For all virtual machines in the network segment 20.1.1.0 / 24, the north-south traffic is forwarded through distributed gateway port B;

[0071] (2) For the network segment 10.1.1.0 / 24, all traffic from virtual machines except the virtual machine with IP address 10.1.1.20 is forwarded through distributed gateway port B.

[0072] (3) The virtual machine traffic of the virtual machine with IP 10.1.1.20 is forwarded through the IP 100.1.1.15 in external network A.

[0073] In the above example, the traffic path forwarded through distributed gateway port A is not given, but this can also be set according to the forwarding policy configured by the user. When set, a NAT record will be added to the NAT table of the OVN northbound database, and a new NAT port will be created under the router.

[0074] In some implementations, assuming that packets from subnet A and subnet B enter the router at the same time, the router will forward the packets according to the forwarding strategy configured by the user, so that the packets enter different distributed gateway ports, and then perform network address translation on the corresponding distributed gateway ports. Similarly, when the external network returns a packet, after the packet enters the router from the distributed gateway port, it will also be forwarded to each subnet or virtual machine according to the forwarding strategy of the router that is the same as the above principle but in the opposite direction, thereby completing a complete communication process.

[0075] The gateway configuration method of the present invention can enable the router to configure multiple distributed gateways according to user needs by calling the creation interface and configuring the forwarding rules, and configure different distributed gateway ports for different sub-networks associated in the router by configuring the forwarding strategy, further achieving the purpose of connecting multiple external networks at the same time through the same router and sending data packets of multiple sub-networks to different external networks respectively, thereby improving the coverage of the SDN network, optimizing the load balancing service in the router, avoiding the problem of router crash caused by failure or blockage of a single gateway port, reducing the load pressure of the router, and improving the reliability of the SDN network.

[0076] In some embodiments, the step of configuring a distributed gateway in the distributed network includes: calling a creation interface to receive distributed gateway information corresponding to each external network, and storing each distributed gateway information in an external gateway configuration list according to a preset list format to configure a distributed gateway in the distributed network.

[0077] In some embodiments, the step of creating a distributed gateway port corresponding to each distributed gateway in a router running in a distributed network according to the forwarding rules corresponding to each distributed gateway includes: obtaining the forwarding rules corresponding to the distributed gateway, and analyzing the forwarding rules to determine whether there is a conversion port with transmission node attributes set in the router; in response to the existence of a conversion port with transmission node attributes set, querying the distributed gateway corresponding to the conversion address of the conversion port in the external gateway configuration list, and creating a distributed gateway port corresponding to the distributed gateway in the router running in the distributed network according to the conversion address.

[0078] The gateway configuration method of the present invention can support a router to configure multiple external networks and create multiple distributed gateway ports at the same time, and support the creation of a new distributed gateway port again when a distributed gateway port has been configured. By configuring multiple distributed gateway ports, the scale of the SDN network can be expanded to meet the users' growing network needs.

[0079] In some implementations, the gateway configuration method further includes: in response to the presence of multiple distributed gateways in the external gateway configuration list, creating a number of conversion address ports corresponding to the number of distributed gateways and corresponding to each conversion address on the router.

[0080] In some embodiments, the step of configuring a distributed gateway in a distributed network further includes: in response to calling a create interface to configure a newly added distributed gateway of a router, creating a conversion address record corresponding to the newly added distributed gateway in the address conversion list to instruct the router to forward data packets of the corresponding subnet to the destination network address through the newly added distributed gateway.

[0081] The gateway configuration method of the present invention can configure a new distributed gateway port for a router by calling a creation interface according to user needs, thereby achieving the purpose of connecting multiple external networks at the same time through the same router and sending data packets of different subnetworks to different external networks respectively, thereby improving the scalability of the network.

[0082] In some embodiments, the above-mentioned gateway configuration method also includes: in response to changes in network resources, obtaining a forwarding strategy after the change, and analyzing the forwarding strategy after the change to determine a distributed gateway port corresponding to the changed network resource; generating a forwarding rule corresponding to the changed network resource based on the determined distributed gateway port.

[0083] In some embodiments, the above-mentioned gateway configuration method also includes: in response to creating a load balancing service and the router is configured with multiple distributed gateways and multiple distributed gateway ports, applying for a virtual address for the external network corresponding to each distributed gateway in the router to provide load balancing service to each external network.

[0084] In some embodiments, the load balancing function of the router in the related art provides external services through a single external network by default, which cannot adapt to the multi-distributed gateway port scenario corresponding to the router of the present invention. Therefore, when the router of the present invention is configured with multiple external networks and has more than one distributed gateway port, when creating a load balancer service, it can apply for several virtual IPs according to the external network selected in the forwarding strategy to provide external load balancing services. The load balancing function of the present invention can provide virtual IP services to two or more external networks.

[0085] The gateway configuration method of the present invention applies for several virtual IPs according to the external network selected in the forwarding strategy, which effectively improves the load balancing service of the router. When a distributed gateway port fails, the forwarding strategy can be configured to continue to provide services through other distributed gateway ports, avoiding the router crash and improving the reliability of the SDN network.

[0086] In some implementations, the above-mentioned gateway configuration method further includes: in response to the router receiving the data packets sent by each external network, forwarding the data packets sent by each external network to each sub-network through each corresponding distributed gateway port according to the forwarding strategy.

[0087] In some implementations, the step of configuring a corresponding distributed gateway port for each sub-network includes: configuring the same distributed gateway port for each device in the same sub-network.

[0088] In some implementations, the step of configuring a corresponding distributed gateway port for each sub-network further includes:

[0089] Configure different distributed gateway ports for each device in the same subnet.

[0090] In some implementations, the distributed gateway information includes a distributed gateway identifier, a conversion address, and a conversion identifier.

[0091] In some implementations, the translation address record includes an external gateway port field.

[0092] In some implementations, the network resource change includes creating a new subnet and connecting the new subnet to a router, or adding a new device to a current subnet and connecting the new device to a router.

[0093] The gateway configuration method of the present invention realizes a router that supports setting multiple distributed gateway ports, can configure multiple distributed gateways according to user needs, and can configure different distributed gateway ports for different sub-networks associated with the router, thereby solving the problem in the related art that the router cannot be connected to multiple external networks at the same time.

[0094] Based on the same inventive concept, according to another aspect of the present invention, Figure 5 As shown, an embodiment of the present invention further provides a gateway configuration system, which specifically includes:

[0095] The creation unit 110 is used to configure the distributed gateways in the distributed network, and to create distributed gateway ports corresponding to each distributed gateway in the routers running in the distributed network according to the forwarding rules corresponding to each distributed gateway;

[0096] The configuration unit 120 is used to obtain several sub-networks and forwarding strategies connected to the router, and configure a corresponding distributed gateway port for each sub-network according to the forwarding strategy to instruct the router to forward data packets of each sub-network to each external network through the corresponding distributed gateway port.

[0097] The gateway configuration system of the present invention can enable the router to configure multiple distributed gateways according to user needs by calling the creation interface and configuring forwarding rules, and configure different distributed gateway ports for different sub-networks associated in the router by configuring the forwarding strategy, further achieving the purpose of connecting multiple external networks at the same time through the same router and sending data packets of multiple sub-networks to different external networks respectively, thereby improving the coverage of the SDN network, optimizing the load balancing service in the router, avoiding the problem of router crash caused by failure or blockage of a single gateway port, reducing the load pressure of the router, and improving the reliability of the SDN network.

[0098] Based on the same inventive concept, according to another aspect of the present invention, Figure 6 As shown, an embodiment of the present invention further provides a computer-readable storage medium 40, which stores a computer program 410 for executing the above method when executed by a processor.

[0099] Finally, it should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program can be a disk, an optical disk, a read-only storage memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding above-mentioned any method embodiments.

[0100] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0101] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope of the embodiments disclosed in the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. The serial numbers of the embodiments disclosed in the above embodiments of the present invention are for description only and do not represent the advantages and disadvantages of the embodiments. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0102] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0103] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A gateway configuration method, characterized in that: Applied to distributed networks, which are SDN networks that combine Neutron and OVN, including: Configure distributed gateways in the distributed network, and create distributed gateway ports corresponding to each of the distributed gateways in a router running in the distributed network according to a forwarding rule corresponding to each of the distributed gateways; Acquire several subnetworks connected to the router and corresponding forwarding strategies, and configure a corresponding distributed gateway port for each subnetwork according to the forwarding strategy to instruct the router to forward data packets of each subnetwork to an external network corresponding to the corresponding distributed gateway port through the corresponding distributed gateway port; Among them, each of the distributed gateways corresponds to each of the external networks.

2. The gateway configuration method according to claim 1, characterized in that: The step of configuring a distributed gateway in the distributed network comprises: A creation interface is called to receive distributed gateway information corresponding to each of the external networks, and each of the distributed gateway information is stored in an external gateway configuration list according to a preset list format to configure a distributed gateway in the distributed network.

3. The gateway configuration method according to claim 2, characterized in that: The step of creating distributed gateway ports corresponding to each of the distributed gateways in a router running in the distributed network according to the forwarding rules corresponding to each of the distributed gateways comprises: Obtaining a forwarding rule corresponding to the distributed gateway, and analyzing the forwarding rule to determine whether there is a conversion port with a transmission node attribute set in the router; In response to the existence of a conversion port set with a transmission node attribute, a distributed gateway corresponding to the conversion address of the conversion port in the external gateway configuration list is queried, and a distributed gateway port corresponding to the distributed gateway is created in a router running in the distributed network according to the conversion address.

4. The gateway configuration method according to claim 3, characterized in that: Also includes: In response to the existence of a plurality of the distributed gateways in the external gateway configuration list, a plurality of conversion address ports corresponding to the number of the distributed gateways and corresponding to the conversion addresses are created on the router.

5. The gateway configuration method according to claim 1, characterized in that: The step of configuring a distributed gateway in the distributed network further includes: In response to calling a creation interface to configure a newly added distributed gateway of a router running in the distributed network, a translation address record corresponding to the newly added distributed gateway is created in an address translation list to instruct the router to forward data packets of the corresponding subnet to the destination network address through the newly added distributed gateway.

6. The gateway configuration method according to claim 1, characterized in that: Also includes: In response to a change in network resources, obtaining a changed forwarding strategy, and analyzing the changed forwarding strategy to determine a distributed gateway port corresponding to the changed network resource; A forwarding rule corresponding to the changed network resource is generated according to the determined distributed gateway port.

7. The gateway configuration method according to claim 1, characterized in that: Also includes: In response to creating a load balancing service and the router being configured with a plurality of distributed gateways and a plurality of the distributed gateway ports, a virtual address is applied for the external network corresponding to each distributed gateway on the router to provide a load balancing service to each of the external networks.

8. The gateway configuration method according to claim 1, characterized in that: Also includes: In response to the router receiving the data packets sent by each of the external networks, the router forwards the data packets sent by each of the external networks to each of the sub-networks through each of the corresponding distributed gateway ports according to the forwarding strategy.

9. The gateway configuration method according to claim 1, characterized in that: The step of configuring a corresponding distributed gateway port for each sub-network includes: The same distributed gateway port is configured for each device located in the same sub-network.

10. The gateway configuration method according to claim 9, characterized in that: The step of configuring a corresponding distributed gateway port for each sub-network also includes: Different distributed gateway ports are configured for each device located in the same sub-network.

11. The gateway configuration method according to claim 2, characterized in that: The distributed gateway information includes a distributed gateway identifier, a conversion address and a conversion identifier.

12. The gateway configuration method according to claim 5, characterized in that: The translation address record includes an external gateway port field.

13. The gateway configuration method according to claim 6, characterized in that: The network resource change includes creating a new sub-network and connecting the new sub-network to the router, or adding a new device to the current sub-network and connecting the new device to the router.

14. A gateway configuration system, characterized in that: The gateway configuration system is used to execute the method according to any one of claims 1 to 13, including: A creation unit, configured to configure a distributed gateway in a distributed network, and to create a distributed gateway port corresponding to each of the distributed gateways in a router running in the distributed network according to a forwarding rule corresponding to each of the distributed gateways; a configuration unit, configured to obtain a plurality of sub-networks and forwarding strategies connected to the router, and configure a corresponding distributed gateway port for each sub-network according to the forwarding strategy to instruct the router to forward data packets of each sub-network to an external network corresponding to the corresponding distributed gateway port through the corresponding distributed gateway port; Among them, each of the distributed gateways corresponds to each of the external networks, and the distributed network is an SDN network that combines Neutron and OVN.

15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is performed.

Citation Information

Patent Citations

  • Data transmission method, virtual network management device and data transmission system

    CN106487695A

  • Port forwarding test method, device and equipment in virtualization environment and medium

    CN113419812A

  • Method for configuring distributed gateway, open virtual network and storage medium

    CN115277349A

  • NAT optimization device and method based on OVN virtual machine network

    CN115426313A

  • Virtual NAT gateway planning method, device and equipment based on OVN

    CN116866166A