CN115460137A - Method, device and equipment for generating forwarding table item - Google Patents

Method, device and equipment for generating forwarding table item Download PDF

Info

Publication number
CN115460137A
CN115460137A CN202110547033.8A CN202110547033A CN115460137A CN 115460137 A CN115460137 A CN 115460137A CN 202110547033 A CN202110547033 A CN 202110547033A CN 115460137 A CN115460137 A CN 115460137A
Authority
CN
China
Prior art keywords
network device
network
forwarding
forwarding information
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110547033.8A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110547033.8A priority Critical patent/CN115460137A/en
Publication of CN115460137A publication Critical patent/CN115460137A/en
Pending legal-status Critical Current

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/54Organization of routing tables
    • 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]

Landscapes

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

Abstract

The embodiment of the application discloses a method, a device and equipment for generating a forwarding table item, wherein a first network device in a first network is connected with a second network through a network device set, the network device set at least comprises the second network device, and the network device set is a device for connecting the first network and the second network. When the first network device determines that forwarding paths corresponding to multiple routes respectively pass through the network device set, association identifiers are distributed for the multiple routes, multiple first forwarding table entries corresponding to the multiple routes are generated, the multiple routes correspond to the same first forwarding information, the first forwarding information comprises segment identifiers of a first outgoing interface and a second network device, and a matching item in each first forwarding table entry in the multiple first forwarding table entries is associated to the first forwarding information through the association identifiers. Therefore, multiple routes passing through the same network equipment generate multiple forwarding table entries with the same forwarding information, and rapid routing convergence can be realized in a next-hop separation convergence mode.

Description

Method, device and equipment for generating forwarding table item
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a device for generating a forwarding table entry.
Background
An Interior Gateway Protocol (IGP) is a routing Protocol used inside an Autonomous System (AS). When routing based on IGP, usually, shortest Path First (SPF) Path computation is performed according to a Link State DataBase (LSDB), and the LSDB is used to describe the network topology, that is, the Path computation result of IGP is strongly related to the network topology.
Currently, when a network topology changes, it is usually necessary to let all devices in the whole network sense the change (that is, the whole network updates the LSDB based on the change), and perform an SPF calculation based on the updated LSDB, so as to update next hop information of each prefix. However, in some large-scale networks, the situation that the network topology may change is very complex, and if global routing convergence is performed for each slight change of the network topology, the problems of large network load and long routing convergence time are caused, and the routing convergence performance is affected.
Based on this, it is desirable to provide a method for generating a forwarding table entry, which can quickly implement route convergence when a network changes, save network resources, and improve the route convergence performance.
Disclosure of Invention
Based on this, embodiments of the present application provide a method, an apparatus, and a device for generating a forwarding table entry, so as to implement simple and fast route convergence, and improve the route convergence performance.
In a first aspect, an embodiment of the present application provides a method for generating a forwarding entry, which is applied to a first network device, where the first network device in a first network is connected to a second network through a network device set, the network device set includes one or more network devices, and the network device set is a device that connects the first network and the second network, and the method may include: when the first network equipment determines that forwarding paths corresponding to a plurality of routes respectively pass through the network equipment set, distributing associated identifiers for the plurality of routes, wherein the plurality of routes correspond to the same first forwarding information, and the first forwarding information comprises a first outgoing interface and a segment identifier of second network equipment in the network equipment set; thus, the first network device generates a plurality of first forwarding entries corresponding to the plurality of routes, and a matching entry in each of the plurality of first forwarding entries is associated with the first forwarding information through the association identifier. Wherein, the matching item can be a routing prefix or an MPLS label. Therefore, a plurality of routes passing through the same network equipment generate a plurality of forwarding table entries with the same forwarding information, and only one piece of forwarding information needs to be stored in a forwarding plane, so that the process of generating the forwarding table entries is simple and quick; moreover, when the network topology changes, it is not necessary to perform global routing convergence, and it is sufficient to perform next-hop separation convergence, for example, when a first path from the first network device to the second network device via the first output interface fails, the first network device only needs to update forwarding information in the multiple forwarding entries, and does not need to update each matching entry, so that simple and fast routing convergence can be achieved in a next-hop separation convergence manner, and the performance of IGP routing convergence is improved.
The method provided by the embodiment of the application can be applied to a Segment Routing (in english: segment Routing over Internet Protocol version 6, srv 6) scenario or an SR multi-Protocol Label Switching (in english: multiprotocol Label Switching, MPLS for short) scenario based on the sixth version of Internet Protocol. If the method is applied to the SRv6 scenario, the SID of the second network device may be an Internet Protocol version 6 (IPv 6) address of the second network device. If applied to the SR MPLS scenario, the SID of the second network device may be an MPLS label of the second network device.
The multiple routes in the embodiment of the present application may be all IGP routes.
As an example, the first network is a network between Provider Edge (PE) devices and core (P) devices, and the second network is a network between P devices.
As another example, the first network is a network between P, and the second network is a network between a P device and a PE device.
In some scenarios, the P device may be an Area Border Router (ABR).
It can be understood that, in the embodiment of the present application, one copy of the first forwarding information is stored in the storage module of the forwarding plane of the first network device. Therefore, the storage resources can be effectively saved.
In some possible implementations, the method may further include: a first network device receives a first message, wherein the destination address of the first message is matched with one matching item in a plurality of first forwarding table items; then, the first network device may obtain the first forwarding information according to the first association identifier in the first forwarding table entries; therefore, the first network device processes the first message according to the segment identifier in the first forwarding information to obtain a second message, and sends the second message to the second network device from the first output interface in the first forwarding information. Therefore, on the basis of the forwarding table generated by the method provided by the embodiment of the application, the first network device can accurately send the received message to the devices in the network device set.
As an example, when the segment identifier of the second network device is an IPv6 address, the first network device processes the first packet according to the segment identifier in the first forwarding information, and obtains the second packet, which may include: and the first network equipment modifies the content of the destination address field of the first message into the segment identifier of the second network equipment to obtain the second message. Therefore, in an SRv6 scenario, the forwarding table generated by the method provided in the embodiment of the present application can effectively guide the processing of the received packet, so as to prepare for accurately forwarding the processed packet.
As another example, when the segment identifier of the second network device is an MPLS label, the first network device processes the first packet according to the segment identifier in the first forwarding information to obtain a second packet, which may also include: and the first network equipment adds the segment identifier of the second network equipment in the label stack of the first message to obtain the second message. Therefore, in an SR MPLS scenario, the forwarding table generated by the method provided in the embodiment of the present application can effectively guide the processing of the received packet, so that preparation is provided for accurately forwarding the processed packet.
In some possible implementations, the method may further include: when determining that a first path reaching the second network device through the first outgoing interface fails, the first network device obtains a second outgoing interface, and a second path reaching the second network device through the second outgoing interface is reachable by the network device; thereby, the first network device updates the first forwarding information, and the updated first forwarding information includes the segment identifier of the second network device and the second outgoing interface. It can be seen that, when the network topology changes, it is not necessary to perform global routing convergence, and it is sufficient to perform next-hop separation convergence, for example, when the network device set only includes one network device (i.e., a second network device), a first network device fails on a first path that reaches the second network device through the first outgoing interface, and the first network device only needs to update forwarding information in multiple forwarding entries, and does not need to update each routing prefix.
In other possible implementations, when the set of network devices includes the second network device and the third network device, the method may further include: when determining that a first path reaching the second network device through the first outgoing interface fails, the first network device obtains a second outgoing interface, and a second path reaching the third network device through the second outgoing interface is reachable by the first network device; thereby, the first network device updates the first forwarding information, which includes the segment identifier of the third network device and the second outgoing interface. It can be seen that, when a network topology changes, global routing convergence is not required, and next-hop separation convergence is performed, for example, when a network device set includes multiple network devices (for example, a second network device and a third network device), a first network device fails on a first path that reaches the second network device through a first egress interface, and the first network device only needs to update forwarding information in multiple forwarding table entries, and does not need to update prefixes of each route.
In this implementation, as an example, the second network device and the third network device may have the same segment identification, e.g., the same segment identification is Anycast SID. As another example, the segment identification of the second network device and the segment identification of the third network device may be different. It should be noted that, whether segment identifiers of devices in the network device set are the same or not does not affect the implementation and achieved technical effects of the embodiments of the present application.
After determining that the first path to the second network device via the first egress interface fails and updating the forwarding table, the method may further include: the first network equipment receives a third message, and the destination address of the third message is matched with one matching item in the updated plurality of first forwarding table items; then, the first network device obtains the updated first forwarding information according to the association identifier; thus, the first network device processes the third packet according to the segment identifier in the updated first forwarding information to obtain a fourth packet, and sends the fourth packet from the second egress interface in the updated first forwarding information. Therefore, when the network topology changes (for example, a path fault), even if the network structure is very complex, the method provided by the embodiment of the present application can quickly and simply update the generated forwarding table entry, so that the first network device can timely and accurately send the received packet to the devices in the network device set, so that the forwarding of the packet is not interrupted for a long time, fast route convergence is achieved, and the service continuity is improved.
In a second aspect, an embodiment of the present application further provides an apparatus for generating a forwarding entry, where a first network device in a first network is connected to a second network through a network device set, where the network device set includes one or more network devices, and the network device set is a device that connects the first network and the second network, and the apparatus is applied to the first network device, and the apparatus may include: the device comprises a determining unit, an allocating unit and a generating unit. The determining unit is configured to determine that forwarding paths corresponding to multiple routes respectively pass through the network device set; the distribution unit is configured to distribute association identifiers for the multiple routes, where the multiple routes correspond to the same first forwarding information, and the first forwarding information includes a first outgoing interface and a segment identifier of a second network device in the network device set; the generating unit is configured to generate a plurality of first forwarding table entries corresponding to the plurality of routes, where a matching entry in each of the plurality of first forwarding table entries is associated with the first forwarding information through the association identifier.
Wherein the segment identifier comprises a sixth version of an internet protocol, IPv6, address or a multiprotocol label switching, MPLS, label.
In some possible implementations, the apparatus may further include: the device comprises a first receiving unit, a first acquiring unit, a first processing unit and a first sending unit. The first receiving unit is used for receiving a first message, and the destination address of the first message is matched with one matching item in the plurality of first forwarding table items; the first obtaining unit is configured to obtain the first forwarding information according to the first association identifier in the plurality of first forwarding table entries; the first processing unit is used for processing the first message according to the segment identifier in the first forwarding information to obtain a second message; the first sending unit is configured to send the second packet to the second network device from the first egress interface in the first forwarding information.
As an example, when the segment identifier of the second network device is an IPv6 address, the first processing unit is specifically configured to: and modifying the content of the destination address field of the first message into the segment identifier of the second network equipment to obtain the second message.
As another example, when the segment identifier of the second network device is an MPLS label, the first processing unit is specifically configured to: and adding the segment identifier of the second network equipment in the label stack of the first message to obtain the second message.
In some possible implementations, the apparatus further includes: a second acquisition unit and an update unit. The second obtaining unit is configured to obtain a second egress interface when it is determined that a first path reaching the second network device through the first egress interface fails, where a second path reaching the second network device through the second egress interface is reachable by the first network device; the updating unit is configured to update the first forwarding information, where the updated first forwarding information includes the segment identifier of the second network device and the second outgoing interface.
In other possible implementations, when the set of network devices further includes a third network device, the apparatus further includes: a second acquisition unit and an update unit. The second obtaining unit is configured to obtain a second egress interface when it is determined that a first path reaching the second network device through the first egress interface fails, where the second path reaching the third network device through the second egress interface is reachable by the first network device; the updating unit is configured to update the first forwarding information, where the updated first forwarding information includes the segment identifier of the third network device and the second outgoing interface.
In this implementation, in one case, the second network device and the third network device have the same segment identifier, for example, the same segment identifier is Anycast SID. In another case, the segment identifier of the second network device is different from the segment identifier of the third network device.
In some possible implementations, the apparatus further includes: the device comprises a second receiving unit, a third acquiring unit, a second processing unit and a second sending unit. The second receiving unit is configured to receive a third packet, where a destination address of the third packet is matched with one matching entry in the plurality of second forwarding entries; the third obtaining unit is used for obtaining the updated first forwarding information according to the associated identifier; the second processing unit is used for processing the third message according to the segment identifier in the updated first forwarding information to obtain a fourth message; the second sending unit is configured to send the fourth packet from the second egress interface in the updated first forwarding information.
Wherein a copy of the first forwarding information is stored in a storage module of a forwarding plane of the first network device.
And the plurality of routes are all Interior Gateway Protocol (IGP) routes.
As an example, the first network is a network between an operator edge PE device and a core P device, and the second network is a network between P devices.
As another example, the first network is a network between P, and the second network is a network between a P device and a PE device.
For example, the P device may be an area border router ABR.
It should be noted that the units with the same name in the apparatus for generating a forwarding table entry may be implemented by one or more units with the same function, for example, the first receiving unit and the second receiving unit may be implemented by one receiving unit with a receiving function, or may be implemented by two independent receiving units with receiving functions, which is not limited in this embodiment of the present application. Units with different names in the forwarding table entry generating device, such as the first receiving unit and the second receiving unit, may be merged or split according to an actual design as long as implementation of the embodiment of the present application is not affected.
It should be noted that, the apparatus for generating a forwarding entry provided in the second aspect corresponds to the method provided in the first aspect, and for specific implementation and achieved effects, refer to the related description of the method shown in the first aspect.
In a third aspect, an embodiment of the present application further provides a network device, including a processor and a memory, where the memory is used to store a computer program or an instruction, and the processor is used to call the computer program or the instruction stored in the memory, so that the network device executes the method provided in the first aspect.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the method provided in the first aspect.
In a fifth aspect, this application further provides a computer program product, which includes a program and when the program runs on a processor, implements the method provided in the first aspect.
In a sixth aspect, an embodiment of the present application further provides a chip, which includes a processor and an interface circuit, where the interface circuit is configured to receive a code instruction and transmit the code instruction to the processor; the processor is configured to execute the code instructions to perform the method provided by the first aspect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a schematic structural diagram of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of another applicable scenario provided in the embodiment of the present application;
fig. 3a is a schematic diagram of a data format of a forwarding entry according to an embodiment of the present application;
fig. 3b is a schematic diagram of another data format of a forwarding entry according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method 100 for generating a forwarding entry according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of another applicable scenario provided in the embodiment of the present application;
fig. 6a is a schematic diagram of a format of a message 1 according to an embodiment of the present application;
fig. 6b is a schematic diagram of a format of a message 2 according to an embodiment of the present application;
fig. 6c is a schematic diagram of a format of a message 3 according to an embodiment of the present application;
fig. 7a is a schematic diagram of a 2' format of a message according to an embodiment of the present application;
fig. 7b is a schematic diagram of a message 3' format according to an embodiment of the present application;
fig. 8a is a schematic diagram of an MPLS label stack of a packet 1 according to an embodiment of the present application;
fig. 8b is a schematic diagram of an MPLS label stack of a message 2 according to the embodiment of the present application;
fig. 8c is a schematic diagram of an MPLS label stack of a packet 3 according to an embodiment of the present application;
fig. 9 is a flowchart illustrating another method 200 for generating a forwarding entry according to an embodiment of the present application;
fig. 10 is a flowchart illustrating a further method 300 for generating a forwarding entry according to an embodiment of the present application;
fig. 11 is a schematic diagram of a packet forwarding process provided in an embodiment of the present application;
fig. 12 is a schematic structural diagram of an apparatus 1200 for generating a forwarding entry according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a network device 1300 according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings. The network architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation on the technical solution provided in the embodiment of the present application, and as a person of ordinary skill in the art knows that along with the evolution of the network architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
Ordinal numbers such as "1", "2", "3", "first", "second", and "third" in the embodiments of the present application are used to distinguish a plurality of objects, and are not used to limit the order of the plurality of objects.
Reference to "a and/or B" in the examples of this application should be understood to include the following: only a, only B, or both a and B.
Generally, the Internet is divided into a plurality of ases, and an AS includes all Internet Protocol (IP) networks and network devices under the jurisdiction of one or more entities. An AS uses IGP to select routes internally and implements a common routing strategy for the Internet. When routing based on IGP, SPF calculation is usually performed based on the LSDB of the network, and the optimal path to the destination network device is selected. The LSDB is used to describe the network topology, and is a "complete view" of the network.
Based on IGP routing is strongly related to network topology, when the network topology changes, network equipment of the whole network updates LSDB based on topology change, and performs SPF (shortest path first) routing calculation based on the updated LSDB, so that next hop information of each prefix is updated to update a routing forwarding table. That is, even if the network topology within the AS changes slightly, each network device needs to update the entire route forwarding table to implement global route convergence, which results in problems of large network load and long route convergence time. Especially for some large-scale networks, the network topology may have various changes, and the next hop information in the routing forwarding table corresponding to the network topology with slight differences may be inconsistent, so that each IP prefix needs to update the routing forwarding table, which results in an excessively long convergence time and poor performance of IGP global routing convergence.
Based on this, an embodiment of the present application provides a method for generating a forwarding entry, where two networks are connected through a device in a network device set, the network device set includes edge devices of the two networks, the network device set at least includes a second network device, and one of the two networks is connected to the other network through a first network device. When the first network device determines that forwarding paths corresponding to multiple routes respectively pass through second network devices of the network device set, the multiple routes can be considered to correspond to the same forwarding information, and a common associated identifier is allocated to the multiple routes, wherein the same forwarding information comprises segment identifiers and first outgoing interfaces of the second network devices; then, the first network device may generate a plurality of forwarding entries corresponding to the plurality of routes, and a matching entry in each of the plurality of forwarding entries is associated with the forwarding information through the association identifier. Wherein the matching item may be a routing prefix or an MPLS label. Therefore, a plurality of routes passing through the same network equipment generate a plurality of forwarding table entries with the same forwarding information, and only one piece of forwarding information needs to be stored in a forwarding plane, so that the process of generating the forwarding table entries is simple and quick; moreover, when the network topology changes, it is not necessary to perform global routing convergence, and it is sufficient to perform next-hop separation convergence, for example, when a first path from the first network device to the second network device via the first output interface fails, the first network device only needs to update forwarding information in the multiple forwarding entries, and does not need to update each matching entry, so that simple and fast routing convergence can be achieved in a next-hop separation convergence manner, and the performance of IGP routing convergence is improved.
For example, the embodiment of the present application may be applied to a scenario as shown in fig. 1, which may include, for example: guangdong operator Edge (PE for short) device 111, guangdong PE device 112, guangzhou core device 121, shenyang PE device 211, shenyang PE device 212, and Shenyang core device 221. The guangdong PE device 111, the guangdong PE device 112, and the guangzhou core device 121 belong to the network 10, the guangzhou core device 121 and the sheng yang core device 221 belong to the network 12, and the sheng yang PE device 211, the sheng yang PE device 212, and the sheng yang core device 221 belong to the network 20. Then, the cantonese core device 121 belongs to a device in the network device set 1 connecting the network 10 and the network 11, and the shenyang core device 221 belongs to a device in the network set 2 connecting the network 12 and the network 20. The guangdong core device 121 is connected to the sheng yang core device 221, the guangdong PE device 111 and the guangdong PE device 112 in the network 10 are respectively connected to the guangzhou core device 121, and the sheng yang PE device 211 and the sheng yang PE device 212 in the network 20 are respectively connected to the sheng yang core device 221. It should be noted that in the scenario shown in fig. 1, all network devices belong to the same AS, for example, belong to AS 9808. Each core device may be connected to multiple PE devices, and in this embodiment, one core device is connected to two PE devices in a local area as an example for description. The AS may include network devices of multiple regions, for example, the scenario may further include: the beijing PE device 311, the beijing PE device 312, and the beijing core device 321 are described in the present embodiment by taking two areas of the guangzhou area and shenyang area as examples in the scene.
Taking the scenario shown in fig. 1 as an example, and taking a matching item in a forwarding table entry as a routing prefix as an example, a method for generating a forwarding table entry provided in the embodiment of the present application is introduced.
As an example, sheng yang PE device 211, sheng yang PE device 212 send route 1 and route 2, respectively, to guangdong PE device 111, where route 1 may include route prefix 1 of sheng yang PE device 211, and route 2 may include route prefix 2 of sheng yang PE device 212. The guangdong PE device 111 may receive the route 1 sent by the sheng yang PE device 211 and the route 2 sent by the sheng yang PE device 212, so as to determine that the forwarding path 1 corresponding to the route 1 and the forwarding path 2 corresponding to the route 2 both pass through the guangzhou core device 121 in the network device set 1 and the sheng yang core device 221 in the network device set 2, where the forwarding path 1 includes: a path 11 from the guangdong PE device 111 to the guangdong core device 121, a path 12 from the guangdong core device 121 to the sheng yang core device 221, and a path 13 from the sheng yang core device 221 to the sheng yang PE device 211, where the forwarding path 2 includes: path 11 from guangdong PE device 111 to guangzhou core device 121, path 12 from guangzhou core device 121 to sheng yang core device 221, and path 14 from sheng yang core device 221 to sheng yang PE device 212.
For the Guangdong PE device 111, since it is determined that the forwarding path 1 and the forwarding path 2 both pass through the Guangzhou core device 121, an association Identifier 1 may be allocated to the route 1 and the route 2, and it is determined that the association Identifier 1 corresponds to the forwarding information 1, where the forwarding information 1 includes an outbound interface 1 and a Segment Identifier (SID) 1 of the Guangzhou core device 121, where the outbound interface 1 is an interface on the Guangdong PE device 111 that is connected to the Guangzhou core device 121 through the path 11. Then, the Guangdong PE device 111 may generate a forwarding table entry 1 corresponding to the route 1 and a forwarding table entry 2 corresponding to the route 2, where the forwarding table entry 1 may at least include: the routing prefix 1, the association identifier 1, SID 1 and the egress interface 1, where the forwarding table entry 2 at least includes: the forwarding table entry comprises a routing prefix 2, an association identifier 1, a SID 1 and an outgoing interface 1, that is, the routing prefixes in the forwarding table entry 1 and the forwarding table entry 2 are all associated to forwarding information 1 through the association identifier 1. For example, the generated forwarding table entry 1 and forwarding table entry 2 may be as shown in table 1 below:
table 1 forwarding table entry 1 and forwarding table entry 2
Figure BDA0003073901200000081
It should be noted that forwarding entries in the tables in the embodiments of the present application are all exemplary. For example: in the forwarding table entry shown in table 1, only one association identifier 1 needs to be stored in the storage module of the forwarding plane of the PE device 1, and similarly, only one forwarding information 1 needs to be stored, so that the storage resource of the forwarding table entry can be effectively saved.
For the cantonese core device 121, since it is determined that the forwarding path 1 and the forwarding path 2 both pass through the shenyang core device 221, an association identifier 2 may be allocated to the route 1 and the route 2, and it is determined that the association identifier 2 corresponds to the forwarding information 2, where the forwarding information 2 includes a segment identifier SID 2 of the outbound interface 2 and the shenyang core device 221, where the outbound interface 2 is an interface on the cantonese core device 121 that connects to the shenyang core device 221 through the path 12. Then, the cantonese core device 121 may generate a forwarding table entry 3 corresponding to the route 1 and a forwarding table entry 4 corresponding to the route 2, where the forwarding table entry 3 at least may include: the routing prefix 1, the association identifier 2, the SID 2, and the egress interface 2, where the forwarding table entry 4 at least includes: the routing prefix 2, the association identifier 2, SID 2 and the outgoing interface 2, that is, the routing prefixes in the forwarding table entry 3 and the forwarding table entry 4 are all associated to the forwarding information 2 through the association identifier 2. For example, the generated forwarding table entry 3 and forwarding table entry 4 may be as shown in the following table 2:
table 2 forwarding table entry 3 and forwarding table entry 4
Figure BDA0003073901200000082
In this example, if the guangdong PE device 111 receives the packet 1, and the destination address of the packet 1 matches with the routing prefix 1, the guangdong PE device 111 may send the packet 1 to the cantonese core device 121 from the output interface 1 through the path 11 based on the output interface 1 in the forwarding table entry 1; the cantonese core device 121 may send the packet 1 from the egress interface 2 to the sheng yang core device 221 through the path 12 based on the egress interface 2 in the forwarding table entry 3; the sheng core device 221 may forward the packet 1 to the sheng PE device 211 via the path 13 based on the egress interface in the local forwarding table entry. The matching between the destination address of the packet 1 and the routing prefix 1 may refer to: the destination address of the message 1 and the routing prefix 1 belong to the same network segment.
As another example, if the path 11 fails, the guangdong PE device 111 may determine that the path 11 'from the guangdong PE device 111 to the guangdong core device 121 is reachable, so that the control plane of the guangdong PE device 111 may issue the association identifier 1 and the outgoing interface 1' to the forwarding plane, update the forwarding table 1 and the forwarding table 2, respectively record the updated forwarding table 1 and forwarding table 2 as the forwarding table 1 'and forwarding table 2', where the forwarding table 1 'is compared with the forwarding table 1 and the forwarding table 2' is compared with the forwarding table 2, and the differences include: the outbound interface 1 is updated to the outbound interface 1'. The egress interface 1 'is an interface of the guangzhou PE device 111 connected to the guangzhou core device 121 through the path 11'. For example, the forwarding table entry 1 'and the forwarding table entry 2' can be seen from the following table 3:
table 3 forwarding table item 1 'and forwarding table item 2'
Figure BDA0003073901200000083
Figure BDA0003073901200000091
Therefore, when the path 11 fails, other network devices in the scene do not need to perform route convergence or re-issue a route including a route prefix, and only the guangdong PE device 111 updates the output interfaces 1 in the forwarding table entry 1 and the forwarding table entry 2, which greatly improves the efficiency of route convergence.
Similarly, if the path 12 fails, the cantonese core device 121 may determine that the path 12' from the cantonese core device 121 to the sunward core device 221 is reachable, so that the control plane of the cantonese core device 121 may send the association identifier 2 and the outgoing interface 2' to the forwarding plane, and update the forwarding table 3 and the forwarding table 4, where the updated forwarding table 3 and forwarding table 4 may be respectively marked as the forwarding table 3' and the forwarding table 4', and the difference between the forwarding table 3' and the forwarding table 4' is compared with the forwarding table 3 and the forwarding table 4' is compared with the forwarding table 4, includes: egress interface 2 is updated to egress interface 2'. The egress interface 2 'is an interface of the guangzhou core device 121 connected to the shenyang core device 221 through the path 12'. For example, the forwarding table entry 3 'and the forwarding table entry 4' can be seen from the following table 4:
table 4 forwarding table item 3 'and forwarding table item 4'
Figure BDA0003073901200000092
In this example, assuming that both the path 11 and the path 12 fail, the guangdong PE device 111 and the guangzhou core device 121 update forwarding entries, respectively, as shown in tables 3 and 4. If the guangdong PE device 111 receives the message 1, and the destination address of the message 1 is matched with the routing prefix 1, the guangdong PE device 111 may send the message 1 to the guangzhou core device 121 from the outgoing interface 1 'through the path 11' based on the outgoing interface 1 'in the forwarding table entry 1'; the guangzhou core device 121 may send the packet 1 to the sheng yang core device 221 from the egress interface 2 'through the path 12', based on the egress interface 2 'in the forwarding table entry 3'; the shenyang core device 221 may forward the packet 1 to the shenyang PE device 211 via the path 13 based on the outgoing interface in the local forwarding table entry.
It should be noted that, in the network, in order to improve the network performance, each area may also be configured with a plurality of core devices, and the plurality of core devices are respectively connected to each PE device in the area, so as to implement active/standby safety switching or load sharing. Taking an example that each region includes two core devices, a scene to which the embodiment of the present application is applicable may be referred to fig. 2. A guangzhou core device 122 and a sheng yang core device 222 may also be included in the scenario, where the guangzhou core device 122 belongs to the network 10 and the sheng yang core device 222 belongs to the network 12 and the network 20. The cantonese core device 122 and the cantonese core device 121 both belong to a device in the network device set 1 connecting the network 10 and the network 11, and the sheng yang core device 221 and the sheng yang core device 222 belong to a device in the network set 2 connecting the network 12 and the network 20.
In the scenario shown in fig. 2, taking a matching entry in the forwarding table entry as a routing prefix as an example, the forwarding table entry on the guangdong PE device 111 may include the forwarding table entry in table 1, and the forwarding table entry on the guangzhou core device 121 may include the forwarding table entry in table 2.
When the guangdong PE device 111 determines that the path 11 from the outgoing interface 1 to the guangdong core device 121 is not reachable, the guangdong PE device 111 may determine that the path 21 from the guangdong PE device 111 to the guangdong core device 122 is reachable, so that the control plane of the guangdong PE device 111 may issue the association identifier 1 and the outgoing interface 1 to the forwarding plane, update the forwarding table 1 and the forwarding table 2, the updated forwarding table 1 and the updated forwarding table 2 may be respectively recorded as the forwarding table 1 "and the forwarding table 2", and the forwarding table 1 "is compared with the forwarding table 1 and the forwarding table 2" is compared with the forwarding table 2, where the difference includes: egress interface 1 is updated to egress interface 1 "and SID 1 of cantonese core device 121 is updated to SID 3 of cantonese core device 122. Here, the egress interface 1 ″ is an interface of the guangzhou PE device 111 connected to the guangzhou core device 122 via the path 21. For example, the following table 5 may be referred to as forwarding table entry 1 "and forwarding table entry 2":
table 5 forwarding table entry 1 "and forwarding table entry 2"
Figure BDA0003073901200000101
Thus, when the path 11 or the cantonese core device 121 fails, other network devices in the scene do not need to perform route convergence or resend a route including a route prefix, and only the cantonese PE device 111 updates the forwarding information 1 in the forwarding table item 1 and the forwarding table item 2, thereby greatly improving the efficiency of route convergence.
Similarly, when the cantonese core device 121 determines that the path 12 from the outgoing interface 2 to the sinking core device 221 is not reachable, the cantonese core device 121 may determine that the path 22 from the cantonese core device 121 to the sinking core device 222 is reachable, so that the control plane of the cantonese core device 121 may send the association identifier 2 and the outgoing interface 2 "to the forwarding plane, and update the forwarding table 3 and the forwarding table 4, and the updated forwarding table 3 and the updated forwarding table 4 may respectively record the forwarding table 3" and the forwarding table 4", where the forwarding table 3" compares the forwarding table 3 with the forwarding table 4 "with the forwarding table 4, and the difference includes: egress interface 2 is updated to egress interface 2 "and SID 2 of sheng yang core device 221 is updated to SID 4 of sheng yang core device 222. Here, the egress interface 2 ″ is an interface of the guangzhou core device 121 connected to the sheng yang core device 222 through the path 22. For example, the forwarding table entry 3 "and the forwarding table entry 4" can be seen from the following table 6:
table 6 forwarding table entry 3 "and forwarding table entry 4"
Figure BDA0003073901200000102
In this scenario, assuming that the path 11 is reachable, the path 12 is not reachable, and the path 22 is reachable, the guangzhou core device 121 updates the forwarding table entries respectively, as shown in table 6. If the guangdong PE device 111 receives the message 1, and the destination address of the message 1 is matched with the routing prefix 1, the guangdong PE device 111 may send the message 1 to the guangdong core device 121 from the egress interface 1 through the path 11 based on the egress interface 1 in the forwarding table entry 1; the guangzhou core device 121 may send the packet 1 from the egress interface 2 "to the sheng yang core device 222 through the path 22 based on the egress interface 2" in the forwarding table entry 3 "; the shenyang core device 222 may forward the message 1 to the shenyang PE device 211 based on the outgoing interface in the local forwarding table entry.
Assuming that the path 11 is unreachable, the path 21 is reachable, the path 23 from the cantonese core device 122 to the sheng core device 222 is reachable, and the cantonese core device 122 includes forwarding entries as shown in table 7 below:
table 7 forwarding table entry 5 and forwarding table entry 6
Figure BDA0003073901200000103
Figure BDA0003073901200000111
Forwarding information in the forwarding table entry 5 and the forwarding table entry 6 includes: SID 4 of shenyang core 222 and egress interface 3 from guangzhou core 222 via path 23 to shenyang core 222. If the guangdong PE device 111 receives the message 1, and the destination address of the message 1 is matched with the routing prefix 1, the guangdong PE device 111 may send the message 1 to the guangzhou core device 122 from the outgoing interface 1 "through the path 21 based on the outgoing interface 1" in the forwarding table entry 1"; the guangzhou core device 122 may send the packet 1 from the egress interface 3 to the sheng yang core device 222 via the path 23 based on the egress interface 3 in the forwarding table entry 5; the sheng core device 222 may forward the packet 1 to the sheng PE device 211 based on the output interface in the local forwarding table entry.
It should be noted that the association Identifier may also be referred to as an Indirect Identifier (IID), and different numbers may identify different routing groups with the same forwarding information. If the number of network devices included in the network device set connecting the two networks is multiple, in one case, the multiple network devices in the network device set may be configured with the same SID, which may be Anycast (Anycast) SID, for example, in the scenario shown in fig. 2, the SIDs of the guangzhou core device 121 and the guangzhou core device 122 may be Anycast SID A1:2::10. In another case, a plurality of network devices in the network device set may be configured with different SIDs, for example, in the scenario shown in fig. 2, the SIDs of the guangzhou core device 121 and the guangzhou core device 122 may be: a1:2: 10 and A1:2: :11. under the condition that the SIDs configured for a plurality of network devices in the network device set are different, the same association identifier may be allocated to the plurality of network devices in the network device set, or different association identifiers may be allocated, without affecting the implementation in the embodiment of the present application.
The control plane of the network device connected to the network device set may bind the association identifier of the network device set to a plurality of egress interfaces in advance, and when a path from the network device to the network device set through one egress interface is not reachable, the control plane may issue the association identifier and the bound other egress interfaces to the forwarding plane in time, so that the network device may complete the update of the forwarding table item quickly. For example, the control plane of the guangdong PE device 111 may bind the association identifier 10023 of the network device set 1 to the interface 1, the outgoing interface 1', and the outgoing interface 1 in advance, and when it is determined that the path 11 is not reachable, the control plane of the guangdong PE device 111 may issue 10023 and the outgoing interface 1' to the forwarding plane, thereby instructing the guangdong PE device 111 to update the forwarding table entry 1 to the forwarding table entry 1'; alternatively, the control plane of the guangdong PE device 111 may issue 10023 and egress interface 1 "to the forwarding plane, thereby instructing the guangdong PE device 111 to update the forwarding table entry 1 to the forwarding table entry 1".
It should be noted that, in this embodiment of the present application, the network devices such as the PE device and the core device may be devices such as a switch, a router, or a firewall, and are not specifically limited in this embodiment of the present application.
It should be noted that, for the data form of the forwarding table entry in the forwarding plane of the network device, each table is only an example, and the data form of the forwarding table entry is not limited in the embodiment of the present application, and the data form may also be understood as a storage format of the forwarding table entry in the storage module or an organization manner of the forwarding table entry. Taking forwarding table entry 1 and forwarding table entry 2 shown in table 1 as an example, the data format may be as shown in fig. 3a, where the routing prefix 1 and the routing prefix 2 both correspond to the association identifier 1, and the association identifier 1 corresponds to SID 1 and the egress interface 1. In the forwarding table entry shown in fig. 3a, the association identifier 1 only needs to be stored in the storage module, and the forwarding information only needs to be stored in the storage module. The data form of the forwarding table entry may also refer to fig. 3b, where the routing prefix 1 and the routing prefix 2 both correspond to the association identifier 1, and the association identifier 1 corresponds to the SID 1 and the egress interface 1, and the forwarding table entry format shown in fig. 3b is different from that shown in fig. 3a in that the association identifier 1 and the routing prefix are stored in one sub-storage unit, and the association identifier 1 needs to be stored in the sub-storage unit corresponding to each routing prefix. The content of the forwarding entry corresponding to fig. 3b may specifically be shown in table 8 below:
table 8 forwarding table entry 1 and forwarding table entry 2
Figure BDA0003073901200000121
It should be noted that, in the above description of the message forwarding process, the messages forwarded between multiple network devices are described by the same name, but in the actual forwarding process, the messages may be modified according to the mode supported by the scenario and the difference of the network devices, and specific details may be referred to the following description of S104 to S107 and S401 to S404, which is not described again here.
The above describes, by taking the scenarios shown in fig. 1 and fig. 2 as examples, applications of the technical solution of the embodiment of the present application in different scenarios, which are only a few scenario examples provided in the embodiment of the present application, and do not constitute a limitation to the embodiment of the present application.
The following describes a method for generating a forwarding entry according to an embodiment of the present application with reference to the drawings.
Fig. 4 is a flowchart illustrating a method 100 for generating a forwarding table entry according to an embodiment of the present application. The implementation scenario of the method 100 is as follows: the first network device in the first network is connected with the second network through a network device set, the network device set at least comprises the second network device, and the network device set is a device for connecting the first network and the second network. In one case, the first network is a network between PE devices and core (P) devices, and the second network is a network between P devices, for example, the first network is the network 10 in fig. 1 or fig. 2, and the second network is the network 12 in fig. 1 or fig. 2. In another case, the first network is a network between P devices, and the second network is a network between a P device and a PE device, for example, the first network is the network 12 in fig. 1 or fig. 2, and the second network is the network 20 in fig. 1 or fig. 2. The method 100 is described with a first network device as the executing entity. For example, the first network device in the method 100 may be the guangdong PE device 111 in fig. 1 or fig. 2, and then the set of network devices may be the set of network devices 1 and the second network device may be the guangdong core device 121. Also for example, the first network device in the method 100 may also be the guangzhou core device 121 in fig. 1 or fig. 2, and then the set of network devices may be the set of network devices 2, and the second network device may be the sheng yang core device 221.
Referring to fig. 4, the method 100 may include, for example, S101 to S103:
s101, the first network equipment determines that forwarding paths corresponding to a plurality of routes respectively pass through the network equipment set.
The multiple routes may be IGP routes, such as an Intermediate system to Intermediate system (ISIS) route, or an Open Shortest Path First (OSPF) route.
The first network device determines the network device set, as an example, a specific network device through which forwarding paths corresponding to the multiple routes must pass may be determined by calculation, and one or more specific network devices determined by calculation are determined as devices in the network device set. For example, when calculating forwarding paths corresponding to multiple routes, the first network device may delete one or more network devices from the network topology, and the multiple routes in the deleted network are not reachable to the destination device, so that it may be determined that the deleted one or more network devices are specific network devices through which the forwarding paths corresponding to the multiple routes must pass. For example, in the scenario shown in fig. 1, the guangdong PE device 111 may delete the guangdong core device 121, and determine that neither the route 1 to the sheng PE device 211 nor the route 2 to the sheng PE device 211 is reachable, so that the specific network device that the forwarding path 1 corresponding to the route 1 and the forwarding path 2 corresponding to the route 2 must pass through is determined to be the guangdong core device 121, that is, the guangdong PE device 111 determines that the forwarding path 1 corresponding to the route 1 and the forwarding path 2 corresponding to the route 2 respectively pass through the network device set 1, and the network device set 1 includes the guangdong core device 121. For another example, in the scenario shown in fig. 2, the cantonese PE device 111 may delete the cantonese core device 121 and the cantonese core device 122, and determine that the route 1 to the shenyang PE device 211 and the route 2 to the shenyang PE device 211 are unreachable, so that the specific network devices that the forwarding path 1 corresponding to the route 1 and the forwarding path 2 corresponding to the route 2 must pass through include the cantonese core device 121 and the cantonese core device 122, that is, the cantonese PE device 111 determines that the forwarding path 1 corresponding to the route 1 and the forwarding path 2 corresponding to the route 2 pass through the network device set 1 respectively, and the network device set 1 includes the cantonese core device 121 and the cantonese core device 122.
As another example, a set of network devices may also be statically configured on the first network device, the set of configured network devices satisfying: the first network device receives a plurality of routes corresponding to the forwarding paths that must pass through the devices in the set of network devices.
In addition, for a cross-domain scenario, an Area Border Router (ABR) may be directly used as a device in the network device set, without the above calculation or static configuration. For example, in the scenario shown in fig. 5, a PE device 1, a PE device 2, a PE device 3, a PE device 4, an ABR 1, and an ABR2 are included, where ABR 1, PE device 1, and PE device 2 belong to a domain L1, ABR2, PE device 3, and PE device 4 belong to a domain L1, between ABR 1 and ABR2 belong to a domain L2, and ABR 1 and ABR2 are ABRs of the domains L1 and L2. Assuming that the PE device 1 and the PE device 2 issue routes to the PE device 3 through the ABR 1 and the ABR2, respectively, and the PE device 3 receives a plurality of routes, in this scenario, the PE device 3 serves as a first network device, and the ABR2 may be regarded as a device in a network device set; ABR2 as the first network device, ABR 1 may be considered a device in the set of network devices. In this scenario, the PE device 3 and the ABR2 are implemented as a first network device to generate a plurality of first forwarding table entries, which may refer to the descriptions of the embodiments shown in fig. 1, fig. 2, and fig. 4.
If the first network device corresponds to the guangdong PE device 111 in fig. 1 or fig. 2, the plurality of routes may include route 1 and route 2, the forwarding paths corresponding to the plurality of routes may include forwarding path 1 and forwarding path 2, and the network device set may be network device set 1. If the first network device corresponds to the cantonese core device 121 in fig. 1 or fig. 2, the plurality of routes may include route 1 and route 2, the forwarding paths corresponding to the plurality of routes may include forwarding path 1 and forwarding path 2, and the network device set may be network device set 2.
It should be noted that the multiple routes may also be routes received by the sheng yang PE device 211, for example, routes sent to the sheng yang PE device 211 by the guangdong PE device 111 and the guangdong PE device 112, then, the first network device may correspond to the sheng yang PE device 211 in fig. 1 or fig. 2, and the network device set may be the network device set 2. The first network device may also correspond to sheng yang core device 221 in fig. 1 or fig. 2, and the network device set may be network device set 1.
S102, the first network device distributes the associated identification for the plurality of routes, the plurality of routes correspond to the same first forwarding information, and the first forwarding information comprises the first outgoing interface and the segment identification of the second network device in the network device set.
When the first network device determines that multiple routes pass through all devices in the network device set, an association identifier may be assigned to the multiple routes. Optionally, a correlation identifier may be allocated to the network device set, or a correlation identifier may be allocated to each device in the network device set.
The association identifier is used for identifying a route group, and forwarding information corresponding to a matching item of each route in a plurality of routes in the same route group is the same, wherein the matching item can be a route prefix or an MPLS label. The forwarding information includes a next hop (i.e., a device in the network device set) and an outgoing interface, and is the first forwarding information in S102. The forwarding plane can only store one piece of forwarding information corresponding to the multiple routes, so that the storage resources can be greatly saved, and the space utilization rate is improved.
The first forwarding information is used to instruct a first network device to forward a packet whose destination address matches a route prefix corresponding to any of the routes, where the first forwarding information includes next hop information and egress interface information, and when a network device set includes a second network device and a forwarding path corresponding to the routes must pass through the second network device, the first forwarding information includes a SID of the second network device and a first egress interface, where the first egress interface is an interface on the first network device, and the second network device is connected to the first egress interface.
It should be noted that the embodiment of the present application may be applied to a Segment Routing over Internet Protocol (srv 6) scenario or an SR multi-Protocol Label Switching (MPLS) scenario based on the sixth version of Internet Protocol. If the embodiment is applied to the SRv6 scenario, the SID of the second network device may be an Internet Protocol version 6 (IPv 6) address. If the embodiment applies to an SR MPLS scenario, then the SID of the second network device may be an MPLS label.
If the first network device corresponds to the guangdong PE device 111 in fig. 1 or fig. 2, the association identifier may be the association identifier 1, the first forwarding information may be forwarding information 1, the SID of the second network device may be SID 1 of the guangdong core device 121, and the first outgoing interface may be outgoing interface 1. If the first network device corresponds to the cantonese core device 121 in fig. 1 or fig. 2, the association identifier may be the association identifier 2, the first forwarding information may be the forwarding information 2, the SID of the second network device may be SID 2 of the shenyang core device 221, and the first outgoing interface may be outgoing interface 2.
For the scenario shown in fig. 5, the PE device 3 serves as a first network device, the ABR2 serves as a second network device, and the first forwarding information may include the SID of the ABR2 and an outgoing interface connected to the ABR2 on the PE device 3; the ABR2 is used as a first network device, the ABR 1 is used as a second network device, and the SID of the ABR 1 and the outgoing interface connected to the ABR 1 on the ABR2 may be included in the first forwarding information.
Therefore, the same association identifier is allocated to the multiple routes which must pass through the same network device set, and the association identifier is associated with one piece of first forwarding information, so that a data basis is provided for the subsequent first network device to quickly generate multiple first forwarding table entries corresponding to the multiple routes.
S103, the first network device generates a plurality of first forwarding table entries corresponding to the plurality of routes, wherein a matching entry in each of the plurality of first forwarding table entries is associated with the first forwarding information through the association identifier.
In specific implementation, after S102, the control plane of the first network device may issue the association identifier and the first forwarding information to the forwarding plane, so that the first network device generates multiple first forwarding entries corresponding to multiple routes on the forwarding plane. The matching item in each of the plurality of first forwarding table entries is different, and the association identifier and the forwarding information are the same. That is, only one copy of the first forwarding information is stored in the multiple first forwarding table entries of the forwarding plane of the first network device, so that the storage resource can be effectively saved.
Taking the matching entry as the routing prefix, if the first network device corresponds to the guangdong PE device 111 in fig. 1 or fig. 2, the second network device is a cantonese core device 121, and the plurality of routes include route 1 and route 2, then the plurality of first forwarding table entries may refer to table 1 above, and may include forwarding table entry 1 corresponding to route 1 and forwarding table entry 2 corresponding to route 2. If the first network device corresponds to the cantonese core device 121 in fig. 1 or fig. 2, the second network device is the sheng core device 221, and the plurality of routes includes route 1 and route 2, the plurality of first forwarding entries may refer to the above table 2, and may include a forwarding entry 3 corresponding to route 1 and a forwarding entry 4 corresponding to route 2.
Therefore, a plurality of routes passing through the same network equipment generate a plurality of forwarding table entries with the same forwarding information, and only one piece of forwarding information needs to be stored in a forwarding plane, so that the process of generating the forwarding table entries is simple and quick; in addition, in the generated multiple forwarding table entries, multiple routes are associated to the same forwarding information through the same association identifier, and next-hop separation and convergence of the routes are realized, so that even if the network topology changes, each route prefix does not need to be updated, simple and rapid convergence of the routes can be realized in a next-hop separation and convergence mode, and the performance of IGP route convergence is improved.
In some possible implementations, after S103, the first network device may implement sending the packet to a second network device in the network device set based on the plurality of first forwarding table entries. For example, the method 100 may further include, after S103, the following S104 to S107:
s104, the first network equipment receives the first message, and the destination address of the first message is matched with one matching item in the first forwarding table items.
And S105, the first network equipment obtains the first forwarding information according to the first association identifier in the plurality of first forwarding table entries.
In specific implementation, after receiving the first message, the first network device may analyze the first message to obtain a destination address of the first message, and search a forwarding table entry matching the matching entry with the destination address from the multiple local forwarding table entries, so as to direct forwarding of the first message according to the searched forwarding table entry. For example, if the matching entry in the forwarding table entry is a routing prefix, the destination address of the first packet matches with the matching entry of the forwarding table entry, which may mean that the destination address and the routing prefix belong to the same network segment. Next, the first network device may determine, from the first forwarding table entry matching the destination address of the first packet, the first forwarding information associated with the first association identifier.
For example, the first message may be the above message 1, and the destination address of the message 1 and the routing prefix 1 belong to the same network segment, then the guangdong PE device 111 as the first network device may determine forwarding information 1 associated with the association identifier 1 from the forwarding table entry 1 shown in table 1, where the forwarding information 1 includes SID 1 and egress interface 1 of the guangzhou core device 121. Alternatively, the cantonese core device 121 as the first network device may determine forwarding information 2 associated with the association identifier 2 from the forwarding table entry 3 shown in table 2, where the forwarding information 2 includes SID 2 of the shenyang core device 221 and the egress interface 2.
Thus, the first network device is prepared for effectively forwarding the received first message.
S106, the first network equipment processes the first message according to the segment identifier in the first forwarding information to obtain a second message.
S107, the first network device sends a second message to the second network device from the first output interface in the first forwarding information.
When the SID of the second network device is an IPv6 address, as an example, if the first network device is a PE device, S106 may include, for example: a first network device inserts a Segment Routing Header (SRH) into a first packet, where a SID list (english: list) field in the SRH includes a SID corresponding to a destination address of the first packet, and modifies the content of the destination address field of the first packet into a SID of a second network device, so as to obtain a second packet. As another example, if the first network device is a P device, the first message may include an SRH, and S106 may include, for example: the first network device modifies the SRH in the first message, for example, modifies the value of the field of the remaining Segment (SL) in the SRH, and the first network device also modifies the content of the destination address field of the first message to the SID of the second network device, so as to obtain the second message.
Suppose the address of the Guangdong PE device 111 is A3::1, the SID 1 of the Guangzhou core device 121 is Anycast SID A1:2::10, the SID 2 of the Shenyang core device 221 is Anycast SID A1:1: 10, and the address of the Shenyang PE device 211 is A2::1. Taking the example that the first network device is the guangdong PE device 111, the first message is the message 1, and the second network device is the guangzhou core device 121, the structure of the message 1 is shown in fig. 6a, and the ipv6 header includes a destination address field, and the value of the destination address field is A3::1.
In one case, when processing the packet 1 in the reduced (english: reduce) mode, the first network device only modifies the destination address field of the first packet to be the SID of the second network device, and does not need to add the SID of the second network device to the SID list field in the SRH of the first packet. Through S106, the second message (which may be referred to as message 2) obtained by the guangdong PE device 111 has a structure shown in fig. 6b, the destination IP address field in the ipv6 header has a value of A1:2::10, and the SID list of the inserted SRH includes A2::1. Taking the first network device as the guangzhou core device 121, the first message as the message 2, and the second network device as the sheng yang core device 221 as an example, the structure of the message 2 is shown in fig. 6b; through S106, the second message (which may be referred to as message 3) obtained by the guangzhou core device 121 has a structure shown in fig. 6c, the destination IP address field in the ipv6 header has a value of A1:1::10, and the SID list of the srh includes A2::1.
In another case, when the message 1 is processed in the non-reduce mode, the first network device not only modifies the destination address field of the first message to be the SID of the second network device, but also needs to add the SID of the second network device to the SID list field in the SRH of the first message. The second message (which may be referred to as message 2') obtained by the Guangdong PE device 111 has a structure shown in FIG. 7a, the destination address field in the header of IPv6 has a value of A1:2::10, and the SID list of the SRH includes A2::1 and A1:2::10, via S106. Taking the first network device as the guangzhou core device 121, the first message as the message 2, and the second network device as the sheng yang core device 221 as an example, the structure of the message 2 is shown in fig. 7a; the second message (which may be referred to as message 3') obtained by the Guangzhou core device 121 has a structure shown in FIG. 7b, the destination IP address field in the header of IPv6 has a value of A1:1::10, and the SID list of the SRH includes A2: 1, A1:2::10, and A1:1: 10, via S106.
When the SID of the second network device is an MPLS label, S106 may include, for example: and the first network equipment adds the segment identifier of the second network equipment in the label stack of the first message to obtain a second message. Thus, the first network device can send the second packet to the second network device from the first output interface.
Assume that the MPLS label of guangdong PE device 111 is 100, the MPLS label of guangzhou core device 121 is 200, the MPLS label of sheng yang core device 221 is 300, and the MPLS label of sheng yang PE device 211 is 400. Taking the example that the first network device is the guangdong PE device 111, the first packet is the packet 1, and the second network device is the guangzhou core device 121, the MPLS label stack of the packet 1 is shown in fig. 8a, and includes MPLS labels 100 and 400; the MPLS label stack of the second packet (which may be referred to as packet 2) obtained by the guangdong PE device 111 through S106 is shown in fig. 8b, and includes MPLS labels 200 and 400. Taking the first network device as the guangzhou core device 121, the first message as the message 2, and the second network device as the sheng yang core device 221 as examples, the MPLS label stack of the message 2 is shown in fig. 8b; the MPLS label stack of the second message (which may be referred to as message 3) obtained by the cantonese core device 121 via S106 is shown in fig. 8c and includes MPLS labels 300 and 400.
Thus, on the basis of the forwarding table generated by the method 100, the first network device can accurately send the received packet to the devices in the network device set, that is, the method 100 plays an important role in the packet forwarding process.
In some possible implementation manners, the embodiment of the present application further considers how to implement fast routing convergence when a network topology changes, for example, a fault occurs in a scene, thereby ensuring normal forwarding of a packet and improving service continuity. Based on this, the embodiments of the present application provide the following method 200 and method 300, which respectively correspond to a scenario in which a network device set includes one network device and multiple network devices, and implement updating of a forwarding table entry.
Fig. 9 is a flowchart illustrating a method 200 for generating a forwarding entry according to an embodiment of the present application. The method 200 is described with a first network device as the executing entity. For example, the first network device in the method 200 may be the Guangdong PE device 111 in FIG. 1, and then the second network device is the Guangzhou core device 121. Also for example, the first network device in the method 200 may also be the guangzhou core device 121 in fig. 1, and then the second network device is the sheng yang core device 221. The first forwarding table entry, the first outgoing interface, and the first forwarding information are described with reference to the method 100 shown in fig. 4.
Referring to fig. 9, the method 200 may further include, after S103 in the method 100, for example, S201 to S202:
s201, when it is determined that a first path reaching a second network device through a first outgoing interface fails, the first network device obtains a second outgoing interface, and a second path reaching the second network device through the second outgoing interface is reachable by the first network device.
In specific implementation, when the first network device determines that the first path from the first outgoing interface to the second network device via the first path is not reachable, the first path may be determined to be faulty, and thus, the first network device may determine the second path from the first network device to the second network device, and determine the outgoing interface, i.e., the second outgoing interface, connected to the second path on the first network device.
It should be noted that, the control plane of the first network device may bind the association identifier of the network device set to a plurality of egress interfaces in advance, where the plurality of egress interfaces includes a first egress interface and a second egress interface, and when the first network device reaches the first path of the second network device set through the first egress interface and is not reachable, the control plane may timely obtain the second egress interface bound to the association identifier, so as to quickly implement updating of the forwarding table entry.
For example, for the scenario shown in fig. 1, if the guangdong PE device 111 determines that the path 11 to the guangdong core device 121 fails, the path 11' reachable from the guangdong PE device 111 to the guangdong core device 121 may be determined, so as to determine the egress interface 1' of the guangdong PE device 111 connected to the path 11 '.
S202, the first network equipment updates a first forwarding table entry, and the updated first forwarding table entry comprises the segment identifier of the second network equipment and the second output interface.
In a specific implementation, after the first network device obtains the second outgoing interface, the control plane may issue the association identifier and the second outgoing interface to the forwarding plane, and instruct the forwarding plane of the first network device to update the outgoing interface associated with the association identifier in the plurality of first forwarding table entries, that is, update the first outgoing interface in the first forwarding information to be the second outgoing interface.
For example, for the scenario shown in fig. 1, if the guangdong PE device 111 determines that the path 11 to the guangdong core device 121 fails and the output interface 1' of the path 11' is connected to the guangdong PE device 111, the control plane of the guangdong PE device 111 sends the association identifier 1 and the output interface 1' to the forwarding plane, and instructs the forwarding plane of the guangdong PE device 111 to update the forwarding table entry 1 and the forwarding table entry 2 shown in table 1 to the forwarding table entry 1' and the forwarding table entry 2' shown in table 3, respectively.
As can be seen, in the embodiment of the present application, when a network topology changes, global routing convergence is not required, and next-hop separation convergence is performed, for example, when a network device set only includes one network device (i.e., a second network device), a first path where a first network device reaches the second network device through a first egress interface fails, and the first network device only needs to update forwarding information in multiple forwarding table entries, and does not need to update each routing prefix.
Fig. 10 is a flowchart illustrating a method 300 for generating a forwarding table entry according to an embodiment of the present application. The method 300 is described with a first network device as the executing entity. In the method 300, the network device set includes a plurality of network devices, and for convenience of description, the network device set includes a second network device and a third network device. For example, the first network device in the method 300 may be the guangdong PE device 111 in fig. 1, and then the set of network devices includes a second network device and a third network device, the second network device being the guangdong core device 121 and the third network device being the guangdong core device 122. As another example, the first network device in the method 300 may also be the guangzhou core device 121 in fig. 1, and then the set of network devices includes a second network device and a third network device, the second network device is the sheng yang core device 221, and the third network device is the sheng yang core device 222. The first forwarding table entry, the first outgoing interface, and the first forwarding information are described with reference to the method 100 shown in fig. 4.
Referring to fig. 10, the method 300 may further include, after S103 in the method 100, for example, S301 to S302:
s301, when it is determined that a first path reaching a second network device through a first outgoing interface fails, the first network device obtains a second outgoing interface, and a second path reaching a third network device through the second outgoing interface is reachable by the first network device.
In a specific implementation, when the first network device determines that the first path from the first outgoing interface to the second network device via the first path is not reachable, it may determine that the first path is faulty, and then the first network device may determine the second path from the first network device to the third network device, so as to determine the second outgoing interface, which is an outgoing interface connected to the second path, on the first network device. It should be noted that the failure of the first path in this embodiment may include a failure of a link of the first path between the first network device and the second network device, and may also include a failure of the second network device.
It should be noted that, the control plane of the first network device may bind the association identifier of the network device set to a plurality of egress interfaces in advance, where the plurality of egress interfaces includes a first egress interface and a second egress interface, and when the first network device reaches the first path of the second network device set through the first egress interface, the control plane may obtain the second egress interface bound to the association identifier in time, so as to quickly update the forwarding table entry.
For example, for the scenario shown in fig. 2, if the guangdong PE device 111 determines that path 11 to the guangdong core device 121 fails, then path 21 reachable by the guangdong PE device 111 to the guangdong core device 122 may be determined, thereby determining egress interface 1 ″ on the guangdong PE device 111 that is connected to path 21.
S302, the first network device updates a first forwarding entry, where the updated first forwarding information includes a segment identifier of the third network device and the second outgoing interface.
The second network device and the third network device may have the same SID, for example, the SID of the second network device and the SID of the third network device are both Anycast SIDs. Or, the SID of the second network device and the SID of the third network device may also be different, which does not affect the implementation of the embodiment of the present application.
In a specific implementation, after the first network device obtains the second outgoing interface, the control plane may issue the association identifier and the second outgoing interface to the forwarding plane, and instruct the forwarding plane of the first network device to update the outgoing interface associated with the association identifier in the multiple first forwarding table entries, that is, update the first outgoing interface in the first forwarding information to be the second outgoing interface.
For example, for the scenario shown in fig. 2, if the guangdong PE device 111 determines that the path 11 to the guangdong core device 121 fails and the output interface 1 "of the path 21 is connected to the guangdong PE device 111, the control plane of the guangdong PE device 111 sends the association identifier 1 and the output interface 1" to the forwarding plane, and instructs the forwarding plane of the guangdong PE device 111 to update the forwarding table entry 1 and the forwarding table entry 2 shown in table 1 to the forwarding table entry 1 "and the forwarding table entry 2 shown in table 5, respectively.
As can be seen, in the embodiment of the present application, when a network topology changes, global routing convergence is not required, and next-hop separation convergence is performed, for example, when a network device set includes multiple network devices (taking a second network device and a third network device as an example), a first path where a first network device reaches the second network device through a first egress interface fails, the first network device only needs to update forwarding information in multiple forwarding table entries, and does not need to update each routing prefix.
For the above method 200 and method 300, after S202 or S302, the updated plurality of first forwarding table entries of the first network device implement sending of the message to the network device set. For example, referring to fig. 11, after S202 or after S302 of the method 300, the method 200 may further include the following S401 to S404:
s401, the first network device receives a third message, and the destination address of the third message is matched with one matching item in the updated first forwarding table item.
S402, the first network device obtains the updated first forwarding information according to the updated association identifier in the first forwarding table item.
For example, the first message may be the above message 1, and the destination address of the message 1 matches with the routing prefix 1, so that, as applicable to the method 200, the guangdong PE device 111 serving as the first network device may determine forwarding information 1 'associated with the association identifier 1 from the forwarding table entry 1' shown in table 3, where the forwarding information 1 'includes SID 1 and the egress interface 1' of the guangzhou core device 121; the guangzhou core device 121 as the first network device may determine the forwarding information 2' associated with the association identifier 2 from the forwarding table entry 3 shown in table 4, where the forwarding information 2' includes SID 2 of the shenyang core device 221 and the egress interface 2'. Applicable to the method 300, the guangdong PE device 111 as the first network device may determine forwarding information 1 "associated with the association identifier 1 from the forwarding table entry 1" shown in table 5, where the forwarding information 1 "includes SID 3 and egress interface 1" of the guangdong core device 122; the guangzhou core device 121 as the first network device may determine the forwarding information 2 "associated with the association identifier 2 from the forwarding table entry 3" shown in table 6, where the forwarding information 2 "includes SID 4 of the shenyang core device 222 and the egress interface 2".
Thus, the first network device is prepared for effectively forwarding the received third message.
S403, the first network device processes the third packet according to the updated segment identifier in the first forwarding information, so as to obtain a fourth packet.
S404, the first network device sends a fourth packet from the second egress interface in the updated first forwarding information.
As an example, when the SID of the second network device is an IPv6 address, applicable to the method 200, S403 may include, for example: the first network equipment modifies the content of the destination address field of the third message into the SID of the second network equipment to obtain a fourth message; thus, the first network device may send the fourth packet to the second network device from the second egress interface. Alternatively, applicable to the method 300, S403 may include, for example: the first network equipment modifies the content of the destination address field of the third message into SID of the third network equipment to obtain a fourth message; thus, the first network device can send the fourth packet to the third network device from the second outgoing interface.
As another example, when the SID of the second network device is an MPLS label, applicable to the method 200, S403 may include, for example: the first network equipment replaces the SID of the first network equipment in the label stack of the third message with the SID of the second network equipment to obtain a fourth message; thus, the first network device can send the fourth packet to the second network device from the second egress interface. Alternatively, applicable to the method 300, S403 may include, for example: the first network equipment replaces the SID of the first network equipment in the label stack of the third message with the SID of the third network equipment to obtain a fourth message; thus, the first network device can send the fourth packet to the third network device from the second outgoing interface.
It should be noted that, for specific implementation and achieved effect of S401 to S404, refer to the above description of S104 to S107.
Thus, when the network topology changes (e.g., a path failure), even if the network structure is very complex, the method 200 or the method 300 can quickly and simply update the forwarding table entry generated by the method 100, so that the first network device can timely and accurately send the received packet to the devices in the network device set, so that the forwarding of the packet is not interrupted for a long time, fast route convergence is achieved, and service continuity is improved.
Correspondingly, an apparatus 1200 for generating a forwarding table entry is further provided in the embodiment of the present application, as shown in fig. 12. The apparatus 1200 for forwarding entry generation is applied to a first network device, which may be the first network device in the embodiment shown in fig. 4. A first network device in a first network is connected to a second network through a network device set, where the network device set includes one or more network devices, and the network device set is a device that connects the first network and the second network, and the apparatus 1200 is applied to the first network device, and may include: a determination unit 1201, an assignment unit 1202, and a generation unit 1203. The determining unit 1201 is configured to determine that forwarding paths corresponding to multiple routes respectively pass through the network device set; the allocating unit 1202 is configured to allocate association identifiers for the multiple routes, where the multiple routes correspond to the same first forwarding information, and the first forwarding information includes a first outgoing interface and a segment identifier of a second network device in the network device set; the generating unit 1203 is configured to generate a plurality of first forwarding table entries corresponding to the plurality of routes, where a matching entry in each of the plurality of first forwarding table entries is associated with the first forwarding information through the association identifier.
When the apparatus 1200 for generating a forwarding entry is configured to execute the method 100 shown in fig. 4, the determining unit 1201 is configured to execute S101 in the method 100 shown in fig. 4, and the specific implementation and the same description refer to S101. The allocating unit 1202 is configured to execute S102 in the method 100 shown in fig. 4, and the specific implementation and the same description refer to S102. The generating unit 1203 is configured to execute S103 in the method 100 shown in fig. 4, and for specific implementation and the same description, see S103.
Wherein the segment identifier comprises a sixth version internet protocol, IPv6, address or a multiprotocol label switching, MPLS, label.
In some possible implementations, the apparatus 1200 may further include: the device comprises a first receiving unit, a first acquiring unit, a first processing unit and a first sending unit. The first receiving unit is used for receiving a first message, and the destination address of the first message is matched with one matching item in the plurality of first forwarding table items; the first obtaining unit is configured to obtain the first forwarding information according to the first association identifier in the plurality of first forwarding table entries; the first processing unit is used for processing the first message according to the segment identifier in the first forwarding information to obtain a second message; the first sending unit is configured to send the second packet to the second network device from the first egress interface in the first forwarding information. The above units are used for executing S104 to S107 in the method 100 shown in fig. 4, and specific implementation and the same description refer to S104 to S107.
As an example, when the segment identifier of the second network device is an IPv6 address, the first processing unit is specifically configured to: and modifying the content of the destination address field of the first message into the segment identifier of the second network equipment to obtain the second message.
As another example, when the segment identifier of the second network device is an MPLS label, the first processing unit is specifically configured to: and adding the segment identifier of the second network equipment in the label stack of the first message to obtain the second message.
In some possible implementations, the apparatus 1200 further includes: a second acquisition unit and an update unit. The second obtaining unit is configured to obtain a second egress interface when it is determined that a first path reaching the second network device through the first egress interface fails, where the second path reaching the second network device through the second egress interface by the first network device is reachable; the updating unit is configured to update the first forwarding information, where the updated first forwarding information includes the segment identifier of the second network device and the second outgoing interface. The units in this embodiment are used to execute the method 200 shown in fig. 9, and the specific implementation and the same description refer to the method 200.
In other possible implementations, when the set of network devices further includes a third network device, the apparatus 1200 further includes: a second acquisition unit and an update unit. The second obtaining unit is configured to obtain a second egress interface when it is determined that a first path reaching the second network device through the first egress interface fails, where the second path reaching the third network device through the second egress interface is reachable by the first network device; the updating unit is configured to update the first forwarding information, where the updated first forwarding information includes the segment identifier of the third network device and the second outgoing interface. The units in this embodiment are used for executing the method 300 shown in fig. 10, and the specific implementation and the same description refer to the method 300.
In this implementation, in one case, the second network device and the third network device have the same segment identifier, for example, the same segment identifier is Anycast SID. In another case, the segment identifier of the second network device and the segment identifier of the third network device are different.
In some possible implementations, the apparatus 1200 further includes: the device comprises a second receiving unit, a third acquiring unit, a second processing unit and a second sending unit. The second receiving unit is configured to receive a third packet, where a destination address of the third packet is matched with one matching entry in the plurality of second forwarding entries; the third obtaining unit is used for obtaining the updated first forwarding information according to the associated identifier; the second processing unit is used for processing the third message according to the segment identifier in the updated first forwarding information to obtain a fourth message; the second sending unit is configured to send the fourth packet from the second egress interface in the updated first forwarding information. The units in this embodiment are configured to perform S401 to S404 shown in fig. 11, and for specific implementation and the same description, refer to S401 to S404.
And storing a copy of the first forwarding information in a storage module of a forwarding plane of the first network device.
And the plurality of routes are all Interior Gateway Protocol (IGP) routes.
As an example, the first network is a network between an operator edge PE device and a core P device, and the second network is a network between P devices.
As another example, the first network is a network between P, and the second network is a network between a P device and a PE device.
For example, the P device may be an area border router ABR.
It should be noted that the units with the same name in the apparatus 1200 for generating a forwarding table entry may be implemented by one or more units with the same function, for example, the first receiving unit and the second receiving unit may be implemented by one receiving unit with a receiving function, or may be implemented by two independent receiving units with receiving functions, which is not limited in this embodiment of the application. Units with different names in the apparatus 1200 for generating forwarding table entries, such as the first receiving unit and the second receiving unit, may be merged or split according to an actual design, as long as implementation of the embodiment of the present application is not affected.
It should be noted that, the apparatus 1200 for generating a forwarding table entry corresponds to the method 100, 200, or 300, and refer to the related description of the method 100, 200, or 300 for a specific implementation manner and an achieved effect.
In addition, referring to fig. 13, an embodiment of the present application further provides a network device 1300, where the network device 1300 may implement the function of the apparatus 1200 for generating a forwarding entry in the embodiment shown in fig. 12, or the network device 1300 may implement the function of the first network device shown in fig. 4, fig. 9, fig. 10, or fig. 11. Network device 1300 includes memory 1301, processor 1302, and communication interface 1303.
The memory 1301 is used to store computer programs or instructions;
the processor 1302 is configured to call a computer program or instructions stored in the memory, so that the network device 1300 performs the method implemented by the first network device in the embodiments shown in fig. 4, fig. 9, fig. 10 or fig. 11.
And a communication interface 1303 for communicating with other devices in the network.
The memory 1301, the processor 1302, and the communication interface 1303 are connected to each other by a bus 1304; the bus 1304 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 13, but that does not indicate only one bus or one type of bus.
In a specific embodiment, the processor 1301 is configured to determine that forwarding paths corresponding to multiple routes respectively pass through the network device set; processor 1301 is further configured to assign association identifiers to the plurality of routes, where the plurality of routes correspond to the same first forwarding information; processor 1301 is further configured to generate a plurality of first forwarding table entries corresponding to the plurality of routes. For a detailed processing procedure of the processor 1301, please refer to S101 to S103 in the embodiment shown in fig. 4, which is not described herein again.
The communication interface 1303 is configured to receive a first packet, and the communication interface 1303 is further configured to send the second packet to the second network device from the first outgoing interface in the first forwarding information. For a specific process, please refer to S104 and S107 in the embodiment shown in fig. 4, which are not described herein again.
The memory 1301 may be a random-access memory (RAM), a flash memory (flash), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register (register), a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known to those skilled in the art.
The processor 1302 may be, for example, a Central Processing Unit (CPU), a general-purpose processor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like.
The communication interface 1303 may be an ethernet interface or an Asynchronous Transfer Mode (ATM) interface, for example.
An embodiment of the present application provides a computer-readable storage medium, which includes instructions, when executed on a computer, causing the computer to execute the method for generating the forwarding table entry.
The embodiment of the present application further provides a chip, where the chip is disposed in the apparatus 1200 for generating a forwarding entry or the network device 1300, and the chip includes a processor and an interface circuit. The interface circuit is used for receiving the code instruction and transmitting the code instruction to the processor; the processor is configured to execute the code instructions to perform the above-described method for forwarding table entry generation applied to the first network device in the embodiment shown in fig. 4.
In the present application, "at least one item(s)" means one or more, "a plurality" means two or more. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple. In the present application "A and/or B" is considered to comprise A alone, B alone, and A + B.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It can be clearly understood by those skilled in the art that, for convenience and simplicity 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 manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical module division, and other division manners may be available in actual implementation, for example, a plurality of units or components may be combined or may be 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 place, or may be distributed on a plurality of network units. Some or all of the units can be obtained according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, each module unit 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 integrated unit can be realized in a hardware form, and can also be realized in a software module unit form.
The integrated unit, if implemented as a software module unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, 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, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. 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.
Those skilled in the art will recognize that in one or more of the examples described above, the functions described herein may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-described embodiments are intended to provide further details of the objects, technical solutions and advantages of the present application, and it should be understood that the above-described embodiments are merely exemplary embodiments of the present application.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (29)

1. A method for generating forwarding table entries, wherein a first network device in a first network is connected to a second network through a network device set, the network device set includes one or more network devices, and the network device set is a device that connects the first network and the second network, the method comprising:
the first network equipment determines that forwarding paths corresponding to a plurality of routes respectively pass through the network equipment set;
the first network device allocates associated identifiers for the plurality of routes, the plurality of routes correspond to the same first forwarding information, and the first forwarding information comprises a first outgoing interface and segment identifiers of second network devices in the network device set;
the first network device generates a plurality of first forwarding table entries corresponding to the plurality of routes, and a matching entry in each of the plurality of first forwarding table entries is associated with the first forwarding information through the association identifier.
2. The method of claim 1, wherein the segment identifier comprises a version six internet protocol (IPv 6) address or a multi-protocol label switching (MPLS) label.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
the first network equipment receives a first message, and the destination address of the first message is matched with one matching item in the first forwarding table items;
the first network device obtains the first forwarding information according to the first association identifier in the plurality of first forwarding table entries;
the first network equipment processes the first message according to the segment identifier in the first forwarding information to obtain a second message;
and the first network equipment sends the second message to the second network equipment from the first output interface in the first forwarding information.
4. The method of claim 3, wherein when the segment identifier of the second network device is an IPv6 address, the first network device processes the first packet according to the segment identifier in the first forwarding information to obtain a second packet, and the method includes:
and the first network equipment modifies the content of the destination address field of the first message into the segment identifier of the second network equipment to obtain the second message.
5. The method according to claim 3, wherein when the segment identifier of the second network device is an MPLS label, the first network device processes the first packet according to the segment identifier in the first forwarding information to obtain a second packet, and the method includes:
and the first network equipment adds the segment identifier of the second network equipment in the label stack of the first message to obtain the second message.
6. The method according to any one of claims 1 to 5, further comprising:
when determining that a first path reaching the second network device through the first outgoing interface fails, the first network device obtains a second outgoing interface, and a second path reaching the second network device through the second outgoing interface by the first network device is reachable;
the first network device updates the first forwarding information, and the updated first forwarding information includes the segment identifier of the second network device and the second outgoing interface.
7. The method according to any of claims 1 to 5, wherein when the set of network devices further comprises a third network device, the method further comprises:
when determining that a first path reaching the second network device through the first outgoing interface fails, the first network device obtains a second outgoing interface, and a second path reaching the third network device through the second outgoing interface is reachable by the first network device;
the first network device updates the first forwarding information, and the updated first forwarding information includes the segment identifier of the third network device and the second outgoing interface.
8. The method of claim 7, wherein the second network device and the third network device have the same segment identity.
9. The method of claim 8, wherein the same segment identifier is an Anycast SID.
10. The method of any of claims 6 to 9, further comprising:
the first network equipment receives a third message, and the destination address of the third message is matched with one matching item in the updated first forwarding table item;
the first network equipment obtains the updated first forwarding information according to the association identifier;
the first network equipment processes the third message according to the updated segment identifier in the first forwarding information to obtain a fourth message;
and the first network equipment sends the fourth message from the second output interface in the updated first forwarding information.
11. Method according to any of claims 1 to 10, characterized in that a copy of the first forwarding information is stored in a storage module of a forwarding plane of the first network device.
12. The method according to any of claims 1 to 11, wherein said plurality of routes are interior gateway protocol, IGP, routes.
13. The method according to any of claims 1 to 12, wherein the first network is a network between an operator edge PE device and a core P device, and the second network is a network between a plurality of P devices.
14. The method according to any one of claims 1 to 12, wherein the first network is a network between a plurality of P, and the second network is a network between a P device and a PE device.
15. The method according to claim 13 or 14, wherein the P device is an area border router, ABR.
16. An apparatus for generating forwarding table entries, wherein a first network device in a first network is connected to a second network through a network device set, the network device set includes one or more network devices, the network device set is a device that connects the first network and the second network, and the apparatus is applied to the first network device, and the apparatus includes:
a determining unit, configured to determine that forwarding paths corresponding to multiple routes respectively pass through the network device set;
an allocating unit, configured to allocate association identifiers for the multiple routes, where the multiple routes correspond to the same first forwarding information, and the first forwarding information includes a first outgoing interface and a segment identifier of a second network device in the network device set;
a generating unit, configured to generate a plurality of first forwarding table entries corresponding to the plurality of routes, where a matching entry in each of the plurality of first forwarding table entries is associated with the first forwarding information through the association identifier.
17. The apparatus of claim 16, wherein the segment identifier comprises an internet protocol version six (IPv) 6 address or a multiprotocol label switching (MPLS) label.
18. The apparatus of claim 16 or 17, further comprising:
a first receiving unit, configured to receive a first packet, where a destination address of the first packet matches one matching entry in the first forwarding table entries;
a first obtaining unit, configured to obtain the first forwarding information according to the first association identifier in the multiple first forwarding table entries;
a first processing unit, configured to process the first packet according to the segment identifier in the first forwarding information to obtain a second packet;
a first sending unit, configured to send the second packet to the second network device from the first outgoing interface in the first forwarding information.
19. The apparatus according to claim 18, wherein when the segment identifier of the second network device is an IPv6 address, the first processing unit is specifically configured to:
and modifying the content of the destination address field of the first message into the segment identifier of the second network equipment to obtain the second message.
20. The apparatus of claim 18, wherein when the segment identifier of the second network device is an MPLS label, the first processing unit is specifically configured to:
and adding the segment identifier of the second network equipment in the label stack of the first message to obtain the second message.
21. The apparatus of any one of claims 16 to 20, further comprising:
a second obtaining unit, configured to obtain a second egress interface when it is determined that a first path that reaches the second network device through the first egress interface fails, where a second path that reaches the second network device through the second egress interface is reachable by the first network device;
an updating unit, configured to update the first forwarding information, where the updated first forwarding information includes the segment identifier of the second network device and the second outgoing interface.
22. The apparatus according to any of claims 16 to 20, wherein when the set of network devices further comprises a third network device, the apparatus further comprises:
a second obtaining unit, configured to obtain a second egress interface when it is determined that a first path that reaches the second network device through the first egress interface fails, where a second path that reaches the third network device through the second egress interface is reachable by the first network device;
an updating unit, configured to update the first forwarding information, where the updated first forwarding information includes the segment identifier of the third network device and the second outgoing interface.
23. The apparatus of claim 22, wherein the second network device and the third network device have the same segment identifier.
24. The apparatus of claim 23, wherein the same segment identification is an Anycast SID.
25. The apparatus of any one of claims 21 to 24, further comprising:
a second receiving unit, configured to receive a third packet, where a destination address of the third packet matches one matching entry in the updated first forwarding table entry;
a third obtaining unit, configured to obtain the updated first forwarding information according to the association identifier;
a second processing unit, configured to process the third packet according to the updated segment identifier in the first forwarding information, so as to obtain a fourth packet;
a second sending unit, configured to send the fourth packet from the second egress interface in the updated first forwarding information.
26. The apparatus according to any of claims 16 to 25, wherein a copy of the first forwarding information is stored in a storage module of a forwarding plane of the first network device.
27. A network device comprising a processor and a memory, the memory for storing a computer program or instructions, the processor for invoking the computer program or instructions stored in the memory to cause the network device to perform the method of any of claims 1-15.
28. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 15.
29. A computer program product, characterized in that it comprises a program which, when run on a processor, implements the method of any one of claims 1 to 15.
CN202110547033.8A 2021-05-19 2021-05-19 Method, device and equipment for generating forwarding table item Pending CN115460137A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110547033.8A CN115460137A (en) 2021-05-19 2021-05-19 Method, device and equipment for generating forwarding table item

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110547033.8A CN115460137A (en) 2021-05-19 2021-05-19 Method, device and equipment for generating forwarding table item

Publications (1)

Publication Number Publication Date
CN115460137A true CN115460137A (en) 2022-12-09

Family

ID=84294392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110547033.8A Pending CN115460137A (en) 2021-05-19 2021-05-19 Method, device and equipment for generating forwarding table item

Country Status (1)

Country Link
CN (1) CN115460137A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319514A (en) * 2023-05-22 2023-06-23 腾讯科技(深圳)有限公司 Data processing method and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319514A (en) * 2023-05-22 2023-06-23 腾讯科技(深圳)有限公司 Data processing method and related device
CN116319514B (en) * 2023-05-22 2023-08-08 腾讯科技(深圳)有限公司 Data processing method and related device

Similar Documents

Publication Publication Date Title
CN109981458B (en) Method, network node and system for determining message forwarding path
US10333836B2 (en) Convergence for EVPN multi-homed networks
US11431633B2 (en) Label forwarding entry generation method and apparatus, packet sending method and apparatus, and device
US8576721B1 (en) Local forwarding bias in a multi-chassis router
US8787149B1 (en) MAC address synchronization for multi-homing with multichassis link aggregation
EP3949289B1 (en) Bgp aggregation in clos networks
CN101601232B (en) Triple-tier anycast addressing
CN111355661B (en) VPN processing method, PE equipment and system
EP2645645A1 (en) Packet network routing
US20230208760A1 (en) Entry generation method, packet sending method, device, and system
CN114760243A (en) Message transmission method, device and system
CN114760165B (en) Message transmission method, device and system
CN112822097A (en) Message forwarding method, first network device and first device group
CN115460137A (en) Method, device and equipment for generating forwarding table item
CN113872843B (en) Route generation method, route processing method and device
US20220158931A1 (en) Filtering topologies for path computation in massively scaled networks
CN115460107A (en) Route detection method, device, system and storage medium
CN114697251A (en) Routing processing method, related device and network system
WO2023169364A1 (en) Routing generation method and apparatus, and data message forwarding method and apparatus
EP4191964A1 (en) Method and device for transmitting virtual private network segment identification (vpn sid), and network device
CN111565141B (en) Data transmission method, first PE and second PE
CN117640485A (en) Route processing method, route determining method and route determining device
CN114157531A (en) Method, device and network equipment for transmitting segment identification VPN SID of virtual private network
CN117692384A (en) Method for realizing VPN local interview and related device
CN116781618A (en) Route generation method, data message forwarding method and device

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