CN108234318B - Method and device for selecting message forwarding tunnel - Google Patents

Method and device for selecting message forwarding tunnel Download PDF

Info

Publication number
CN108234318B
CN108234318B CN201810232269.0A CN201810232269A CN108234318B CN 108234318 B CN108234318 B CN 108234318B CN 201810232269 A CN201810232269 A CN 201810232269A CN 108234318 B CN108234318 B CN 108234318B
Authority
CN
China
Prior art keywords
message
tunnel
forwarded
forwarding
service level
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
CN201810232269.0A
Other languages
Chinese (zh)
Other versions
CN108234318A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201810232269.0A priority Critical patent/CN108234318B/en
Publication of CN108234318A publication Critical patent/CN108234318A/en
Application granted granted Critical
Publication of CN108234318B publication Critical patent/CN108234318B/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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]

Abstract

The invention provides a method and a device for selecting a message forwarding tunnel, which relate to the technical field of communication and comprise the following steps: acquiring a service level identifier of a message to be forwarded and a next hop index value of the message to be forwarded in a forwarding table; searching whether a first ACL table matched with the service level identification and the next hop index value exists; if not, searching a second ACL table corresponding to any preset matching rule according to the index value of the next hop, wherein the tunnel index identifier in the second ACL table is the identifier of the appointed tunnel; determining a tunnel of the message to be forwarded according to the second ACL table; and sending the message to be forwarded through the tunnel. According to the method and the device for selecting the message forwarding tunnel, the message to be forwarded can be sent through the designated tunnel, the phenomenon of network blockage caused by the fact that the message to be forwarded enters the default tunnel or the tunnel corresponding to the lowest priority is avoided, and therefore the experience degree of a user is improved.

Description

Method and device for selecting message forwarding tunnel
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for selecting a packet forwarding tunnel.
Background
At present, in order to forward a packet more efficiently and safely, a tunnel may be established in a network, and then the packet is forwarded through the tunnel, for example, in a Multiprotocol Label Switching network (MPLS, Multiprotocol Label Switching), a Label Switching Path (LSP) may be established, and the packet is forwarded through the Label Switching Path.
When a network forwarding device such as a switch or a router forwards a message through a tunnel, the priority of the message is usually matched first, the message with high priority goes through the tunnel corresponding to the high priority, the message with low priority goes through the tunnel corresponding to the low priority, and when the tunnel is not configured for the priority of the message, the message goes through a default tunnel or the tunnel corresponding to the lowest priority. The forwarding mode matching with the priority can cause a service with a higher priority to select a default tunnel or a tunnel corresponding to the lowest priority on one hand, and can also easily cause the default tunnel or the lowest priority tunnel to be blocked on the other hand, thereby reducing the forwarding performance of the message.
Disclosure of Invention
In view of this, an object of the present disclosure is to provide a method and an apparatus for selecting a message forwarding tunnel, so as to improve performance of message forwarding.
In a first aspect, an embodiment of the present disclosure provides a method for selecting a packet forwarding tunnel, where the method is applied to a network forwarding device configured with a CBTS technology, and the method includes: acquiring a service level identifier of a message to be forwarded and a next hop index value of the message to be forwarded in a forwarding table; searching whether a first ACL table matched with the service level identification and the next hop index value exists; if not, searching a second ACL table corresponding to any preset matching rule according to the index value of the next hop, wherein the tunnel index identifier in the second ACL table is the identifier of the appointed tunnel; determining a tunnel of the message to be forwarded according to the second ACL table; and sending the message to be forwarded through the tunnel.
In a second aspect, an embodiment of the present disclosure further provides a device for selecting a packet forwarding tunnel, where the device is disposed in a network forwarding device configured with a CBTS technology, and the device includes: the acquisition module is used for acquiring the service level identification of the message to be forwarded and the next hop index value of the message to be forwarded in the forwarding table; the first searching module is used for searching whether a first ACL table matched with the service level identification and the next hop index value exists or not; the second searching module is used for searching a second ACL table corresponding to any preset matching rule according to the index value of the next hop when the searching result of the first searching module is negative, and the tunnel index identifier in the second ACL table is the identifier of the appointed tunnel; the first determining module is used for determining the tunnel of the message to be forwarded according to the second ACL table; and the first forwarding module is used for sending the message to be forwarded through the tunnel.
The disclosed embodiment brings the following beneficial effects:
according to the method and the device for selecting the message forwarding tunnel, provided by the embodiment of the present disclosure, by obtaining the service level identifier of the message to be forwarded and the next hop index value of the message to be forwarded in the forwarding table, when the first ACL table matching the service level identifier and the next hop index value is not found, the second ACL table corresponding to any preset matching rule is found according to the next hop index value, the tunnel of the message to be forwarded is determined according to the second ACL table, and the message to be forwarded is sent through the tunnel. Because the tunnel index identifier in the second ACL table is the identifier of the designated tunnel, the message to be forwarded is sent through the designated tunnel, so that the problem of network congestion caused by the fact that the message which is not matched with the first ACL table enters the default tunnel or the tunnel corresponding to the lowest priority is solved, meanwhile, the bandwidth of the designated tunnel is effectively utilized, the forwarding efficiency of the message forwarding service is guaranteed, and the forwarding performance of the message is improved.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the disclosure. The objectives and other advantages of the disclosure will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a packet forwarding method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for selecting a packet forwarding tunnel according to an embodiment of the present disclosure;
fig. 3 is a flowchart of another method for selecting a packet forwarding tunnel according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a selection process of a message forwarding tunnel when any matching rule is not enabled according to the embodiment of the present disclosure;
fig. 5 is a schematic diagram of a selection process of a message forwarding tunnel when any matching rule is enabled according to the embodiment of the present disclosure;
fig. 6 is a flowchart of another method for selecting a packet forwarding tunnel according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a selecting device of a packet forwarding tunnel according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of another selecting apparatus for a packet forwarding tunnel according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of another device for selecting a packet forwarding tunnel according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the embodiments of the present disclosure will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the above method embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
At present, traffic priorities of different Services or applications on a network are different, and traffic can be classified according to usage requirements of users for different Services or different applications, generally, traffic classification is a packet that conforms to a certain class of characteristics and is identified according to a certain rule, Services enjoyed by packets with different characteristics are different, and traffic classification can be divided into simple traffic classification and complex traffic classification, where the present disclosure describes an example of a simple traffic classification manner, and simple traffic classification refers to using a simple rule, such as a DSCP (Differentiated Services Code Point) value in an IP packet header, an EXP (explicit Bits) value of a label packet (also called an MPLS packet), and the like, to identify traffic with characteristics of different priorities or service levels. For example: and (3) enabling the flow of the high-priority application to flow through the tunnel corresponding to the high priority, enabling the flow of the low-priority application to flow through the tunnel corresponding to the low priority, and enabling the application without the priority to flow through the tunnel corresponding to the default priority. When a tunnel corresponding to a certain priority service fails, the service may also go through a tunnel corresponding to a default priority or a lowest priority.
As shown in fig. 1, taking an IP packet as an example for explanation, assuming that the IP packet is forwarded from PE1 to PE2, and there are three tunnels, TE1, TE2, and TE3, in this network, at this time, PE1 needs to select a priority tunnel according to the DSCP value of the IP packet to forward the IP packet, for example, according to a preset rule, a tunnel of TE3 is selected for a packet whose DSCP is 40, and TE1 is a default tunnel, so that whenever a packet whose DSCP is 40 is matched, the TE3 is forwarded to PE2, and other traffic forwards the TE1 tunnel to PE 2.
The above manner may be referred to as a CBTS (Class-of-service Base on Tunnel Selection based service level classification) technology, where the CBTS is a Tunnel Selection based service level classification technology, and a user may select different application data to an MPLS TE (MPLS Traffic Engineering) Tunnel of a certain priority based on a certain policy to forward according to a data condition of the user, so that various applications may walk through different tunnels to ensure respective bandwidths.
However, when a current network forwarding device such as a switch selects a tunnel corresponding to the priority of a packet based on matching the DSCP and the EXP policies, if the tunnel corresponding to the DSCP or the EXP cannot be matched, the packet goes through a default tunnel or a tunnel with the lowest priority, so that a phenomenon of network congestion is easily caused, and meanwhile, the efficiency of packet forwarding is also reduced. Based on this, the embodiment of the present disclosure provides a method and an apparatus for selecting a message forwarding tunnel, which determine a tunnel of a message to be forwarded, and further implement forwarding of the message.
To facilitate understanding of the present embodiment, first, a detailed description is given to a method for selecting a packet forwarding tunnel disclosed in the present embodiment.
The disclosed embodiment provides a method for selecting a message forwarding tunnel, which can be applied to a network forwarding device configured with a CBTS technology, and in particular, when the method is implemented, the network forwarding device configured with the CBTS technology can select a corresponding tunnel to forward based on the priority of forwarding flow, so that different forwarding services can be provided according to different service priorities, and high-priority services can exclusively share high-quality transmission resources.
As shown in fig. 2, a flow chart of a method for selecting a packet forwarding tunnel includes the following steps:
step S102, obtaining the service grade identification of the message to be forwarded and the next hop index value of the message to be forwarded in a forwarding table;
in a specific implementation, the message to be forwarded in the present disclosure may be an IP message and/or a tag message; the service level identifier may be a DSCP value of the IP packet, and/or an EXP threshold value of the label packet.
Specifically, the service level identifier may identify messages with different priorities or service levels, and further select a corresponding forwarding tunnel to forward the message to be forwarded; the next hop index value may be obtained by looking up a routing table.
Step S104, searching whether a first ACL table matched with the service level identification and the next hop index value exists;
an Access Control List (ACL) table is an instruction List applied to a router interface, and can tell a router which data packets can be received and forwarded and which data packets need to be rejected, after the ACL table is configured, network traffic can be limited, a specific device is allowed to Access, a specific port data packet is specified to be forwarded, and the like.
After the service level identifier of the packet to be forwarded and the next hop index value in the forwarding table are obtained in step S102, it is necessary to find whether there is a matched first ACL table, where the first ACL table carries a tunnel index identifier, and the tunnel index identifier is an identifier of a tunnel matched with the service level identifier of the packet to be forwarded and the next hop index value, and after the first ACL table is matched, a subsequent forwarding process can be performed.
Step S106, if not, searching a second ACL table corresponding to any preset matching rule according to the next hop index value, wherein the tunnel index identifier in the second ACL table is the identifier of the appointed tunnel;
after the match any matching rule may also be referred to as a match any rule, if the first ACL table matching the service level identifier and the next hop index value is not found after the match any matching rule is configured, the packet to be forwarded may be forwarded according to the second ACL table corresponding to the match any rule, so as to avoid the packet to be forwarded from going through a default tunnel or a tunnel with the lowest priority, and specifically, the forwarding process may refer to the process described in step S108 to step S109.
Step S108, determining a tunnel of the message to be forwarded according to the second ACL table;
step S110, sending the message to be forwarded through the tunnel.
According to the method for selecting the message forwarding tunnel provided by the embodiment of the present disclosure, by obtaining the service level identifier of the message to be forwarded and the next hop index value of the message to be forwarded in the forwarding table, when the first ACL table matching the service level identifier and the next hop index value is not found, the second ACL table corresponding to any preset matching rule is found according to the next hop index value, the tunnel of the message to be forwarded is determined according to the second ACL table, and the message to be forwarded is sent through the tunnel. Because the tunnel index identifier in the second ACL table is the identifier of the designated tunnel, the message to be forwarded is sent through the designated tunnel, so that the problem of network congestion caused by the fact that the message which is not matched with the first ACL table enters the default tunnel or the tunnel corresponding to the lowest priority is solved, meanwhile, the bandwidth of the designated tunnel is effectively utilized, the forwarding efficiency of the message forwarding service is guaranteed, and the forwarding performance of the message is improved.
Considering that there are various types of messages, therefore, when the step S102 is executed, the type of the message to be forwarded needs to be determined according to the protocol number of the message to be forwarded, where the type of the message to be forwarded in the present disclosure includes an IP message and a tag message, based on this, the present disclosure also provides another method for selecting a message forwarding tunnel, such as a flowchart of another method for selecting a message forwarding tunnel shown in fig. 3, where the method is implemented on the basis of the flowchart of the method shown in fig. 2, and includes the following steps:
step S202, determining the type of the message to be forwarded according to the protocol number of the message to be forwarded, wherein the type comprises: IP message and label message;
specifically, if the type of the packet to be forwarded is an IP packet, step S204 is continuously executed; if the type of the message to be forwarded is the label message, the step S206 is continuously executed.
Step S204, extracting a DSCP value from the message header of the message to be forwarded, and using the DSCP value as a service level identifier of the message to be forwarded;
step S206, extracting an EXP value from the message header of the message to be forwarded, and using the EXP value as the service level identification of the message to be forwarded;
in a specific implementation, the service level identifier may be a priority field of a packet to be forwarded, and generally, the network forwarding device has a priority mapping function, and after the packet to be forwarded enters the network forwarding device, the network forwarding device maps other priority field values according to the priority field carried by the packet to be forwarded through the priority mapping function according to its own condition and corresponding rules, so as to obtain various priority fields for determining a packet scheduling capability, thereby comprehensively and effectively controlling the packet forwarding scheduling capability.
Generally, the priority field may be used to indicate a priority level of transmission of a packet to be forwarded, and priorities carried by the packet include a DSCP priority, an IP priority, an EXP priority, an 802.1p priority, and the like, which are generated according to a recognized standard and protocol and can represent a priority level of the packet itself.
Step S208, acquiring a service level identifier of the message to be forwarded and a next hop index value of the message to be forwarded in a forwarding table;
step S210, searching whether a first ACL table matched with the service level identification and the next hop index value exists; if yes, go to step S212; if not, step S216 is performed.
Step S212, determining a tunnel of the message to be forwarded according to the first ACL table;
step S214, sending the message to be forwarded through the tunnel;
step S216, searching a second ACL table corresponding to any preset matching rule according to the next hop index value, wherein the tunnel index identifier in the second ACL table is the identifier of the appointed tunnel;
in specific implementation, a user can obtain identifiers of all tunnels which are established in the whole network and can carry out message forwarding, check the bandwidth of each tunnel, configure the tunnel with larger bandwidth as an appointed tunnel, and configure the identifier of the appointed tunnel to a tunnel index identifier in a second ACL table, so that when a first ACL table which is matched with a service level identifier and a next hop index value is not found, the message forwarding can be carried out through the appointed tunnel with larger bandwidth.
Step S218, determining a tunnel of the message to be forwarded according to the second ACL table;
step S220, sending the message to be forwarded through the tunnel.
The process of searching the second ACL table corresponding to any preconfigured matching rule can enable the user to designate a tunnel for the message without matching the service level identifier and the next hop index value according to the tunnel type of the network forwarding device, thereby achieving the purpose of dynamically configuring the tunnel and preventing the message from entering a default tunnel or the tunnel with the lowest priority.
Meanwhile, in order to increase the flexibility of message forwarding, the process of searching the second ACL table corresponding to any preconfigured matching rule may be enabled or disabled according to the actual requirement of the user, and therefore, the method further includes the following processes:
(1) a manual control interface for providing any matching rule;
(2) and if the manual control interface receives an instruction for starting any matching rule, starting any matching rule.
Through the manual control interface, the appointed tunnel can be configured by a user, the user can select to start any matching rule, and then the tunnel with the medium priority is configured to be the appointed tunnel, so that the hardware resource of the current network forwarding equipment can be better utilized, and the condition that the tunnel with poor performance is blocked by the message is avoided.
In order to facilitate understanding of the selection process of the message forwarding tunnel, the following describes a selection process of a message forwarding tunnel when any matching rule is not enabled and when any matching rule is enabled, taking the message to be forwarded as an IP message as an example.
Fig. 4 and 5 are schematic diagrams of a selecting process of a message forwarding tunnel, where fig. 4 is a selecting process of a message forwarding tunnel when any matching rule is not enabled; fig. 5 shows a process of selecting a packet forwarding tunnel when any matching rule is enabled.
In fig. 4, it is assumed that the destination IP address of the IP packet is 1.1.1.2, and the DSCP: after the message enters the network forwarding equipment, the network forwarding equipment searches a routing table according to the destination address of the message to obtain a next hop index value for forwarding the message, an ACL module searches a first ACL table according to the next hop index value and a DSCP value (DSCP: 10), if a matched first ACL table exists, the message is forwarded according to a tunnel indicated in the first ACL table, namely, a path (2) is taken, a tunnel TE X is selected, and the IP message is forwarded; and if the corresponding first ACL table does not exist, a Default tunnel or a tunnel with lower priority is taken, namely, a path (1) is taken, a tunnel TE Default (the Default tunnel or the tunnel with lower priority) is selected, and the IP message is forwarded.
While the disclosed embodiment performs the process shown in fig. 5, any matching rule is enabled. After an IP message enters network forwarding equipment, the network forwarding equipment searches a routing table according to a destination address of the message to obtain a next hop index value for forwarding the message, and if an ACL module searches a first ACL table according to the next hop index value and a DSCP value (DSCP: 10), the message is forwarded according to a tunnel indicated in the first ACL table, namely, a path (4) is taken, a tunnel TE X is selected, and the IP message is forwarded; if the appropriate ACL table is not found, the user-defined tunnel is redirected to forward the message, namely a path (3) is taken, the IP message is forwarded through the specified tunnel TE, and the specific tunnel is directed, which tunnel can be preset by the user according to the actual tunnel condition, for example: and a tunnel with larger bandwidth is selected, so that congestion easily caused by a default tunnel or a tunnel with the lowest priority is avoided.
Generally, the arbitrary matching rule corresponds to a configuration process of an ACL table, and in order to facilitate enabling the arbitrary matching rule and searching for a second ACL table, the method further includes:
(1) if the user configuration information is received, analyzing the service level identification from the user configuration information;
(2) when the analyzed service level identifier is an invalid value, starting any matching rule;
(3) searching index values of all routes in a forwarding table;
(4) and issuing a second ACL table of any matching rule for the searched index value.
Specifically, after any matching rule is started, a user may configure a service level identifier of a packet to be forwarded, taking an IP packet as an example, where the DSCP has an effective value of 0 to 63, and the user may set a value different from the effective value of the DSCP, for example, 64, for the current IP packet, as a service level identifier (priority) of the current packet, and issue a matched ACL table, where the ACL table is edited in advance for the user and carries an identifier of an assigned tunnel, and the assigned tunnel has a large bandwidth, so that the packet may be forwarded, and a congestion may not occur in a default tunnel or a tunnel with a lowest priority.
Based on the method, after the user configuration is completed, for the IP message, after the IP message enters the network forwarding device, a forwarding next-hop index value is obtained by searching a routing table, and then the next-hop index value and a DSCP value in the report are added to search an ACL table, wherein the DSCP value can be a service level identifier carried by the message to be forwarded or a service level identifier analyzed from the user configuration information; and determining the appointed tunnel according to the tunnel index identifier in the searched ACL table, namely, re-marking the IP message to a new next hop index, wherein the content corresponding to the new next hop index is the encapsulation of the path of the forwarding tunnel selected according to the priority on the network forwarding equipment, and after the appointed tunnel is determined, forwarding the IP message.
For a label message (MPLS message), after the label message enters the network forwarding equipment, the label of the label message is referred to obtain a next hop index value, an EXP value in the label is added to look up an ACL table according to the index value, the label message is re-marked to a new next hop index value according to the found ACL table, the content corresponding to the new next hop index value is the encapsulation of the path of the forwarding tunnel selected according to the priority on the network forwarding equipment, and the label message is forwarded after the appointed tunnel is determined.
Based on the above process of selecting a packet forwarding tunnel, fig. 6 shows a flowchart of another method for selecting a packet forwarding tunnel, and as shown in fig. 6, the method includes the following steps:
step S602, if the user configuration information is received, analyzing the service level identification from the user configuration information;
for example, after the network forwarding device receives the IP packet, the DSCP value of the IP packet is extracted.
Step S604, whether the service level mark is a valid value is matched; if yes, go to step S606; if not, go to step S612;
step S606, recording the forwarding table item of the service level identifier;
step S608, searching the next hop index value of the forwarding table item;
step S610, searching an ACL table according to the next hop index value and the service level identification;
taking an IP packet as an example, first, whether a DSCP value of the IP packet is pre-configured with a forwarding rule is matched, that is, whether the DSCP value is an effective DSCP value is determined. If yes, executing the process from step S606 to step S610, and further searching the ACL table according to the DSCP value and the next-hop index value of the forwarding table entry. Typically, there are multiple ACL tables that need to be looked up according to the DSCP value and the next-hop index value.
Step S612, starting any matching rule, and recording the forwarding table entry of the invalid service level identifier;
step S614, searching a next hop index value of the forwarding table item;
step S616, an ACL table is searched according to the index value of the next hop;
step S618, determining a tunnel of the packet to be forwarded according to the ACL table, and forwarding the packet to be forwarded.
And after any matching rule is started, when the service level identification is an invalid value, searching an ACL table according to the invalid service level identification, and redirecting to a user-defined tunnel to forward the message.
Taking the message to be forwarded as an IP message as an example, after the DSCP value is an effective value and any matching rule is started, the ACL table is searched, and the forwarding of the IP message is explained.
Suppose there are 2 routes, 1.1.1.1, 2.2.2.2, each with three equivalent te tunnels, route 1.1.1.1 equivalent tunnels: a first tunnel te1, a second tunnel te2, a third tunnel te 3; route 2.2.2.2 hierarchical tunnel: a first tunnel te4, a second tunnel te5, and a third tunnel te 6.
The forwarding information of the three routes is as follows:
1.1.1.1--->default index(16386)--->te 1
--->te index1(16387)--->te 2
--->te index2(16388)--->te 3
2.2.2.2--->default index(16396)--->te 4
--->te index1(16397)--->te5
--->te index2(16398)--->te 6
if the DSCP18 rule is configured as: mapping the message to the second tunnel of routes 1.1.1.1 and 2.2.2.2 for forwarding, two ACL tables need to be issued:
ACL1 key: 18+16386 (default index of 1.1.1.1), action: redirect to 16387 (index information of te 2)
ACL2 key: 18+16396 (default index of 2.2.2.2), action: redirect to 16397 (index information of te 5)
Assuming that the destination addresses of the message 1 and the message 2 are different, which are 1.1.1.1 and 2.2.2.2, respectively, and the DSCP values carried by the message 1 and the message 2 are both 18, when the routing tables are looked up by using the destination addresses of the message 1 and the message 2, the index of the next hop looked up by using the destination address of 1.1.1.1 is 16386, and the index of the next hop looked up by using the destination address of 2.2.2.2 is 16396. And the DSCP values carried by the message 1 and the message 2 are both 18, and are matched with the configured DSCP18 rule, the ACL1 is found according to the keyword "18 + 16386" of the message 1, and the message 1 is redirected to the next hop with the index of 16387, that is, the next hop is mapped to the second tunnel te2 of 1.1.1.1 for forwarding. Similarly, according to the key word "18 + 16396" of the message 2, the ACL2 is found, and the message 2 is redirected to the next hop with the index 16397, that is, the second tunnel te5 mapped to 2.2.2.2 is forwarded.
And if any matching rule (match any) is configured, mapping the message to a third tunnel for forwarding. Then the following two ACLs need to be issued.
ACL 3: key 16386 (default index of 1.1.1.1), action: redirect to 16388 (index information of te 3)
ACL 4: key 16396 (default index of 2.2.2.2), action: redirect to 16398 (index information of te 6)
At this time, if the message 3 with the destination of 1.1.1.1 is received, if the DSCP value of the message 3 is not 18, for example, 16, the DSCP18 rule cannot be matched, the ACL table cannot be searched by using the key word "16 + 16386" of the message 3, because the match any matching rule is configured, the ACL table is searched by using the key word "16386" of the message 3 and is matched with the ACL3, so that the message is redirected to 16388, and the TE3 is removed. Similarly, if the destination address is 2.2.2.2 and the DSCP value of the message is not 18, the ACL4 is found according to the match any matching rule, the message is redirected to 16398, and the TE6 is carried out.
The method for selecting a message forwarding tunnel according to the embodiment of the present disclosure can obtain the service level identifier of the message to be forwarded and the next hop index value of the message to be forwarded in the forwarding table, and determine the validity of the service level identifier, and when the service level identifier is an invalid value, a corresponding ACL table can be searched by using any matching rule, and then an appointed tunnel with a large bandwidth is selected as the tunnel for forwarding the message, and the message is forwarded.
Corresponding to the method for selecting a message forwarding tunnel provided in the foregoing embodiment, the present disclosure also provides a device for selecting a message forwarding tunnel. As shown in fig. 7, a schematic structural diagram of a selecting apparatus of a packet forwarding tunnel is provided, where the selecting apparatus is disposed in a network forwarding device configured with a CBTS technology, and includes:
an obtaining module 70, configured to obtain a service level identifier of a packet to be forwarded and a next hop index value of the packet to be forwarded in a forwarding table;
a first search module 72, configured to search whether there is a first ACL table matching the service level identifier and the next hop index value;
a second search module 74, configured to, when the search result of the first search module is negative, search, according to the next hop index value, a second ACL table corresponding to any preconfigured matching rule, where a tunnel index identifier in the second ACL table is an identifier of an assigned tunnel;
a first determining module 76, configured to determine a tunnel of the packet to be forwarded according to the second ACL table;
and the first forwarding module 78 is configured to send the message to be forwarded through the tunnel.
In a specific implementation, the obtaining module 70 is configured to: determining the type of the message to be forwarded according to the protocol number of the message to be forwarded, wherein the type comprises the following steps: IP message and label message; if the type of the message to be forwarded is an IP message, extracting a DSCP value from a message header of the message to be forwarded, and using the DSCP value as a service level identifier of the message to be forwarded; and if the type of the message to be forwarded is the label message, extracting an EXP value from the message header of the message to be forwarded, and using the EXP value as the service level identification of the message to be forwarded.
As shown in fig. 8, the schematic structural diagram of another device for selecting a packet forwarding tunnel includes, in addition to the structure shown in fig. 7:
a manual control module 80 for providing a manual control interface for any matching rule;
a first enabling module 82, configured to enable any matching rule if the manual control interface receives an instruction to start any matching rule.
As shown in fig. 9, the structure diagram of another device for selecting a packet forwarding tunnel includes, in addition to the structure shown in fig. 7:
the parsing module 84 is configured to parse the service level identifier from the user configuration information if the user configuration information is received;
a second enabling module 86, configured to enable any matching rule when the parsed service level identifier is an invalid value;
the searching module 88 is used for searching the index value of each route in the forwarding table;
and the issuing module 90 is configured to issue a second ACL table of any matching rule for the found index value.
When the first ACL table matched with the service level identifier and the next hop index value is found, the second determining module 92 determines the tunnel of the message to be forwarded according to the first ACL table;
the second forwarding module 94 sends the message to be forwarded through the tunnel.
The selection device of the message forwarding tunnel provided by the embodiment of the present disclosure has the same technical characteristics as the selection method of the message forwarding tunnel provided by the above embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved. The implementation principle and the technical effects thereof are the same as those of the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments for the device embodiments where not mentioned in part.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present disclosure may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A method for selecting a message forwarding tunnel is applied to a network forwarding device configured with a CBTS technology, and comprises the following steps:
acquiring a service level identifier of a message to be forwarded and a next hop index value of the message to be forwarded in a forwarding table;
searching whether a first ACL table matched with the service level identification and the next hop index value exists;
if not, searching a second ACL table corresponding to any preset matching rule according to the next hop index value, wherein the tunnel index identifier in the second ACL table is the identifier of an appointed tunnel, and the appointed tunnel is a tunnel with larger bandwidth;
determining a tunnel of the message to be forwarded according to the second ACL table;
and sending the message to be forwarded through the tunnel.
2. The method according to claim 1, wherein the step of obtaining the service level identifier of the packet to be forwarded comprises:
determining the type of the message to be forwarded according to the protocol number of the message to be forwarded, wherein the type comprises the following steps: IP message and label message;
if the type of the message to be forwarded is an IP message, extracting a DSCP value from a message header of the message to be forwarded, and using the DSCP value as a service level identifier of the message to be forwarded;
and if the type of the message to be forwarded is a label message, extracting an EXP value from a message header of the message to be forwarded, and using the EXP value as a service level identifier of the message to be forwarded.
3. The method of claim 1, further comprising:
a manual control interface for providing the arbitrary matching rules;
and if the manual control interface receives an instruction for starting the random matching rule, starting the random matching rule.
4. The method of claim 1, further comprising:
if user configuration information is received, analyzing a service level identifier from the user configuration information;
when the analyzed service level identifier is an invalid value, starting the any matching rule;
searching index values of all routes in a forwarding table;
and issuing a second ACL table of the random matching rule for the searched index value.
5. The method of claim 1, further comprising:
when a first ACL table matched with the service level identification and the next hop index value is found, determining the tunnel of the message to be forwarded according to the first ACL table;
and sending the message to be forwarded through the tunnel.
6. A device for selecting a message forwarding tunnel is provided, wherein the device is arranged in a network forwarding device configured with a CBTS technology, and the device comprises:
the system comprises an acquisition module, a forwarding module and a forwarding module, wherein the acquisition module is used for acquiring a service level identifier of a message to be forwarded and a next hop index value of the message to be forwarded in a forwarding table;
the first searching module is used for searching whether a first ACL table matched with the service level identification and the next hop index value exists or not;
a second search module, configured to search, when a search result of the first search module is negative, a second ACL table corresponding to any pre-configured matching rule according to the next hop index value, where a tunnel index identifier in the second ACL table is an identifier of an assigned tunnel, and the assigned tunnel is a tunnel with a relatively large bandwidth;
a first determining module, configured to determine, according to the second ACL table, a tunnel of the packet to be forwarded;
and the first forwarding module is used for sending the message to be forwarded through the tunnel.
7. The apparatus of claim 6, wherein the obtaining module is configured to:
determining the type of the message to be forwarded according to the protocol number of the message to be forwarded, wherein the type comprises the following steps: IP message and label message;
if the type of the message to be forwarded is an IP message, extracting a DSCP value from a message header of the message to be forwarded, and using the DSCP value as a service level identifier of the message to be forwarded;
and if the type of the message to be forwarded is a label message, extracting an EXP value from a message header of the message to be forwarded, and using the EXP value as a service level identifier of the message to be forwarded.
8. The apparatus of claim 6, further comprising:
the manual control module is used for providing a manual control interface of the random matching rule;
and the first enabling module is used for enabling the random matching rule if the manual control interface receives an instruction for starting the random matching rule.
9. The apparatus of claim 6, further comprising:
the analysis module is used for analyzing the service level identification from the user configuration information if the user configuration information is received;
the second starting module is used for starting the random matching rule when the analyzed service level identifier is an invalid value;
the searching module is used for searching the index value of each route in the forwarding table;
and the issuing module is used for issuing the second ACL table of the random matching rule for the searched index value.
10. The apparatus of claim 6, further comprising:
the second determining module is used for determining the tunnel of the message to be forwarded according to the first ACL table when the first ACL table matched with the service level identification and the next hop index value is found;
and the second forwarding module is used for sending the message to be forwarded through the tunnel.
CN201810232269.0A 2018-03-20 2018-03-20 Method and device for selecting message forwarding tunnel Active CN108234318B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810232269.0A CN108234318B (en) 2018-03-20 2018-03-20 Method and device for selecting message forwarding tunnel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810232269.0A CN108234318B (en) 2018-03-20 2018-03-20 Method and device for selecting message forwarding tunnel

Publications (2)

Publication Number Publication Date
CN108234318A CN108234318A (en) 2018-06-29
CN108234318B true CN108234318B (en) 2021-01-01

Family

ID=62658851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810232269.0A Active CN108234318B (en) 2018-03-20 2018-03-20 Method and device for selecting message forwarding tunnel

Country Status (1)

Country Link
CN (1) CN108234318B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109327389B (en) * 2018-11-13 2021-06-08 南京中孚信息技术有限公司 Traffic classification label forwarding method, device and system
CN111327535B (en) * 2018-12-13 2023-03-24 深圳市中兴微电子技术有限公司 Message forwarding method and device and forwarding equipment
CN110995595B (en) * 2019-12-16 2022-03-11 新华三大数据技术有限公司 Message sending method, device, storage medium and node equipment
CN111277481B (en) * 2020-01-09 2021-09-24 奇安信科技集团股份有限公司 Method, device, equipment and storage medium for establishing VPN tunnel
CN114143142B (en) * 2020-09-02 2023-06-20 华为技术有限公司 Message transmission method and device
CN112671651B (en) * 2020-11-17 2022-08-30 新华三技术有限公司 Message forwarding method and device
CN113114579B (en) * 2021-03-30 2022-03-25 杭州迪普信息技术有限公司 ACL issuing method and device
CN113381934B (en) * 2021-06-11 2022-03-22 新华三信息安全技术有限公司 Differential service code point DSCP (distributed service control point) drainage method and device
CN114285794B (en) * 2021-12-22 2023-08-18 网宿科技股份有限公司 Message forwarding control method, message transmission network, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441930A (en) * 2013-08-21 2013-12-11 杭州华三通信技术有限公司 MPLS TE packet forwarding and management method and device
WO2014139646A1 (en) * 2013-03-13 2014-09-18 Alcatel Lucent Communication in a dynamic multipoint virtual private network
CN104486229A (en) * 2014-12-24 2015-04-01 迈普通信技术股份有限公司 Method and equipment for realizing VPN message forwarding
CN105577417A (en) * 2014-11-06 2016-05-11 杭州华三通信技术有限公司 VXLAN (virtual extensible local area network)-based massage forwarding method and device
CN105791109A (en) * 2014-12-25 2016-07-20 中兴通讯股份有限公司 Method and apparatus for carrying out multicast forwarding on MPLS (Multi-Protocol Label Switching) intermediate node
CN105791121A (en) * 2014-12-23 2016-07-20 中兴通讯股份有限公司 Setting method and device for service forwarding table
CN106059931A (en) * 2016-08-04 2016-10-26 杭州迪普科技有限公司 Message forwarding method and device
CN106789725A (en) * 2016-11-10 2017-05-31 瑞斯康达科技发展股份有限公司 It is a kind of to realize the methods, devices and systems that flow is redirected
CN106936795A (en) * 2015-12-31 2017-07-07 华为技术有限公司 Set up the method and gateway device in internet protocol security tunnel

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014139646A1 (en) * 2013-03-13 2014-09-18 Alcatel Lucent Communication in a dynamic multipoint virtual private network
CN103441930A (en) * 2013-08-21 2013-12-11 杭州华三通信技术有限公司 MPLS TE packet forwarding and management method and device
CN105577417A (en) * 2014-11-06 2016-05-11 杭州华三通信技术有限公司 VXLAN (virtual extensible local area network)-based massage forwarding method and device
CN105791121A (en) * 2014-12-23 2016-07-20 中兴通讯股份有限公司 Setting method and device for service forwarding table
CN104486229A (en) * 2014-12-24 2015-04-01 迈普通信技术股份有限公司 Method and equipment for realizing VPN message forwarding
CN105791109A (en) * 2014-12-25 2016-07-20 中兴通讯股份有限公司 Method and apparatus for carrying out multicast forwarding on MPLS (Multi-Protocol Label Switching) intermediate node
CN106936795A (en) * 2015-12-31 2017-07-07 华为技术有限公司 Set up the method and gateway device in internet protocol security tunnel
CN106059931A (en) * 2016-08-04 2016-10-26 杭州迪普科技有限公司 Message forwarding method and device
CN106789725A (en) * 2016-11-10 2017-05-31 瑞斯康达科技发展股份有限公司 It is a kind of to realize the methods, devices and systems that flow is redirected

Also Published As

Publication number Publication date
CN108234318A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
CN108234318B (en) Method and device for selecting message forwarding tunnel
EP3624408B1 (en) Method for generating forwarding table entry, controller, and network device
CN111683011B (en) Message processing method, device, equipment and system
EP2541866B1 (en) Management schemes for filter sets
CN112422430B (en) QoS queue scheduling method and device, electronic equipment and storage medium
CN107925613A (en) It is used for the methods, devices and systems to E-Packet in business function chain SFC
CN107483345B (en) Service processing method, device and system
US11284297B2 (en) Secure creation of application containers for fifth generation cellular network slices
JP2012507930A (en) Method and system for classifying data packets
CN107786450B (en) Data message transmission method and device and machine-readable storage medium
EP1352334A2 (en) Selective routing of data flows using a tcam
KR101460048B1 (en) Method and apparatus for control of dynamic service chaining by using tagging
CN109450793B (en) Method and device for scheduling service traffic
CN109729011B (en) Flow forwarding method, device and computer readable storage medium
CN110808924B (en) Chip loopback message processing method, device and storage medium
US7616632B2 (en) System and method of implementing contacts of small worlds in packet communication networks
CN111600849B (en) Message processing method, device, equipment and machine readable storage medium
US7471642B2 (en) Communication terminal, load distribution method and load distribution processing program
KR100585934B1 (en) Method of Dynamic Management of Traffic Conditioner Parameter and Table of Class of Service on Router
CN107786439B (en) Cross-domain routing method, controller, system, routing method and intra-domain router
CN111865805B (en) Multicast GRE message processing method and system
CN109861908A (en) A kind of routing conversion and equipment
CN109995649A (en) It is a kind of for obtaining the method and device of cross-domain link
CN115473812A (en) Flow message forwarding method, client, controller and storage medium
CN115348202A (en) Data transmission method, device and equipment based on network slice 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