CN112532402B - Method, system and storage medium for detecting network topology - Google Patents

Method, system and storage medium for detecting network topology Download PDF

Info

Publication number
CN112532402B
CN112532402B CN201910874399.9A CN201910874399A CN112532402B CN 112532402 B CN112532402 B CN 112532402B CN 201910874399 A CN201910874399 A CN 201910874399A CN 112532402 B CN112532402 B CN 112532402B
Authority
CN
China
Prior art keywords
message
address
int
network
downlink
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910874399.9A
Other languages
Chinese (zh)
Other versions
CN112532402A (en
Inventor
胡锦江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910874399.9A priority Critical patent/CN112532402B/en
Publication of CN112532402A publication Critical patent/CN112532402A/en
Application granted granted Critical
Publication of CN112532402B publication Critical patent/CN112532402B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]

Abstract

The application discloses a method, a system and a storage medium for detecting network topology, which specifically comprise the following steps: the method comprises the steps that a detection server learns a downlink interconnection address of network equipment through a Border Gateway Protocol (BGP), and constructs a Transmission Control Protocol (TCP) message aiming at the downlink interconnection address of the network equipment to perform connectivity check; constructing and forwarding an in-band network telemetry (INT) message according to the TCP message; when the network equipment receives the INT message, if the network equipment judges that the network equipment is the destination address of the INT message, metadata (Metadata) information is added to an INT message reporting and collecting server; the acquisition server determines the network topology according to the Metadata information, so as to achieve the aim of detecting the network topology. If any fault occurs in the network equipment, accurate fault analysis can be performed according to the network topology, and maintenance and management of the network are enhanced.

Description

Method, system and storage medium for detecting network topology
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method, a system, and a storage medium for detecting a network topology.
Background
In-band network telemetry (INT, in-band Network Telemetry) is a technique that may enable network traffic monitoring. The INT technology is configured on a network detection server, an acquisition server collects Metadata (Metadata) data on network equipment on a message forwarding path, and the network state is accurately monitored through analysis of the Metadata data. Metadata data as described herein generally includes device information, ingress and egress interface information, queue information, time stamps, and the like.
Fig. 1 is a schematic view of an application scenario in the prior art. As shown in fig. 1, it is assumed that the service server a, the service server B, the network device1, the network device2, the network device3, and the network device4 are included. The existing INT technology can only monitor the network traffic between the service server a and the service server B, and cannot detect the entire network topology of fig. 1. Because the prior art cannot detect the network topology, the fault analysis cannot be accurately and conveniently performed.
Disclosure of Invention
Aiming at the prior art, the embodiment of the invention discloses a method for detecting network topology, which can accurately determine the network topology and is convenient for subsequent fault analysis.
The method for detecting the network topology provided by the embodiment of the application specifically comprises the following steps:
the detection server learns the downlink interconnection address of the network equipment through a Border Gateway Protocol (BGP);
the detection server constructs a Transmission Control Protocol (TCP) message aiming at the downlink interconnection address of the network equipment, and performs connectivity check on the downlink interconnection address of the network equipment by utilizing the constructed TCP message;
in the connectivity checking process, constructing and forwarding an in-band network telemetry (INT) message according to the TCP message, wherein the source address of the INT message is a probe server IP address, and the destination address is a downlink interconnection address of the network equipment;
when the network equipment receives the INT message, if the network equipment judges that the network equipment is the destination address of the INT message, metadata (Metadata) information is added into the INT message and is reported to an acquisition server;
and the acquisition server determines network topology according to Metadata information in the INT message.
Further, the step of learning, by the probe server, the downlink interconnection address of the network device through BGP includes:
establishing BGP neighbors between the network devices, wherein the network devices comprise more than one network device;
configuring the interconnection address of the network equipment, and configuring the downlink interconnection address in the interconnection address as an even number;
the network equipment utilizes BGP broadcasting to issue the existing downlink interconnection address to the direct connection BGP neighbors;
the detection server learns the downlink interconnection address from network equipment serving as a self-direct connection BGP neighbor.
Further, the more than one network devices comprise a head node and an intermediate node, and the detection server and the head node are direct connection BGP neighbors; the step of constructing and transmitting the INT message according to the TCP message comprises the following steps:
the head node receives the TCP message forwarded by the detection server and copies the received TCP message;
the head node adds INT information into the copied TCP message to form an INT message, wherein the source address of the INT message is a probe server IP address, and the destination address is a downlink interconnection address of the intermediate node;
and the head node forwards the INT message.
Further, when the network device receives the INT message, if it determines that the network device is the destination address of the INT message, the step of adding Metadata (Metadata) information to the received INT message and reporting the Metadata (Metadata) information to the acquisition server includes:
the intermediate node receives the INT message;
the intermediate node judges whether the intermediate node is a destination address of the INT message or not, if so, metadata information is added into the received INT message and is reported to the acquisition server; otherwise, after adding Metadata information into the received INT message, continuing forwarding according to the existing routing table.
The embodiment of the application also provides a system for detecting the network topology, which can accurately detect the network topology, and specifically comprises the following steps:
the detection server is used for learning the downlink interconnection address of the network equipment through a Border Gateway Protocol (BGP); constructing a Transmission Control Protocol (TCP) message aiming at the downlink interconnection address of the network equipment, and performing connectivity check on the downlink interconnection address of the network equipment by utilizing the constructed TCP message;
the network equipment is used for constructing and forwarding an in-band network telemetry (INT) message according to the TCP message in the connectivity checking process, wherein the source address of the INT message is a probe server IP address, and the destination address is a downlink interconnection address of the network equipment; when the INT message is received, if the INT message is judged to be a destination address of the INT message, metadata (Metadata) information is added into the INT message and reported to an acquisition server;
and the acquisition server is used for determining network topology according to the Metadata information in the INT message.
Further, the network device includes more than one network device, and is further configured to: establishing BGP neighbors between the network devices; the network equipment utilizes BGP broadcasting to issue the existing downlink interconnection address to the direct connection BGP neighbors;
the detection server learns the downlink interconnection address from network equipment serving as a self-direct connection BGP neighbor.
Further, the one or more network devices include a head node and an intermediate node;
the head node is configured to: the head node receives the TCP message forwarded by the detection server and copies the received TCP message; the head node adds INT information into the copied TCP message to form an INT message, wherein the source address of the INT message is a probe server IP address, and the destination address is a downlink interconnection address of the intermediate node; and the head node forwards the INT message.
Further, the intermediate node is configured to: receiving the INT message; judging whether the message is a destination address of the INT message or not, if so, adding Metadata information into the received INT message and reporting the information to the acquisition server; otherwise, after adding Metadata information into the received INT message, continuing forwarding according to the existing routing table.
The embodiments of the present application also provide a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps in the method for detecting a network topology described above.
In summary, in the embodiment of the present application, initiating the connectivity check on the downlink interconnection address of the network device, a TCP packet will be generated, and by using this TCP packet, an INT packet with the downlink interconnection address as the destination address can be constructed. Thus, when the network device receives the INT message with the network device as a destination address, metadata information can be added to send the INT message to the acquisition server. The acquisition server obtains Metadata information of all network devices from the INT message, so that the network topology is analyzed, and the purpose of detecting the network topology is achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of the prior art INT technology.
Fig. 2 is a schematic application scenario diagram of an embodiment of the present application.
Fig. 3 is a method flow diagram of a method embodiment 300 of the present application.
Fig. 4 is a schematic diagram of an application scenario of the method embodiment 500 of the present application.
Fig. 5 is a method flow diagram of a method embodiment 500 of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
In order to realize the detection of the network topology, the acquisition server needs to obtain Metadata (Metadata) information of all network devices, and the network topology can be obtained according to the Metadata information analysis. In the prior art, the network device is usually used as an intermediate forwarding device, and does not automatically report Metadata information to the acquisition server. For this reason, the embodiment of the application constructs an In-band network telemetry (INT, in-band Network Telemetry) message for the purpose of the downlink interconnection address of the network device, and the network device adds Metadata (Metadata) information to the INT message and sends the INT message to the acquisition server. The acquisition server obtains INT messages of all network devices, and analyzes network topology according to Metadata information in the INT messages.
Fig. 2 is a schematic application scenario diagram of an embodiment of the present application. As shown in fig. 2, assuming that the network Device 201 includes a plurality of network devices such as Device1, device2, device3, and Device4, the probe server 202 is connected to a certain network Device, for example, device1, and all the network devices 201 may be connected to the acquisition server 203. The network device 201 refers to a switch or a router, and is typically used as an intermediate device for forwarding a message, but in the embodiment of the present application, is used as a destination address of the message. That is, the probe server 202 in the embodiment of the present application sends an INT message to the network devices, i.e., device1, device2, device3, and Device4, for the destination address, and the Device1, device2, device3, and Device4 respectively add Metadata information to the INT message and send the Metadata information to the acquisition server 203, and the acquisition server 203 determines the network topology according to the Metadata information sent by each network Device. Of course, fig. 2 is merely an example of an application scenario, and the actual network environment may be more complex.
As described above, the network device in the prior art INT is usually an intermediate device for forwarding a message, and is not a destination address of the message, and cannot automatically report Metadata information to the acquisition server. In order to achieve the purpose of uploading the acquisition server, the network device needs to receive the INT message with the INT message as a destination address. The embodiment of the application utilizes the TCP message for checking the connectivity of the downlink interconnection address of the network equipment to construct the INT message, thereby generating the INT message taking the network equipment as the destination address.
In order to more clearly illustrate the solution of detecting network topology in the present application, the following detailed description will use the method embodiment 300. As shown in fig. 3, the method embodiment 300 includes:
step S1: probe server 202 learns the downstream interconnect address of network device 201 via Border Gateway Protocol (BGP).
The probe server 202 needs to acquire the downlink interconnection address of each network device 201 in advance in order to perform connectivity check on the downlink interconnection address of the network device 201 later. The probe server 202 in this embodiment acquires the downlink interconnection address of each network device 201 through BGP learning. BGP is a routing protocol of an Autonomous System (AS) running on TCP and its main function is to exchange network routing information. Of course, in practical applications, other manners may be adopted to enable the probe server 202 to obtain the downlink interconnection address of the network device, which is not described herein.
Step S2: the probe server 202 constructs a TCP packet for the downstream interconnect address of the network device 201, and performs connectivity check on the downstream interconnect address of the network device 201 using the constructed TCP packet.
After BGP learning in step S1, the probe server 202 may obtain the downlink interconnection addresses of all network devices 201. At this time, a TCP packet may be separately constructed for each downlink interconnect address to perform connectivity check, i.e., perform a "TCPing" operation. Here, since connectivity checking is performed for each downlink interconnection address, the source address of each TCP packet constructed should be the IP address of the probe server 202, and the destination address is the downlink interconnection address of each network device 201.
Step S3: in the connectivity checking process, an INT message is constructed and forwarded according to the TCP message, where a source address of the INT message is an IP address of the probe server 202, and a destination address is a downlink interconnection address of the network device 201.
During the connectivity check, the network device 201 forwards the TCP message according to the destination address of the TCP message. In order to enable the network device 201 to automatically report to the acquisition server 203, the embodiments of the present application may add INT information to the TCP message, making it an INT message.
Step S4: when the network device 201 receives the INT message, if it determines that the network device itself is the destination address of the INT message, metadata information is added to the INT message and reported to the acquisition server 203.
In this step, if the network device 201 itself is the destination address of the INT message, the Metadata information will not be forwarded further after being added, but will be directly sent to the acquisition server 203.
Step S5: and the acquisition server determines the network topology according to the Metadata information in the INT message.
Those skilled in the art will recognize that Metadata information includes device information, and import and export information, where the device information is a device ID number of the network device 201, and the import and export information is information such as a physical port number of a received packet. The collecting server can easily analyze the connection relationship between each network device 201 according to the Metadata information, and determine the network topology.
For a better illustration of the present application, another embodiment 500 is described in detail below. Fig. 4 is an application scenario of this embodiment 500, which is similar to fig. 2. Assuming that the network Device 201 includes a plurality of network devices such as Device1, device2, device3, and Device4, the probe server 202 is connected to a certain network Device such as Device1, and all the network devices 201 may be connected to the acquisition server 203. In the embodiment of the present application, device1 connected to the probe server 202 is also referred to as a head node, and the rest of the network devices are referred to as intermediate nodes. Wherein, the uplink interconnection addresses of the Device1 are 10.0.0.1/31 and 10.0.0.5/31, the uplink interconnection addresses of the Device2 are 10.0.0.3/31 and 10.0.0.7/31, the downlink interconnection addresses of the Device3 are 10.0.0.0/31 and 10.0.0.2/31, and the downlink interconnection addresses of the Device4 are 10.0.0.4/31 and 10.0.0.6/31.
Fig. 5 is a method flow diagram of another embodiment 500. As shown in fig. 5, the method includes:
step H1: BGP neighbors are established between network devices 201, the network devices 201 comprising more than one network device.
In this step, BGP neighbors will be established between Device1, device2, device3, and Device 4.
Step H2: the interconnection addresses of the network devices 201 are configured, and the downlink interconnection addresses in the interconnection addresses are configured to be even numbers.
This step will configure the interconnect address as described in fig. 4. It should be noted that the last bit of the downlink interconnect address needs to be configured as an even number. The reason is that, in the embodiment of the present application, the issued address is learned by BGP broadcast later, and BGP protocol specifies that only the interconnection address configured as an even number of bits can perform BGP broadcast, so this step configures the downlink interconnection addresses of Device3 and Device4 as an even number.
In the embodiment of the application, only the Device3 and the Device4 include downlink interconnection addresses, the downlink interconnection addresses of the Device3 are 10.0.0.0/31 and 10.0.0.2/31, and the downlink interconnection addresses of the Device4 are 10.0.0.4/31 and 10.0.0.6/31. In practical applications, device3 and Device4 may also include other downlink interconnection addresses, or still other network devices may include downlink interconnection addresses. In short, the last bit of the downlink interconnection address of the network device may be configured to be even.
Step H3: the network device 201 utilizes BGP broadcast to issue its own existing downstream interconnect address to the direct BGP neighbor.
According to the specification of the BGP protocol, network devices Device1, device2, device3 and Device4 may issue their own existing downlink interconnection addresses to the direct BGP neighbors in a BGP broadcast manner. Such as: device3 issues a downstream interconnect address to Device1 via the interface where 10.0.0.0/31 resides. Thus, when the subsequent Device1 forwards the data packet to Device3, device3 can only receive the data packet from the interface where 10.0.0.0/31 is located. Similarly, device3 issues a downstream interconnect address to Device2 via the interface at 10.0.0.2/31, device4 issues a downstream interconnect address to Device1 via the interface at 10.0.0.4/31, and Device4 issues a downstream interconnect address to Device2 via the interface at 10.0.0.6/31.
Of course, in practical application, the network device 201 may issue not only its own downlink interconnection address, but also the downlink interconnection addresses of other network devices that have been acquired by itself. Such as: when the downlink interconnection address of Device4 itself is 10.0.0.4/31 and the downlink interconnection address of Device3 is 10.0.0.2/31 already known through BGP learning, both 10.0.0.2/31 of Device3 and 10.0.0.4/31 of Device4 can be issued to Device1 at the same time when broadcasting to Device1. Therefore, in the step H3, the existing downlink interconnection address includes the downlink interconnection address of the network device itself, and also includes the downlink interconnection addresses of other network devices acquired by itself, which are referred to herein as the existing downlink interconnection address.
Step H4: the probe server 202 learns the downlink interconnection address from the network device 201 that is its own direct BGP neighbor.
In this embodiment, the probe server 202 needs to be connected to a certain network Device 201 (such as Device 1) and set to be a BGP neighbor of the network Device. Similar to other network devices, probe server 202 may obtain the downstream interconnect addresses of all network devices from Device1 through BGP learning, i.e.: the downstream interconnect addresses 10.0.0.0/31 and 10.0.0.2/31 of Device3 and the downstream interconnect addresses 10.0.0.4/31 and 10.0.0.6/31 of Device4 are learned.
With the steps H1 to H4, the probe server 202 in the embodiment of the present application may learn the downlink interconnection addresses of all the network devices 201.
Step H5: the probe server 202 constructs a TCP packet for the downstream interconnect address of the network device 201, and performs connectivity check on the downstream interconnect address of the network device 201 using the constructed TCP packet.
This step is the same as step S2 of method embodiment 300 described above.
Since the probe server 202 learns the downstream interconnect addresses 10.0.0.0/31 and 10.0.0.2/31 for Device3 and the downstream interconnect addresses 10.0.0.4/31 and 10.0.0.6/31 for Device 4. That is, the probe server 202 constructs 4 TCP packets for 10.0.0/31, 10.0.0.2/31, 10.0.4/31 and 10.0.0.6/31, respectively, for connectivity check. Assuming that the 4 TCP messages are TCP message 1 to TCP message 4 respectively, the source address of TCP message 1 should be the IP address (192.168.1.10) of the probe server, and the destination address should be 10.0.0.0/31; the source address of TCP message 2 should be the IP address (192.168.1.10) of the probe server, and the destination address should be 10.0.0.2/31; the source address of TCP message 3 should be the IP address (192.168.1.10) of the probe server, and the destination address should be 10.0.0.4/31; the source address of TCP message 4 should be the probe server IP address (192.168.1.10) and the destination address should be 10.0.0.6/31.
Step H6: the head node Device1 receives the TCP packet forwarded by the probe server 202, and copies the received TCP packet.
Step H7: the head node Device1 adds the INT information to the duplicated TCP packet to form an INT packet, where the source address of the INT packet is the IP address of the probe server 202, and the destination address is the downlink interconnection address of the intermediate node.
Step H8: the head node Device1 forwards the constructed INT message.
Steps H6 to H8 of the present embodiment are the procedure of constructing and forwarding the INT message by the head node Device1. The head node Device1 may copy the TCP message in one copy, and add the INT information to the copied TCP message to form the INT message. Since the embodiment is directed to 4 downlink interconnection addresses respectively, there are 4 TCP messages 1 to 4 TCP messages, and then 4 INT messages need to be constructed respectively. Such as: when the head node Device1 receives the TCP packet 1, a copy of the TCP packet 1 may be copied, and then the INT information is added to the TCP packet 1 to form the INT packet 1. Similarly, the head node Device1 reconstructs INT messages 2 through 4. Since the source addresses of the TCP messages 1 to 4 are the IP addresses of the probe server 202 and the destination address is the downlink interconnection address of the intermediate node, the source addresses of the constructed INT messages 1 to 4 are also the IP addresses of the probe server 202 and the destination address is also the downlink interconnection address of the intermediate node.
Namely: the source address of INT message 1 should be the IP address (192.168.1.10) of the probe server, and the destination address should be 10.0.0.0/31; the source address of INT message 2 should be the IP address (192.168.1.10) of the probe server, and the destination address should be 10.0.0.2/31; the source address of INT message 3 should be the IP address (192.168.1.10) of the probe server, and the destination address should be 10.0.0.4/31; the source address of INT message 4 should be the IP address of the probe server (192.168.1.10) and the destination address should be 10.0.0.6/31.
In this embodiment, the TCP message is copied in one copy, and the INT information is added to the copied TCP message to form the INT message, so that the process of detecting the downlink interconnection address by the probe server 202 is not affected. In practical application, the received original TCP message can be directly utilized without copying.
In addition, in this embodiment, the first node Device1 constructs and forwards the INT message, and in practical application, other devices, for example, the probe server 202 may also construct and forward the INT message, where the functions of the first node and the intermediate node are identical.
Step H9: and the intermediate node receives the INT message.
Step H10: the intermediate node judges whether the intermediate node is the destination address of the INT message or not, if not, the step H11 is executed; otherwise, step H12 is performed.
Step H11: and adding Metadata information into the received INT message, continuing forwarding according to the existing routing table, and executing the step H9 by other intermediate nodes.
Step H12: metadata information is added to the received INT message and reported to the acquisition server 203.
The steps H9 to H12 are processes of the intermediate node processing the INT message.
Taking an example that the intermediate node Device3 receives the INT message 1 forwarded by the first node Device1, the following is taken as an example: since the destination address of the INT message 1 is 10.0.0.0/31, which belongs to the downlink interconnection address of the Device3, the Device3 determines that the INT message 1 is the destination address of the INT message 1, and adds Metadata information to the received INT message 1 and reports the Metadata to the acquisition server 203.
Taking the example that the intermediate node Device4 receives the INT message 2 forwarded by the first node Device1, the following is taken as an example: since the destination address of the INT message 2 is 10.0.0.2/31, which does not belong to the downlink interconnection address of the Device4, the Device4 determines that the message is not the destination address of the INT message 2, and after adding Metadata information to the INT message 2, the message will not be reported to the acquisition server 203, but will be forwarded to the Device2 according to the routing table.
In short, when all intermediate nodes receive the INT message, the method is executed according to steps H9 to H12, and the INT message with the own destination address is finally reported to the acquisition server 203.
Step H13: the acquisition server 203 determines the network topology according to the Metadata information in the INT message.
By applying the scheme of the embodiment, the probe server 202 obtains the downlink interconnection addresses of all the intermediate nodes of the network device through BGP learning, and performs TCP connectivity check on each downlink interconnection address. In the connectivity checking process, the INT information is added into the TCP message by the network equipment head node to form an INT message and the INT message is forwarded to the intermediate node. Since the TCP packet uses the downstream interconnect address of the intermediate node as the destination address, the constructed INT packet also uses the downstream interconnect address as the destination address, so that the intermediate node should be able to receive the INT packet using itself as the destination address, so that all intermediate nodes complete the process of uploading to the acquisition server 203.
The implementation process of the embodiment of the present application is described below by taking a specific INT message as an example. Assume that the INT message 1-INT message 4 forwarding paths are as shown in Table one:
message Forwarding path
INT message 1 Device1—>Device3
INT message 2 Device1—>Device4—>Device2—>Device3
INT message 3 Device1—>Device4
INT message 4 Device1—>Device3—>Device2—>Device4
List one
Wherein the INT message format comprises: several fields "ETH MAC", "IP (SIP DIP) HDR", "TCP HDR", "INT HDR", "MD". Wherein "ETH MAC" represents a routing case; "IP (SIP DIP) HDR" means a source address and a destination address; "TCP HDR" means TCP message header; "INT HDR" means INT message header; "MD" means Metadata information. Because the network device receiving the INT message adds its Metadata information to the INT message, whether the network device itself is the destination address of the INT message or not, the INT message forwarded by the network devices may include a plurality of different "MD" fields.
The forwarding process of INT message 1: the probe server 202 learns the downlink interconnection address 10.0.0.0/31 of the Device3 through BGP, and constructs a TCP message (source address is 192.168.1.10, destination address is 10.0.0.0); the detection server 202 performs connectivity check on the downlink interconnection address 10.0.0.0/31 of the Device3, and forwards the constructed TCP message to the head node Device1; device1 copies the received TCP message, adds INT information into the TCP message to form INT message 1, adds self Metadata information (MD 1) into INT message 1, and forwards the information from uplink interconnection address 10.0.01/31; device3 receives INT message 1 from downlink interconnect address 10.0.0.0/31; device3 determines itself as a destination address, adds Metadata information (MD 3) to INT message 1, and reports the information to acquisition server 203.
The forwarding process of INT message 2: the probe server 202 learns the downlink interconnection address 10.0.0.2/31 of the Device3 through BGP, and constructs a TCP message (source address is 192.168.1.10, destination address is 10.0.0.2); the detection server 202 performs connectivity check on the downlink interconnection address 10.0.0.2/31 of the Device3, and forwards the constructed TCP message to the head node Device1; device1 copies the received TCP message, adds INT information into the TCP message to form INT message 2, adds self Metadata information (MD 1) into INT message 2, and forwards the information from uplink interconnection address 10.0.01/31; device4 receives INT message 2 from downlink interconnect address 10.0.0.4/31; the Device4 judges that the Device is not a destination address, adds Metadata information (MD 4) of the Device to the INT message 2, and continuously forwards the information to the Device2 according to a routing table; device2 receives INT message 2 from upstream interconnect address 10.0.0.7/31; device2 judges that the Device is not a destination address, adds Metadata information (MD 2) of the Device to INT message 2, and continuously forwards the information to Device3 according to a routing table; device3 receives INT message 1 from downlink interconnect address 10.0.0.2/31; device3 determines itself as a destination address, adds Metadata information (MD 3) to INT message 2, and reports the information to acquisition server 203.
The forwarding process of INT message 3: the probe server 202 learns the downlink interconnection address 10.0.0.4/31 of the Device4 through BGP, and constructs a TCP message (source address is 192.168.1.10, destination address is 10.0.0.4); the detection server 202 performs connectivity check on the downlink interconnection address 10.0.0.4/31 of the Device4, and forwards the constructed TCP message to the head node Device1; device1 copies the received TCP message, adds INT information into the TCP message to form an INT message 3, and adds self Metadata information (MD 1) into the INT message 3 to be forwarded; device4 receives INT message 3 from downlink interconnect address 10.0.0.4/31; device4 determines itself as the destination address, adds its Metadata information (MD 4) to INT message 3, and reports it to acquisition server 203.
The forwarding process of INT message 4: the detection server 202 learns the downlink interconnection address 10.0.0.6/31 of the Device4 through BGP, and firstly constructs a TCP message (the source address is 192.168.1.10, and the destination address is 10.0.0.6); the detection server 202 performs connectivity check on the downlink interconnection address 10.0.0.6/31 of the Device4, and forwards the constructed TCP message to the head node Device1; device1 copies the received TCP message, adds INT information into the TCP message to form an INT message 4, and adds self Metadata information (MD 1) into the INT message 4 to be forwarded; device3 receives INT message 4 from downlink interconnect address 10.0.0.2/31; the Device3 judges that the Device is not a destination address, adds Metadata information (MD 3) of the Device to the INT message 4, and continuously forwards the information to the Device2 according to a routing table; device2 receives INT message 4; the Device2 judges that the Device is not a destination address, adds Metadata information (MD 2) of the Device to the INT message 4, and continuously forwards the information to the Device4 according to a routing table; device4 receives INT message 4 from downstream interconnect address 10.0.0.6/31; device4 determines itself as the destination address, adds Metadata information (MD 4) to INT message 4, and reports the information to acquisition server 203.
Through the forwarding of the INT messages, the acquisition server 203 may obtain Metadata information of each network device from the INT messages, and determine the visualized network topology according to the device information and import/export information carried in the Metadata information. How the acquisition server 203 generates the visualized network topology may be implemented by the prior art, and will not be described herein.
The embodiment of the application also provides a system for detecting the network topology, and fig. 2 shows a schematic structural diagram of the system. As shown, the system includes one or more network devices 201, a probe server 202, and an acquisition server 203. Wherein,
a probe server 202, configured to learn, by using Border Gateway Protocol (BGP), a downlink interconnection address of the network device; constructing a Transmission Control Protocol (TCP) message aiming at the downlink interconnection address of the network equipment, and performing connectivity check on the downlink interconnection address of the network equipment by utilizing the constructed TCP message.
The network device 201 is configured to construct and forward an in-band network telemetry (INT) message according to the TCP message during the connectivity checking process, where a source address of the INT message is an IP address of the probe server, and a destination address is a downlink interconnection address of the network device; when the INT message is received, if the INT message is judged to be the destination address of the INT message, metadata (Metadata) information is added into the INT message and reported to an acquisition server.
The acquisition server 203 is configured to determine a network topology according to Metadata information in the INT message.
As described in the method section above, when implementing the probe server 202 to learn the downlink interconnection address from the network device that is the BGP neighbor of itself, the network device 201 is configured to: establishing BGP neighbors between the network devices; the network device utilizes BGP broadcasting to issue the own existing downlink interconnection address to the direct connection BGP neighbors.
Among the network devices, the network device directly connected to the probe server 202 may be referred to as a head node, and other network devices may be referred to as intermediate nodes. Wherein,
the head node is used for: the head node receives the TCP message forwarded by the detection server and copies the received TCP message; the head node adds INT information into the copied TCP message to form an INT message, wherein the source address of the INT message is a probe server IP address, and the destination address is a downlink interconnection address of the intermediate node; and the head node forwards the INT message.
The intermediate node is configured to: receiving the INT message; judging whether the message is a destination address of the INT message or not, if so, adding Metadata information into the received INT message and reporting the information to the acquisition server; otherwise, after adding Metadata information into the received INT message, continuing forwarding according to the existing routing table.
Specific implementations of the system embodiments of the present application may refer to the above method portions, and are not described herein.
Embodiments also provide a computer readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the steps of detecting a network topology as described above. In practice, the computer readable medium may be contained in the apparatus/device/system described in the above embodiments or may exist alone without being assembled into the apparatus/device/system.
According to embodiments disclosed herein, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: portable computer diskette, hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing, but are not intended to limit the scope of the protection herein. In the embodiments disclosed herein, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
By applying the embodiment scheme of the application, in order to detect the network topology, the embodiment of the application initiates connectivity check on the downlink interconnection address of the network equipment. In the connectivity check, a TCP message with the network device downlink interconnect address as the destination address is generated. The embodiment of the application utilizes the TCP message to add INT information to construct the INT message taking the downlink interconnection address as the destination address. Thus, when the network device receives the INT message with the network device as a destination address, metadata information is added and can be sent to the acquisition server. The acquisition server obtains Metadata information reported by all network devices from the INT message, so that the network topology is analyzed, and the purpose of detecting the network topology is realized. After the detection of the network topology is realized, if any fault occurs in the network equipment, accurate fault analysis can be performed according to the network topology, so that the maintenance and management of the network are enhanced.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the present application. In particular, the features recited in the various embodiments and/or claims of the present application may be combined in various combinations and/or combinations without departing from the spirit and teachings of the application, all of which are within the scope of the disclosure.
The principles and embodiments of the present invention have been described herein with reference to specific examples, which are intended to be included herein for purposes of illustration only and not to be limiting of the invention. It will be apparent to those skilled in the art that variations can be made in the present embodiments and in the scope of the application in accordance with the spirit and principles of the present invention, and any modifications, equivalent substitutions, improvements, etc. are intended to be included within the scope of the present application.

Claims (9)

1. A method of detecting a network topology, the method comprising:
the detection server learns the downlink interconnection address of the network equipment through a Border Gateway Protocol (BGP); the step of learning the downlink interconnection address of the network device through BGP includes: the network equipment utilizes BGP broadcasting to issue the existing downlink interconnection addresses of the network equipment to the direct-connection BGP neighbors, and the detection server learns the downlink interconnection addresses of all the network equipment from the network equipment serving as the direct-connection BGP neighbors; the network equipment comprises a head node and an intermediate node, wherein the head node is the direct connection BGP neighbor of the detection server;
the detection server constructs Transmission Control Protocol (TCP) messages aiming at the downlink interconnection addresses of all the network devices, and performs connectivity check on the downlink interconnection addresses of all the network devices by using the constructed TCP messages;
in the connectivity checking process, the head node constructs and forwards an in-band network telemetry (INT) message according to the TCP message, wherein the source address of the INT message is a probe server IP address, and the destination address is the downlink interconnection address of each network device in all the network devices respectively;
when the network equipment serving as the intermediate node receives the INT message, if the network equipment judges that the network equipment is a destination address of the INT message, metadata (Metadata) information is added into the INT message and is reported to an acquisition server; the Metadata information comprises equipment information and access interface information which can determine network topology;
and the acquisition server determines network topology according to the Metadata information in all the INT messages.
2. The method according to claim 1, wherein in the step of learning, by the probe server, the downlink interconnection address of the network device, before the step of using BGP broadcast by the network device to issue the existing downlink interconnection address of the network device to the direct BGP neighbor, the method further comprises:
establishing BGP neighbors among the network devices, wherein the network devices comprise more than one network device;
and configuring the interconnection address of the network equipment, and configuring the downlink interconnection address in the interconnection address to be even.
3. The method according to claim 2, wherein the step of constructing and forwarding the INT message from the TCP message by the head node comprises:
the head node receives the TCP message forwarded by the detection server and copies the received TCP message;
the head node adds INT information into the copied TCP message to form the INT message, wherein the source address of the INT message is the IP address of the detection server, and the destination address is the downlink interconnection address of the intermediate node;
and the head node forwards the INT message.
4. A method according to claim 3, wherein when the network device acting as the intermediate node receives the INT message, if it determines that the network device is not the destination address of the INT message, the method further comprises: and after the Metadata information is added to the received INT message, continuing forwarding according to the existing routing table.
5. A system for detecting a network topology, the system comprising:
the detection server is used for learning the downlink interconnection address of the network equipment through a Border Gateway Protocol (BGP); the step of learning the downlink interconnection address of the network device through BGP includes: the network equipment utilizes BGP broadcasting to issue the existing downlink interconnection address to a direct-connection BGP neighbor, and the network equipment serving as the direct-connection BGP neighbor learns the downlink interconnection addresses of all the network equipment; constructing Transmission Control Protocol (TCP) messages aiming at the downlink interconnection addresses of all the network devices, and performing connectivity check on the downlink interconnection addresses of all the network devices by utilizing the constructed TCP messages;
the network equipment comprises a head node and an intermediate node, wherein the head node is the direct connection BGP neighbor of the detection server; in the connectivity checking process, the head node constructs and forwards an in-band network telemetry (INT) message according to the TCP message, wherein the source address of the INT message is a probe server IP address, and the destination addresses are downlink interconnection addresses of the network devices respectively; when the intermediate node receives the INT message, if the intermediate node judges that the intermediate node is the destination address of the INT message, metadata (Metadata) information is added into the INT message and is reported to an acquisition server; the Metadata information comprises equipment information and access interface information which can determine network topology;
and the acquisition server is used for determining network topology according to the Metadata information in all the INT messages.
6. The system of claim 5, wherein the network device is further configured to: establishing BGP neighbors between the network devices; the network equipment comprises more than one network equipment; and configuring the interconnection address of the network equipment, and configuring the downlink interconnection address in the interconnection address to be even.
7. The system of claim 6, wherein the system further comprises a controller configured to control the controller,
the step of constructing and transmitting the INT message by the head node according to the TCP message comprises the following steps: the head node receives the TCP message forwarded by the detection server and copies the received TCP message; adding INT information into a copied TCP message to form the INT message, wherein the source address of the INT message is the IP address of the detection server, and the destination address is the downlink interconnection address of the intermediate node; and forwarding the INT message.
8. The system of claim 7, wherein when the network device as the intermediate node receives the INT message, if it determines that the network device is not the destination address of the INT message, further comprising: and after the Metadata information is added to the received INT message, continuing forwarding according to the existing routing table.
9. A computer readable storage medium having stored thereon computer instructions, which when executed by a processor, implement the steps in the method of detecting a network topology as claimed in any of claims 1 to 4.
CN201910874399.9A 2019-09-17 2019-09-17 Method, system and storage medium for detecting network topology Active CN112532402B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910874399.9A CN112532402B (en) 2019-09-17 2019-09-17 Method, system and storage medium for detecting network topology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910874399.9A CN112532402B (en) 2019-09-17 2019-09-17 Method, system and storage medium for detecting network topology

Publications (2)

Publication Number Publication Date
CN112532402A CN112532402A (en) 2021-03-19
CN112532402B true CN112532402B (en) 2024-01-12

Family

ID=74974388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910874399.9A Active CN112532402B (en) 2019-09-17 2019-09-17 Method, system and storage medium for detecting network topology

Country Status (1)

Country Link
CN (1) CN112532402B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714942A (en) * 2009-11-12 2010-05-26 中国人民解放军国防科学技术大学 BGP-guided method for discovering real-time autonomous system-level topology

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050050225A1 (en) * 2003-08-29 2005-03-03 Tatman Lance A. System and method for discovery of BGP router topology
US20180041396A1 (en) * 2016-08-04 2018-02-08 Futurewei Technologies, Inc. System and method for topology discovery in data center networks
US10862910B2 (en) * 2018-03-08 2020-12-08 Cisco Technology, Inc. Predicting and mitigating layer-2 anomalies and instabilities

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714942A (en) * 2009-11-12 2010-05-26 中国人民解放军国防科学技术大学 BGP-guided method for discovering real-time autonomous system-level topology

Also Published As

Publication number Publication date
CN112532402A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
US11038744B2 (en) Triggered in-band operations, administration, and maintenance in a network environment
US7895425B2 (en) Operation, administration and maintenance (OAM) in a service insertion architecture (SIA)
US9088496B2 (en) Packet tracing through control and data plane operations
US7933214B2 (en) Fault detection in a transport network
CA2978757C (en) Path probing using an edge completion ratio
CN113079091A (en) Active stream following detection method, network equipment and communication system
US20200067851A1 (en) Smart software-defined network (sdn) switch
US8971195B2 (en) Querying health of full-meshed forwarding planes
CN105743687B (en) Method and device for judging node fault
JP2022058702A (en) Identification of traceroute nodes and associated devices
CN107819596B (en) SDN network fault diagnosis method, device and system
EP2858302A1 (en) Connectivity check method of service stream link, related apparatus and system
CN107659436B (en) Method and device for preventing service interruption
CN112532402B (en) Method, system and storage medium for detecting network topology
US10263865B2 (en) Network availability measurement aggregation and correlation
Polverini et al. Investigating on black holes in segment routing networks: Identification and detection
CN101931560B (en) Method and device for acquiring connection relationship between network equipment
CN111130813B (en) Information processing method based on network and electronic equipment
Sinha et al. Implementation of ICMP based Network Management System for heterogeneous networks
US20230076842A1 (en) Systems & methods for actively monitoring latency in a network fabric

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant