Method, device, network device and readable storage medium for expanding routing specifications

By reserveing ​​TCAM index for PE devices in the MPLS VPN network and issuing default routes, the problem of VRF routing specifications and resource waste is solved, efficient utilization of resources is achieved, and routing specifications and resource utilization efficiency is improved.

CN115914095BActive Publication Date: 2024-11-15SUZHOU CENTEC COMM CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202211178074.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2024-11-15
Estimated Expiration
2042-09-23

AI Technical Summary

Technical Problem

In MPLS VPN networks, due to the limited memory space of routing devices, VRF routing specifications become bottlenecks, resulting in waste of TCAM resources and shortage of other effective routing resources.

Method used

By reserving TCAM indexes based on the number of VRFs on PE devices, each index contains the egress information of forwarded table entries, issuing a default route for each VRF, and issuing valid routes for some VRFs, occupying actual TCAM resources, and avoiding The default route occupies resources.

Benefits of technology

It effectively improves the routing specifications, saves TCAM resources, improves resource utilization, and avoids resource shortage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914095B_ABST
    Figure CN115914095B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, network device and readable storage medium for expanding routing specifications. In a virtual private network architecture, a PE device is divided into multiple virtual routers through VRF. A corresponding number of TCAM indexes are reserved according to the number of VRFs on the PE device. Each TCAM index contains index information pointing to a forwarding table entry, and the forwarding table entry stores the egress information of the message. A default route is issued for each VRF on the PE device, each default route corresponds to a TCAM index, and valid routes are issued for some VRFs on the PE device, each valid route occupies a TCAM resource on the PE device. The TCAM index is reserved for each VRF to correspond to the default route, which avoids the problem that the default route in the prior art needs to occupy TCAM resources, thereby causing a waste of TCAM resources, and then causing the problem of shortage of TCAM resources for other valid routes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, an apparatus, a network device and a readable storage medium for expanding routing specifications. Background Art

[0002] With the rapid development of the Internet, VPN (Virtual Private Network) technology has been widely used. Its unique advantage of using public networks to build private networks allows operators to provide more value-added services on the existing basis. MPLS (Multi-Protocol Label Switching) as an efficient IP backbone network technology platform provides a flexible and scalable technical foundation for the realization of VPN, which has derived the MPLS VPN network.

[0003] In order to manage user terminals in MPLS VPN networks, the concept of VRF (Virtual Routing Forwarding) is introduced to logically divide routing devices into multiple virtual routers. Since the memory space of routing devices is limited, the VRF routing specifications that can be stored in the device become a major bottleneck of routing devices. It is necessary to expand the VRF routing specifications on the existing basis.

[0004] In order to improve the performance of route lookup, some routing devices currently use TCAM (ternary content addressable memory) to store routes, with the storage key being VRF+IP. Therefore, routes with different VRFs but the same IP must also occupy multiple TCAM resources according to VRF. In general, the routing device needs to issue a default route for the VRF corresponding to each VPN, which serves as the default route forwarding path when no other routes can be found for the IP traffic under the VPN. That is, the default routes of the corresponding number of VRFs must be issued for the number of VPNs, occupying the corresponding number of TCAM resources.

[0005] In this method of the prior art, when some VPNs created on the routing device have no valid routes for the corresponding user devices and only have corresponding VRF default routes, since the default routes also occupy TCAM resources, the TCAM resources occupied by the VRF will be wasted, thereby causing resource shortages for other user devices with valid routes. Summary of the invention

[0006] The objectives of the present invention include, for example, providing a method, an apparatus, a network device and a readable storage medium for expanding routing specifications, which can improve routing specifications and avoid wasting TCAM resources.

[0007] The embodiments of the present invention can be implemented as follows:

[0008] In a first aspect, the present invention provides a method for expanding routing specifications, which is applied to a PE device in a virtual private network architecture, wherein the virtual private network architecture further includes a CE device and a P router communicating with the PE device, and the PE device is logically divided into multiple virtual routers through VRF, and the method comprises:

[0009] A corresponding number of TCAM indexes are reserved according to the number of VRFs into which the PE device is divided, each TCAM index comprising index information pointing to a forwarding table entry, wherein the forwarding table entry stores egress information of a message;

[0010] Sending a default route to each of the VRFs on the PE device, each default route corresponding to a reserved TCAM index;

[0011] Valid routes are delivered to some VRFs on the PE device, and each valid route occupies a TCAM resource of the PE device.

[0012] In an optional implementation manner, the forwarding table entries pointed to by the index information included in the multiple TCAM indexes are the same forwarding table entry, or are multiple different forwarding table entries.

[0013] In an optional implementation manner, the effective route is routing information allocated by a CE device that has an actual interactive link with the PE device;

[0014] The default route is the routing information allocated by the CE device with which no actual interactive link has been established.

[0015] In an optional embodiment, the method further comprises:

[0016] When receiving a message from any CE device, obtain the VRF to which the CE device belongs and the IP information of the CE device;

[0017] According to the VRF and IP information to which the CE device belongs, the egress information of the message is obtained by searching a TCAM entry or a reserved TCAM index, wherein the TCAM entry includes index information related to the TCAM resource;

[0018] The message is forwarded based on the egress information.

[0019] In an optional implementation manner, the step of obtaining the egress information of the message by searching a TCAM entry or a reserved TCAM index according to the VRF and IP information to which the CE device belongs includes:

[0020] According to the VRF and IP information to which the CE device belongs, searching for VRF and IP information corresponding to each TCAM resource in the TCAM entry;

[0021] If a TCAM resource corresponding to the VRF and IP information to which the CE device belongs is found, the index information of the TCAM resource is obtained, and the egress information pointed to by the index information is obtained;

[0022] If the TCAM resource corresponding to the VRF and IP information to which the CE device belongs is not found, the reserved TCAM index is searched to obtain the egress information of the message.

[0023] In an optional implementation manner, the reserved TCAM index corresponds one-to-one to the VRF on the PE device;

[0024] The step of searching the reserved TCAM index to obtain the egress information of the message includes:

[0025] Determine a corresponding TCAM index in the reserved TCAM indexes according to the VRF to which the CE device belongs;

[0026] The pointed forwarding table entry is obtained based on the corresponding TCAM index, and the egress information in the forwarding table entry is obtained.

[0027] In an optional implementation manner, the egress information includes egress port information and next hop editing information of the message on the PE device.

[0028] In a second aspect, the present invention provides a device for expanding routing specifications, which is applied to a PE device in a virtual private network architecture, wherein the virtual private network architecture further includes a CE device and a P router communicating with the PE device, and the PE device is logically divided into multiple virtual routers through VRF, and the device includes:

[0029] A reservation module, used to reserve a corresponding number of TCAM indexes according to the number of VRFs into which the PE device is divided, each TCAM index including index information pointing to a forwarding table entry, and the forwarding table entry stores egress information of the message;

[0030] A first issuing module is used to issue a default route to each VRF on the PE device, and each default route corresponds to a reserved TCAM index;

[0031] The second issuing module is used to issue valid routes to some VRFs on the PE device, and each valid route occupies a TCAM resource of the PE device.

[0032] In a third aspect, the present invention provides a network device, comprising one or more storage media and one or more processors communicating with the storage media, wherein the one or more storage media store machine-executable instructions executable by the processor, and when the network device is running, the processor executes the machine-executable instructions to perform the method steps described in any one of the aforementioned embodiments.

[0033] In a fourth aspect, the present invention provides a readable storage medium, wherein the readable storage medium stores machine executable instructions, and when the machine executable instructions are executed, the method steps described in any one of the aforementioned embodiments are implemented.

[0034] The beneficial effects of the embodiments of the present invention include, for example:

[0035] The present application provides a method, apparatus, network device and readable storage medium for expanding routing specifications. When a PE device is divided into multiple virtual routers through VRF in a virtual private network architecture, a corresponding number of TCAM indexes are reserved according to the number of VRFs into which the PE device is divided, and each TCAM index contains index information pointing to a forwarding table entry, and the forwarding table entry stores the egress information of the message. A default route is issued for each VRF on the PE device, and each default route corresponds to a reserved TCAM index, and valid routes are issued for some VRFs on the PE device, and each valid route occupies a TCAM resource of the PE device. In this solution, by reserving a TCAM index for each VRF to correspond to the default route, the problem that the default route in the prior art needs to occupy TCAM resources is avoided, which leads to a waste of TCAM resources and causes other valid routes to occupy TCAM resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 A schematic diagram of a virtual private network architecture provided in an embodiment of the present application;

[0038] Figure 2 A flowchart of a method for expanding routing specifications provided in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of resource occupancy in the prior art and this application;

[0040] Figure 4 A flowchart of a message forwarding method in a method for expanding routing specifications provided in an embodiment of the present application;

[0041] Figure 5 for Figure 4 Flow chart of sub-steps included in step S202;

[0042] Figure 6 for Figure 5 This is a flowchart of the sub-steps included in step S2023;

[0043] Figure 7 A structural block diagram of a network device provided in an embodiment of the present application;

[0044] Figure 8 A functional module block diagram of an apparatus for expanding routing specifications provided in an embodiment of the present application.

[0045] Icons: 110 - storage medium; 120 - processor; 130 - device for expanding routing specifications; 131 - reserved module; 132 - first sending module; 133 - second sending module; 140 - transmission device; 150 - input and output device. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0047] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0049] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0050] See also Figure 1, is a schematic diagram of a virtual private network architecture provided in an embodiment of the present application, that is, an MPLS VPN (Multi-Protocol Label Switching Virtual Private Network) network. The MPLS VPN network consists of three network devices:

[0051] CE (Custom Edge) equipment: edge equipment in the user network that is directly connected to the service provider.

[0052] PE (Provider Edge) device: edge device in the backbone network, directly connected to the user's CE.

[0053] P router (Provider Router): A device in the backbone network that is not directly connected to the CE.

[0054] In the MPLS VPN network connection model, the service provider provides VPN services to users, and users do not feel the existence of the public network, just like having independent network resources. All VPNs work on PE devices. Therefore, any two VPNs can use overlapping address spaces, that is, there are multiple CE devices using overlapping network segments.

[0055] When you want to distribute traffic to different CE devices on a PE device, or forward a specific IP of a CE device differently while keeping the original forwarding for other IPs, the concept of VRF (Virtual Routing Forwarding) is introduced to achieve this goal. VRF only exists on PE devices and logically divides PE devices into multiple virtual routers, that is, each VRF corresponds to a VPN, with its own independent routing table, forwarding table and corresponding interface.

[0056] Since the memory space of the router is limited, usually a PE device needs to connect to multiple VPNs, and each user's CE device will inject a large number of routing entries into the PE device. Then the VRF routing specifications that the device can store become a major bottleneck for the operation of the PE device. Therefore, it is necessary to expand the VRF routing specifications on the existing basis to improve the performance of the PE device and reduce the operator's business costs.

[0057] In order to improve the performance of route lookup, some PE devices currently use TCAM (ternary content addressable memory) to store routes. The storage key is VRF+IP. Therefore, routes with different VRFs but the same IP must occupy multiple TCAM resources according to VRF.

[0058] Generally, a default route needs to be issued for the VRF corresponding to each VPN on the PE device as the default route forwarding path for IP traffic under the VPN that cannot find other routes. That is, the default routes of the corresponding number of VRFs need to be issued for the number of VPNs, occupying the corresponding number of TCAM resources.

[0059] In this way, when some VPNs created on the PE device have no valid routes to the corresponding user CE devices and only the corresponding VRF default routes exist, the TCAM resources occupied by the VRF will be wasted, which will lead to a shortage of TCAM resources corresponding to other valid routes.

[0060] Based on the above research findings, this application provides a method for expanding routing specifications. Figure 2 , is a flow chart of a method for expanding routing specifications provided in an embodiment of the present application. The method steps defined in the flow chart related to the method for expanding routing specifications can be implemented by a network device, for example, the above-mentioned PE device. Figure 2 The specific process shown is described in detail.

[0061] S101, reserve a corresponding number of TCAM indexes according to the number of VRFs into which the PE device is divided, each TCAM index contains index information pointing to a forwarding table entry, and the forwarding table entry stores egress information of a message.

[0062] S102: Send a default route to each of the VRFs on the PE device, where each default route corresponds to a reserved TCAM index.

[0063] S103: Issue valid routes to some VRFs on the PE device, each valid route occupies a TCAM resource of the PE device.

[0064] As can be seen from the above, PE devices are logically divided into multiple virtual routers through VRF, that is, each PE device will correspond to multiple VRFs. Since each VRF has a default route, it may also have a valid route. The valid route will need to occupy the actual TCAM resources. If there is only a default route, there is no need to occupy the actual TCAM resources, but the corresponding forwarding index information needs to be set for the corresponding CE device.

[0065] Therefore, in this embodiment, a corresponding number of TCAM indexes are reserved according to the number of VRFs into which the PE device is divided, and the TCAM index exists in the form of TCAMAD entries. Each TCAM index contains index information pointing to a forwarding entry, and the forwarding entry stores the egress information of the message.

[0066] In this way, when a default route is delivered to each VRF on the PE device, each default route corresponds to a reserved TCAM index.

[0067] Since TCAMAD is generally stored in SRAM and the table entries are small, compared with the situation where the default route of each VRF needs to occupy actual TCAM resources, it can greatly save resources.

[0068] In addition, valid routes need to be delivered for some VRFs on the PE device, where some VRFs will be determined based on the interactive links established between the CE device and the PE device in actual situations.

[0069] Specifically, the effective route is the route information allocated by the CE device that has an actual interactive link with the PE device, while the default route is the route information allocated by the CE device that has not established an actual interactive link with the PE device.

[0070] That is, in actual situations, the PE device has a certain amount of TCAM resources. The VRF corresponding to the CE device that has established an actual interactive link with the PE device will be issued a valid route, and each valid route will occupy a TCAM resource of the PE device.

[0071] The default route that needs to be issued for each VRF is to enable the corresponding CE device to determine the forwarding path by the default route when there is no other valid route. The default route can be understood as the routing information when there is no actual interactive link between the corresponding CE device and the PE device.

[0072] In this embodiment, the existing method in which the effective route and default route of each VRF need to occupy TCAM resources is abandoned. Instead, a TCAM index is reserved for each VRF to directly point to the index information in the forwarding table. In this way, a reserved TCAM index is allocated to the default route issued by each VRF on the PE device. In this way, when the TCAM resources on the PE device are certain, the saved TCAM resources can be used for the occupation of other effective routes, thereby improving the utilization rate of TCAM resources and improving the specifications of VRF routes.

[0073] In this embodiment, the forwarding table entries pointed to by the index information included in the multiple TCAM indexes may be the same forwarding table entry, or may be multiple different forwarding table entries.

[0074] For example, when multiple TCAM indexes point to the same forwarding table entry, the default routes assigned will eventually correspond to the same egress information, and the message will be forwarded by the same egress. In this case, the default forwarding behavior of each VRF is consistent, which can greatly save the egress information resources in the forwarding table while saving TCAM resources.

[0075] In addition, when the index information contained in the multiple TCAM indexes points to multiple forwarding entries, for example, two or three entries may be pointed to. In this case, the default routes of multiple VRFs may correspond to multiple forwarding egress information, which can save egress information resources to a certain extent.

[0076] Please combine Figure 3 The schematic diagram of VRF resource occupancy in the prior art and VRF resource occupancy in the present invention is shown in . Assume that the total TCAM resources on the PE device are 8192 in total, and a total of 4096 VPNs are created on the PE device, corresponding to 4096 VRFs, 0-4095 in sequence. Assume that VRF0 stores a total of 4096 valid routes and 1 default route, and the remaining 4095 VRFs each send a default route.

[0077] Taking the IPv4 routes stored on the PE device as an example, the egress information in the forwarding table is stored by DsIpDa, where the egress information includes the egress port information and next hop editing information of the message on the PE device. TcamAD corresponds to the TCAM routing table one by one, and stores the dsAdIndx corresponding to the TCAM, which is used to index DsIpDa.

[0078] Based on the resource occupation strategy in the prior art, the resource occupation of each VRF is as follows:

[0079] VRF0 stores 4096 valid routes and 1 default route, occupying 4097 TCAM resources;

[0080] VRF1-VRF4095, each VRF sends a default route, occupying 4095 TCAM resources.

[0081] According to the above-mentioned method in the prior art, the total TCAM resources on the PE device will be exhausted.

[0082] In addition, based on the resource occupation strategy in the present invention, the resource occupation of each VRF is as follows:

[0083] The PE device (chip) reserves 4096 TCAM indexes according to the number of VRFs and stores them in the form of AD entries;

[0084] VRF0 stores 4096 valid routes and 1 default route, occupying 4096 TCAM resources;

[0085] VRF1-VRF4095, each VRF sends a default route, occupying 0 TCAM resources, and each default route corresponds to a TCAM index.

[0086] According to the resource occupation strategy of the present invention, 4096 TCAM resources on the PE device will be saved at this time. In addition, when the forwarding table entry pointed to by the index information contained in multiple TCAM indexes is the same forwarding table entry, the 4096 default routes will correspond to the same default forwarding path, and 4095 egress information resources can be saved at this time.

[0087] Based on the resource occupation strategy provided above in this embodiment, please refer to Figure 4 The method for expanding the routing specification provided in the embodiment of the present application further includes the following steps:

[0088] S201, when a message is obtained from any CE device, the VRF to which the CE device belongs and the IP information of the CE device are obtained.

[0089] S202: Obtain the egress information of the message by searching a TCAM entry or a reserved TCAM index according to the VRF and IP information to which the CE device belongs, wherein the TCAM entry includes index information related to TCAM resources.

[0090] S203: forward the message based on the egress information.

[0091] In this embodiment, TCAM resources can be understood as resource information storing VRF and IP information, where VRF and IP information will be used together as keys. TCAM entries can be understood as index information storing keys in TCAM resources, which can be used to index forwarding entries. Taking the IPV4 routes stored on the PE device as an example, the egress information in the forwarding entry is stored by DsIpDa, where the egress information includes the egress port information and next hop editing information of the message on the PE device.

[0092] In this embodiment, a message from any CE device enters from the inbound port of the PE device and is forwarded after being analyzed and processed by the PE device. The PE device can obtain the VRF and IP information of the CE device based on the message information in the received message. The VRF and IP information of the CE device are used as keys for search and forwarding.

[0093] As can be seen from the above, the effective route between the CE device and the PE device will occupy the actual TCAM resources, while the default route between the CE device and the PE device will correspond to the reserved TCAM index.

[0094] Therefore, for a message from any CE device, the egress information of the message can be obtained by searching a TCAM entry or a reserved TCAM index, thereby implementing message forwarding.

[0095] Specifically, see Figure 5 , the above step S202 may include the following sub-steps:

[0096] S2021: Search for VRF and IP information corresponding to each TCAM resource in the TCAM entry according to the VRF and IP information to which the CE device belongs.

[0097] S2022: If a TCAM resource corresponding to the VRF and IP information to which the CE device belongs is found, obtain index information of the TCAM resource, and acquire egress information pointed to by the index information.

[0098] S2023: If the TCAM resource corresponding to the VRF and IP information to which the CE device belongs is not found, a reserved TCAM index is searched to obtain the egress information of the message.

[0099] In this embodiment, first, the TCAM entry can be searched based on the VRF and IP information to which the CE device belongs. Generally, if there is a valid route between the CE device and the PE device, the valid route will occupy the actual TCAM resource, and the TCAM resource will have the VRF and IP information to which the CE device belongs. The TCAM entry contains index information related to the TCAM resource. Therefore, the TCAM resource corresponding to the VRF and IP information to which the CE device belongs can be found in the TCAM entry, and then the index information of the TCAM resource can be obtained. The index information of the TCAM resource will point to the forwarding table entry DsIpDa. By parsing the forwarding table entry, the egress information therein is obtained. After the message is edited and processed, the message can be forwarded through the obtained egress information.

[0100] In addition, if the TCAM resource corresponding to the VRF and IP information of the CE device is not found in the TCAM entry, it indicates that there may be no valid route between the CE device and the PE device, but only a default route. In this case, since the default route issued by each VRF corresponds to a reserved TCAM index, the egress information of the message can be obtained by searching the reserved TCAM index and then forwarding it.

[0101] In this embodiment, the reserved TCAM index corresponds to the VRF on the PE device one by one. Figure 6 In the above step of obtaining the egress information of the message by searching the reserved TCAM index to forward the message, it can be implemented in the following way:

[0102] S20231: Determine a corresponding TCAM index in the reserved TCAM indexes according to the VRF to which the CE device belongs.

[0103] S20232, obtain the pointed forwarding table entry based on the corresponding TCAM index, and obtain the egress information in the forwarding table entry.

[0104] As can be seen from the above, VRF corresponds to the reserved TCAM index one by one. Therefore, when the VRF corresponding to the CE device is obtained, the TCAM index corresponding to the VRF in the reserved TCAM index can be determined. The TCAM index contains index information pointing to the forwarding table entry. Therefore, the pointed forwarding table entry can be obtained, and then the egress information in the forwarding table entry can be obtained. According to the obtained egress information, the message is forwarded after editing the message.

[0105] In the method for expanding the route specification provided in this embodiment, a TCAM index is reserved for each VRF on the PE device, and the forwarding information is directly given by storing the default route, thereby replacing the previous method of sending down routes to occupy TCAM resources, thereby improving the utilization rate of TCAM resources and thus improving the specifications of VRF routes.

[0106] Specifically, taking the above as an example, assuming that the total TCAM resources on the PE device are 8192, a total of 4096 VPNs are created, and the corresponding VRFs are 0-4095, corresponding to VRF 0, a total of 4096 valid routes and 1 default route are stored, and the remaining 4095 VPNs respectively send default routes. Then the TCAM resources under the prior art have been completely exhausted at this time, and only 4096 VRF routes and 4096 default routes are supported. However, if the occupation strategy in the present invention is followed, by directly giving forwarding information and storing default route behavior for each VRF reserved TCAM index, 4096 TCAM resources can be saved, that is, on the original basis, 4096 routes can continue to be sent, which is nearly half of the specification of route entries. The overall specification supports 8192 VRF valid routes and 4096 default routes, which greatly expands the specification of VRF routes. In special cases, that is, when multiple TCAM indexes point to the same forwarding table entry, 4095 export information resources can also be saved.

[0107] See also Figure 7The embodiment of the present application further provides a network device, including one or more storage media 110 and one or more processors 120, and the storage medium 110 communicates with the processor 120. The storage medium 110 stores machine executable instructions, and the processor 120 is configured to run the machine executable instructions to execute the steps in any of the above method embodiments.

[0108] Optionally, the network device may further include a transmission device 140 and an input / output device 150 , wherein the transmission device 140 is connected to the processor 120 , and the input / output device 150 is connected to the processor 120 .

[0109] Optionally, in this embodiment, the processor 120 may be configured to perform the following steps through machine executable instructions:

[0110] A corresponding number of TCAM indexes are reserved according to the number of VRFs into which the PE device is divided, each TCAM index comprising index information pointing to a forwarding table entry, wherein the forwarding table entry stores egress information of a message;

[0111] Sending a default route to each of the VRFs on the PE device, each default route corresponding to a reserved TCAM index;

[0112] Valid routes are delivered to some VRFs on the PE device, and each valid route occupies a TCAM resource of the PE device.

[0113] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0114] According to another embodiment of the present application, a device 130 for expanding routing specifications is provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0115] Figure 8 FIG. 1 is a structural block diagram of an apparatus 130 for expanding routing specifications according to an embodiment of the present application. Figure 8 As shown in , the device includes:

[0116] A reservation module 131 is used to reserve a corresponding number of TCAM indexes according to the number of VRFs into which the PE device is divided, each TCAM index including index information pointing to a forwarding table entry, and the forwarding table entry stores egress information of the message;

[0117] It can be understood that the reservation module 131 can be used to execute the above step S101. The detailed implementation of the reservation module 131 can refer to the above content related to step S101.

[0118] A first issuing module 132 is used to issue a default route to each VRF on the PE device, and each default route corresponds to a reserved TCAM index;

[0119] It can be understood that the first sending module 132 can be used to execute the above step S102. The detailed implementation of the first sending module 132 can refer to the above content related to step S102.

[0120] The second issuing module 133 is used to issue valid routes to some VRFs on the PE device, and each valid route occupies a TCAM resource of the PE device.

[0121] It can be understood that the second sending module 133 can be used to execute the above step S103. The detailed implementation of the second sending module 133 can refer to the above content related to step S103.

[0122] In a possible implementation manner, the forwarding table entries pointed to by the index information included in the multiple TCAM indexes are the same forwarding table entry, or are multiple different forwarding table entries.

[0123] In a possible implementation manner, the effective route is routing information allocated by a CE device that has an actual interactive link with the PE device;

[0124] The default route is the routing information allocated by the CE device with which no actual interactive link has been established.

[0125] In a possible implementation manner, the above device further includes a forwarding module, and the forwarding module may be used to:

[0126] When receiving a message from any CE device, obtain the VRF to which the CE device belongs and the IP information of the CE device;

[0127] According to the VRF and IP information to which the CE device belongs, the egress information of the message is obtained by searching a TCAM entry or a reserved TCAM index, wherein the TCAM entry includes index information related to the TCAM resource;

[0128] The message is forwarded based on the egress information.

[0129] In a possible implementation manner, the forwarding module may be used to:

[0130] According to the VRF and IP information to which the CE device belongs, searching for VRF and IP information corresponding to each TCAM resource in the TCAM entry;

[0131] If a TCAM resource corresponding to the VRF and IP information to which the CE device belongs is found, the index information of the TCAM resource is obtained, and the egress information pointed to by the index information is obtained;

[0132] If the TCAM resource corresponding to the VRF and IP information to which the CE device belongs is not found, the reserved TCAM index is searched to obtain the egress information of the message.

[0133] In a possible implementation manner, the reserved TCAM index corresponds one-to-one to the VRF on the PE device, and the forwarding module may be used to:

[0134] Determine a corresponding TCAM index in the reserved TCAM indexes according to the VRF to which the CE device belongs;

[0135] The pointed forwarding table entry is obtained based on the corresponding TCAM index, and the egress information in the forwarding table entry is obtained.

[0136] In a possible implementation manner, the egress information includes egress port information and next hop editing information of the message on the PE device.

[0137] An embodiment of the present application further provides a readable storage medium, which stores machine executable instructions, and the machine executable instructions can execute any of the above methods when executed.

[0138] Optionally, in this embodiment, the readable storage medium may be configured to store executable instructions for performing the following steps:

[0139] A corresponding number of TCAM indexes are reserved according to the number of VRFs into which the PE device is divided, each TCAM index comprising index information pointing to a forwarding table entry, wherein the forwarding table entry stores egress information of a message;

[0140] Sending a default route to each of the VRFs on the PE device, each default route corresponding to a reserved TCAM index;

[0141] Valid routes are delivered to some VRFs on the PE device, and each valid route occupies a TCAM resource of the PE device.

[0142] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0143] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0144] In summary, the method, device, network device and readable storage medium for expanding routing specifications provided by the embodiments of the present application, when a PE device is divided into multiple virtual routers through VRF in a virtual private network architecture, a corresponding number of TCAM indexes are reserved according to the number of VRFs into which the PE device is divided, and each TCAM index contains index information pointing to a forwarding table entry, and the forwarding table entry stores the egress information of the message. A default route is issued for each VRF on the PE device, and each default route corresponds to a reserved TCAM index, and valid routes are issued for some VRFs on the PE device, and each valid route occupies a TCAM resource of the PE device. In this scheme, by reserving a TCAM index for each VRF to correspond to the default route, the problem that the default route in the prior art needs to occupy TCAM resources is avoided, which leads to a waste of TCAM resources and causes other valid routes to be in short supply of TCAM resources.

[0145] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0146] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for expanding routing specifications, It is characterized in that A PE device applied to a virtual private network architecture, wherein the virtual private network architecture further comprises a CE device and a P router communicating with the PE device, wherein the PE device is logically divided into a plurality of virtual routers through VRF, and the method comprises: A corresponding number of TCAM indexes are reserved according to the number of VRFs into which the PE device is divided, each TCAM index comprising index information pointing to a forwarding table entry, wherein the forwarding table entry stores egress information of a message; A default route is issued to each VRF on the PE device, each default route corresponds to a reserved TCAM index, and when only the default route exists, no actual TCAM resources are occupied; Sending valid routes to some VRFs on the PE device, each valid route occupies a TCAM resource of the PE device; The effective route is the route information allocated by the CE device that has an actual interactive link with the PE device, and the default route is the route information allocated by the CE device that has not established an actual interactive link with the PE device.

2. The method for expanding routing specifications according to claim 1, It is characterized in that The forwarding table entries pointed to by the index information contained in the multiple TCAM indexes are the same forwarding table entry or multiple different forwarding table entries.

3. The method for expanding routing specifications according to claim 1, It is characterized in that The method further comprises: When receiving a message from any CE device, obtain the VRF to which the CE device belongs and the IP information of the CE device; According to the VRF and IP information to which the CE device belongs, the egress information of the message is obtained by searching a TCAM entry or a reserved TCAM index, wherein the TCAM entry includes index information related to the TCAM resource; The message is forwarded based on the egress information.

4. The method for expanding routing specifications according to claim 3, It is characterized in that The step of obtaining the egress information of the message by searching a TCAM entry or a reserved TCAM index according to the VRF and IP information to which the CE device belongs comprises: According to the VRF and IP information to which the CE device belongs, searching for VRF and IP information corresponding to each TCAM resource in the TCAM entry; If a TCAM resource corresponding to the VRF and IP information to which the CE device belongs is found, the index information of the TCAM resource is obtained, and the egress information pointed to by the index information is obtained; If the TCAM resource corresponding to the VRF and IP information to which the CE device belongs is not found, the reserved TCAM index is searched to obtain the egress information of the message.

5. The method for expanding routing specifications according to claim 4, It is characterized in that The reserved TCAM index corresponds one-to-one to the VRF on the PE device; The step of searching the reserved TCAM index to obtain the egress information of the message includes: Determine a corresponding TCAM index in the reserved TCAM indexes according to the VRF to which the CE device belongs; The pointed forwarding table entry is obtained based on the corresponding TCAM index, and the egress information in the forwarding table entry is obtained.

6. The method for expanding routing specifications according to claim 3, It is characterized in that The egress information includes the egress port information and next hop editing information of the message on the PE device.

7. A device for expanding routing specifications, It is characterized in that A PE device applied to a virtual private network architecture, wherein the virtual private network architecture further comprises a CE device and a P router communicating with the PE device, wherein the PE device is logically divided into a plurality of virtual routers through VRF, and the apparatus comprises: A reservation module, used to reserve a corresponding number of TCAM indexes according to the number of VRFs into which the PE device is divided, each TCAM index including index information pointing to a forwarding table entry, wherein the forwarding table entry stores egress information of the message; The first issuing module is used to issue a default route to each VRF on the PE device, each default route corresponds to a reserved TCAM index, and when only the default route exists, no actual TCAM resources are occupied; The second issuing module is used to issue valid routes to some VRFs on the PE device, and each valid route occupies a TCAM resource of the PE device; The effective route is the route information allocated by the CE device that has an actual interactive link with the PE device, and the default route is the route information allocated by the CE device that has not established an actual interactive link with the PE device.

8. A network device, It is characterized in that The network device comprises one or more storage media and one or more processors communicating with the storage media, wherein the one or more storage media store machine executable instructions executable by the processor, and when the network device is running, the processor executes the machine executable instructions to perform the method steps described in any one of claims 1-6.

9. A readable storage medium, It is characterized in that The readable storage medium stores machine executable instructions, and when the machine executable instructions are executed, the method steps described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Virtual network function dynamic deployment method and system based on load balancing

    CN113259440A

  • Data forwarding method based on packet label strategy

    CN114039910A

  • Managing L3 VPN virtual routing tables

    US20050188106A1

  • Method for forwarding packet in MPLS l3vpn

    US20100158010A1

  • Techniques for Managing Ternary Content-Addressable Memory (TCAM) Resources in Heterogeneous Systems

    US20150229565A1