CN117640499A - Routing processing method, network equipment and computer readable storage medium - Google Patents

Routing processing method, network equipment and computer readable storage medium Download PDF

Info

Publication number
CN117640499A
CN117640499A CN202210952479.3A CN202210952479A CN117640499A CN 117640499 A CN117640499 A CN 117640499A CN 202210952479 A CN202210952479 A CN 202210952479A CN 117640499 A CN117640499 A CN 117640499A
Authority
CN
China
Prior art keywords
protocol
priority
routing protocol
route
routing
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
CN202210952479.3A
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 CN202210952479.3A priority Critical patent/CN117640499A/en
Publication of CN117640499A publication Critical patent/CN117640499A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a routing processing method, network equipment and a computer readable storage medium. The network equipment acquires a first priority of a first routing protocol; the network device introduces a first route from a first routing protocol to a second routing protocol according to the first priority, the first route corresponding to the first routing protocol, the first routing protocol and the second routing protocol being different routing protocols operated by the network device. In the application, the priority of the routing protocol is used as the basis of routing introduction, so that unidirectional introduction of the routing from one routing protocol to another routing protocol in the network equipment is realized, and the condition of a routing loop is relieved.

Description

Routing processing method, network equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a routing processing method, a network device, and a computer readable storage medium.
Background
In a communication network, a default route (default route) is a packet forwarding rule set when there is no specific route on the network device, and the default route may give a default next-hop address. For the data packet without the matching item in the routing table, the data packet can be forwarded according to the default route.
When an open shortest path first (open shortest path first, OSPF) protocol of a process in a network device introduces a default route from other routing protocols, the default route will continue to be forwarded to other network devices in the OSPF domain where it resides. If the other network device subsequently reintroduces the default route to the other routing protocol of the network device (e.g., the OSPF protocol or border gateway protocol of another process), a routing loop is formed.
Disclosure of Invention
A routing processing method, a network device, and a computer-readable storage medium are provided for preventing routing loops.
In a first aspect, the present application provides a routing processing method. The network device runs a plurality of different routing protocols (including a first routing protocol and a second routing protocol) through different processes at the same time, wherein the first routing protocol is configured with a first route, and the network device needs to introduce the first route from the first routing protocol to the second routing protocol. The routing protocols operated by the network devices have their corresponding priorities, i.e. the priorities of the routing protocols, respectively. The priority of a routing protocol is also referred to as the management distance of the routing protocol.
When a route is introduced into a certain routing protocol, the priority of the route is the same as the priority of the routing protocol into which the route is introduced. I.e. after the first routing protocol introduces the first routing from the other routing protocols, the priority of the first routing in the first routing protocol is equal to the first routing protocol; if a first route is introduced from a first routing protocol to a second routing protocol, the priority of the first route in the second routing protocol is equivalent to the second routing protocol. Therefore, in this application, the network device obtains the priority of the first routing protocol (i.e., the first priority), which is also equivalent to obtaining the priority of the first routing.
The first routing protocol and the second routing protocol are different routing protocols operated by the network device. It should be understood that reference to "different routing protocols" in this application includes different kinds of routing protocols or the same routing protocol that different processes run.
After the network device acquires the first priority, the first route is introduced into the second route protocol from the first route protocol according to the first priority. In the application, the priority of the routing protocol is used as the basis of routing introduction, so that unidirectional introduction of the routing from one routing protocol to another routing protocol in the network equipment is realized, and the condition of a routing loop is relieved.
The network device in the present application may be an access network device, which may also be referred to as a radio access network (radio access network, RAN) device, which is a device that provides a wireless communication function for a terminal device. Access network devices include, for example, but are not limited to: a next generation base station (gNB), an evolved node B (eNB), a baseband unit (BBU), a transmit-receive point (transmitting and receiving point, TRP), a transmit point (transmitting point, TP), a base station in a future mobile communication system, an access point in a wireless local area network (wireless local area network, WLAN) system, or the like. The access network device may also be a wireless controller, a Centralized Unit (CU), and/or a Distributed Unit (DU) in the cloud wireless access network (cloud radio access network, CRAN) scenario, or the network device may be a relay station, a network device in the vehicle device, or the like. The network device may be a router, a switch, a firewall, or a protocol stack server, or may be another device or server with a routing function, which is not limited herein.
In the present application, the means for implementing the function of the network device may be the network device; or may be a device, such as a system-on-a-chip, capable of supporting the network device to perform this function, which may be installed in the network device. In the technical solution provided in the embodiments of the present application, the device for implementing the function of the network device is exemplified by the network device, and the technical solution provided in the embodiments of the present application is described.
Based on the first aspect, in an alternative implementation manner, the network device may compare the first priority of the first routing protocol with the second priority of the second routing protocol, and determine whether to introduce the first routing from the first routing protocol to the second routing protocol according to the comparison result. Thus, the network device also needs to acquire a second priority of a second routing protocol.
In practical application, the network device may acquire the first priority first and then acquire the second priority; alternatively, the second priority may be acquired first, and then the first priority may be acquired; alternatively, the first priority and the second priority may be acquired simultaneously, which is not limited in this application.
After comparing the first priority and the second priority, if the first priority is higher than the second priority, the network device introduces the first route from the first routing protocol to the second routing protocol; if the first priority is lower than the second priority, the network device does not introduce the first route from the first routing protocol to the second routing protocol.
The first route can be introduced from the first routing protocol to the second routing protocol, indicating that the priority of the first routing protocol is higher than the priority of the second routing protocol. After the first route is introduced into the second routing protocol, if the first route is forwarded again through other network devices, the first route is transferred again to the second routing protocol of the network device, and at this time, the first route cannot be reintroduced into the first routing protocol from the second routing protocol because the priority of the first routing protocol is higher than that of the second routing protocol, so that a routing loop is avoided.
Based on the first aspect, in an optional implementation manner, each routing protocol of the network device may configure a corresponding preset priority, and the network device may compare the first priority of the first routing protocol with the preset priority corresponding to the second routing protocol, and determine whether to introduce the first routing from the first routing protocol to the second routing protocol according to the comparison result. Therefore, the network device also needs to acquire the preset priority corresponding to the second routing protocol.
In practical application, the network device may acquire the first priority first, and then acquire the preset priority corresponding to the second routing protocol; or, the preset priority corresponding to the second routing protocol may be obtained first, and then the first priority is obtained; or, the preset priorities corresponding to the first priority and the second routing protocol may be obtained at the same time, which is not limited in this application.
After comparing the first priority with a preset priority corresponding to the second routing protocol, if the first priority is higher than the preset priority, the network equipment introduces the first routing from the first routing protocol to the second routing protocol; if the first priority is lower than the preset priority, the network device does not introduce the first route from the first routing protocol to the second routing protocol. By configuring the preset priority of each routing protocol, no comparison with the priority of the second routing protocol is required when route introduction is performed. Therefore, in the case that the first priority of the first network routing protocol is lower than the second priority of the second network routing protocol, if the first priority can be higher than the preset priority corresponding to the second routing protocol, the first route can still be introduced into the second routing protocol; or, in the case that the first priority of the first network routing protocol is higher than the second priority of the second network routing protocol, if the first priority can be lower than the preset priority corresponding to the second routing protocol, the first route still cannot be introduced into the second routing protocol.
The preset priority of the routing protocol may be higher than the priority of the routing protocol itself, or the preset priority of the routing protocol may be lower than the priority of the routing protocol itself, or the preset priority of the routing protocol may be the same as the priority of the routing protocol itself, which is not limited herein. In practical application, the preset priority of the routing protocol can be defined according to the requirements of the practical scenes of different routing protocols, so that the direction of route introduction can be adjusted more flexibly, and the flexibility of the scheme is improved. On the other hand, the preset priority of the routing protocol can be defined by self, so that the attribute of the priority of the routing protocol is not required to be adjusted, and the efficiency of introducing the routing is improved.
Based on the first aspect, in an alternative implementation manner, the first route may be a default route (default route), or may also be a detailed route, which is not limited in this application.
Based on the first aspect, in an alternative embodiment, the first routing protocol may be an OSPF protocol, a border gateway protocol (border gateway protocol, BGP), an interior gateway protocol (interior gateway protocol, IGP), a routing information protocol (routing information protocol, RIP), or an intermediate system-to-intermediate system (intermediate system to intermediate system, ISIS) protocol, or may be another routing protocol, which is not limited herein.
Based on the first aspect, in an alternative embodiment, the second routing protocol may be an OSPF protocol, a BGP, IGP, RIP or an ISIS protocol, or may be another routing protocol, which is not limited herein.
In a second aspect, the present application provides a network device, the network device comprising:
an acquiring unit, configured to acquire a first priority of a first routing protocol;
and the processing unit is used for introducing the first route from the first routing protocol to the second routing protocol according to the first priority, wherein the first route corresponds to the first routing protocol, and the first routing protocol and the second routing protocol are different routing protocols operated by the network equipment.
The content of the information interaction and the execution process of the embodiment shown in the present aspect is based on the same concept as the embodiment shown in the first aspect, so the description of the beneficial effects shown in the present aspect is shown in the above first aspect, and details are not repeated here.
Based on the second aspect, in an alternative embodiment, the processing unit is specifically configured to:
acquiring a second priority of a second routing protocol;
determining that the first priority is higher than the second priority;
the first route is introduced from the first routing protocol to the second routing protocol.
Based on the second aspect, in an alternative embodiment, the processing unit is specifically configured to:
acquiring a preset priority corresponding to a second routing protocol;
determining that the first priority is higher than a preset priority;
the first route is introduced from the first routing protocol to the second routing protocol.
Based on the second aspect, in an alternative embodiment, the first route comprises a default route or an explicit route.
Based on the second aspect, in an alternative embodiment, the first routing protocol is an open shortest path first OSPF protocol, border gateway protocol BGP, interior gateway protocol IGP, routing information protocol RIP, or intermediate system to intermediate system ISIS protocol.
Based on the second aspect, in an alternative embodiment, the second routing protocol is an open shortest path first OSPF protocol, border gateway protocol BGP, interior gateway protocol IGP, routing information protocol RIP, or intermediate system to intermediate system ISIS protocol.
In a third aspect, a network device is provided that includes a memory and a processor coupled to the memory; the memory is configured to store instructions, and the processor is configured to execute the instructions, to implement the method according to any one of the above aspects.
In a fourth aspect, a network device is provided that includes a communication interface and a processor coupled to the communication interface; the communication interface is configured to perform the operations associated with receiving or transmitting in any of the methods described in any of the above aspects, and the processor is configured to perform the operations associated with processing in any of the methods described in any of the above aspects.
In a fifth aspect, a computer readable storage medium is provided, in which a computer program is stored which, when run on a processor, implements the method of any of the above aspects.
In a sixth aspect, there is provided a computer program product or computer program comprising computer instructions which, when run on a processor, implement the method of any of the preceding aspects.
From the above technical solutions, the embodiments of the present application have the following advantages:
the application discloses a routing processing method, network equipment and a computer readable storage medium. The network equipment acquires a first priority of a first routing protocol; the network device introduces a first route from a first routing protocol to a second routing protocol according to the first priority, the first route corresponding to the first routing protocol, the first routing protocol and the second routing protocol being different routing protocols operated by the network device. In the application, the priority of the routing protocol is used as the basis of routing introduction, so that unidirectional introduction of the routing from one routing protocol to another routing protocol in the network equipment is realized, and the condition of a routing loop is relieved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic diagram of a scenario in which a default route is introduced between different protocols;
fig. 2 is an application scenario schematic diagram of a routing processing method in the present application;
FIG. 3 is a flow chart of a method of routing in an embodiment of the present application;
fig. 4 is a schematic diagram of a scenario in which a network device determines whether to introduce a first route according to a first priority;
fig. 5 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 6 is another schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a routing processing method, network equipment and a computer readable storage medium, which are used for preventing a routing loop.
Embodiments of the present application are described below with reference to the accompanying drawings in the embodiments of the present application. The terminology used in the description section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application. As one of ordinary skill in the art can appreciate, with the development of technology and the appearance of new scenes, the technical solutions provided in the embodiments of the present application are applicable to similar technical problems.
In the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). 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 plural.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be capable of operation in sequences other than those illustrated or described herein, for example. 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.
The following description is given of some terms or terminology used in this application as part of the summary of the invention.
OSPF protocol: the OSPF protocol is a widely used dynamic routing protocol, belongs to a link state routing protocol, and has the advantages of fast convergence speed of route change, no route loop, support of a variable-length subnet mask and the like. After the OSPF protocol is used in the network, most routes are calculated and generated by the OSPF protocol, no manual configuration is needed by a network manager, and when the network topology changes, the OSPF protocol can automatically calculate and correct routes, thereby greatly facilitating network management. Each network device (e.g., router) is responsible for discovering, maintaining relationships with neighboring network devices, and describing a list of known neighboring network devices and link cost (link state update, LSU) messages, and learning the network topology of the entire autonomous system by reliable flooding periodically interacting with other network devices within the autonomous system (autonomous system, AS). Each network device injects routing information from other ases through the network device at the autonomous system boundary, thereby obtaining routing information of the entire Internet. The OSPF protocol regenerates link-state advertisements (LSAs) every other specific time or when the link state changes, and the network device advertises new LSAs to other network devices via a flooding mechanism to enable real-time updates of routes.
Border gateway protocol: the border gateway protocol (border gateway protocol, BGP) is a routing protocol for autonomous systems. BGP is used to exchange routing information between different ases. When two ases need to exchange routing information, each AS must designate a network device (e.g., router) running BGP to exchange routing information with other ases on behalf of the AS to which it belongs. Routers in two ases that exchange information using BGP are also known AS border gateways (border gateways) or border routers (border routers).
Default routing: in a communication network, a default route (default route) is a packet forwarding rule set when there is no specific route on the network device, and the default route may give a default next-hop address. For the data packet without the matching item in the routing table, the data packet can be forwarded according to the default route. Default routing has the advantage of reduced routing table capacity, simplified configuration, etc. Default routing is widely used in the OSPF routing protocol. In addition, in the actual service networking, in order to form redundant backup or load sharing of the network, a plurality of boundary routers are generally used for forming a multi-outlet, and a default route is introduced or issued, so that high availability of the network is ensured.
When the OSPF protocol of a process in a network device introduces a default route from other routing protocols, the default route will continue to be forwarded to other network devices in the OSPF domain in which it is located. If the other network device subsequently reintroduces the default route to the other routing protocol of the network device (e.g., the OSPF protocol or border gateway protocol of another process), a routing loop is formed. Currently, in the OSPF protocol, the default route mainly has the following two release manners, which are respectively described below.
Mode one: when there must be a default route in the OSPF protocol of the network device that is active and that is not generated by the current OSPF protocol, the OSPF protocol of the network device generates and issues a link state advertisement describing the default route. While the network device still calculates the default route from the other network device.
Mode two: in the OSPF protocol of the network device, whether or not the default route is active and is not generated by the current OSPF protocol, the OSPF protocol of the network device generates and issues a link state advertisement describing the default route.
The routing loop situation induced during the process of issuing the default route will be described with reference to the scenario shown in fig. 1.
Referring to fig. 1, fig. 1 is a schematic diagram of a scenario in which a default route is introduced between different protocols. As shown in fig. 1, network device a and network device B are all nodes of OSPF domain 1, OSPF domain 2, and OSPF domain 3, where there are 3 processes in network device a and network device B, and each process runs an OSPF protocol. Network device a learns the default route (0.0.0.0.0.0.0.0) through border network devices in the BGP domain and then introduces the default route (0.0.0.0.0.0.0.0) into the OSPF1 protocol operated by network device a. The OSPF1 protocol operated by network device a may execute the default-route-advertisement command to introduce the default route (0.0.0.0.0.0.0.0) into other routing protocols operated by network device a to complete the cross-protocol delivery of the default route (0.0.0.0.0.0.0.0) within the same network device. On the other hand, for different network devices in the same OSPF domain (e.g., network device a and network device B in OSPF domain 1), after one of the network devices (e.g., network device a) learns the default route (0.0.0.0.0.0.0.0), the default route (0.0.0.0.0.0.0.0) may be published to other network devices in the same OSPF domain (e.g., network device B) through a flooding mechanism, thereby completing cross-device delivery of the default route (0.0.0.0.0.0.0.0) in the same routing protocol.
It should be understood that reference to "different routing protocols" in this application includes different kinds of routing protocols or the same routing protocol that different processes run. For example, in fig. 1, when the network device a runs the BGP protocol and the OSPF1 protocol at the same time, the BGP protocol and the OSPF1 protocol are "different routing protocols" referred to in the present application; for another example, in fig. 1, 3 processes of the network device a respectively run the same routing protocol (OSPF protocol), and each process belongs to OSPF domain 1, OSPF domain 2, and OSPF domain 3, so that the same routing protocol (OSPF protocol) that 3 different processes of the network device a respectively run is referred to as "different routing protocols" in the present application.
After the network device B learns the default route (0.0.0.0.0.0.0.0) from the network device a through the OSPF1 protocol, based on the first or second mode of issuing the default route, the network device may be triggered to introduce the default route (0.0.0.0.0.0.0.0) from the OSPF1 protocol into the OSPF2 protocol and the OSPF3 protocol of the network device B. Next, network device B may flood (0.0.0.0.0.0.0.0) the default route from the OSPF2 protocol of network device B to the OSPF2 protocol of network device a via a flooding mechanism. After network device a learns the default route (0.0.0.0.0.0.0.0) from network device B via the OSPF2 protocol, the default route (0.0.0.0.0.0.0.0) may be again introduced from the OSPF2 protocol to the OSPF1 protocol of network device a. It follows that the default route (0.0.0.0.0.0.0.0) is first communicated by network device a to network device B via the OSPF1 protocol, but network device B is again introduced to network device a's OSPF1 protocol via the OSPF2 protocol (0.0.0.0.0.0.0.0) to form a routing loop, resulting in traffic interruption.
In view of this, the present application provides a method, network device, and computer-readable storage medium for routing processing for preventing routing loops. Referring to fig. 2, fig. 2 is an application scenario diagram of a routing method in the present application. The routing processing method is suitable for a scene of routing introduced from one routing protocol of the network equipment to another routing protocol of the same network equipment. As shown in fig. 2, a plurality of different routing protocols (including a first routing protocol and a second routing protocol) are executed by different processes in the network device, wherein the first routing protocol is configured with a first route. The network device may introduce the first route from the first routing protocol to the second routing protocol by the method of routing processing of the present application.
Referring to fig. 3, fig. 3 is a flow chart illustrating a method of routing according to an embodiment of the present application. As shown in fig. 3, the method for routing in the embodiment of the present application includes:
101. the network device obtains a first priority of a first routing protocol.
The network device in the present application may be an access network device, which may also be referred to as a radio access network (radio access network, RAN) device, which is a device that provides a wireless communication function for a terminal device. Access network devices include, for example, but are not limited to: a next generation base station (gNB), an evolved node B (eNB), a baseband unit (BBU), a transmit-receive point (transmitting and receiving point, TRP), a transmit point (transmitting point, TP), a base station in a future mobile communication system, an access point in a wireless local area network (wireless local area network, WLAN) system, or the like. The access network device may also be a wireless controller, a Centralized Unit (CU), and/or a Distributed Unit (DU) in the cloud wireless access network (cloud radio access network, CRAN) scenario, or the network device may be a relay station, a network device in the vehicle device, or the like. In one possible implementation, the network device may be a router, a switch, a firewall, or a protocol stack server, or may be another device or server with a routing function, which is not limited herein.
In the present application, the means for implementing the function of the network device may be the network device; or may be a device, such as a system-on-a-chip, capable of supporting the network device to perform this function, which may be installed in the network device. In the technical solution provided in the embodiments of the present application, the device for implementing the function of the network device is exemplified by the network device, and the technical solution provided in the embodiments of the present application is described.
The network device runs a plurality of different routing protocols (including a first routing protocol and a second routing protocol) through different processes at the same time, wherein the first routing protocol is configured with a first route, and the network device needs to introduce the first route from the first routing protocol to the second routing protocol. Specifically, the first route may be a default route (default route), or may be a detailed route, which is not limited in this application.
The routing protocols operated by the network devices have their corresponding priorities, i.e. the priorities of the routing protocols, respectively. The priority of a routing protocol is also referred to as the management distance of the routing protocol. Illustratively, the priority of the routing protocol may be represented by a priority value in the interval 0 to 255, where a smaller priority value indicates a higher priority of the corresponding routing protocol. For example, assuming that the priority value of the routing protocol a is 100, the priority value of the routing protocol B is 150, and the priority value of the routing protocol C is 200, the priority relationship among the routing protocol a, the routing protocol B, and the routing protocol C is: the routing protocol C has a higher priority than the routing protocol a, and the routing protocol a has a higher priority than the routing protocol B. In practical applications, the priority of the routing protocol may be indicated by other ways besides the priority value, which is not limited in this application.
The priority of the routing protocol may be configured, modified or updated by the user, or may be determined by a default priority relationship table of the routing protocol. Referring to table 1, table 1 is a table of possible routing protocol priorities in practical application.
Routing protocol Priority value
Direct connection routing 0
OSPF internal routing 10
Static routing 60
Routing of point-to-point interface aggregation 110
Aggregated default routes 130
Extended routing for OSPF 140
BGP routing 170
TABLE 1
When a route is introduced into a certain routing protocol, the priority of the route is the same as the priority of the routing protocol into which the route is introduced. I.e. after the first routing protocol introduces the first routing from the other routing protocols, the priority of the first routing in the first routing protocol is equal to the first routing protocol; if a first route is introduced from a first routing protocol to a second routing protocol, the priority of the first route in the second routing protocol is equivalent to the second routing protocol. Therefore, in this application, the network device obtains the priority of the first routing protocol (i.e., the first priority), which is also equivalent to obtaining the priority of the first routing.
102. The network device directs the first route from the first routing protocol to the second routing protocol according to the first priority.
The first routing protocol and the second routing protocol are different routing protocols operated by the network device. It should be understood that references herein to "different routing protocols" include different kinds of routing protocols (e.g., OSPF protocol and BGP) or the same routing protocol that different processes run (e.g., both processes run OSPF protocol). In one possible implementation, the first routing protocol may be an OSPF protocol, BGP, interior gateway protocol (interior gateway protocol, IGP), routing information protocol (routing information protocol, RIP), or intermediate system-to-intermediate system (intermediate system to intermediate system, ISIS) protocol, or may be another routing protocol, and is not limited herein. In one possible implementation, the second routing protocol may be an OSPF protocol, BGP, IGP, RIP or ISIS protocol, or may be another routing protocol, and is not limited herein. Illustratively, two processes in the network device, wherein a first routing protocol operated by one process is BGP and a second routing protocol operated by the other process is OSPF; for another example, two processes in a network device, one process running a first routing protocol that is an OSPF protocol and the other process running a second routing protocol that is also an OSPF protocol. In the above examples, the first routing protocol and the second routing protocol are different routing protocols operated by the network device.
After the network device obtains the first priority, the first route is led into the second route protocol from the first route protocol according to the first priority. Specifically, if the first priority meets a preset condition, the network device may introduce the first route from the first routing protocol to the second routing protocol; if the first priority does not meet the preset condition, the network device will not introduce the first route from the first routing protocol to the second routing protocol. In the application, the priority of the routing protocol is used as the basis of routing introduction, so that unidirectional introduction of the routing from one routing protocol to another routing protocol in the network equipment is realized, and the condition of a routing loop is relieved.
The network device may determine whether to introduce the first route from the first routing protocol to the second routing protocol based on the first priority in combination with predefined different preset conditions. Next, two different preset conditions in the present application will be described separately.
Mode a: the network device may compare the first priority of the first routing protocol with the second priority of the second routing protocol and determine whether to introduce the first routing from the first routing protocol to the second routing protocol based on the comparison. Thus, the network device also needs to acquire a second priority of a second routing protocol.
In practical application, the network device may acquire the first priority first and then acquire the second priority; alternatively, the second priority may be acquired first, and then the first priority may be acquired; alternatively, the first priority and the second priority may be acquired simultaneously, which is not limited in this application.
After comparing the first priority and the second priority, if the first priority is higher than the second priority, the network device introduces the first route from the first routing protocol to the second routing protocol; if the first priority is lower than the second priority, the network device does not introduce the first route from the first routing protocol to the second routing protocol. Illustratively, assuming that the priority value corresponding to the first routing protocol is 100 and the priority value corresponding to the second routing protocol is 150, the network device determines that the first priority is higher than the second priority, and introduces the first route from the first routing protocol to the second routing protocol.
The first route can be introduced from the first routing protocol to the second routing protocol, indicating that the priority of the first routing protocol is higher than the priority of the second routing protocol. After the first route is introduced into the second routing protocol, if the first route is forwarded again through other network devices, the first route is transferred again to the second routing protocol of the network device, and at this time, the first route cannot be reintroduced into the first routing protocol from the second routing protocol because the priority of the first routing protocol is higher than that of the second routing protocol, so that a routing loop is avoided.
For ease of understanding, referring to fig. 4, fig. 4 is a schematic diagram of a scenario in which a network device determines whether to introduce a first route according to a first priority.
201. The network device a compares the first priority to the second priority and determines that the first priority is higher than the second priority such that the network device a directs the first route from the first routing protocol to the second routing protocol. The specific flow is described in the foregoing steps 101 to 102, and will not be described herein.
202. Network device a may flood the first route to network device B via a second routing protocol, where the routing domain where network device B is located is the same as the second routing protocol of network device a.
203. The first route is forwarded through network device B again into the second routing protocol of network device a.
204. As can be seen from step 201, the first priority of the first routing protocol is higher than the second priority of the second routing protocol. As can be seen from the above, the first route cannot be introduced from a low priority routing protocol to a high priority routing protocol, and therefore, the network device a compares the second priority with the first priority, and determines that the second priority is lower than the first priority, and the network device will not introduce the first route from the second routing protocol to the first routing protocol.
In summary, after the network device introduces the first route from the first routing protocol to the second routing protocol, the first route cannot be introduced from the second routing protocol to the first routing protocol, that is, unidirectional introduction of the route from one routing protocol to another routing protocol in the same network device (for example, the network device a shown in fig. 4) is achieved, and a routing loop is avoided.
Mode B: each routing protocol of the network device may be configured with a corresponding preset priority, and the network device may compare the first priority of the first routing protocol with the preset priority corresponding to the second routing protocol, and determine whether to introduce the first routing protocol from the first routing protocol to the second routing protocol according to the comparison result. Therefore, the network device also needs to acquire the preset priority corresponding to the second routing protocol.
In practical application, the network device may acquire the first priority first, and then acquire the preset priority corresponding to the second routing protocol; or, the preset priority corresponding to the second routing protocol may be obtained first, and then the first priority is obtained; or, the preset priorities corresponding to the first priority and the second routing protocol may be obtained at the same time, which is not limited in this application.
After comparing the first priority with a preset priority corresponding to the second routing protocol, if the first priority is higher than the preset priority, the network equipment introduces the first routing from the first routing protocol to the second routing protocol; if the first priority is lower than the preset priority, the network device does not introduce the first route from the first routing protocol to the second routing protocol. By configuring the preset priority of each routing protocol, no comparison with the priority of the second routing protocol is required when route introduction is performed.
Illustratively, assume that the first routing protocol corresponds to a priority value of 100, the second routing protocol corresponds to a priority value of 80, and the second routing protocol has a priority value of 150 for a preset priority. After the network device obtains the preset priority of the second routing protocol, the network device compares the first priority (the priority value is 100) with the preset priority (the priority value is 150) of the second routing protocol, and determines that the first priority is higher than the preset priority corresponding to the second routing protocol. Therefore, in the case where the first priority (priority value of 100) of the first network routing protocol is lower than the second priority (priority value of 80) of the second network routing protocol, since the first priority (priority value of 100) is higher than the preset priority (priority value of 150) corresponding to the second routing protocol, the first route can still be introduced into the second routing protocol. For another example, assume that the first routing protocol corresponds to a priority value of 100, the second routing protocol corresponds to a priority value of 120, and the second routing protocol has a priority value of 80 for a predetermined priority. The network device obtains the preset priority of the second routing protocol, and then compares the first priority (the priority value is 100) with the preset priority (the priority value is 80) of the second routing protocol to determine that the first priority is lower than the preset priority corresponding to the second routing protocol. Therefore, in the case where the first priority (with a priority value of 100) of the first network routing protocol is higher than the second priority (with a priority value of 120) of the second network routing protocol, the first route cannot be introduced into the second routing protocol yet because the first priority (with a priority value of 100) is lower than the preset priority (with a priority value of 80) corresponding to the second routing protocol.
The preset priority of the routing protocol may be higher than the priority of the routing protocol itself, or the preset priority of the routing protocol may be lower than the priority of the routing protocol itself, or the preset priority of the routing protocol may be the same as the priority of the routing protocol itself, which is not limited herein. In practical application, the preset priority of the routing protocol can be defined according to the requirements of the practical scenes of different routing protocols, so that the direction of route introduction can be adjusted more flexibly, and the flexibility of the scheme is improved. On the other hand, the preset priority of the routing protocol can be defined by self, so that the attribute of the priority of the routing protocol is not required to be adjusted, and the efficiency of introducing the routing is improved.
Next, in order to better implement the above-mentioned scheme of the embodiment of the present application, the embodiment of the present application further provides a related device for implementing the above-mentioned scheme. Specifically, referring to fig. 5, fig. 5 is a schematic structural diagram of a network device according to an embodiment of the present application. As shown in fig. 5, the network device includes:
an obtaining unit 301, configured to obtain a first priority of a first routing protocol;
the processing unit 302 is configured to introduce a first route from a first routing protocol to a second routing protocol according to a first priority, where the first route corresponds to the first routing protocol, and the first routing protocol and the second routing protocol are different routing protocols operated by the network device.
In one possible design, the processing unit 302 is specifically configured to:
acquiring a second priority of a second routing protocol;
determining that the first priority is higher than the second priority;
the first route is introduced from the first routing protocol to the second routing protocol.
In one possible design, the processing unit 302 is specifically configured to:
acquiring a preset priority corresponding to a second routing protocol;
determining that the first priority is higher than a preset priority;
the first route is introduced from the first routing protocol to the second routing protocol.
In one possible design, the first route includes a default route or an explicit route.
In one possible design, the first routing protocol is an Open Shortest Path First (OSPF) protocol, border Gateway Protocol (BGP), interior Gateway Protocol (IGP), routing Information Protocol (RIP), or intermediate system-to-intermediate system (ISIS) protocol.
In one possible design, the second routing protocol is an open shortest path first, OSPF, protocol for border gateway BGP, interior gateway protocol, IGP, routing information protocol, RIP, or intermediate system to intermediate system ISIS, protocol.
It should be noted that, content such as information interaction and execution process between each module/unit in the network device, the method embodiment corresponding to fig. 3 in the present application is based on the same concept, and specific content may be referred to the description in the foregoing method embodiment shown in the present application, which is not repeated herein.
The embodiment of the present application further provides a network device, please refer to fig. 6, fig. 6 is another schematic structural diagram of the network device provided in the embodiment of the present application, and the network device 400 may be used as the network device described in the corresponding embodiment of fig. 5 to implement the operations performed by the network device in the corresponding embodiment of fig. 3. As shown in fig. 6, the network device 400 includes a processor 401, a communication interface 402, a memory 403, and a bus 404. In particular, processor 401 may be a central processing unit (CPU, central processing unit), may be an application specific integrated circuit (ASIC, application specific integrated circuit), or may be one or more integrated circuits configured to implement embodiments of the present application, such as: one or more digital signal processors (DSP, digital signal processor), or one or more field programmable gate arrays (FPGA, field programmable gate array). A communication interface 402 for communicating with other network devices.
Specifically, the communication interface 402 is configured to obtain a first priority of the first routing protocol;
the processor 401 is configured to introduce a first route from a first routing protocol to a second routing protocol according to a first priority, where the first route corresponds to the first routing protocol, and the first routing protocol and the second routing protocol are different routing protocols operated by the network device.
In one example, the processor 401 is specifically configured to:
acquiring a second priority of a second routing protocol;
determining that the first priority is higher than the second priority;
the first route is introduced from the first routing protocol to the second routing protocol.
In one example, the processor 401 is specifically configured to:
acquiring a preset priority corresponding to a second routing protocol;
determining that the first priority is higher than a preset priority;
the first route is introduced from the first routing protocol to the second routing protocol.
Memory 403 is used to store program codes, configuration files for network devices within the TSN domain, or other content that may implement the methods of the present application. The memory 403 may be specifically a volatile memory (RAM) such as a random-access memory (RAM); or a nonvolatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory (flash memory), a hard disk (HDD) or a Solid State Drive (SSD); or a combination of memories of the above kind. Memory 403 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
The specific connection medium between the communication interface 402, the processor 401, and the memory 403 is not limited in the embodiment of the present application. In the embodiment of the present application, the memory 403, the processor 402 and the communication interface 402 are connected through the bus 404 in fig. 6, where the bus is indicated by a thick line in fig. 6, and the connection manner between other components is only schematically illustrated, but not limited to. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
It should be noted that, content such as information interaction and execution process between each module/unit in the network device, the method embodiment corresponding to fig. 3 in the present application is based on the same concept, and specific content may be referred to the description in the foregoing method embodiment shown in the present application, which is not repeated herein.
Embodiments of the present application also provide a method comprising a computer program product which, when run on a processor, implements a routing process as described in the embodiment shown in fig. 3 described above.
There is further provided in an embodiment of the present application a computer readable storage medium having stored therein a program for performing signal processing, which when run on a processor, implements a method of routing as described in the embodiment shown in fig. 3 described above.
The functions of the network device provided in the embodiment of the present application may be specifically integrated into a chip, where the chip includes: a processing unit, which may be, for example, a processor, and a communication unit, which may be, for example, an input/output interface, pins or circuitry, etc. The processing unit may execute the computer-executable instructions stored in the storage unit to cause the chip to perform the method of routing described in the embodiment shown in fig. 3. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit in the wireless access device side located outside the chip, such as a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a random access memory (random access memory, RAM), etc.
It should be further noted that the above described embodiments of the apparatus are only schematic, where the units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the application, the connection relation between the modules represents that the modules have communication connection therebetween, and can be specifically implemented as one or more communication buses or signal lines.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented by means of software plus necessary general purpose hardware, or of course may be implemented by dedicated hardware including application specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components and the like. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions can be varied, such as analog circuits, digital circuits, or dedicated circuits. However, a software program implementation is a preferred embodiment in many cases for the present application. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a readable storage medium, such as a floppy disk, a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a training device, or a network device, etc.) to perform the method described in the embodiments of the present application.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via a wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a training device, a data center, or the like that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, a hard Disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.

Claims (15)

1. A method of routing, comprising:
the network equipment acquires a first priority of a first routing protocol;
the network device introduces a first route from the first route protocol to a second route protocol according to the first priority, wherein the first route corresponds to the first route protocol, and the first route protocol and the second route protocol are different route protocols operated by the network device.
2. The method of claim 1, wherein the network device directing a first route from the first routing protocol to a second routing protocol according to the first priority, comprising:
the network equipment acquires a second priority of a second routing protocol;
the network device determining that the first priority is higher than the second priority;
the network device directs a first route from the first routing protocol to a second routing protocol.
3. The method of claim 1, wherein the network device directing a first route from the first routing protocol to a second routing protocol according to the first priority, comprising:
the network equipment acquires a preset priority corresponding to a second routing protocol;
The network device determines that the first priority is higher than the preset priority;
the network device directs a first route from the first routing protocol to a second routing protocol.
4. A method according to any one of claims 1 to 3, wherein the first route comprises a default route or a detailed route.
5. The method according to any of claims 1 to 4, wherein the first routing protocol is an open shortest path first, OSPF, protocol, border gateway, BGP, IGP, RIP, or ISIS, protocol.
6. The method according to any of claims 1 to 5, wherein the second routing protocol is an open shortest path first, OSPF, protocol, BGP, IGP, RIP, or ISIS, protocol.
7. A network device, comprising:
an acquiring unit, configured to acquire a first priority of a first routing protocol;
and the processing unit is used for introducing a first route from the first route protocol to a second route protocol according to the first priority, wherein the first route corresponds to the first route protocol, and the first route protocol and the second route protocol are different route protocols operated by the network equipment.
8. The network device of claim 7, wherein the processing unit is specifically configured to:
acquiring a second priority of a second routing protocol;
determining that the first priority is higher than the second priority;
a first route is introduced from the first routing protocol to a second routing protocol.
9. The network device of claim 7, wherein the processing unit is specifically configured to:
acquiring a preset priority corresponding to a second routing protocol;
determining that the first priority is higher than the preset priority;
a first route is introduced from the first routing protocol to a second routing protocol.
10. The network device of any of claims 7 to 9, wherein the first route comprises a default route or an explicit route.
11. The network device according to any of claims 7 to 10, wherein the first routing protocol is an open shortest path first, OSPF, protocol, BGP, IGP, RIP, or ISIS, protocol.
12. The network device according to any of claims 7 to 11, wherein the second routing protocol is an open shortest path first, OSPF, protocol for border gateway BGP, an interior gateway protocol, IGP, a routing information protocol, RIP, or an intermediate system to intermediate system, ISIS, protocol.
13. A network device comprising a processor and a memory, the processor being coupled to the memory,
the memory is used for storing programs;
the processor configured to execute the program in the memory, to cause the network device to perform the method of any one of claims 1 to 6.
14. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method according to any of claims 1 to 6.
15. A computer program product having computer readable instructions stored therein, which when executed by a processor, implement the method of any of claims 1 to 6.
CN202210952479.3A 2022-08-09 2022-08-09 Routing processing method, network equipment and computer readable storage medium Pending CN117640499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210952479.3A CN117640499A (en) 2022-08-09 2022-08-09 Routing processing method, network equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210952479.3A CN117640499A (en) 2022-08-09 2022-08-09 Routing processing method, network equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117640499A true CN117640499A (en) 2024-03-01

Family

ID=90029111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210952479.3A Pending CN117640499A (en) 2022-08-09 2022-08-09 Routing processing method, network equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117640499A (en)

Similar Documents

Publication Publication Date Title
US10164782B2 (en) Method and system for constructing a loop free multicast tree in a data-center fabric
JP6369698B2 (en) Traffic switching method, device, and system
US8363662B2 (en) Alternate down paths for directed acyclic graph (DAG) routing
CN109905251B (en) Network management method, device, electronic equipment and storage medium
CN111510379A (en) EVPN message processing method, device and system
EP4329258A1 (en) Notification method and apparatus for computing power resources, storage medium, and electronic apparatus
US9917766B2 (en) Loop-free hybrid network
CN105553844B (en) A kind of transmission method and the network equipment of Link State Notification
CN111385194B (en) Method for converging network path and related equipment
CN108092896B (en) Stacking system and aggregation group creation apparatus
US20190334814A1 (en) Path establishment method and device, and network node
CN117640499A (en) Routing processing method, network equipment and computer readable storage medium
CN114531396B (en) Fault back switching method and device in Ethernet virtual private network
CN112751766B (en) Message forwarding method and system, related equipment and chip
CN112637053A (en) Method and device for determining backup forwarding path of route
CN113595915A (en) Method for forwarding message and related equipment
CN113014481B (en) Method, device, equipment and storage medium for transmitting link state notification
CN111385182B (en) Traffic transmission method, device and system
CN104320346A (en) Status information publishing method and device
US20140293805A1 (en) Method for turning off routers in a communications network and router implementing this method
CN109688060B (en) Link grouping configuration method and device and router
CN114124780B (en) Route issuing method, device, electronic equipment and storage medium
CN115550234B (en) Information notification method, controller and storage medium
WO2023050818A1 (en) Data forwarding method and system, electronic device, and storage medium
CN116112417A (en) Data processing method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication