CN111404811B - Message forwarding method and device - Google Patents
Message forwarding method and device Download PDFInfo
- Publication number
- CN111404811B CN111404811B CN202010182419.9A CN202010182419A CN111404811B CN 111404811 B CN111404811 B CN 111404811B CN 202010182419 A CN202010182419 A CN 202010182419A CN 111404811 B CN111404811 B CN 111404811B
- Authority
- CN
- China
- Prior art keywords
- route
- type
- different
- service board
- message
- 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
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/28—Routing or path finding of packets in data switching networks using route fault recovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/58—Association of routers
- H04L45/586—Association of routers of virtual routers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a message forwarding method and a message forwarding device. The method is applied to frame type equipment, wherein the frame type equipment comprises at least two types of service plates, and each type of service plate comprises at least one service plate; the method comprises the following steps: dividing different physical ports connected with a second class service board on the frame type equipment and physical ports connected with different external equipment on the first class service board into different established virtual systems; configuring a corresponding first route and a second route for the frame device, where the first route is a route from a physical port on the frame device to a second service board connected to the physical port, and the second route is a route from a virtual system to which the physical port on the frame device belongs to a virtual port created in another virtual system; when the physical port of the first class service board receives the message, if the second class service board connected with the physical port on the frame type equipment associated with the virtual system to which the physical port belongs fails, the message is sent according to the second route.
Description
Technical Field
The present invention relates to network communication technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
At present, two types of boards can be generally installed in a box type device. The first type of board card is a board card fixedly provided with an operating system preset by a frame type equipment manufacturer. Because the operating system of the board cannot be changed according to the user requirements, the user can only perform corresponding processing on the message according to the operating system pre-installed on the board, and cannot perform custom processing on the message. Due to the above requirements of users, manufacturers develop second-class boards capable of installing a general operating system for the users. And the user can install different operating systems on the second board card according to requirements so as to realize self-defined message processing.
When the first type board card and the second type board card are shared in the frame type device, that is, when the message processing function of the first type board card is extended through the transparent second type board card, the first type board card forwards the received message to the second type board card. After the second board card finishes processing the message, the processed message is transmitted back to the first board card, and then the first board card transmits the message according to the destination IP address in the processed message.
And the second type of service board has a risk of generating an abnormal condition in the message forwarding process. Therefore, mostly, the ACL table entry is set in the first type service board, so that when the second type service board fails, the forwarding of the message without passing through the second type service board is realized through the ACL table entry. However, the ACL table entry setting process is very complicated due to the adoption of the ACL table entry, and mutual conflict is easily generated between different ACL table entries, so that part of ACL table entries cannot work normally.
Disclosure of Invention
The invention provides a message forwarding method and a message forwarding device.
The technical scheme provided by the invention comprises the following steps:
according to a first aspect of the present invention, a method for forwarding a packet is provided, where the method is applied to a frame device, where the frame device includes at least two types of service boards, and each type of service board includes at least one service board; the method comprises the following steps:
dividing different physical ports connected with a second type of service board on the frame type equipment and physical ports connected with different external equipment on a first type of service board into different established virtual systems;
configuring a corresponding first route and a second route for the frame device, where the first route is a route from a physical port on the frame device to a second service board connected to the physical port, and the second route is a route from a virtual system to which the physical port on the frame device belongs to a virtual port created in another virtual system; the first route and the second route have the same IP address;
when the physical port of the first class service board receives a message, if a second class service board connected with the physical port on the frame type equipment associated with the virtual system to which the physical port belongs fails, the message is sent according to a second route, otherwise, the message is sent according to the configured first route.
According to a second aspect of the present invention, a packet forwarding apparatus is provided, where the apparatus is applied to a frame device, where the frame device includes at least two types of service boards, and each type of service board includes at least one service board; the method comprises the following steps:
the dividing unit is used for dividing different physical ports connected with the second type of service board on the frame type equipment and physical ports connected with different external equipment on the first type of service board into different established virtual systems;
a configuration unit, configured to configure a corresponding first route and a second route for the frame device, where the first route is a route from a physical port on the frame device to a second service board connected to the physical port, and the second route is a route from a virtual system to which the physical port on the frame device belongs to a virtual port created in another virtual system; the first route and the second route have the same IP address;
and the sending unit is used for sending the message according to a second route if a second service board connected with a physical port on the frame type equipment associated with the virtual system to which the physical port belongs fails when the physical port of the first service board receives the message, and otherwise, sending the message according to the configured first route.
According to a third aspect of the present invention, there is provided a block apparatus, comprising: a processor and a machine-readable storage medium;
the machine-readable storage medium to store machine-executable instructions;
the processor is configured to read and execute machine-executable instructions stored in a machine-readable storage medium to implement the message forwarding method.
According to a fourth aspect of the present invention, there is provided a machine-readable storage medium having stored therein machine-executable instructions for reading and execution by a processor to implement a message forwarding method as described above.
In the invention, two virtual systems are established in the frame type equipment, the different physical ports connected with the second type of service plate on the frame type equipment and the physical ports connected with different external equipment on the first type of service plate are divided into the established different virtual systems, meanwhile, a second route pointing to the established virtual ports in other virtual systems is configured for each virtual system, and a first route is configured for the physical ports on the frame type equipment, so that the effect that the message forwarding process is not influenced when the second type of service plate fails can be ensured only by switching between the first route and the second route without configuring an ACL table item.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a diagram of an application scenario provided by the present invention;
FIG. 2 is a flow chart of a method provided by the present invention;
FIG. 3 is a flowchart illustrating an implementation of step 101 of the present invention;
FIG. 4 is a flowchart illustrating an implementation of step 102 of the present invention;
FIG. 5 is a flowchart illustrating an implementation of step 103 of the present invention;
FIG. 6 is a flow chart of equivalent routing configuration provided by the present invention;
FIG. 7 is a flow chart of message forwarding based on an equal cost route according to the present invention;
FIG. 8 is a schematic view of the structure of the apparatus according to the present invention;
fig. 9 is a schematic diagram of a hardware structure of the apparatus shown in fig. 8 according to the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Referring to fig. 1, an application scenario diagram provided by the present invention is shown. In this application scenario, a terminal 10, a boxed device 20, and a server 30 are included.
The terminal 10 may forward the packet to the server 30 through the frame device 20, or may receive the packet forwarded by the frame device 20 and sent by the server 30. The terminal 10 may be a notebook computer, a desktop computer, or the like.
The frame device 20 is connected to the terminal 10 and the server 30, and configured to forward a packet sent by the terminal 10 to the server 30 after being processed, and forward a packet sent by the server 30 to the terminal 10 after being processed.
The block device includes a first board connecting the terminal 10 and the server 30, and the first board may be connected to the terminal 10 through TenGigE4_0 and connected to the server 30 through TenGigE4_1, for example. The first type of board card is a board card fixedly provided with an operating system preset by a frame type equipment manufacturer. Because the operating system of the board cannot be changed according to the user requirements, the user can only perform corresponding processing on the message according to the operating system pre-installed on the board, and cannot perform custom processing on the message. For example, the first type of board card may be a board card with a firewall function, or may also be a board card with a traffic cleaning function, and the like.
It should be noted that the number of the first type of board cards may be set according to actual requirements and actual specifications of the frame type device, and the embodiment of the present invention does not limit the number of the first type of board cards.
It should be noted that, in addition to the ports of the connection terminal 10 and the server 30, the first board also realizes connection with the frame device through other ports. Since this part is not the focus of the improvement of the present invention, reference may be made to the connection manner and configuration process of the board and the frame device in the related art, and details thereof will not be described herein.
The frame type equipment further comprises a second type board card, and the second type board card can be connected with the frame type equipment through a port on the frame type equipment. For example, the second type of board card may be connected with the TenGigE5_14 and the TenGigE5_15 on the box device to realize the connection with the box device. The second type of board card is a board card which is developed by various manufacturers according to the above requirements of users and can be provided with a universal operating system. And the user can install different operating systems on the second board card according to requirements so as to realize self-defined message processing. For example, when a user wants to identify whether a message carries a virus, a corresponding system and a self-defined virus library can be installed on the second board card to identify whether the message carries the virus. The virus identification is only used for illustrating the functions of the second type of board card, and the embodiment of the present invention does not limit the specific functions supported by the second type of board card.
It should be noted that the number of the second type of board cards may be set according to actual requirements and actual specifications of the frame type device, and the embodiment of the present invention does not limit the number of the second type of board cards.
The server 30 may process the message sent by the terminal 10 and forwarded by the frame device. The server 30 may also send the message to the frame device 20 when a response message needs to be sent by the terminal or when a message needs to be actively sent to the terminal 10, so that the frame device forwards the message to the terminal 10.
Based on the application scenario shown in fig. 1, when the first type board card and the second type board card are shared in the frame device, that is, when the packet processing function of the first type board card is extended by the second type board card, the first type board card forwards the received packet to the second type board card. After the second board card finishes processing the message, the processed message is transmitted back to the first board card, and then the first board card transmits the message according to the destination IP address in the processed message.
And the second type of service board has a risk of generating an abnormal condition in the message forwarding process. Therefore, mostly, the ACL table entry is set in the first type service board, so that when the second type service board fails, the forwarding of the message without passing through the second type service board is realized through the ACL table entry. However, the ACL table entry setting process is very complicated due to the adoption of the ACL table entry, and mutual conflict is easily generated between different ACL table entries, so that part of ACL table entries cannot work normally.
In view of this, the embodiment of the present invention provides a message forwarding method, so as to more conveniently ensure that a message is normally forwarded when a second-type service board fails.
Referring to fig. 2, a flowchart of a method provided by the present invention may include:
101, dividing different physical ports connected with a second type of service board on the frame type equipment and physical ports connected with different external equipment on a first type of service board into different established virtual systems;
as an example, two virtual systems may be created on the boxed device in advance, and the two virtual systems may be created based on the local operating system of the boxed device.
As an example, since the first type service board may connect two external devices and forward messages transmitted by the two devices to each other. Therefore, different physical ports connected with different external devices on the first-class service board can be divided into different virtual systems. Meanwhile, the frame type equipment is connected with a second type service plate through two ports, so that two physical ports connected with the same second type service plate can be divided into different virtual systems.
With reference to the content shown in fig. 1, in a specific implementation, different physical ports, which are connected to the second type of service board on the frame device, and physical ports, which are connected to different external devices on the first type of service board, are divided into different virtual systems that have been created, and the following implementation manners are adopted:
here, the frame device includes a first service board and a second service board as an example. When a plurality of second-type service boards are included in the boxed device, the method can be executed with reference to the previous example. When the frame device includes a first type service board and a second type service board, the first type service board may be connected to different external devices through different physical ports, for example, the terminal 10 is connected through TenGigE4_0, and the server 30 is connected through TenGigE4_ 1. The second type of service board is connected to two physical ports on the frame device, such as the TenGigE5_14 and the TenGigE5_15 shown in fig. 1. When port division is performed, two physical ports connected to the same second service board on the frame device and different physical ports connected to different external devices by the first type board card may be divided into different virtual systems respectively. For example, TenGigE5_14 and TenGigE5_15 on the box device are different physical ports connecting the same second type service board, and when step 101 is executed, TenGigE5_14 may be divided into virtual system VSYS1, and TenGigE5_15 may be divided into virtual system VSYS 2. The TenGigE4_0 and TenGigE4_1 on the first class of board card are physical ports respectively connected to different external devices, and when step 101 is executed, the TenGigE4_0 on the first class of board card may be divided into the virtual system VSYS1, and the TenGigE4_1 on the first class of board card may be divided into the virtual system VSYS 2. Where S1 and S2 are numbers of virtual systems.
It should be noted here that before a certain physical port is divided into a certain virtual system, there may be no correspondence between the physical port and the virtual system. That is, the TenGigE5_14 or TenGigE5_15 may be divided into any one of the two virtual systems, and then the division of the other physical port may be completed.
Fig. 3 also shows another implementation manner, which will be described in detail below in conjunction with the flow shown in fig. 3, and will not be described again here.
Step 102, configuring a corresponding first route and a second route for the frame device, where the first route is a route from a physical port on the frame device to a second service board connected to the physical port, and the second route is a route from a virtual system to which the physical port on the frame device belongs to a virtual port created in another virtual system; the first route and the second route have the same IP address;
as an example, after the virtual systems are created, each virtual system automatically generates a virtual port for receiving messages sent by other virtual systems. As shown in fig. 1, Virtualif1_1 in VSYS1 is a virtual port automatically generated after VSYS1 is created, for receiving messages sent by VSYS 2. Accordingly, Virtualif2_1 in VSYS2 is a virtual port automatically generated after VSYS2 is created for receiving messages sent by VSYS 1.
As an example, the second type of traffic board is connected to the boxed device by a two-layer connection. Therefore, two physical ports connected to the same second type service board on the frame device can be configured with the IP address of the same network segment. In connection with the illustration of fig. 1, the IP address of TenGigE5_14 may be configured to be 10.10.10.1, and the IP address of TenGigE5_15 may be configured to be 10.10.10.2. The above configuration of the IP address is only for illustration and does not constitute a limitation to the embodiments of the present invention.
As an example, fig. 4 shows an implementation manner for configuring the first route and the second route, which will be described in detail below with reference to the flow shown in fig. 4, and will not be described again here.
103, when the physical port of the first type service board receives the message, if the second type service board connected to the physical port on the frame equipment associated with the virtual system to which the physical port belongs has a fault, the message is sent according to the second route, otherwise, the message is sent according to the configured first route.
As one example, there may be multiple implementations of determining the second type of service board failure. Fig. 5 shows one of them, which will be described in detail below with reference to the flow shown in fig. 5, and will not be described again here.
As an example, in order to implement forwarding by using different routes according to different states of the second type of service boards, different route priorities may be configured in advance for the first route and the second route. For example, a first route may be configured with a higher routing priority than a second route, such that the first route is used in preference to the second route in a default state. When the second type of service board is determined to be in fault, the first route can be disabled, the second route with the lowest priority originally becomes the route with the highest priority, and then the second route is used for sending the message.
As an example, fig. 6 further shows an implementation manner of forwarding a packet when a physical port on the frame device is connected to a second type service board that is different. The following will be described in detail with reference to the flow shown in fig. 6, which is not repeated herein.
In the invention, two virtual systems are established in the frame type equipment, the different physical ports connected with the second type of service plate on the frame type equipment and the physical ports connected with different external equipment on the first type of service plate are divided into the established different virtual systems, a second route pointing to the virtual ports in other virtual systems is configured for each virtual system, and a first route is configured for the physical ports on the frame type equipment, so that the effect that when the second type of service plate fails, the message forwarding process is not influenced can be ensured only by switching between the first route and the second route without configuring an ACL table item.
With reference to the flow shown in fig. 3, how to divide the different physical ports connected to the second type of service board on the frame device and the physical ports connected to the different external devices on the first type of service board into the created different virtual systems will be described below. As shown in fig. 3, the process may include:
step 1011, creating different VRF instances associated with different virtual systems on the frame device;
as one example, two VRF instances may be created on the boxed device and one of the VRF instances associated with one of the virtual systems and the other VRF instance associated with the other virtual system. Creating a VRF instance can be created in a manner well known to those skilled in the art for creating VRF instances.
Step 1012, adding the different physical ports connected to the second type service board on the frame device and the physical ports connected to the different external devices on the first type service board into the created different VRF instances.
As an example, after completing the association between the VRF instance and the virtual system, one of the two physical ports on the boxed device, which are connected to the same second type service board, may be added to one VRF instance, and the other physical port may be added to the other VRF instance. Meanwhile, a physical interface of one external device connected on the first type of board card is added into one VRF instance, and a physical port connected with another external device is added into another VRF instance
The flow shown in fig. 3 is completed.
With reference to the flow shown in fig. 4, how to configure the first route and the second route after completing the partition of the physical port into the virtual system according to the flow shown in fig. 3 is described below. As shown in fig. 4, the process may include:
step 1021, obtaining an IP address to be configured;
as an example, the IP address to be configured here may be an IP address of an external device connected to the first board, or a destination IP address of a packet that needs to be forwarded through the boxed device. For example, in the application scenario shown in fig. 1, the IP addresses to be configured may be the IP address 192.168.2.100 of the terminal 10 and the IP address 192.168.3.254 of the server 30.
As an example, the IP address to be configured may be pre-stored in the boxed device, or may be sent to the boxed device by an external device at the time of configuration.
Step 1022, generating a first route according to the IP address to be configured and the physical port on the frame device, and generating a second route according to the IP address to be configured and the virtual port created in the other virtual system; the route priority of the first route is higher than the route priority of the second route;
as an example, for any virtual system, the first route may be configured according to the IP address of the external device connected to the other physical port, which is associated with the other virtual system, except for the second type of service board. With reference to fig. 1, after TenGigE5_14 and TenGigE4_0 are divided into virtual systems VSYS1, a first route may be configured according to the IP address 192.168.3.254 and TenGigE5_14 of the server 30 to which the TenGigE4_1 is connected, that is, the message to be sent to the server 30 is sent by TenGigE5_ 14. Meanwhile, a second route can be configured according to the IP address of the server 30 and the Virtualif2_1 in the virtual system VSYS2, that is, the message to be sent to the server 30 is sent from the VSYS1 to the Virtualif2_1 in the VSYS 2.
Step 1023, saving the first route and the second route in a virtual route forwarding table corresponding to a VRF instance associated with a virtual system to which the physical port on the boxed device belongs.
As an example, after the configuration of the first route and the second route is completed, the first route and the second route may be stored in a virtual route forwarding table corresponding to a VRF instance associated with a virtual system to which a physical port on the boxed device belongs, so as to be used when forwarding a packet.
The flow shown in fig. 4 is completed.
How to determine the second type of service board failure of the physical port connection on the frame device in step 103 is described below with reference to the flow shown in fig. 5. As shown in fig. 5, the process may include:
step 1031, sending a detection message to another physical port of the frame device connected with the second type service plate through a physical port of the frame device connected with the second type service plate;
as an example, in order to ensure that both virtual systems can detect the state of the second type service version, the frame device may implement detection by sending detection packets to each other through different physical ports connected to the second type service version.
Step 1032, if the response message forwarded by the second type of service board is received within a preset time length, determining that the second service board is normal;
as an example, when the second type of service board is normal, the second type of service board may forward the packet normally. Therefore, each physical port that sends a detection message receives a response message within a preset time.
Step 1033, if the response message forwarded by the second service board is not received within the preset time, determining that the second service board fails.
As an example, when the second type of service board fails, the message cannot be forwarded normally, and therefore, each physical port that sends the detection message does not receive the corresponding message within the preset time length, so that both the two virtual systems determine that the second type of service board fails.
The flow shown in fig. 5 is completed.
With reference to the flow shown in fig. 6, how to configure the first route when different physical ports on the frame device are connected to different second type service boards is described below. As shown in fig. 6, the process may include:
step 104, when different physical ports on the frame device are connected to different second service boards, the first route includes N mutually equivalent routes, where N is the number of the connected second service boards, and any one of the N mutually equivalent routes is a route from any physical port on the frame device divided into the same virtual system to the connected second service board;
as an example, since the frame device may connect a plurality of second-type service boards, routes included in the first route in any virtual system may be configured to be equivalent routes, so as to shunt packets forwarded by the first-type board to the second-type board. As a simple example, when a frame device connects two second-type service boards, a virtual system may associate two physical ports, which connect the two second-type service boards to the frame device, respectively, so that the messages forwarded by the first-type board to the second-type board are sent by the two physical ports, respectively. In this embodiment, routes are configured for the two physical ports in the foregoing manner, and in this step, the two routes are configured as mutually equivalent routes.
And 105, configuring different forwarding weights for different routes in the N routes which are equivalent to each other.
As an example, forwarding weights may be configured for routes that are equivalent to each other according to device resources of different second-type service boards. The device resource may be the number of messages that can be processed by the second type of service board in unit time, the number of messages that can be forwarded by the second type of service board in unit time, the size of the memory in the second type of service board, or the operating frequency of the chip in the second type of service board. Of course, no matter what kind of specific index is used to represent the device resource, the route is configured in such a way that the more the device resource is, the larger the forwarding weight is.
The flow shown in fig. 6 is completed.
Based on the flow shown in fig. 6, how to forward the packet according to the equal cost route will be described below with reference to fig. 7. As shown in fig. 7, the process may include:
as an example, the route may be matched according to the destination IP address of the packet, and after matching to the route, it is checked whether the route is an equivalent route;
step 107, forwarding the message by using the route matched with the message;
as an example, if the route used for forwarding the packet is not an equivalent route, the packet may be forwarded directly according to the route matched with the packet.
Step 108, selecting a route from the N mutually equivalent routes according to the forwarding weight;
as an example, the forwarding weights of the routes are different due to mutual equivalence. Therefore, the route for forwarding the packet can be determined according to the forwarding weight. As a simple example, if the number of equivalent routes is two, the forwarding weight of one route is 4, and the forwarding weight of the other route is 6. In the process of forwarding 10 messages, it may select to forward 4 messages by using the route with forwarding weight of 4, and forward 6 messages by using the route with forwarding weight of 6. Of course, a route with the highest forwarding weight may be selected to forward the packet, and if there are multiple routes with the same and the highest forwarding weights, one route may be randomly selected to forward the packet.
As an example, after selecting a route from the equivalent routes, the message may be forwarded by using the selected route.
The flow shown in fig. 7 is completed.
Corresponding to the embodiment of the message forwarding method, the invention also provides an embodiment of a message forwarding device.
The embodiment of the message forwarding device can be applied to frame type equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. In the case of software implementation, as a logical means, the apparatus is formed by reading, by a processor of a frame device in which the apparatus is located, corresponding computer program instructions in a non-volatile machine-readable storage medium into an internal memory for execution. In terms of hardware, as shown in fig. 9, it is a hardware structure diagram of a server where the packet forwarding device of the present invention is located, except for the processor, the memory, the network interface, and the non-volatile machine-readable storage medium shown in fig. 9, the frame device where the device is located in the embodiment may also include other hardware according to the actual function of the frame device, which is not described again.
Referring to fig. 8, fig. 8 is a device structure diagram of a message forwarding device provided in the present invention. The device is applied to frame type equipment, wherein the frame type equipment comprises at least two types of service plates, and each type of service plate comprises at least one service plate; the device includes:
a dividing unit 810, configured to divide the different physical ports connected to the second type of service board on the frame device and the physical ports connected to the different external devices on the first type of service board into different created virtual systems.
A configuring unit 820, configured to configure, for the frame device, a corresponding first route and a second route, where the first route is a route from a physical port on the frame device to a second type service board connected to the physical port, and the second route is a route from a virtual system to which the physical port on the frame device belongs to a virtual port that has been created in another virtual system; the first route is the same as the IP address in the second route.
A sending unit 830, configured to send, when a physical port of a first-class service board receives a packet, the packet according to a second route if a second-class service board connected to a physical port on a frame-type device associated with a virtual system to which the physical port belongs fails, and otherwise, send the packet according to the configured first route.
The flow shown in fig. 8 is completed.
As an example, the dividing unit 810 includes:
a VRF creation subunit 811 (not shown in the figure) is used to create different VRF instances associated with different virtual systems on the boxed device.
And a joining subunit 812 (not shown in the figure), configured to join, to the created different VRF instances, the different physical ports on the frame device, which are connected to the second type of service board, and the physical ports on the first type of service board, which are connected to different external devices.
As an example, the configuration unit 820 includes:
an obtaining subunit 821 (not shown in the figure) is used for obtaining the IP address to be configured.
A generating subunit 822 (not shown in the figure), configured to generate a first route according to the IP address to be configured and the physical port on the frame device, and generate a second route according to the IP address to be configured and the virtual port created in the other virtual systems; the route priority of the first route is higher than the route priority of the second route.
A saving subunit 823 (not shown in the figure) configured to save the first route and the second route in a virtual route forwarding table corresponding to a VRF instance associated with the virtual system to which the physical port on the boxed device belongs.
As an example, the transmitting unit 830 includes:
a detecting subunit 831 (not shown in the figure), configured to send a detection packet to the other physical port of the frame device connected to the second type service board through the physical port of the frame device connected to the second type service board;
a determining subunit 832 (not shown in the figure), configured to receive, within a preset time period, a response packet forwarded by the second type service board, and determine that the second service board is normal; and not receiving the response message forwarded by the second service board within a preset time length, and determining that the second service board has a fault.
As an example, the configuration unit 820 is specifically configured to, when different physical ports on the frame device are connected to different second type service boards, where the first route includes N mutually equivalent routes, where N is the number of the connected second type service boards, where any route in the N mutually equivalent routes is a route that is divided to any physical port on the frame device in the same virtual system to the connected second type service board.
Different routes of the N mutually equivalent routes have different forwarding weights.
As an example, the sending unit 830 is specifically configured to:
judging whether the route for forwarding the message is the N routes which are equivalent to each other;
if yes, selecting one route from the N routes which are equivalent to each other according to the forwarding weight;
and forwarding the message by using the selected route.
Referring to fig. 9, fig. 9 is a hardware structure diagram of a frame device where the packet forwarding device of the present invention is located, where the hardware structure includes: a processor and a machine-readable storage medium.
Wherein the machine-readable storage medium is configured to store machine-executable instructions;
and a processor configured to read and execute machine-executable instructions stored in the machine-readable storage medium to implement the message forwarding method shown in fig. 2.
For one embodiment, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: volatile machine-readable storage media, non-volatile machine-readable storage media, or similar storage media. In particular, the machine-readable storage medium may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
So far, the description of the apparatus shown in fig. 9 is completed.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A message forwarding method is characterized in that the method is applied to frame type equipment, the frame type equipment comprises at least two types of service plates, and each type of service plate comprises at least one service plate; the method comprises the following steps:
dividing different physical ports connected with a second type of service board on the frame type equipment and physical ports connected with different external equipment on a first type of service board into different established virtual systems;
configuring a corresponding first route and a second route for the frame device, where the first route is a route from a physical port on the frame device to a second service board connected to the physical port, and the second route is a route from a virtual system to which the physical port on the frame device belongs to a virtual port created in another virtual system; the first route and the second route have the same destination IP address;
when the physical port of the first class service board receives the message, if the second class service board connected with the physical port on the frame type equipment associated with the virtual system to which the physical port belongs has a fault, the message is sent according to the second route, otherwise, the message is sent according to the configured first route.
2. The method according to claim 1, wherein the dividing the different physical ports of the frame device connected to the second type of service board and the physical ports of the first type of service board connected to the different external devices into the different created virtual systems comprises:
creating different VRF instances associated with different virtual systems on the boxed device;
and adding different physical ports connected with a second type of service board on the frame type equipment and physical ports connected with different external equipment on the first type of service board into different created VRF instances.
3. The method according to claim 2, wherein the configuring the corresponding first and second routes for the boxed device comprises:
obtaining an IP address to be configured;
generating a first route according to the IP address to be configured and the physical port on the frame type device, and generating a second route according to the IP address to be configured and the virtual port established in the other virtual system; the route priority of the first route is higher than the route priority of the second route;
and storing the first route and the second route in a virtual route forwarding table corresponding to a VRF instance associated with a virtual system to which a physical port on the boxed device belongs.
4. The method according to claim 1, wherein the second type of service board failure of the physical port connection on the frame device is determined by:
sending a detection message to the other physical port of the frame type equipment connected with the second type service plate through one physical port of the frame type equipment connected with the second type service plate;
if the response message forwarded by the second type service board is received within a preset time length, determining that the second type service board is normal;
and if the response message forwarded by the second service board is not received within the preset time length, determining that the second service board has a fault.
5. The method according to claim 1, wherein when different physical ports on the frame device are connected to different second type service boards, the first route includes N mutually equivalent routes, where N is the number of the connected second type service boards, and any one of the N mutually equivalent routes is a route from any physical port on the frame device divided into the same virtual system to the connected second type service board;
different routes of the N mutually equivalent routes have different forwarding weights.
6. The method of claim 5, wherein sending the message according to the configured first route comprises:
judging whether the route for forwarding the message is the N routes which are equivalent to each other;
if yes, selecting one route from the N routes which are equivalent to each other according to the forwarding weight;
and forwarding the message by using the selected route.
7. A message forwarding device is characterized in that the device is applied to frame type equipment, the frame type equipment comprises at least two service plates, and each service plate comprises at least one service plate; the device includes:
the dividing unit is used for dividing different physical ports connected with the second type of service board on the frame type equipment and physical ports connected with different external equipment on the first type of service board into different established virtual systems;
a configuration unit, configured to configure a corresponding first route and a second route for the frame device, where the first route is a route from a physical port on the frame device to a second service board connected to the physical port, and the second route is a route from a virtual system to which the physical port on the frame device belongs to a virtual port created in another virtual system; the first route and the second route have the same destination IP address;
and the sending unit is used for sending the message according to a second route if a second service board connected with a physical port on the frame type equipment associated with the virtual system to which the physical port belongs fails when the physical port of the first service board receives the message, and otherwise, sending the message according to the configured first route.
8. The apparatus of claim 7, wherein the dividing unit comprises:
a VRF creation subunit, configured to create, on the frame device, different VRF instances associated with different virtual systems;
and the adding subunit is configured to add, to the created different VRF instances, different physical ports, which are connected to the second type of service board on the frame device, and physical ports, which are connected to different external devices on the first type of service board.
9. A device in frame, comprising: a processor and a machine-readable storage medium;
the machine-readable storage medium to store machine-executable instructions;
the processor is configured to read and execute machine-executable instructions stored in a machine-readable storage medium to implement the message forwarding method according to any one of claims 1 to 6.
10. A machine-readable storage medium having stored therein machine-executable instructions for reading and execution by a processor to implement the message forwarding method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010182419.9A CN111404811B (en) | 2020-03-16 | 2020-03-16 | Message forwarding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010182419.9A CN111404811B (en) | 2020-03-16 | 2020-03-16 | Message forwarding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111404811A CN111404811A (en) | 2020-07-10 |
CN111404811B true CN111404811B (en) | 2022-03-01 |
Family
ID=71430998
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010182419.9A Active CN111404811B (en) | 2020-03-16 | 2020-03-16 | Message forwarding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111404811B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115118655B (en) * | 2022-06-21 | 2023-12-12 | 阿里巴巴(中国)有限公司 | Cross-network message forwarding method and device, electronic equipment and readable storage medium |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7467191B1 (en) * | 2003-09-26 | 2008-12-16 | Network Appliance, Inc. | System and method for failover using virtual ports in clustered systems |
US7835306B2 (en) * | 2008-01-23 | 2010-11-16 | Cisco Technology, Inc. | Translating MST instances between ports of a bridge in a computer network |
US8397092B2 (en) * | 2010-03-24 | 2013-03-12 | Emulex Design & Manufacturing Corporation | Power management for input/output devices by creating a virtual port for redirecting traffic |
CN104486124B (en) * | 2014-12-19 | 2018-09-04 | 盛科网络(苏州)有限公司 | The device and method of multisystem link aggregation is realized using logic port |
CN105939279B (en) * | 2015-08-19 | 2019-02-19 | 杭州迪普科技股份有限公司 | Flow processing method and device |
CN108989071B (en) * | 2017-06-01 | 2021-04-20 | 中兴通讯股份有限公司 | Virtual service providing method, gateway device, and storage medium |
CN108347392B (en) * | 2018-03-20 | 2021-07-27 | 深圳市风云实业有限公司 | Cross-board processing method, device and system for service message |
CN108683616B (en) * | 2018-04-20 | 2020-07-21 | 全球能源互联网研究院有限公司 | Network configuration device of virtual switch queue |
CN108933744B (en) * | 2018-06-26 | 2021-01-26 | 新华三技术有限公司 | Message forwarding method and device |
CN110011912A (en) * | 2019-03-15 | 2019-07-12 | 北京星网锐捷网络技术有限公司 | Case type switching equipment uplink switching method and device |
-
2020
- 2020-03-16 CN CN202010182419.9A patent/CN111404811B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111404811A (en) | 2020-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109302498B (en) | Network resource access method and device | |
CN111614738B (en) | Service access method, device, equipment and storage medium based on Kubernetes cluster | |
US8767737B2 (en) | Data center network system and packet forwarding method thereof | |
CN110633175B (en) | Multi-computer-room data processing method based on micro-service, electronic equipment and storage medium | |
CN113783922A (en) | Load balancing method, system and device | |
CN110647559A (en) | Data processing method, related node and system | |
US20230421487A1 (en) | Reflection route for link local packet processing | |
CN106657180B (en) | Information transmission method and device for cloud service, terminal equipment and system | |
CN103618718A (en) | Processing method and device aiming at denial of service attack | |
CN110011941B (en) | Message forwarding method and device | |
CN104780103A (en) | Message forwarding method and device | |
CN111064804B (en) | Network access method and device | |
CN111404811B (en) | Message forwarding method and device | |
CN107517129B (en) | Method and device for configuring uplink interface of equipment based on OpenStack | |
CN114760243A (en) | Message transmission method, device and system | |
US8526334B2 (en) | Choosing connectable end points for network test | |
CN110213365B (en) | User access request processing method based on user partition and electronic equipment | |
CN113806086B (en) | Openstack-based iSCSI multipath balanced docking storage method, device and medium | |
US10778574B2 (en) | Smart network interface peripheral cards | |
JP2010504680A (en) | Fault tolerant medium access control (MAC) address assignment in network elements | |
US7856489B2 (en) | Simplify server replacement | |
CN114760165A (en) | Message transmission method, device and system | |
US8135772B2 (en) | Single servlets for B2B message routing | |
CN111131048A (en) | Network traffic forwarding method and device, electronic equipment and machine-readable storage medium | |
CN112351050A (en) | Method, device, communication equipment and storage medium for mirroring data stream |
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 |