An end-to-end link computation method and apparatus

By obtaining the ARP table and LLDP neighbor relationships of the networking devices and combining them with routing information, the end-to-end link between the host and the gateway device is calculated, solving the link discovery problem in scenarios such as cloud desktops and achieving accurate and efficient link calculation and alarm display.

CN116405457BActive Publication Date: 2026-01-02NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310200847.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2026-01-02
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

In certain specific scenarios, such as cloud desktop environments, when it is necessary to determine the end-to-end link between the host and the server or gateway device, existing technologies cannot achieve end-to-end link discovery through network topology.

Method used

By obtaining the ARP table, MAC address table, and LLDP neighbor relationship of each device in the network, the link between the nearest access device and gateway device is determined based on the IP address entered by the user. The end-to-end link is calculated by combining the routing information, and possible alarm information is displayed.

Benefits of technology

Even if the host is not in the network topology, the link between the host and the gateway device can be calculated simply by connecting to the network device, which improves the accuracy and efficiency of link calculation and can display potential alarm information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116405457B_ABST
    Figure CN116405457B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network communication, in particular to an end-to-end link calculation method and device. The method comprises the following steps: acquiring an ARP table of each device in networking, a MAC table and an LLDP neighbor relationship of each device; determining a first ARP table containing a source IP from the ARP table of each device based on a source IP address of a source end input by a user, and determining a source MAC corresponding to the source IP in the first ARP table, wherein the first ARP table is an ARP table of a gateway device of the source end; determining a plurality of first interfaces learning the source MAC from the MAC table of each device based on the source MAC, and determining a device to which a first interface with the least total number of MACs learned by the plurality of first interfaces belongs as a first access device closest to the source end based on the total number of the MACs learned by the plurality of first interfaces; and calculating a first link between the first access device and the gateway device of the source end based on the first access device, the gateway device of the source end and the LLDP neighbor relationship of each device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of network communication, and in particular to an end-to-end link calculation method and device. BACKGROUND

[0002] Network topology is an organizational structure describing how transmission media in a network are interconnected. The topology contains nodes and links. A node usually refers to a network port, and a link is a line between network ports, which is usually divided into physical links and data links. A physical link is an actual connected network line, and a data link is a logically functioning network path, which is implemented by link layer standards and protocols. The complexity of network topology increases with the expansion of business. The entire network topology becomes complex. The mainstream mesh topology structure uses routing algorithms to ensure logical links between nodes, making the network more complex.

[0003] However, when a host (not in the network topology) to another host (server) / gateway device of the host needs to be determined in some specific scenarios (such as cloud desktop), the end-to-end link cannot be discovered according to the network topology, and therefore, a method for calculating the end-to-end link is needed to realize the end-to-end link between the host device outside the network and the network device in the network / other device outside the network. SUMMARY

[0004] The present application provides an end-to-end link calculation method and device.

[0005] In a first aspect, the present application provides an end-to-end link calculation method, which comprises:

[0006] Obtaining the ARP table of each device in the network, the MAC address table of each device, and the LLDP neighbor relationship of each device in the network;

[0007] Based on the source IP address of the source end input by a user, a first ARP table containing the source IP is determined from the ARP table of each device, and the source MAC address corresponding to the source IP in the first ARP table is determined, wherein the first ARP table is the ARP table of the gateway device of the source end;

[0008] Based on the source MAC address, a plurality of first interfaces learning the source MAC address are determined from the MAC address table of each device, and based on the total number of MAC addresses learned by the plurality of first interfaces, the device to which the first interface with the smallest total number belongs is determined as the first access device closest to the source end;

[0009] Based on the first access device, the gateway device of the source end, and the LLDP neighbor relationship of each device, the first link between the first access device and the gateway device of the source end is calculated.

[0010] Optionally, the method further comprises:

[0011] determining whether a second ARP table containing the destination IP exists in the ARP table of each device based on the destination IP address of the destination input by the user;

[0012] if it is determined that the second ARP table containing the destination IP exists, determining the second ARP table containing the destination IP and determining the destination MAC address corresponding to the destination IP in the second ARP table, wherein the second ARP table is the ARP table of the gateway device of the destination;

[0013] based on the destination MAC address, determining a plurality of second interfaces that have learned the destination MAC address from the MAC address table of each device, and based on the total number of MAC addresses learned by the plurality of second interfaces, determining the device to which the second interface with the smallest total number of MAC addresses belongs as the second access device closest to the destination;

[0014] based on the second access device, the gateway device of the destination and the LLDP neighbor relationship of each device, calculating the second link between the second access device and the gateway device of the destination.

[0015] Optionally, the method further comprises:

[0016] obtaining routing information of the gateway device of the source and determining next hop information corresponding to the destination IP in the obtained routing information;

[0017] obtaining routing information of the next hop and determining next hop information corresponding to the destination IP in the obtained routing information until the next hop is the gateway device of the destination;

[0018] based on the gateway device of the source, each next hop information and the gateway device of the destination, determining a third link between the gateway device of the source and the gateway device of the destination;

[0019] determining the first link, the second link and the third link as an end-to-end link from the source to the destination.

[0020] Optionally, if it is determined that the second ARP table containing the destination IP does not exist, obtaining routing information of the gateway device of the source and determining next hop information corresponding to the destination IP in the obtained routing information;

[0021] obtaining routing information of the next hop and determining next hop information corresponding to the destination IP in the obtained routing information until the next hop is not an external network device in the network;

[0022] determine a fourth link between the gateway device of the source end and the external network device based on the gateway device of the source end, each next hop information and the external network device;

[0023] determine the first link and the fourth link as an end-to-end link from the source end to the destination end.

[0024] Optionally, the method further comprises:

[0025] receiving alarm data reported by each device in the networking, wherein the alarm data reported by one device comprises interface state information of the device;

[0026] determining whether alarm data of an interface associated with the end-to-end link exists in the alarm data reported by each device, and if so, displaying the alarm on the end-to-end path.

[0027] Optionally, the step of determining the next hop information corresponding to the destination IP in the obtained routing information comprises:

[0028] adopting a shortest route matching rule to determine the next hop information corresponding to the destination IP in the obtained routing information.

[0029] In a second aspect, the present application provides an end-to-end link computing device, the device comprising:

[0030] an obtaining unit configured to obtain ARP tables of each device in the networking, MAC address tables of each device in the networking and LLDP neighbor relationships of each device in the networking;

[0031] a determining unit configured to determine a first ARP table containing a source IP of a source end from ARP tables of each device based on the source IP input by a user, and determine a source MAC address corresponding to the source IP in the first ARP table, wherein the first ARP table is an ARP table of a gateway device of the source end;

[0032] the determining unit is further configured to determine a plurality of first interfaces learning the source MAC address from the MAC address tables of each device based on the source MAC address, and determine a device to which a first interface with a smallest total number of MAC addresses learned by the first interface belongs as a first access device closest to the source end based on the total number of MAC addresses learned by the plurality of first interfaces.

[0033] a computing unit configured to compute a first link between the first access device and a gateway device of the source end based on the first access device, the gateway device of the source end and the LLDP neighbor relationships of each device.

[0034] Optionally, the device further comprises:

[0035] determining unit is further configured to determine the second ARP table containing the destination IP and determine a destination MAC address corresponding to the destination IP in the second ARP table, wherein the second ARP table is an ARP table of a gateway device of the destination end;

[0036] If it is determined that the second ARP table containing the destination IP exists, the determining unit is further configured to determine the second ARP table containing the destination IP and determine a destination MAC address corresponding to the destination IP in the second ARP table, wherein the second ARP table is an ARP table of a gateway device of the destination end;

[0037] The determining unit is further configured to determine, based on the destination MAC address, a plurality of second interfaces from which the destination MAC address is learned from a MAC address table of each of the devices, and determine, based on a total number of MAC addresses learned by the plurality of second interfaces, a device to which a second interface with a smallest total number of MAC addresses belongs as a second access device closest to the destination end;

[0038] The calculating unit is further configured to calculate a second link between the second access device and the gateway device of the destination end based on a LLDP neighbor relationship of the second access device, the gateway device of the destination end and each of the devices.

[0039] Optionally, the apparatus further comprises:

[0040] The obtaining unit is further configured to obtain routing information of a gateway device of a source end, and the determining unit is further configured to determine next-hop information corresponding to the destination IP in the obtained routing information;

[0041] The obtaining unit is further configured to obtain routing information of a next hop, and the determining unit is further configured to determine next-hop information corresponding to the destination IP in the obtained routing information until the next hop is the gateway device of the destination end;

[0042] The calculating unit is further configured to determine a third link between the gateway device of the source end and the gateway device of the destination end based on the gateway device of the source end, each of the next-hop information and the gateway device of the destination end;

[0043] The calculating unit is further configured to determine the first link, the second link and the third link as an end-to-end link from the source end to the destination end.

[0044] Optionally, if it is determined that the second ARP table containing the destination IP does not exist, the obtaining unit is further configured to obtain routing information of a gateway device of a source end, and the determining unit is further configured to determine next-hop information corresponding to the destination IP in the obtained routing information;

[0045] The acquisition unit is further configured to acquire routing information of a next hop, and the determination unit is further configured to determine next hop information corresponding to the destination IP in the acquired routing information until the next hop is not an external network device in the network group.

[0046] The calculation unit is further configured to determine a fourth link between the gateway device of the source end and the external network device based on the gateway device of the source end, each next hop information, and the external network device.

[0047] The calculation unit is further configured to determine the first link and the fourth link as an end-to-end link from the source end to the destination end.

[0048] Optionally, the apparatus further includes:

[0049] The receiving unit is configured to receive alarm data reported by each device in the network group, wherein the alarm data reported by one device includes interface state information of the device.

[0050] The alarm unit is configured to determine whether alarm data of an interface associated with the end-to-end link exists in the alarm data reported by each device, and if so, display the alarm on the end-to-end path.

[0051] Optionally, when determining the next hop information corresponding to the destination IP in the acquired routing information, the determination unit is specifically configured to:

[0052] Determine the next hop information corresponding to the destination IP in the acquired routing information by using a shortest route matching rule.

[0053] In a third aspect, an embodiment of the present application provides an end-to-end link calculation apparatus, which includes:

[0054] A memory configured to store program instructions.

[0055] A processor configured to invoke the program instructions stored in the memory and perform steps of the method according to any one of the above first aspect.

[0056] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium storing computer executable instructions, which are configured to cause a computer to perform steps of the method according to any one of the above first aspect.

[0057] In summary, the end-to-end link calculation method provided by the embodiments of the present application obtains the ARP table of each device in the network, the MAC address table and the LLDP neighbor relationship of each device in the network; based on the source IP address of the source end input by the user, the first ARP table containing the source IP is determined from the ARP table of each device, and the source MAC address corresponding to the source IP in the first ARP table is determined, wherein the first ARP table is the ARP table of the gateway device of the source end; based on the source MAC address, a plurality of first interfaces learning the source MAC address are determined from the MAC address table of each device, and based on the total number of MAC addresses learned by the plurality of first interfaces, the device to which the first interface with the smallest total number belongs is determined as the first access device closest to the source end; based on the first access device, the gateway device of the source end and the LLDP neighbor relationship of each device, the first link between the first access device and the gateway device of the source end is calculated.

[0058] By using the end-to-end link calculation method provided by the embodiments of the present application, according to the source IP address information input by the user, based on the ARP table, the MAC address table of each device in the network, the access device closest to the source end (the entry device of the access network) and the gateway device can be determined, and then according to the LLDP neighbor relationship information of each device in the network, the link associated with the source end between the access device and the gateway device can be determined. In this way, even if a host / server is not in the network topology, as long as the host accesses a network device in the network and the gateway device is in the network topology, the link between the access device and the gateway device of the host can be calculated according to the IP address of the host. BRIEF DESCRIPTION OF DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the description of the embodiments of the present application or the prior art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art according to these drawings.

[0060] Figure 1 A detailed flowchart of an end-to-end link calculation method provided by the embodiments of the present application;

[0061] Figure 2 A schematic diagram of an end-to-end path calculation process provided by the embodiments of the present application;

[0062] Figure 3 A structural schematic diagram of an end-to-end link calculation device provided by the embodiments of the present application;

[0063] Figure 4A hardware architecture schematic diagram of an end-to-end link computing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0064] The terminology used in the present application merely for the purpose of describing particular embodiments and is not intended to be limiting of the present application. The singular forms "a", "an" and "the" used in the present application and its claims are intended to include both singular and plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or", as used in the present application, refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0065] It should be understood that although the terms first, second, third, etc. can be used herein to describe various information, but these information should not be limited to these terms. These terms are only used to distinguish one type of information from another type of information. For example, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information, without departing from the scope of the present application. In addition, depending on the context, the word "if" used herein can be interpreted as "when" or "in response to determining" or "in response to ascertaining".

[0066] For example, referring to Figure 1 A detailed flowchart of an end-to-end link computing method provided in an embodiment of the present application is shown, which comprises the following steps:

[0067] Step 100: Obtain the ARP table of each device in the network managed by the controller, the MAC address table and the LLDP neighbor relationship of each device in the network.

[0068] In the present application, the device performing the above-mentioned end-to-end link computing method can be a controller, of course, it can also be other devices for computing end-to-end link. In the present application, the controller is taken as an example for illustration.

[0069] Specifically, each device (switch, router and other network devices) in the network is managed by the device management module of the controller in advance through SNMP, SSH, Telnet, Netconf and other protocols. The controller obtains the ARP (Address Resolution Protocol) table information and the MAC (Address Resolution Protocol) address table information of each device in the network, and saves them to a specified location (in the database). Further, the controller can periodically obtain the ARP table information and the MAC address table information of each device in the network, and update the ARP table information and the MAC address table information of each device, so as to ensure that the ARP table information and the MAC address table information of each device maintained in the database are accurate and up-to-date.

[0070] Further, the controller can also acquire the LLDP (Link Layer Discovery Protocol) neighbor relationship information of all devices in the network, and save it to a specified location (in the database). Similarly, the controller can periodically acquire the LLDP neighbor relationship information of all devices in the network, and update the LLDP neighbor relationship information of all devices in the network, to ensure that the LLDP neighbor relationship information of all devices in the network maintained in the database is accurate and up-to-date.

[0071] Step 110: Based on the source IP address of the source end input by the user, determine the first ARP table containing the source IP from the ARP tables of the devices, and determine the source MAC address corresponding to the source IP in the first ARP table, wherein the first ARP table is the ARP table of the gateway device of the source end.

[0072] Specifically, if it is determined that the IP address of the source end input by the user is received, it should be noted that the source end can be a device not in the network, or a user host accessing the network. For example, in a cloud desktop scenario, the IP address of the source end input by the user is the IP address of a host, which is not in the network managed by the controller. At this time, the ARP table containing the IP address can be determined from the ARP tables maintained in the database based on the IP address. In actual application, if the ARP table corresponding to a device includes the ARP table item of the IP address, it means that the device is the gateway device of the IP address. That is, the gateway device of the host can be determined according to the IP address of the host and the ARP tables of the devices maintained. Further, the MAC address corresponding to the IP address (the MAC address of the host) can also be determined according to the ARP table item corresponding to the IP address.

[0073] Step 120: Based on the source MAC address, determine a plurality of first interfaces from which the source MAC address is learned from the MAC address tables of the devices, and based on the total number of MAC addresses learned by the plurality of first interfaces, determine the device to which the first interface with the least total number of MAC addresses belongs as the first access device closest to the source end.

[0074] Further, after determining the MAC (source MAC address) address of the host, a number of first interfaces learning the MAC address of the host are determined from the MAC address table of each device maintained in the database. In actual application, if the entry device of the host in the network is network device 1 (access layer), the interface is interface 11, the last layer (aggregation layer) device accessed by network device 1 is network device 2, and the interface is interface 21, then interface 11 will learn the MAC address of the host, and interface 21 will learn at least the MAC address of the host, and will also learn the MAC address of network device 1. That is, in the above-mentioned number of first interfaces, if the interface learning the MAC address of the host learns less total MAC address, it means that the interface is the interface of the host's closest access device.

[0075] For example, after determining that interface 11 and interface 21 both learn the MAC address of the host, the device to which interface 11 belongs can be determined as the closest access device of the host according to the total number of MAC addresses learned by interface 11 and interface 21.

[0076] Step 130: based on the first access device, the gateway device of the source end and the LLDP neighbor relationship of each device, the first link between the first access device and the gateway device of the source end is calculated.

[0077] That is, after determining the closest access device of the source end (the entry device of the network) and the gateway device of the source end, the link between the closest access device of the source end and the gateway device of the source end can be determined according to the LLDP neighbor relationship of each device.

[0078] Further, the IP address of the destination input by the user is obtained, and then the same operation as described above for the source IP address of the source end is performed based on the destination IP address of the destination.

[0079] Specifically, based on a destination IP address of a destination input by a user, it is determined whether a second ARP table containing the destination IP exists in an ARP table of each device; if it is determined that the second ARP table containing the destination IP exists, the second ARP table containing the destination IP is determined, and a destination MAC address corresponding to the destination IP in the second ARP table is determined, wherein the second ARP table is an ARP table of a gateway device of the destination; based on the destination MAC address, a plurality of second interfaces learning the destination MAC address are determined from a MAC address table of each device, and based on a total number of MAC addresses learned by the plurality of second interfaces, a device to which a second access device with the least total number of MAC addresses belongs is determined as a second access device closest to the destination; based on the second access device, a gateway device of the destination and an LLDP neighbor relationship of each device, a second link between the second access device and the gateway device of the destination is calculated.

[0080] In actual application, if the second ARP table containing the destination IP exists in the ARP table of each device, it indicates that the gateway device of the destination exists in the network, at this time, the closest access device of the destination can be found, and then the second link between the closest access device of the destination and the gateway device of the destination is calculated.

[0081] In the embodiment of the application, after the first link between the closest access device of the source and the gateway device of the source, and the second link between the closest access device of the destination and the gateway device of the destination are acquired, the routing information of the gateway device of the source is acquired, and the next hop information corresponding to the destination IP in the acquired routing information is determined; the routing information of the next hop is acquired, and the next hop information corresponding to the destination IP in the acquired routing information is determined until the next hop is the gateway device of the destination; based on the gateway device of the source, each next hop information and the gateway device of the destination, a third link between the gateway device of the source and the gateway device of the destination is determined; and the first link, the second link and the third link are determined as an end-to-end link from the source to the destination.

[0082] Specifically, in the embodiment of the application, when the next hop information corresponding to the destination IP in the acquired routing information is determined, a preferable implementation manner is:

[0083] The shortest routing matching rule is adopted to determine the next hop information corresponding to the destination IP in the acquired routing information.

[0084] It should be noted that the controller can also acquire the routing information of all devices in the network and save it to a designated location (in a database). Similarly, the controller can periodically acquire the routing information of all devices in the network and update the routing information of all devices in the network to ensure that the routing information of all devices in the network maintained in the database is accurate and up-to-date.

[0085] In the embodiment of the application, if the second ARP table containing the destination IP does not exist in the ARP table of each device, it indicates that the gateway device of the destination is not in the network, i.e., the gateway device of the destination is in the external network. At this time, the routing information of the gateway device of the source is acquired, and the next hop information corresponding to the destination IP in the acquired routing information is determined. The routing information of the next hop is acquired, and the next hop information corresponding to the destination IP in the acquired routing information is determined until the next hop is not the external network device in the network. Based on the gateway device of the source, each next hop information, and the external network device, the fourth link between the gateway device of the source and the external network device is determined. The first link and the fourth link are determined as the end-to-end link from the source to the destination.

[0086] By using the above method, the link between the gateway device of the source and the corresponding public network exit can be calculated. For example, the next hop corresponding to the destination IP in the routing information of the target network device is found to be the external network device. Then, the target network device is the public network exit of the source.

[0087] Further, in the embodiment of the application, the controller can also receive the alarm data reported by each device in the network, wherein the alarm data reported by a device includes the interface state information of the device. It is determined whether there is alarm data of the interface associated with the end-to-end link in the alarm data reported by each device. If there is, the alarm is displayed on the end-to-end path.

[0088] In actual application, when any device in the network detects abnormality of its own port, it will report a Trap message (a warning message for notifying network status sent to an SNMP manager) to the controller. Then, after the end-to-end path from the source to the destination is determined, the path information can be displayed on a designated page. Further, in combination with the trap message reported by each device in the network, it is determined whether there is an alarm message of the interface associated with the end-to-end link. If there is, the alarm can be displayed on the end-to-end path.

[0089] The end-to-end path calculation process provided by the embodiment of the application will be described in detail in combination with a specific application scenario. For example, refer to Figure 2As shown in the figure, the controller collects ARP tables, MAC address tables, LLDP neighbor relationships of each device in the networking, and routing information of each device through SNMP, and stores data in a designated database. A user inputs a source IP and a destination IP. The controller performs two-layer link calculation (determines the closest access device and gateway device of the source / destination end based on the ARP table, MAC address table and LLDP neighbor relationship, and then calculates the link between the closest access device and the corresponding gateway device) and three-layer link calculation (calculates the link between the gateway devices of the source end and the destination end based on the routing information) based on the source IP and the destination IP. Finally, based on the two-layer link and the three-layer link, the end-to-end link from the source end to the destination end is output.

[0090] Further, when any interface state is detected to be abnormal, the network device in the networking sends a trap to the controller. The controller receives the SNMP trap reported by each device, and the trap definition, alarm upgrade rule are predefined on the controller. Based on the received trap and the upgrade rule, the alarm is upgraded, and the alarm information associated with the calculated end-to-end link can be displayed on the display interface of the end-to-end path.

[0091] For example, referring to Figure 3 As shown in the figure, the structure of the end-to-end link calculation device provided by the embodiment of the present application includes:

[0092] The acquisition unit 30 is configured to acquire ARP tables of each device in the networking, MAC address tables of each device in the networking, and LLDP neighbor relationships of each device in the networking.

[0093] The determination unit 31 is configured to determine a first ARP table containing a source IP of a source end from the ARP tables of each device based on the source IP of the source end input by a user, and determine a source MAC address corresponding to the source IP in the first ARP table, wherein the first ARP table is an ARP table of a gateway device of the source end.

[0094] The determination unit 31 is further configured to determine a plurality of first interfaces learning the source MAC address from the MAC address tables of each device based on the source MAC address, and determine a device to which a first interface with the least total number of MAC addresses learned by the first interface belongs as the closest first access device of the source end based on the total number of MAC addresses learned by the plurality of first interfaces.

[0095] The calculation unit 32 is configured to calculate a first link between the first access device and the gateway device of the source end based on the first access device, the gateway device of the source end and the LLDP neighbor relationships of each device.

[0096] Optionally, the apparatus further comprises:

[0097] a judging unit configured to judge whether a second ARP table containing the destination IP exists in the ARP table of each device based on the destination IP address of the destination input by the user;

[0098] If it is judged that the second ARP table containing the destination IP exists, the determining unit 31 is further configured to determine the second ARP table containing the destination IP and determine the destination MAC address corresponding to the destination IP in the second ARP table, wherein the second ARP table is the ARP table of the gateway device of the destination;

[0099] The determining unit 31 is further configured to determine a plurality of second interfaces learning the destination MAC address from the MAC address table of each device based on the destination MAC address, and determine the device to which the second access device closest to the destination belongs based on the total number of MAC addresses learned by the plurality of second interfaces.

[0100] The calculating unit 32 is further configured to calculate the second link between the second access device and the gateway device of the destination based on the LLDP neighbor relationship of the second access device, the gateway device of the destination and each device.

[0101] Optionally, the apparatus further comprises:

[0102] The obtaining unit 30 is further configured to obtain the routing information of the gateway device of the source, and the determining unit 31 is further configured to determine the next hop information corresponding to the destination IP in the obtained routing information;

[0103] The obtaining unit 30 is further configured to obtain the routing information of the next hop, and the determining unit 31 is further configured to determine the next hop information corresponding to the destination IP in the obtained routing information until the next hop is the gateway device of the destination;

[0104] The calculating unit 32 is further configured to determine the third link between the gateway device of the source and the gateway device of the destination based on the gateway device of the source, each next hop information and the gateway device of the destination;

[0105] The calculating unit 32 is further configured to determine the first link, the second link and the third link as the end-to-end link from the source to the destination.

[0106] Optionally, if it is judged that the second ARP table containing the destination IP does not exist, the obtaining unit 30 is further configured to obtain the routing information of the gateway device of the source, and the determining unit 31 is further configured to determine the next hop information corresponding to the destination IP in the obtained routing information;

[0107] The acquisition unit 30 is further configured to acquire routing information of a next hop, and the determination unit 31 is further configured to determine next hop information corresponding to the destination IP in the acquired routing information, until the next hop is not an external network device in the network.

[0108] The calculation unit 32 is further configured to determine a fourth link between the gateway device of the source end and the external network device based on the gateway device of the source end, each next hop information and the external network device.

[0109] The calculation unit 32 is further configured to determine the first link and the fourth link as an end-to-end link from the source end to the destination end.

[0110] Optionally, the apparatus further includes:

[0111] The receiving unit is configured to receive alarm data reported by each device in the network, wherein the alarm data reported by one device includes interface state information of the device.

[0112] The alarm unit is configured to determine whether alarm data of an interface associated with the end-to-end link exists in the alarm data reported by each device, and if so, display the alarm on the end-to-end path.

[0113] Optionally, when determining the next hop information corresponding to the destination IP in the acquired routing information, the determination unit 31 is specifically configured to:

[0114] Determine the next hop information corresponding to the destination IP in the acquired routing information by using a shortest route matching rule.

[0115] The above units can be one or more integrated circuits configured to implement the above method, for example, one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), etc. For another example, when a certain unit above is implemented in the form of a processing element scheduling code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can invoke program code. For another example, the units can be integrated together to implement in the form of a system on a chip (SOC).

[0116] Further, the end-to-end link computing device provided by the embodiments of the present application can include a memory 40 and a processor 41 from the hardware layer, and a hardware architecture diagram of the end-to-end link computing device can be referred to as Figure 4 As shown in the figure, the end-to-end link computing device can include a memory 40 and a processor 41,

[0117] The memory 40 is configured to store program instructions, and the processor 41 invokes the program instructions stored in the memory 40 to execute the above-mentioned method embodiments according to the obtained program instructions. The specific implementation and technical effects are similar, and will not be repeated here.

[0118] Optionally, the present application also provides an end-to-end link computing device, which includes at least one processing element (or chip) for executing the above-mentioned method embodiments.

[0119] Optionally, the present application also provides a program product, for example, a computer readable storage medium, which stores computer executable instructions for causing the computer to execute the above-mentioned method embodiments.

[0120] Here, the machine readable storage medium can be any electronic, magnetic, optical, or other physical storage apparatus, and can contain or store information such as executable instructions, data, and the like. For example, the machine readable storage medium can be RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard drives), solid state drives, any type of storage disk (such as optical disks, DVDs, etc.), or similar storage media, or a combination thereof.

[0121] The system, device, module or unit illustrated in the above embodiments can be specifically implemented by a computer chip or entity, or by a product with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0122] For the convenience of description, the above device is described as various units respectively described in terms of functions. Of course, the functions of each unit can be implemented in the same or more software and / or hardware in the implementation of the present application.

[0123] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) embodying computer readable program code.

[0124] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0125] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0127] The above description is embodied in the context of only a few of the preferred embodiments of the present application and is not intended to be limiting of the present application. Any modification, substitution, improvement, and the like, which are made within the spirit and principle of the present application, should be included in the scope of the present application.

Claims

1. An end-to-end link computation method, characterized by, The method comprises: obtaining ARP tables of each device in the network of the nanotube, MAC address tables and LLDP neighbor relationships of each device in the network; determining a first ARP table containing the source IP from the ARP tables of each device based on the source IP address of the source end input by the user, and determining the source MAC address corresponding to the source IP in the first ARP table, wherein the first ARP table is the ARP table of the gateway device of the source end; determining a plurality of first interfaces that learn the source MAC address from the MAC address tables of each device based on the source MAC address, and determining the device to which the first interface with the least total number of MAC addresses learned by the plurality of first interfaces belongs as the first access device closest to the source end; calculating the first link between the first access device and the gateway device of the source end based on the first access device, the gateway device of the source end and the LLDP neighbor relationships of each device; judging whether a second ARP table containing the destination IP exists in the ARP tables of each device based on the destination IP address of the destination end input by the user; if it is determined that the second ARP table containing the destination IP exists, determining the second ARP table containing the destination IP, and determining the destination MAC address corresponding to the destination IP in the second ARP table, wherein the second ARP table is the ARP table of the gateway device of the destination end; determining a plurality of second interfaces that learn the destination MAC address from the MAC address tables of each device based on the destination MAC address, and determining the device to which the second interface with the least total number of MAC addresses learned by the plurality of second interfaces belongs as the second access device closest to the destination end; calculating the second link between the second access device and the gateway device of the destination end based on the second access device, the gateway device of the destination end and the LLDP neighbor relationships of each device.

2. The method of claim 1, wherein, The method further comprises: obtaining routing information of the gateway device of the source end, and determining the next hop information corresponding to the destination IP in the obtained routing information; obtaining routing information of the next hop, and determining the next hop information corresponding to the destination IP in the obtained routing information, until the next hop is the gateway device of the destination end; determining the third link between the gateway device of the source end and the gateway device of the destination end based on the gateway device of the source end, each next hop information and the gateway device of the destination end; determining the first link, the second link and the third link as the end-to-end link from the source end to the destination end.

3. The method of claim 1, wherein, if it is determined that the second ARP table containing the destination IP does not exist, obtaining routing information of the gateway device of the source end, and determining the next hop information corresponding to the destination IP in the obtained routing information; obtaining routing information of the next hop, and determining the next hop information corresponding to the destination IP in the obtained routing information, until the next hop is not the external network device in the network; determining the fourth link between the gateway device of the source end and the external network device based on the gateway device of the source end, each next hop information and the external network device. determine the first link and the fourth link as an end-to-end link from the source end to the destination end.

4. The method of claim 2 or 3, wherein, The method further comprises: receiving alarm data reported by each device in the network, wherein the alarm data reported by one device comprises interface state information of the device; determining whether alarm data of an interface associated with the end-to-end link exists in the alarm data reported by each device, and if so, displaying the alarm on the end-to-end path.

5. The method of claim 2 or 3, wherein, The step of determining the next hop information corresponding to the destination IP in the obtained routing information comprises: determining the next hop information corresponding to the destination IP in the obtained routing information by using a shortest route matching rule.

6. An end-to-end link computation apparatus characterized by comprising: The device comprises: an obtaining unit configured to obtain an ARP table of each device in the network, a MAC address table of each device in the network, and LLDP neighbor relationships of each device in the network; a determining unit configured to determine, based on a source IP address of a source end input by a user, a first ARP table containing the source IP from the ARP table of each device, and determine a source MAC address corresponding to the source IP in the first ARP table, wherein the first ARP table is an ARP table of a gateway device of the source end; the determining unit is further configured to determine, based on the source MAC address, a plurality of first interfaces that have learned the source MAC address from the MAC address table of each device, and determine, based on a total number of MAC addresses learned by the plurality of first interfaces, a device to which a first access device closest to the source end belongs as a device to which a first access device closest to the source end belongs; a calculating unit configured to calculate, based on the first access device, the gateway device of the source end, and the LLDP neighbor relationships of each device, a first link between the first access device and the gateway device of the source end; a judging unit configured to determine, based on a destination IP address of a destination end input by a user, whether a second ARP table containing the destination IP exists in the ARP table of each device; if it is determined that the second ARP table exists, the determining unit is further configured to determine the second ARP table containing the destination IP, and determine a destination MAC address corresponding to the destination IP in the second ARP table, wherein the second ARP table is an ARP table of a gateway device of the destination end; the determining unit is further configured to determine, based on the destination MAC address, a plurality of second interfaces that have learned the destination MAC address from the MAC address table of each device, and determine, based on a total number of MAC addresses learned by the plurality of second interfaces, a device to which a second access device closest to the destination end belongs as a device to which a second access device closest to the destination end belongs; the calculating unit is further configured to calculate, based on the second access device, the gateway device of the destination end, and the LLDP neighbor relationships of each device, a second link between the second access device and the gateway device of the destination end.

7. The apparatus of claim 6, wherein, The device further comprises: the obtaining unit is further configured to obtain routing information of the gateway device of the source end, and the determining unit is further configured to determine next hop information corresponding to the destination IP in the obtained routing information; The acquisition unit is further configured to acquire routing information of a next hop, and the determination unit is further configured to determine next hop information corresponding to the destination IP in the acquired routing information until the next hop is a gateway device of the destination end. The calculation unit is further configured to determine a third link between the gateway device of the source end and the gateway device of the destination end based on the gateway device of the source end, each next hop information, and the gateway device of the destination end. The calculation unit is further configured to determine the first link, the second link, and the third link as an end-to-end link from the source end to the destination end.

8. An end-to-end link computation apparatus, characterized by, The end-to-end link calculation apparatus comprises: a memory configured to store program instructions; a processor configured to invoke the program instructions stored in the memory and perform the steps of the method according to any one of claims 1-5 according to the obtained program instructions.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for causing the computer to perform the steps of the method according to any one of claims 1-5. The computer readable storage medium stores computer executable instructions for causing the computer to perform the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Network topology calculation method and device

    CN104092576A

  • Auto-configuration of routes between neighbor devices

    US20210409325A1