CN108092907B - Message forwarding method, route stacking system and router - Google Patents

Message forwarding method, route stacking system and router Download PDF

Info

Publication number
CN108092907B
CN108092907B CN201711387972.0A CN201711387972A CN108092907B CN 108092907 B CN108092907 B CN 108092907B CN 201711387972 A CN201711387972 A CN 201711387972A CN 108092907 B CN108092907 B CN 108092907B
Authority
CN
China
Prior art keywords
forwarded
message
member router
router
forwarding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711387972.0A
Other languages
Chinese (zh)
Other versions
CN108092907A (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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201711387972.0A priority Critical patent/CN108092907B/en
Publication of CN108092907A publication Critical patent/CN108092907A/en
Application granted granted Critical
Publication of CN108092907B publication Critical patent/CN108092907B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/583Stackable routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/252Store and forward routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Abstract

The embodiment of the invention relates to the technical field of communication, in particular to a message forwarding method, a route stacking system and a router, wherein the method comprises the following steps: after receiving a to-be-forwarded message entering a routing stack system, a source forwarding member router calculates a feature number corresponding to the to-be-forwarded message, encapsulates the feature number into the to-be-forwarded message to obtain an encapsulated to-be-forwarded message, determines a first destination forwarding interface from a plurality of physical interfaces of a stack link between the source forwarding member router and a next-hop member router based on the feature number, and sends the encapsulated to-be-forwarded message to the next-hop member router through the first destination forwarding interface. The method effectively improves the performance of the route stacking system for transmitting the message to be forwarded.

Description

Message forwarding method, route stacking system and router
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a packet forwarding method, a route stacking system, and a router.
Background
At present, a stack system is often adopted in a communication network to reduce routing loops and simplify a network topology structure. The stacking system is formed by connecting a plurality of devices with the same configuration through a stacking link by a virtual switching technology, and the devices are externally presented as a virtual routing device, so that the interaction of a large number of protocol messages among the devices can be reduced, the convergence time is shortened, and the reliability of a communication network is improved.
The inventor researches and discovers that the performance of the existing stacking system needs to be improved when the existing stacking system transmits the message.
Disclosure of Invention
In view of the above, the present invention provides a message forwarding method, a route stacking system and a router.
In a first aspect, an embodiment of the present invention provides a packet forwarding method, where the method includes:
after a source forwarding member router receives a message to be forwarded entering a routing stack system, calculating a characteristic number corresponding to the message to be forwarded; encapsulating the characteristic number into the message to be forwarded to obtain an encapsulated message to be forwarded;
the source forwarding member router determines a first destination forwarding interface from a plurality of physical interfaces of a stacking link between the source forwarding member router and a next hop member router based on the characteristic number; and sending the packaged message to be forwarded to the next hop member router through the first target forwarding interface.
In the technical solution provided in the foregoing first aspect, the feature number corresponding to the to-be-forwarded message is calculated by the source forwarding member router, and the to-be-forwarded message is encapsulated, and the source forwarding member router selects the corresponding first destination forwarding interface according to the feature number to transmit the encapsulated to-be-forwarded message, so that the router behind the source forwarding member router can be enabled to select the corresponding destination forwarding interface according to the feature number in the encapsulated to-be-forwarded message to transmit when the next-hop member router transmits the encapsulated to-be-forwarded message, thereby achieving fast completion of transmission of the to-be-forwarded message, reducing overhead generated when the router behind the source forwarding member router processes the to-be-forwarded message to obtain the feature number, and further effectively improving forwarding performance of the routing stack system.
Optionally, with reference to the technical solution provided by the first aspect, in a first possible design of the first aspect, the step of calculating the feature number corresponding to the packet to be forwarded includes:
and the source forwarding member router analyzes the message to be forwarded, and calculates and obtains the characteristic number based on the flow characteristics of the message to be forwarded. Therefore, the characteristic number is obtained by the source forwarding member router based on the message to be forwarded, so that the next-hop member router does not need to process and calculate the message to be forwarded before transmitting the message to be forwarded to obtain the characteristic number, and the forwarding efficiency of the next-hop member router and the routing stack system is effectively improved.
Optionally, with reference to the technical solution provided by the first aspect, in a second possible design of the first aspect, the step of encapsulating the characteristic number into the packet to be forwarded includes:
and packaging the characteristic number into the stack head of the message to be forwarded. Therefore, in the embodiment of the present invention, the feature number is encapsulated into the stack header of the packet to be forwarded, so that when the next hop member router and the router behind the next hop member router send the encapsulated packet to be forwarded, the feature number can be quickly and conveniently obtained, and the encapsulated packet to be forwarded is transmitted through the forwarding interface selected according to the feature number, thereby further improving the forwarding performance of the routing stack system.
Optionally, with reference to the first aspect or a technical solution provided in the first to second possible designs of the first aspect, in a third possible design, after the encapsulated packet to be forwarded is sent to the next-hop member router through the first destination forwarding interface, the method further includes:
the next hop member router obtains the characteristic number from the packaged message to be forwarded;
the next-hop member router determines a second destination forwarding interface from a plurality of physical interfaces of the stacking link connected with the next-hop member router based on the characteristic number; and sending the packaged message to be forwarded to the next hop member router through the second target forwarding interface.
As can be seen, the next-hop member router obtains the feature number in the encapsulated to-be-forwarded message, and selects the second destination forwarding interface of the next-hop member router according to the feature number, so as to transmit the encapsulated to-be-forwarded message through the second destination forwarding interface, so that the next-hop member router does not need to process and calculate the to-be-forwarded message before transmitting the to-be-forwarded message, thereby effectively improving the forwarding efficiency of the next-hop member router and the routing stack system.
The function of the next hop member router can be the same as or similar to that of the next hop member router, and the next hop member router can also be connected with one or more routers with the same or similar function to that of the next hop member router, so that when the routing stack system transmits the message to be forwarded, only the source forwarding member router obtains the feature number based on the message to be forwarded and packages the feature number into the message to be forwarded, and the subsequent routers directly utilize the feature number to quickly complete the transmission of the packaged message to be forwarded, thereby reducing the cost caused by the feature number obtained by processing the message to be forwarded by the router after the source forwarding member router, and further improving the forwarding performance of the routing stack system.
In a second aspect, the present invention further provides a routing stack system, including a source forwarding member router and a next hop member router connected to the source forwarding member router via a stack link;
the source forwarding member router is used for calculating the characteristic number corresponding to the message to be forwarded after receiving the message to be forwarded entering the route stacking system; encapsulating the characteristic number into the message to be forwarded to obtain an encapsulated message to be forwarded;
the source forwarding member router is further configured to determine a first destination forwarding interface from a plurality of physical interfaces of a stacking link with the next-hop member router based on the characteristic number; sending the packaged message to be forwarded to the next hop member router through the first target forwarding interface;
and the next-hop member router is used for receiving the encapsulated message to be forwarded, which is sent by the source forwarding member router.
In the technical solution provided by the embodiment of the second aspect, the feature number corresponding to the to-be-forwarded message is calculated by the source forwarding member router, and the to-be-forwarded message is encapsulated, the source forwarding member router selects the corresponding first destination forwarding interface according to the feature number to transmit the encapsulated to-be-forwarded message, so that the router behind the source forwarding member router can be enabled to forward the to-be-forwarded message.
Optionally, with reference to the technical solution provided by the second aspect, in a first possible design of the second aspect, the source forwarding member router is configured to analyze the packet to be forwarded, and calculate and obtain the feature number based on a flow feature of the packet to be forwarded. Therefore, the characteristic number is obtained by the source forwarding member router based on the message to be forwarded, so that the next-hop member router does not need to process and calculate the message to be forwarded before transmitting the message to be forwarded to obtain the characteristic number, and the forwarding efficiency of the next-hop member router and the routing stack system is effectively improved.
Optionally, with reference to the technical solution provided by the second aspect, in a second possible design of the second aspect, the source forwarding member router is configured to encapsulate the characteristic number into a stack header of the packet to be forwarded. Therefore, in the embodiment of the present invention, the feature number is encapsulated into the stack header of the packet to be forwarded, so that when the next hop member router and the router behind the next hop member router send the encapsulated packet to be forwarded, the feature number can be quickly and conveniently obtained, and the encapsulated packet to be forwarded is transmitted through the forwarding interface selected according to the feature number, thereby further improving the forwarding performance of the routing stack system.
Optionally, with reference to the second aspect or the technical solution provided in the first to second possible designs of the second aspect, in a third possible design, the routing stacking system further includes a next-hop member router connected to the next-hop member router through a stacking link;
the next hop member router is used for obtaining the characteristic number from the packaged message to be forwarded; determining a second destination forwarding interface from a plurality of physical interfaces of the stacking link with the next-hop member router based on the characteristic number; and sending the packaged message to be forwarded to the next hop member router through the second target forwarding interface.
As can be seen, the next-hop member router obtains the feature number in the encapsulated to-be-forwarded message, and selects the second destination forwarding interface of the next-hop member router according to the feature number, so as to transmit the encapsulated to-be-forwarded message through the second destination forwarding interface, so that the next-hop member router does not need to process and calculate the to-be-forwarded message before transmitting the to-be-forwarded message, thereby effectively improving the forwarding efficiency of the next-hop member router and the routing stack system.
The function of the next hop member router can be the same as or similar to that of the next hop member router, and the next hop member router can also be connected with one or more routers with the same or similar function to that of the next hop member router, so that when the routing stack system transmits the message to be forwarded, only the source forwarding member router obtains the feature number based on the message to be forwarded and packages the feature number into the message to be forwarded, and the subsequent routers directly utilize the feature number to quickly complete the transmission of the packaged message to be forwarded, thereby reducing the cost caused by the feature number obtained by processing the message to be forwarded by the router after the source forwarding member router, and further improving the forwarding performance of the routing stack system.
In a third aspect, an embodiment of the present invention provides a source forwarding member router, where the source forwarding member router is connected to a next hop member router through a stacking link, and the source forwarding member router includes:
the message receiving module is used for receiving a message to be forwarded entering the routing stack system;
the message packaging module is used for calculating the characteristic number corresponding to the message to be forwarded; encapsulating the characteristic number into the message to be forwarded to obtain the encapsulated message to be forwarded;
a message forwarding module, configured to determine a first destination forwarding interface from multiple physical interfaces of a stacking link between the next-hop member router and the message forwarding module based on the characteristic number; and sending the packaged message to be forwarded to the next hop member router through the first target forwarding interface.
It can be seen that in the technique provided in the embodiment of the third aspect, the feature number corresponding to the to-be-forwarded message is calculated by the source forwarding member router, and the to-be-forwarded message is encapsulated, and the source forwarding member router selects the corresponding first destination forwarding interface according to the feature number to transmit the encapsulated to-be-forwarded message, so that the router behind the source forwarding member router can be enabled to forward the to-be-forwarded message.
In a fourth aspect, an embodiment of the present invention provides a next hop member router in a packet forwarding method, where the next hop member router is connected to a source forwarding member router and a next hop member router of a route stacking system through stacking links, respectively, and the next hop member router includes:
a data receiving module, configured to obtain a feature number in the encapsulated to-be-forwarded message after receiving the encapsulated to-be-forwarded message from the source forwarding member router, where the feature number is obtained by the source forwarding member router by calculating based on the to-be-forwarded message entering the routing stack system, and encapsulating the feature number into the to-be-forwarded message;
a data forwarding module, configured to determine a second destination forwarding interface from multiple physical interfaces of a stacking link with the next-hop member router based on the characteristic number; and sending the message to be forwarded to the next-hop member router through the second destination forwarding interface.
In the technical solution provided in the foregoing fourth aspect, the next-hop member router obtains the feature number in the encapsulated to-be-forwarded message, and selects the second destination forwarding interface of the next-hop member router according to the feature number, so as to transmit the encapsulated to-be-forwarded message through the second destination forwarding interface, so that the next-hop member router does not need to process and calculate the to-be-forwarded message before transmitting the to-be-forwarded message, and the forwarding efficiency of the next-hop member router and the route stacking system is effectively improved.
In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the foregoing embodiments of the first aspect, the possible designs in the first aspect, and the packet forwarding method in the second possible design in the first aspect.
In the technical solution provided in the foregoing fifth aspect, the feature number corresponding to the to-be-forwarded message is calculated by the source forwarding member router, and the to-be-forwarded message is encapsulated, and the source forwarding member router selects the corresponding first destination forwarding interface according to the feature number to transmit the encapsulated to-be-forwarded message, so that the router behind the source forwarding member router can be enabled to forward the to-be-forwarded message.
The message forwarding method, the route stacking system and the router provided by the embodiment of the invention effectively improve the forwarding efficiency of the route stacking system, and avoid the problem that the next hop member router of the source forwarding member router and the routers behind the next hop member router need to process and calculate the message to be forwarded to obtain the characteristic number before the message to be forwarded is transmitted, so that the forwarding performance of the next hop member router of the source forwarding member router and the routers behind the next hop member router is influenced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a connection block diagram of a routing stack system according to an embodiment of the present invention.
Fig. 2 is another connection block diagram of a routing stack system according to an embodiment of the present invention.
Fig. 3 is a connection block diagram of a source forwarding member router according to an embodiment of the present invention.
Fig. 4 is a connection block diagram of a next hop member router according to an embodiment of the present invention.
Fig. 5 is a flowchart illustrating a message forwarding method according to an embodiment of the present invention.
Fig. 6 is another flowchart of a message forwarding method according to an embodiment of the present invention.
Icon: 10-routing stack system; 100-a router; 100 a-source forwarding member router; 100 b-next hop member router; 100 c-end member router; 110-a message receiving module; 120-message encapsulation module; 130-a message forwarding module; 140-a data receiving module; 150-data forwarding module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The existing route stacking system is performed through a stacking link when performing cross-route forwarding of a packet. To take full advantage of the high bandwidth of stacked links, multiple physical interfaces on the stacked links are bundled to operate in a load-balanced manner. When forwarding a message across routers, a physical interface of a router needs to be selected according to the stream characteristics of the message, so that the message is transmitted through the selected physical interface.
The inventor finds that, when each router in the existing routing stack system forwards a message, each router needs to analyze and calculate the message to obtain a characteristic number, and then selects a physical interface in a stack link according to the characteristic number to send the message through the selected physical interface. The above actions are repeated on each router which needs to transmit the message, and further the forwarding performance of the whole routing stack system is affected.
Based on this, embodiments of the present invention provide a packet forwarding method, a routing stack system, and a router, so as to effectively improve the forwarding performance of the routing stack system when sending a packet.
The above prior art solutions have shortcomings which are the results of practical and careful study of the inventor, and therefore, the discovery process of the above problems and the solutions proposed by the following embodiments of the present invention to the above problems should be the contribution of the inventor to the present invention in the course of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a routing stack system 10, where the routing stack system 10 is virtually formed by a plurality of routers 100 using a stacking technique, any two adjacent routers 100 are connected by a stacking link, and a stacking link between two adjacent routers 100 is formed by a plurality of physical interfaces connected to each other between two routers 100.
Referring to fig. 2, the plurality of routers 100 include a source forwarding member router 100a, a next hop member router 100b, and an end member router 100c, where the next hop member router 100b is located between the source forwarding member router 100a and the end member router 100c, the next hop member router 100b is a next hop of the source forwarding member router 100a during message transmission, the next hop member router 100b is connected to the source forwarding member router 100a through a stacking link, and the next hop member router 100b is directly or indirectly connected to the end member router 100 c.
The plurality of routers 100 may further include one or more routers 100 connected between the next-hop member router 100b and the end member router 100c, and having the same or similar function as the next-hop member router 100b, for example, the plurality of routers 100 further include another next-hop member router connected to the next-hop member router 100b by stacking links.
In this embodiment, the source forwarding member router 100a is configured to calculate a feature number corresponding to a to-be-forwarded packet after receiving the to-be-forwarded packet entering the routing stack system 10, and encapsulate the feature number into the to-be-forwarded packet to obtain an encapsulated to-be-forwarded packet.
The source forwarding member router 100a is further configured to determine a first destination forwarding interface from a plurality of physical interfaces of the stacking link with the next-hop member router 100b based on the characteristic number; and sending the encapsulated message to be forwarded to the next hop member router 100b through the first destination forwarding interface.
The manner in which the source forwarding member router 100a receives the to-be-forwarded packet entering the routing stack system 10 may be that the source forwarding member router 100a receives the to-be-forwarded packet transmitted by the peripheral device connected to the source forwarding member router 100a, and the source forwarding member router 100a and the peripheral device may be directly connected or may be in wireless communication connection for packet transmission.
The manner of calculating the feature number corresponding to the packet to be forwarded by the source forwarding member router 100a may be: the source forwarding member router 100a analyzes the packet to be forwarded to obtain the flow characteristics of the packet to be forwarded, and calculates to obtain the characteristic number based on the flow characteristics of the packet to be forwarded. The method for obtaining the feature number based on the feature calculation of the packet flow to be forwarded may be: obtaining the characteristic number based on the source address and the destination address in the flow characteristic, which may be: the characteristic number is obtained based on the source address, the destination address, the protocol number, the source port number and the destination port number in the flow characteristic, and is not particularly limited herein.
Optionally, in this embodiment, the manner of calculating the feature number corresponding to the packet to be forwarded by the source forwarding member router 100a is as follows: the source forwarding member router 100a analyzes the packet to obtain a flow characteristic, and calculates a characteristic number by using a cyclic redundancy check method based on a source address, a destination address, a source port number, a destination port number, and a protocol number in the flow characteristic.
The manner of encapsulating the characteristic number into the packet to be forwarded by the source forwarding member router 100a may be: the source forwarding member router 100a encapsulates the feature number into the stack header of the packet to be forwarded, may encapsulate the feature number into the data field of the packet, or encapsulate the feature number to any position of the packet to be forwarded, as long as the feature number in the encapsulated packet to be forwarded can be obtained by the next-hop member router 100b and the router 100 behind the next-hop member router 100b when obtaining the encapsulated packet to be forwarded.
Optionally, in this embodiment, the source forwarding member router 100a encapsulates the feature number into the stack header of the packet to be forwarded, so as to obtain the encapsulated packet to be forwarded. The stack header is a storage field added to the packet header to store the characteristic number, and the stack header may be loaded by the source forwarding member router 100 a.
By loading the feature number into the stack header, the situation that the next hop member router 100 needs to analyze and calculate the packet to be forwarded when acquiring the feature number is effectively avoided, so as to further improve the forwarding performance of the routing stack system 10.
In order to further improve the efficiency of transmitting the encapsulated to-be-forwarded message, optionally, in this embodiment, the ID of the end member router of the to-be-forwarded message is also encapsulated in the stack header. Wherein the encapsulating of the end member router ID of the packet to be forwarded into the stack header may be performed by the source forwarding member router 100 a. Through the above arrangement, the situation that when the next hop member router 100b and the following routers 100 transmit the encapsulated packet to be forwarded, the packet needs to be analyzed to obtain the destination address and then transmitted, thereby affecting the forwarding efficiency is further avoided, so that the efficiency of transmitting the encapsulated packet to be forwarded is further improved.
The manner in which the source forwarding member router 100a determines a first destination forwarding interface from among the plurality of physical interfaces of the stacking link with the next-hop member router 100b based on the feature number may be that the source forwarding member router 100a stores preset correspondence between different feature numbers and the physical interfaces, and the source forwarding member router 100a determines the first destination forwarding interface from among the plurality of physical interfaces of the stacking link between the source forwarding member router 100a and the next-hop member router 100b based on the feature number and the preset correspondence. And the preset corresponding relation comprises a physical interface corresponding to each characteristic number. The correspondence relationship is described by taking two physical interfaces included in a stacking link as an example, when the characteristic number is an odd number, the characteristic number corresponds to one of the two physical interfaces and serves as the first destination forwarding interface, and when the characteristic number is an even number, the characteristic number corresponds to the other of the two physical interfaces and serves as the first destination forwarding interface, so that the packet to be forwarded is forwarded through the first destination forwarding interface.
As can be seen from the above description of the source forwarding member router 100a, the functions implemented by the source forwarding member router 100a may be implemented by software function modules stored in the source forwarding member router 100a, and referring to fig. 3, based on this, the source forwarding member router 100a provided in the embodiment of the present invention includes: a message receiving module 110, a message packaging module 120, and a message forwarding module 130.
The message receiving module 110 is configured to receive a message to be forwarded entering the routing stack system 10.
The message encapsulation module 120 is configured to calculate a feature number corresponding to the message to be forwarded; and encapsulating the characteristic number into the message to be forwarded to obtain the encapsulated message to be forwarded.
The message forwarding module 130 is configured to determine a first destination forwarding interface from a plurality of physical interfaces of the stacking link with the next-hop member router 100b based on the characteristic number; and sending the encapsulated message to be forwarded to the next hop member router 100b through the first destination forwarding interface.
For a specific implementation process of the software functional module of the source forwarding member router 100a, reference is made to the specific description of the source forwarding member router 100a, which is not described in detail herein.
Optionally, in this embodiment, when the routing stacking system 10 further includes a next-hop member router, the next-hop member router 100b is configured to obtain the feature number from the encapsulated packet to be forwarded, and determine a second destination forwarding interface from multiple physical interfaces of a stacking link between the next-hop member router and the next-hop member router based on the feature number.
The next-hop member router 100b is further configured to send the encapsulated packet to be forwarded to the next-hop member router through the second destination forwarding interface.
Wherein the next-hop member router is the router 100 which is in link connection with the next-hop member router 100b, and the next-hop member router 100b is located between the source forwarding member router 100a and the next-hop member router.
In this embodiment, the next-hop member router 100b obtains the feature number from the stack header of the encapsulated packet to be forwarded, and determines a second destination forwarding interface from the plurality of physical interfaces of the stack link with the next-hop member router based on the feature number, when forwarding the packet, the packet to be forwarded does not need to be analyzed and calculated to obtain the feature number, so as to effectively improve the forwarding performance and the forwarding efficiency of the next-hop member router 100b and the routing stack system 10.
The manner in which the next-hop member router 100b determines the second destination forwarding interface based on the feature number is the same as or similar to the manner in which the source forwarding member router 100a determines the first destination forwarding interface based on the feature number, and details are not described here.
The further next hop member router may be a router 100 having the same or similar function as the next hop member router 100b, or may be an end member router 100 c. In this embodiment, the end member router 100c is configured to implement transmission of the packet to be forwarded to a peripheral device connected to the end member router 100 c.
When the next-hop member router implements the same or similar function as the next-hop member router 100b, please refer to the sending process of the encapsulated packet to be forwarded by the next-hop member router 100b, which is not described in detail herein.
It is understood that the further next-hop member router may be connected to an end member router 100c, or may be connected to one or more routers 100 having the same or similar functions as the next-hop member router 100b, and is not limited in detail herein.
As can be seen from the above description of the next-hop member router 100b, the functions implemented by the next-hop member router 100b can be implemented by software function modules stored in the next-hop member router 100 b. Referring to fig. 4, the present invention further provides a next hop member router 100b, where the next hop member router 100b is connected to the source forwarding member router 100a and the next hop member router of the routing stack system 10 via stack links, respectively, and the next hop member router 100b includes: a data receiving module 140 and a data forwarding module 150.
The data receiving module 140 is configured to obtain a feature number in the encapsulated to-be-forwarded message after receiving the encapsulated to-be-forwarded message from the source forwarding member router 100a, where the feature number is obtained by calculating, by the source forwarding member router 100a, the feature number based on the to-be-forwarded message entering the routing stack system 10, and encapsulating the feature number in the to-be-forwarded message.
The data forwarding module 150 is configured to determine a second destination forwarding interface from a plurality of physical interfaces of the stacking link with the next-hop member router based on the characteristic number; and sending the message to be forwarded to the next-hop member router through the second destination forwarding interface.
For a specific implementation process of the software functional module of the source forwarding member router 100a, reference is made to the specific description of the source forwarding member router 100a, which is not described in detail herein.
With the above arrangement, when the routing stack system 10 transmits the packet to be forwarded, only the source forwarding member router 100a needs to process the packet to be forwarded to obtain the feature number, and encapsulate the feature number into the packet to be forwarded, so that when the router 100 behind the next member router 100, the next hop member router, and the next hop member router of the source forwarding member router 100a transmits the packet to be forwarded, the router 100 determines and transmits the corresponding destination forwarding interface according to the feature number in the encapsulated packet to be forwarded, which effectively relieves the problem that when a plurality of routers 100 in the routing stack system 10 transmit the packet to be forwarded, each router 100 needs to obtain the feature number based on the packet to be forwarded respectively to select and transmit the corresponding destination forwarding interface according to the feature number, resulting in a problem of poor forwarding performance of the routing stack system 10.
Referring to fig. 2, taking the routing stack system 10 as including a source forwarding member router 100a, a next hop member router 100b, and a terminal member router 100c, where the packet to be forwarded includes a stack header as an example for illustration, the source forwarding member router 100a receives the packet to be forwarded transmitted by a peripheral device connected to the source forwarding member router 100a, the source forwarding member router 100a parses the packet to be forwarded to obtain a flow characteristic including a source address, a destination address, a source port number, a destination port number, and a protocol number, performs cyclic redundancy calculation based on the flow characteristic to obtain a characteristic number, and encapsulates the characteristic number into the stack header to obtain an encapsulated packet to be forwarded, the source forwarding member router 100a determines a first destination forwarding interface from multiple forwarding interfaces of a stack link between the source forwarding member router 100a and the next hop member router 100b according to the characteristic number, and transmits the encapsulated packet to be forwarded to the next hop member router 100b through the first destination forwarding interface. The next-hop member router 100b obtains the feature number in the stack header of the encapsulated to-be-forwarded packet, and determines a second destination forwarding interface in the plurality of physical interfaces of the stack link between the next-hop member router 100b and the end member router 100c according to the feature number, so as to transmit the encapsulated to-be-forwarded packet to the end member router 100c through the second destination forwarding interface, so that the end member router 100c performs processing after receiving the encapsulated to-be-forwarded packet, for example, to remove the stack header to obtain a processed to-be-forwarded packet, and transmit the processed to-be-forwarded packet to a peripheral device connected to the end member router 100 c. Through the above arrangement, the routing stack system 10 can forward the packet to be forwarded, and the performance and efficiency of the routing stack system 10 in transmitting the packet to be forwarded are effectively improved.
Referring to fig. 5, the present invention provides a message forwarding method, which is applied to the above-mentioned routing stack system 10, and when the message forwarding method is applied to the routing stack system 10, the three steps of step S110 to step S130 are executed.
Step S110: after receiving the to-be-forwarded message entering the routing stack system 10, the source forwarding member router 100a calculates the characteristic number corresponding to the to-be-forwarded message. In this embodiment, the step S110 may be executed by the message receiving module 110 shown in fig. 3.
Optionally, in this embodiment, the step of calculating the feature number corresponding to the packet to be forwarded includes: the source forwarding member router 100a analyzes the packet to be forwarded, and calculates the characteristic number based on the flow characteristic of the packet to be forwarded.
Step S120: the source forwarding member router 100a encapsulates the characteristic number into the packet to be forwarded, so as to obtain an encapsulated packet to be forwarded. In this embodiment, the step S120 may be executed by the message encapsulation module 120 shown in fig. 3.
Optionally, in this embodiment, the step of encapsulating, by the source forwarding member router 100a, the feature number into the packet to be forwarded includes: the source forwarding member router 100a encapsulates the characteristic number into the stack header of the packet to be forwarded.
Step S130: the source forwarding member router 100a determines a first destination forwarding interface from the plurality of physical interfaces of the stacking link with the next hop member router 100b based on the characteristic number; and sending the encapsulated message to be forwarded to the next hop member router 100b through the first destination forwarding interface. In this embodiment, the step S130 may be executed by the message forwarding module 130 shown in fig. 3.
For the detailed execution process of step S110 to step S130 is the same as or similar to the working principle of the source forwarding member router 100a, please refer to the above detailed description of the source forwarding member router 100a, which is not repeated herein.
Referring to fig. 6, optionally, in this embodiment, after the encapsulated packet to be forwarded is sent to the next-hop member router 100b through the first destination forwarding interface, the packet forwarding method further includes step S140 and step S150.
Step S140: the next hop member router 100b obtains the feature number from the encapsulated packet to be forwarded. In this embodiment, the step S140 may be performed by the data receiving module 140 shown in fig. 4.
Step S150: the next-hop member router 100b determines a second destination forwarding interface from a plurality of physical interfaces of the stacked links connected to the next-hop member router based on the characteristic number; and sending the packaged message to be forwarded to the next hop member router through the second target forwarding interface. In this embodiment, the step S150 may be performed by the data forwarding module 150 shown in fig. 4.
For the specific implementation process of step S140 and step S150 is the same as or similar to the working principle of the next-hop member router 100b, please refer to the above detailed description of the next-hop member router 100b, which is not described in detail herein.
To sum up, the message forwarding method, the routing stack system 10 and the router 100 provided in the embodiments of the present invention implement that, in the process of sending the message to be forwarded, only the source forwarding member router 100a needs to parse the message to be forwarded to obtain the stream characteristics, and perform calculation based on the stream characteristics to obtain the characteristic numbers and encapsulate the characteristic numbers into the message to be forwarded, so that, in the process of sending the encapsulated message to be forwarded, the router 100 between the source forwarding member router 100a and the end member router 100c selects the corresponding destination forwarding interface for transmission according to the characteristic numbers in the encapsulated message to be forwarded, thereby implementing fast forwarding, effectively reducing the process of parsing the message to be forwarded, and improving the forwarding performance of the routing stack system 10.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of source forwarding member routers, next hop member routers, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or 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. 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 devices that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device, such as any one of a plurality of routers in a router stack system in an embodiment of the present invention, to execute all or part of the steps of the method in the embodiments of the present invention. And the aforementioned storage medium includes: a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A message forwarding method is characterized in that the method comprises the following steps:
after receiving a message to be forwarded entering a routing stack system, a source forwarding member router analyzes the message to be forwarded to obtain the flow characteristics of the message to be forwarded, and calculates and obtains the characteristic number corresponding to the message to be forwarded based on the flow characteristics of the message to be forwarded; encapsulating the characteristic number into the message to be forwarded to obtain an encapsulated message to be forwarded;
the source forwarding member router determines a first destination forwarding interface from a plurality of physical interfaces of a stacking link between the source forwarding member router and a next hop member router based on the characteristic number; sending the packaged message to be forwarded to the next hop member router through the first target forwarding interface;
and the next hop member router acquires the characteristic number from the encapsulated message to be forwarded.
2. The method of claim 1, wherein encapsulating the characteristic number into the packet to be forwarded comprises:
and packaging the characteristic number into the stack head of the message to be forwarded.
3. The method according to claim 1 or 2, wherein the encapsulated packet to be forwarded is sent to the next-hop member router through the first destination forwarding interface, and after the next-hop member router obtains the feature number from the encapsulated packet to be forwarded, the method further comprises:
the next-hop member router determines a second destination forwarding interface from a plurality of physical interfaces of the stacking link connected with the next-hop member router based on the characteristic number; and sending the packaged message to be forwarded to the next hop member router through the second target forwarding interface.
4. A routing stack system comprising a source forwarding member router and a next hop member router connected to the source forwarding member router by a stack link;
the source forwarding member router is used for analyzing the message to be forwarded to obtain the flow characteristics of the message to be forwarded after receiving the message to be forwarded entering the route stacking system, and calculating to obtain the characteristic number corresponding to the message to be forwarded based on the flow characteristics of the message to be forwarded; encapsulating the characteristic number into the message to be forwarded to obtain an encapsulated message to be forwarded;
the source forwarding member router is further configured to determine a first destination forwarding interface from a plurality of physical interfaces of a stacking link with the next-hop member router based on the characteristic number; sending the packaged message to be forwarded to the next hop member router through the first target forwarding interface;
and the next-hop member router is used for receiving the packaged message to be forwarded sent by the source forwarding member router and acquiring the characteristic number from the packaged message to be forwarded.
5. The routing stack system of claim 4, wherein the source forwarding member router is configured to encapsulate the characteristic number into a stack header of the packet to be forwarded.
6. The routing stack system of claim 4 or 5, further comprising a further next hop member router connected to the next hop member router by a stack link;
the next-hop member router is used for determining a second destination forwarding interface from a plurality of physical interfaces of the stacking link between the next-hop member router and the next-hop member router based on the characteristic number; and sending the packaged message to be forwarded to the next hop member router through the second target forwarding interface.
7. A source forwarding member router, the source forwarding member router connected to a next hop member router by a stack link, the source forwarding member router comprising:
the message receiving module is used for receiving a message to be forwarded entering the routing stack system;
the message packaging module is used for analyzing the message to be forwarded to obtain the flow characteristics of the message to be forwarded and calculating and obtaining the characteristic number corresponding to the message to be forwarded based on the flow characteristics of the message to be forwarded; encapsulating the characteristic number into the message to be forwarded to obtain the encapsulated message to be forwarded;
a message forwarding module, configured to determine a first destination forwarding interface from multiple physical interfaces of a stacking link between the next-hop member router and the message forwarding module based on the characteristic number; and sending the packaged message to be forwarded to the next hop member router through the first target forwarding interface so that the next hop member router acquires the characteristic number from the packaged message to be forwarded.
8. A next hop member router, wherein the next hop member router is connected to a source forwarding member router and a next hop member router of a routing stack system via stack links, respectively, the next hop member router comprising:
a data receiving module, configured to obtain a feature number in an encapsulated to-be-forwarded message from the source forwarding member router after receiving the encapsulated to-be-forwarded message, where the encapsulated to-be-forwarded message is obtained by analyzing, by the source forwarding member router, the to-be-forwarded message entering the route stacking system to obtain a flow feature of the to-be-forwarded message, calculating the feature number based on the flow feature of the to-be-forwarded message, and encapsulating the feature number in the to-be-forwarded message;
a data forwarding module, configured to determine a second destination forwarding interface from multiple physical interfaces of a stacking link with the next-hop member router based on the characteristic number; and sending the message to be forwarded to the next-hop member router through the second destination forwarding interface.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the message forwarding method according to claim 1 or 2.
CN201711387972.0A 2017-12-20 2017-12-20 Message forwarding method, route stacking system and router Active CN108092907B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711387972.0A CN108092907B (en) 2017-12-20 2017-12-20 Message forwarding method, route stacking system and router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711387972.0A CN108092907B (en) 2017-12-20 2017-12-20 Message forwarding method, route stacking system and router

Publications (2)

Publication Number Publication Date
CN108092907A CN108092907A (en) 2018-05-29
CN108092907B true CN108092907B (en) 2020-06-19

Family

ID=62177572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711387972.0A Active CN108092907B (en) 2017-12-20 2017-12-20 Message forwarding method, route stacking system and router

Country Status (1)

Country Link
CN (1) CN108092907B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7779449B2 (en) * 2005-04-13 2010-08-17 The Boeing Company Secured network processor
CN101005437B (en) * 2007-01-16 2011-04-20 中兴通讯股份有限公司 Method and system for realizing heap virtual local area network
CN106856454A (en) * 2015-12-09 2017-06-16 北京华为数字技术有限公司 A kind of method of message forwarding, equipment and system

Also Published As

Publication number Publication date
CN108092907A (en) 2018-05-29

Similar Documents

Publication Publication Date Title
KR102555671B1 (en) Packet processing methods, related devices and computer storage media
US11134011B2 (en) Communication system, control device, communication method, and program
CN109981471B (en) Method, equipment and system for relieving congestion
EP3787243B1 (en) Data packet processing method and apparatus, storage medium, and electronic device
CN109391560A (en) Notifying method, agent node and the computer equipment of network congestion
CN108574632B (en) Message processing method, device and system
CN112671641B (en) Message forwarding method and device
CN113242177B (en) Method and device for multi-path concurrent data transmission, storage medium and electronic equipment
CN109218111B (en) Method for processing message and repeater
CN109120540B (en) Method for transmitting message, proxy server and computer readable storage medium
CN106464596A (en) Openflow communication method, system, controller, and service gateway
CN108965121A (en) Transmit method, host and the interchanger of data
US10230647B2 (en) Data packet processing method and device
CN112217685B (en) Tunnel detection method, terminal device, system, computer device and storage medium
US20200028779A1 (en) Packet processing method and apparatus
CN106027599B (en) Data transmission channel establishing method, system and server
US20160316022A1 (en) Communication device, communication processing method, and storage medium
CN108092907B (en) Message forwarding method, route stacking system and router
CN107104813B (en) Information transmission method, gateway and controller
CN105656994B (en) A kind of business acceleration method and device
US11196792B2 (en) Method, device and system for transmitting data
US20150110117A1 (en) Multi-Link Aggregation Method and Device
CN108965122B (en) Routing method, device and computer readable storage medium
CN110636003A (en) Message forwarding method, device, system and computer readable storage medium
CN106850386B (en) Message processing method and device

Legal Events

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