Label-based routing method, system, equipment and medium
By marking the Loopback address in IGP, forming a tagged routing table and using it first, the problem of path forwarding requirements in IGP+LDP scenarios is solved, and flexible and controllable path selection for new and old networks is achieved.
Patent Information
- Application Number
- CN202411370412.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-09-29
Smart Images

Figure CN119743427A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of data communication, and in particular relates to a method, system, equipment and medium for selecting a route based on a label. Background Art
[0002] Glossary: BGP (Border Gateway Protocol) is a dynamic routing protocol used between autonomous systems (AS).
[0003] IGP: Interior Gateway Protocol, used to exchange routing information between routers within an autonomous system.
[0004] BGP / MPLS VPN: BGP / MPLS IP VPN is a L3VPN (Layer 3 Virtual Private Network). It uses BGP (Border Gateway Protocol) to publish VPN routes on the service provider backbone network and uses MPLS (Multiprotocol Label Switch) to forward VPN packets on the service provider SP (Service Provider) backbone network. The IP here means that the service provider's backbone network is an IP network.
[0005] OptionA: Cross-domain VPN-OptionA is the application of basic BGP / MPLS IP VPN in a cross-domain environment. There is no need to run MPLS between ASBRs, nor is there any need for special configuration for cross-domain. In this way, the border ASBRs of the two ASs are directly connected, and the ASBRs are also the PEs of their respective autonomous systems. Both ASBRs regard the other ASBR as their own CE (Customer Edge) device, and will create a VPN instance for each VPN, and use EBGP to publish IPv4 routes to the other end.
[0006] Currently, when an operator needs to merge another operator's backbone network or build a new operator's backbone network (both the old and new networks use BGP / MPLS VPN scenarios), scenarios with certain network path requirements are generally implemented through BGP. For example: In the scenario where both the new network and the old network use BGP / MPLS VPN, during the migration of services from the old network to the new network, there is a demand for traffic access: when users access between the new and old networks, they are required to first go through their own network, and finally cross the new and old networks at the same site. For example: the Shanghai PE node solution of the new network and the Beijing PE node of the old network give priority to the new Beijing PE node, and finally to the Beijing PE node of the old network; similarly, the Shanghai PE node solution of the old network and the Beijing PE node of the new network give priority to the old Beijing PE node, and finally to the Beijing PE node of the new network.
[0007] In the traditional solution, Option A is deployed between the new network PE and the old network PE in Beijing; and the above path requirements are achieved by adding community attributes to the CE (Customer Edge) routes learned from different node PE (Provider Edge).
[0008] However, when the new and old networks are required to use IGP+LDP to connect, the path forwarding requirement cannot be met. The specific situation is as follows. Please refer to the topology diagram. Figure 1 : Prerequisite: The Cost of the old network cannot be adjusted due to long-term planning; the planning of the new network refers to the Cost of the old network and remains consistent with the old network.
[0009] By default, the Cost value is 1. There are two paths for PE3 in the new network to access PE2 in Shanghai, one is PE3-PE1-PE2, and the other is PE3-PE4-PE2. If you want to make the path go through PE3-PE4-PE2, you can only adjust the path from PE3 to PE1 to 2. In this way, the Cost value of PE3-PE4-PE2 is smaller than that of PE3-PE1-PE2. However, when PE4 accesses PE1, it needs to prioritize PE4-PE3-PE1. However, the Cost value of the PE3-PE1 path is too large and cannot be optimized. Summary of the invention
[0010] In view of the deficiencies in the prior art, the present invention provides a method, system, device and medium for label-based routing, which enables IGP to adjust the routing of special routes, thereby meeting the path requirements of some users and ultimately achieving the integration of new and old backbone networks.
[0011] To achieve the above object, the present invention adopts the following technical solutions: A method for selecting a route based on a label comprises the following steps: When announcing to IGP, the loopback addresses of the PEs of the new and old networks are marked; After receiving the IGP message, the local PE compares the information in the tag with the local tag information to form a tag routing table. Set the priority of the tagged routing table to be higher than that of the common IGP routing table. Compare the tagged routing table with the common IGP routing table. When the tagged routing table contains the routes of the common IGP routing table, replace the routes of the common IGP routing table with the tagged routing table and send it to the forwarding table of the device to guide the device to perform route forwarding.
[0012] To optimize the above technical solutions, the specific measures taken also include: Furthermore, the old network uses an MPLS VPN solution, and the new network also uses an MPLS VPN solution, and the new network and the old network are connected via IGP and MPLS.
[0013] Furthermore, the loopback address is specifically a route of an LSR ID of MPLS.
[0014] Furthermore, after all PEs receive the IGP message, a label database is formed. The specific protocol of the IGP is RIP, OSPF or IS-IS.
[0015] Furthermore, the information in the basis tag is compared with the local tag information to form a tag routing table specifically as follows: The tag information in the tag database is compared with the local tag information, and the table entry modification rules of all routers are as follows: select the device at the same site in this network and another network as the next hop. If a certain node only exists in the new network or the old network, the corresponding device at the same site in the same network cannot be found, and it will not be added to the tag routing table.
[0016] Furthermore, the tag database is also used to adjust the type of routing and the parameters of the message.
[0017] The present invention also provides a system for selecting a route based on a label, comprising: The route marking module is used to mark the loopback addresses of the PEs of the new and old networks when announcing them to the IGP. The tag routing table generation module is used to compare the information in the tag with the local tag information after the local PE receives the IGP message to form a tag routing table; The comparison and following table module is used to set the priority of the marked routing table to be higher than the ordinary IGP routing table, compare the marked routing table and the ordinary IGP routing table, and when the marked routing table has the routes of the ordinary IGP routing table, replace the routes of the ordinary IGP routing table with the marked routing table, and send it to the forwarding table of the device to guide the device to perform route forwarding.
[0018] The present invention also proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for selecting a route based on a label as described above is implemented.
[0019] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the above-mentioned method for selecting a route based on a label.
[0020] The beneficial effects of the present invention are: 1. The present invention marks a specific route (Loopback) by using a tag, providing a handle for subsequent adjustment of the characteristic route. The subsequent adjustment can not only be used for the method of use in this solution, but also for other adjustments, such as the type of route, and other changes in parameters of various messages.
[0021] 2. The present invention proposes an independent tag routing table to achieve isolation from the ordinary IGP routing table and avoid the impact on the ordinary routing table. This avoids the impact of the tag routing on the calculation of the ordinary routing. At the same time, this tag routing table provides the basis and conditions for other subsequent functions, such as specific filtering of the tag routing.
[0022] 3. The present invention realizes the user's specific requirements for path solutions through a tag comparison method, and achieves greater flexibility and controllability in accessing new and old networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is the topology diagram of the new network and the old network; Figure 2 This is a flow chart of the method for selecting a route based on a label proposed by the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] Embodiment 1
[0026] The present invention proposes a method for selecting a route based on a label. In this embodiment, it involves CE1, PE1, PE2, CE2 of the old network and CE3, PE3, PE4, CE4 of the new network; the old network uses the MPLS VPN solution, and the new network also uses the MPLS VPN solution; the new and old networks are connected through IGP and MPLS. The flowchart of the method is shown in FIG. Figure 2 As shown, the following steps are included: When announcing to IGP, the loopback addresses of the PE (Provider Edge) of the new network and the old network are marked; mainly the routes of the MPLS LSR ID are marked. For example: PE1 is marked as the old network: Beijing; PE2 is the old network: Shanghai; PE3 is marked as the new network: Beijing; PE4 is the new network: Shanghai; after all PEs receive the IGP message, a marking database is formed, as shown in Table 1: Table 1
[0027] After receiving the IGP message, the local PE compares the information in the tag with the local tag information to form a tag routing table. After all PEs receive the IGP message, a tag database will be formed. The specific protocol of IGP is RIP, OSPF or IS-IS. The tag information in the tag database is compared with the local tag information. The table entry modification rules of all routers are as follows: select the device at the same site in this network and another network as the next hop. If a node only exists in the new network or the old network, the corresponding device at the same site in the same network cannot be found, and it will not be added to the tag routing table.
[0028] For example, the following route is formed on PE3: PE1's route comes from the old network + Beijing, and PE3 checks its own information to be the new network + Beijing. PE3's local network is the new network, while PE1 is the old network. Therefore, it is necessary to modify PE1's next hop to be a device in the new network. The specific device to be selected depends on the subsequent site information. In this embodiment, the Beijing device of the new network is selected. The Beijing device of the new network is PE3. Since it is itself, no modification is made; PE2's route comes from the old network + Shanghai, and PE3 checks its own information to be the new network + Beijing. PE3's local network is the new network, while PE2 is the old network. Therefore, the next hop of PE2's route needs to be modified to be a device of the new network. The specific device to be selected depends on the subsequent site information. In this embodiment, the Beijing device of the new network is selected, and the Beijing device of the new network is PE4.
[0029] Since PE3 and PE4 routes are new networks, there is no need to modify the next hop.
[0030] The tag database can also be used to adjust the type of routing and message parameters.
[0031] Set the priority of the tagged routing table to be higher than that of the common IGP routing table. Compare the tagged routing table with the common IGP routing table. When the tagged routing table contains the routes of the common IGP routing table, replace the routes of the common IGP routing table with the tagged routing table and send it to the forwarding table of the device to guide the device to perform route forwarding.
[0032] The routing table of PE1 is shown in Table 2, the routing table of PE2 is shown in Table 3, the routing table of PE3 is shown in Table 4, and the routing table of PE4 is shown in Table 5.
[0033] Table 2
[0034] Table 3
[0035] Table 4
[0036] Table 5
[0037] Embodiment 2
[0038] The present invention proposes a system for selecting a route based on a label corresponding to the method of the first embodiment, including: The route marking module is used to mark the loopback addresses of the PEs of the new and old networks when announcing them to the IGP. The tag routing table generation module is used to compare the information in the tag with the local tag information after the local PE receives the IGP message to form a tag routing table; The comparison and following table module is used to set the priority of the marked routing table to be higher than the ordinary IGP routing table, compare the marked routing table and the ordinary IGP routing table, and when the marked routing table has the routes of the ordinary IGP routing table, replace the routes of the ordinary IGP routing table with the marked routing table, and send it to the forwarding table of the device to guide the device to perform route forwarding.
[0039] The implementation methods of each module and module function in the system are completely consistent with the steps of the method in Example 1, so they will not be repeated here.
[0040] Embodiment 3
[0041] The present invention proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for selecting a route based on a label as described in the first embodiment is implemented.
[0042] Embodiment 4
[0043] The present invention provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the method for selecting a route based on a label as described in the first embodiment.
[0044] In the embodiments disclosed in the present application, the computer storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. The computer storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. More specific examples of computer storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0045] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0046] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A method for selecting a route based on a label, characterized in that: The following steps are involved: When announcing to IGP, the loopback addresses of the PEs of the new and old networks are marked; After receiving the IGP message, the local PE compares the information in the tag with the local tag information to form a tag routing table. Set the priority of the tagged routing table to be higher than that of the common IGP routing table. Compare the tagged routing table with the common IGP routing table. When the tagged routing table contains the routes of the common IGP routing table, replace the routes of the common IGP routing table with the tagged routing table and send it to the forwarding table of the device to guide the device to perform route forwarding.
2. The method for selecting a route based on a label according to claim 1, wherein: The old network uses the MPLS VPN solution, and the new network also uses the MPLS VPN solution. The new network and the old network are connected via IGP and MPLS.
3. The method for selecting a route based on a label according to claim 1, wherein: The loopback address is specifically a route of the LSR ID of MPLS.
4. The method for selecting a route based on a label according to claim 1, wherein: After all PEs receive IGP messages, a label database is formed. The specific protocol of IGP is RIP, OSPF or IS-IS.
5. The method for selecting a route based on a label as claimed in claim 4, characterized in that: The information in the basis tag is compared with the local tag information to form a tag routing table as follows: The tag information in the tag database is compared with the local tag information, and the table entry modification rules of all routers are as follows: select the device at the same site in this network and another network as the next hop. If a certain node only exists in the new network or the old network, the corresponding device at the same site in the same network cannot be found, and it will not be added to the tag routing table.
6. The method for selecting a route based on a label as claimed in claim 4, characterized in that: The tag database is also used to adjust the type of routing and the parameters of the message.
7. A system for selecting a route based on a label, characterized in that: include: The route marking module is used to mark the loopback addresses of the PEs of the new and old networks when announcing them to the IGP. The tag routing table generation module is used to compare the information in the tag with the local tag information after the local PE receives the IGP message to form a tag routing table; The comparison and following table module is used to set the priority of the marked routing table to be higher than the ordinary IGP routing table, compare the marked routing table and the ordinary IGP routing table, and when the marked routing table has the routes of the ordinary IGP routing table, replace the routes of the ordinary IGP routing table with the marked routing table, and send it to the forwarding table of the device to guide the device to perform route forwarding.
8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for selecting a route based on a label as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables a computer to execute the method for label-based routing as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Label exchange route setting method, system and equipment of virtual special network channel
CN101090355A
Interconnection method of transparent interconnection network of lots of links in different places and operator edge device
CN102075446A
Routing information announcement method and device
CN102957606A
Message processing method and device
CN111277482A
Concurrent routing for network devices
US11621910B1