CN102571587B - Method and equipment for forwarding messages - Google Patents
Method and equipment for forwarding messages Download PDFInfo
- Publication number
- CN102571587B CN102571587B CN201210010387.XA CN201210010387A CN102571587B CN 102571587 B CN102571587 B CN 102571587B CN 201210010387 A CN201210010387 A CN 201210010387A CN 102571587 B CN102571587 B CN 102571587B
- Authority
- CN
- China
- Prior art keywords
- message
- board
- service
- gateway
- service board
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000004891 communication Methods 0.000 claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 9
- 238000012790 confirmation Methods 0.000 claims description 18
- 238000012217 deletion Methods 0.000 claims description 10
- 230000037430 deletion Effects 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 12
- 238000004590 computer program Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention discloses a method and equipment for forwarding messages and relates to the technical field of wireless communication. The method and the equipment for forwarding the messages are used for increasing the message forwarding efficiency of communication equipment. The method comprises the following steps: after the messages are received by a gateway board, reading a preconfigured forwarding table, wherein the forwarding table contains at least one table entry, and each table entry contains message header information and the home address of service board; finding out table entries containing the message header information in the messages in the forwarding table; if the table entries containing the message header information in the messages are found, sending the messages to the service boards which correspond to the home addresses of the service boards in the found table entries; if the table entries containing the message header information in the messages are not found, selecting one of the service boards, and sending the messages to the selected service board; and after the messages sent by the gateway board are received by the service boards, processing the messages. By adopting the method and the equipment for forwarding the messages, the message forwarding efficiency of the communication equipment can be increased.
Description
Technical Field
The present invention relates to the field of wireless communications, and in particular, to a method and an apparatus for forwarding a packet.
Background
With the full IP development of the mobile communication network, the service processing capability of the single board has not met the requirement of service development, and multiple boards are required to implement load sharing of the service, that is, a resource pool mode is adopted to implement load sharing of the service.
The traditional resource pool mode is realized by Network Address Transfer (NAT), specifically:
as shown in fig. 1, a plurality of service boards inside the communication device are connected to a gateway board, a public network IP address (e.g., 10.1.1.2) is configured on the gateway board, and an internal network IP address (e.g., 192.168.0.0/24) is configured on the service board.
In the inflow direction, after receiving an external message, a gateway board firstly checks a distribution table, wherein each table entry in the distribution table comprises a source IP address, a source port, a protocol type and a service board IP address, determines whether the distribution table has a table entry comprising the source IP address, the source port and the protocol type in the received message, and if so, replaces a target IP address in the received message with the service board IP address in the table entry and delivers the message to a service board corresponding to the service board IP address; if not, selecting a service board by adopting a rotation selection mode, replacing the destination IP address in the received message with the IP address of the selected service board, and delivering the message to the selected service board.
In the outflow direction, the service board delivers the message to be sent to the gateway board through the default gateway, and the gateway board replaces the source IP address in the message with the IP address of the gateway board and sends the message out.
In the process of implementing the invention, the inventor finds that the following technical problems exist in the prior art:
the traditional resource pool mode needs to replace IP addresses in both the message receiving and transmitting directions, so that the message forwarding efficiency is low; meanwhile, since only one IP address, i.e., the IP address of the gateway board, can be externally presented, all messages must pass through one gateway board, so that there is a performance bottleneck of the gateway board, and when the gateway board fails, the communication device cannot receive and transmit the messages, which causes communication interruption.
Disclosure of Invention
The embodiment of the invention provides a message forwarding method and device, which are used for improving the message forwarding efficiency of communication equipment in an inflow direction.
A message forwarding method is applied to communication equipment comprising at least one gateway board and service boards, wherein each service board is connected with each gateway board, IP addresses configured on the gateway board and the service boards are public network IP addresses, the public network IP addresses configured on the service boards are the same, the public network IP addresses configured on the gateway boards are different, and the public network IP addresses configured on the gateway boards and the service boards are different, and the method comprises the following steps:
after receiving a message which is sent from the outside and contains the IP address of the service board, the gateway board reads a pre-configured forwarding table; searching a table item containing message header information in the message in a forwarding table; if the table entry is found, the message is sent to the service board corresponding to the internal address of the service board in the found table entry; if not, selecting a service board, sending the message to the selected service board, and adding a table entry comprising message header information in the message and the internal address of the selected service board in a forwarding table;
after receiving the message sent by the gateway board, the service board processes the message;
the forwarding table includes at least one table entry, each table entry includes header information and an internal address of a service board, and the internal address of the service board is used to identify a position of the corresponding service board in the communication device.
A message forwarding device comprises at least one gateway board and service boards, wherein each service board is connected with each gateway board, IP addresses configured on the gateway board and the service boards are public network IP addresses, the public network IP addresses configured on the service boards are the same, the public network IP addresses configured on the gateway boards are different, and the public network IP addresses configured on the gateway boards and the service boards are different; wherein,
the gateway board is used for reading a pre-configured forwarding table after receiving a message which is sent from the outside and contains the IP address of the service board; searching a table item containing message header information in the message in a forwarding table; if the table entry is found, the message is sent to the service board corresponding to the internal address of the service board in the found table entry; if not, selecting a service board, sending the message to the selected service board, and adding a table entry comprising message header information in the message and the internal address of the selected service board in a forwarding table;
the service board is used for processing the message after receiving the message sent by the gateway board;
the forwarding table includes at least one table entry, each table entry includes header information and an internal address of a service board, and the internal address of the service board is used to identify a position of the corresponding service board in the communication device.
In the scheme, because the IP addresses configured on the service boards are also public network IP addresses and the public network IP addresses configured on each service board are the same, when the gateway board receives a message which is sent from the outside and contains the IP addresses of the service boards, after a target service board is determined by searching a forwarding table or a target service board is selected, the target IP address in the message is not required to be replaced by the intranet IP address of the service board, but the message is directly sent to the target service board, so that the message forwarding efficiency in the inflow direction is improved.
The embodiment of the invention provides another message forwarding method and device, which are used for improving the message forwarding efficiency of communication equipment in an outflow direction.
A message forwarding method is applied to communication equipment comprising at least one gateway board and service boards, wherein each service board is connected with each gateway board, IP addresses configured on the gateway board and the service boards are public network IP addresses, the public network IP addresses configured on the service boards are the same, the public network IP addresses configured on the gateway boards are different, and the public network IP addresses configured on the gateway boards and the service boards are different, and the method comprises the following steps:
the service board generates a message which needs to be sent and contains the IP address of the service board; selecting a gateway board according to the preconfigured routing information of each gateway board; sending the message to a selected gateway board;
and the gateway board receives the message sent by the service board and sends the message out according to the preconfigured routing information.
A message forwarding device comprises at least one gateway board and service boards, wherein each service board is connected with each gateway board, IP addresses configured on the gateway board and the service boards are public network IP addresses, the public network IP addresses configured on the service boards are the same, the public network IP addresses configured on the gateway boards are different, and the public network IP addresses configured on the gateway boards and the service boards are different; wherein,
the service board is used for generating a message which needs to be sent and contains the IP address of the service board; selecting a gateway board according to the preconfigured routing information of each gateway board; sending the message to a selected gateway board;
and the gateway board is used for receiving the message sent by the service board and sending the message according to the preconfigured routing information.
In the scheme, because the IP addresses configured on the service boards are also public network IP addresses and the public network IP addresses configured on each service board are the same, after the service boards send the messages containing the IP addresses of the service boards to the gateway board, the gateway board can directly send the messages out without replacing the source IP addresses in the messages with the IP addresses of the gateway board, so that the efficiency of forwarding the messages in the outflow direction is improved.
Drawings
FIG. 1 is a diagram illustrating a resource pool implementation in the prior art;
FIG. 2 is a schematic flow chart of a method provided by an embodiment of the present invention;
FIG. 3 is a schematic flow chart of another method provided by the embodiment of the present invention;
FIG. 4A is a diagram illustrating a network configuration according to an embodiment of the present invention;
fig. 4B is a schematic diagram illustrating packet forwarding in an inflow direction according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
In order to improve the message forwarding efficiency of the communication device in the inflow direction, embodiments of the present invention provide a message forwarding method, which is applied to a communication device including at least one gateway board and service boards, each service board is connected to each gateway board, the IP addresses configured on the gateway board and the service boards are public network IP addresses, the public network IP addresses configured on the service boards are the same, the public network IP addresses configured on the gateway boards are different, and the public network IP addresses configured on the gateway boards and the service boards are different.
Referring to fig. 2, the message forwarding method provided in the embodiment of the present invention includes the following steps:
step 20: after receiving a message which is sent from the outside and contains the IP address of the service board, the gateway board reads a pre-configured forwarding table; searching a table item containing message header information in a received message in a forwarding table; if the table entry is found, sending the received message to the service board corresponding to the internal address of the service board in the found table entry; if the message is not found, selecting a service board, sending the received message to the selected service board, and adding a table entry containing message header information in the received message and the internal address of the selected service board in a forwarding table; the forwarding table comprises at least one table entry, each table entry comprises message header information and an internal address of a service board, and the internal address of the service board is used for identifying the position of the corresponding service board in the communication equipment;
step 21: and after receiving the message sent by the gateway board, the service board processes the message.
Preferably, in step 20, after determining that the table entry containing the header information of the packet in the packet is not found and before selecting a service board, the gateway board determines whether the packet carries a link establishment request flag; and when the message is determined to carry the link establishment request mark, selecting a service board according to a resource pool load sharing algorithm. And if the message is determined not to carry the link establishment request mark, discarding the message. Here, the link establishment request flag is a SYN flag for a Transmission Control Protocol (TCP) protocol, and an INIT flag for a Stream Control Transmission Protocol (SCTP) protocol.
Preferably, in step 20, after the gateway board determines that the packet carries the link establishment request flag and before a service board is selected according to the resource pool load sharing algorithm, the gateway board reads the pre-configured resource pool information; determining whether each service board can provide the service requested by the message according to the read resource pool information and the service request information in the message; and when determining that each service board can provide the service requested by the message, selecting one service board according to a resource pool load sharing algorithm. And if determining that each service board can not provide the service requested by the message, discarding the message. The resource pool information includes service type information provided by each service board on each port and an internal address of each service board.
Specifically, the resource pool load sharing algorithm may include: selecting a service board by adopting a round selection mode, or selecting a service board with the lowest CPU utilization rate, or selecting a service board with the lowest memory utilization rate, or selecting a service board with the least number of users of the current service, or selecting a service board with the smallest weighted value of the CPU utilization rate, the memory utilization rate and the number of users of the current service.
Preferably, in order to implement the forwarding table synchronization of the gateway boards and avoid the forwarding table synchronization process among the multiple gateway boards, after the service board receives the message sent by the gateway board, and after the service board completes the establishment of the link, the service board sends a link confirmation message containing the message header information in the message and the internal address of the service board to all the connected gateway boards;
after receiving a link confirmation message sent by a service board, a gateway board adds a table entry containing message header information and an internal address of the service board in a local forwarding table if the table entry does not exist in the local forwarding table, wherein the table entry contains the message header information and the internal address of the service board; otherwise, the table entry in the local forwarding table is solidified into a dynamic table entry.
Preferably, in order to implement the forwarding table synchronization of the gateway boards, so as to avoid the forwarding table synchronization process among the multiple gateway boards, after sending the link confirmation message to all the connected gateway boards, when the service board needs to disconnect the communication links corresponding to the messages, the service board sends a link deletion message including the message header information in the messages and the internal address of the service board to all the connected gateway boards;
and deleting the table entry which contains the message header information in the link deletion message and the internal address of the service board in a local forwarding table by the gateway board which receives the link deletion message sent by the service board.
In the scheme, the communication equipment can comprise a plurality of gateway boards, so that an external message can reach the service board through the plurality of gateway boards, namely a plurality of paths, and compared with the prior art in which the communication equipment only comprises one gateway board, and the external message can reach the service board through one gateway board, namely one path, the scheme can effectively solve the performance bottleneck problem of the gateway boards, and when a certain gateway board breaks down, the communication equipment can also receive the message through other normal gateway boards. Thereby realizing load sharing and port protection of inflow.
The header information in the method may include: source IP address, source port information, protocol type information, destination IP address, destination port information, and the like.
In order to improve the message forwarding efficiency of the communication device in the outflow direction, an embodiment of the present invention provides another message forwarding method, where the method is applied to a communication device including at least one gateway board and service boards, each service board is connected to each gateway board, the IP addresses configured on the gateway board and the service boards are public network IP addresses, the public network IP addresses configured on the service boards are the same, the public network IP addresses configured on the gateway boards are different, and the public network IP addresses configured on the gateway boards and the service boards are different.
Referring to fig. 3, another packet forwarding method provided in the embodiment of the present invention includes the following steps:
step 30: the service board generates a message which needs to be sent and contains the IP address of the service board; selecting a gateway board according to the preconfigured routing information of each gateway board; sending the generated message to the selected gateway board;
step 31: and the gateway board receives the message sent by the service board and sends the message out according to the preconfigured routing information. Here, after receiving the message sent by the service board, the gateway board directly sends out the message according to the preconfigured routing information without replacing the source IP address in the message with the IP address of the gateway board.
In step 30, when the service board selects a plurality of gateway boards according to the pre-configured routing information of each gateway board, one gateway board can be randomly selected from the plurality of gateway boards; alternatively, a gateway board with the highest priority is selected from the plurality of gateway boards, and the method requires that the priority is set for each gateway board in advance.
In the scheme, the communication equipment can comprise a plurality of gateway boards, so that the message of the service board can be sent out through a plurality of gateway boards, namely a plurality of paths, and compared with the prior art in which the communication equipment only comprises one gateway board, the message of the service board can be sent out through one gateway board, namely one path. Thereby implementing load sharing and port protection of the outflow.
The present invention is described in detail below:
as shown in fig. 4A, the network is configured as follows:
different public network IP addresses, namely 10.1.1.1 and 10.1.1.3, are configured on the gateway board;
the same public network IP address, namely 10.1.1.2, is configured on the service board;
the gateway board can be externally connected with different routers.
The routing configuration is as follows:
configuring a standard route on a gateway board, namely configuring route information of only one router on the gateway board, and sending a message to the router according to the route information when the gateway board receives the message sent by a service board;
the service board is configured with multi-path routing, that is, the service board is configured with routing information of each gateway board, so that both gateway boards are used as gateways, and when the service board needs to send a message to the outside, the routing management module therein selects one gateway board according to the routing information and sends the message to the selected gateway board.
The table entries in the forwarding table are: static table entry, dynamic table entry and temporary table entry, wherein:
the static table entry is a fixed table entry configured by the configuration interface, and the type table entry cannot be dynamically modified.
The temporary table entry is created by the gateway board when the link is established, and is automatically invalid if not confirmed within a certain time.
The dynamic table entry is configured by a service board protocol stack, when the link establishment is successful, the service board sends a link establishment confirmation message to all gateway boards, and the service board solidifies the table entry into the dynamic table entry after receiving the link establishment confirmation message. And deleting the table entry when the service board is unlinked.
The business process is as follows:
initial configuration: the gateway board configures resource pool information according to service requirements, wherein the resource pool information comprises service type information provided by each service board on each port and an internal address of each service board.
As shown in fig. 4B, in the inflow direction:
the method comprises the following steps: after receiving a message which is sent from the outside and contains the IP address of the service board, the gateway board reads a pre-configured forwarding table; searching a table item containing message header information in a received message in a forwarding table; if the table entry is found, sending the received message to the service board corresponding to the internal address of the service board in the found table entry; if not, judging whether the message is a new link message, namely judging whether the message carries a link establishment request mark, and if not, discarding the message; if the message is newly linked, reading the pre-configured resource pool information, and judging whether a matched resource pool exists according to the read resource pool information and the service request information in the message, namely judging whether each service board can provide the service requested by the message, and if the matched resource pool does not exist, discarding the message; if the matched resource pool exists, selecting a service board according to a resource pool load sharing algorithm, sending the received message to the selected service board, adding a table entry containing message header information in the received message and the internal address of the selected service board in a forwarding table, and setting the type of the table entry as a temporary table entry;
step two: after receiving the message sent by the gateway board, the service board judges whether the message is a new link message, namely judges whether the message carries a link establishment request mark, and if not, directly submits the message to a Socket layer for processing; if the message is a new link message, sending link confirmation messages containing message header information in the message and the internal address of the service board to all connected gateway boards after the link establishment is finished; after receiving the link confirmation message, if the local forwarding table does not have a table entry containing the message header information in the link confirmation message and the internal address of the service board, adding a table entry containing the message header information and the internal address of the service board into the local forwarding table, and if the local forwarding table has a temporary table entry containing the message header information in the link confirmation message and the internal address of the service board, solidifying the temporary table entry into a dynamic table entry;
step three: when needing to disconnect the communication link corresponding to the message, the service board sends a link deletion message containing message header information in the message and the internal address of the service board to all connected gateway boards; and deleting the table entry which contains the message header information in the link deletion message and the internal address of the service board in a local forwarding table by the gateway board which receives the link deletion message sent by the service board.
In the outflow direction:
the method comprises the following steps: the service board generates a message which needs to be sent and contains the IP address of the service board; selecting a gateway board according to the preconfigured routing information of each gateway board; sending the generated message to the selected gateway board;
step two: and the gateway board receives the message sent by the service board and sends the message out according to the preconfigured routing information.
Referring to fig. 5, an embodiment of the present invention further provides a message forwarding device, where the device includes at least one gateway board 50 and service boards 51, each service board 51 is connected to each gateway board 50, IP addresses configured on the gateway board 50 and the service boards 51 are public network IP addresses, public network IP addresses configured on the service boards 51 are the same, public network IP addresses configured on the gateway boards 50 are different, and public network IP addresses configured on the gateway boards 50 and the service boards 51 are different; wherein,
the gateway board 50 is used for reading a pre-configured forwarding table after receiving a message which is sent from the outside and contains the IP address of the service board; searching a table item containing message header information in the message in a forwarding table; if the table entry is found, the message is sent to the service board corresponding to the internal address of the service board in the found table entry; if not, selecting a service board, sending the message to the selected service board, and adding a table entry comprising message header information in the message and the internal address of the selected service board in a forwarding table;
the service board 51 is configured to process the message after receiving the message sent by the gateway board;
the forwarding table includes at least one table entry, each table entry includes header information and an internal address of a service board, and the internal address of the service board is used to identify a position of the corresponding service board in the communication device.
Further, the gateway board 50 is also configured to:
after determining that the table entry containing the message header information in the message is not found and before selecting a service board according to a resource pool load sharing algorithm, determining whether the message carries a link establishment request mark; and when determining that the message carries the link establishment request mark, selecting a service board according to a resource pool load sharing algorithm.
Further, the gateway board 50 is also configured to:
reading the pre-configured resource pool information after determining that the message carries the link establishment request mark and before selecting a service board according to a resource pool load sharing algorithm; determining whether each service board can provide the service requested by the message according to the read resource pool information and the service request information in the message; when determining that each service board can provide the service requested by the message, selecting one service board according to a resource pool load sharing algorithm;
the resource pool information includes service type information provided by each service board on each port and an internal address of each service board.
Further, the resource pool load sharing algorithm is as follows:
selecting a service board by adopting a round selection mode, or selecting a service board with the lowest CPU utilization rate, or selecting a service board with the lowest memory utilization rate, or selecting a service board with the least number of users of the current service, or selecting a service board with the smallest weighted value of the CPU utilization rate, the memory utilization rate and the number of users of the current service.
Further, the service board 51 is also used for: after the build link is completed, sending link confirmation information containing message header information in the message and the internal address of the service board to all connected gateway boards;
the gateway board 50 is also used to: after receiving the link confirmation message, if the local forwarding table does not have the table entry containing the message header information and the internal address of the service board, adding the table entry containing the message header information and the internal address of the service board in the local forwarding table; otherwise, the table entry in the local forwarding table is solidified into a dynamic table entry.
Further, the service board 51 is also used for: after the link confirmation message is sent to all connected gateway boards, when a communication link corresponding to the message needs to be disconnected, a link deletion message containing message header information in the message and an internal address of the service board is sent to all connected gateway boards;
the gateway board 50 is also used to: and deleting the table entry containing the message header information and the internal address of the service board in a local forwarding table after receiving the link deleting message.
Further, the header information includes: source IP address, source port information, protocol type information, destination IP address, and destination port information.
Still referring to fig. 5, an embodiment of the present invention further provides a message forwarding device, where the device includes at least one gateway board 50 and service boards 51, each service board 51 is connected to each gateway board 50, IP addresses configured on the gateway board 50 and the service boards 51 are public network IP addresses, public network IP addresses configured on the service boards 51 are the same, public network IP addresses configured on the gateway boards 50 are different, and public network IP addresses configured on the gateway boards 50 and the service boards 51 are different; wherein,
the service board 51 is used for generating a message which needs to be sent and contains the IP address of the service board; selecting a gateway board according to the preconfigured routing information of each gateway board; sending the message to a selected gateway board;
and the gateway board 50 is configured to receive the message sent by the service board, and send the message according to the preconfigured routing information.
Further, the service board 51 is configured to:
when a plurality of gateway boards are selected according to the preset routing information of each gateway board, one gateway board is randomly selected from the plurality of gateway boards; alternatively, a gateway board with the highest priority is selected from the plurality of gateway boards.
In conclusion, the beneficial effects of the invention include:
in the scheme provided by the embodiment of the invention, because the IP addresses configured on the service boards are also public network IP addresses and the public network IP addresses configured on each service board are the same, when the gateway board receives a message which is sent from the outside and contains the IP addresses of the service boards, the gateway board determines a target service board or selects a target service board by searching the forwarding table, the target IP address in the message is not required to be replaced by the intranet IP address of the service board, but the message is directly sent to the target service board, and the efficiency of forwarding the message in the inflow direction is improved.
In the scheme provided by the embodiment of the invention, as the IP addresses configured on the service boards are also public network IP addresses and the public network IP addresses configured on each service board are the same, after the service boards send the message containing the IP addresses of the service boards to the gateway board, the gateway board can directly send the message out without replacing the source IP address in the message with the IP address of the gateway board, thereby improving the efficiency of forwarding the message in the outflow direction.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (6)
1. A message forwarding method is characterized in that the method is applied to communication equipment comprising at least one gateway board and service boards, each service board is connected with each gateway board, IP addresses configured on the gateway board and the service boards are public network IP addresses, the public network IP addresses configured on the service boards are the same, the public network IP addresses configured on the gateway boards are different, and the public network IP addresses configured on the gateway boards and the service boards are different, the method comprises the following steps:
after receiving a message which is sent from the outside and contains the IP address of the service board, the gateway board reads a pre-configured forwarding table; searching a table item containing message header information in the message in a forwarding table; if the table entry is found, the message is sent to the service board corresponding to the internal address of the service board in the found table entry; if not, selecting a service board, sending the message to the selected service board, and adding a table entry comprising message header information in the message and the internal address of the selected service board in a forwarding table; the forwarding table comprises at least one table entry, each table entry comprises message header information and an internal address of a service board, and the internal address of the service board is used for identifying the position of the corresponding service board in the communication equipment;
after receiving the message sent by the gateway board, the service board processes the message;
after determining that no entry containing header information in the message is found and before selecting a service board, further comprising: the gateway board determines whether the message carries a link establishment request mark;
the selecting a service board specifically includes: when determining that the message carries a link establishment request mark, the gateway board selects a service board according to a resource pool load sharing algorithm;
after the gateway board determines that the packet carries the link establishment request flag and before selecting a service board according to the resource pool load sharing algorithm, the method further includes: the gateway board reads the pre-configured resource pool information; determining whether each service board can provide the service requested by the message according to the read resource pool information and the service request information in the message;
the selecting a service board according to the resource pool load sharing algorithm specifically includes: when determining that each service board can provide the service requested by the message, the gateway board selects one service board according to a resource pool load sharing algorithm; the resource pool information comprises service type information provided by each service board on each port and an internal address of each service board;
after the service board receives the message sent by the gateway board, the method further includes: after the business board finishes establishing the link, sending a link confirmation message containing message header information in the message and the internal address of the business board to all connected gateway boards; after receiving the link confirmation message, the gateway board adds a table entry containing the message header information and the internal address of the service board in a local forwarding table if the table entry does not exist in the local forwarding table; otherwise, solidifying the table item in the local forwarding table into a dynamic table item;
after sending the link confirmation message to all connected gateway boards, further comprising: when needing to disconnect the communication link corresponding to the message, the service board sends a link deletion message containing message header information in the message and the internal address of the service board to all connected gateway boards; and after receiving the link deletion message, the gateway board deletes the table entry containing the message header information and the internal address of the service board in the local forwarding table.
2. The method of claim 1, wherein the resource pool load sharing algorithm is:
selecting a service board by adopting a round selection mode, or selecting a service board with the lowest CPU utilization rate, or selecting a service board with the lowest memory utilization rate, or selecting a service board with the least number of users of the current service, or selecting a service board with the smallest weighted value of the CPU utilization rate, the memory utilization rate and the number of users of the current service.
3. The method according to claim 1 or 2, wherein the header information comprises: source IP address, source port information, protocol type information, destination IP address, and destination port information.
4. A message forwarding device is characterized by comprising at least one gateway board and service boards, wherein each service board is connected with each gateway board, IP addresses configured on the gateway board and the service boards are public network IP addresses, the public network IP addresses configured on the service boards are the same, the public network IP addresses configured on the gateway boards are different, and the public network IP addresses configured on the gateway boards and the service boards are different; wherein,
the gateway board is used for reading a pre-configured forwarding table after receiving a message which is sent from the outside and contains the IP address of the service board; searching a table item containing message header information in the message in a forwarding table; if the table entry is found, the message is sent to the service board corresponding to the internal address of the service board in the found table entry; if not, selecting a service board, sending the message to the selected service board, and adding a table entry comprising message header information in the message and the internal address of the selected service board in a forwarding table; the forwarding table comprises at least one table entry, each table entry comprises message header information and an internal address of a service board, and the internal address of the service board is used for identifying the position of the corresponding service board in the message forwarding equipment;
the service board is used for processing the message after receiving the message sent by the gateway board;
the gateway board is further configured to: after determining that the table entry containing the message header information in the message is not found and before selecting a service board, determining whether the message carries a link establishment request mark; when the message is determined to carry the link establishment request mark, selecting a service board according to a resource pool load sharing algorithm;
the gateway board is further configured to: reading the pre-configured resource pool information after determining that the message carries the link establishment request mark and before selecting a service board according to a resource pool load sharing algorithm; determining whether each service board can provide the service requested by the message according to the read resource pool information and the service request information in the message; when determining that each service board can provide the service requested by the message, selecting one service board according to a resource pool load sharing algorithm; the resource pool information comprises service type information provided by each service board on each port and an internal address of each service board;
the service board is further configured to: after the build link is completed, sending link confirmation information containing message header information in the message and the internal address of the service board to all connected gateway boards;
the gateway board is further configured to: after receiving the link confirmation message, if the local forwarding table does not have the table entry containing the message header information and the internal address of the service board, adding the table entry containing the message header information and the internal address of the service board in the local forwarding table; otherwise, solidifying the table item in the local forwarding table into a dynamic table item;
the service board is further configured to: after the link confirmation message is sent to all connected gateway boards, when a communication link corresponding to the message needs to be disconnected, a link deletion message containing message header information in the message and an internal address of the service board is sent to all connected gateway boards;
the gateway board is further configured to: and deleting the table entry containing the message header information and the internal address of the service board in a local forwarding table after receiving the link deleting message.
5. The device of claim 4, wherein the resource pool load sharing algorithm is:
selecting a service board by adopting a round selection mode, or selecting a service board with the lowest CPU utilization rate, or selecting a service board with the lowest memory utilization rate, or selecting a service board with the least number of users of the current service, or selecting a service board with the smallest weighted value of the CPU utilization rate, the memory utilization rate and the number of users of the current service.
6. The apparatus of claim 4 or 5, wherein the header information comprises: source IP address, source port information, protocol type information, destination IP address, and destination port information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210010387.XA CN102571587B (en) | 2012-01-13 | 2012-01-13 | Method and equipment for forwarding messages |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210010387.XA CN102571587B (en) | 2012-01-13 | 2012-01-13 | Method and equipment for forwarding messages |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102571587A CN102571587A (en) | 2012-07-11 |
CN102571587B true CN102571587B (en) | 2014-11-12 |
Family
ID=46416088
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210010387.XA Active CN102571587B (en) | 2012-01-13 | 2012-01-13 | Method and equipment for forwarding messages |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102571587B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102904975B (en) * | 2012-09-28 | 2015-06-17 | 华为技术有限公司 | Method and associated device for message processing |
CN103152270B (en) * | 2013-03-11 | 2016-06-08 | 华为技术有限公司 | The method E-Packeted and router |
CN103516613A (en) * | 2013-09-25 | 2014-01-15 | 汉柏科技有限公司 | Quick message forwarding method |
CN104954155B (en) * | 2014-03-26 | 2018-07-31 | 杭州迪普科技股份有限公司 | The network equipment with multiple business boards and multi-service plate sharing method |
CN104009921B (en) * | 2014-04-28 | 2017-09-19 | 开网科技(北京)有限公司 | The data message forwarding method matched based on arbitrary fields |
CN104468063B (en) * | 2014-11-28 | 2018-12-25 | 新华三技术有限公司 | A kind of processing method and equipment of service message |
CN105939278B (en) * | 2015-04-30 | 2020-04-03 | 杭州迪普科技股份有限公司 | Traffic processing method and device |
CN106254256B (en) | 2015-06-04 | 2019-08-16 | 新华三技术有限公司 | Data message forwarding method and equipment based on three layers of VXLAN gateway |
CN105959198B (en) * | 2015-12-01 | 2019-05-07 | 杭州迪普科技股份有限公司 | Message transmitting method and the network equipment |
CN105939324A (en) * | 2016-01-11 | 2016-09-14 | 杭州迪普科技有限公司 | Message forwarding method and device |
CN107786434B (en) * | 2016-08-29 | 2021-06-15 | 北京华为数字技术有限公司 | Service message processing method and communication equipment |
CN106330553A (en) * | 2016-08-30 | 2017-01-11 | 杭州迪普科技有限公司 | Message forwarding method and device |
CN107800581B (en) * | 2016-09-01 | 2022-03-18 | 中兴通讯股份有限公司 | Two-layer network and loopback detection method thereof |
CN113824631B (en) * | 2021-09-10 | 2023-04-07 | 烽火通信科技股份有限公司 | Message forwarding method and device, communication equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1406026A (en) * | 2001-09-16 | 2003-03-26 | 华为技术有限公司 | Combined address resolving scheme and combined address route device thereof |
CN1482769A (en) * | 2002-09-13 | 2004-03-17 | 华为技术有限公司 | Master-standby switching and load sharing system and method based on Ethernet access platform |
CN101056192A (en) * | 2006-04-14 | 2007-10-17 | 上海未来宽带技术及应用工程研究中心有限公司 | An ATCA system and its implementation method |
CN102307141A (en) * | 2011-08-18 | 2012-01-04 | 大唐移动通信设备有限公司 | Message forwarding method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102299871B (en) * | 2010-06-24 | 2015-04-01 | 中兴通讯股份有限公司 | Communication method and gateway equipment |
-
2012
- 2012-01-13 CN CN201210010387.XA patent/CN102571587B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1406026A (en) * | 2001-09-16 | 2003-03-26 | 华为技术有限公司 | Combined address resolving scheme and combined address route device thereof |
CN1482769A (en) * | 2002-09-13 | 2004-03-17 | 华为技术有限公司 | Master-standby switching and load sharing system and method based on Ethernet access platform |
CN101056192A (en) * | 2006-04-14 | 2007-10-17 | 上海未来宽带技术及应用工程研究中心有限公司 | An ATCA system and its implementation method |
CN102307141A (en) * | 2011-08-18 | 2012-01-04 | 大唐移动通信设备有限公司 | Message forwarding method and device |
Also Published As
Publication number | Publication date |
---|---|
CN102571587A (en) | 2012-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102571587B (en) | Method and equipment for forwarding messages | |
EP3993347A1 (en) | Method and device for application migration | |
CN106789526B (en) | method and device for connecting multiple system networks | |
EP3934183B1 (en) | Service function chain sfc-based communication methods, and apparatuses | |
CN110430076B (en) | Route management method and device | |
CN105264493A (en) | Dynamic virtual machines migration over information centric networks | |
CN110247779A (en) | Method of multicasting, device, equipment and the system of the multicast group of virtual network group | |
WO2016089944A1 (en) | Efficient hybrid resource and schedule management in time slotted channel hopping networks | |
KR20180125465A (en) | Improved Routing, Diagnostics, and Content-Overloading of Address Space for Relay Networks | |
CN102368727A (en) | Crossed IP network TRILL network communication method, system thereof and devices | |
CN103731349A (en) | Method for conducting Ethernet virtualized message transmission between interconnection neighbors and edge device | |
CN103905284A (en) | EVI-network-based flow load sharing method and device | |
CN112134776B (en) | Method for generating multicast forwarding table item and access gateway | |
CN111193756B (en) | VXLAN tunnel load balancing method and related equipment | |
US10177973B2 (en) | Communication apparatus, communication method, and communication system | |
CN102291305A (en) | Method and device for implementing 6 to 4 relay routing, and message forwarding method | |
CN107659930A (en) | A kind of AP connection control methods and device | |
CN107948104A (en) | The method and switching equipment that message forwards in a kind of network address translation environment | |
CN102946350A (en) | Priority-based data transmission method and device | |
WO2016119269A1 (en) | Service data stream data packet processing method and device | |
CN101043410A (en) | Method and system for realizing mobile VPN service | |
CN105991629B (en) | TCP connection method for building up and device | |
CN101686265B (en) | Network equipment, network system and method for establishing data communication | |
CN104836678A (en) | Message transmission method based on network selection and time arrangement, and node equipment | |
CN115277720A (en) | Multicast group management method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |