Routing priority transmission and reception methods, devices, network equipment, and network systems
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]目前,在网络中,由于误配置等因素,可能会导致网络中处于同一路由域内的不同的网络设备上运行的路由协议的优先级不同,进而可能导致网络中产生诸如路由环路之类的路由问题,这类路由问题往往涉及设备较多且隐蔽难以发现,严重影响业务流量的正常转发
Smart Images

Figure CN122578503A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network technology, and in particular to a method, apparatus, network device, and network system for transmitting and receiving routing priorities. Background Technology
[0002] In a network, for a given destination device, a network device may obtain multiple different routes to that device through different routing protocols. These different routing protocols can be configured with different priorities. Based on this, given multiple different routes to the same destination device, the network device can select a target route from these routes based on the priority of the routing protocol used to obtain each route, to guide subsequent traffic forwarding. The priority of the routing protocol can also be referred to as route priority.
[0003] Currently, due to factors such as misconfiguration, different network devices running routing protocols within the same routing domain may have different priorities, which may lead to routing problems such as routing loops. These routing problems often involve many devices and are difficult to detect, seriously affecting the normal forwarding of service traffic. Summary of the Invention
[0004] This application provides a method, apparatus, network device, and network system for transmitting and receiving routing priorities, which can promptly detect differences in the priorities of routing protocols running on network devices within the same routing domain, and thus provide prompts, helping users to promptly identify potential routing problems.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] In a first aspect, a method for receiving routing priority is provided, applied to a first network device, wherein a first routing protocol runs on the first network device, the method comprising: receiving a first priority of the first routing protocol on a second network device; and outputting a prompt message when the first priority is different from a second priority, wherein the second priority is the priority of the first routing protocol on the first network device.
[0007] In this application, a first network device receives a first priority of a first routing protocol sent by a second network device within the routing domain, and compares the received first priority with a second priority of the locally running first routing protocol. If the first priority is found to be different from the locally running second priority, a prompt message is output to indicate this difference. In this way, it is possible to promptly detect differences in routing priorities among network devices within the same routing domain, thereby helping to identify potential routing problems caused by this.
[0008] It should be noted that the first priority may include the priority of at least one routing process on the second network device that is within the target routing domain, and the second priority may include the priority of at least one routing process on the first network device that is within the target routing domain.
[0009] Optionally, the prompt information is used for alarm purposes. For example, the prompt information can be a routing alarm message, used to alert the user that there is a routing problem in the current network.
[0010] Optionally, the prompt message is used to indicate that the priority of the first routing protocol on the second network device is different from the priority of the first routing protocol on the first network device. In this way, the prompt message can prompt the user to check the routing priorities on the first and second network devices to avoid routing problems caused by different routing priorities.
[0011] Optionally, the prompt information includes a device identifier corresponding to the first priority, which is used to identify the second network device. By using the device identifier corresponding to the first priority, users can quickly locate the second network device as a network device with a different routing priority than the first network device, thus improving network operation and maintenance efficiency.
[0012] Optionally, if the first priority and the second priority are different, the first network device may further determine the target priority based on the device identifier corresponding to the first priority and the device identifier corresponding to the second priority, wherein the device identifier corresponding to the first priority is used to identify the second network device and the device identifier corresponding to the second priority is used to identify the first network device; and set the priority of the first routing protocol on the first network device to the target priority.
[0013] In this application, each network device within the same routing domain can receive both the device identifier corresponding to the priority of the first routing protocol and the device identifier corresponding to the priority of its local first routing protocol. The same priority is then uniformly selected as the target priority, and the priority of the local first routing protocol is uniformly set as the target priority. This ensures that the priorities of routing protocols within the routing domain are consistent, thereby alleviating routing problems caused by inconsistent priorities among routing protocols within the same routing domain.
[0014] Optionally, if the first network device sets the priority of its local first routing protocol to the target priority, the prompt message can also be used to indicate the target priority of the first routing protocol on the first network device, thereby prompting the user that the priority of the first routing protocol on the network device has been reset. The target priority may be the first priority or the second priority. Of course, if the first network device also receives the priorities of the first routing protocols from other network devices besides the second network device, the target priority may also be a priority different from both the first and second priorities.
[0015] Optionally, the first priority includes the priorities of multiple routing processes of the first routing protocol running on the second network device. The priority of each routing process corresponds to a device identifier, and the device identifiers corresponding to the priorities of different routing processes are different. The device identifier corresponding to the priority of different routing processes is a unique identifier for the second network device under that routing process.
[0016] Optionally, the process of receiving the first priority of the first routing protocol on the second network device may include: receiving a routing priority publication message sent by the second network device, wherein the routing priority publication message carries the first priority.
[0017] In this application, existing protocol messages can be reused as route priority advertisement messages to carry route priorities, thereby saving message overhead. For example, the first routing protocol is the Intermediate System to Intermediate System (ISIS) protocol, and the route priority advertisement message is a Link State PDU (protocol data unit, LSP). Alternatively, the first routing protocol is the Open Shortest Path First (OSPF) protocol, and the route priority advertisement message is a Link State Advertisement (LSA) message. Or, the first routing protocol is the Border Gateway Protocol (BGP), and the route priority advertisement message is a BGP Open message.
[0018] Optionally, the routing priority publication message includes a type length value (TLV) field, and the TLV field carries the first priority.
[0019] Optionally, the routing priority publication message also carries a device identifier corresponding to the first priority, which is used to identify the second network device. Thus, if the first priority and the second priority are different, the first network device can output a prompt message containing the device identifier corresponding to the first priority to indicate to the user that the network device with a different routing priority from the first network device is the second network device.
[0020] Optionally, the output prompt information may specifically include: displaying the prompt information; or sending the prompt information to a control device.
[0021] Secondly, a method for sending routing priorities is provided, applied in a second network device, wherein a first routing protocol runs on the second network device. The method includes: sending a first priority of the first routing protocol on the second network device to the first network device, wherein the first priority is used by the first network device to output a prompt message when the first priority is different from a second priority, and the second priority is the priority of the first routing protocol on the first network device.
[0022] In this application, the second network device can send the first priority of the first routing protocol to the first network device that is in the same routing domain as itself. This allows the first network device to output a prompt message if the second priority of the first routing protocol it is running is different from the first priority. In this way, the different priorities of the routing protocols of network devices in the same routing domain can be detected in a timely manner, which helps to detect routing problems caused by routing priorities in a timely manner.
[0023] Optionally, the process of sending the first priority of the first routing protocol on the second network device to the first network device may include: sending a routing priority publication message to the first network device, wherein the routing priority publication message carries the first priority.
[0024] Optionally, the first routing protocol is ISIS, and the route priority advertising message is an LSP. Alternatively, the first routing protocol is OSPF, and the route priority advertising message is an LSA. Alternatively, the first routing protocol is BGP, and the route priority advertising message is a BGP OPEN message.
[0025] Optionally, the routing priority publication message includes a TLV field, and the TLV field carries the first priority.
[0026] Optionally, the routing priority publishing message also carries a device identifier corresponding to the first priority, which is used to identify the second network device.
[0027] Thirdly, a routing priority receiving device is provided, the routing priority receiving device comprising at least one module, the at least one module being used to execute the routing priority receiving method described in the first aspect above.
[0028] Fourthly, a routing priority sending apparatus is provided, the routing priority sending apparatus comprising at least one module, the at least one module being used to execute the routing priority sending method described in the second aspect above.
[0029] Fifthly, a network device is provided, the network device including a processor, the processor being configured to execute at least one program instruction or code stored in a memory to implement the routing priority receiving method described in the first aspect or the routing priority sending method described in the second aspect.
[0030] In a sixth aspect, a network system is provided, the network system comprising a first network device and a second network device, the first network device being configured to perform the routing priority receiving method described in the first aspect, and the second network device being configured to perform the routing priority sending method described in the second aspect.
[0031] In a seventh aspect, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer device, cause the computer device to perform the routing priority receiving method described in the first aspect or the routing priority sending method described in the second aspect.
[0032] Eighthly, a computer program product containing instructions is provided, which, when run on a computer device, causes the computer device to execute the routing priority receiving method described in the first aspect or the routing priority sending method described in the second aspect.
[0033] The technical effects achieved by the second to eighth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect, and will not be repeated here. Attached Figure Description
[0034] Figure 1 A schematic diagram of a network system configured with multiple different routing protocols is provided for an embodiment of this application;
[0035] Figure 2This is a schematic diagram of a network system that uses multiple routing processes of the same routing protocol to form a network, as provided in an embodiment of this application.
[0036] Figure 3 This application provides a schematic diagram of the structure of a network device according to an embodiment of the present application.
[0037] Figure 4 A flowchart illustrating a method for sending routing priorities as provided in an embodiment of this application;
[0038] Figure 5 A flowchart illustrating a method for receiving routing priorities as provided in an embodiment of this application;
[0039] Figure 6 A flowchart illustrating a routing priority sending and receiving method provided in an embodiment of this application;
[0040] Figure 7 A schematic diagram illustrating how routing priority is carried through the TLV field in an LSP, as provided in an embodiment of this application;
[0041] Figure 8 A schematic diagram illustrating another method of carrying routing priority via the TLV field in an LSP, as provided in this application embodiment;
[0042] Figure 9 A schematic diagram illustrating how routing priority is carried through the TLV field in an LSA message, as provided in an embodiment of this application;
[0043] Figure 10 A schematic diagram illustrating how routing priority is carried through the TLV field in a BGP message, as provided in an embodiment of this application;
[0044] Figure 11 A schematic diagram of a routing priority receiving device provided in an embodiment of this application;
[0045] Figure 12 This is a schematic diagram of a routing priority sending device provided in an embodiment of this application. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0047] Before providing a detailed explanation of the embodiments of this application, let's first introduce the application scenarios involved in the embodiments of this application.
[0048] Currently, data communication networks have become increasingly large and complex, with hundreds or even thousands of network devices used for routing and forwarding. Consequently, networks using only a single routing protocol are rare; most are complex networks combining multiple routing protocols or multiple routing processes using the same protocol, forming complex network systems containing multiple routing domains. For example, multiple routing protocols may include, but are not limited to, at least two of OSPF, ISIS, BGP, and Routing Information Protocol (RIP). A routing domain refers to a small unit that has the authority to independently decide which routing protocol to use within its system. One routing protocol can operate within a routing domain. Multiple routing domains can use multiple different types of routing protocols, or they can use the same type of routing protocol.
[0049] In a network system comprising multiple routing domains, for a given destination device, network devices within the system may obtain multiple different routes to that destination device through different routing protocols or different routing processes of the same routing protocol. However, at any given time, only one of the multiple routes to the same destination device will be used to guide traffic forwarding. Therefore, to select the target route for traffic forwarding from these multiple routes, various routing protocols running on the network devices, as well as different routing processes of the same routing protocol, are configured with corresponding priorities. Thus, the network device can select the target route from these multiple routes based on the priority of the routing protocol or routing process that obtained each route. In this embodiment, the priority of the routing protocol or routing process can also be referred to as routing priority. Specifically, routing priority can be characterized by a priority value. For example, a larger priority value indicates a lower priority, and a smaller priority value indicates a higher priority.
[0050] During network operation, network device configurations may change or be upgraded, or new network devices may be added. In such scenarios, due to factors such as configuration errors, routing protocols within the same routing domain may have different priorities, potentially leading to routing problems such as routing loops. These routing problems often involve many devices, are difficult to detect, and severely impact the normal forwarding of service traffic.
[0051] For example, Figure 1 A network system configured with multiple different routing protocols is shown. In this network system, network devices 101 to 103 all run the ISIS protocol and the OSPF protocol, thereby forming two routing domains, namely the ISIS routing domain and the OSPF routing domain.
[0052] In network device 101, the priority of the ISIS protocol is higher than that of the OSPF protocol. For example, the priority value of the ISIS protocol is 5, and the priority value of the OSPF protocol is 10.
[0053] On network device 102, the priority of the ISIS protocol is lower than that of the OSPF protocol. For example, the priority value of the ISIS protocol is 15, while the priority value of the OSPF protocol is 10.
[0054] On network device 103, the priority of the ISIS protocol is higher than that of the OSPF protocol. For example, the priority value of the ISIS protocol is 5, and the priority value of the OSPF protocol is 10.
[0055] Based on this, after network device 103 advertises routes to the first destination device within the ISIS and OSPF routing domains, the routing processes of both ISIS and OSPF on network devices 101 and 102 will receive these routes and each obtain a route to the first destination device based on the received routes. In this case, network device 101, based on the priority of its local routing protocols, selects the route R1 obtained by the ISIS protocol (with higher priority) from the routes obtained by the ISIS protocol and the routes obtained by OSPF as the destination route to guide the forwarding of subsequent traffic. Network device 102, based on the priority of its local routing protocols, selects the route R2 obtained by the OSPF protocol (with higher priority) from the routes obtained by the ISIS protocol and the routes obtained by OSPF as the destination route to guide the forwarding of subsequent traffic.
[0056] like Figure 1 As shown, on network device 101, the outgoing interface corresponding to route R1 obtained by the ISIS protocol is interface 1011, which is connected to network device 102. On network device 102, the outgoing interface corresponding to route R2 obtained by the OSPF protocol is interface 1021, which is connected to network device 101. In this case, when network device 101 receives a service packet destined for the first destination device, it will forward the service packet to network device 102 through interface 1011 based on route R1. After receiving the service packet, network device 102 will forward the service packet to network device 101 through interface 1021 based on route R2 obtained by the OSPF protocol. In this way, a stable routing loop is formed between network device 101 and network device 102.
[0057] Depend on Figure 1As can be seen in the example network system, because the ISIS protocols running on network device 101 and network device 102 within the ISIS routing domain have different priorities, in scenarios where multiple routing protocols are running, the routes to the same destination device selected by the two network devices based on the priority of the routing protocols are routes obtained by different routing protocols. The routes obtained by different routing protocols eventually lead to the formation of a stable routing loop.
[0058] For example, Figure 2 This paper illustrates a network system that uses multiple routing processes of the same routing protocol for joint networking. In this system, network devices 202 and 205 each run two ISIS processes, while other network devices each run one ISIS process. Through the two routing processes of the ISIS routing protocol running on network devices 202 and 205, the network system forms two routing domains: ISIS1 and ISIS2. Specifically, the ISIS1 processes on network devices 202, 205, 201, 203, and 204 are all within the ISIS1 routing domain. The ISIS2 processes on network devices 202, 205, and 206 to 209 are all within the ISIS2 routing domain. In this network system, the ISIS1 and ISIS2 processes have different priorities; for example, the priority of the ISIS1 process is lower than that of the ISIS2 process. For example, the priority value P1 of the ISIS1 process is 15, and the priority value P2 of the ISIS2 process is 5.
[0059] In an exemplary scenario, due to a configuration error, the ISIS1 process on network device 204 and the ISIS2 process on network device 205 establish a neighbor relationship, causing the ISIS1 and ISIS2 routing domains to mistakenly become linked, i.e., they merge into a single routing domain. Thus, the network device running the ISIS1 process and the network device running the ISIS2 process are in the same routing domain. In this situation, when network device 201 advertises route R with itself as the destination device in the ISIS1 routing domain, route R will follow... Figure 2The first publishing path, shown by the solid line, is published to network device 204. Due to a configuration error, the ISIS1 process on network device 204 and the ISIS2 process on network device 205 collude. Therefore, after obtaining a route to network device 201, the ISIS1 process on network device 204 will not only publish this route to the ISIS1 process on network device 205, but also to the ISIS2 process on network device 205. Thus, after obtaining a route to network device 201, the ISIS2 process on network device 205 will follow... Figure 2 The second advertising path, indicated by the dashed line, advertises the route within the ISIS2 routing domain, ensuring that the route ultimately reaches the ISIS2 process on network device 202. Thus, both the ISIS1 and ISIS2 processes on network device 202 will obtain a route to network device 201. Since the priority of the ISIS1 process is lower than that of the ISIS2 process, both network devices 202 and 205 will choose the route to network device 201 obtained by their respective ISIS2 processes as the destination route to guide subsequent traffic forwarding.
[0060] Based on this, after receiving a service packet destined for network device 201, network device 202 forwards the service packet to network device 208 based on the selected destination route. Thus, the service packet will be forwarded to network device 205 along a path opposite to the direction of the second published path. After receiving the service packet, network device 205 forwards the service packet to network device 204 based on the destination route obtained through the ISIS2 process. Thus, the service packet will continue to be forwarded to network device 202 along a path opposite to the direction of the first published path. In this way, a stable routing loop is formed in the network system.
[0061] Depend on Figure 2 As seen in the example network system, due to a configuration error, the ISIS1 process on network device 204 and the ISIS2 process on network device 205 mistakenly collude, causing the two original routing domains to merge into one. In this situation, because the priorities of the ISIS protocols in the merged routing domain are inconsistent (i.e., the priorities of the ISIS1 process and the ISIS2 process are inconsistent), a stable routing loop is ultimately formed.
[0062] Based on the two scenarios in the above examples, it is evident that inconsistent priorities of routing protocols within the same routing domain can lead to routing loops. In some cases, these inconsistencies may also cause other routing problems. Therefore, this application provides a method for sending and receiving routing priorities applicable to the aforementioned scenarios. In this method, a second network device can send the first priority of its own running first routing protocol to a first network device within the routing domain. Correspondingly, upon receiving the first priority, the first network device compares it with the second priority of its locally running first routing protocol. If the first priority differs from the local second priority, a prompt message is output. This helps to promptly detect differences in the priorities of routing protocols among different network devices within the same routing domain, thereby facilitating the timely detection of potential routing problems caused by inconsistent routing priorities.
[0063] The routing priority transmission and reception method provided in this application can be applied to a network system including multiple network devices. These multiple network devices can jointly form a network through various routing protocols, thereby creating multiple routing domains. For example, ... Figure 1 As shown, multiple network devices can form a network using ISIS and OSPF protocols. Of course, other types of routing protocols can also be used, and this application does not limit this. Alternatively, the multiple network devices can also form a network using multiple routing processes of the same routing protocol, for example, as... Figure 2 As shown, multiple network devices can form a network through multiple routing processes of the ISIS protocol. Alternatively, these multiple network devices can also form a network through a single routing protocol, thereby creating a single routing domain.
[0064] For example, in the embodiments of this application, any network device in the network system, such as the first network device, can receive the first priority of the first routing protocol sent by other network devices in the routing domain, such as the second network device, and compare the received first priority with the second priority of the first routing protocol running locally. If the first priority is found to be different from the local second priority, a prompt message is output to prompt the user. This helps to promptly discover that the routing protocols of network devices in the same routing domain have different priorities, and thus helps to promptly discover routing problems caused by inconsistent routing priorities.
[0065] Optionally, the network system may further include a control device, which can be used to manage and control network devices within the network system. For example, in an embodiment of this application, if any network device in the network system determines, through the routing priority receiving method provided in this application, that the priority of the routing protocol on another network device is inconsistent with the priority of the local routing protocol, it can output a prompt message to the control device. In this way, the control device can prompt the user to check the network based on the prompt message.
[0066] It should be noted that the network devices in the above network system can be devices or servers with Layer 3 routing capabilities, such as routers, switches, firewalls, and IP protocol stack servers. For example, Figure 3 This is a schematic diagram of the structure of a network device provided in an embodiment of this application. See also... Figure 3 The network device 300 may include a processor 310, a forwarding chip 320, and a network interface card 330.
[0067] The processor 310 includes a central processing unit (CPU) and / or a dedicated hardware chip. The CPU refers to a general-purpose CPU with high scalability and flexibility. For example, a CPU can be a single-core processor or a multi-core processor. The dedicated hardware chip is a high-performance processing hardware module. The dedicated hardware chip includes at least one of the following: application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or network processor (NP).
[0068] The forwarding chip 320 is used for forwarding requests and data. For example, the forwarding chip 320 is used by network device 300 to send and receive packets. It should be noted that there can be one or more forwarding chips 320, and each forwarding chip can be used to control network interface card 330 to implement packet sending and receiving.
[0069] For example, the network interface card 330 may include at least one network interface, such as Figure 3 The network interfaces are 1, 2, 3, ..., n. Each network interface uses a transceiver or similar device to communicate with other devices or communication networks.
[0070] For example, Figure 3 Network interface 1 communicates with the control device. Figure 3The network interface 2 communicates with other network devices. Optionally, the network interface card 330 includes at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless protected local area networks (WLAN) interface, a cellular network interface, or a combination thereof.
[0071] Optionally, the network interface card 330 may also include a controller (not shown) for managing and controlling at least one network interface.
[0072] The network interface card 330 is connected to the forwarding chip 320, and the forwarding chip 320 is connected to the processor 310 via an internal connection 340. The internal connection 340 includes a pathway for data transmission between the network interface card 330, the forwarding chip 320, and the processor 310. Optionally, the internal connection 340 can be a single board or a bus. For example, the internal connection 340 can be an Ethernet, Fibre Channel, Peripheral Component Interconnect Express (PCI-E) bus, RapidIO (a high-performance, low-pin-count, packet-switched interconnect architecture), InfiniBand, or XAUI bus (an interface extender that connects the Ethernet Media Access Control (MAC) layer to the physical layer).
[0073] Optionally, the network device 300 also includes a content addressable memory (CAM) 350. The CAM 350 may be, for example, a ternary content addressable memory (TCAM). The CAM 350 is used, for example, to store forwarding table entries and record real-time traffic data. Optionally, the CAM 350 may exist independently and be connected to the forwarding chip 320 via the aforementioned internal connection 340. Alternatively, the CAM 350 and the forwarding chip 320 may be integrated, i.e., the CAM 350 serves as the internal memory of the forwarding chip 320.
[0074] Optionally, the network device 300 also includes a memory 360. The memory 360 may be, for example, a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions; a random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions; an electrically erasable programmable read-only memory (EEPROM); a compact disc read-only memory (CD-ROM) or other optical disc storage; optical disc storage (including compressed discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.); a magnetic disk storage medium; or any other medium capable of carrying or storing desired program code 380 in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 360 may exist independently and be connected to the processor 310 via an internal connection 340. Alternatively, the memory 360 and the processor 310 may be integrated together.
[0075] The memory 360 stores an operating system 370 and program code 380. Optionally, the processor 310 reads the operating system 370 from the memory 360 and runs the operating system 370. The processor 310 also reads the program code 380 from the memory 360 and runs the program code 380 on the operating system 370 to implement the routing priority receiving or sending method provided in the embodiments of this application.
[0076] Optionally, the aforementioned devices are disposed on separate chips, or at least partially or entirely on the same chip. Whether the devices are disposed independently on different chips or integrated on one or more chips often depends on the needs of the product design. This application does not limit the specific implementation of the aforementioned devices.
[0077] The following section provides a detailed description of the routing priority sending and receiving method provided in the embodiments of this application.
[0078] Figure 4 This is a flowchart illustrating a routing priority transmission method 400 provided in an embodiment of this application. This transmission method 400 can be applied to a second network device, which can be any of the network devices in the aforementioned network system. Figure 4 As shown, the method 400 includes:
[0079] S401: Send the first priority of the first routing protocol on the second network device to the first network device.
[0080] The first priority is used by the first network device to output a prompt message when the first priority and the second priority are different. The second priority is the priority of the first routing protocol on the first network device.
[0081] The detailed implementation method of this step will be explained below.
[0082] In this embodiment, the second network device can send its own first priority of its first routing protocol to the first network device, so that the first network device can output a prompt message if the second priority of its own first routing protocol is different from the first priority. That is, the second network device can send its own routing priority to the first network device to help the first network device promptly detect differences in the priorities of routing protocols among network devices within the same routing domain, thereby facilitating the timely detection of routing problems caused by routing priorities.
[0083] Figure 5 This is a flowchart illustrating a routing priority receiving method 500 provided in an embodiment of this application. This receiving method 500 can be applied to a first network device, which can be any network device in the aforementioned network system that differs from the second network device. Figure 5 As shown, the method 500 includes the following steps:
[0084] S501: Receive the first priority of the first routing protocol on the second network device.
[0085] S502: If the first priority and the second priority are different, output a prompt message. The second priority is the priority of the first routing protocol on the first network device.
[0086] The detailed implementation methods of S501 and S502 will be explained below.
[0087] In this embodiment of the application, the first network device receives the first priority of the first routing protocol sent by the second network device in the same routing domain, and compares the first priority with the second priority of the first routing protocol running locally. If the first priority is found to be different from the local second priority, a prompt message is output to prompt the user. In this way, the different priorities of the routing protocols of network devices in the same routing domain can be detected in a timely manner, which helps to detect routing problems caused by routing priorities in a timely manner.
[0088] Based on the routing priority sending method and routing priority receiving method in the above embodiments, Figure 6A flowchart illustrating a routing priority transmission and reception method is shown. This method can be executed jointly by a first network device and a second network device, which can be any two of the multiple network devices included in the aforementioned network system. See also... Figure 6 The method for sending and receiving this route priority includes the following steps:
[0089] S601: The second network device sends the first priority of the first routing protocol on the second network device to the first network device.
[0090] In this embodiment of the application, the second network device runs a first routing protocol, which can be an internal gateway protocol (IGP), such as ISIS or OSPF. Alternatively, the first routing protocol can also be an external gateway protocol (EGP), such as BGP.
[0091] The second network device can obtain its own first priority of the first routing protocol and send the first priority to the first network device in the same routing domain.
[0092] For example, the second network device may send a routing priority announcement message to the first network device, carrying a first priority through the routing priority announcement message. Carrying the first priority through the routing priority announcement message can mean carrying a priority value used to characterize the first priority.
[0093] In one possible scenario, both the second network device and the first network device are within a target routing domain, which is a routing domain comprised of a single routing process of the first routing protocol. In this case, the first priority can be the priority of the first routing process within the target routing domain in the second network device. Based on this, the second network device can send a routing priority announcement message to the first network device through the first routing process, wherein the routing priority announcement message carries the first priority. Correspondingly, the first network device can receive the routing priority announcement message from the second network device through at least one routing process of the first routing protocol within the target routing domain.
[0094] In another possible scenario, the target routing domain where both the second and first network devices reside is a routing domain comprised of multiple routing processes of the first routing protocol. In this case, the second network device may run multiple routing processes of the first routing protocol within the target routing domain, and correspondingly, the first priority includes the priority of each of these routing processes. Based on this, the second network device can send a corresponding routing priority announcement message to the first network device through each routing process, the message carrying the priority of the respective routing process. Accordingly, the first network device can receive the routing priority announcement message from the second network device through at least one routing process of the first routing protocol within the target routing domain.
[0095] For example, a second network device runs a first routing process and a second routing process of a first routing protocol, while the first network device runs a third routing process of the first routing protocol, and the third routing process, the first routing process, and the second routing process all belong to the target routing domain. In this case, the second network device can send a first routing priority announcement message carrying the priority of the first routing process to the first network device through the first routing process, and send a second routing priority announcement message carrying the priority of the second routing process to the first network device through the second routing process. Correspondingly, the first network device can receive the first and second routing priority announcement messages sent by the second network device through the third routing process.
[0096] It should be noted that, in the embodiments of this application, the implementation method of the second network device sending routing priority announcement messages varies depending on the first routing protocol.
[0097] In some embodiments, when the first routing protocol is ISIS or OSPF, the second network device can flood the routing priority advertisement message to other network devices within the same routing domain through the routing process of the first routing protocol it is running. Accordingly, other network devices within the routing domain, including the first network device, can receive the route priority advertisement message flooded within the routing domain through the routing process of the first routing protocol they are running.
[0098] Specifically, in this embodiment of the application, the first priority can be carried by the TLV field in the routing priority advertising message. This routing priority advertising message can be a newly defined message of the first routing protocol, or it can be an existing protocol message of the first routing protocol.
[0099] In the first example, the first routing protocol is the ISIS protocol, and the routing priority advertisement message can be an LSP. In this case, the first priority can be carried through the TLV field in the LSP.
[0100] For example, an LSP includes a GENINFO TLV to support the broadcasting of application-specific information that is not directly related to ISIS protocol operations. Based on this, the GENINFO TLV can be used to carry the first priority.
[0101] like Figure 7 As shown, the `type` field of the `GENINFO TLV` carries a type value of 251, and the `length` field carries a length value L1 indicating the length of the subsequent `value` field. The `value` field may include a `flags` field, an `application identifier` field, an `application IP address information` field, and an `additional application-specific information` field. In this embodiment, the first application identifier can be carried through the `application identifier` field to indicate that the information carried by the subsequent `additional application-specific information` field is local router attribute information, and the first priority can be carried through the `additional application-specific information` field. That is, the local router attribute information includes the priority of the local routing protocol. Optionally, if the local router attribute information also includes other attribute information, the `additional application-specific information` field may also carry other attribute information.
[0102] Specifically, such as Figure 8 As shown, the additional application-specific information field may include a sub-TLV field. The type field of the sub-TLV field may carry a first type value to indicate that the sub-TLV field carries the local routing priority. The value field of the sub-TLV field carries the first priority, and the length field of the sub-TLV field carries a first length value to indicate the length of the value field.
[0103] In the second example, the primary routing protocol is OSPF, and the route priority advertising message can be an LSA message. In this case, the first priority can be carried through the TLV field in the LSA message.
[0104] For example, there are several types of LSA messages. When the OSPF protocol is OSPFv2, the route priority announcement message can be an area-scoped opaque LSA message. When the OSPF protocol is OSPFv3, the route priority announcement message can be an OSPFv3 router information LSA message.
[0105] Figure 9 This illustrates an extended TLV field in an LSA message used to carry the first priority. For example... Figure 9 As shown, the type field in the extended TLV field can be a second type value to indicate that the TLV field is used to carry the local routing priority. The value field in the TLV field carries the first priority, and the length field carries a second length value to indicate the length of the value field.
[0106] In other embodiments, when the first routing protocol is BGP, the second network device can send a route priority announcement message to the first network device through its own running BGP process. Accordingly, the second network device receives the route priority announcement message.
[0107] Specifically, in this embodiment of the application, the first priority of the route priority can be carried through the TLV field in the route priority advertising message. This route priority advertising message can be a newly defined BGP message, or it can be an existing BGP message.
[0108] In one example, considering that BGP does not support attribute flooding within a domain, in this embodiment of the application, the second network device can carry a first priority in the BGP OPEN message sent to the first network device when establishing a BGP connection with the first network device. That is, the route priority publication message can be a BGP OPEN message.
[0109] For example, see Figure 10 The BGP OPEN message includes an optional parameters field, within which a TLV field can be extended to carry the first priority. For example, the type field in the extended TLV field can be a third type value to indicate that the TLV field is used to carry the local route priority. The value field in the TLV field carries the first priority, and the length field carries a third length value to indicate the length of the value field.
[0110] Optionally, in some possible cases, the routing priority announcement message sent by the second network device may carry not only the first priority, but also the device identifier corresponding to the first priority. The device identifier is used to identify the second network device within the routing domain where the routing process corresponding to the first priority is located.
[0111] Wherein, if the first priority is the priority of a routing process on the second network device, then the device identifier corresponding to the first priority is the device identifier corresponding to that routing process. This device identifier can be used to uniquely identify the second network device within the target routing domain. If the first priority includes the priorities of multiple routing processes within the target routing domain, then each routing process's priority corresponds to a device identifier, and the device identifiers corresponding to the priorities of different routing processes are different. In this case, the routing priority publication message published by each routing process can carry the device identifier corresponding to the priority of the corresponding routing process. In this case, the device identifier can be used to identify the second network device within the corresponding routing process, or it can also be referred to as the identifier of the second network device within the corresponding routing process.
[0112] For example, the route priority advertisement message sent by the second network device through the first routing process of the first routing protocol carries the priority of the first routing process. In addition, the route priority advertisement message may also carry the device identifier of the second network device within the first routing process. For example, when the first routing protocol is ISIS, the device identifier can be the system identifier of the second network device within the first routing process; when the first routing protocol is OSPF, the device identifier can be the router identifier of the second network device within the first routing process; when the first routing protocol is BGP, the device identifier can be the BGP identifier of the second network device within the first routing process.
[0113] S602: The first network device compares whether the first priority of the first routing protocol on the second network device is the same as the second priority of the local first routing protocol.
[0114] After receiving the first priority of the first routing protocol on the second network device, the first network device can determine whether the first priority is the same as the second priority of its local first routing protocol. If the first priority and the second priority are the same, the operation ends; if the first priority and the second priority are different, step S603 is executed. The second priority includes the priority of at least one routing process of the first routing protocol running on the first network device and located within the target routing domain.
[0115] In one possible scenario, the first priority is the priority of the first routing process of the first routing protocol on the second network device that is within the target routing domain. In this case, at least one routing process of the first routing protocol on the first network device that is within the target routing domain will receive this first priority. Accordingly, the at least one routing process can compare the first priority with its own priority, and if the priority of any of the at least one routing processes is different from the first priority, then it is determined that the second priority is different from the first priority.
[0116] For example, if two routing processes with a first routing protocol are running on the first network device, and both of these routing processes and the first routing process on the second network device belong to the target routing domain, then if the priority of either of these two routing processes is different from the first priority, then it can be determined that the first priority and the second priority are different.
[0117] In another possible scenario, the second network device runs multiple routing processes of the first routing protocol, all of which belong to the target routing domain. The first priority includes the priorities of these multiple routing processes. In this case, each routing process of the first routing protocol on the first network device that is within the target routing domain can compare the priorities of each routing process in the received first priority list with its own priority. If the priority of any local routing process is different from the priority of any routing process in the received first priority list, then it is determined that the second priority of the local first routing protocol is different from the first priority of the first routing protocol on the second network device.
[0118] For example, a second network device runs two routing processes of the first routing protocol, designated as the first routing process and the second routing process, while the first network device runs one routing process of the first routing protocol, designated as the third routing process. All three routing processes are within the target routing domain. Based on this, the third routing process will receive the priorities of the first and second routing processes. If either the priority of the first or second routing process differs from the priority of the third routing process, then it is determined that the second priority of its local first routing protocol is different from the first priority of the first routing protocol on the second network device. In this example, the first priority includes the priorities of the first and second routing processes, and the second priority is the priority of the third routing process.
[0119] S603: If the first priority is different from the local second priority, the first network device outputs a prompt message.
[0120] If the first priority of the first routing protocol on the second network device differs from the second priority of the local first routing protocol, the first network device can output a prompt message to indicate the inconsistency in routing priorities within the current routing domain. For example, the first network device can display this prompt message locally to inform the user. Alternatively, the first network device can send the prompt message to the control device, which, upon receiving the prompt message, can then inform the user accordingly. For instance, the control device can display the prompt message to inform the user.
[0121] For example, the prompt information may include a priority prompt identifier to indicate that there are network devices in the routing domain where the first network device is located that have different routing priorities than the local routing priority.
[0122] Furthermore, this prompt can also be used to indicate that the priority of the first routing protocol on the second network device is different from the priority of the local first routing protocol.
[0123] For example, the prompt message may also include the device identifier corresponding to the first priority, thereby indicating that the network device with a different priority than the local first routing protocol is the second network device.
[0124] It should be noted that for any routing process of the first routing protocol running on the first network device, such as the third routing process, the first priority received by the third routing process may include the priorities of multiple routing processes on the second network device. Each routing process's priority corresponds to a device identifier used to identify the second network device, and the device identifiers corresponding to the priorities of different routing processes are different. In this case, the device identifier corresponding to the first priority included in the prompt message can be the device identifier corresponding to the priority among the multiple routing processes that is different from the priority of the third routing process. In this way, through the device identifier in the prompt message, it is possible to locate which of the multiple routing processes of the first routing protocol on the second network device has a priority different from that of the local first routing protocol.
[0125] Optionally, the third routing process may receive only one first priority, in which case there will also be only one device identifier corresponding to the first priority. Thus, by using the device identifier corresponding to the first priority included in the prompt message, the network device with a priority different from the local first routing protocol can be identified as the second network device.
[0126] Optionally, the above-mentioned prompts can also be used for alarms. For example, the above-mentioned prompts can be routing alarms, thereby triggering routing alarms.
[0127] Optionally, in some possible situations, the aforementioned prompt information can also be used to indicate routing problems that may arise when routing priorities differ within the same routing domain. For example, when the method provided in this application embodiment is applied to a routing loop detection scenario, the prompt information can also be used to indicate the existence of a routing loop risk in the network.
[0128] Furthermore, in this embodiment of the application, in order to alleviate the routing problems that may be caused by different routing priorities within the same routing domain as much as possible, when the first network device determines that the first priority on the second network device is different from the local second priority, it can also determine the target priority based on a preset priority selection rule that is the same as that of other network devices in the same routing domain, and then set the priority of the local first routing protocol to the target priority, so that the priority of the local first routing protocol is the same as the priority of the first routing protocol on other network devices, including the second network device.
[0129] For example, if the first network device receives a device identifier corresponding to the first priority, the first network device can determine the target priority based on the device identifier corresponding to the first priority and the device identifier corresponding to the second priority. Then, the priority of the local first routing protocol is set to the target priority.
[0130] For example, taking the third routing process of the first routing protocol running in the first network device as an example, if the third routing process determines that its first priority is different from its own second priority, and if it has not received the priority of the first routing protocol sent by other network devices, then the third routing process can select the largest or smallest device identifier from the device identifiers corresponding to the first priority and the device identifiers corresponding to the second priority as the target device identifier, and determine the priority corresponding to the target device identifier as the target priority. Here, the second priority is the priority of the third routing process. The target priority may be either the first priority or the second priority.
[0131] Optionally, if the third routing process also receives the priorities of the first routing protocol sent by other network devices, the third routing process can select the largest or smallest device identifier from the device identifiers corresponding to the priorities of the first routing protocols on all the received network devices and the device identifiers corresponding to the priority of the third routing process itself, and determine the priority corresponding to the target device identifier as the target priority. In this case, the target priority may be the first priority, the second priority, or a priority sent by other network devices that is different from both the first and second priorities.
[0132] After determining the target priority, the first network device can set the priority of at least one routing process within the target routing domain that is running locally to the target priority.
[0133] Based on the method provided in this application embodiment, each network device within the same routing domain can receive the priority of the first routing protocol and the corresponding device identifier sent by other network devices within the same routing domain. Therefore, the target device identifier selected by each network device using the above method will be the same, and correspondingly, the target priority determined based on the target device identifier will also be the same. On this basis, each network device sets the priority of the first routing protocol within its local routing domain as the target priority, thereby ensuring that the priorities of routing protocols within the same routing domain are the same. This alleviates the routing problem caused by different priorities of routing protocols within the same routing domain.
[0134] Alternatively, in some possible cases, the target priority can also be determined in other ways. For example, each network device can be configured with a specified priority for the first routing protocol. Based on this, when each network device discovers that the priority of the received first routing protocol is different from the priority of its local first routing protocol, it can uniformly set the priority of its local first routing protocol to the specified priority. In this way, the priorities of the first routing protocols within the same routing domain can be made the same.
[0135] Optionally, the first network device may display a prompt message after setting the priority of its local first routing protocol to the target priority. In this case, the prompt message may also indicate that the priority of the local first routing protocol is the target priority. For example, when the second priority is the priority of the third routing process on the first network device, the first network device may set the priority of the third routing process to the target priority. Based on this, the output prompt message may include the device identifier corresponding to the priority of the third routing process and the target priority.
[0136] In this embodiment, the second network device can send the first priority of its running first routing protocol to the first network device within the routing domain. Correspondingly, upon receiving the first priority, the first network device compares it with the second priority of the first routing protocol running locally within the same routing domain. If the first priority differs from the local second priority, a prompt message is output. This allows for timely detection of differences in routing protocol priorities among network devices within the same routing domain, thus helping to promptly identify routing problems caused by routing priorities.
[0137] In addition, in this embodiment of the application, the prompt information output by the first network device may include a device identifier corresponding to a priority that is different from the priority of the local first routing protocol. In this way, the device identifier can be used to locate which network device has a priority that is different from the priority of the local first routing protocol, which helps the user to quickly locate and resolve possible routing problems.
[0138] Finally, in this embodiment of the application, network devices within the same routing domain can also adopt a unified priority selection rule to select the same priority to set the priority of their local routing protocols. This will ensure that the priorities of routing protocols within the routing domain are consistent, thereby alleviating routing problems caused by inconsistent priorities of routing protocols within the same routing domain.
[0139] Next, the routing priority sending and receiving method provided in the embodiments of this application will be applied to... Figure 1 and Figure 2 The implementation process and effects of the embodiments of this application will be illustrated by taking the network system shown as an example.
[0140] For example, when in Figure 1 When the routing priority transmission and reception method provided in this application embodiment is applied in the network system shown, within the ISIS routing domain, network device 101 can receive the ISIS protocol priorities on network devices 102 and 103. Network device 101 compares the priority of its local ISIS protocol, the priority of the ISIS protocol on network device 102, and the priority of the ISIS protocol on network device 103, and finds that the priority of the ISIS protocol on network device 102 is different from the priority of its local ISIS protocol. Therefore, network device 101 can output a prompt message to indicate this.
[0141] The prompt information output by network device 101 may include a device identifier corresponding to the priority of the ISIS protocol on network device 102. This device identifier is used to uniquely identify network device 102 within the ISIS routing domain. Therefore, based on the prompt information output by network device 101, it can be determined that the priority of the ISIS protocol on network device 102 is different from the priority of the ISIS protocol on network device 101.
[0142] Similarly, network device 102 will receive the priority of the ISIS protocol from network devices 101 and 103, and find that the priority of the ISIS protocol on network devices 101 and 103 is different from the priority of the local ISIS protocol, and then output a prompt message. Network device 103 will receive the priority of the ISIS protocol from network devices 101 and 102, and find that the priority of the ISIS protocol on network device 102 is different from the priority of the local ISIS protocol, and then output a prompt message.
[0143] Furthermore, Figure 1 After each network device discovers that the priority of the ISIS protocol in other network devices differs from its local ISIS priority, it determines the highest device identifier as the device identifier of network device 101 based on the device identifiers corresponding to the ISIS protocol priorities of the other network devices and its own local ISIS protocol priority. Then, it sets the ISIS protocol priority of network device 101 as the target priority. In this way, each network device sets its local ISIS protocol priority to the ISIS protocol priority of network device 101. Figure 1 As shown, the priority values of the ISIS protocol on network devices 101 and 103 remain unchanged, while the priority value of the ISIS protocol on network device 102 is reset from the original 15 to 5. In this way, the priority of the ISIS protocol is the same on all network devices.
[0144] After the priority of the ISIS protocol becomes the same on all network devices, for routes to the first destination device obtained by the ISIS and OSPF protocols on each network device, each network device will select the route obtained by the ISIS protocol as the destination route to guide subsequent traffic forwarding based on the priority of the ISIS and OSPF protocols. That is, the original destination route to the first destination device on network device 102 was route R2 obtained by the OSPF protocol. After the priority of the ISIS protocol changes, the destination route will become route R3 obtained by the ISIS protocol. The outgoing interface corresponding to route R3 is 1022, which connects to other network devices. In this way, when network device 101 receives a service packet destined for the first destination device, it forwards the service packet to network device 102 through outgoing interface 1011. Network device 102, based on the selected destination route, forwards the service packet to other network devices through outgoing interface 1022, and the routing loop between network device 101 and network device 102 is eliminated.
[0145] For example, when in Figure 2When the routing priority transmission and reception method provided in this application embodiment is applied in the network system shown, since the ISIS1 process on network device 204 and the ISIS2 process on network device 205 have established a neighbor relationship, after each network device floods the corresponding priority through its own running ISIS process, each network device in the ISIS1 routing domain can receive the priority of the ISIS1 process on the network devices in the ISIS1 routing domain, as well as the priority of the ISIS2 process on the network devices in the ISIS2 routing domain. Thus, the ISIS1 routing process on each network device in the ISIS1 routing domain will discover that the priority of the ISIS2 process on each network device in the ISIS2 routing domain is different from the priority of its local ISIS1 process, and will output a prompt message. This prompt message may include the device identifier corresponding to the priority of the ISIS2 process on each network device in the ISIS2 routing domain.
[0146] Similarly, network devices within the ISIS2 routing domain can receive the priorities of not only the ISIS2 processes on other network devices within the ISIS2 routing domain, but also the priorities of the ISIS1 processes on other network devices within the ISIS1 routing domain. Thus, the ISIS2 process on each network device within the ISIS2 routing domain will detect that the priorities of the ISIS1 processes on other network devices within the ISIS1 routing domain differ from the priorities of its local ISIS2 process, and will output a prompt message. This prompt message may include the device identifier corresponding to the priority of the ISIS1 process on other network devices within the ISIS1 routing domain.
[0147] Furthermore, Figure 2 When a network device discovers that the priority of a local ISIS process is inconsistent with the priorities of ISIS processes received from other devices, it determines the highest device identifier as the device identifier corresponding to the priority of the ISIS processes on network device 202, based on the device identifiers corresponding to the priorities of the ISIS processes on other network devices and the device identifiers corresponding to the priorities of its local ISIS process. Then, it sets the priority of the ISIS2 process on network device 202 as the target priority. In this way, each network device sets the priority of its local ISIS process to the priority of the ISIS2 process on network device 202. For example, ... Figure 2As shown, the priority value P1 of the ISIS1 process on network device 202 will be reset to 5. The priority of the ISIS1 process on other network devices within the ISIS1 routing domain will also be reset to 5. In this way, the priority of the ISIS process on all network devices is the same, that is, the priority of the ISIS protocol on all network devices is the same.
[0148] After the priority of the ISIS protocol becomes the same on all network devices, since the priority of the ISIS1 process and the ISIS2 process on network device 202 is the same, for two different routes to network device 201 obtained by the ISIS1 and ISIS2 processes on network device 202, network device 202 will select the directly connected route to network device 201 obtained by the ISIS1 process as the destination route based on the cost values of these two routes. Based on this, after receiving a service packet destined for network device 201, network device 202 forwards the service packet to network device 201 based on the selected destination route. In this way, the service packet will no longer be forwarded back to network device 202 along paths opposite to the second published path or the first published path. Thus, the routing loop in the network system is eliminated.
[0149] It should be noted that, in Figure 2 In the network system shown, although each network device eliminates routing loops by unifying the priority of its local ISIS protocol to the target priority, the problem of cross-contamination between the ISIS1 and ISIS2 routing domains due to misconfiguration remains unresolved. In this situation, the user can locate the problem and resolve the misconfiguration by using the device identifier carried in the prompts output by each network device.
[0150] The routing priority receiving device provided in the embodiments of this application will be described next.
[0151] Figure 11 This is a schematic diagram of a routing priority receiving device provided in an embodiment of this application. This routing priority receiving device can be deployed in the aforementioned network devices, for example... Figure 1 The network devices 101 to 103 shown can all be equipped with a receiving device for this routing priority. Figure 2 The network devices 201 to 208 shown can also be equipped with this receiving device that prioritizes routing. For example... Figure 11 As shown, the receiving device 1100 for routing priority includes a receiving module 1101 and an output module 1102.
[0152] The receiving module 1101 is used to execute S501 in the aforementioned embodiments, or to receive the first priority sent by the second network device in S601 in the aforementioned embodiments. The output module 1102 is used to execute S502 in the aforementioned embodiments, or to execute S602 and S603 in the aforementioned embodiments.
[0153] Optionally, the prompt information output by the output module 1102 is used for alarms.
[0154] Optionally, the prompt message is used to indicate that the priority of the first routing protocol on the second network device is different from the priority of the first routing protocol on the first network device.
[0155] Optionally, the prompt information includes the device identifier corresponding to the first priority, which is used to identify the second network device.
[0156] Optionally, the prompt information is used to indicate the target priority of a first routing protocol on the first network device, wherein the target priority is either the first priority or the second priority.
[0157] Optionally, the routing priority receiving device 1100 further includes a priority selection module 1103, which is used to determine a target priority based on the device identifier corresponding to the first priority and the device identifier corresponding to the second priority when the first priority and the second priority are different. The device identifier corresponding to the first priority is used to identify the second network device, and the device identifier corresponding to the second priority is used to identify the first network device; and the priority of the first routing protocol on the first network device is set as the target priority.
[0158] Optionally, the first priority includes the priorities of multiple routing processes of the first routing protocol running on the second network device, each routing process's priority corresponds to a device identifier, and different routing processes have different device identifiers corresponding to their priorities.
[0159] Optionally, the receiving module 1101 is specifically used to: receive a routing priority publication message sent by the second network device, wherein the routing priority publication message carries a first priority.
[0160] Optionally, the first routing protocol is ISIS, and the route priority advertising message is an LSP. Alternatively, the first routing protocol is OSPF, and the route priority advertising message is an LSA. Alternatively, the first routing protocol is BGP, and the route priority advertising message is a BGP OPEN message.
[0161] Optionally, the routing priority advertising message includes a TLV field, which carries the first priority.
[0162] Optionally, the routing priority advertising message also carries the device identifier corresponding to the first priority, which is used to identify the second network device.
[0163] Optionally, the output module 1102 is specifically used to: display prompt information; or, send prompt information to the control device.
[0164] In this embodiment of the application, the first network device receives the first priority of the first routing protocol sent by the second network device in the same routing domain, and compares the first priority with the second priority of the first routing protocol running locally. If the first priority is found to be different from the local second priority, a prompt message is output to prompt the user. In this way, the different priorities of the routing protocols of network devices in the same routing domain can be detected in a timely manner, which helps to detect routing problems caused by routing priorities in a timely manner.
[0165] Figure 12 This is a schematic diagram of a routing priority sending device provided in an embodiment of this application. This routing priority sending device can be deployed in the network devices described above. For example, Figure 1 Network devices 101 to 103 can all be equipped with devices that transmit this route priority. Figure 2 Network devices 201 to 208 can also be equipped with transmission devices that transmit this route priority. For example... Figure 12 As shown, the routing priority sending device 1200 includes a sending module 1201. The sending module 1201 is used to execute S401 or S601 in the aforementioned embodiments.
[0166] Optionally, the sending module 1201 is specifically used to: send a routing priority announcement message to the first network device, wherein the routing priority announcement message carries a first priority.
[0167] Optionally, the first routing protocol is ISIS, and the route priority advertising message is an LSP. Alternatively, the first routing protocol is OSPF, and the route priority advertising message is an LSA. Alternatively, the first routing protocol is BGP, and the route priority advertising message is a BGP OPEN message.
[0168] Optionally, the routing priority advertising message includes a TLV field, which carries the first priority.
[0169] Optionally, the routing priority advertising message also carries the device identifier corresponding to the first priority, which is used to identify the second network device.
[0170] In this embodiment of the application, the second network device can send the first priority of the first routing protocol to the first network device that is in the same routing domain as itself, so that the first network device can output a prompt message when the second priority of the first routing protocol it is running is different from the first priority. In this way, the different priorities of the routing protocols of network devices in the same routing domain can be detected in a timely manner, which helps to detect routing problems caused by routing priorities in a timely manner.
[0171] It should be noted that the module division in the routing priority receiving and transmitting devices provided in the above embodiments is illustrative and only represents a logical functional division. In actual implementation, other division methods may also be used. Furthermore, the functional modules in the various embodiments of this application can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0172] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a router, switch, or other network device) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0173] Furthermore, the routing priority receiving device and sending device provided in the above embodiments belong to the same concept as the routing priority sending and receiving method embodiments. For details of their specific implementation process, please refer to the method embodiments, which will not be repeated here.
[0174] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0175] In the various embodiments of this application, unless otherwise specified or logically conflicting, the terminology and / or descriptions between different embodiments are consistent and can be referenced mutually. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. In the textual description of the embodiments of this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. In this application, "first," "second," and various numerical designations are only for ease of description and are not used to limit the scope of the embodiments of this application. For example, they are used to distinguish different messages, rather than to describe a specific order or sequence.
[0176] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. The order of the process numbers does not imply the order of execution; the execution order of each process should be determined by its function and internal logic.
[0177] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for receiving routing priorities, characterized in that, Applied to a first network device, the first network device running a first routing protocol, the method includes: Receive the first priority of the first routing protocol on the second network device; If the first priority and the second priority are different, a prompt message is output, where the second priority is the priority of the first routing protocol on the first network device.
2. The method according to claim 1, characterized in that, The notification message is used for alarm purposes.
3. The method according to claim 1, characterized in that, The prompt message is used to indicate that the priority of the first routing protocol on the second network device is different from the priority of the first routing protocol on the first network device.
4. The method according to claim 2 or 3, characterized in that, The prompt information includes the device identifier corresponding to the first priority, which is used to identify the second network device.
5. The method according to claim 1, characterized in that, The prompt information is used to indicate the target priority of the first routing protocol on the first network device, wherein the target priority is either the first priority or the second priority.
6. The method according to claim 5, characterized in that, When the first priority and the second priority are different, the method further includes: The target priority is determined based on the device identifier corresponding to the first priority and the device identifier corresponding to the second priority. The device identifier corresponding to the first priority is used to identify the second network device, and the device identifier corresponding to the second priority is used to identify the first network device. Set the priority of the first routing protocol on the first network device to the target priority.
7. The method according to claim 4 or 6, characterized in that, The first priority includes the priorities of multiple routing processes of the first routing protocol running on the second network device. The priority of each routing process corresponds to a device identifier, and the device identifiers corresponding to the priorities of different routing processes are different.
8. The method according to any one of claims 1 to 7, characterized in that, The first priority of the first routing protocol received on the second network device includes: The system receives a routing priority publication message sent by the second network device, the routing priority publication message carrying the first priority.
9. The method according to claim 8, characterized in that, The first routing protocol is the intermediate system to intermediate system ISIS protocol, and the routing priority advertising message is a link state protocol packet (LSP).
10. The method according to claim 8, characterized in that, The first routing protocol is the Open Shortest Path First (OSPF) protocol, and the routing priority announcement message is a Link State Advertisement (LSA) message.
11. The method according to claim 8, characterized in that, The first routing protocol is Border Gateway Protocol (BGP), and the routing priority announcement message is a BGP Open message.
12. The method according to any one of claims 8 to 11, characterized in that, The routing priority publication message includes a Type Length Value (TLV) field, and the TLV field carries the first priority.
13. The method according to any one of claims 8 to 12, characterized in that, The routing priority publication message also carries the device identifier corresponding to the first priority, which is used to identify the second network device.
14. The method according to any one of claims 1 to 13, characterized in that, The output prompt information includes: Display the prompt message; or send the prompt message to the control device.
15. A method for sending routing priorities, characterized in that, Applied to a second network device, wherein the second network device runs a first routing protocol, the method includes: Send a first priority of the first routing protocol on the second network device to the first network device. The first priority is used by the first network device to output a prompt message when the first priority is different from the second priority. The second priority is the priority of the first routing protocol on the first network device.
16. The method according to claim 15, characterized in that, Sending the first priority of the first routing protocol on the second network device to the first network device includes: A routing priority publication message is sent to the first network device, the routing priority publication message carrying the first priority.
17. The method according to claim 16, characterized in that, The first routing protocol is the intermediate system to intermediate system ISIS protocol, and the routing priority advertising message is a link state protocol packet (LSP).
18. The method according to claim 16, characterized in that, The first routing protocol is the Open Shortest Path First (OSPF) protocol, and the routing priority announcement message is a Link State Advertisement (LSA) message.
19. The method according to claim 16, characterized in that, The first routing protocol is Border Gateway Protocol (BGP), and the routing priority announcement message is a BGP Open message.
20. The method according to any one of claims 16 to 19, characterized in that, The routing priority publication message includes a Type Length Value (TLV) field, and the TLV field carries the first priority.
21. The method according to any one of claims 16 to 20, characterized in that, The routing priority publication message also carries the device identifier corresponding to the first priority, which is used to identify the second network device.
22. A routing priority receiving device, characterized in that, The routing priority receiving device includes at least one module, which is used to perform the routing priority receiving method according to any one of claims 1 to 14.
23. A routing priority transmission device, characterized in that, The routing priority sending device includes at least one module, the at least one module being used to perform the routing priority sending method according to any one of claims 15 to 21.
24. A network device, characterized in that, The network device includes a processor for executing a computer program stored in a memory to implement the routing priority receiving method according to any one of claims 1 to 14 or the routing priority sending method according to any one of claims 15 to 21.
25. A network system, characterized in that, The network system includes a first network device and a second network device, wherein the first network device is used to perform the routing priority receiving method according to any one of claims 1 to 14, and the second network device is used to perform the routing priority sending method according to any one of claims 15 to 21.
26. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a network device, cause the network device to perform the routing priority receiving method according to any one of claims 1 to 14 or the routing priority sending method according to any one of claims 15 to 21.
27. A computer program product containing instructions, characterized in that, When the instruction is executed by the network device, the network device performs the routing priority receiving method according to any one of claims 1 to 14 or the routing priority sending method according to any one of claims 15 to 21.