Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. 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 application.
The embodiment of the application provides a method and a device for sending a forwarding table item, which are used for solving the problem that services expressed by a group table defined by an OpenFlow protocol cannot be distinguished in the group table in the prior art, so that the group table is not flexible to apply in OpenFlow. The method and the device are based on the same inventive concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be mutually referred, and repeated parts are not repeated.
For specific details of the OpenFlow protocol Specification referred to in the description of the embodiments of the present application, refer to "OpenFlow Switch Specification" version 1.x (OpenFlow Switch Specification 1.x) issued by ONF. For the details of the Negotiable data forwarding plane model (NDM)/Table Type model (TTP), please refer to the open flow Table Type model specification published by ONF.
In addition, ordinal numbers such as "first", "second", "third", and the like in the embodiments of the present application are only used to distinguish a plurality of objects, and the number and the order of the plurality of objects are not specifically limited.
The "service flow" described in the embodiments of the present application is a data flow for describing a service.
The application scenario described in the embodiment of the present application is only for clearly illustrating the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. One of ordinary skill in the art will appreciate that the technical solutions provided in the embodiments of the present application can also be applied to other scenarios.
An application scenario according to the embodiment of the present application will be described below with reference to fig. 1. Fig. 1 shows an Openflow switching system, which includes a controller 100, a first forwarding device 200a, and a second forwarding device 200 b. Fig. 1 is merely an example and does not specifically limit the number of devices. The Openflow switching system may include one or more controllers, each controller is configured to control one or more forwarding devices, and the controllers and the forwarding devices may be connected through southbound interfaces. The controller 100 sends a forwarding table adapted to the first forwarding apparatus 200a, and sends a forwarding table adapted to the second forwarding apparatus 200b, so that the first forwarding apparatus 200a adapts the forwarding table through the quintuple information carried in the packet when receiving the packet, and then forwards the packet according to the forwarding table. Therefore, when receiving the packet, the second forwarding device 200b adapts the forwarding table entry through the quintuple information carried in the packet, and then forwards the packet according to the forwarding table entry. In the embodiment of the present application, the quintuple is not limited, and a heptatuple and the like may be further used. The five-tuple includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol. The seven-tuple includes a source IP address, a destination IP address, a protocol number, a source port, a destination port, a service type, and an interface index.
An embodiment of the present application provides a method for sending a forwarding entry, as shown in fig. 2, the method includes:
s201, the controller 100 obtains a first forwarding table entry, where the first forwarding table entry includes group table information, and the group table information includes service type information used for indicating a service type of a service flow corresponding to the first forwarding table entry.
The group table information carries service type information for indicating the service type of the service flow corresponding to the forwarding table entry, that is, service type information corresponding to the service type described by the group table corresponding to the group table information.
S202, the controller 100 sends the first forwarding table entry to the first forwarding device 200 a.
In the embodiment of the application, the service type information is added in the group table, so that the group table can better distinguish the services expressed by the group table, and the flexibility of the application of the group table in OpenFlow is increased.
If the group table is configured, the plurality of group tables may be partitioned based on the traffic type described by the group table. The group table information carried in the packet may include service type information used to indicate the service type of the service flow corresponding to the packet.
Therefore, the first forwarding table entry forwarded by the controller 100 to the first forwarding device 200a is used to indicate that, when the first forwarding device forwards a packet, based on the service type information, included in the group table information carried in the packet, for indicating the service type of the service flow corresponding to the packet, the service type information, included in the group table information in the first forwarding table entry, for indicating the service type of the service flow corresponding to the first forwarding table entry is matched, and the packet is forwarded based on the group table corresponding to the matched group table information in the first forwarding table entry.
Through the scheme, when the forwarding device is matched with the forwarding table entry, part of the group table is preferentially screened out according to the service type information in the matched forwarding table entry, then the group table corresponding to other information except the service type information in the group table information is determined in the screened group table, and the message is forwarded by using the screened group table, so that the application flexibility of the group table in Openflow is improved.
The service type information may be carried in a field of the header for describing the group table, as shown in table 2. The field extension message header includes service type information.
TABLE 2
Because the related services are more at present, one service type can be set for each service, and certainly, the same service type can be set for a plurality of similar services, so that the occupied bit number can be saved.
Optionally, the service type information for indicating the service flow corresponding to the first forwarding table entry is set in the high-order 4 bits of the highest byte occupied by the Group table information, and the other 28 bits of the highest 4 bytes in the Group table information except for the 4 bits occupied by the service type information for indicating the service flow corresponding to the first forwarding table entry are used to indicate a Group identifier Group ID in the Group table information.
Specifically, in the embodiment of the present application, the Group ID is extended, and the Group ID occupies the highest 4 bytes of the Group table information in the prior art. Because the service type only occupies the upper four bits, the same service type is set for a plurality of similar services during setting.
In this embodiment of the present application, the service type information, which is used to indicate the service type of the service flow corresponding to the first forwarding table entry, is identified in the high 4 bits of the highest byte. And the other 28 bits of the top 4 bytes except for the 4 bits occupied by the service type information used for indicating the service type of the service flow corresponding to the first forwarding table entry are used for indicating the group identifier ID in the group table information.
For example, as shown in table 3, various service types are indicated by numbers.
TABLE 3
As shown in table 3 above, the group id has a total of 32 bits, and the upper 4 bits are used to represent the service type described by the group, and the lower 28 bits are used to represent the group id of the group defined by the standard Openflow protocol.
Using an L2Interface as an example, the name mappings may be organized into the form described in Table 4 below:
TABLE 4
Domain (filled)
|
Number of bits
|
Description of the invention
|
Interface (Port) Id
|
[15:0]
|
Indicating physical interfaces
|
vlan id
|
[27:16]
|
vlan id
|
Business Type (Type)
|
[31:28]
|
0 (L2 Interface) |
As shown in Table 4 above, the upper 4 bits (31-28 bits) are used to represent the service type described by the group, here 0, which represents the L2Interface type, the middle 12 bits (27-16) are used to represent vlan id, and the lower 16 bits (15-0) are used to represent the actual physical Interface corresponding to the Interface.
Optionally, in this embodiment of the present application, the service type information used for indicating the service flow corresponding to the first forwarding table entry may be set in the highest 2 bytes occupied by the group table information, and the other 32 bits, except the 16 bits occupied by the service type information used for indicating the service flow corresponding to the first forwarding table entry, in the highest 6 bytes in the group table information are used for indicating a group identifier ID in the group table information.
Specifically, in the embodiment of the present application, the Group ID may be further extended in the following manner, and the Group ID is expressed by using 48 bits in total of 6 bytes. Wherein the upper 16 bits are used to represent different types and the lower 32 bits are used to represent group ids under each type. For example, as shown in table 5.
TABLE 5
Compared with the above way of using the high 4 bits to represent the service type and the low 28 bits to represent the group id, the way of using 6 bytes to extend the group id has two advantages: one is that the service types are represented by two bytes, the number of the service types described by the representable group is greatly increased, 65535 types can be supported maximally, and one service type can be already marked for each service; secondly, when the device interacts with messages of other traditional devices conforming to the Openflow standard, the lower 32 bits can be directly intercepted as group ids to interact with the messages of the other devices.
In this embodiment of the present application, the service type information used for indicating the service flow corresponding to the first forwarding table entry may be set in the highest 1 byte occupied by the group table information. The embodiment of the application does not specifically limit the byte position of the service type information, and can be configured according to service requirements.
In addition, OpenFlow is a forwarding protocol followed by data forwarding in the SDN architecture. The biggest problems faced by OpenFlow in the forwarding plane are: the commercial chip corresponding to the existing forwarding device has a limited support for OpenFlow in forwarding, and cannot perform actions that can be theoretically supported. But commercial chips have long development cycles and high technical thresholds. Therefore, in order to promote the development and wide deployment of SDN technology, the open network fund proposes a Table type template (english: Table Typing Patterns, TTP for short). The TTP is mainly a function that needs to be achieved by combining Openflow with processing logic and table entries of existing business chips. Therefore, the TTP defines a framework, different forwarding models can be defined according to actual application requirements and existing business chip architectures, each model can design a plurality of flow tables, include a plurality of different fields, and execute different actions, and since the TTP is implemented on the basis of the existing business chip, and the existing business chip has standards in matching fields and executed actions, a business chip can only correspond to one TTP format.
An existing SDN controller 100 needs to adapt to business chips corresponding to different manufacturers and different types of forwarding devices, so if TTP formats that can be supported by the business chips corresponding to the different types of forwarding devices of different manufacturers are different and the controller 100 does not adapt to the business chip of the forwarding device in the TTP format, when the controller 100 sends a forwarding entry required by the forwarding device controlled by the controller 100, the forwarding device cannot identify the forwarding entry, so that the forwarding device cannot forward a message. Therefore, in the embodiment of the present application, it may be preferentially determined whether the TTP adapted by the controller 100 is the same as the TTP followed by the forwarding device in forwarding the packet, and if not, the format of the forwarding table is to be converted.
In this embodiment, it is assumed that the controller 100 is not adapted to a first TTP, a format of the first forwarding entry follows the first TTP, the first TTP is a rule followed by the first forwarding device 200a to forward a packet, the controller 100 is adapted to a second TTP, and the second TTP is a rule followed by the second forwarding device 200b to forward a packet. If the controller 100 needs to send a forwarding table entry to the first forwarding device 200a, a second forwarding table entry is generated according to the adapted second TTP, and the format of the second forwarding table entry follows the second TTP. Therefore, the controller 100 converts the second forwarding table entry into the first forwarding table entry following the first TTP according to the relationship between the second TTP and the first TTP, and then sends the first forwarding table entry to the first forwarding apparatus 200 a. Since the controller 100 and the second forwarding device 200b are both adapted to the second TTP, when the controller 100 needs to send the forwarding table to the second forwarding device 200b, the forwarding table is directly generated according to the adapted second TTP and sent to the second forwarding device 200b, and no conversion is needed.
Based on this, before step S201, the method further includes:
s200a, the controller 100 obtains the second forwarding table entry.
S200b, based on the corresponding relationship between the second TTP and the first TTP, the controller 100 converts the second forwarding entry into the first forwarding entry.
Through the scheme, when the first forwarding device is matched with the forwarding table item, part of the group table is preferentially screened out according to the service type information in the matched forwarding table item, then the group table corresponding to other information except the service type information in the group table information is determined in the screened group table, and the message is forwarded by using the screened group table. Or the corresponding relation between the second TTP and the first TTP is established through the service type information, so that the application of the group table is more flexible.
Wherein, each service flow supported by the first forwarding device 200a is described in the first TTP, each service flow supported by the first forwarding device 200a corresponds to a group table, and group table information included in a group table corresponding to each service flow supported by the first forwarding device 200a carries service type information used for indicating a service type of each service flow; the second TTP describes each service flow supported by the second forwarding device 200b, each service flow supported by the second forwarding device 200b corresponds to a group table, and group table information of a group table corresponding to each service flow supported by the second forwarding device 200b carries service type information used for indicating a service type of each service flow; therefore, the correspondence relationship between the second TTP and the first TTP may be constructed by the controller 100 based on the traffic type information corresponding to each traffic flow supported by the first forwarding device 200a and the traffic type information corresponding to each traffic flow supported by the second forwarding device 200 b.
Optionally, after the controller 100 acquires the second forwarding entry and before acquiring the first forwarding entry, the method further includes:
s200c, the controller 100 constructs a correspondence relationship between the second TTP and the first TTP.
Alternatively, the correspondence relationship between the second TTP and the first TTP may be established when the controller 100 establishes a connection with the first forwarding device 200a, or when the first forwarding device 200a accesses the controller 100.
After the OpenFlow switching system is configured, when the system is started, the controller 100 and the first forwarding device 200a need to start a connection adaptation process, and a corresponding relationship between the second TTP and the first TTP is established in the process.
The first TTP and the second TTP may be stored in a file format or a data structure format, such as a text file.
When the controller 100 establishes the correspondence between the second TTP and the first TTP, the following may be implemented:
the controller 100 obtains the second TTP and the first TTP;
the controller 100 parses second flow path information describing a flow path of the traffic flow supported by the second forwarding device 200b from the second TTP, and parses first flow path information describing a flow path of the traffic flow supported by the first forwarding device 200a from the first TTP;
the controller 100 traverses the traffic flow included in the second flow path information and the traffic flow included in the first flow path information, and determines the traffic flow included in the first flow path information and the traffic flow included in the second flow path information which have the same traffic type information; determining that a second service flow in the second flow path information is the same as a service described by a first service flow in the first flow path information from service flows included in the determined first flow path information and service flows included in the second flow path information with the same service type information;
the controller 100 obtains the correspondence between the flow path information of the second traffic flow and the flow path information of the first traffic flow, thereby determining the correspondence between the second TTP and the first TTP.
In this embodiment of the present application, the first flow path information and the second flow path information are each a set of flow paths, and the first flow path information describes flow paths of all traffic flows supported by the first TTP file; the second flow path information describes flow path descriptions of all traffic flows supported by the second TTP file.
The corresponding relationship between the second TTP and the first TTP is used to instruct the controller 100 to convert the second forwarding table following the second TTP into a first forwarding table following the first TTP and send the first forwarding table to the first forwarding device 200a when sending the forwarding table to the first forwarding device 200 a.
By the above scheme, the corresponding relationship between the flow path information of the first service flow and the flow path information of the second service flow is obtained, so that when the controller 100 sends a forwarding table entry to the first forwarding device 200a, the second forwarding table entry following the second TTP is converted into a first forwarding table entry following the first TTP and then sent to the first forwarding device 200a, thereby ensuring that the first forwarding device 200a can forward a message according to the received forwarding table entry sent by the controller 100, and avoiding an error caused by using different TTPs to forward the message. And one controller 100 can support multiple different types of forwarding devices, only the TTP of the forwarding device needs to be acquired, and the SDN solution can be better supported. In addition, the scheme provided by the embodiment of the application does not need to improve the chip at the controller 100 end to adapt to different TTPs, thereby avoiding prolonging the development cycle of the commercial chip and saving resources.
Optionally, after the controller 100 obtains the correspondence between the flow path information of the first service flow and the flow path information of the second service flow, the controller 100 generates control information according to the correspondence between the flow path information of the first service flow and the flow path information of the second service flow, where the control information is used to control the controller 100 to convert the second forwarding entry following the second TTP into the first forwarding entry following the first TTP and then send the first forwarding entry to the first forwarding device 200a according to the correspondence between the flow path information of the first service flow and the flow path information of the second service flow when sending the forwarding entry to the first forwarding device 200 a.
In the above solution, the generated control information describes that the controller 100 performs TTP format conversion on the forwarding table entry according to the correspondence between the flow path information of the first traffic flow and the flow path information of the second traffic flow, that is, the control information describes the correspondence between the first TTP and the second TTP. Of course, control information how to perform TTP format conversion for following the forwarding table entry according to the corresponding relationship between the flow path information of the first traffic flow and the flow path information of the second traffic flow may also be configured in advance in the controller 100, so that the controller 100 can directly convert the TTP format for following the forwarding table entry according to the corresponding relationship between the flow path information of the first traffic flow and the flow path information of the second traffic flow.
Based on this, the generated control information is used to describe the corresponding relationship between the first TTP and the second TTP, and the control information is generated according to the corresponding relationship between the flow path information of the first service flow and the flow path information of the second service flow, that is, a conversion rule how to control the conversion from the first TTP to the second TTP is generated according to the corresponding relationship between the flow path information of the first service flow and the flow path information of the second service flow.
According to the scheme, when the fact that the second service flow in the second flow path information is the same as the service described by the first service flow in the first flow path information is determined, the service flows with the same service type are preferentially searched, and then whether the service described by the service flows is the same or not is determined in the service flows with the same service type, so that fields needing to be matched for each service flow are prevented from being matched once, and the searching efficiency is improved.
Optionally, when parsing out stream path information describing stream paths of traffic flows supported by different forwarding devices based on the TTP, the controller 100 may be implemented by:
the controller 100 may parse second flow path information describing a flow path of the traffic flow supported by the second forwarding device 200b from the second TTP, and may implement the following steps:
the controller 100 parses a second table tree for describing a flow path relationship of the traffic flow supported by the second forwarding device 200b from the second TTP and stores the second table tree;
wherein, the node in the second table tree is a second flow table identifier that needs to be matched with the service flow supported by the second forwarding device 200 b; the nodes in the second table tree-like graph carry fields required by child nodes pointing to the nodes from the nodes and the values of the fields; the second flow table identification comprises a group ID of a group table corresponding to each service flow; the field comprises service type information carried in group table information corresponding to the group ID; the field is contained in a second flow table corresponding to a second flow table identification of the node;
the controller 100 parses first flow path information of a flow path of the traffic flow supported by the first forwarding device 200a from the first TTP, and includes:
the controller 100 parses a first table tree describing a flow path relationship of the traffic flow supported by the first forwarding device 200a from the first TTP and stores the first table tree;
wherein, the node in the first table tree is a first flow table identifier that needs to be matched with the service flow supported by the first forwarding device 200 a; nodes in the first table tree carry fields required by children nodes pointing to the nodes from the nodes and values of the fields; the fields carried by the nodes corresponding to each service flow and the values of the fields form a phrase according to the pointing sequence of the nodes; the second flow table identification comprises a group ID of a group table corresponding to each service flow; the phrase comprises a service type carried in group table information corresponding to the group ID; the field is included in a first flow table corresponding to a first flow table identification of the node.
Among them, the field may be a Match (Match) and/or an Instruction (Instruction) included in the flow table, or the like.
The controller 100 traverses the traffic flow included in the second flow path information and the traffic flow included in the first flow path information, determines the traffic flow included in the first flow path information and the traffic flow included in the second flow path information which have the same traffic type information, determines, from the traffic flow included in the determined first flow path information and the traffic flow included in the second flow path information, that the traffic described by the second traffic flow in the second flow path information is the same as the traffic described by the first traffic flow in the first flow path information, and may implement the following steps:
the controller 100 traverses the phrase corresponding to each service flow supported by the first forwarding device 200a and the phrase corresponding to each service flow supported by the second forwarding device 200b, determines at least one second phrase corresponding to the service flow supported by the second forwarding device 200b and at least one first phrase corresponding to the service flow supported by the first forwarding device 200a that include the same service type information, matching values of fields and fields other than the service type information included in the at least one second phrase with values of fields and fields other than the service type information included in the at least one first phrase, and determining that the second service flow described in the second table tree diagram is the same as the service described in the first service flow described in the first table tree diagram according to the matching result.
The controller 100 obtains the corresponding relationship between the flow path information of the second service flow and the flow path information of the first service flow, and implements the following steps:
the controller 100 determines an order of a second flow table of the second service flow described by the second table tree diagram, and sequentially determines fields in the second flow table corresponding to fields in the first flow table of the first service flow according to the determined order.
The controller 100 may represent the flow path trend of the traffic flow as a first table tree diagram as shown in fig. 4 through parsing the first TTP. The node in the first table tree is a first flow table identifier that needs to be matched with the service flow supported by the first forwarding device 200 a; nodes in the first table tree carry fields required by children nodes pointing to the nodes from the nodes and values of the fields; the fields carried by the nodes corresponding to each service flow and the values of the fields form a phrase according to the pointing sequence of the nodes; the second flow table identification comprises a group ID of a group table corresponding to each service flow; the phrase comprises service type information carried in group table information corresponding to the group ID; the field is included in a first flow table corresponding to a first flow table identification as the node.
The controller 100 may represent the flow path trend of the traffic flow as a second table tree diagram as shown in fig. 3 through parsing the second TTP. The flow path of each traffic flow may be regarded as a process of matching the flow table, by which it is finally indicated from which port to output. So matching different flow tables will take different paths.
Since the last matched table of each traffic stream is a Group table, the last field in the phrase is a Group ID. The service flows including the same service type can be preferentially found based on the service types included in the GroupID. For example, flowath 1 shown in fig. 3 is used to match each traffic flow shown in fig. 4, the traffic type included in the GroupID in flowath 1 is determined to be 1, that is, L3Unicast, the flowath 1 is a flow path describing three-layer Unicast forwarding traffic, and then the flow path with the traffic type 1 is searched in each flow path shown in fig. 4. Then, the phrases corresponding to the flow path with the service type 1 found in each flow path shown in fig. 4 are matched with the phrases corresponding to the flow 1 one by one.
Specifically, fig. 3 illustrates a flow path of 4 traffic flows, and each circle can be considered as a flow table. There may be a cross point in the two flow paths, e.g. flow table a. Each flow table or group table also corresponds to a field required for how the corresponding traffic flow matches the flow table pointing to the child node from the flow table and a value of the field, respectively.
FIG. 3 shows a second table tree, where the flow path (flow path)1 of the second table tree is a- > b- > e- > l, and there may be a relation a- > b, and this path needs match a MAC _ DST, where MAC _ DST represents MAC address, so the created phrase will have (match, MAC _ DST); then continuing b- > e may have match with a vlan ID, wherein the vlan ID represents the local area network ID; then a new phrase (match, vlan ID) is added, and then e- > l may be a (group), that is, a group that describes to jump to the group, where the group represents the group and the group represents the group ID.
Then the phrase for this flowpath1 is as shown in table 6:
TABLE 6
Match
|
MAC_DST
|
Match
|
Vlanid
|
Group
|
Groupid |
Fig. 4 shows a first table tree, one for each circle in fig. 4. There are multiple flow paths depicted in fig. 4: c- > A- > F, C- > A- > B- > G, C- > A- > E- > H, C- > A- > E- > I, C- > A- > D- > J. Then finding out the phrases of these stream paths, assuming that the corresponding phrases are as follows: the phrase corresponding to C- > A- > F is shown in Table 7, the phrase corresponding to C- > A- > B- > G is shown in Table 6, the phrase corresponding to C- > A- > E- > H is shown in Table 9, the phrase corresponding to C- > A- > E- > I is shown in Table 8, and the phrase corresponding to C- > A- > D- > J is shown in Table 10.
TABLE 7
Match
|
Ipv4Dst
|
Group
|
Groupid |
TABLE 8
Match
|
Ipv4Dst
|
Match
|
MAC_DST
|
Group
|
Groupid |
TABLE 9
Watch 10
Match
|
Vlanid
|
Match
|
MAC_DST
|
Group
|
Groupid |
If the service type in the GroupID included in the phrase corresponding to flowath 1 in the second table tree diagram is 1, a phrase whose service type is 1 in the GroupID included in the phrases corresponding to each flow path of the first tree diagram structure is searched, and it is assumed that the service type in the GroupID in the phrases described in table 7, table 8 and table 9 is 1. For convenience of subsequent description, a phrase with a service type 1 in the GroupID, which is searched and included in phrases corresponding to each flow path of the first tree diagram structure, is referred to as a first service flow phrase.
Then, by comparing the phrase corresponding to flowath 1 in the second table tree with the phrase corresponding to the first traffic flow, it can be determined that the phrase of table 8 is the same as the phrase of table 6 corresponding to flowath 1, and thus it can be determined that the flow path C- > a- > E- > H corresponding to table 8 is the same as the traffic described in flowath 1.
Specifically, when a phrase corresponding to the flowpath1 is matched with a phrase of the first service flow, the method can be implemented as follows:
a bitmap of flowath 1 is initialized, for example, a bitmap of flowath 1 is initialized to three bits 000, each bit representing a phrase in the phrase map. The target Path should include the same phrase as flowpath1, and the bitmap of the target Path is 111. Comparing phrases corresponding to flowpath1 with the first service flow phrase, respectively, comparing with C- > A- > F, all phrases are not matched, the final bitmap is still 000, comparing with C- > A- > B- > G, the MAC _ DST of the first bit and the Group of the third bit in the target path appear successively, and then the bitmap is finally 101; in comparison to the third C- > A- > E- > H, all three phrases are present and the bitmap end result is 111. And then the obtained bitmaps are respectively bit-wise equal to the bitmap 111 of the target path after bit-wise operation with the bitmap 111 of the target path, namely the bitmaps are the same as the service described by the service flow corresponding to the target path to be selected.
Because there is no phrase value in the target path and no sequence is concerned during bitmap lookup, the final bitmaps of C- > a- > E- > H and C- > a- > E- > I are both 111, two paths may be the same as the target path, and at this time, we want to concern about the precedence relationship of phrases of the traffic flow described by the target path when forwarding normally, that is, some traffic flows strictly require the matching relationship of forwarding keywords, and the appearance sequence of phrases is completely consistent with the target path, so C- > a- > E- > H is the flowpath with the same traffic flow description service as the target path.
Optionally, the controller 100 may further parse the first table tree and the second table tree as follows:
the controller 100 decomposes the first TTP into a first TTP tree and stores the first TTP tree according to a relationship between a plurality of titles and a plurality of titles included in the first TTP;
wherein, the root node in the first TTP tree graph is the name of the first TTP; a first level node in the first TTP tree is a child node of the root node; a first level node in the first TTP tree comprises a first level header included by the first TTP, a second level node in the first TTP tree is a child node of the first level node in the first TTP tree, and the second level node in the first TTP tree comprises a second level header included by the first TTP; a third level node in the first TTP tree is a child node of a second level node in the first TTP tree, the third level node in the first TTP tree includes a third level header included in the first TTP, the first level header included in the first TTP includes a first flow table, the second level header included in the first TTP includes a name of the first flow table, and the third level header included in the first TTP includes an attribute of the first flow table;
the controller 100 parses a first table tree from the decomposed first TTP tree.
The controller 100 decomposes the second TTP into a second TTP tree and stores the second TTP tree according to a relationship between a plurality of titles and a plurality of headings included in the second TTP;
wherein, the root node in the second TTP tree is the name of the second TTP; a first level node in the second TTP tree is a child node of the root node; a first level node in the second TTP tree comprises a first level header included by the second TTP, a second level node in the second TTP tree is a child node of the first level node in the second TTP tree, and the second level node in the second TTP tree comprises a second level header included by the second TTP; a third level node in the second TTP tree is a child node of a second level node in the second TTP tree, the third level node in the second TTP tree includes a third level header included in the second TTP, the first level header included in the second TTP includes a second flow table, the second level header included in the second TTP includes a name of the second flow table, and the third level header included in the second TTP includes an attribute of the second flow table;
the controller 100 parses a second table tree from the decomposed second TTP tree.
In the implementation mode, the TTP is decomposed and then stored in the format of the TTP tree graph, so that convenience is provided for subsequent analysis of the table tree graph.
In the embodiment of the present application, the number of nodes included in each level of nodes in the TTP tree is not specifically limited. And the number of the child nodes of each level of the node is not specifically limited, and certainly, each level of the node may include the child node or may not include the child node.
The description of the embodiments of the present application for the TTP may further include a fourth-level title, a fifth-level title, and the like. The number of included title ratings is determined according to the description in the TTP.
For example, as shown in fig. 5, the first-level header of the TTP includes a flow table as an example. The root node is the name of the TTP, and the first-level node is a flow table which is a first-level title included in the TTP. The second level node includes a second level header included by the TTP. The second level header includes a name, a stream mode type. The name in the second-level header refers to the name of the flow table, and the flow mode type is used to indicate an instruction that the flow table points to the next flow table. Where the stream pattern type can in turn be broken down into third level headers: name, domain, match type, instruction. The name in the third level header is the name of the stream mode type. For example: control framework to controller, control framework to virtual local area network. The fields and match types herein may also be collectively referred to as a match set, in which case the third level headings include names, match sets, instructions. Then a fourth level header is also included: a domain and a match type.
For example, as shown in fig. 6, a TTP tree after TTP decomposition is shown, and in fig. 6, the first-level header of the TTP includes the flow table and also includes other headers as an example.
The first level title includes: negotiable Data-plane Model (NDM) metadata (metadata), table maps (table maps), Identifiers (Identifiers), flow tables (flow _ tables), group entry types, and flow paths.
The second stage header of the flow table includes: name (name), built flow model (build in flow models), table subset (table), and flow mode type (table _ subsets), so that child nodes of the flow table include name, built flow model, table subset, and flow mode type. And the names in the second-level title, the established flow model, the table subset and the flow mode type have the association relationship. The method comprises the steps that a plurality of name information are included under a name node, a plurality of flow model information are included under an established flow model node, a plurality of table subset information are included under a table subset node, and a plurality of flow mode type information are included under a flow mode type node. Between them a name information points to a stream model information points to a table subset information points to a stream mode type information. The same applies to the other stage headings, and the embodiments of the present application are not described in detail here. The second level header of the group table includes a name (name), a group table type (group type), and a bucket type (bucket types). The second level title of the path includes a name (name), a path (path).
The third level headings under the flow pattern type node include: name (name), match set (match set), instruction set (instruction set). The third level headings under the table subset nodes include: name (name), subset (subset). The third level headings under the bucket type node include: action set.
The fourth level headings under the matching set node include: field, match type. The fourth level headings under the instruction set nodes include: instruction (instruction). The fourth level headings under the action subset node include: and (action).
The fifth level headings under the instruction node include: and (action).
Wherein each node not including the word node points to the information included by that node. In addition, a path node points to a name in the second level node of the flow table, a subset in the third level node of the subset of tables, and a name in the second level node of the group table. I.e., a path has an association with the name of the flow table, a subset in the third level node of the table subset, and a name in the second level node of the group table. In particular, this may be implemented by pointers in the data structure.
Through the above method, a TTP file is decomposed into a TTP tree as shown in fig. 6.
After a TTP file is decomposed into TTP tree graphs, a table tree graph used for describing the flow path relation of the service flow supported by the forwarding equipment is analyzed from the TTP tree graphs. Reference may be made in particular to fig. 3 and 4.
Optionally, the first table tree diagram and the second table tree diagram may be parsed as follows:
after the first TTP is decomposed into a first TTP tree diagram, a first flow path tree diagram is resolved from the decomposed first TTP tree diagram; the first flow path tree diagram comprises a flow path tree diagram corresponding to the flow paths of a plurality of traffic flows, and each node in each flow path tree diagram is a field needing to be matched in the flow path of the traffic flow and a value of the field. For example, as shown in FIG. 7: the node flow path points to the table subset, the flow mode type, the established flow model and the group table; the subset of tables points to a stream pattern type; the stream pattern type points to the matching subset and the instruction subset; the matching subset points to a domain and a matching type; the subset of instructions points to instructions; the group table is directed to a group table type and a bucket type, which points to an action.
Then, a first table tree diagram for describing the traffic flow supported by the second forwarding device 200b is extracted from the decomposed first flow path tree diagram.
After the second TTP is decomposed into a second TTP tree, a second flow path tree can be parsed from the decomposed second TTP tree; the second flow path tree diagram comprises a flow path tree diagram corresponding to the flow paths of the plurality of traffic flows, and each node in each flow path tree diagram is a field needing to be matched in the flow path of the traffic flow and a value of the field. A second table tree describing the traffic flows supported by the first forwarding device 200a is then parsed from the decomposed second flow path tree.
The nodes in the first table tree graph analyzed by the method can only carry fields required by child nodes pointing to the nodes from the nodes, and particularly, when the values of the fields are required, the values of the fields stored in the first flow path tree graph are inquired; meanwhile, the nodes in the second table tree graph analyzed by the method can only carry fields required by child nodes pointing to the nodes from the nodes, and specifically, when the values of the fields are required, the values of the fields stored in the second flow path tree graph are inquired.
Optionally, the controller 100 matches the values of the fields and the fields other than the service type information included in the at least one second phrase with the values of the fields and the fields other than the service type information included in the at least one first phrase, and may be implemented as follows:
the controller 100 matches fields other than the service type information included in the at least one second phrase with fields other than the service type information included in the at least one first phrase based on the term data dictionary; and when the matching is consistent, matching the values of the fields except the service type information in the second phrase which is consistent with the matching with the values of the fields except the service type information in the first phrase which is consistent with the matching to obtain a matching result.
Wherein the term data dictionary is used for describing the corresponding relation of different fields expressing the same meaning in at least two TTPs. For example: the term data dictionary includes correspondences of different fields in the first TTP and in the second TTP for expressing the same meaning. The correspondence between the field expressed by the first TTP and the field expressed by the second TTP in the term data dictionary may be performed by using standard fields defined in the Openflow protocol and the TTP protocol.
For example, the destination MAC address in the first TTP is described in the following manner: "MAC _ DST"; and the description mode of the destination MAC address in the second TTP is "ETH _ DST", so the term data dictionary includes the correspondence between the description modes of the two destination MAC addresses. That is, a mapping relationship is made between fields describing the same meaning, and a term data dictionary is constructed. Specifically, the mapping may be performed according to a field description mode defined in the openflow standard.
After the first table tree diagram and the second table tree diagram are established, the controller 100 obtains the correspondence between the flow path information of the first service flow and the flow path information of the second service flow, and may implement the following steps:
the controller 100 determines an order of a second flow table of the second service flow based on the obtained flow path information of the second service flow, and sequentially determines fields in the second flow table corresponding to fields in the first flow table of the first service flow according to the determined order. And generating control information after sequentially determining fields in the second flow table corresponding to fields in the first flow table of the first service flow according to the determined sequence.
For example: as shown in fig. 8, the sequence of each flow table that needs to be matched and corresponds to the second service flow is B1- > B2- > B3, and the sequence of each flow table that needs to be matched and corresponds to the first service flow is H1- > H2- > H3- > H4. B1 corresponds to H1 and H2. Each circle in fig. 8 is used to represent a flow table. B1, B2, etc. in the circle are used to identify the flow table name. Control information is then generated based on which fields of each flow table need to be matched.
In some application scenarios, the controller 100 manufacturer may set an internal data dictionary, which may be referred to as an FES internal data dictionary, and an FES private table. The FES private sheet forwards corresponding field description information for the service flow defined in the manufacturer. The TTP is a description file which is externally packaged on the basis of an internal FES private sheet and conforms to Openflow forwarding. The FES internal data dictionary describes the correspondence between each field described in the TTP and a field set internally by the vendor. And a table to which each field belongs is described. It can be determined from the FES internal data dictionary that H1 corresponds to T1, H2 corresponds to T3 and T5, and thus B1 can be determined to correspond to T1, T3, T5. And the FES internal data dictionary is used for describing the mapping relation between the field analyzed by the first TTP and the field described by the FES private sheet. Wherein, T1-T6 are fields described by the FES private sheet.
Specifically, the flow table correspondence shown in fig. 8 is an example, and the process of generating the control information is as follows:
firstly, starting from a first flow table of a flow path (B1-B2-B3) of a first manufacturer, searching a corresponding flow table in traffic flows of TTP (H1-H2-H3-H4) of a second manufacturer corresponding to the flow path according to match/action;
then, through a flow table corresponding to the TTP of the second manufacturer, which fields in which FES tables (T1-T6) are correspondingly needed are searched; and finally, for the searched FES table and field, recording the field of which table of the target TTP the FES table and field should be issued to on the field to generate an issuing configuration file.
The control information may be represented as a mapping of FES table number/field name- > target table number/field name, as indicated by the dashed line in fig. 9. Flow table 1 includes three Match (Match) fields and a go to Group table (Goto Group) field, the two Match fields being ETH _ TYPE and IP _ DST and VRF, respectively. ETH _ TYPE represents a MAC address TYPE, IP _ DST represents a destination IP address, and VRF represents a virtual forwarding network identifier. The Goto Group field is L3_ Unicast, and L3_ Unicast is used to indicate three-layer Unicast forwarding service. Two matching fields are included in flow table 2, VRFID and IPV4_ DST, respectively. In flow table 2, the Goto Group field is SecondLevel-ECMP. VRFID represents virtual forwarding network identification, and SecondLevel-ECMP represents two-layer equivalent routing service.
Match (ETH _ TYPE) and Match (IP _ DST) in table 1 correspond to Match (IPV4_ DST) in table 2, and Match (vrf) in table 1 corresponds to Match (vrfid) in table 2. The FES internal data dictionary comprises field values uivrfIndex, uiDestAddr, UCMaskLen and the like, wherein the field values are used for describing routing information data in the forwarding process, the uivrfIndex represents a Virtual Private Network (VPN) index, the uiDestAddr represents a destination IP address, and the UCMaskLen represents an IP address mask. Wherein, Match (vrfid) corresponds to the field uivrflindex in the FES internal data dictionary, and Match (IPV4_ DST) corresponds to the field uiDestAddr in the FES internal data dictionary. Thus the field uiVfIndex- > Match (IP _ DST), the field uiDestAddr- > Match (VRF).
Optionally, after generating control information according to the correspondence between the flow path information of the first service flow and the flow path information of the second service flow, the control information may also be stored.
An embodiment of the present application further provides a method for forwarding a packet, as shown in fig. 10, where the method includes:
s1001, a forwarding device receives a forwarding table item sent by a controller, wherein the forwarding table item comprises group table information, and the group table information comprises service type information used for indicating the service type of a service flow corresponding to the forwarding table item;
s1002, the forwarding device receives a message, wherein the message carries group table information, and the group table information comprises service type information used for indicating the service type of a service flow corresponding to the message.
S1003, the forwarding device matches, based on the service type information included in the group table information carried in the packet, the service type information included in the group table information in the forwarding table entry, which is used to indicate the service type of the service flow corresponding to the forwarding table entry.
S1004, the forwarding device forwards the packet based on the group table corresponding to the group table information of the matched forwarding table entry.
The above-described forwarding device may be applied to the first forwarding device 200a or the second forwarding device 200b shown in fig. 1.
If the group table is configured, the plurality of group tables may be partitioned based on the traffic type described by the group table. The service type information for indicating the service type of the service flow corresponding to the packet may be included in the group table information carried in the packet.
Therefore, when the forwarding table item forwarded to the forwarding device by the controller is used for indicating the forwarding device to forward a message, based on the service type information which is included in the group table information carried by the message and is used for indicating the service type of the service flow corresponding to the message, the service type information which is included in the group table information in the forwarding table item and is used for indicating the service type of the service flow corresponding to the forwarding table item is matched, and the message is forwarded based on the group table corresponding to the matched group table information of the forwarding table item.
Through the scheme, when the forwarding device is matched with the forwarding table entry, part of the group table is preferentially screened out according to the service type information in the matched forwarding table entry, then the group table corresponding to other information except the service type information in the group table information is determined in the screened group table, and the message is forwarded by using the screened group table, so that the application flexibility of the group table in Openflow is improved.
The service type information may be carried in a field of the header for describing the group table.
The embodiment of the present application may also provide a forwarding table entry sending apparatus, which may be implemented by the controller shown in fig. 1, may be disposed inside the controller 100 shown in fig. 1, or may be disposed outside the controller 100, and is independent from a device of the controller 100, and is capable of communicating with the first forwarding device 200a and the second forwarding device 200 b. As shown in fig. 11, the apparatus includes:
a processing unit 1101, configured to obtain a first forwarding table entry, where the first forwarding table entry includes group table information, and the group table information includes service type information used to indicate a service type of a service flow corresponding to the first forwarding table entry.
A sending unit 1102, configured to send the forwarding table entry to the first forwarding apparatus 200 a.
Optionally, the service type information is set in the upper 4 bits of the highest byte occupied by the group table information, and the other 28 bits except the 4 bits occupied by the service type for indicating the service flow corresponding to the forwarding table entry in the highest 4 bytes in the group table information are used to indicate a group identifier ID in the group table information.
Optionally, the service type information is set in the top 2 bytes occupied by the group table information, and the other 32 bits except the 16 bits occupied by the service type for indicating the service flow corresponding to the forwarding table entry in the top 6 bytes in the group table information are used to indicate a group identifier ID in the group table information.
Optionally, a format of the first forwarding entry conforms to a first table type template TTP, the first TTP is a rule followed by the first forwarding device to forward a packet, the controller is not adapted to the first TTP, where each service flow supported by the first forwarding device is described in the first TTP, each service flow supported by the first forwarding device corresponds to one group table, and group table information included in each group table corresponding to each service flow supported by the first forwarding device carries service type information used for indicating a service type of each service flow;
the processing unit 1101 is further configured to, before obtaining a first forwarding entry, obtain a second forwarding entry, where a format of the second forwarding entry conforms to a second table type template TTP, the second TTP is a rule that a second forwarding device forwards a packet, and the controller completes adaptation with the second TTP, where the second TTP describes each service flow supported by the second forwarding device, each service flow supported by the second forwarding device corresponds to one group table, and group table information of one group table corresponding to each service flow supported by the second forwarding device carries service type information used for indicating a service type of each service flow; converting the second forwarding table entry into the first forwarding table entry based on the corresponding relationship between the second TTP and the first TTP; wherein the correspondence between the second TTP and the first TTP is constructed by the controller based on the traffic type information corresponding to each traffic flow supported by the first forwarding device and the traffic type information corresponding to each traffic flow supported by the second forwarding device.
In one possible implementation, the device may be an off-line automatic switching tool for safety considerations of the control, i.e. the device generates the correspondence in advance and then sends the correspondence to the controller. Of course, a real-time switching device may also be provided within the controller.
In a possible implementation manner, the processing unit 1101 is further configured to construct a corresponding relationship between the second TTP and the first TTP after acquiring the second forwarding entry and before acquiring the first forwarding entry, and specifically includes:
obtaining a second TTP and a first TTP;
parsing second flow path information describing a flow path of the traffic flow supported by the second forwarding device 200b from the second TTP, and parsing first flow path information describing a flow path of the traffic flow supported by the first forwarding device 200a from the first TTP;
traversing the service flow included by the second flow path information and the service flow included by the first flow path information, and determining the service flow included by the first flow path information and the service flow included by the second flow path information which have the same service type information; determining that a second service flow in the second flow path information is the same as a service described by a first service flow in the first flow path information from service flows included in the determined first flow path information and service flows included in the second flow path information with the same service type information;
and obtaining the corresponding relation between the flow path information of the second service flow and the flow path information of the first service flow, thereby determining the corresponding relation between the second TTP and the first TTP.
Optionally, when the second flow path information describing the flow path of the traffic flow supported by the second forwarding device 200b is parsed from the second TTP, the processing unit 1101 is specifically configured to:
parsing a second table tree for describing a flow path relationship of the traffic flow supported by the second forwarding device 200b from the second TTP;
the apparatus further comprises a storage unit 1103 for storing the second table tree.
Wherein, the node in the second table tree is a second flow table identifier that needs to be matched with the service flow supported by the second forwarding device 200 b; the nodes in the second table tree-like graph carry fields required by child nodes pointing to the nodes from the nodes and the values of the fields; the second flow table identification comprises a group ID of a group table corresponding to each service flow; the field comprises service type information carried in group table information corresponding to the group ID; the field is contained in a second flow table corresponding to a second flow table identification of the node;
the processing unit 1101, when parsing out first flow path information of a flow path of a service flow supported by the first forwarding device 200a from the first TTP, is specifically configured to:
parsing out a first table tree diagram for describing a flow path relationship of the traffic flow supported by the first forwarding device 200a from the first TTP;
the storage unit 1103 is further configured to store the first table tree;
wherein, the node in the first table tree is a first flow table identifier that needs to be matched with the service flow supported by the first forwarding device 200 a; nodes in the first table tree carry fields required by children nodes pointing to the nodes from the nodes and values of the fields; the fields carried by the nodes corresponding to each service flow and the values of the fields form a phrase according to the pointing sequence of the nodes; the second flow table identification comprises a group ID of a group table corresponding to each service flow; the phrase comprises service type information carried in group table information corresponding to the group ID; the field is included in a first flow table corresponding to a first flow table identification of the node.
Optionally, the processing unit 1101, after traversing the traffic flow included in the second flow path information and the traffic flow included in the first flow path information, determines the traffic flow included in the first flow path information and the traffic flow included in the second flow path information that have the same traffic type information, and determines, from the traffic flow included in the determined first flow path information and the traffic flow included in the second flow path information that have the same traffic type information, that the second traffic flow in the second flow path information is the same as the traffic described by the first traffic flow in the first flow path information, is specifically configured to:
traversing a phrase corresponding to each service flow supported by the first forwarding device 200a and a phrase corresponding to each service flow supported by the second forwarding device 200b, determining at least one second phrase corresponding to a service flow supported by the second forwarding device 200b and at least one first phrase corresponding to a service flow supported by the first forwarding device 200a, which include the same service type information, matching values of other fields and fields, except for the service type information, included in the at least one second phrase with values of other fields and fields, except for the service type information, included in the at least one first phrase, and determining, according to a matching result, that the services described by the second service flow described in the second table tree diagram are the same as the services described by the first service flow described in the first table tree diagram.
Optionally, the processing unit 1101, after obtaining the corresponding relationship between the flow path information of the second service flow and the flow path information of the first service flow, is specifically configured to:
and determining the sequence of a second flow table of the second service flow described by the second table tree diagram, and sequentially determining fields in the second flow table corresponding to the fields in the first flow table of the first service flow according to the determined sequence.
By the scheme, the corresponding relation between the flow path information of the first service flow and the flow path information of the second service flow is obtained, so that when the device sends the forwarding table item to the second forwarding equipment, the forwarding table item is converted from following the first TTP to following the second TTP and then sent to the second forwarding equipment, the second forwarding equipment can forward the message according to the received forwarding table item sent by the controller, and errors cannot occur. And the controller can support various forwarding devices of different types, and only needs to acquire the TTP of the forwarding device, so that the SDN solution can be better supported. In addition, the scheme provided by the embodiment of the application does not need to improve the chip at the controller end to adapt to different TTPs, so that the development cycle of a commercial chip is not required to be prolonged, and resources are saved.
The division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation, and in addition, each functional unit in each embodiment of the present application may be integrated in one processor, may also exist alone physically, or may also be integrated in one unit by two or more units. The integrated unit can be realized in a form of hardware or a form of a software functional module.
When the integrated unit may be implemented in a hardware form, as shown in fig. 12, the integrated unit may include a communication interface 1201 for receiving and sending a forwarding table entry. The hardware of the entity corresponding to the processing unit 1101, the sending unit 1102, and the storage unit 1103 may be the processor 1202. The processor 1202 may be a Central Processing Unit (CPU), a digital processing unit, or the like. The processor 1202 receives and transmits the forwarding table entry through the communication interface 1201, and stores the information such as the correspondence relationship constructed by itself. The apparatus may therefore further comprise: a memory 1203 for storing programs executed by the processor 1202. The processor 1202 is configured to execute a program stored in the memory 1203, and is specifically configured to implement a scheme executed by the processing unit 1101, the sending unit 1102, and the storage unit 1103. The memory 1203 is also used for storing the corresponding relationship constructed by the processor 1202, and also can be used for storing a term data dictionary, storing information such as a first table tree diagram and a second table tree diagram, and the like.
In the embodiment of the present application, the specific connection medium among the communication interface 1201, the processor 1202, and the memory 1203 is not limited. In the embodiment of the present application, the memory 1203, the processor 1202, and the communication interface 1201 are connected by a bus 1204 in fig. 12, the bus is represented by a thick line in fig. 12, and the connection manner between other components is merely illustrative and not limited. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 12, but this is not intended to represent only one bus or type of bus.
The memory 1203 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1203 may also be a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this. The memory 1203 may be a combination of the above.
The embodiment of the present application further provides a packet forwarding apparatus, as shown in fig. 13, where the apparatus is applied to the first forwarding device 200a or the second forwarding device 200b shown in fig. 1. The message forwarding device comprises:
a receiving unit 1301, configured to receive a forwarding table entry sent by a controller, where the forwarding table entry includes group table information, and the group table information includes service type information used to indicate a service type of a service flow corresponding to the forwarding table entry;
the receiving unit 1301 is further configured to receive a packet, where the packet carries group table information, and the group table information includes service type information used to indicate a service type of a service flow corresponding to the packet;
a processing unit 1302, configured to match, based on the service type information included in the group table information carried in the packet received by the receiving unit 1301, service type information included in the group table information in the forwarding table entry and used for indicating a service type of a service flow corresponding to the forwarding table entry;
a sending unit 1303, configured to forward the packet based on the group table corresponding to the group table information of the forwarding table entry matched by the processing unit 1302.
The division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation, and in addition, each functional unit in each embodiment of the present application may be integrated in one processor, may also exist alone physically, or may also be integrated in one unit by two or more units. The integrated unit can be realized in a form of hardware or a form of a software functional module.
When the integrated unit may be implemented in a hardware form, as shown in fig. 14, the integrated unit may include a communication interface 1401 for receiving a forwarding table entry, a message, and sending a message. The hardware of the entity corresponding to the receiving unit 1301, the processing unit 1302, and the sending unit 1303 may be the processor 1402. The processor 1402 may be a CPU, or a digital processing unit, etc. Processor 1402 receives forwarding entries, messages, and sends messages via communications interface 1401. The apparatus may further include: a memory 1403 for storing programs executed by the processor 1402. The processor 1402 is configured to execute the programs stored in the memory 1403, and is specifically configured to implement the schemes executed by the receiving unit 1301, the processing unit 1302, and the sending unit 1303.
The specific connection medium among the communication interface 1401, the processor 1402 and the memory 1403 is not limited in the embodiments of the present application. In the embodiment of the present application, the memory 1403, the processor 1402, and the communication interface 1401 are connected by the bus 1404 in fig. 14, the bus is represented by a thick line in fig. 14, and the connection manner between other components is merely illustrative and not limited. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 14, but this is not intended to represent only one bus or type of bus.
Memory 1403 may be volatile memory, such as RAM; memory 1403 may also be a non-volatile memory such as a ROM, flash memory, HDD or SSD, or memory 1403 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1403 may be a combination of the above memories.
An embodiment of the present invention further provides a communication system, including the forwarding table entry sending device in the embodiment corresponding to fig. 11 or fig. 12, and the message forwarding device in the embodiment corresponding to fig. 13 or fig. 14. The specific function of the forwarding table entry sending device may refer to an embodiment corresponding to fig. 11 or fig. 12, and the specific function of the packet forwarding device refers to an embodiment corresponding to fig. 13 or fig. 14 for the first time, which is not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.