CN112910777B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN112910777B
CN112910777B CN202110121933.6A CN202110121933A CN112910777B CN 112910777 B CN112910777 B CN 112910777B CN 202110121933 A CN202110121933 A CN 202110121933A CN 112910777 B CN112910777 B CN 112910777B
Authority
CN
China
Prior art keywords
strategy
policy
tunnel
information
forwarding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110121933.6A
Other languages
Chinese (zh)
Other versions
CN112910777A (en
Inventor
徐婧
林长望
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing H3C Technologies Co Ltd
Original Assignee
Beijing H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing H3C Technologies Co Ltd filed Critical Beijing H3C Technologies Co Ltd
Priority to CN202110121933.6A priority Critical patent/CN112910777B/en
Publication of CN112910777A publication Critical patent/CN112910777A/en
Application granted granted Critical
Publication of CN112910777B publication Critical patent/CN112910777B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Abstract

The application provides a message processing method and a device, wherein the method is applied to network equipment and comprises the following steps: acquiring a first IP message comprising a destination address and a DSCP value; determining a matched SR-TE strategy group according to the destination address, wherein the SR-TE strategy group comprises at least one SR-TE strategy, and each SR-TE strategy has a corresponding Color attribute value; judging whether a first SR-TE strategy exists in the SR-TE strategy group according to the DSCP value, wherein the Color attribute value of the first SR-TE strategy is matched with the DSCP value; and if the first SR-TE strategy does not exist and the default SR-TE strategy is not configured in the SR-TE strategy group, acquiring a forwarding table entry corresponding to the second SR-TE strategy from the forwarding table according to the second SR-TE strategy included in the SR-TE strategy group to forward the first IP message.

Description

Message processing method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a packet.
Background
The Segment Routing Traffic Engineering Policy (SR-TE Policy for short) is a new technology, which provides a flexible forwarding path selection method and can meet different forwarding requirements of users. When a plurality of forwarding paths exist between a source node and a destination node included in the SR network, the SR-TE strategy is reasonably utilized to select the forwarding paths, so that an administrator can conveniently manage and plan the SR network, and the forwarding pressure of network equipment in the SR network can be effectively relieved. For example, DSCP drainage included in an IP packet is a networking application provided by an SR-TE policy, and can be widely applied to L3VPN networking.
DSCP drainage is an iterative tunneling policy based on the destination address of the route. First, the SR-TE policy set is matched using the end node (Endpoint). Then, according to the Differentiated Services Code Point (DSCP) included in the IP packet, the SR-TE policy corresponding to the DSCP is found from the SR-TE policy group. And finally, forwarding the service message according to the searched SR-TE strategy.
A group of SR-TE strategies with the same termination point but different Color (Color) attributes can be added into the same SR-TE strategy group together, and then the IP message is guided to the specified SR-TE strategy according to the DSCP included by the IP message by specifying the mapping relation between the Color attributes and the DSCP.
As shown in fig. 1, fig. 1 is a schematic diagram of a DSCP drainage process in the prior art.
The controller issues the SR-TE policy group to the device a and configures the SR-TE policy group in the device a. The SR-TE policy group includes SR-TE policy 1 and SR-TE policy 2. Wherein, the Color attribute of the SR-TE strategy 1 is 123, and the terminal node is the IP address of the device B10.1.1.3; the Color attribute of the SR-TE policy 2 is 124, and the end node is also the IP address 10.1.1.3 of the device B. Device B sends device B's host route 10.1.1.0/24 to device a through a BGP neighbor relationship. Wherein, a mapping relation is established between the Color attribute 123 and the DSCP 10; a mapping relationship is established between Color attribute 124 and DSCP 20. Meanwhile, a tunnel policy is configured in the device A, and the SR-TE policy group is bound with the destination address of the next hop of the route.
Currently, the matching rules for DSCP drainage are: a certain SR-TE policy is specified as a default SR-TE policy specifying an address family (IPv4 or IPv 6). And when a certain DSCP in the SR-TE Policy group does not specify the SR-TE Policy, the default SR-TE Policy can be used for forwarding the IP message comprising the certain DSCP. Wherein a default SR-TE policy exists under an address family (IPv4 or IPv6) within a SR-TE policy group.
If a certain address family (IPv4 or IPv6) in the SR-TE policy group is not configured with a default SR-TE policy, the following two implementation situations exist when the IP message is forwarded:
1) and configuring a mapping relation between the Color attribute and the DSCP in the SR-TE strategy group, wherein one part of the DSCP is associated with the SR-TE strategy, and the other part of the DSCP is not associated with the SR-TE strategy, and the DSCP not associated with the SR-TE strategy forwards the IP message by using the SR-TE strategy corresponding to the minimum DSCP under the address family.
2) And the DSCP is not associated with the SR-TE policy (for example, the mapping relation between the Color attribute and the DSCP is not configured in the SR-TE policy group, or the mapping relation between the Color attribute and the DSCP is configured in the SR-TE policy group but the association with the SR-TE policy is not successful), then the IP message is forwarded by using a default SR-TE policy under another address family (for example, IPv4 uses IPv6, or IPv6 uses IPv 4). And if the default SR-TE strategy is not configured in the other address family, selecting the SR-TE strategy corresponding to the minimum DSCP under the address family to forward the IP message.
In the existing drainage mode of associating SR-TE policies according to DSCP, when a certain address family (IPv4 or IPv6) in an SR-TE policy group is not configured with a default SR-TE policy, for a DSCP not matching the SR-TE policy, only the SR-TE policy corresponding to the minimum DSCP in the address family or another address family can be selected to forward an IP message, but the SR-TE policy selected in the way is not the optimal choice for forwarding the IP message, and the IP message cannot be forwarded in other modes at present, so that the limitation of the drainage mode of associating the SR-TE policies with the existing DSCP is caused.
Disclosure of Invention
In view of this, the present application provides a message processing method and apparatus, so as to solve the problem that a DSCP not matched with an SR-TE policy can only select an SR-TE policy corresponding to a minimum DSCP in a local address family or another address family to forward an IP message, which causes a limitation on a drainage manner of an existing DSCP associated SR-TE policy.
In a first aspect, the present application provides a method for processing a packet, where the method is applied to a network device, and the method includes:
acquiring a first IP message, wherein the first IP message comprises a destination address and a DSCP value;
determining an SR-TE policy group matched with the destination address according to the destination address, wherein the SR-TE policy group comprises at least one SR-TE policy, and each SR-TE policy has a corresponding Color attribute value;
judging whether a first SR-TE strategy exists in the SR-TE strategy group or not according to the DSCP value, wherein the Color attribute value of the first SR-TE strategy is matched with the DSCP value;
and if the first SR-TE strategy does not exist and a default SR-TE strategy is not configured in the SR-TE strategy group, acquiring a forwarding table entry corresponding to a second SR-TE strategy from a forwarding table according to the second SR-TE strategy included in the SR-TE strategy group to forward the first IP message.
In a second aspect, the present application provides a packet processing apparatus, where the apparatus is applied to a network device, and the apparatus includes:
a first obtaining unit, configured to obtain a first IP packet, where the first IP packet includes a destination address and a DSCP value;
the determining unit is used for determining an SR-TE policy group matched with the destination address according to the destination address, wherein the SR-TE policy group comprises at least one SR-TE policy, and each SR-TE policy has a corresponding Color attribute value;
a judging unit, configured to judge whether a first SR-TE policy exists in the SR-TE policy group according to the DSCP value, where a Color attribute value of the first SR-TE policy is matched with the DSCP value;
and a second obtaining unit, configured to, if the first SR-TE policy does not exist and a default SR-TE policy is not configured in the SR-TE policy group, obtain, according to a second SR-TE policy included in the SR-TE policy group, a forwarding entry corresponding to the second SR-TE policy from a forwarding table to forward the first IP packet.
In a third aspect, the present application provides a network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method provided by the first aspect of the present application.
Therefore, by applying the message processing method and device provided by the application, the network device obtains the first IP message, where the first IP message includes the destination address and the DSCP value of the DSCP. According to the destination address, the network equipment determines an SR-TE policy group matched with the destination address, wherein the SR-TE policy group comprises at least one SR-TE policy, and each SR-TE policy has a corresponding Color attribute value. And according to the DSCP value, the network equipment judges whether a first SR-TE strategy exists in the SR-TE strategy group, wherein the Color attribute value of the first SR-TE strategy is matched with the DSCP value. And if the first SR-TE strategy does not exist and the default SR-TE strategy is not configured in the SR-TE strategy group, the network equipment acquires a forwarding table entry corresponding to the second SR-TE strategy from a forwarding table according to the second SR-TE strategy included in the SR-TE strategy group to forward the first IP message.
Therefore, the problem that the current DSCP which is not matched with the SR-TE strategy can only select the SR-TE strategy corresponding to the minimum DSCP under the address family or the other address family to forward the IP message, so that the current DSCP related SR-TE strategy is limited in a drainage mode is solved. The method and the device realize flexible and accurate control of the IP message forwarding use path in the current flow guiding mode according to the DSCP associated SR-TE strategy, meet the requirement of flow forwarding according to configuration in some scenes such as equipment version updating and the like, and improve the stability and the reliability.
Drawings
FIG. 1 is a schematic diagram of a DSCP drainage process of the prior art shown in FIG. 1;
fig. 2 is a flowchart of a message processing method according to an embodiment of the present application;
fig. 3 is a structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 4 is a hardware structure diagram of a network device according to an embodiment of the present application.
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 application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, 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 application. As used in this application 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 corresponding listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such 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 application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The following describes the message processing method provided in the embodiment of the present application in detail. Referring to fig. 2, fig. 2 is a flowchart of a message processing method according to an embodiment of the present application. The method is applied to network equipment, and the message processing method provided by the embodiment of the application can comprise the following steps.
Step 210, obtaining a first IP packet, where the first IP packet includes a destination address and a DSCP value of a differentiated services code point.
Specifically, the network device obtains a first IP packet, where the first IP packet includes a destination address and a Differentiated Services Code Point (DSCP) value. The process of the network device acquiring the first IP packet may be implemented in the following two ways:
in one implementation, a network device receives a first IP packet sent by another network device (e.g., a first network device). The first network device may be an upstream device of the network device.
In another implementation manner, the network device itself is a source node, and the network device generates the first IP packet.
Further, the IP message includes an IP header that includes a class of service TOS flag byte. The TOS flag byte includes a DSCP value.
Optionally, before the embodiment of the present application, the method further includes: and the network equipment issues a plurality of forwarding paths included in the SR-TE strategy to a forwarding table (FIB).
The network equipment comprises a strategy module, a tunnel module, a routing management module, an FIB module and a driving module. It is understood that the network device also includes other modules, such as a label FIB module, an IP forwarding module, an MFW module, and the like.
The policy module receives a command line input by a user. The command line includes a destination address and a Segment Routing Best Effort (SR-BE) attribute policy. In the embodiment of the application, the command line is used for enabling the policy module to acquire the tunnel information belonging to the SR-BE type from the tunnel module according to the destination address and the SR-BE attribute policy.
Wherein, a SR-TE strategy group is configured in the strategy module, and at least one SR-TE strategy is configured in the SR-TE strategy group. Each SR-TE policy has a corresponding Color attribute value. And when a certain IP message is not matched with any SR-TE strategy in the SR-TE strategy group and a default SR-TE strategy is not configured in the SR-TE strategy group, taking the SR-TE strategy which indicates that the IP message is forwarded through the SR-BE tunnel in the SR-TE strategy group as a strategy used for forwarding the IP message.
And according to the destination address and the SR-BE attribute strategy, the strategy module generates a first message, wherein the first message comprises the destination address and the SR-BE attribute strategy.
It should BE noted that, in this embodiment of the present application, the first message may specifically BE a registration message, and through the registration message, the policy module registers the tunnel with the tunnel module, that is, registers the SR-BE type tunnel by obtaining the SR-BE type tunnel information.
And the strategy module sends a first message to the tunnel module, and the tunnel module acquires a destination address and an SR-BE attribute strategy from the first message after receiving the first message. And according to the destination address and the SR-BE attribute strategy, the tunnel module acquires the tunnel information which is matched with the destination address and belongs to the SR-BE type from the local tunnel information table. The tunnel information belonging to the SR-BE type includes tunnel source-end address information, tunnel destination-end address information, a tunnel type, forwarding path information constituting the tunnel, and the like.
And the tunnel module feeds back the tunnel information belonging to the SR-BE type to the strategy module.
And after receiving the tunnel information belonging to the SR-BE type, the strategy module establishes the SR-BE tunnel according to the tunnel information belonging to the SR-BE type.
The tunnel module also acquires the outgoing direction information of the SR-BE tunnel. The outgoing direction information includes outgoing interface information and next hop information. The tunnel module abstracts the egress interface information and the next hop information into first Neighbor Identification (NID) information.
Meanwhile, the processes of registering and establishing the SR-TE tunnel are also interacted between the strategy module and the tunnel module, and the tunnel module also acquires a SID list of the SR-TE tunnel and abstracts the SID list into second NID information. It is understood that the procedures of mutual registration, SR-TE tunnel establishment, and SID list abstraction by the tunnel module as the second NID information between the policy module and the tunnel module are not repeated herein for the prior art.
And the tunnel module issues the first NID information and the second NID information to the routing module. And when generating or releasing the route, the routing module binds the corresponding tunnel according to the first NID information and the second NID information. For example, a route to the destination address is bound to a tunnel indicated by the first NID information, and a route to the destination address is bound to a tunnel indicated by the second NID information. In this manner, an equivalent routing table entry to the destination address is formed.
The route module issues an equivalent route table item to the destination address to the route management module. The route management module acquires the destination address, the output interface information and the next hop information from the equivalent route table item and issues the destination address, the output interface information and the next hop information to the FIB module. The FIB module generates an equivalent forwarding table according to the destination address, the output interface information and the next hop information, so that when the network equipment receives the first IP message, the corresponding forwarding table is obtained from the forwarding table to forward the first IP message.
It can be understood that, the FIB module further issues the equivalent forwarding table to the driving module, so that the driving module forwards the IP packet matched with the equivalent forwarding table according to the equivalent forwarding table.
It should BE noted that, in this embodiment of the present application, the policy module creates an LSP of an SR-TE policy type for the SR-BE tunnel, and the outgoing interface information and the next hop information of the LSP are the same as the outgoing interface information and the next hop information of the SR-BE tunnel. The LSP has no corresponding tunnel and is only used for SR-TE policy group drainage.
Step 220, according to the destination address, obtaining an SR-TE policy group matched with the destination address, where the SR-TE policy group includes at least one SR-TE policy, and each SR-TE policy has a corresponding Color attribute value.
Specifically, according to the description in step 210, after acquiring the destination address and the DSCP value from the first IP packet, the network device acquires the SR-TE policy group matching the destination address according to the destination address. The SR-TE strategy group comprises at least one SR-TE strategy, and each SR-TE strategy has a corresponding Color attribute value.
And step 230, judging whether a first SR-TE strategy exists in the SR-TE strategy group according to the DSCP value, wherein the Color attribute value of the first SR-TE strategy is matched with the DSCP value.
Specifically, according to the descriptions of steps 210 and 220, the network device determines whether the first SR-TE policy exists in the SR-TE policy group according to the DSCP value. Wherein the first SR-TE policy has a Color attribute value matching the DSCP value.
And if the first SR-TE strategy exists, the network equipment acquires a forwarding table entry corresponding to the first SR-TE strategy from the forwarding table according to the first SR-TE strategy. And the network equipment forwards the first IP message according to the obtained forwarding table entry.
If the first SR-TE policy does not exist, step 240 is performed.
Step 240, if the first SR-TE policy does not exist and a default SR-TE policy is not configured in the SR-TE policy group, acquiring a forwarding entry corresponding to a second SR-TE policy from a forwarding table according to the second SR-TE policy included in the SR-TE policy group, and forwarding the first IP packet.
Specifically, as depicted in step 230, if the first SR-TE policy does not exist, the network device determines whether a default SR-TE policy has been configured within the SR-TE policy group.
And if the default SR-TE strategy is not configured in the SR-TE strategy group, the network equipment acquires a forwarding table entry corresponding to the second SR-TE strategy from the forwarding table according to the second SR-TE strategy included in the SR-TE strategy group. And the network equipment forwards the first IP message according to the obtained forwarding table entry.
And if a default SR-TE strategy is configured in the SR-TE strategy group, the network equipment forwards the first IP message according to the default SR-TE strategy.
In the embodiment of the application, the forwarding path indicated by the second SR-TE strategy is an SR-BE tunnel; and the forwarding paths indicated by the other SR-TE strategies except the second SR-TE strategy included in the SR-TE strategy are SR-TE tunnels.
It can be understood that, in the embodiment of the present application, when a default SR-TE policy is not configured in a SR-MPLS policy group, an IP packet that is not matched with any SR-TE policy in the SR-TE policy group is received, and the priority for performing policy matching in the SR-TE policy group on the IP packet is as follows: using a default SR-TE strategy configured under the address family; using a default SR-TE policy configured under another address family; using the default SR-TE strategy configured by the address family to forward the message through the SR-BE tunnel; using the default SR-TE strategy configured by another address family to forward the message through the SR-BE tunnel; using an effective SR-TE strategy with the minimum DSCP value of the address family; another valid SR-TE policy with the smallest DSCP value of the address family is used.
Therefore, by applying the message processing method and device provided by the application, the network device receives a first IP message, where the first IP message includes a destination address and a DSCP value of a differentiated services code point. According to the destination address, the network equipment acquires an SR-TE policy group matched with the destination address, wherein the SR-TE policy group comprises at least one SR-TE policy, and each SR-TE policy has a corresponding Color attribute value. And according to the DSCP value, the network equipment judges whether a first SR-TE strategy exists in the SR-TE strategy group, wherein the Color attribute value of the first SR-TE strategy is matched with the DSCP value. And if the first SR-TE strategy does not exist and the default SR-TE strategy is not configured in the SR-TE strategy group, the network equipment acquires a forwarding table entry corresponding to the second SR-TE strategy from the forwarding table according to the second SR-TE strategy included in the SR-TE strategy group to forward the first IP message.
Therefore, the problem that the current DSCP which is not matched with the SR-TE strategy can only select the SR-TE strategy corresponding to the minimum DSCP under the address family or the other address family to forward the IP message, so that the current DSCP related SR-TE strategy is limited in a drainage mode is solved. The method and the device realize flexible and accurate control of the IP message forwarding use path in the existing flow guiding mode according to the DSCP associated SR-TE strategy, meet the requirement of flow forwarding according to configuration in some scenes such as equipment version updating and the like, and improve the stability and the reliability.
Based on the same inventive concept, the embodiment of the application also provides a message processing device corresponding to the message processing method. Referring to fig. 3, fig. 3 is a structural diagram of a message processing apparatus provided in the embodiment of the present application, where the apparatus is applied to a network device, and the apparatus includes:
a first obtaining unit 310, configured to obtain a first IP packet, where the first IP packet includes a destination address and a DSCP value;
a determining unit 320, configured to determine, according to the destination address, an SR-TE policy group matched with the destination address, where the SR-TE policy group includes at least one SR-TE policy, and each SR-TE policy has a corresponding Color attribute value;
a determining unit 330, configured to determine, according to the DSCP value, whether a first SR-TE policy exists in the SR-TE policy group, where a Color attribute value of the first SR-TE policy matches the DSCP value;
a second obtaining unit 340, configured to, if the first SR-TE policy does not exist and a default SR-TE policy is not configured in the SR-TE policy group, obtain, according to a second SR-TE policy included in the SR-TE policy group, a forwarding entry corresponding to the second SR-TE policy from a forwarding table to forward the first IP packet.
Optionally, the apparatus further comprises: and a processing unit (not shown in the figure), configured to forward the first IP packet according to a default SR-TE policy if the first SR-TE policy does not exist and the default SR-TE policy is configured in the SR-TE policy group.
Optionally, the processing unit (not shown in the figure) is further configured to, if the first SR-TE policy exists, obtain, from the forwarding table, a forwarding entry corresponding to the first SR-TE policy according to the first SR-TE policy, and forward the first IP packet.
Optionally, the forwarding path indicated by the second SR-TE policy is an SR-BE tunnel; and the forwarding paths indicated by other SR-TE strategies except the second SR-TE strategy included in the SR-TE strategies are SR-TE tunnels.
Optionally, the apparatus further comprises: a third obtaining unit (not shown in the figure) for obtaining the tunnel information belonging to the SR-BE type and the tunnel information belonging to the SR-TE type according to the destination address;
an establishing unit (not shown in the figure) configured to establish the SR-BE tunnel and the SR-TE tunnel according to the tunnel information belonging to the SR-BE type and the tunnel information belonging to the SR-TE type;
the third obtaining unit (not shown in the figure) is further configured to obtain egress direction information of the SR-BE tunnel, where the egress direction information includes egress interface information and next hop information, and abstract the egress interface information and the next hop information into first NID information;
the third obtaining unit (not shown in the figure) is further configured to obtain a SID list corresponding to the SR-TE tunnel, and abstract the SID list into second NID information;
an issuing unit (not shown in the figure) configured to issue the first NID information and the second NID information to a routing module, so as to form an equivalent routing table entry reaching the destination address;
the issuing unit (not shown in the figure) is further configured to generate an equivalent forwarding table entry reaching the destination address according to the equivalent routing table entry, and issue the equivalent forwarding table entry to a forwarding module, so that when the first IP packet is received, the forwarding table entry corresponding to the equivalent forwarding table entry is obtained from the forwarding table to forward the first IP packet.
Therefore, by applying the message processing apparatus provided by the present application, the apparatus obtains the first IP message, where the first IP message includes a destination address and a DSCP value. According to the destination address, the device determines an SR-TE policy group matched with the destination address, wherein at least one SR-TE policy is included in the SR-TE policy group, and each SR-TE policy has a corresponding Color attribute value. According to the DSCP value, the device judges whether a first SR-TE strategy exists in the SR-TE strategy group, wherein the first SR-TE strategy has a Color attribute value matched with the DSCP value. If the first SR-TE strategy does not exist and the default SR-TE strategy is not configured in the SR-TE strategy group, the device acquires a forwarding table entry corresponding to the second SR-TE strategy from the forwarding table according to the second SR-TE strategy included in the SR-TE strategy group to forward the first IP message.
Therefore, the problem that the current DSCP which is not matched with the SR-TE strategy can only select the SR-TE strategy corresponding to the minimum DSCP under the address family or the other address family to forward the IP message, so that the current DSCP related SR-TE strategy is limited in a drainage mode is solved. The method and the device realize flexible and accurate control of the IP message forwarding use path in the existing flow guiding mode according to the DSCP associated SR-TE strategy, meet the requirement of flow forwarding according to configuration in some scenes such as equipment version updating and the like, and improve the stability and the reliability.
Based on the same inventive concept, the present application further provides a network device, as shown in fig. 4, including a processor 410, a transceiver 420, and a machine-readable storage medium 430, where the machine-readable storage medium 430 stores machine-executable instructions capable of being executed by the processor 410, and the processor 410 is caused by the machine-executable instructions to perform the method provided by the present application. The message processing apparatus shown in fig. 3 may be implemented by using a hardware structure of a network device shown in fig. 4.
The computer-readable storage medium 430 may include a Random Access Memory (RAM) or a Non-volatile Memory (NVM), such as at least one disk Memory. Alternatively, the computer-readable storage medium 430 may also be at least one memory device located remotely from the processor 410.
The Processor 410 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; the Integrated Circuit can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In embodiments of the present application, the processor 410 is caused by machine executable instructions, by reading machine executable instructions stored in the machine readable storage medium 430, to enable the processor 410 itself and the call transceiver 420 to perform the methods described in the embodiments of the present application.
In addition, the present application provides a machine-readable storage medium 430, where the machine-readable storage medium 430 stores machine-executable instructions, and when invoked and executed by the processor 410, the machine-executable instructions cause the processor 410 itself and the invoking transceiver 420 to perform the message processing methods described in the embodiments of the present application.
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 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 application. One of ordinary skill in the art can understand and implement it without inventive effort.
As for the message processing apparatus and the machine-readable storage medium, the content of the related method is substantially similar to that of the foregoing method embodiment, so that the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A message processing method is applied to network equipment, and is characterized in that the method comprises the following steps:
acquiring a first IP message, wherein the first IP message comprises a destination address and a Differential Service Code Point (DSCP) value;
determining an SR-TE policy group matched with the destination address according to the destination address, wherein the SR-TE policy group comprises at least one SR-TE policy, and each SR-TE policy has a corresponding Color attribute value;
judging whether a first SR-TE strategy exists in the SR-TE strategy group according to the DSCP value, wherein the Color attribute value of the first SR-TE strategy is matched with the DSCP value;
if the first SR-TE strategy does not exist and a default SR-TE strategy is not configured in the SR-TE strategy group, acquiring a forwarding table entry corresponding to a second SR-TE strategy from a forwarding table according to the second SR-TE strategy included in the SR-TE strategy group to forward the first IP message;
wherein, the forwarding path indicated by the second SR-TE strategy is an SR-BE tunnel; and the forwarding paths indicated by other SR-TE strategies except the second SR-TE strategy included in the SR-TE strategies are SR-TE tunnels.
2. The method of claim 1, further comprising:
and if the first SR-TE strategy does not exist and a default SR-TE strategy is configured in the SR-TE strategy group, forwarding the first IP message according to the default SR-TE strategy.
3. The method of claim 1, further comprising:
and if the first SR-TE strategy exists, acquiring a forwarding table entry corresponding to the first SR-TE strategy from the forwarding table according to the first SR-TE strategy to forward the first IP message.
4. The method of claim 1, wherein prior to obtaining the first IP packet, the method further comprises:
according to the destination address, tunnel information belonging to an SR-BE type and tunnel information belonging to an SR-TE type are obtained;
establishing the SR-BE tunnel and the SR-TE tunnel according to the tunnel information belonging to the SR-BE type and the tunnel information belonging to the SR-TE type;
acquiring outgoing direction information of the SR-BE tunnel, wherein the outgoing direction information comprises outgoing interface information and next hop information, and abstracting the outgoing interface information and the next hop information into first NID information;
acquiring a SID list corresponding to the SR-TE tunnel, and abstracting the SID list into second NID information;
sending the first NID information and the second NID information to a routing module to form an equivalent routing table item reaching the destination address;
and generating an equivalent forwarding table item reaching the destination address according to the equivalent routing table item, and issuing the equivalent forwarding table item to a forwarding module, so that when the first IP message is received, the forwarding table item is obtained from the forwarding table to forward the first IP message.
5. A message processing apparatus, wherein the apparatus is applied to a network device, and the apparatus comprises:
a first obtaining unit, configured to obtain a first IP packet, where the first IP packet includes a destination address and a DSCP value;
a determining unit, configured to determine, according to the destination address, an SR-TE policy group matched with the destination address, where the SR-TE policy group includes at least one SR-TE policy, and each SR-TE policy has a corresponding Color attribute value;
a judging unit, configured to judge whether a first SR-TE policy exists in the SR-TE policy group according to the DSCP value, where a Color attribute value of the first SR-TE policy is matched with the DSCP value;
a second obtaining unit, configured to, if the first SR-TE policy does not exist and a default SR-TE policy is not configured in the SR-TE policy group, obtain, according to a second SR-TE policy included in the SR-TE policy group, a forwarding table entry corresponding to the second SR-TE policy from a forwarding table to forward the first IP packet;
wherein, the forwarding path indicated by the second SR-TE strategy is an SR-BE tunnel; and the forwarding paths indicated by other SR-TE strategies except the second SR-TE strategy included in the SR-TE strategies are SR-TE tunnels.
6. The apparatus of claim 5, further comprising:
and the processing unit is used for forwarding the first IP message according to the default SR-TE strategy if the first SR-TE strategy does not exist and the default SR-TE strategy is configured in the SR-TE strategy group.
7. The apparatus according to claim 6, wherein the processing unit is further configured to, if the first SR-TE policy exists, obtain, according to the first SR-TE policy, a forwarding entry corresponding to the first SR-TE policy from the forwarding table to forward the first IP packet.
8. The apparatus of claim 5, further comprising:
a third obtaining unit, configured to obtain tunnel information belonging to an SR-BE type and tunnel information belonging to an SR-TE type according to the destination address;
the establishing unit is used for establishing the SR-BE tunnel and the SR-TE tunnel according to the tunnel information belonging to the SR-BE type and the tunnel information belonging to the SR-TE type;
the third obtaining unit is further configured to obtain egress direction information of the SR-BE tunnel, where the egress direction information includes egress interface information and next hop information, and abstract the egress interface information and the next hop information into first NID information;
the third obtaining unit is further configured to obtain a SID list corresponding to the SR-TE tunnel, and abstract the SID list into second NID information;
an issuing unit, configured to issue the first NID information and the second NID information to a routing module, so as to form an equivalent routing table entry reaching the destination address;
the issuing unit is further configured to generate an equivalent forwarding table entry reaching the destination address according to the equivalent routing table entry, and issue the equivalent forwarding table entry to a forwarding module, so that when the first IP packet is received, the forwarding table entry corresponding to the equivalent forwarding table entry is obtained from the forwarding table to forward the first IP packet.
CN202110121933.6A 2021-01-28 2021-01-28 Message processing method and device Active CN112910777B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110121933.6A CN112910777B (en) 2021-01-28 2021-01-28 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110121933.6A CN112910777B (en) 2021-01-28 2021-01-28 Message processing method and device

Publications (2)

Publication Number Publication Date
CN112910777A CN112910777A (en) 2021-06-04
CN112910777B true CN112910777B (en) 2022-09-02

Family

ID=76119979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110121933.6A Active CN112910777B (en) 2021-01-28 2021-01-28 Message processing method and device

Country Status (1)

Country Link
CN (1) CN112910777B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113381934B (en) * 2021-06-11 2022-03-22 新华三信息安全技术有限公司 Differential service code point DSCP (distributed service control point) drainage method and device
CN113810276A (en) * 2021-08-31 2021-12-17 锐捷网络股份有限公司 Segment routing fault processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535772A (en) * 2019-08-27 2019-12-03 南京中兴软件有限责任公司 Sending and receiving method, device and the network element of Segment routing traffic engineering strategy
CN110784403A (en) * 2018-07-30 2020-02-11 中兴通讯股份有限公司 Path identification transmission method, device and computer readable storage medium
CN111865787A (en) * 2020-06-30 2020-10-30 新华三技术有限公司 Traffic statistical method, network equipment and storage medium
CN112104553A (en) * 2020-08-27 2020-12-18 新华三技术有限公司 Method, device, routing equipment and storage medium for selecting path

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9654383B2 (en) * 2005-08-17 2017-05-16 Avaya Inc. Route optimization using measured congestion
US10454821B2 (en) * 2016-10-14 2019-10-22 Cisco Technology, Inc. Creating and maintaining segment routed traffic engineering policies via border gateway protocol
US11356361B2 (en) * 2019-04-04 2022-06-07 Cisco Technology, Inc. Systems and methods for steering traffic into SR-TE policies

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110784403A (en) * 2018-07-30 2020-02-11 中兴通讯股份有限公司 Path identification transmission method, device and computer readable storage medium
CN110535772A (en) * 2019-08-27 2019-12-03 南京中兴软件有限责任公司 Sending and receiving method, device and the network element of Segment routing traffic engineering strategy
CN111865787A (en) * 2020-06-30 2020-10-30 新华三技术有限公司 Traffic statistical method, network equipment and storage medium
CN112104553A (en) * 2020-08-27 2020-12-18 新华三技术有限公司 Method, device, routing equipment and storage medium for selecting path

Also Published As

Publication number Publication date
CN112910777A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
WO2021063232A1 (en) Method, apparatus and system for establishing bier forwarding table entry
US10757231B2 (en) Providing network efficiencies in forwarding packets among provider networks and applying segment routing policies
US9860340B2 (en) Service function chaining branching
US9531627B1 (en) Selecting a remote path using forwarding path preferences
US7751405B1 (en) Automatic configuration of label switched path tunnels using BGP attributes
CN104380673B (en) System and method for using tag distribution protocol (LDP) example in IPv6 networks
WO2019105462A1 (en) Method and apparatus for sending packet, method and apparatus for processing packet, pe node, and node
US20220078114A1 (en) Method and Apparatus for Providing Service for Traffic Flow
US7944854B2 (en) IP security within multi-topology routing
WO2020182156A1 (en) Message forwarding method in network, network node and network system
WO2016131225A1 (en) Message forward processing method, apparatus, controller and routing forward device
US11394578B2 (en) Supporting multicast over a network domain
CN112910777B (en) Message processing method and device
US11671352B2 (en) Message sending method, binding relationship advertising method, apparatus, and storage medium
US11895021B2 (en) Message sending and receiving method, apparatus, and system
WO2020156090A1 (en) Method, device, and system for establishing cross-domain forwarding path
WO2022184169A1 (en) Packet forwarding method and system, storage medium, and electronic device
CN114598635A (en) Message transmission method and device
WO2020114083A1 (en) Method and apparatus for processing ioam information
US20230318966A1 (en) Packet Transmission Method, Correspondence Obtaining Method, Apparatus, and System
CN104468359B (en) Message forwarding method and equipment
KR102485180B1 (en) Software defined networking switch and method for multicasting thereof
WO2024055617A1 (en) Traffic control method and apparatus, device, and computer readable storage medium
WO2022127936A1 (en) Methods, apparatus and system for creating sr policy using path computation element protocol
WO2023005530A1 (en) Packet processing method, network processing device and storage medium

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