CN114900560A - Control method, system, device and medium - Google Patents

Control method, system, device and medium Download PDF

Info

Publication number
CN114900560A
CN114900560A CN202210349412.0A CN202210349412A CN114900560A CN 114900560 A CN114900560 A CN 114900560A CN 202210349412 A CN202210349412 A CN 202210349412A CN 114900560 A CN114900560 A CN 114900560A
Authority
CN
China
Prior art keywords
gateway
message
processed
indication information
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210349412.0A
Other languages
Chinese (zh)
Other versions
CN114900560B (en
Inventor
胡林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202210349412.0A priority Critical patent/CN114900560B/en
Priority claimed from CN202210349412.0A external-priority patent/CN114900560B/en
Publication of CN114900560A publication Critical patent/CN114900560A/en
Application granted granted Critical
Publication of CN114900560B publication Critical patent/CN114900560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the disclosure discloses a control method, a control system, a control device and a control medium, wherein the method comprises the following steps: acquiring a message to be processed, sending the message to be processed to a first gateway, wherein the first gateway is used for acquiring a source object identifier of the message to be processed, acquiring second gateway indication information for indicating a second gateway according to the source object identifier and a corresponding relation between a source object and the gateway, and sending the second gateway indication information and the message to be processed to a switch; and receiving second gateway indication information and the message to be processed, and forwarding the message to be processed to a second gateway according to the second gateway indication information, wherein the second gateway is used for forwarding the message to be processed. The scheme can ensure that the bandwidth of the message forwarded by the corresponding gateway can meet the bandwidth requirement of the source object corresponding to the gateway, ensure that the message of the source object can be forwarded in time, and improve the user experience.

Description

Control method, system, device and medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a control method, system, device, and medium.
Background
In recent years, with rapid development and popularization of internet technology, many related services such as Video telephony, high definition digital television, Video-On-Demand (VOD), live Video, and the like have begun to be gradually popularized in daily life. Generally, when data is transmitted through a network, a corresponding service uses a message as a data unit for transmission, and when the message is transmitted in the network, the message needs to be processed by various message processing devices, including but not limited to a gateway and the like.
In the related art, a gateway serves as a network access point and can be used for forwarding messages. However, the gateway may have a problem of too slow message forwarding speed, which results in poor user experience.
Disclosure of Invention
To solve the problems in the related art, embodiments of the present disclosure provide a control method, system, device, and medium.
In a first aspect, an embodiment of the present disclosure provides a control method, where the method is applied to a switch, and the method includes:
acquiring a message to be processed, sending the message to be processed to a first gateway, wherein the first gateway is used for acquiring a source object identifier of the message to be processed, acquiring second gateway indication information for indicating a second gateway according to the source object identifier and a corresponding relation between a source object and the gateway, and sending the second gateway indication information and the message to be processed to a switch, and the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;
and receiving second gateway indication information and a message to be processed, and forwarding the message to be processed to a second gateway according to the second gateway indication information, wherein the second gateway is used for forwarding the message to be processed.
In an implementation manner of the present disclosure, before sending a message to be processed to a first gateway, the method further includes:
acquiring message attribute information of a message to be processed, wherein the message attribute information comprises at least one of a source IP address and a destination IP address of the message to be processed;
acquiring first gateway indication information for indicating a first gateway according to the message attribute information and the corresponding relation between the message attribute information and the gateway;
sending a message to be processed to a first gateway, comprising:
and sending the message to be processed to the first gateway according to the first gateway indication information.
In an implementation manner of the present disclosure, before sending a message to be processed to a first gateway, the method further includes:
acquiring first gateway indication information for indicating a first gateway, wherein the first gateway is any one of a plurality of gateways corresponding to an exchanger;
sending a message to be processed to a first gateway, comprising:
and sending the message to be processed to the first gateway according to the first gateway indication information.
In an implementation manner of the present disclosure, before sending the second gateway indication information and the to-be-processed packet to the switch, the method further includes:
packaging the second gateway indication information and the message to be processed to obtain a first packaged message;
sending the second gateway indication information and the message to be processed to the switch, including:
sending a first encapsulation message to the switch:
receiving second gateway indication information and a message to be processed, including:
and receiving the first encapsulation message.
In one implementation manner of the present disclosure, the correspondence between the source object and the gateway includes a correspondence between the source object and a diversion IP address, the diversion IP address and an IP address of the gateway corresponding to the source object belong to the same network segment, and the second gateway indication information includes a second diversion IP address;
forwarding the message to be processed to the second gateway according to the second gateway indication information, including:
and acquiring second gateway indication information of a second gateway for indicating that the IP address and the second diversion IP address belong to the same network segment according to the second diversion IP address and the routing table, and forwarding the message to be processed to the second gateway according to the second gateway indication information.
In one implementation manner of the present disclosure, acquiring, according to the second diversion IP address and the routing table, second gateway indication information for indicating that the IP address and the second diversion IP address belong to a second gateway in the same network segment includes:
and acquiring a plurality of network segments to which the second diversion IP addresses belong according to the second diversion IP addresses and the routing table, and acquiring second gateway indication information for indicating a second gateway to which the IP addresses belong to a first network segment, wherein the first network segment is the network segment with the longest subnet mask in the network segments.
In one implementation manner of the present disclosure, acquiring second gateway indication information for indicating that an IP address belongs to a second gateway of a first network segment includes:
responding to the fact that the IP address of at least one gateway belongs to the first network segment according to the routing table, and obtaining second gateway indication information of a second gateway used for indicating that the IP address belongs to the first network segment;
the method further comprises the following steps:
and in response to the fact that the IP addresses of any gateway do not belong to the first network segment and the IP address of at least one gateway belongs to the second network segment according to the routing table, acquiring second gateway indication information of the second gateway for indicating that the IP address belongs to the second network segment, wherein the second network segment is the network segment with the next longest subnet mask in the plurality of network segments.
In one implementation manner of the present disclosure, acquiring, according to the second diversion IP address and the routing table, second gateway indication information of a second gateway, which is used for indicating that the IP address and the second diversion IP address belong to the same network segment, includes:
and acquiring a plurality of network segments to which the second diversion IP address belongs according to the second diversion IP address and the routing table, and acquiring second gateway indication information for indicating a second gateway to which the IP address belongs to a third network segment, wherein the third network segment is the network segment with the shortest routing path length in the plurality of network segments.
In one implementation manner of the present disclosure, acquiring second gateway indication information for indicating that an IP address belongs to a second gateway of a third network segment includes:
responding to the IP address of at least one gateway in the third network segment determined according to the routing table, and acquiring second gateway indication information for indicating a second gateway in the third network segment;
the method further comprises the following steps:
and in response to the fact that the IP address of any gateway does not belong to the third network segment and the IP address of at least one gateway belongs to the fourth network segment according to the routing table, acquiring second gateway indication information of a second gateway for indicating that the IP address belongs to the fourth network segment, wherein the fourth network segment is the network segment with the second shortest path length in the plurality of network segments.
In a second aspect, an embodiment of the present disclosure provides a control method, where the method is applied to a gateway, and the method includes:
receiving a first message to be processed sent by a switch, and acquiring a source object identifier of the first message to be processed;
acquiring second gateway indication information for indicating a second gateway according to the source object identifier and the corresponding relation between the source object and the gateway, and sending the second gateway indication information and the first message to be processed to the switch, wherein the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;
and receiving a second message to be processed sent by the switch, and forwarding the second message to be processed.
In a third aspect, an embodiment of the present disclosure provides a message processing system, where the message processing system includes a switch and at least one gateway, the switch is configured to implement the method steps in any one of the implementation manners of the first aspect and the first aspect, and the gateway is configured to implement the method steps in the second aspect.
In a fourth aspect, an embodiment of the present disclosure provides a control device, including:
the first message sending module is configured to obtain a message to be processed and send the message to be processed to a first gateway, the first gateway is used for obtaining a source object identifier of the message to be processed, obtaining second gateway indication information used for indicating a second gateway according to the source object identifier and a corresponding relation between a source object and the gateway, and sending the second gateway indication information and the message to be processed to the switch, and the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;
and the first message receiving module is configured to receive the second gateway indication information and the message to be processed, and forward the message to be processed to the second gateway according to the second gateway indication information, and the second gateway is used for forwarding the message to be processed.
In a fifth aspect, an embodiment of the present disclosure provides a control apparatus, including:
the second message receiving module is configured to receive a first message to be processed sent by the switch and acquire a source object identifier of the first message to be processed;
a second message sending module, configured to obtain, according to the source object identifier and a correspondence between a source object and a gateway, second gateway indication information for indicating a second gateway, and send the second gateway indication information and the first message to be processed to the switch, where a bandwidth of the second gateway meets a bandwidth requirement of the source object corresponding to the second gateway;
and the third message sending module is configured to receive a second message to be processed sent by the switch and forward the second message to be processed.
In a sixth aspect, an embodiment of the present disclosure provides an electronic device, including a memory and at least one processor; the memory is for storing one or more computer instructions to be executed by the at least one processor to implement the method steps of any one of the first aspect, any implementation of the first aspect, and the second aspect.
In a seventh aspect, this disclosed embodiment provides a computer-readable storage medium, on which computer instructions are stored, which when executed by a processor implement the method steps of any one of the first aspect, the implementation manner of the first aspect, and the second aspect.
In an eighth aspect, the present disclosure provides, in an embodiment, a computer program product, which includes computer programs/instructions that, when executed by a processor, implement the first aspect, any implementation manner of the first aspect, and the method steps of any of the second aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the technical scheme provided by the embodiment of the disclosure is applied to a switch, and according to the technical scheme, a message to be processed is obtained and sent to a first gateway, the first gateway is used for obtaining a source object identifier of the message to be processed, obtaining second gateway indicating information for indicating a second gateway according to the source object identifier and a corresponding relation between a source object and the gateway, and sending the second gateway indicating information and the message to be processed to the switch; and receiving second gateway indication information and the message to be processed, and forwarding the message to be processed to a second gateway according to the second gateway indication information, wherein the second gateway is used for forwarding the message to be processed. In consideration of the fact that the bandwidth of the second gateway for forwarding the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is less, the bandwidth of the message forwarded by the second gateway, that is, the total bandwidth of the message transmitted by the source object corresponding to the second gateway, is not affected at all, that is, the bandwidth of the message forwarded by the corresponding gateway can meet the bandwidth requirement of the source object corresponding to the gateway, the message forwarded by the source object can be ensured to be forwarded in time, and the user experience is improved.
According to the technical scheme provided by the embodiment of the disclosure, by acquiring the message attribute information of the message to be processed, acquiring the first gateway indication information for indicating the first gateway according to the message attribute information and the corresponding relationship between the message attribute information and the gateway, and sending the message to be processed to the first gateway according to the first gateway indication information, the first gateway indication information can be acquired based on the message attribute information of the message to be processed according to the preset corresponding relationship between the message attribute information and the gateway, so that the first gateway can be managed conveniently.
According to the technical scheme provided by the embodiment of the disclosure, the first gateway indication information for indicating the first gateway is obtained, and the message to be processed is sent to the first gateway according to the first gateway indication information, wherein the first gateway is any gateway in the plurality of gateways corresponding to the switch, so that the first gateway does not need to be managed specifically to be the gateway, and the consumed processing resources are reduced.
According to the technical scheme provided by the embodiment of the disclosure, the first gateway packages the second gateway indication information and the message to be processed to obtain the first package message, and sends the first package message to the switch, so that the switch can receive the first package message, and the first package message can be conveniently sent.
According to the technical scheme provided by the embodiment of the disclosure, the corresponding relationship between the source object and the gateway is limited to include the corresponding relationship between the source object and the diversion IP address, the diversion IP address is limited to belong to the same network segment as the IP address of the gateway corresponding to the source object, the second gateway indication information is limited to include the second diversion IP address, the second gateway indication information of the second gateway for indicating that the IP address and the second diversion IP address belong to the same network segment is obtained according to the second diversion IP address and the routing table, and the message to be processed is forwarded to the second gateway according to the second gateway indication information, so that which gateway the second gateway is can be conveniently managed.
According to the technical scheme provided by the embodiment of the disclosure, the plurality of network segments to which the second diversion IP addresses belong are obtained according to the second diversion IP addresses and the routing table, and the second gateway indication information for indicating the second gateway of which the IP addresses belong to the first network segment is obtained, wherein the first network segment is the network segment with the longest subnet mask in the plurality of network segments, so that the second gateway indicated by the second gateway indication information can be unique, the message to be processed is ensured not to be forwarded by the plurality of gateways, repeated forwarding is avoided, and the consumed processing resources are reduced.
According to the technical scheme provided by the embodiment of the disclosure, by responding to the fact that the IP address of at least one gateway is determined to belong to a first network segment according to a routing table, and acquiring second gateway indication information of a second gateway for indicating that the IP address belongs to the first network segment, the IP address of at least one gateway is determined to belong to the first network segment according to the routing table, it can be understood that at least one gateway of which the IP address is set to belong to the first network segment is not in fault, so that the second gateway for forwarding the message to be processed can be ensured to be the gateway which is not in fault; the method comprises the steps of responding to the fact that the IP address of any gateway does not belong to a first network segment according to a routing table, and the IP address of at least one gateway belongs to a second network segment with the sub-net mask number of the plurality of network segments, and obtaining second gateway indication information for indicating that the IP address belongs to a second gateway of the second network segment, wherein when the IP address of any gateway does not belong to the first network segment according to the routing table, the gateway with the IP address set as belonging to the first network segment is possible to have faults.
According to the technical scheme provided by the embodiment of the disclosure, the plurality of network segments to which the second diversion IP address belongs are obtained according to the second diversion IP address and the routing table, and the second gateway indication information for indicating the second gateway of which the IP address belongs to the third network segment is obtained, wherein the third network segment is the network segment with the shortest routing path length in the plurality of network segments, so that the second gateway indicated by the second gateway indication information can be unique, the message to be processed is ensured not to be forwarded by the plurality of gateways, repeated forwarding is avoided, and consumed processing resources are reduced.
According to the technical scheme provided by the embodiment of the disclosure, in response to the fact that the IP address of at least one gateway in the third network segment is determined according to the routing table, second gateway indication information for indicating the second gateway in the third network segment is obtained, wherein the IP address of at least one gateway is determined to belong to the third network segment according to the routing table, and it can be understood that the IP address is set to be that at least one gateway belonging to the third network segment does not have a fault, so that the second gateway for forwarding the message to be processed can be ensured to be the gateway which does not have the fault; the second gateway indication information for indicating the second gateway with the IP address belonging to the fourth network segment is obtained by responding to the fact that the IP address of any gateway does not belong to the third network segment and the IP address of at least one gateway belongs to the fourth network segment, wherein when the IP address of any gateway does not belong to the third network segment according to the routing table, the gateway with the IP address being set as belonging to the third network segment can be understood to have a fault, so that the scheme can ensure that when part of gateways have faults, the corresponding gateway, namely the gateway with the IP address belonging to the fourth network segment, can be used as the second gateway to forward the message to be processed, and the reliability of forwarding the message to be processed is improved.
The technical scheme provided by the embodiment of the disclosure is applied to a gateway, and according to the technical scheme, a first message to be processed sent by a switch is received, and a source object identifier of the first message to be processed is obtained; acquiring second gateway indication information for indicating a second gateway according to the source object identifier and the corresponding relation between the source object and the gateway, and sending the second gateway indication information and the first message to be processed to the switch; and receiving a second message to be processed sent by the switch, and forwarding the second message to be processed. In the method, it is considered that the bandwidth of the second gateway for forwarding the to-be-processed packet satisfies the bandwidth requirement of the source object corresponding to the second gateway, so that even if the data stream to which the packet transmitted by the source object corresponding to the second gateway belongs is less, the bandwidth of the packet forwarded by the second gateway, that is, the total bandwidth for forwarding the packet transmitted by the source object corresponding to the second gateway, is not affected at all, that is, the bandwidth of the packet forwarded by the corresponding gateway can satisfy the bandwidth requirement of the source object corresponding to the gateway, and the packet forwarded by the source object can be ensured to be forwarded in time, thereby improving the user experience.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments when taken in conjunction with the accompanying drawings. In the drawings:
fig. 1 shows a schematic block diagram of a message processing system according to an embodiment of the present disclosure.
Fig. 2 shows a flow chart of a control method according to an embodiment of the present disclosure.
Fig. 3 shows a schematic block diagram of a message processing system according to an embodiment of the present disclosure.
Fig. 4 shows a flow chart of a control method according to an embodiment of the present disclosure.
Fig. 5 shows a block diagram of a control device according to an embodiment of the present disclosure.
Fig. 6 shows a block diagram of a control device according to an embodiment of the present disclosure.
Fig. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
FIG. 8 is a block diagram of a computer system suitable for use in implementing a method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Also, for the sake of clarity, parts not relevant to the description of the exemplary embodiments are omitted in the drawings.
In the present disclosure, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of labels, numbers, steps, actions, components, parts, or combinations thereof disclosed in the present specification, and are not intended to preclude the possibility that one or more other labels, numbers, steps, actions, components, parts, or combinations thereof are present or added.
It should be further noted that the embodiments and labels in the embodiments of the present disclosure may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
As described in the background art, the problem of slow message forwarding exists in the prior art, and the inventors found that the reason for this is that when network service products are sold, in consideration of factors such as load balancing, the bandwidth of each gateway needs to be limited, that is, the speed of transmitting a message by a corresponding source object is limited, so that a gateway serving as a network access point has a speed-limiting function, that is, the bandwidth of forwarding a message by a gateway is limited. In some scenarios (e.g., a cloud computing scenario), the gateways may be deployed in a distributed manner, and the packets transmitted by the source object are distributed to different gateways according to the data stream to which the packets transmitted by the source object belong, so that the packets are forwarded by the multiple gateways. The purpose of limiting the speed of the source object for sending the message can be achieved by uniformly limiting the bandwidth of each gateway in the plurality of gateways.
However, since the number of data streams to which the packets transmitted by the source object belong is not fixed, when the number of data streams to which the packets transmitted by the source object belong is small, the packets transmitted by the source object may be allocated to a few gateways, so that the packets transmitted by the source object are only forwarded by the few gateways. Since the total bandwidth of the gateways is less than the total bandwidth of all the gateways allocated for forwarding the message transmitted by the source object, the problem that the bandwidth of the message forwarded by the gateway is less than the bandwidth requirement of the source object, that is, the speed of forwarding the message by the gateway is too low occurs, so that the message of the corresponding source object cannot be forwarded in time, and the user experience is damaged.
In view of the disadvantages of the above solutions, the inventor of the present disclosure proposes a new solution applied to a switch: the method comprises the steps that a message to be processed is obtained, the message to be processed is sent to a first gateway, the first gateway is used for obtaining a source object identifier of the message to be processed, second gateway indicating information used for indicating a second gateway is obtained according to the source object identifier and the corresponding relation between a source object and the gateway, and the second gateway indicating information and the message to be processed are sent to a switch; and receiving second gateway indication information and the message to be processed, and forwarding the message to be processed to a second gateway according to the second gateway indication information, wherein the second gateway is used for forwarding the message to be processed. In consideration of the fact that the bandwidth of the second gateway for forwarding the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is less, the bandwidth of the message forwarded by the second gateway, that is, the total bandwidth of the message transmitted by the source object corresponding to the second gateway, is not affected at all, that is, the bandwidth of the message forwarded by the corresponding gateway can meet the bandwidth requirement of the source object corresponding to the gateway, the message forwarded by the source object can be ensured to be forwarded in time, and the user experience is improved.
Fig. 1 shows a schematic block diagram of a message processing system according to an embodiment of the present disclosure, and as shown in fig. 1, the message processing system includes a switch 101 and at least one gateway 102.
The Switch 101 may be understood as a network element having a Switch (Switch) function. The Switch 101 may be a Switch or a Virtual Switch (Virtual Switch), and the Switch 101 may be an uplink Switch cluster, for example.
The Gateway 102 may be a network element having a Gateway (Gateway) function, and the Gateway 102 may be a Gateway or a Virtual Gateway (Virtual Gateway). Illustratively, the gateway 102 may be any one of a plurality of gateways deployed under a cluster of upstream switches.
The switch may be understood as a network device for data forwarding, and the switch may be a transmission channel provided for any two network nodes accessing the switch. The virtual switch may be understood as a virtual switch virtualized by a virtual machine after the virtual machine is virtually obtained based on a physical machine, and the virtual switch may communicate with other virtual machines or physical machines.
Gateways, which may be understood as network devices used to interconnect networks, may be used to provide translation services between different communication protocols, data formats or languages, systems. The virtual gateway may be understood as a virtual gateway virtualized by a virtual machine after the virtual machine is obtained based on a physical machine, and the virtual gateway may communicate with other virtual machines or physical machines through the virtual gateway.
A virtual machine may be understood as a virtualization layer that runs on a virtualization platform. For example, in a cloud computing platform, a virtual machine may be one or more independent hosts (i.e., cloud hosts) or one or more independent servers (i.e., cloud servers) partitioned by the virtualization technology on a cluster server; in other virtualization systems or platforms, a virtual machine may be one or more virtual hosts implemented using the virtualization technology on one or more physical hosts, or may be one or more virtual private servers implemented using the virtualization technology on one or more physical servers. Physical machines, as may be understood, are the nomenclature of physical computers relative to virtual machines. The physical machine may provide a hardware environment for the virtual machine.
In order to solve the above problems, the present disclosure proposes a control method, system, device, and medium.
Fig. 2 shows a flowchart of a control method according to an embodiment of the present disclosure, which is applied to the switch shown in fig. 1. As shown in fig. 2, the control method includes steps S101-S102.
In step S101, a message to be processed is acquired, and the message to be processed is sent to the first gateway.
The first gateway is used for acquiring a source object identifier of a message to be processed, acquiring second gateway indication information for indicating a second gateway according to the source object identifier and a corresponding relation between the source object and the gateway, and sending the second gateway indication information and the message to be processed to the switch, wherein the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway.
In step S102, the second gateway indication information and the message to be processed are received, and the message to be processed is forwarded to the second gateway according to the second gateway indication information.
The second gateway is used for forwarding the message to be processed.
In an embodiment of the present disclosure, a message to be processed may be understood as a message transmitted by a source object, where the source object may be understood as a tenant or a service using a corresponding network service product. Wherein the corresponding network service product can be a network service product purchased by a tenant or a service.
In an embodiment of the present disclosure, acquiring a to-be-processed packet may be understood as receiving a to-be-processed packet sent by another device or system, or may be reading and writing a to-be-processed packet acquired in advance.
In an embodiment of the present disclosure, the first gateway and the second gateway may be understood as belonging to a gateway corresponding to a switch, and for example, when the switch is an uplink switch cluster, the first gateway and the second gateway may be gateways deployed under the uplink switch cluster.
In an embodiment of the present disclosure, the source object identifier of the to-be-processed packet may be understood as a source object used to indicate transmission of the to-be-processed packet. The source object identifier of the message to be processed is obtained, which can be understood as reading the source object identifier from a specified field in the message to be processed.
In an embodiment of the present disclosure, the correspondence between the source object and the gateway may be understood as indicating a source object corresponding to each gateway in at least one gateway, where each gateway may correspond to one or more source objects. The corresponding relationship between the object and the gateway may be a database or a form, and the implementation manner of the corresponding relationship between the object and the gateway is not specifically limited in the present disclosure.
In an embodiment of the present disclosure, the second gateway indication information is obtained according to the source object identifier and the corresponding relationship between the source object and the gateway, and it may be understood that a second gateway, which is a gateway corresponding to the source object indicated by the source object identifier, is searched in the corresponding relationship between the source object and the gateway, and second gateway indication information for indicating the second gateway is generated.
In an embodiment of the present disclosure, the bandwidth of the second gateway satisfies the bandwidth requirement of the source object corresponding to the second gateway, which may be understood as the bandwidth of the second gateway is greater than or equal to the total bandwidth of the network service products used or purchased by one or more source objects corresponding to the second gateway.
In an embodiment of the present disclosure, the sending of the second gateway indication information and the to-be-processed message to the switch may be directly sending the second gateway indication information and the to-be-processed message to the switch, or encapsulating the second gateway indication information and the to-be-processed message and sending the encapsulated message to the switch.
The technical scheme provided by the embodiment of the disclosure is applied to a switch, and according to the technical scheme, a message to be processed is obtained and sent to a first gateway, the first gateway is used for obtaining a source object identifier of the message to be processed, obtaining second gateway indicating information for indicating a second gateway according to the source object identifier and a corresponding relation between a source object and the gateway, and sending the second gateway indicating information and the message to be processed to the switch; and receiving second gateway indication information and the message to be processed, and forwarding the message to be processed to a second gateway according to the second gateway indication information, wherein the second gateway is used for forwarding the message to be processed. In consideration of the fact that the bandwidth of the second gateway for forwarding the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is less, the bandwidth of the message forwarded by the second gateway, that is, the total bandwidth of the message transmitted by the source object corresponding to the second gateway, is not affected at all, that is, the bandwidth of the message forwarded by the corresponding gateway can meet the bandwidth requirement of the source object corresponding to the gateway, the message forwarded by the source object can be ensured to be forwarded in time, and the user experience is improved.
In an implementation manner of the present disclosure, before the first gateway sends the message to be processed, the method further includes the following steps:
acquiring message attribute information of a message to be processed, wherein the message attribute information comprises at least one of a source IP address and a destination IP address of the message to be processed;
acquiring first gateway indication information for indicating a first gateway according to the message attribute information and the corresponding relation between the message attribute information and the gateway;
sending a message to be processed to a first gateway, which can be realized by the following steps:
and sending the message to be processed to the first gateway according to the first gateway indication information.
In an embodiment of the present disclosure, the packet attribute information of the packet to be processed may include at least one of a source IP address and a destination IP address of the packet to be processed, and the packet attribute information of the packet to be processed may further include at least one of a source port number, a destination port number, an interface index, a protocol number, a previous hop IP address, and a next hop IP address of the packet to be processed.
In an embodiment of the present disclosure, the correspondence between the message attribute information and the gateways may be understood as being used to indicate the message attribute information corresponding to each gateway in at least one gateway, where each gateway may correspond to one type of message attribute information, and each gateway may also correspond to multiple different types of message attribute information. The corresponding relation between the message attribute information and the gateway can be a database or a form, and the implementation mode of the corresponding relation between the message attribute information and the gateway is not specifically limited in the disclosure.
In an embodiment of the present disclosure, the first gateway indication information is obtained according to the message attribute information and the corresponding relationship between the message attribute information and the gateway, which may be understood as searching for a gateway corresponding to the message attribute information, that is, a first gateway, in the corresponding relationship between the message attribute information and the gateway, and generating the first gateway indication information for indicating the first gateway.
According to the technical scheme provided by the embodiment of the disclosure, by acquiring the message attribute information of the message to be processed, acquiring the first gateway indication information for indicating the first gateway according to the message attribute information and the corresponding relationship between the message attribute information and the gateway, and sending the message to be processed to the first gateway according to the first gateway indication information, the first gateway indication information can be acquired based on the message attribute information of the message to be processed according to the preset corresponding relationship between the message attribute information and the gateway, so that the first gateway can be managed conveniently.
In an implementation manner of the present disclosure, before sending a message to be processed to a first gateway, the method further includes the following steps:
acquiring first gateway indication information for indicating a first gateway, wherein the first gateway is any one of a plurality of gateways corresponding to an exchanger;
sending a message to be processed to a first gateway, which can be realized by the following steps:
and sending the message to be processed to the first gateway according to the first gateway indication information.
According to the technical scheme provided by the embodiment of the disclosure, by acquiring the first gateway indication information for indicating the first gateway and sending the message to be processed to the first gateway according to the first gateway indication information, because the first gateway is any one of the plurality of gateways corresponding to the switch, the first gateway does not need to be managed, specifically, the gateway, and the consumed processing resources are reduced.
In an implementation manner of the present disclosure, before sending the second gateway indication information and the to-be-processed packet to the switch, the method further includes the following steps:
packaging the second gateway indication information and the message to be processed to obtain a first packaged message;
sending the second gateway indication information and the message to be processed to the switch can be realized by the following steps:
sending a first encapsulation message to the switch:
receiving the second gateway indication information and the message to be processed, which can be realized by the following steps:
and receiving the first encapsulation message.
In an embodiment of the present disclosure, encapsulating the second gateway indication information and the to-be-processed message may be understood as encapsulating the second gateway indication information and the to-be-processed message in the same message, that is, the first encapsulated message, and exemplarily, encapsulating the second gateway indication information in a header of the first encapsulated message, and encapsulating the to-be-processed message in a data payload portion of the first encapsulated message.
According to the technical scheme provided by the embodiment of the disclosure, the first gateway packages the second gateway indication information and the message to be processed to obtain the first package message, and sends the first package message to the switch, so that the switch can receive the first package message, and the first package message can be conveniently sent.
In one implementation manner of the present disclosure, the correspondence between the source object and the gateway includes a correspondence between the source object and a diversion IP address, the diversion IP address and an IP address of the gateway corresponding to the source object belong to the same network segment, and the second gateway indication information includes a second diversion IP address;
the message to be processed is forwarded to the second gateway according to the second gateway indication information, and the method can be realized by the following steps:
and acquiring second gateway indication information of a second gateway for indicating that the IP address and the second diversion IP address belong to the same network segment according to the second diversion IP address and the routing table, and forwarding the message to be processed to the second gateway according to the second gateway indication information.
In an embodiment of the present disclosure, the correspondence between the source object and the stream guidance IP address may be understood as indicating a stream guidance IP address corresponding to each source object. The corresponding relation between the source object and the stream guidance IP address can be a database or a form, and the implementation mode of the corresponding relation between the source object and the stream guidance IP address is not specifically limited in the disclosure.
In an embodiment of the present disclosure, the routing table may be understood as a corresponding relationship between IP addresses used for at least one gateway and the gateway, where the gateway may periodically send routing update information to the switch, and the switch may update the routing table according to the routing update information, so as to ensure that the gateway in the routing table is a gateway that normally operates in a recent period of time.
In an embodiment of the present disclosure, obtaining the second gateway indication information according to the second diversion IP address and the routing table may be understood as performing query in the routing table according to the second diversion IP address to determine a gateway and an IP address of the second gateway that belong to the same network segment as the second diversion IP address, and generating the second gateway indication information for indicating the second gateway.
According to the technical scheme provided by the embodiment of the disclosure, the corresponding relationship between the source object and the gateway is limited to include the corresponding relationship between the source object and the diversion IP address, the diversion IP address is limited to belong to the same network segment as the IP address of the gateway corresponding to the source object, the second gateway indication information is limited to include the second diversion IP address, the second gateway indication information of the second gateway for indicating that the IP address and the second diversion IP address belong to the same network segment is obtained according to the second diversion IP address and the routing table, and the message to be processed is forwarded to the second gateway according to the second gateway indication information, so that which gateway the second gateway is can be conveniently managed.
In an implementation manner of the present disclosure, according to the second diversion IP address and the routing table, second gateway indication information for indicating that the IP address and the second diversion IP address belong to a second gateway in the same network segment is obtained, which may be implemented by the following steps:
and acquiring a plurality of network segments to which the second diversion IP addresses belong according to the second diversion IP addresses and the routing table, and acquiring second gateway indication information for indicating a second gateway to which the IP addresses belong to a first network segment, wherein the first network segment is the network segment with the longest subnet mask in the network segments.
According to the technical scheme provided by the embodiment of the disclosure, the plurality of network segments to which the second diversion IP addresses belong are obtained according to the second diversion IP addresses and the routing table, and the second gateway indication information for indicating the second gateway of which the IP addresses belong to the first network segment is obtained, wherein the first network segment is the network segment with the longest subnet mask in the plurality of network segments, so that the second gateway indicated by the second gateway indication information can be unique, the message to be processed is ensured not to be forwarded by the plurality of gateways, repeated forwarding is avoided, and the consumed processing resources are reduced.
In an implementation manner of the present disclosure, obtaining second gateway indication information for indicating that an IP address belongs to a second gateway of a first network segment may be implemented by the following steps:
responding to the fact that the IP address of at least one gateway belongs to the first network segment according to the routing table, and obtaining second gateway indication information of a second gateway used for indicating that the IP address belongs to the first network segment;
the method further comprises the steps of:
and in response to the fact that the IP addresses of any gateway do not belong to the first network segment and the IP address of at least one gateway belongs to the second network segment according to the routing table, acquiring second gateway indication information of the second gateway for indicating that the IP address belongs to the second network segment, wherein the second network segment is the network segment with the next longest subnet mask in the plurality of network segments.
In an embodiment of the present disclosure, it is determined that the IP address of any gateway does not belong to the first network segment according to the routing table, and it may be understood that one or more gateways whose IP addresses all belong to the first network segment may have a fault, and the gateway fails to send corresponding routing update information to the routing table, so that the switch updates the routing table according to the received routing update information, and the routing table does not include the IP addresses of the one or more gateways that belong to the first network segment.
Fig. 3 shows a schematic block diagram of a message processing system according to an embodiment of the present disclosure, and as shown in fig. 3, the message processing system includes a switch 101 and at least a gateway 112, a gateway 122, a gateway 132, and a gateway 142. The network segments to which the IP address of the gateway 112 belongs include 192.168.0.0/26, 192.168.0.0/25 and 192.168.0.0/24, the network segments to which the IP address of the gateway 122 belongs include 192.168.0.64/26, 192.168.0/25 and 192.168.0.0/24, the network segments to which the IP address of the gateway 132 belongs include 192.168.0.128/26, 192.168.0.128/25 and 192.168.0.0/24, and the network segments to which the IP address of the gateway 142 belongs include 192.168.0.196/26, 192.168.0.128/25 and 192.168.0.0/24. And if the diversion IP address is 192.168.0.1, the first diversion network segment with the longest subnet mask in the plurality of network segments to which the diversion IP address belongs is 192.168.0.0/26. When the IP address of any gateway does not belong to 192.168.0.0/26 according to the routing table due to the failure of the gateway 112, it may be determined that the segment with the sub-net mask sub-length in the plurality of segments to which the diversion IP address belongs, i.e., 192.168.0.0/25, is the second segment, and second gateway indication information for indicating that the IP address belongs to 192.168.0.0/25, i.e., the gateway 122, is obtained.
According to the technical scheme provided by the embodiment of the disclosure, by responding to the fact that the IP address of at least one gateway is determined to belong to a first network segment according to a routing table, and acquiring second gateway indication information of a second gateway for indicating that the IP address belongs to the first network segment, the IP address of at least one gateway is determined to belong to the first network segment according to the routing table, it can be understood that at least one gateway of which the IP address is set to belong to the first network segment is not in fault, so that the second gateway for forwarding the message to be processed can be ensured to be the gateway which is not in fault; the method comprises the steps of responding to the fact that the IP address of any gateway does not belong to a first network segment according to a routing table, and the IP address of at least one gateway belongs to a second network segment with the sub-net mask number of the plurality of network segments, and obtaining second gateway indication information for indicating that the IP address belongs to a second gateway of the second network segment, wherein when the IP address of any gateway does not belong to the first network segment according to the routing table, the gateway with the IP address set as belonging to the first network segment is possible to have faults.
In an implementation manner of the present disclosure, according to the second diversion IP address and the routing table, second gateway indication information for indicating that the IP address and the second diversion IP address belong to a second gateway in the same network segment is obtained, which may be implemented by the following steps:
and acquiring a plurality of network segments to which the second diversion IP address belongs according to the second diversion IP address and the routing table, and acquiring second gateway indication information for indicating a second gateway to which the IP address belongs to a third network segment, wherein the third network segment is the network segment with the shortest routing path length in the plurality of network segments.
In an embodiment of the present disclosure, a segment with the shortest routing path length among a plurality of segments may be understood as a segment with the shortest routing path length between the segment and the switch.
According to the technical scheme provided by the embodiment of the disclosure, the plurality of network segments to which the second diversion IP address belongs are obtained according to the second diversion IP address and the routing table, and the second gateway indication information for indicating the second gateway of which the IP address belongs to the third network segment is obtained, wherein the third network segment is the network segment with the shortest routing path length in the plurality of network segments, so that the second gateway indicated by the second gateway indication information can be unique, the message to be processed is ensured not to be forwarded by the plurality of gateways, repeated forwarding is avoided, and consumed processing resources are reduced.
In an implementation manner of the present disclosure, obtaining second gateway indication information for indicating that an IP address belongs to a second gateway of a third network segment may be implemented by the following steps:
responding to the IP address of at least one gateway in the third network segment determined according to the routing table, and acquiring second gateway indication information for indicating a second gateway in the third network segment;
the method further comprises the following steps:
and in response to the fact that the IP address of any gateway does not belong to the third network segment and the IP address of at least one gateway belongs to the fourth network segment according to the routing table, acquiring second gateway indication information of a second gateway for indicating that the IP address belongs to the fourth network segment, wherein the fourth network segment is the network segment with the second shortest path length in the plurality of network segments.
In an embodiment of the present disclosure, it is determined that the IP address of any gateway does not belong to the third network segment according to the routing table, and it may be understood that one or more gateways whose IP addresses all belong to the third network segment may have a fault, and the gateway fails to send corresponding routing update information to the routing table, so that the switch updates the routing table according to the received routing update information, and the routing table does not include the IP addresses of the one or more gateways that belong to the third network segment.
According to the technical scheme provided by the embodiment of the disclosure, in response to the fact that the IP address of at least one gateway in the third network segment is determined according to the routing table, second gateway indication information for indicating the second gateway in the third network segment is obtained, wherein the IP address of at least one gateway is determined to belong to the third network segment according to the routing table, and it can be understood that the IP address is set to be that at least one gateway belonging to the third network segment does not have a fault, so that the second gateway for forwarding the message to be processed can be ensured to be the gateway which does not have the fault; the second gateway indication information for indicating the second gateway with the IP address belonging to the fourth network segment is obtained by responding to the fact that the IP address of any gateway does not belong to the third network segment and the IP address of at least one gateway belongs to the fourth network segment, wherein when the IP address of any gateway does not belong to the third network segment according to the routing table, the gateway with the IP address being set as belonging to the third network segment can be understood to have a fault, so that the scheme can ensure that when part of gateways have faults, the corresponding gateway, namely the gateway with the IP address belonging to the fourth network segment, can be used as the second gateway to forward the message to be processed, and the reliability of forwarding the message to be processed is improved.
Fig. 4 shows a flowchart of a control method according to an embodiment of the present disclosure, which is applied to the gateway shown in fig. 1. As shown in fig. 4, the control method includes steps S201 to S203.
In step S201, a first message to be processed sent by the switch is received, and a source object identifier of the first message to be processed is obtained.
In step S202, second gateway indication information for indicating a second gateway is obtained according to the source object identifier and the corresponding relationship between the source object and the gateway, and the second gateway indication information and the first message to be processed are sent to the switch.
The bandwidth of the second gateway meets the bandwidth requirement of a source object corresponding to the second gateway;
in step S203, the second message to be processed sent by the switch is received, and the second message to be processed is forwarded.
In an embodiment of the present disclosure, the first message to be processed may be understood as a message transmitted by a source object, where the source object may be understood as a tenant or a service using a corresponding network service product. Wherein the corresponding network service product can be a network service product purchased by a tenant or a service.
In an embodiment of the present disclosure, the obtaining of the first message to be processed may be understood as receiving the first message to be processed sent by another device or system, or may be reading and writing the message to be processed that is obtained in advance.
In an embodiment of the present disclosure, the second gateway may be understood as belonging to a gateway corresponding to a switch, and for example, when the switch is an uplink switch cluster, the second gateway may be a gateway deployed under the uplink switch cluster.
In an embodiment of the present disclosure, the source object identifier of the first message to be processed may be understood as a source object used to indicate transmission of the first message to be processed. The source object identifier of the first message to be processed is obtained, which may be understood as reading the source object identifier from a specified field in the first message to be processed.
In an embodiment of the present disclosure, the correspondence between the source object and the gateway may be understood as indicating a source object corresponding to each gateway in at least one gateway, where each gateway may correspond to one or more source objects. The corresponding relationship between the object and the gateway may be a database or a form, and the present disclosure does not specifically limit the implementation manner of the corresponding relationship between the object and the gateway.
In an embodiment of the present disclosure, the second gateway indication information is obtained according to the source object identifier and the corresponding relationship between the source object and the gateway, and it may be understood that a second gateway, which is a gateway corresponding to the source object indicated by the source object identifier, is searched in the corresponding relationship between the source object and the gateway, and second gateway indication information for indicating the second gateway is generated.
In an embodiment of the present disclosure, the bandwidth of the second gateway satisfies the bandwidth requirement of the source object corresponding to the second gateway, which may be understood as the bandwidth of the second gateway is greater than or equal to the total bandwidth of the network service products used or purchased by one or more source objects corresponding to the second gateway.
In an embodiment of the present disclosure, the second to-be-processed packet may be understood as a packet transmitted by the source object, where gateway indication information for indicating the gateway itself may be obtained according to a source object identifier of the second to-be-processed packet and a corresponding relationship between the source object and the gateway.
The technical scheme provided by the embodiment of the disclosure is applied to a gateway, and according to the technical scheme, a first message to be processed sent by a switch is received, and a source object identifier of the first message to be processed is obtained; acquiring second gateway indication information for indicating a second gateway according to the source object identifier and the corresponding relation between the source object and the gateway, and sending the second gateway indication information and the first message to be processed to the switch; and receiving a second message to be processed sent by the switch, and forwarding the second message to be processed. In consideration of the fact that the bandwidth of the second gateway for forwarding the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is less, the bandwidth of the message forwarded by the second gateway, that is, the total bandwidth of the message transmitted by the source object corresponding to the second gateway, is not affected at all, that is, the bandwidth of the message forwarded by the corresponding gateway can meet the bandwidth requirement of the source object corresponding to the gateway, the message forwarded by the source object can be ensured to be forwarded in time, and the user experience is improved.
A message processing system according to an embodiment of the present disclosure is described below with reference to fig. 1, and as shown in fig. 1, the message processing system includes a switch 101 and at least one gateway 102, where the switch 101 is configured to implement the method steps of the embodiment corresponding to fig. 1, and the gateway 102 is configured to implement the method steps of the embodiment corresponding to fig. 3.
According to the technical scheme provided by the embodiment of the disclosure, a switch acquires a message to be processed and sends the message to be processed to a first gateway, the first gateway is used for acquiring a source object identifier of the message to be processed, acquiring second gateway indication information for indicating a second gateway according to the source object identifier and a corresponding relation between a source object and the gateway, and sending the second gateway indication information and the message to be processed to the switch; and the switch receives the second gateway indication information and the message to be processed, and forwards the message to be processed to the second gateway according to the second gateway indication information, wherein the second gateway is used for forwarding the message to be processed. In consideration of the fact that the bandwidth of the second gateway for forwarding the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is less, the bandwidth of the message forwarded by the second gateway, that is, the total bandwidth of the message transmitted by the source object corresponding to the second gateway, is not affected at all, that is, the bandwidth of the message forwarded by the corresponding gateway can meet the bandwidth requirement of the source object corresponding to the gateway, the message forwarded by the source object can be ensured to be forwarded in time, and the user experience is improved.
A control device according to an embodiment of the present disclosure is described below with reference to fig. 5. Fig. 5 shows a block diagram of a control device according to an embodiment of the present disclosure.
As shown in fig. 5, the control device 200 includes:
a first message sending module 201, configured to obtain a message to be processed, and send the message to be processed to a first gateway, where the first gateway is configured to obtain a source object identifier of the message to be processed, obtain second gateway indication information used for indicating a second gateway according to the source object identifier and a corresponding relationship between the source object and the gateway, and send the second gateway indication information and the message to be processed to a switch, where a bandwidth of the second gateway meets a bandwidth requirement of a source object corresponding to the second gateway;
the first packet receiving module 202 is configured to receive the second gateway indication information and the packet to be processed, and forward the packet to be processed to the second gateway according to the second gateway indication information, where the second gateway is configured to forward the packet to be processed.
According to the technical scheme provided by the embodiment of the disclosure, a message to be processed is obtained, and the message to be processed is sent to a first gateway, the first gateway is used for obtaining a source object identifier of the message to be processed, obtaining second gateway indication information used for indicating a second gateway according to the source object identifier and a corresponding relation between a source object and the gateway, and sending the second gateway indication information and the message to be processed to a switch; and receiving second gateway indication information and a message to be processed, and forwarding the message to be processed to a second gateway according to the second gateway indication information, wherein the second gateway is used for forwarding the message to be processed. In consideration of the fact that the bandwidth of the second gateway for forwarding the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is less, the bandwidth of the message forwarded by the second gateway, that is, the total bandwidth of the message transmitted by the source object corresponding to the second gateway, is not affected at all, that is, the bandwidth of the message forwarded by the corresponding gateway can meet the bandwidth requirement of the source object corresponding to the gateway, the message forwarded by the source object can be ensured to be forwarded in time, and the user experience is improved.
It will be appreciated by those skilled in the art that the technical solution described with reference to fig. 5 can be combined with the embodiment corresponding to fig. 2 described above, so as to achieve the technical effects achieved by the embodiment corresponding to fig. 2. Specific contents may refer to the description of the embodiment corresponding to fig. 2, and specific contents thereof are not described herein again.
A control device according to an embodiment of the present disclosure is described below with reference to fig. 6. Fig. 6 shows a block diagram of a control device according to an embodiment of the present disclosure.
As shown in fig. 6, the control device 300 includes:
the second message receiving module 301 is configured to receive a first message to be processed sent by the switch, and obtain a source object identifier of the first message to be processed;
a second packet sending module 302, configured to obtain, according to the source object identifier and a correspondence between a source object and a gateway, second gateway indication information for indicating a second gateway, and send the second gateway indication information and the first packet to be processed to the switch, where a bandwidth of the second gateway meets a bandwidth requirement of the source object corresponding to the second gateway;
the third message sending module 303 is configured to receive the second message to be processed sent by the switch, and forward the second message to be processed.
According to the technical scheme provided by the embodiment of the disclosure, a first message to be processed sent by a switch is received, and a source object identifier of the first message to be processed is obtained; acquiring second gateway indication information for indicating a second gateway according to the source object identifier and the corresponding relation between the source object and the gateway, and sending the second gateway indication information and the first message to be processed to the switch; and receiving a second message to be processed sent by the switch, and forwarding the second message to be processed. In consideration of the fact that the bandwidth of the second gateway for forwarding the message to be processed meets the bandwidth requirement of the source object corresponding to the second gateway, even if the data stream to which the message transmitted by the source object corresponding to the second gateway belongs is less, the bandwidth of the message forwarded by the second gateway, that is, the total bandwidth of the message transmitted by the source object corresponding to the second gateway, is not affected at all, that is, the bandwidth of the message forwarded by the corresponding gateway can meet the bandwidth requirement of the source object corresponding to the gateway, the message forwarded by the source object can be ensured to be forwarded in time, and the user experience is improved.
Fig. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
The disclosed embodiments also provide an electronic device, as shown in fig. 7, the electronic device 400 includes at least one processor 401. And a memory 402 communicatively coupled to the at least one processor 401. Wherein the memory 402 stores instructions executable by the at least one processor 401, the instructions executable by the at least one processor 401 to perform the steps of:
in a first aspect, an embodiment of the present disclosure provides a control method, where the method is applied to a switch, and the method includes:
acquiring a message to be processed, sending the message to be processed to a first gateway, wherein the first gateway is used for acquiring a source object identifier of the message to be processed, acquiring second gateway indication information for indicating a second gateway according to the source object identifier and a corresponding relation between a source object and the gateway, and sending the second gateway indication information and the message to be processed to a switch, and the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;
and receiving second gateway indication information and the message to be processed, and forwarding the message to be processed to a second gateway according to the second gateway indication information, wherein the second gateway is used for forwarding the message to be processed.
In an implementation manner of the present disclosure, before sending a message to be processed to a first gateway, the method further includes:
acquiring message attribute information of a message to be processed, wherein the message attribute information comprises at least one of a source IP address and a destination IP address of the message to be processed;
acquiring first gateway indication information for indicating a first gateway according to the message attribute information and the corresponding relation between the message attribute information and the gateway;
sending a message to be processed to a first gateway, comprising:
and sending the message to be processed to the first gateway according to the first gateway indication information.
In an implementation manner of the present disclosure, before sending a message to be processed to a first gateway, the method further includes:
acquiring first gateway indication information for indicating a first gateway, wherein the first gateway is any one of a plurality of gateways corresponding to an exchanger;
sending a message to be processed to a first gateway, comprising:
and sending the message to be processed to the first gateway according to the first gateway indication information.
In an implementation manner of the present disclosure, before sending the second gateway indication information and the to-be-processed packet to the switch, the method further includes:
packaging the second gateway indication information and the message to be processed to obtain a first packaged message;
sending the second gateway indication information and the message to be processed to the switch, including:
sending a first encapsulation message to the switch:
receiving second gateway indication information and a message to be processed, including:
and receiving the first encapsulation message.
In one implementation manner of the present disclosure, the correspondence between the source object and the gateway includes a correspondence between the source object and a diversion IP address, the diversion IP address and an IP address of the gateway corresponding to the source object belong to the same network segment, and the second gateway indication information includes a second diversion IP address;
forwarding the message to be processed to the second gateway according to the second gateway indication information, including:
and acquiring second gateway indication information of a second gateway for indicating that the IP address and the second diversion IP address belong to the same network segment according to the second diversion IP address and the routing table, and forwarding the message to be processed to the second gateway according to the second gateway indication information.
In one implementation manner of the present disclosure, acquiring, according to the second diversion IP address and the routing table, second gateway indication information of a second gateway, which is used for indicating that the IP address and the second diversion IP address belong to the same network segment, includes:
and acquiring a plurality of network segments to which the second diversion IP addresses belong according to the second diversion IP addresses and the routing table, and acquiring second gateway indication information for indicating a second gateway to which the IP addresses belong to a first network segment, wherein the first network segment is the network segment with the longest subnet mask in the network segments.
In one implementation manner of the present disclosure, acquiring second gateway indication information for indicating that an IP address belongs to a second gateway of a first network segment includes:
responding to the fact that the IP address of at least one gateway belongs to the first network segment according to the routing table, and obtaining second gateway indication information of a second gateway used for indicating that the IP address belongs to the first network segment;
the method further comprises the following steps:
and in response to the fact that the IP addresses of any gateway do not belong to the first network segment and the IP address of at least one gateway belongs to the second network segment according to the routing table, acquiring second gateway indication information of the second gateway for indicating that the IP address belongs to the second network segment, wherein the second network segment is the network segment with the next longest subnet mask in the plurality of network segments.
In one implementation manner of the present disclosure, acquiring, according to the second diversion IP address and the routing table, second gateway indication information of a second gateway, which is used for indicating that the IP address and the second diversion IP address belong to the same network segment, includes:
and acquiring a plurality of network segments to which the second diversion IP address belongs according to the second diversion IP address and the routing table, and acquiring second gateway indication information for indicating a second gateway to which the IP address belongs to a third network segment, wherein the third network segment is the network segment with the shortest routing path length in the plurality of network segments.
In one implementation manner of the present disclosure, acquiring second gateway indication information for indicating that an IP address belongs to a second gateway of a third network segment includes:
responding to the IP address of at least one gateway in the third network segment determined according to the routing table, and acquiring second gateway indication information for indicating a second gateway in the third network segment;
the method further comprises the following steps:
and in response to the fact that the IP address of any gateway does not belong to the third network segment and the IP address of at least one gateway belongs to the fourth network segment according to the routing table, acquiring second gateway indication information of a second gateway for indicating that the IP address belongs to the fourth network segment, wherein the fourth network segment is the network segment with the second shortest path length in the plurality of network segments.
In a second aspect, an embodiment of the present disclosure provides a control method, where the method is applied to a gateway, and the method includes:
receiving a first message to be processed sent by a switch, and acquiring a source object identifier of the first message to be processed;
acquiring second gateway indication information for indicating a second gateway according to the source object identifier and the corresponding relation between the source object and the gateway, and sending the second gateway indication information and the first message to be processed to the switch, wherein the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;
and receiving a second message to be processed sent by the switch, and forwarding the second message to be processed.
As shown in fig. 8, the computer system 500 includes a processing unit 501 that can execute various processes in the embodiments shown in the above-described figures according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the system 500 are also stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, mouse, etc. Including an output portion 507 such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc. A storage section 508 including a hard disk and the like. And a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary. The processing unit 501 may be implemented as a CPU, a GPU, a TPU, an FPGA, an NPU, or other processing units.
In particular, according to embodiments of the present disclosure, the methods described above with reference to the figures may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the methods of the figures. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. For example, embodiments of the present disclosure include a readable storage medium having stored thereon computer instructions which, when executed by a processor, implement program code for performing the methods in the figures.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, a program segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may 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 illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software or hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the node in the above embodiment. Or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (11)

1. A control method, wherein the method is applied to a switch, the method comprising:
acquiring a message to be processed, and sending the message to be processed to a first gateway, wherein the first gateway is used for acquiring a source object identifier of the message to be processed, acquiring second gateway indication information for indicating a second gateway according to the source object identifier and a corresponding relation between a source object and a gateway, and sending the second gateway indication information and the message to be processed to the switch, and the bandwidth of the second gateway meets the bandwidth requirement of a source object corresponding to the second gateway;
and receiving the second gateway indication information and the message to be processed, and forwarding the message to be processed to the second gateway according to the second gateway indication information, wherein the second gateway is used for forwarding the message to be processed.
2. The control method according to claim 1, wherein before the sending the second gateway indication information and the pending packet to the switch, the method further comprises:
packaging the second gateway indication information and the message to be processed to obtain a first packaged message;
the sending the second gateway indication information and the to-be-processed packet to the switch includes:
sending the first encapsulation packet to the switch:
the receiving the second gateway indication information and the to-be-processed packet includes:
and receiving the first encapsulation message.
3. The control method according to claim 1 or 2, wherein the correspondence between the source object and the gateway includes a correspondence between the source object and a diversion IP address, the diversion IP address and an IP address of the gateway corresponding to the source object belong to a same network segment, and the second gateway indication information includes a second diversion IP address;
the forwarding the message to be processed to the second gateway according to the second gateway indication information includes:
and acquiring second gateway indication information of a second gateway for indicating that the IP address and the second diversion IP address belong to the same network segment according to the second diversion IP address and a routing table, and forwarding the message to be processed to the second gateway according to the second gateway indication information.
4. The control method according to claim 3, wherein the obtaining, according to the second diversion IP address and a routing table, second gateway indication information for indicating that the IP address and the second diversion IP address belong to a second gateway in the same network segment includes:
and acquiring a plurality of network segments to which the second diversion IP addresses belong according to the second diversion IP addresses and the routing table, and acquiring second gateway indication information for indicating a second gateway to which the IP addresses belong to a first network segment, wherein the first network segment is the network segment with the longest subnet mask in the network segments.
5. The control method according to claim 4, wherein the obtaining second gateway indication information indicating that the IP address belongs to the second gateway of the first network segment includes:
responding to the fact that the IP address of at least one gateway belongs to the first network segment according to the routing table, and obtaining second gateway indication information of a second gateway used for indicating that the IP address belongs to the first network segment;
the method further comprises the following steps:
and in response to the fact that the IP address of any gateway does not belong to the first network segment and the IP address of at least one gateway belongs to a second network segment according to the routing table, acquiring second gateway indication information of the second gateway for indicating that the IP address belongs to the second network segment, wherein the second network segment is the network segment with the sub-mask code length in the plurality of network segments.
6. The control method according to claim 3, wherein the obtaining, according to the second diversion IP address and a routing table, second gateway indication information for indicating that the IP address and the second diversion IP address belong to a second gateway in the same network segment includes:
and acquiring a plurality of network segments to which the second diversion IP addresses belong according to the second diversion IP addresses and the routing table, and acquiring second gateway indication information for indicating a second gateway to which the IP addresses belong in a third network segment, wherein the third network segment is the network segment with the shortest routing path length in the network segments.
7. The control method according to claim 6, wherein the obtaining second gateway indication information indicating that the IP address belongs to the second gateway of the third network segment includes:
responding to the IP address of at least one gateway in the third network segment determined according to the routing table, and acquiring second gateway indication information for indicating a second gateway in the third network segment;
the method further comprises the following steps:
and in response to the fact that the IP address of any gateway does not belong to the third network segment and the IP address of at least one gateway belongs to a fourth network segment according to the routing table, acquiring second gateway indication information of a second gateway for indicating that the IP address belongs to the fourth network segment, wherein the fourth network segment is the network segment with the second shortest path length in the plurality of network segments.
8. A control method, wherein the method is applied to a gateway, and the method comprises the following steps:
receiving a first message to be processed sent by a switch, and acquiring a source object identifier of the first message to be processed;
acquiring second gateway indication information for indicating a second gateway according to the source object identifier and the corresponding relation between the source object and the gateway, and sending the second gateway indication information and the first message to be processed to the switch, wherein the bandwidth of the second gateway meets the bandwidth requirement of the source object corresponding to the second gateway;
and receiving a second message to be processed sent by the switch, and forwarding the second message to be processed.
9. A message processing system, wherein the message processing system comprises a switch for implementing the method steps of any of claims 1-7 and at least one gateway for implementing the method steps of claim 8.
10. An electronic device comprising a memory and at least one processor;
wherein the memory is to store one or more computer instructions, wherein the one or more computer instructions are to be executed by the at least one processor to implement the method steps of any one of claims 1-8.
11. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, carry out the method steps of any of claims 1-8.
CN202210349412.0A 2022-04-01 Control method, system, equipment and medium Active CN114900560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210349412.0A CN114900560B (en) 2022-04-01 Control method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210349412.0A CN114900560B (en) 2022-04-01 Control method, system, equipment and medium

Publications (2)

Publication Number Publication Date
CN114900560A true CN114900560A (en) 2022-08-12
CN114900560B CN114900560B (en) 2024-11-05

Family

ID=

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577722A (en) * 2009-06-03 2009-11-11 中兴通讯股份有限公司 Method for realizing MAC forced forwarding function and device
CN101772084A (en) * 2008-12-29 2010-07-07 华为技术有限公司 Media stream control method, related equipment and network system
CN106161283A (en) * 2015-03-31 2016-11-23 杭州华三通信技术有限公司 Message transmitting method and device
CN107147581A (en) * 2017-06-26 2017-09-08 杭州迪普科技股份有限公司 The maintaining method and device of route table items
CN108353022A (en) * 2015-11-05 2018-07-31 华为技术有限公司 A kind of processing method of data message, apparatus and system
CN109314909A (en) * 2016-07-29 2019-02-05 华为技术有限公司 A kind of switching method of anchor gateway, apparatus and system
CN110166375A (en) * 2019-05-27 2019-08-23 杭州迪普科技股份有限公司 A kind of message forwarding method and device
CN111030932A (en) * 2019-12-04 2020-04-17 锐捷网络股份有限公司 Method, device and system for anchoring data message
CN111585896A (en) * 2020-03-30 2020-08-25 华为技术有限公司 Data forwarding method and device and readable storage medium
CN112600720A (en) * 2021-03-08 2021-04-02 北京金山云网络技术有限公司 Method and apparatus for limiting bandwidth group, electronic device, and storage medium
CN112751691A (en) * 2019-10-29 2021-05-04 北京金山云网络技术有限公司 Network flow rate limiting method and device, central control equipment and gateway
CN113162857A (en) * 2016-01-18 2021-07-23 华为技术有限公司 Method and gateway for acquiring route on demand

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101772084A (en) * 2008-12-29 2010-07-07 华为技术有限公司 Media stream control method, related equipment and network system
CN101577722A (en) * 2009-06-03 2009-11-11 中兴通讯股份有限公司 Method for realizing MAC forced forwarding function and device
CN106161283A (en) * 2015-03-31 2016-11-23 杭州华三通信技术有限公司 Message transmitting method and device
CN108353022A (en) * 2015-11-05 2018-07-31 华为技术有限公司 A kind of processing method of data message, apparatus and system
US20180254921A1 (en) * 2015-11-05 2018-09-06 Huawei Technologies Co., Ltd. Packet processing method, apparatus, and system
CN113162857A (en) * 2016-01-18 2021-07-23 华为技术有限公司 Method and gateway for acquiring route on demand
CN109314909A (en) * 2016-07-29 2019-02-05 华为技术有限公司 A kind of switching method of anchor gateway, apparatus and system
CN107147581A (en) * 2017-06-26 2017-09-08 杭州迪普科技股份有限公司 The maintaining method and device of route table items
CN110166375A (en) * 2019-05-27 2019-08-23 杭州迪普科技股份有限公司 A kind of message forwarding method and device
CN112751691A (en) * 2019-10-29 2021-05-04 北京金山云网络技术有限公司 Network flow rate limiting method and device, central control equipment and gateway
WO2021083269A1 (en) * 2019-10-29 2021-05-06 北京金山云网络技术有限公司 Network traffic rate limiting method and device, central control equipment and gateways
CN111030932A (en) * 2019-12-04 2020-04-17 锐捷网络股份有限公司 Method, device and system for anchoring data message
CN111585896A (en) * 2020-03-30 2020-08-25 华为技术有限公司 Data forwarding method and device and readable storage medium
CN112600720A (en) * 2021-03-08 2021-04-02 北京金山云网络技术有限公司 Method and apparatus for limiting bandwidth group, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
US10757072B2 (en) Packet transmission method, apparatus, and system
US20240345988A1 (en) Message forwarding method and apparatus based on remote direct data storage, and network card and device
US11381507B2 (en) Virtual network device and related method
US9112801B2 (en) Quantized congestion notification in a virtual networking system
US9141420B2 (en) Overload control in a cloud computing environment
WO2022078415A1 (en) Packet forwarding method and network device
CN111345008B (en) Mobile edge host service notification method and device
CN109040243B (en) Message processing method and device
US10230795B2 (en) Data replication for a virtual networking system
US12052171B2 (en) Communication system and communication method
CN114050998A (en) Method, device, electronic equipment and medium for realizing remote direct memory access
US11063662B2 (en) Satellite network acceleration and optimization
CN116633934A (en) Load balancing method, device, node and storage medium
WO2022028216A1 (en) Network layer reachable information transmission method, system and apparatus, and network device
CN112243028A (en) Content distribution network data transmission method and device
CN109756412B (en) Data message forwarding method and equipment
CN114900560A (en) Control method, system, device and medium
CN114900560B (en) Control method, system, equipment and medium
CN105656994A (en) Business acceleration method and device
US11576072B2 (en) Methods, systems, and computer-readable media for distributing S1 connections to mobility management entities (MMEs) and N2 connections to access and mobility management functions (AMFs)
CN113395309B (en) Communication method and computer network
CN115065735A (en) Message processing method and electronic equipment
US10819631B2 (en) Network device supporting trill protocol and communication method thereof
CN111147345B (en) Cloud environment network isolation device and method and cloud system
WO2023026443A1 (en) Information processing system, information processing method, and information processing program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant