CN111327535B - Message forwarding method and device and forwarding equipment - Google Patents

Message forwarding method and device and forwarding equipment Download PDF

Info

Publication number
CN111327535B
CN111327535B CN201811528819.XA CN201811528819A CN111327535B CN 111327535 B CN111327535 B CN 111327535B CN 201811528819 A CN201811528819 A CN 201811528819A CN 111327535 B CN111327535 B CN 111327535B
Authority
CN
China
Prior art keywords
information
next hop
type
path
index information
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
CN201811528819.XA
Other languages
Chinese (zh)
Other versions
CN111327535A (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.)
Sanechips Technology Co Ltd
Original Assignee
Sanechips Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanechips Technology Co Ltd filed Critical Sanechips Technology Co Ltd
Priority to CN201811528819.XA priority Critical patent/CN111327535B/en
Publication of CN111327535A publication Critical patent/CN111327535A/en
Application granted granted Critical
Publication of CN111327535B publication Critical patent/CN111327535B/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/20Hop count for routing purposes, e.g. TTL
    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a message forwarding method, a message forwarding device and forwarding equipment, wherein the method comprises the following steps: after a message is received, searching first routing information corresponding to the message, wherein the first routing information at least comprises a first destination type field and a first destination information field, the first destination type field comprises type information of a next hop path, and the first destination information field comprises first index information corresponding to the type information; and determining a next hop processing unit of the message according to the type information of the next hop path, and sending the message and the first index information to the next hop processing unit, wherein the first index information is used for the next hop processing unit to inquire second routing information.

Description

Message forwarding method and device and forwarding equipment
Technical Field
The present application relates to forwarding technologies, and in particular, to a method and an apparatus for forwarding a packet, and a forwarding device.
Background
There are two types of schemes related to protection switching in the forwarding model of the chip forwarding plane: the first kind of scheme is a flat next hop technical scheme, as shown in fig. 1, such switching trigger completely needs to update forwarding information of forwarding entries by a logic block, more and more existing networks need a layered tunnel nested networking model, but this kind of scheme is not layered, in order to implement layered protection, a layered next hop (nexthop) needs to be leveled for implementation, the switching efficiency is very low, the specification of an effective next hop of a chip is reduced invisibly, the next hop Random Access Memory (RAM) resource of the chip is not reasonably utilized, and storage resources are wasted. The second kind of scheme is a layered next-hop technical scheme, and the switching efficiency of the scheme is obviously higher than that of the first kind of scheme. But it is when addressing complex scenarios, such as: fast reroute (Frr, fast reroute) 1+1 protection and path 1 protection are mutually overlapped, multicast protection is overlapped, and short boards and defects exist in the aspects of flexibility and switching efficiency of the item mapping of the forwarding table nested in the multi-layer tunnel.
Disclosure of Invention
In order to solve the foregoing technical problem, embodiments of the present application provide a message forwarding method and apparatus, a computer-readable storage medium, and a forwarding device.
The message forwarding method provided by the embodiment of the application comprises the following steps:
after a message is received, searching first routing information corresponding to the message, wherein the first routing information at least comprises a first destination type field and a first destination information field, the first destination type field comprises type information of a next hop path, and the first destination information field comprises first index information corresponding to the type information;
and determining a next hop processing unit of the message according to the type information of the next hop path, and sending the message and the first index information to the next hop processing unit, wherein the first index information is used for the next hop processing unit to inquire second routing information.
In this embodiment of the present application, the type information of the next hop path is a multicast type, and the first index information is multicast group index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the first index information to the next hop processing unit, where the first index information is used by the next hop processing unit to query second routing information, and includes:
determining a next hop processing unit of the message as a copy unit according to the type information of the next hop path as a multicast type;
and sending the message and the multicast group index information to the replication unit, wherein the replication unit is used for determining the routing information of each multicast member in the multicast group according to the multicast group index information, replicating the message and then respectively sending the replicated message to each multicast member.
In this embodiment of the application, the type information of the next hop path is a unicast type and an NHI type, and the first index information is NHI index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the first index information to the next hop processing unit, where the first index information is used by the next hop processing unit to query second routing information, and includes:
determining that a next hop processing unit of the message is an nth protection subunit in a layered protection unit according to the fact that the type information of the next hop path is a unicast type and an NHI type, wherein N is more than or equal to 1 and less than or equal to N, and N is the number of the protection subunits in the layered protection unit, wherein the N protection subunits in the layered protection unit have a corresponding relationship with N layers of tunnels;
and sending the message and the NHI index information to the nth protection subunit, wherein the nth protection subunit is used for determining next hop routing information according to the NHI index information.
The message forwarding method provided by the embodiment of the application comprises the following steps:
after receiving a message and first index information, searching second routing information corresponding to the first index information, wherein the second routing information at least comprises a second target type field and a second target information field, the second target type field comprises type information of a next hop path, and the second target information field comprises second index information corresponding to the type information;
and determining a next hop processing unit of the message according to the type information of the next hop path, and sending the message and the second index information to the next hop processing unit, wherein the second index information is used for the next hop processing unit to inquire second routing information or perform tunnel encapsulation.
In this embodiment of the application, after receiving the packet and the first index information, searching for the second routing information corresponding to the first index information includes:
receiving a message and first index information, wherein the first index information comprises first index sub information corresponding to a working path and second index sub information corresponding to a protection path;
inquiring the current path forwarding state of a target layer tunnel, and if the current path forwarding state of the target layer tunnel is a working path, searching second routing information corresponding to the first indexing sub-information; and if the current path forwarding state of the target layer tunnel is a protection path, searching second routing information corresponding to the second index sub-information.
In the embodiment of the present application, the type information of the next hop path is a unicast type and is an NHI type, and the second index information is NHI index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the second index information to the next hop processing unit, where the second index information is used for the next hop processing unit to query second routing information, and includes:
determining that a next hop processing unit of the message is an mth protection subunit in a layered protection unit according to the fact that the type information of the next hop path is a unicast type and an NHI type, wherein m is more than or equal to 1 and less than or equal to N, N is the number of the protection subunits in the layered protection unit, and N protection subunits in the layered protection unit have a corresponding relation with N layers of tunnels;
and sending the message and the NHI index information to the mth protection subunit, where the mth protection subunit is configured to determine next hop routing information according to the NHI index information.
In the embodiment of the present application, the protection subunit is configured to protect the tunnel of the corresponding layer based on a path state table and a protection path attribute table, wherein,
the path state table comprises a path forwarding state corresponding to the tunnel, and the path forwarding state is a working path or a protection path;
the protection path attribute table comprises type information of a protection path and next hop index information of the protection path, wherein the type information of the protection path is a unicast type or a multicast type, and the next hop index information is NHI index information or multicast group index information.
In this embodiment of the application, the type information of the next hop path is a unicast type and is a unicast type, and the second index information is NHI index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the second index information to the next hop processing unit, where the second index information is used for the next hop processing unit to query second routing information, and includes:
determining a next hop processing unit of the message as a packaging unit according to the fact that the type information of the next hop path is a unicast type;
and sending the message and the NHI index information to the packaging unit, wherein the packaging unit is used for carrying out corresponding tunnel packaging according to the NHI index information.
In this embodiment of the present application, the type information of the next hop path is a multicast type, and the second index information is multicast group index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the second index information to the next hop processing unit, where the second index information is used for the next hop processing unit to query second routing information, and includes:
determining a next hop processing unit of the message as a copy unit according to the type information of the next hop path as a multicast type;
and sending the message and the multicast group index information to the replication unit, wherein the replication unit is used for determining the routing information of each multicast member in the multicast group according to the multicast group index information, replicating the message and then sending the replicated message to each multicast member respectively.
The message forwarding apparatus provided in the embodiment of the present application includes:
a receiving unit, configured to receive a packet;
a searching unit, configured to search for first routing information corresponding to the packet, where the first routing information at least includes a first destination type field and a first destination information field, the first destination type field includes type information of a next hop path, and the first destination information field includes first index information corresponding to the type information;
a sending unit, configured to determine a next hop processing unit of the packet according to the type information of the next hop path, and send the packet and the first index information to the next hop processing unit, where the first index information is used for the next hop processing unit to query the second routing information.
The message forwarding apparatus provided in the embodiment of the present application includes:
the receiving unit is used for receiving the message and the first index information;
a searching unit, configured to search for second routing information corresponding to the first index information, where the second routing information at least includes a second destination type field and a second destination information field, the second destination type field includes type information of a next hop path, and the second destination information field includes second index information corresponding to the type information;
a sending unit, configured to determine a next hop processing unit of the packet according to the type information of the next hop path, and send the packet and the second index information to the next hop processing unit, where the second index information is used by the next hop processing unit to query the second routing information or perform tunnel encapsulation.
The computer-readable storage medium provided in the embodiments of the present application is used for storing a computer program, where the computer program enables a computer to execute the above-mentioned message forwarding method.
The forwarding device provided by the embodiment of the application comprises: the message forwarding system comprises a processor and a memory, wherein the memory is used for storing a computer program, and the processor is used for calling and running the computer program stored in the memory and executing the message forwarding method.
In the technical scheme of the embodiment of the application, after receiving a message, a route forwarding unit searches for first route information corresponding to the message, where the first route information at least includes a first destination type field and a first destination information field, the first destination type field includes type information of a next hop path, and the first destination information field includes first index information corresponding to the type information; and determining a next hop processing unit of the message according to the type information of the next hop path, and sending the message and the first index information to the next hop processing unit, wherein the first index information is used for the next hop processing unit to inquire second routing information. After receiving a message and first index information, a protection subunit in a hierarchical protection unit searches second routing information corresponding to the first index information, wherein the second routing information at least comprises a second destination type field and a second destination information field, the second destination type field comprises type information of a next hop path, and the second destination information field comprises second index information corresponding to the type information; and determining a next hop processing unit of the message according to the type information of the next hop path, and sending the message and the second index information to the next hop processing unit, wherein the second index information is used for the next hop processing unit to inquire second routing information or perform tunnel encapsulation. It can be seen that in the technical solution of the embodiment of the present application, the nested tunnel model is subjected to hierarchical protection, that is, each layer of tunnel is subjected to path protection through a corresponding protection subunit, and the forwarding of the packet is realized through the separated next-hop routing information (that is, each hop processing unit corresponds to its own next-hop routing information).
Drawings
The drawings illustrate generally, by way of example, but not by way of limitation, various embodiments discussed herein.
FIG. 1 is a diagram of a flattened forwarding model provided by an embodiment of the present application;
fig. 2 is a first schematic flow chart of a message forwarding method provided in an embodiment of the present application;
fig. 3 is a second flowchart of a message forwarding method according to an embodiment of the present application;
fig. 4 is a model diagram of a layered protection forwarding framework provided in an embodiment of the present application;
fig. 5 is a main information diagram of a routing table entry provided in an embodiment of the present application;
FIG. 6 is a diagram of a layered protection unit model provided in an embodiment of the present application;
FIG. 7 is a diagram of a replication hierarchy design model provided by an embodiment of the present application;
fig. 8 is a model diagram of a next hop split encapsulation sharing scheme according to an embodiment of the present application;
fig. 9 is a diagram of main information of an entry of a next hop encapsulation table according to an embodiment of the present application;
fig. 10 is a diagram of NHI _ x index organization provided in an embodiment of the present application;
FIG. 11 is a diagram of a hierarchical protection mapping model provided in an embodiment of the present application;
fig. 12 is a diagram of a tunnel nesting model provided in an embodiment of the present application;
fig. 13 is a schematic structural component diagram of a packet forwarding apparatus provided in the embodiment of the present application;
fig. 14 is a schematic structural diagram of a forwarding device according to an embodiment of the present application.
Detailed Description
Technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The survivability of a network is an important capability of the network to recover traffic when it is subject to failures and attacks. When a fault of a working path is detected, the network is required to be capable of quickly detecting the fault of an equipment node or the path and immediately starting a corresponding protection mechanism, the service flow is switched to the protection path, and after the working path is recovered to be normal, a recovery mechanism is started to carry out the back switch of the path.
Wherein, the fault detection of the device node or path and the protection mechanism can be realized by standard protocols. After a path fault is detected, how to improve the switching efficiency of a working path is a technical implementation of key attention in the industry at present. With the increasing demand of various internet and the sensory requirements of customers, the demand of telecommunication operators for path switching time is also increasing, and how to realize the demand from the technical level is a major issue of important attention in the industry.
Protection switching needs to be realized by means of Operation, maintenance and Administration (OAM) and other related protocol standards, and is realized together with the forwarding behavior of the bottom chip. In the related protocol standards such as OAM/protection, after the OAM/BFD related control and status messages are identified by the forwarding plane of the chip (chip forwarding plane for short) and sent to the logic block, the switching arbitration logic of the related path is performed and the switching of a certain path is triggered, wherein the path switching means is determined by the design scheme of the chip forwarding plane. The main technical scheme of the logic block for implementing the switching arbitration logic can be implemented by software codes loaded by a Central Processing Unit (CPU), and due to characteristics such as limited CPU dominant frequency and CPU multitask scheduling execution, the logic block can also adopt another technical scheme: the method is independently completed by hanging a special OAM ENGINE (OAM Engine) inside or outside the chip, and the mode also has certain help for improving the efficiency.
The protection switching time is affected by several large factors:
1. after the fault occurs, the detection time of the OAM related message or the link forwarding delay;
2. triggering path switching arbitration logic by the relevant detection message;
3. after the decision of the switching arbitration logic, the switching effective time of a certain path is taken into effect.
Wherein, the factor 1 is specified by the current concrete protocol and is necessary time consumption, so the space for optimizing from the soft technology is not large; for factor 2, the implementation scheme of the switching arbitration logic is standardized, and the execution efficiency of the specific implementation method is influenced by the forwarding model scheme of the forwarding plane of the chip; for factor 3, the effective efficiency of triggering the switch of the forwarding path is determined by the design scheme of the forwarding plane of the chip. In summary, the related design scheme of the forwarding model of the forwarding plane of the chip is a key technology for improving the protection switching efficiency, and the implementation of the related design scheme of the forwarding plane is guided by the related design scheme of the forwarding plane regardless of being implemented by the solidified logic of the chip or the microcode logic of the programmable network processor, and is also a core point.
Fig. 2 is a first schematic flow chart of a message forwarding method provided in an embodiment of the present application, and as shown in fig. 2, the message forwarding method includes the following steps:
step 201: after a message is received, first routing information corresponding to the message is searched, wherein the first routing information at least comprises a first destination type field and a first destination information field, the first destination type field comprises type information of a next hop path, and the first destination information field comprises first index information corresponding to the type information.
The technical solution of the embodiment of the present application is applied to a forwarding device, and referring to fig. 4, the forwarding device at least includes a routing forwarding unit, a hierarchical protection unit, and a replication unit. After receiving a message, a route forwarding unit searches for first route information corresponding to the message, where the first route information at least includes a first destination type field and a first destination information field, the first destination type field includes type information of a next hop path, and the first destination information field includes first index information corresponding to the type information.
In specific implementation, the route forwarding unit is also a routing table logic module, where the routing table is, for example, an IP unicast or multicast routing table or a Multi-Protocol Label Switching (MPLS) Label table (abbreviated as Label routing table), and in the content of a routing table entry (abbreviated as entry), two fields need to be additionally adapted, as shown in fig. 5, 1) a destination TYPE (dest TYPE) field, where the field includes TYPE information of a next hop path, where the TYPE information of the next hop path is, for example, a multicast TYPE, a unicast TYPE, an NHI TYPE (NHI _ TYPE), and the like; 2) A destination information (destination) field corresponding to the destination type field, where the destination information is, for example, multicast group index information, next Hop Identifier (NHI) index information, and the like.
The NHI _ TYPE performs hierarchical design as required, that is, distinguishes the service tunnel hierarchy of the next hop path, and is determined by the routing TYPE of the protocol layer. Meanwhile, in order to increase the sharing of the hierarchical next hop, the bit width of the target information field NHI in the table entry needs to be designed according to the maximum specification supported by the RAM resource, the structure of the NHI _ x is shown in fig. 10, a high-order encapsulation type bit segment needs to be maintained by upper-layer software according to the tunnel encapsulation type, and the effective table lookup bit width is a following index segment.
Step 202: and determining a next hop processing unit of the message according to the type information of the next hop path, and sending the message and the first index information to the next hop processing unit, wherein the first index information is used for the next hop processing unit to inquire second routing information.
In an embodiment, the type information of the next hop path is a multicast type, and the first index information is multicast group index information; the route forwarding unit determines the next hop processing unit of the message as a replication unit according to the multicast type of the type information of the next hop path; and sending the message and the multicast group index information to the replication unit, wherein the replication unit is used for determining the routing information of each multicast member in the multicast group according to the multicast group index information, replicating the message and then respectively sending the replicated message to each multicast member.
In another embodiment, the type information of the next hop path is a unicast type and is an NHI type, and the first index information is NHI index information; the routing forwarding unit determines that the next hop processing unit of the message is the nth protection subunit in the layered protection unit according to the fact that the type information of the next hop path is a unicast type and is an NHI type, wherein N is greater than or equal to 1 and less than or equal to N, N is the number of the protection subunits in the layered protection unit, and the N protection subunits in the layered protection unit have a corresponding relationship with N-layer tunnels; and sending the message and the NHI index information to the nth protection subunit, wherein the nth protection subunit is used for determining next hop routing information according to the NHI index information.
Referring to fig. 4, n =3, the NHI type information obtained through the first routing information may be NHI0, NHI1, or NHI2, and the NHI index information may be an NHI _0 index, NHI _1 index, or NHI _2 index. In the above scheme, for a multi-layer tunnel nesting scenario (as shown in fig. 12), each layer of tunnel corresponds to a layer of next-hop tunnel, and the next-hop tunnel hierarchy imported by the forwarding device through the routing information is flexible and changeable, for example, the next-hop tunnel hierarchy may be a tunnel corresponding to a protection subunit of NHI0, a tunnel corresponding to a protection subunit of NHI1, or a tunnel corresponding to a protection subunit of NHI 2. Therefore, the routing table of the embodiment of the application can flexibly guide the derived variable next hop hierarchies and the flexible mapping between the next hop hierarchies.
Fig. 3 is a second flowchart illustrating a packet forwarding method according to an embodiment of the present application, where as shown in fig. 3, the packet forwarding method includes the following steps:
step 301: after receiving a message and first index information, searching second routing information corresponding to the first index information, wherein the second routing information at least comprises a second purpose type field and a second purpose information field, the second purpose type field comprises type information of a next hop path, and the second purpose information field comprises second index information corresponding to the type information.
The technical solution of the embodiment of the present application is applied to a forwarding device, and referring to fig. 4, the forwarding device at least includes a routing forwarding unit, a hierarchical protection unit, and a replication unit. The layered protection unit is formed by connecting a plurality of similar protection subunits in series, and the requirements of the fast switching function of different tunnel layers are met respectively. Assuming that N is the number of the protection subunits in the layered protection unit, wherein the N protection subunits in the layered protection unit have a corresponding relationship with N layers of tunnels; the protection subunit is configured to protect a tunnel of a corresponding layer based on a path state table and a protection path attribute table, where the path state table includes a path forwarding state corresponding to the tunnel, and the path forwarding state is a working path or a protection path; the protection path attribute table comprises type information of a protection path and next hop index information of the protection path, wherein the type information of the protection path is a unicast type or a multicast type, and the next hop index information is NHI index information or multicast group index information. The layered protection unit in fig. 4 includes N =3 protection subunits, which correspond to the three-layer tunnels in fig. 10 from left to right, that is, the inner-layer tunnel, the second outer-layer tunnel, and the outermost-layer tunnel, respectively.
The specific content of each protection subunit is described below, and the protection subunit includes the following entries:
1. and the path state table is used for indicating the path forwarding state corresponding to the current layer tunnel. The path forwarding state is divided into two types, one type is a working path and the other type is a protection path, the working path or the protection path is represented by 0/1, and the arbitration result of the peripheral protection arbitration state machine can change the path state through a fast switching message, so that the method is efficient and fast.
2. A protection path attribute table, which contains the type of the protection path or the protection group type of the corresponding OAM, and a protection path next hop index; the protection type in the entry of the table entry can be divided into: a unicast type and a multicast type. The unicast type corresponds to the protection model of OAM 1; if the multicast type is the protection path information is the multicast group index.
3. A next-hop path attribute table, which contains a destination forwarding TYPE and a forwarding information index, and when the forwarding TYPE is NHI _ TYPE, indicates the mapping relationship of NHI _ x indexes corresponding to the hierarchical nesting of tunnels (namely NHI indexes of adjacent outer tunnels) to represent the hierarchical mapping topology; the encapsulation type information of the NHI _ x is also configured and obtained from the table entry.
The path state table and the protection path attribute table are implemented by an NHI path protection submodule (NHI PROT for short), and the next hop path attribute table is implemented by an NHI information submodule (NHI INFO).
Step 302: and determining a next hop processing unit of the message according to the type information of the next hop path, and sending the message and the second index information to the next hop processing unit, wherein the second index information is used for the next hop processing unit to inquire second routing information or perform tunnel encapsulation.
Based on the above various table entries, the following application scenarios are specifically described in the embodiments of the present application:
scene one: a first protection subunit in the hierarchical protection unit, such as NHI0 (corresponding to an inner tunnel) in fig. 4, receives a packet from the route forwarding unit and first index information (such as NHI _0 index), where the first index information includes first index sub information corresponding to a working path and second index sub information corresponding to a protection path; the NHI0 inquires the current path forwarding state of the target layer tunnel in a path state table, and if the current path forwarding state of the target layer tunnel is a working path, second routing information corresponding to the first indexing sub-information is searched in a next-hop path attribute table; and if the current path forwarding state of the target layer tunnel is a protection path, searching second routing information corresponding to the second index sub-information in a next-hop path attribute table.
In an embodiment, the type information of the next hop path is a unicast type and is an NHI type (e.g., NHI 1), and the second index information is NHI index information (e.g., NHI _1 index); the NHI0 determines that the next hop processing unit of the message is the mth protection subunit in the layered protection unit according to the fact that the type information of the next hop path is a unicast type and is an NHI type, wherein m is more than or equal to 1 and less than or equal to N, and N is the number of the protection subunits in the layered protection unit; NHI0 sends the message and the NHI index information (e.g. NHI _1 index) to the mth protection subunit (e.g. second protection subunit: NHI 1), and the mth protection subunit is configured to determine next hop routing information according to the NHI index information.
In another embodiment, the type information of the next hop path is a unicast type and is only a unicast type, and the second index information is NHI index information; determining a next hop processing unit of the message as a packaging unit according to the fact that the type information of the next hop path is a unicast type; and sending the message and the NHI index information to the packaging unit, wherein the packaging unit is used for carrying out corresponding tunnel packaging according to the NHI index information.
Scene two: a middle protection subunit in the hierarchical protection unit, such as NHI1 (corresponding to the second outer layer tunnel) in fig. 4, receives a message from NHI0 and first index information (such as NHI _1 index), where NHI1 queries a path state table, and if the state of the current layer tunnel is switched to a protection path, queries an entry corresponding to the NHI _1 index in a protection path attribute table according to the NHI _1 index, where a protection group type in the entry is configured as a multicast type, and allocates a multicast group index, that is, type information of a next hop path acquired by NHI1 is a multicast type, and the second index information is multicast group index information. The NHI1 determines the next hop processing unit of the message as a copy unit according to the multicast type of the type information of the next hop path; and sending the message and the multicast group index information to the replication unit, wherein the replication unit is used for determining the routing information of each multicast member in the multicast group according to the multicast group index information, replicating the message and then respectively sending the replicated message to each multicast member.
The technical scheme of the embodiment of the application aims at the problem that the support range of the superposition protection scene is limited, and when the next hop of different layers is flexibly mapped, the state of a protection group where the next hop path of the current layer is located is triggered and updated by an external fast switching message, so that a working path or a protection path is selected, and the mapping condition of the next layer and the encapsulation information acquisition of the message for the layer are determined according to the type of the protection path of the current layer. Particularly, aiming at the similar scenes of 1+1 protection and path 1 protection which are mutually overlapped, the multicast replication unit can be flexibly configured and hung to the protection group unit corresponding to the next hop of each layer, the replication requirement required by 1+1 protection is met, related matching design still can enable multicast members to be flexibly mapped to tunnel types of different layers, and the switching and efficiency improvement of paths of corresponding layers can be supported by fast switching messages in the layer design and complex scenes in a real sense.
The copy unit in fig. 4 can select the side-hang according to the configuration, and there are many copy modes supported, and the description will focus on the copy mode related to this patent. The replication unit searches multicast members according to the replication judgment determined by the preceding stage and the transmitted multicast group index and completes replication; the application requirements involved in the implementation of the replication unit are that a multicast member needs to perform 1. In combination with the present application, aiming at flexible hierarchical switching fast switching, the design of the table entry of the replication member not only needs to include the information NHI of the replication member, but also combines the network characteristics, and adds a multicast member TYPE flag to the same multicast GROUP, when the MC _ GROUP TYPE is NHI _ TYPE, the level of the tunnel carried by the multicast member can be represented, and the value of the NHI _ TYPE is NHI0, NHI1, NHI2, etc.
In addition, a next-hop separation encapsulation unit (for short, encapsulation unit) is also connected in series behind the layered protection unit, an input signal of the next-hop separation encapsulation unit is NHI _ x, and the input signal is directly generated by each layer of protection sub-units of the upstream layered protection unit. When NHI _ x =0, the packaging sub-module of the corresponding layer is not packaged, so that the serial connection model of the packaging information of each layer is directly determined by layered protection, and the control and management of upper-layer software are more convenient. The physical meaning represented by the encapsulation information of the encapsulation tables of different levels is the type of the tunnel carried by the path, which may be an MPLS tunnel, an IP tunnel, a tunnel of other encapsulation types, or the ARP encapsulation of the ordinary IP. The encapsulation table entry design is shown in fig. 9 and consists mainly of encapsulation type and encapsulation information. The type of package determines the choice of package information.
Fig. 4 is a flowchart illustrating a forwarding framework based on hierarchical protection according to an embodiment of the present application.
1. In the power-on initialization stage of the device, the replication unit may flexibly configure a side-hang point according to requirements, and side-hang the point to a route forwarding unit or an NHI path protection sub-module (NHI PROT for short) in a protection sub-unit in a hierarchical protection unit (as shown in fig. 6); in one example, the side hang point is shown in FIG. 4.
2. The logical adjacent downstream units of the route forwarding unit are: and one protection subunit or replication unit in the layered protection unit.
If the route forwarding unit determines that the destination type of the next hop path is the multicast type according to the routing table, the logic downstream unit is a replication unit; if the route forwarding unit determines that the destination TYPE of the next hop path is a unicast TYPE and is NHI _ TYPE according to the routing table, it determines which protection subunit of the hierarchical protection unit the logical downstream unit is specifically, according to NHI _ TYPE (specifically, NHI0, NHI1, and the like).
3. The logically adjacent downstream units of the hierarchical protection unit are: the next hop separates the packaged units.
One protection subunit of the hierarchical protection unit determines whether a logic downstream module is a next protection subunit or a next hop separation encapsulation unit through a DEST _ TYPE field in a next hop path attribute table (NHI INFO) in the module. Whether the internal part of the copying unit passes through or not needs to have the following three conditions:
(1) Initializing and configuring a copy unit (C module) and hanging an NHI path protection sub-module in the sub-unit;
(2) The forwarding state of the path of the entry corresponding to the path state table in the NHI path protection sub-module needs to point to a protection path;
(3) The protection path type of the corresponding entry in the protection path attribute table in the NHI path protection submodule is a multicast type.
4. The logic upstream unit of the next-hop separation packaging unit only has a layered protection unit, and the logic downstream unit of the next-hop separation packaging unit is a universal design module.
According to the technical scheme of the embodiment of the application, the flexibility of the item mapping of the forwarding table and the protection switching efficiency of the item mapping of the forwarding table under a multilayer tunnel nesting scene are improved, so that the design complexity of upper-layer software is simplified, and the execution efficiency is improved; the service coverage of the grouping equipment to various complex superposition protection scenes is expanded, and the market competitiveness and the industry level of a grouping forwarding chip are improved, so that the market competitiveness of wired grouping equipment and the expansion of customers are promoted.
The technical solutions of the embodiments of the present application are illustrated below with reference to specific application examples.
Application example 1
Aiming at the application requirements that the inner layer tunnel of the unicast path is a protection model 1, the secondary outer layer tunnel is a protection model 1+1, and the outermost layer tunnel is a protection model 1, the forwarding process of the message is described as follows.
1) At the beginning of the initialization of the forwarding device, the side hang point of the copy unit is flexibly configured according to the actual product application scenario, and since the protection model is 1+1, which needs to be implemented by the copy unit, the side hang point of the copy unit is configured in the second-level (layer) protection subunit in the layered protection unit.
2) After determining the side-hanging position of the copy unit, after receiving the message, determining that the TYPE information of the next hop path of the message is a unicast TYPE and NHI _ TYPE by checking the routing table, thereby obtaining NHI _ TYPE and NHI index. The current-level upper-layer software configures the NHI _ TYPE as an NHI0, an NHI _0 index corresponding to the working path and the protection path of the current layer, and a subsequent concatenation model corresponding to the working path and the protection path in advance, referring to fig. 11.
3) The message acquires NHI0 and a corresponding NHI _0 index through checking a routing table, and transmits the NHI0 and the corresponding NHI _0 index to the hierarchical protection subunit of the NHI 0;
further, the NHI0 determines whether to select a working path or an NHI0 index corresponding to the protection path according to the path state table of the current protection subunit; and inquiring a next hop attribute table of the protection subunit according to the selected NHI0 index so as to obtain the type of the next layer of tunnel, namely the NHI1 type and the NHI1 index A.
4) The message is then passed to the NHI1 hierarchical protection subunit. In this embodiment, the tunnel protection model corresponding to this layer is a 1+1 protection model, so the protection group type in the protection path attribute table entry corresponding to the configured NHI1 index a is configured as a multicast type, and a multicast group index B is allocated;
further, the NHI1 inquires a path state table of the current protection subunit, and if the state is switched to the protection path, the multicast type and the multicast group index B are obtained in the protection path attribute table according to the NHI1 index A;
further, entering a copying unit, copying 1+1 to generate 2 forwarding messages; the replication unit further confirms that the multicast member is of the NHI TYPE by inquiring the MC _ GROUP TYPE configured for the corresponding entry according to the multicast GROUP index B, and the member list of the multicast member table acquires the indexes of two NHI1 members, wherein the two NHI1 members respectively correspond to the two members; and querying the next hop attribute table of the subunit according to the two NHI1 indexes obtained by the copying unit, and further obtaining the type of the next layer of tunnel, namely the NHI2 type and the corresponding index.
5) The message is then passed to the NHI2 hierarchical protection subunit. The processing logic is the same as that of the processing of the above 3), and is not repeated.
6) The packet is then sent to the next-hop separation encapsulation unit to perform tunnel encapsulation on different forwarding paths corresponding to the packet (see fig. 8), and the lookup index of the tunnel encapsulation table of different layers is generated by the previous-level hierarchical protection unit (NHI 0/1/2), where if NHI _ x =0, it indicates that the current-layer encapsulation is invalid.
7) And after the message is transmitted and encapsulated, completing splicing and sending out, and finishing the process.
Application example two
For the application requirement that multicast members of a multicast path need 1 hierarchical tunnel protection, the following describes a packet forwarding process.
1) Firstly, at the beginning of device initialization, flexibly configuring the side hanging point of the replication unit according to the actual product application scene, and configuring the side hanging point of the replication unit behind the route forwarding unit because the replication of the multicast message of the multicast path needs to be realized by the replication unit.
2) The message obtains the multicast type and the multicast group index C by looking up the routing table.
3) And then entering a replication unit to acquire forwarding paths of different multicast members and replicate the message.
Specifically (see fig. 7): and inquiring the MC _ GROUP TYPE in the corresponding entry according to the acquired multicast GROUP index C to further confirm whether the multicast member is of the NHI TYPE, and acquiring the NHI _ TYPE (the value is NHI0/1/2 and the like) and the NHI _ x index. After the copy unit is determined according to the obtained NHI _ TYPE, the logically adjacent downstream unit is which level (layer) protection subunit in the layered protection unit.
4) After the message is copied, the message enters a certain level (layer) protection subunit in the layered protection unit for processing, and according to the NHI index acquired by the preceding stage, the related path state table, the protection path attribute table, the next hop attribute table query, and some related processing logics are performed, and the process is as in step 3 in the application example i, of 1.
5) The message encapsulation process is the same as 6) and 7) in application example one), which is not described in detail.
By the application example of the multicast group forwarding, the multicast replication members can be flexibly encapsulated into any layer of tunnel type, and meanwhile, the flexible fast switching under the protection model of the tunnel 1 of any layer where the multicast replication members are located can be realized, so that the realization of the layered design of the peripheral protection switching state machine is simplified, and the switching efficiency is improved.
Fig. 13 is a schematic structural composition diagram of a packet forwarding device provided in an embodiment of the present application, and as shown in fig. 13, the device includes: a receiving unit 1301, a searching unit 1302, and a sending unit 1303.
In an embodiment, the receiving unit 1301 is configured to receive a message;
a searching unit 1302, configured to search for first routing information corresponding to the packet, where the first routing information at least includes a first destination type field and a first destination information field, the first destination type field includes type information of a next hop path, and the first destination information field includes first index information corresponding to the type information;
a sending unit 1303, configured to determine a next hop processing unit of the packet according to the type information of the next hop path, and send the packet and the first index information to the next hop processing unit, where the first index information is used by the next hop processing unit to query the second routing information.
Further, the type information of the next hop path is a multicast type, and the first index information is multicast group index information; the searching unit 1302 is configured to determine, according to that the type information of the next hop path is a multicast type, that a next hop processing unit of the packet is a replication unit; and sending the message and the multicast group index information to the replication unit, wherein the replication unit is used for determining the routing information of each multicast member in the multicast group according to the multicast group index information, replicating the message and then respectively sending the replicated message to each multicast member.
Further, the type information of the next hop path is a unicast type and an NHI type, and the first index information is NHI index information; the searching unit 1302 is configured to determine, according to that the type information of the next hop path is a unicast type and an NHI type, that a next hop processing unit of the packet is an nth protection subunit in a layered protection unit, where N is greater than or equal to 1 and less than or equal to N, and N is the number of protection subunits in the layered protection unit, where N protection subunits in the layered protection unit have a corresponding relationship with N-layer tunnels; and sending the message and the NHI index information to the nth protection subunit, wherein the nth protection subunit is used for determining next hop routing information according to the NHI index information.
In another embodiment, the receiving unit 1301 is configured to receive a packet and first index information;
a searching unit 1302, configured to search for second routing information corresponding to the first index information, where the second routing information at least includes a second destination type field and a second destination information field, the second destination type field includes type information of a next hop path, and the second destination information field includes second index information corresponding to the type information;
a sending unit 1303, configured to determine a next hop processing unit of the packet according to the type information of the next hop path, and send the packet and the second index information to the next hop processing unit, where the second index information is used by the next hop processing unit to query the second routing information or perform tunnel encapsulation.
Further, the first index information comprises first index sub-information corresponding to the working path and second index sub-information corresponding to the protection path; the searching unit 1302 is configured to query a current path forwarding state of a target layer tunnel, and if the current path forwarding state of the target layer tunnel is a working path, search for second routing information corresponding to the first index sub information; and if the current path forwarding state of the target layer tunnel is a protection path, searching second routing information corresponding to the second index sub-information.
Further, the type information of the next hop path is a unicast type and an NHI type, and the second index information is NHI index information; the searching unit 1302 is configured to determine, according to that the type information of the next hop path is a unicast type and an NHI type, that a next hop processing unit of the packet is an mth protection subunit in a layered protection unit, where m is greater than or equal to 1 and less than or equal to N, and N is the number of protection subunits in the layered protection unit, where N protection subunits in the layered protection unit have a corresponding relationship with N layers of tunnels;
the sending unit 1303 is configured to send the packet and the NHI index information to the mth protecting subunit, where the mth protecting subunit is configured to determine next hop routing information according to the NHI index information.
Further, the protection subunit is configured to protect the tunnel of the corresponding layer based on a path state table and a protection path attribute table, wherein,
the path state table comprises a path forwarding state corresponding to the tunnel, and the path forwarding state is a working path or a protection path;
the protection path attribute table comprises type information of a protection path and next hop index information of the protection path, wherein the type information of the protection path is a unicast type or a multicast type, and the next hop index information is NHI index information or multicast group index information.
Further, the type information of the next hop path is a unicast type and is a unicast type, and the second index information is NHI index information; the searching unit 1302 is configured to determine, according to that the type information of the next hop path is a unicast type, that a next hop processing unit of the packet is an encapsulating unit;
the sending unit 1303 is configured to send the message and the NHI index information to the encapsulating unit, where the encapsulating unit is configured to perform corresponding tunnel encapsulation according to the NHI index information.
Further, the type information of the next hop path is a multicast type, and the second index information is multicast group index information; the searching unit 1302 is configured to determine, according to that the type information of the next hop path is a multicast type, that a next hop processing unit of the packet is a replication unit; the sending unit 1303 is configured to send the packet and the multicast group index information to the replication unit, where the replication unit is configured to determine routing information of each multicast member in a multicast group according to the multicast group index information, replicate the packet, and then send the replicated packet to each multicast member.
It should be understood by those skilled in the art that the related description of the foregoing message forwarding apparatus in the embodiment of the present application may be understood by referring to the related description of the message forwarding method in the embodiment of the present application.
Fig. 14 is a schematic structural diagram of a forwarding device 600 according to an embodiment of the present application. The forwarding device 600 shown in fig. 14 includes a processor 610, and the processor 610 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
Optionally, as shown in fig. 14, the forwarding device 600 may further include a memory 620. From the memory 620, the processor 610 may call and run a computer program to implement the method in the embodiment of the present application.
The memory 620 may be a separate device from the processor 610, or may be integrated into the processor 610.
Optionally, as shown in fig. 14, the forwarding device 600 may further include a transceiver 630, and the processor 610 may control the transceiver 630 to communicate with other devices, and specifically, may transmit information or data to the other devices or receive information or data transmitted by the other devices.
The transceiver 630 may include a transmitter and a receiver, among others. The transceiver 630 may further include one or more antennas.
Optionally, the forwarding device 600 may specifically be a network device in the embodiment of the present application, and the forwarding device 600 may implement a corresponding process implemented by the network device in each method in the embodiment of the present application, which is not described herein again for brevity.
Optionally, the forwarding device 600 may specifically be a mobile terminal/terminal device in this embodiment, and the forwarding device 600 may implement a corresponding process implemented by the mobile terminal/terminal device in each method in this embodiment, which is not described herein again for brevity.
It should be understood that the processor of the embodiments of the present application may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It will be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), double Data Rate Synchronous Dynamic random access memory (DDR SDRAM), enhanced Synchronous SDRAM (ESDRAM), synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
It should be understood that the above memories are exemplary but not limiting illustrations, for example, the memories in the embodiments of the present application may also be Static Random Access Memory (SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (enhanced SDRAM, ESDRAM), synchronous Link DRAM (SLDRAM), direct Rambus RAM (DR RAM), and the like. That is, the memory in the embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
The embodiment of the application also provides a computer readable storage medium for storing the computer program.
Optionally, the computer-readable storage medium may be applied to the network device in the embodiment of the present application, and the computer program enables the computer to execute the corresponding process implemented by the network device in each method in the embodiment of the present application, which is not described herein again for brevity.
Optionally, the computer-readable storage medium may be applied to the mobile terminal/terminal device in the embodiment of the present application, and the computer program enables the computer to execute the corresponding process implemented by the mobile terminal/terminal device in each method in the embodiment of the present application, which is not described herein again for brevity.
Embodiments of the present application also provide a computer program product comprising computer program instructions.
Optionally, the computer program product may be applied to the network device in the embodiment of the present application, and the computer program instruction enables the computer to execute a corresponding process implemented by the network device in each method in the embodiment of the present application, which is not described herein again for brevity.
Optionally, the computer program product may be applied to the mobile terminal/terminal device in the embodiment of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the mobile terminal/terminal device in the methods in the embodiment of the present application, which are not described herein again for brevity.
The embodiment of the application also provides a computer program.
Optionally, the computer program may be applied to the network device in the embodiment of the present application, and when the computer program runs on a computer, the computer is enabled to execute the corresponding process implemented by the network device in each method in the embodiment of the present application, and for brevity, details are not described here again.
Optionally, the computer program may be applied to the mobile terminal/terminal device in the embodiment of the present application, and when the computer program runs on a computer, the computer is enabled to execute the corresponding process implemented by the mobile terminal/terminal device in each method in the embodiment of the present application, which is not described herein again for brevity.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
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 application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including 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 application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. A message forwarding method is characterized in that the method comprises the following steps:
after a message is received, searching first routing information corresponding to the message, wherein the first routing information at least comprises a first destination type field and a first destination information field, the first destination type field comprises type information of a next hop path, and the first destination information field comprises first index information corresponding to the type information;
and determining a next hop processing unit of the message according to the type information of the next hop path, and sending the message and the first index information to the next hop processing unit, wherein the first index information is used for the next hop processing unit to inquire second routing information.
2. The method according to claim 1, wherein the type information of the next hop path is a multicast type, and the first index information is multicast group index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the first index information to the next hop processing unit, where the first index information is used by the next hop processing unit to query second routing information, and includes:
determining a next hop processing unit of the message as a copy unit according to the type information of the next hop path as a multicast type;
and sending the message and the multicast group index information to the replication unit, wherein the replication unit is used for determining the routing information of each multicast member in the multicast group according to the multicast group index information, replicating the message and then respectively sending the replicated message to each multicast member.
3. The method of claim 1, wherein the type information of the next hop path is a unicast type and identifies an NHI type for the next hop, and the first index information is NHI index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the first index information to the next hop processing unit, where the first index information is used by the next hop processing unit to query second routing information, and includes:
determining that a next hop processing unit of the message is an nth protection subunit in a layered protection unit according to the fact that the type information of the next hop path is a unicast type and an NHI type, wherein N is more than or equal to 1 and less than or equal to N, and N is the number of the protection subunits in the layered protection unit, wherein the N protection subunits in the layered protection unit have a corresponding relationship with N layers of tunnels;
and sending the message and the NHI index information to the nth protection subunit, wherein the nth protection subunit is used for determining next hop routing information according to the NHI index information.
4. A message forwarding method is characterized in that the method comprises the following steps:
after receiving a message and first index information, searching second routing information corresponding to the first index information, wherein the second routing information at least comprises a second target type field and a second target information field, the second target type field comprises type information of a next hop path, and the second target information field comprises second index information corresponding to the type information;
and determining a next hop processing unit of the message according to the type information of the next hop path, and sending the message and the second index information to the next hop processing unit, wherein the second index information is used for the next hop processing unit to inquire second routing information or perform tunnel encapsulation.
5. The method according to claim 4, wherein after receiving the packet and the first index information, searching for the second routing information corresponding to the first index information comprises:
receiving a message and first index information, wherein the first index information comprises first index sub information corresponding to a working path and second index sub information corresponding to a protection path;
inquiring the current path forwarding state of the target layer tunnel, and searching second routing information corresponding to the first indexing sub-information if the current path forwarding state of the target layer tunnel is a working path; and if the current path forwarding state of the target layer tunnel is a protection path, searching second routing information corresponding to the second index sub-information.
6. The method of claim 5, wherein the type information of the next hop path is a unicast type and identifies an NHI type for the next hop, and the second index information is NHI index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the second index information to the next hop processing unit, where the second index information is used for the next hop processing unit to query second routing information, and includes:
determining that a next hop processing unit of the message is an mth protection subunit in a layered protection unit according to the fact that the type information of the next hop path is a unicast type and an NHI type, wherein m is more than or equal to 1 and less than or equal to N, N is the number of the protection subunits in the layered protection unit, and N protection subunits in the layered protection unit have a corresponding relation with N layers of tunnels;
and sending the message and the NHI index information to the mth protection subunit, where the mth protection subunit is configured to determine next hop routing information according to the NHI index information.
7. The method of claim 6, wherein the protection subunit is configured to protect the tunnel of the corresponding layer based on a path state table and a protection path attribute table, wherein,
the path state table comprises a path forwarding state corresponding to the tunnel, and the path forwarding state is a working path or a protection path;
the protection path attribute table comprises type information of a protection path and next hop index information of the protection path, wherein the type information of the protection path is a unicast type or a multicast type, and the next hop index information is NHI index information or multicast group index information.
8. The method of claim 5, wherein the type information of the next hop path is a unicast type and is a unicast type, and the second index information is NHI index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the second index information to the next hop processing unit, where the second index information is used for the next hop processing unit to query second routing information, and includes:
determining a next hop processing unit of the message as a packaging unit according to the fact that the type information of the next hop path is a unicast type;
and sending the message and the NHI index information to the packaging unit, wherein the packaging unit is used for carrying out corresponding tunnel packaging according to the NHI index information.
9. The method according to claim 4, wherein the type information of the next hop path is a multicast type, and the second index information is multicast group index information;
the determining, according to the type information of the next hop path, a next hop processing unit of the packet, and sending the packet and the second index information to the next hop processing unit, where the second index information is used for the next hop processing unit to query second routing information, and includes:
determining a next hop processing unit of the message as a copy unit according to the type information of the next hop path as a multicast type;
and sending the message and the multicast group index information to the replication unit, wherein the replication unit is used for determining the routing information of each multicast member in the multicast group according to the multicast group index information, replicating the message and then sending the replicated message to each multicast member respectively.
10. A message forwarding apparatus, the apparatus comprising:
a receiving unit, configured to receive a packet;
a searching unit, configured to search for first routing information corresponding to the packet, where the first routing information at least includes a first destination type field and a first destination information field, the first destination type field includes type information of a next hop path, and the first destination information field includes first index information corresponding to the type information;
a sending unit, configured to determine a next hop processing unit of the packet according to the type information of the next hop path, and send the packet and the first index information to the next hop processing unit, where the first index information is used for the next hop processing unit to query the second routing information.
11. A message forwarding apparatus, the apparatus comprising:
the receiving unit is used for receiving the message and the first index information;
a searching unit, configured to search for second routing information corresponding to the first index information, where the second routing information at least includes a second destination type field and a second destination information field, the second destination type field includes type information of a next hop path, and the second destination information field includes second index information corresponding to the type information;
a sending unit, configured to determine a next hop processing unit of the packet according to the type information of the next hop path, and send the packet and the second index information to the next hop processing unit, where the second index information is used by the next hop processing unit to query the second routing information or perform tunnel encapsulation.
12. A computer-readable storage medium for storing a computer program which causes a computer to perform the method of any one of claims 1 to 3, or the method of any one of claims 4 to 9.
13. A forwarding device, comprising: a processor and a memory for storing a computer program, the processor being configured to invoke and execute the computer program stored in the memory, to perform the method of any of claims 1 to 3, or to perform the method of any of claims 4 to 9.
CN201811528819.XA 2018-12-13 2018-12-13 Message forwarding method and device and forwarding equipment Active CN111327535B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811528819.XA CN111327535B (en) 2018-12-13 2018-12-13 Message forwarding method and device and forwarding equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811528819.XA CN111327535B (en) 2018-12-13 2018-12-13 Message forwarding method and device and forwarding equipment

Publications (2)

Publication Number Publication Date
CN111327535A CN111327535A (en) 2020-06-23
CN111327535B true CN111327535B (en) 2023-03-24

Family

ID=71168473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811528819.XA Active CN111327535B (en) 2018-12-13 2018-12-13 Message forwarding method and device and forwarding equipment

Country Status (1)

Country Link
CN (1) CN111327535B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102217253A (en) * 2011-05-05 2011-10-12 华为技术有限公司 Message forwarding method, equipment and network device
CN108234318A (en) * 2018-03-20 2018-06-29 新华三技术有限公司 The choosing method and device of message forwarding tunnel

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10412009B2 (en) * 2016-03-10 2019-09-10 Arista Networks, Inc. Next hop groups
US10284472B2 (en) * 2017-01-24 2019-05-07 Cisco Technology, Inc. Dynamic and compressed trie for use in route lookup

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102217253A (en) * 2011-05-05 2011-10-12 华为技术有限公司 Message forwarding method, equipment and network device
CN108234318A (en) * 2018-03-20 2018-06-29 新华三技术有限公司 The choosing method and device of message forwarding tunnel

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HALO: Hop-by-Hop Adaptive Link-State Optimal Routing;Nithin Michael 等;《 IEEE/ACM Transactions on Networking 》;20140910;第23卷(第6期);第1862-1875页 *
基于C3芯片的业务转发微码设计和实现;高揆;《中国优秀硕士学位论文全文数据库 信息科技辑》;20150415;第I136-460页 *

Also Published As

Publication number Publication date
CN111327535A (en) 2020-06-23

Similar Documents

Publication Publication Date Title
CN109873760B (en) Method and device for processing route, and method and device for data transmission
US11374848B2 (en) Explicit routing with network function encoding
EP3471347B1 (en) Vxlan packet processing method, device and system
JP7039707B2 (en) Methods and nodes for packet transmission in networks
EP2761827B1 (en) Incremental deployment of mrt based ipfrr
CN105453491A (en) Extended remote LFA fast reroute
JP2020501444A (en) Loop fault handling method and switch
CN113794637B (en) SID list processing method and device
CN106899430B (en) Traffic forwarding processing method and device
CN108322338B (en) Broadcast suppression method and VTEP device
CN112511418A (en) Message indicating method, device, equipment and storage medium
CN107404436A (en) Communication means and device for virtual expansible LAN
CN107317752B (en) Method and device for forwarding data message
CN109587059B (en) SR-BE inner layer tunnel label configuration method, device and communication system
US20170338976A1 (en) Method for Obtaining Port Path and Apparatus
CN111147372B (en) Downlink message sending and forwarding method and device
EP2999174B1 (en) Topology structure discovery method and device
CN111614505B (en) Message processing method and gateway equipment
KR20220047854A (en) Packet forwarding method, apparatus and system in SRS network
CN103780470A (en) IS-IS information synchronization method and device
CN105812257A (en) Business chain router management system and use method thereof
CN111327535B (en) Message forwarding method and device and forwarding equipment
JP2023511257A (en) PACKET TRANSMISSION METHOD AND APPARATUS, AND STORAGE MEDIUM
CN117319343A (en) Policy routing implementation method, device and storage medium
CN113973072B (en) Message sending method, device and system

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