CN115225474A - Detection task configuration method and network equipment - Google Patents

Detection task configuration method and network equipment Download PDF

Info

Publication number
CN115225474A
CN115225474A CN202110419334.2A CN202110419334A CN115225474A CN 115225474 A CN115225474 A CN 115225474A CN 202110419334 A CN202110419334 A CN 202110419334A CN 115225474 A CN115225474 A CN 115225474A
Authority
CN
China
Prior art keywords
network device
message
network
information
detection task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110419334.2A
Other languages
Chinese (zh)
Inventor
陈亮
朱筠
张耀坤
胡家林
王延军
黄石庚
张国强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110419334.2A priority Critical patent/CN115225474A/en
Publication of CN115225474A publication Critical patent/CN115225474A/en
Pending legal-status Critical Current

Links

Images

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/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Abstract

The embodiment of the application discloses a detection task configuration method and network equipment, wherein a first message sent by first network equipment to second network equipment can indicate to the second network equipment that the first network equipment needs to configure a detection task (namely a first network performance detection task). Subsequently, the second network device will decide whether to allow the configuration of the detection task, and return the decision result to the first network device by using a second message. And if the second network equipment allows the establishment of the first network performance detection task, the first network equipment configures the first network performance detection task by using the information of the second network equipment, which is carried in the second message. Therefore, the first message and the second message with the function of negotiating and configuring the detection task can replace the step of configuring the detection task for each network device by operation and maintenance personnel, and the efficiency of configuring the network performance detection task by the network device is improved.

Description

Detection task configuration method and network equipment
Technical Field
The embodiment of the application relates to the field of data communication, in particular to a detection task configuration method and network equipment.
Background
Two-way active measurement protocol (TWAMP) is a performance measurement technology for Internet Protocol (IP) links, and can perform bidirectional performance statistics in both forward and reverse directions. TWAMP Light is a lightweight architecture based on TWAMP defined by standard protocols.
Before detecting bidirectional IP performance between network devices using TWAMP/TWAMP Light, a TWAMP/TWAMP Light detection task (also referred to as a detection instance) needs to be configured. Currently, when the TWAMP/TWAMP Light detection task is configured, it can only be configured manually by the operation and maintenance personnel. Therefore, the current configuration is not favorable for improving the efficiency of configuring the TWAMP/TWAMP Light detection task.
Disclosure of Invention
The application provides a detection task configuration method and network equipment, which are used for setting a message with a function of configuring a detection task (or a detection example), so that the aim of negotiating to configure the detection task (or the detection example) can be achieved when the message is interacted between the network equipment, and operation and maintenance personnel do not need to manually configure the detection task (or the detection example) for each network equipment, thereby being beneficial to improving the efficiency of configuring the detection task (or the detection example) between the network equipment.
In a first aspect, the present application provides a method for detecting task configuration, where the method involves a first network device and a second network device. The first message is used for indicating that the first network equipment needs to configure a first network performance detection task, and the first network performance detection task is used for establishing a first network performance detection session between the first network equipment and the second network equipment. Subsequently, the first network device receives a second message sent by the second network device, where the second message is a response message of the first message, and the second message includes information of the second network device. The first network device determines whether the second network device allows the configuration of the first network performance detection task according to the content in the second message, and further determines whether the first network device configures the first network performance detection task based on the information of the second network device in the second message.
In a possible implementation, when the second message includes not only the information of the second network device but also the first session identification information indicating that the configuration of the first network performance detection task is allowed, the first network device configures the first network performance detection task based on the information of the second network device.
In another possible implementation, when the aforementioned second message includes the second session identification information indicating that the configuration of the first network performance detection task is not allowed, the first network device will terminate the configuration of the first network performance detection task.
The first session identification information may be implemented by a certain field in the second message, or by several fields in the second message. The second session identification information may be implemented by a certain field in the second message, or by several fields in the second message. For example, the first session identification information and the second session identification information may be different values of a certain field in the second message, and different meanings are defined by setting different values. For example, a field in the second message represents whether the second network device allows the first network performance detection task to be configured. When the value of the field is the first session identification information, the second network device is indicated to allow the configuration of the first network performance detection task; and when the value of the field is the second session identification information, the second network device is indicated to be not allowed to configure the first network performance detection task. Of course, in practical applications, different characters or character strings may be used to represent the first session identification information and the second session identification information, and the present application is not limited in particular.
In this embodiment, a first message sent by a first network device to a second network device may indicate to the second network device that the first network device needs to configure a detection task (i.e., a first network performance detection task). That is, the first message has a function of negotiating to configure the network performance detection task. Then, the first network device determines whether the second network device allows the first network performance detection task to be established according to the content of the second message fed back by the second network device. In addition, when the second network device allows to establish the first network performance detection task, the first network performance detection task is configured by using the information of the second network device carried in the second message. Therefore, the first message and the second message with the functions of negotiating and configuring the network performance detection tasks (i.e., detection examples) can replace the step that operation and maintenance personnel configure the network performance detection tasks (i.e., detection examples) for each network device individually, which is beneficial to improving the efficiency of configuring the network performance detection tasks (i.e., detection examples) for the network devices.
In a possible embodiment, the first message includes detection session type information indicating a type of the first network performance detection session established, the type including two-way active measurement protocol TWAMP or two-way active measurement protocol lightweight architecture TWAMP light.
In this embodiment, it is proposed that the message carrying the detection session type information has a function of negotiating and configuring a detection task. In addition, the detection session type information can also explicitly configure the type of the detection task.
In a possible implementation manner, the first message and the second message are border gateway protocol Update (BGP Update) messages, the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message, and the first session identification information and the information of the second network device are in a BGP extended community attribute of the second message.
In this embodiment, it is proposed to add an extended community attribute to a conventional BGP Update message, so that the BGP Update message has a function of negotiating and configuring a detection task. Detecting conversation type information is set in the attribute of the newly added extended community of the first message; and setting first session identification information in the attribute of the newly added extended community of the second message. In addition, the process of configuring the detection task requires information of the network device to be exchanged between the two network devices, that is, the first network device needs to acquire information of the second network device, and the second network device needs to acquire information of the first network device. Therefore, the extended community attribute of the first message needs to carry information of the first network device, and the extended community attribute of the second message needs to carry information of the second network device.
In a possible embodiment, the second message further comprises detection session type information, which is located in the extended community attribute of the second message.
In a possible implementation manner, the first message further includes detection mode information, or the second message includes detection mode information, where the detection mode information is used to indicate a mode adopted for establishing the aforementioned first network performance detection session. Wherein the detection mode comprises continuous detection or on-demand detection.
In a possible implementation manner, the detected session type information is at least one field in the BGP Update message, and the field includes a newly added extension field and/or an existing field.
Illustratively, the detecting session type information may be implemented by one or more existing fields in the conventional BGP message, that is, modifying one or more fields in the conventional BGP message, so that the modified one or more fields indicate that the BGP message carrying the field has a function of negotiating and configuring the detection task. Illustratively, the detection session type information is implemented by one or more newly added extension fields, that is, the detection session type information is one or more newly added extension fields in the reserved field of the conventional BGP message. When a field indicating that the reserved field of the traditional BGP message has the function of negotiating and configuring the detection task is newly added, the BGP message provided with the newly added extension field has the function of negotiating and configuring the detection task.
In one possible embodiment, the first message includes at least one BGP extended community attribute. The at least one BGP extended community attribute includes a virtual extended local area network (VXLAN) extended community attribute including the detected session type information and an instance detected extended community attribute for indicating that the first message has a function of negotiating the establishment of a VXLAN tunnel.
In this embodiment, it is proposed that the first message may have a plurality of BGP extended community attributes, and if the plurality of BGP extended community attributes include an instance detection extended community attribute and a VXLAN extended community attribute, the BGP message originally used for establishing the tunnel is added with a function related to a negotiation configuration detection task. Therefore, the process of negotiating the configuration detection task may be multiplexed in the process of VXLAN tunnel establishment, that is, the first network device sends the first message to the second network device, not only for establishing the VXLAN tunnel, but also for negotiating the configuration detection task.
In a possible implementation manner, the first message and the second message are Interior Gateway Protocol (IGP) messages, the detection session type information and the information of the first network device are in a Type Length Value (TLV) field of the first message, and the first session identification information and the information of the second network device are in a TLV field of the second message.
In this embodiment, it is proposed that a type length value TLV field is newly added to a conventional IGP packet, so that the IGP packet has a function of negotiating and configuring a detection task. Wherein, the detection conversation type information is set in the type length value TLV field of the first message; the first session identification information is set in a type length value, TLV, field of the second message. In addition, the process of configuring the detection task requires information of the network device to be exchanged between the two network devices, that is, the first network device needs to acquire information of the second network device, and the second network device needs to acquire information of the first network device. Therefore, the TLV field of the type length value of the first message needs to carry information of the first network device, and the TLV field of the type length value of the second message needs to carry information of the second network device.
In a possible embodiment, the second message further comprises detection session type information, which is located in a type length value, TLV, field of the second message.
In one possible embodiment, the method further comprises: the first network device sends a third message to the second network device, where the third message is used to indicate that the first network device needs to configure a second network performance detection task, and the second network performance detection task is used to establish a second network performance detection session between the first network device and the second network device; and if the first network equipment does not receive the response message of the third message within the preset time, the first network equipment terminates the configuration of the second network performance detection task.
In this embodiment, it is proposed that the first network device and the second network device may also negotiate to configure a second network performance detection task. When the first network device does not receive the response message based on the third message from the second network device within the preset time range, the first network device terminates the configuration of the second network performance detection task. At this time, the first network device may retransmit the third message to the second network device, or the first network device may transmit a notification message to the second network device to notify the second network device of a response message of retransmitting the third message. Of course, in practical application, the system error can be solved according to the actual requirement, which is not listed here.
In one possible implementation, the first network device configuring the first network performance detection task based on the information of the second network device includes: the first network device determines a sending end and a reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, where the information of the second network device includes an Internet Protocol (IP) address of the second network device and a port number of the second network device.
In this embodiment, it is proposed that when a network device configures a detection task, it needs to determine which network device is a sending end and which network device is a reflecting end. Optionally, the network device that sends the first message may be appointed as a sending end, that is, the first network device is the sending end. For example, the first network device determines that the first network device is a sending end and the second network device is a reflecting end, and marks the information of the first network device as the information of the sending end and marks the information of the second network device as the information of the reflecting end. Optionally, the network device receiving the first message may be a sender, that is, the first network device is a sender. For example, the first network device determines that the second network device is a sending end and the first network device is a reflecting end, and marks the information of the first network device as the information of the reflecting end and marks the information of the second network device as the information of the sending end.
In a possible implementation manner, the determining, by the first network device, the sending end and the reflecting end of the network performance detection task according to the information of the second network device and the information of the first network device includes: and the first network equipment determines the sending end and the reflecting end of the first network performance detection task according to the information of the second network equipment, the information of the first network equipment and a preset rule, wherein the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
In this embodiment, it is proposed that the first network device and the second network device both store rules for determining the sending end and the reflecting end, and the first network device and the second network device determine the sending end and the reflecting end according to the preset rules, respectively. It should be noted that the sending end and the reflecting end determined by the first network device according to the preset rule are consistent with the sending end and the reflecting end determined by the second network device according to the preset rule. That is, the first network device determines that the first network device is a sending end and the second network device is a reflecting end according to the preset rule; meanwhile, the second network device determines that the first network device is a sending end and the second network device is a reflecting end according to the preset rule.
In a possible implementation, before the first network device sends the first message to the second network device, the method further includes: the first network device determines whether to send the first message to the second network device. Specifically, the first network device will determine whether to send the first message by using any one of the following embodiments:
in an optional implementation manner, the first network device stores a first configuration list, where the first configuration list is used to indicate network devices that are allowed to establish a detection task with the first network device; the first network device determining whether to send the first message to the second network device, including: the first network device queries the first configuration list; when the information of the second network equipment exists in the first configuration list, the first network equipment determines to send the first message to the second network equipment; when the information of the second network device does not exist in the first configuration list, the first network device determines not to send the first message to the second network device.
In another optional implementation, the determining, by the first network device, whether to send the first message to the second network device includes: the first network device querying processing resources in the first network device; when the utilization rate of the processing resource is greater than a preset threshold, the first network device determines not to send the first message to the second network device; and when the utilization rate of the processing resource is smaller than a preset threshold, the second network equipment determines to send the first message to the second network equipment.
In a second aspect, the present application provides a detection task configuration method, in which a second network device receives a first message from a first network device, where the first message includes information of the first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and the second network device; the second network device will decide whether to allow the configuration of the first network performance detection task, and carry the decision result in a second message to notify the first network device, wherein the second message is a response message of the first message, and the second message includes information of the second network device. When the second network device determines that the configuration of the first network performance detection task is allowed, the second network device sends a second message carrying first session identification information indicating that the configuration of the first network performance detection task is allowed to the first network device, and configures the first network performance detection task based on the information of the first network device. When the second network device determines that the first network performance detection task is not allowed to be configured, the second network device sends a second message carrying first session identification information indicating that the first network performance detection task is not allowed to be configured to the first network device, and does not trigger the configuration of the first network performance detection task.
In this embodiment, the second network device can learn, from the first message from the first network device, that the first network device needs to establish the detection task. That is, the first message is provided with the functionality to negotiate a configuration detection task (also referred to as a detection instance). Subsequently, the second network device will decide whether to allow the conditions of the detection task to be configured and, upon determining that the detection task is allowed to be configured, trigger the step of configuring the first network performance detection task. Therefore, the first message with the function of negotiating and configuring the detection task can replace the step of configuring the detection task for each network device by operation and maintenance personnel, and is beneficial to improving the efficiency of establishing the detection task by the network device.
In a possible embodiment, the first message includes detection session type information indicating a type of the first network performance detection session established, the type including TWAMP or TWAMP light.
In this embodiment, it is proposed that the message carrying the detection session type information has a function of negotiating and configuring a detection task. In addition, the detection session type information can also explicitly configure the type of the detection task.
In a possible implementation manner, the first message further includes detection mode information, or the second message includes detection mode information, where the detection mode information is used to indicate a mode used for establishing the aforementioned first network performance detection session. Wherein the detection mode comprises continuous detection or on-demand detection.
In a possible implementation manner, the first message and the second message are BGP Update messages, the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message, and the first session identification information and the information of the second network device are in a BGP extended community attribute of the second message.
In a possible embodiment, the second message further comprises detection session type information, which is located in the extended community attribute of the second message.
In a possible implementation manner, the detected session type information is at least one field in the BGP Update message, and the field includes a newly added extension field and/or an existing field.
In one possible embodiment, the first message includes at least one BGP extended community attribute. The at least one BGP extended community attribute includes a VXLAN extended community attribute including the detect session type information and an instance detect extended community attribute for indicating that the first message is capable of negotiating the establishment of a VXLAN tunnel.
In a possible implementation manner, the first message and the second message are interior gateway protocol IGP messages, the detection session type information and the information of the first network device are in a type length value TLV field of the first message, and the first session identification information and the information of the second network device are in a TLV field of the second message.
In a possible embodiment, the second message further comprises detection session type information, which is located in a type length value, TLV, field of the second message.
In one possible embodiment, the method further comprises: the second network device receives a third message from the first network device, where the third message is used to indicate that the first network device needs to configure a second network performance detection task, and the second network performance detection task is used to establish a second network performance detection session between the first network device and the second network device.
In one possible embodiment, the second network device configures the first network performance detection task based on the information of the first network device, including: and the second network device determines a sending end and a reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, wherein the information of the first network device comprises the IP address of the first network device and the port number of the first network device.
Illustratively, the second network device determines that the first network device is a sending end and the second network device is a reflecting end, and marks the information of the first network device as the information of the sending end and marks the information of the second network device as the information of the reflecting end. Illustratively, the second network device determines that the second network device is a sending end and the first network device is a reflecting end, and marks the information of the first network device as the information of the reflecting end and marks the information of the second network device as the information of the sending end.
In a possible implementation manner, the determining, by the second network device, the sending end and the reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device includes: and the second network equipment determines the sending end and the reflecting end of the first network performance detection task according to the information of the second network equipment, the information of the first network equipment and a preset rule, wherein the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
In a possible implementation manner, the second network device stores a configuration list (to distinguish from the first configuration list stored by the first network device, the second network device stores a second configuration list), and the second configuration list is used for indicating network devices that are allowed to establish a network performance detection task with the second network device; before the second network device sends the second message to the first network device, the method further includes: the second network device querying the second configuration list; when the information of the first network device exists in the second configuration list, the second network device determines to allow the first network performance detection task to be configured.
In a possible implementation, before the second network device sends the second message to the first network device, the method further includes: the second network device querying a processing resource in the second network device; when the utilization rate of the processing resource in the second network equipment is greater than a preset threshold, the second network equipment determines that the first network performance detection task is not allowed to be configured; and when the utilization rate of the processing resource in the second network equipment is less than a preset threshold, the second network equipment determines that the first network performance detection task is allowed.
In a third aspect, the present application provides a detection task configuration method, which involves a first network device and a second network device. The first message is used for indicating that the first network equipment needs to configure a first network performance detection task, and the first network performance detection task is used for establishing a first network performance detection session between the first network equipment and the second network equipment. Then, the first network device determines whether to configure the first network performance detecting task according to whether a response message (hereinafter, referred to as a first response message) based on the first message is received. When the first network device receives a response message based on the first message within a preset time range, and the response message of the first message carries information of the second network device, the first network device configures the first network performance detection task based on the information of the second network device. And when the first network equipment does not receive the response message based on the first message within the preset time range, the first network equipment terminates the configuration of the first network performance detection task.
In this embodiment, a first message sent by a first network device to a second network device can indicate to the second network device that the first network device needs to configure a detection task (i.e., a first network performance detection task). Meanwhile, the second network device may notify the first network device whether the second network device allows the first network performance detection task to be established by whether to reply to the first network device with a response message based on the first message. Therefore, the first message with the function of negotiating and configuring the network performance detection task (i.e., the detection example) and the response message of the first message can replace the step of configuring the network performance detection task (i.e., the detection example) for each network device by the operation and maintenance personnel, which is beneficial to improving the efficiency of configuring the network performance detection task (i.e., the detection example) for the network device.
In a possible embodiment, the first message includes detection session type information indicating a type of the first network performance detection session established, the type including two-way active measurement protocol TWAMP or two-way active measurement protocol lightweight architecture TWAMP light. Optionally, the first response message includes detection session type information.
In a possible implementation manner, the first message further includes detection mode information, or the second message includes detection mode information, where the detection mode information is used to indicate a mode adopted for establishing the aforementioned first network performance detection session. Wherein the detection mode comprises continuous detection or on-demand detection.
In a possible implementation manner, the first message and the first response message Update a BGP Update packet for the BGP, the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message, and the detection session type information and the information of the second network device are in a BGP extended community attribute of the first response message.
In a possible implementation manner, the first message and the first response message are interior gateway protocol IGP messages, the detection session type information and the information of the first network device are in a type length value TLV field of the first message, and the detection session type information and the information of the second network device are in a TLV field of the first response message.
In one possible embodiment, the first network device configuring the first network performance detection task based on the information of the second network device includes: the first network device determines a sending end and a reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, wherein the information of the second network device comprises an IP address of the second network device and a port number of the second network device.
In a possible implementation manner, the determining, by the first network device, the sending end and the reflecting end of the network performance detection task according to the information of the second network device and the information of the first network device includes: and the first network equipment determines the sending end and the reflecting end of the first network performance detection task according to the information of the second network equipment, the information of the first network equipment and a preset rule, wherein the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
In a fourth aspect, a detection task configuration method is provided in the present application, in the method, a second network device receives a first message from a first network device, where the first message includes information of the first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and the second network device. The second network device then decides whether to allow configuration of the first network performance detection task. When the second network device determines that the configuration of the first network performance detection task is allowed, the second network device sends a first response message based on the first message to the first network device, wherein the first response message carries information of the second network device. In addition, the second network device configures the first network performance detection task based on information of the first network device. When the second network device determines that the configuration of the first network performance detection task is not allowed, the second network device does not send the first response message to the first network device, and the second network device does not trigger the configuration of the first network performance detection task.
In a possible implementation, the first message includes detection session type information indicating a type of the first network performance detection session established, where the type includes TWAMP or TWAMP light. Optionally, the first response message includes the detection session type information.
In a possible implementation manner, the first message further includes detection mode information, or the second message includes detection mode information, where the detection mode information is used to indicate a mode adopted for establishing the aforementioned first network performance detection session. Wherein the detection mode comprises continuous detection or on-demand detection.
In a possible implementation manner, the first message and the first response message are BGP Update messages, and the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message. Optionally, the information of the detected session type and the information of the second network device are in a BGP extended community attribute of the first response message.
In a possible implementation manner, the first message and the first response message are interior gateway protocol IGP packets, the detection session type information and the information of the first network device are in a type length value TLV field of the first message, and the detection session type information and the information of the second network device are in a TLV field of the first response message.
In one possible implementation, the configuring, by the second network device, the first network performance detection task based on the information of the first network device includes: and the second network equipment determines a sending end and a reflecting end of the first network performance detection task according to the information of the second network equipment and the information of the first network equipment, wherein the information of the first network equipment comprises the IP address of the first network equipment and the port number of the first network equipment.
In a possible implementation manner, the determining, by the second network device, the sending end and the reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device includes: and the second network equipment determines a sending end and a reflecting end of the first network performance detection task according to the information of the second network equipment, the information of the first network equipment and a preset rule, wherein the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
In a possible implementation manner, the second network device stores a second configuration list, and the second configuration list is used for indicating network devices which are allowed to establish network performance detection tasks with the second network device; before the second network device sends the first response message to the first network device, the method further includes: the second network device queries the second configuration list; when the information of the first network equipment exists in the second configuration list, the second network equipment determines to allow the first network performance detection task to be configured.
In a possible implementation, before the second network device sends the first response message to the first network device, the method further includes: the second network device querying a processing resource in the second network device; when the utilization rate of the processing resource in the second network equipment is greater than a preset threshold, the second network equipment determines that the first network performance detection task is not allowed to be configured; and when the utilization rate of the processing resource in the second network equipment is less than a preset threshold, the second network equipment determines that the first network performance detection task is allowed.
In a fifth aspect, the present application provides a first network device, where the first network device may be a physical network entity such as a router and a switch, or may also be a virtual network device such as a virtual router and a virtual switch. The first network device includes: the task configuration module comprises a sending module, a receiving module and a task configuration module. The sending module is configured to send a first message to a second network device, where the first message includes information of a first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and the second network device; a receiving module, configured to receive a second message sent by the second network device, where the second message is a response message of the first message, and the second message includes information of the second network device; and a task configuration module, configured to configure the first network performance detection task based on the information of the second network device when the second message further indicates that the first session identification information of the first network performance detection task is allowed to be configured.
In a possible embodiment, the first message includes detection session type information indicating a type of the first network performance detection session established, the type including two-way active measurement protocol TWAMP or two-way active measurement protocol lightweight architecture TWAMP light.
In a possible implementation manner, the first message further includes detection mode information, or the second message includes detection mode information, where the detection mode information is used to indicate a mode adopted for establishing the aforementioned first network performance detection session. Wherein the detection mode comprises continuous detection or on-demand detection.
In a possible implementation manner, the first message and the second message are BGP Update messages, the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message, and the first session identification information and the information of the second network device are in a BGP extended community attribute of the second message.
In a possible implementation manner, the first message and the second message are interior gateway protocol IGP messages, the detection session type information and the information of the first network device are in a type length value TLV field of the first message, and the first session identification information and the information of the second network device are in a TLV field of the second message.
In a possible implementation manner, the task configuration module is further configured to terminate configuration of the first network performance detection task when the second message further includes second session identification information indicating that configuration of the first network performance detection task is not allowed.
In a possible implementation manner, the sending module is further configured to send a third message to the second network device, where the third message is used to indicate that the first network device needs to configure a second network performance detection task, and the second network performance detection task is used to establish a second network performance detection session between the first network device and the second network device;
the task configuration module is further configured to terminate the configuration of the second network performance detection task when the receiving module does not receive the response message of the third message within a preset time.
In a possible implementation manner, the task configuration module is specifically configured to determine a sending end and a reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, where the information of the second network device includes an IP address of the second network device and a port number of the second network device.
In a possible implementation manner, the task configuration module is specifically configured to determine a sending end and a reflecting end of the first network performance detection task according to the information of the second network device, the information of the first network device, and a preset rule, where the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
For the beneficial effects of this aspect, please refer to the related descriptions of the first aspect, which will not be described herein again.
In a sixth aspect, the present application provides a second network device, where the second network device may be a physical network entity such as a router and a switch, or may also be a virtual network device such as a virtual router and a virtual switch. The second network device includes: the system comprises a receiving module, a sending module and a task configuration module. The receiving module is configured to receive a first message from a first network device, where the first message includes information of the first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and a second network device; a sending module, configured to send, to the first network device, a second message carrying first session identification information indicating that the configuration of the first network performance detection task is allowed when the task configuration module determines that the configuration of the first network performance detection task is allowed, and the task configuration module configures the first network performance detection task based on the information of the first network device; wherein the second message is a response message of the first message, and the second message includes information of the second network device.
In a possible embodiment, the first message includes detection session type information indicating a type of the first network performance detection session established, the type including two-way active measurement protocol TWAMP or two-way active measurement protocol lightweight architecture TWAMP light.
In a possible implementation manner, the first message further includes detection mode information, or the second message includes detection mode information, where the detection mode information is used to indicate a mode adopted for establishing the aforementioned first network performance detection session. Wherein the detection mode comprises continuous detection or on-demand detection.
In a possible implementation manner, the first message and the second message are BGP Update messages, the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message, and the first session identification information and the information of the second network device are in a BGP extended community attribute of the second message.
In a possible implementation manner, the first message and the second message are interior gateway protocol IGP messages, the detection session type information and the information of the first network device are in a type length value TLV field of the first message, and the first session identification information and the information of the second network device are in a TLV field of the second message.
In a possible implementation manner, the sending module is further configured to send, to the first network device, a second message carrying second session identification information indicating that the configuration of the first network performance detection task is not allowed when the task configuration module determines that the configuration of the first network performance detection task is not allowed, and the task configuration module does not trigger the configuration of the first network performance detection task.
In a possible implementation manner, the task configuration module is specifically configured to determine a sending end and a reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, where the information of the first network device includes an IP address of the first network device and a port number of the first network device.
In a possible implementation manner, the task configuration module is specifically configured to determine a sending end and a reflecting end of the first network performance detection task according to the information of the second network device, the information of the first network device, and a preset rule, where the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
In a possible implementation manner, the second network device stores a configuration list, and the configuration list is used for indicating the network devices which are allowed to establish the network performance detection task with the second network device; the task configuration module is specifically configured to: querying the configuration list; when the information of the first network device exists in the configuration list, determining to allow the first network performance detection task to be configured.
For the beneficial effects of this aspect, please refer to the introduction related to the second aspect, which is not described herein again.
In a seventh aspect, the present application provides a first network device, where the first network device may be a physical network entity such as a router and a switch, and may also be a virtual network device such as a virtual router and a virtual switch. The first network device includes: the task configuration module comprises a sending module, a receiving module and a task configuration module. The sending module is configured to send a first message to a second network device, where the first message includes information of a first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and the second network device. Then, the task configuration module is configured to determine whether to configure the first network performance detection task according to whether the receiving module receives a response message (hereinafter referred to as a first response message) based on the first message. When the receiving module receives a response message based on the first message in a preset time range, and the response message of the first message carries information of the second network device, the task configuration module configures the first network performance detection task based on the information of the second network device. And when the receiving module does not receive the response message based on the first message within the preset time range, the task configuration module terminates the configuration of the first network performance detection task.
In a possible embodiment, the first message includes detection session type information indicating a type of the first network performance detection session established, the type including two-way active measurement protocol TWAMP or two-way active measurement protocol lightweight architecture TWAMP light. Optionally, the first response message includes detection session type information.
In a possible implementation manner, the first message further includes detection mode information, or the second message includes detection mode information, where the detection mode information is used to indicate a mode adopted for establishing the aforementioned first network performance detection session. Wherein the detection mode comprises continuous detection or on-demand detection.
In a possible implementation manner, the first message and the first response message are BGP Update messages, the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message, and the detection session type information and the information of the second network device are in a BGP extended community attribute of the first response message.
In a possible implementation manner, the first message and the first response message are interior gateway protocol IGP messages, the detection session type information and the information of the first network device are in a type length value TLV field of the first message, and the detection session type information and the information of the second network device are in a TLV field of the first response message.
In a possible implementation manner, the task configuration module is specifically configured to: and determining a sending end and a reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, wherein the information of the second network device comprises the IP address of the second network device and the port number of the second network device.
In a possible implementation manner, the task configuration module is specifically configured to: and the first network equipment determines a sending end and a reflecting end of the first network performance detection task according to the information of the second network equipment, the information of the first network equipment and a preset rule, wherein the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
For the beneficial effects of this aspect, please refer to the introduction related to the third aspect, which is not described herein again.
In an eighth aspect, the present application provides a second network device, where the second network device may be a physical network entity such as a router and a switch, or may also be a virtual network device such as a virtual router and a virtual switch. The second network device includes: the system comprises a receiving module, a sending module and a task configuration module. The receiving module is configured to receive a first message from a first network device, where the first message includes information of the first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and a second network device. Then, the task configuration module is used for deciding whether to allow the first network performance detection task to be configured. When the task configuration module determines that the first network performance detection task is allowed to be configured, the sending module sends a first response message based on the first message to the first network device, where the first response message carries information of the second network device. In addition, the task configuration module is further configured to configure the first network performance detection task based on the information of the first network device. When the task configuration module determines that the configuration of the first network performance detection task is not allowed, the sending module does not send the first response message to the first network device, and the task configuration module does not trigger the configuration of the first network performance detection task.
In a possible implementation, the first message includes detection session type information indicating a type of the first network performance detection session established, where the type includes TWAMP or TWAMP light. Optionally, the first response message includes the detection session type information.
In a possible implementation manner, the first message further includes detection mode information, or the second message includes detection mode information, where the detection mode information is used to indicate a mode adopted for establishing the aforementioned first network performance detection session. Wherein the detection mode comprises continuous detection or on-demand detection.
In a possible implementation manner, the first message and the first response message are BGP Update messages, and the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message. Optionally, the information of the detected session type and the information of the second network device are in a BGP extended community attribute of the first response message.
In a possible implementation manner, the first message and the first response message are interior gateway protocol IGP packets, the detection session type information and the information of the first network device are in a type length value TLV field of the first message, and the detection session type information and the information of the second network device are in a TLV field of the first response message.
In a possible implementation manner, the task configuration module is specifically configured to: and determining a sending end and a reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, wherein the information of the first network device comprises an IP address of the first network device and a port number of the first network device.
In a possible implementation manner, the task configuration module is specifically configured to determine a sending end and a reflecting end of the first network performance detection task according to the information of the second network device, the information of the first network device, and a preset rule, where the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
In a possible implementation manner, the second network device stores a second configuration list, and the second configuration list is used for indicating network devices that are allowed to establish network performance detection tasks with the second network device. The task configuration module is specifically used for inquiring the second configuration list; determining to allow configuration of the first network performance detection task when the information of the first network device exists in the second configuration list.
In a possible implementation manner, the task configuration module is specifically configured to query a processing resource in the second network device; when the utilization rate of the processing resource in the second network equipment is greater than a preset threshold, determining that the first network performance detection task is not allowed to be configured; and when the utilization rate of the processing resource in the second network equipment is less than a preset threshold, determining that the first network performance detection task is allowed.
For the beneficial effects of this aspect, please refer to the related descriptions of the fourth aspect, which will not be described herein again.
In a ninth aspect, the present application provides a computer readable storage medium storing a computer program, which is executed by a processor to implement the method as set forth in any one of the first aspect and the first implementation manner, or to implement the method as set forth in any one of the second aspect and the second implementation manner, or to implement the method as set forth in any one of the third aspect and the third aspect, or to implement the method as set forth in any one of the fourth aspect and the fourth implementation manner.
In a tenth aspect, the present application provides a computer program product having a computer program arranged therein, the computer program being executable by a processor to implement the method as set forth in any one of the first aspect and the first aspect, or to implement the method as set forth in any one of the second aspect and the second aspect, or to implement the method as set forth in any one of the third aspect and the third aspect, or to implement the method as set forth in any one of the fourth aspect and the fourth aspect.
According to the technical scheme, the embodiment of the application has the following advantages:
in this application, a first message sent by a first network device to a second network device may indicate to the second network device that the first network device needs to configure a detection task (i.e., a first network performance detection task). That is, the first message has a function of negotiating to configure the network performance detection task. Then, the first network device determines whether the second network device allows the first network performance detection task to be established according to the content of the second message fed back by the second network device. In addition, when the second network device allows to establish the first network performance detection task, the first network performance detection task is configured by using the information of the second network device carried in the second message. Therefore, the first message and the second message with the function of negotiating and configuring the network performance detection task (i.e., the detection example) can replace the step of configuring the network performance detection task (i.e., the detection example) for each network device by the operation and maintenance personnel, which is beneficial to improving the efficiency of configuring the network performance detection task (i.e., the detection example) by the network device.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below, and it is apparent that the drawings in the following description are only some embodiments of the present application.
FIG. 1 is a diagram of a system architecture suitable for use with the method for configuration of inspection tasks of the present application;
FIG. 2 is a flowchart of a method for detecting task configuration according to an embodiment of the present application;
fig. 3A is a schematic diagram of an embodiment of a BGP message in the embodiment of the present application;
fig. 3B is a schematic diagram of another embodiment of a BGP message in the embodiment of the present application;
fig. 3C is a schematic diagram of an embodiment of an extended community attribute in a BGP message in an embodiment of the present application;
fig. 3D is a schematic diagram illustrating an embodiment of an IGP packet in the embodiment of the present application;
fig. 3E is a schematic diagram of another embodiment of an IGP packet in the embodiment of the present application;
FIG. 4 is another flowchart of a method for detecting task configuration in an embodiment of the present application;
FIG. 5 is another flowchart of a method for detecting task configuration according to an embodiment of the present application;
FIG. 6 is a diagram of an embodiment of a network device in an embodiment of the present application;
FIG. 7 is a schematic diagram of another embodiment of a network device in the embodiment of the present application;
FIG. 8 is a schematic diagram of another embodiment of a network device in the embodiment of the present application;
fig. 9 is a schematic diagram of another embodiment of a network device in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The following first introduces a system architecture applicable to the detection task configuration method proposed in the present application:
as shown in fig. 1, the system includes a performance management system and a plurality of network devices (e.g., network device 1, network device 2, network device 3, and network device 4). Since the plurality of network devices can be connected to each other through an IP link, a network including the plurality of network devices is also referred to as an IP network. The performance management system is configured to trigger each network device configured with a detection task (also referred to as a detection instance) in the IP network to perform TWAMP measurement, and collect TWAMP measurement results fed back by each network device. Specifically, the performance management system instructs a Sender (Sender) (one TWAMP-capable network device in the IP network, e.g., network device 1) to establish a performance measurement session with a Reflector (Reflector) (another TWAMP-capable network device in the IP network, e.g., network device 2). Wherein the performance measurement session comprises: the method comprises the steps of sending a measurement request (test-request) message to a reflection end by a sending end, and replying a measurement response (test-response) message based on the measurement request message to the sending end by the reflection end. And the sending end reports the measurement result to the performance management system.
In the foregoing process, the performance management system can only trigger two network devices that have established the detection task to establish the performance measurement session, while the process of configuring the detection task can only be manually configured by the operation and maintenance personnel. Since TWAMP defines a method for measuring bidirectional (round-trip) IP performance between two network devices in an IP network. Therefore, when an IP link between two network devices needs to be measured, information of the other network device needs to be configured on the two network devices to be measured, respectively. The content of the configuration detection task of the operation and maintenance personnel comprises the following steps: (1) Selecting a sending end and a reflecting end of two network devices which need to establish a performance measurement session, namely determining the network device which is used as the sending end and the other network device which is used as the reflecting end of the two network devices; (2) Configuring information of a reflection end in a sending end so that the sending end can send a detection request message to the reflection end; (3) And configuring the information of the sending end at the reflecting end so that the reflecting end can reply the detection response message to the sending end. Because a large number of network devices which need to be configured with detection tasks may exist in the IP network, the efficiency of establishing the TWAMP/TWAMP Light detection tasks is seriously affected only by manual configuration by operation and maintenance personnel, and further, the efficiency of detecting the performance of the IP network is affected.
Therefore, the application provides a detection task configuration method, and a message with a function of configuring a detection task (or a detection example) is set, so that the purpose of negotiating and configuring the detection task (or the detection example) can be achieved when the message is interacted between network devices, and an operation and maintenance person does not need to manually configure the detection task (or the detection example) for each network device, thereby being beneficial to improving the efficiency of configuring the detection task (or the detection example) between the network devices.
The main flow of the detection task configuration method proposed in the present application will be described below with reference to fig. 2, and as shown in fig. 2, the first network device and the second network device respectively perform the following steps:
step 201, a first network device sends a first message to a second network device. Accordingly, the second network device receives the first message from the first network device.
The first message is used to indicate that the first network device needs to configure a detection task (for convenience of introduction, referred to as a first network performance detection task), that is, the first network device sends the first message to the second network device to notify the second network device that the first network device needs to configure the detection task. The aforementioned first message can cause the second network device to trigger the step of negotiating the configuration detection task upon receipt of the first message. For example, whether the condition for configuring the detection task is satisfied is determined, which may also be understood as whether the decision allows the configuration of the first network performance detection task; how to inform the aforementioned first network device of the aforementioned decision result (i.e. the satisfaction of the condition of the configuration detection task or the non-satisfaction of the condition of the configuration detection task; the permission of the configuration detection task or the non-permission of the configuration detection task), and so on. Therefore, the first message is used to indicate that the first network device needs to configure the detection task, and it can also be understood that the first message has a function of negotiating the configuration detection task.
In a possible implementation manner, the foregoing first message includes detection session type information, where the detection session type information is used to indicate a type of the configured first network performance detection session. The message carrying the aforementioned detection session type information (e.g., the aforementioned first message and a second message to be described later) is provided with a function of negotiating a configuration detection task. Optionally, the types include a two-way active measurement protocol TWAMP or a two-way active measurement protocol lightweight architecture TWAMP light.
Further, the first message may be implemented by a BGP message, may also be implemented by an IGP message, and may also be implemented by other signaling capable of implementing interaction between the first network device and the second network device, which is not limited herein.
In an optional implementation manner, the first message is implemented by using a BGP message.
At this time, the first message has a function that the conventional BGP message does not have, that is, a function of the foregoing negotiation configuration detection task. Specifically, indication information is set in a conventional BGP message, so that the BGP message carrying the aforementioned indication information has a function of negotiating and configuring a detection task. In this application, the indication information carried in the first message and the indication information carried in the second message are referred to as detection session type information.
Wherein the detecting session type information is implemented by at least one field in the first message. For example, the detection session type information may be implemented by one or more existing fields in the conventional BGP message, that is, one or more fields in the conventional BGP message are modified, so that the modified one or more fields indicate that the BGP message carrying the fields has a function of negotiating and configuring the detection task. Illustratively, the detection session type information is implemented by one or more newly added extension fields, that is, the detection session type information is one or more newly added extension fields in the reserved field of the conventional BGP message. When a field indicating that the reserved field of the traditional BGP message has the function of negotiating and configuring the detection task is newly added, the BGP message provided with the newly added extension field has the function of negotiating and configuring the detection task. In this application, the detection of the session type information may be implemented by any one of the foregoing embodiments, and the specific application is not limited.
In addition, the first message in the present application may be obtained by performing an improvement based on any conventional BGP message. Optionally, the conventional BGP message may be a BGP message used for peer parameter negotiation, for example, an Open message; or a BGP message for maintaining peer neighbors, e.g., keepalive message; or a BGP message used to notify whether the route is reachable, for example, an Update message; or a BGP message used for notifying error information or disconnecting a peer neighbor, for example, a Notification message; it may also be a BGP message, e.g., a Route-refresh message, for requesting the peer to resend the routing information.
Illustratively, the format of the Update message is shown in fig. 3A. Wherein, the length of the withdrawn route (length) field is 2B, which represents the length of the inaccessible route; a withdrawn routes (routes) field, which is adjustable in length and represents the prefix and prefix length of an unreachable route; a path attribute length (path attribute length) field, the field length of which is 2B, indicating the path attribute length carried by the reachable route; and a path attribute (path attribute) field with adjustable field length and indicating the path attribute carried by the reachable route. The extended community attribute field includes one or more BGP extended community attributes, when the Update message includes multiple BGP extended community attributes, different extended community attributes represent different functions.
Illustratively, as shown in fig. 3B, an implementation of the network layer reachability information NLRI field and the extended community attribute field is shown. The network layer reachability information NLRI field includes a body field portion and a reserved field. The body field part includes a main address (address family), a next hop (next hop), a Routing Destination (RD), an Ethernet tag identification number (Ethernet tag ID), an IP address length (IP address length), and source routing IP addresses (addressing routers' IP addresses). The extended community attribute field includes one or more extended community attributes, each of which mainly includes an extended type (e.g., type 1, type 2, type 3, etc. in fig. 3B), and information related to the extended type. Optionally, the partial extended community attribute further includes a subtype (e.g., subtype 3 in fig. 3B, etc.). The aforementioned detection session type information may be represented by a type and/or subtype in an extended community attribute.
In addition, the first message also carries information of the first network device. The information of the first network device includes an IP address of the first network device, a port number of the first network device, and the like. Optionally, the information of the first network device further includes an identifier of the first network device. The information of the first network device may be carried in existing fields of a conventional BGP packet, or may be carried in part or all of newly added extension fields, which is not limited here. Still taking the foregoing fig. 3B as an example, the IP address of the first network device may be carried in the field part of the NLRI body, for example, a source routing IP address (addressing's IP address), and the like; for another example, the port number of the first network device may be carried in the extended community attribute in the first message, e.g., the port number of the first network device is carried in the related information in the example shown in fig. 3B.
For example, when the BGP Update packet is used to implement the first message, the first message may be as shown in fig. 3C. Wherein, the type (type) field is used to carry the detection session type information, which may be TWAMP/TWAMP Light. A tag (flags) field for carrying the first session identification information (or the second session identification information). Indicating whether the TWAMP function is enabled, i.e., whether the configuration detection task is enabled. A port field, i.e., a User Datagram Protocol (UDP) port number (i.e., UDP port), indicates a port number used when performing TWAMP detection. Optionally, a detect function (test function) field, also referred to as a detection mode, is used to indicate a mode of TWAMP detection. The detection mode can be continuous detection or on-demand detection. A reserved (reserved) field for extending other information about the detection.
Please refer to the related description in step 402 in the corresponding embodiment of fig. 4, which is not described herein again.
In another optional implementation manner, the first message is implemented by using an IGP message. Optionally, the IGP message is specifically an intermediate system-to-intermediate system (ISIS) message.
At this time, the first message has a function that the conventional IGP message does not have, that is, a function of negotiating and configuring the detection task. Specifically, by setting detection session type information in a type length value TLV field (also referred to as a Code Length Value (CLV) field) of a conventional IGP packet, the IGP packet carrying the detection session type information has a function of negotiating and configuring a detection task. Wherein the detecting session type information is implemented by at least one field in the first message.
For example, the ISIS message shown in fig. 3D is taken as an example. The ISIS packet includes: an intra-domain routing protocol discriminator (intra routing protocol discriminator) field, a length indication (length indicator) field (indicating the length of the PDU header), a version/protocol identification extension (version/protocol ID extension) field, an identification length (ID length) field, a reserved (reserved) field, a PDU type (PDU type) field, a version (version) field, a maximum area address (maximum area address) field (indicating the maximum number of areas supported), a PDU length (PDU length) field, a time to live (remaining life) field of the LSP, and other fields. For example, a TLV field may be added at the end of the example shown in fig. 3D, or a TLV field may be added in the reserved field of the example shown in fig. 3D. In addition, the TLV field includes a type field, a length field, and a value field. That is, the TLV field in the present application may be one or more field configurations in the example shown in fig. 3D. For example, a type field may be added at the end of fig. 3D to carry the aforementioned detection session type information. Optionally, a value field may be added at the end of fig. 3D to carry first session identification information (or second session identification information) to be described later.
For example, when the foregoing first message is implemented by using an IGP packet, the first message may be as shown in fig. 3E. Wherein, the type (type) field is used to carry the detection session type information, which may be TWAMP/TWAMP Light. A tag (flags) field for carrying the first session identification information (or the second session identification information). Indicating whether the TWAMP function is enabled, i.e., whether the configuration detection task is enabled. The port field, UDP port, is 16 bits long and indicates a port number used when performing TWAMP detection. Optionally, the IGP packet further includes a route identifier (route ID) field, which is used for sending and receiving a detection route. A test function (test function) field, also called a detection mode, indicates a mode of TWAMP detection. The detection mode can be continuous detection or on-demand detection.
In this application, the signaling interaction between the first network device and the second network device may be implemented in any one of the foregoing manners, which is not limited herein.
In step 202a, the second network device determines whether the conditions for the configuration detection task are met.
It may also be understood that the second network device determines whether to allow the configuration detection task.
In this embodiment, after the second network device receives the first message, the second network device determines whether a condition for configuring the detection task is satisfied. When the second network device determines that the conditions for the configuration detection task are met, the second network device triggers the step of the configuration detection task, i.e. the second network device will perform step 203a.
Specifically, the second network device may determine whether the condition of the configuration detection task is satisfied by using any one of the following embodiments:
in an alternative embodiment, the second network device stores a configuration list, and the second network device determines whether the condition of the configuration detection task is satisfied according to the configuration list. For ease of description, the aforementioned configuration list is referred to as a second configuration list indicating network devices that are allowed to configure detection tasks with the second network device. Optionally, the second configuration list includes information of a plurality of network devices, where the information of each network device includes an identifier of the network device, an IP address of the network device, or other symbols capable of identifying the network device. The specific implementation manner of the second configuration list may refer to the related description in step 403, and is not described herein again.
In this embodiment, the second network device queries the second configuration list, that is, queries the second configuration list to determine whether the information of the first network device exists in the second configuration list. When the information of the first network equipment exists in the second configuration list, the second network equipment determines that the condition for configuring the detection task is met; when the information of the first network device does not exist in the second configuration list, the second network device determines that the condition for configuring the detection task is not satisfied.
In another alternative embodiment, the second network device does not store a configuration list about whether the decision satisfies the condition of the configuration detection task, and the second network device determines whether the condition of the configuration detection task is satisfied according to the condition of its own processing resource. The processing resource refers to a resource which is required to be used by the second network device for configuring the detection task and sending the detection message. Illustratively, the processing resources include: processor resources, such as a Central Processing Unit (CPU), a Network Processing Unit (NPU), and the like; a storage resource, such as volatile memory or non-volatile memory.
In this embodiment, the second network device will query the processing resource in the second network device. When the utilization rate of the processing resource in the second network equipment is greater than a preset threshold, the second network equipment determines that the condition for configuring the detection task is not met; and when the utilization rate of the processing resource in the second network equipment is less than a preset threshold, the second network equipment determines that the condition for configuring the detection task is met. The processing resource utilization rate may be a utilization rate of one of the multiple processing resources listed above, or may be a value obtained by performing weighted average on the utilization rates of the multiple processing resources, which is not limited here.
In this application, the second network device may adopt two implementation manners as follows to notify the decision result of the second network device, that is, the condition of the configuration detection task is met or the condition of the configuration detection task is not met, and it may also be understood that the configuration detection task is allowed or the configuration detection task is not allowed, that is, the configuration of the first network performance detection task is not allowed.
The implementation mode is as follows: the second network device informs whether the configuration detection task is allowed (it can also be understood that whether the condition of the configuration detection task is satisfied) by whether a response message based on the first message is replied to the first network device. Specifically, when the second network device determines that the condition for configuring the first network performance detection task is satisfied, the second network device sends a first response message to the first network device, where the first response message carries information of the second network device. When the second network device determines that the condition for configuring the first network performance detection task is not met, the second network device does not send the first response message to the first network device. In this embodiment, the second network device may notify the first network device whether the second network device is configured with the detection task by whether to reply to the first network device with a first response message having the same format as the first message. For a detailed process, please refer to the embodiment corresponding to fig. 5 below.
In this embodiment, the first message only includes the detection session type information, and the first response message adopts the format of the first message, that is, the first response message only includes the detection session type information, so as to indicate that the first response message is used for negotiating the configuration detection task. In particular, reference may be made to the aforementioned description of the first message in step 201 regarding the format of the first response message. The implementation mode two is as follows: the second network device informs whether the configuration detection task is allowed (it can also be understood that whether the condition of the configuration detection task is satisfied) through the content in the second message returned to the first network device. Specifically, when the second network device determines that the condition for configuring the detection task is satisfied, a second message sent to the first network device by the second network device carries first session identification information; and when the second network equipment determines that the condition for configuring the detection task is not met, the second network equipment sends a second message to the first network equipment, wherein the second message carries second session identification information. For a detailed process, please refer to the embodiment corresponding to fig. 4 below.
In this embodiment, the second message that the second network device replies to the first network device includes the first session identification information or the second session identification information. The first session identification information is used for indicating that the detection task is allowed to be configured, namely the first network performance detection task is allowed to be configured; the second session identification information is used to indicate that the configuration of the detection task is not allowed, i.e. the configuration of the aforementioned first network performance detection task is not allowed. It can also be understood that the second message that the second network device replies to the first network device carries indication information for indicating whether the configuration detection task is enabled, that is, the first session identification information or the second session identification information.
Optionally, the first message may also carry indication information for indicating whether to enable the configuration detection task. Since, in this embodiment, the first network device wants to configure the first network performance detection task with the second network device, the first message carries the first session identification information.
Optionally, the second message further includes detection session type information to indicate that the second message is also used for negotiating a configuration detection task. At this time, the first network device receives a second message from the second network device, where the second message not only includes the detection session type information, but also includes indication information of whether configuration of the detection task is enabled. The indication information carried in the second message may be first session identification information indicating that the configuration of the first network performance detection task is allowed, and the indication information carried in the second message may also be second session identification information indicating that the configuration of the first network performance detection task is not allowed. In addition, the second message also includes information of the second network device.
When the second message is also implemented by using an Update message, the first session identifier information (or the second session identifier information) is carried in the BGP extended community attribute. Optionally, the information of the second network device is also carried in the BGP extended community attribute. The first session identification information (or the second session identification information) may be located in type-related information for storage in the extended community attribute, for example, the first session identification information (or the second session identification information) may be located in "type 1-related information" in fig. 3B; a separate field may also be provided for storing the aforementioned first session identification information (or second session identification information), for example, the first session identification information (or second session identification information) may be located in the "session identification" field in the extended community attribute 2 in fig. 3B. The details are not limited herein.
Still taking the aforementioned fig. 3D as an example, when the second messages are all implemented by using IGP messages, the aforementioned first session identification information (or the second session identification information) is carried in the TLV field. Optionally, the information of the second network device is also located in the TLV field. In this step, after the second network device determines that the condition for configuring the detection task is satisfied, the second network device will also configure the first network performance detection task, that is, execute step 203a.
In step 202b, the first network device determines whether a condition for configuring the detection task is satisfied.
In this embodiment, after the first network device performs step 201, that is, after the first network device sends the first message to the second network device, the first network device determines whether the condition for configuring the detection task is satisfied based on a condition that a message from the second network device is received.
When the foregoing implementation manner is adopted, that is, the second network device indicates whether the decision result of the second network device is the configuration detection task by whether to reply the first response message to the first network device. In this embodiment, when a first network device receives a first response message from a second network device within a preset time range, the first network device determines that a condition for configuring a detection task is satisfied. Subsequently, the first network device will configure the aforementioned first network performance detection task, i.e. execute step 203b. When the first network device does not receive the first response message from the second network device within the preset time range, the first network device determines that the condition of the configuration detection task is not met, and the first network device terminates the configuration of the first network performance detection task.
When the foregoing implementation manner two is adopted, that is, the second network device indicates, by the indication information (the first session identification information or the second session identification information) in the second message returned to the first network device, whether the decision result of the second network device is the configuration detection task. At this time, the second message may contain the detection session type information in addition to the first session identification information (or the second session identification information). In this embodiment, if the second message received by the first network device carries the first session identifier information, the first network device determines that the condition for configuring the detection task is satisfied. Subsequently, the first network device will configure the first network performance detection task, i.e. perform step 203b. If the second message received by the first network device carries the second session identification information, the first network device determines that the condition for configuring the detection task is not met, and the first network device does not configure the first network performance detection task.
It should be understood that, considering that there may be a systematic error, that is, there may be a case where the first network device does not receive the second message from the second network device within a preset time range, at this time, the first network device may retransmit the aforementioned first message, or the first network device transmits a notification message to the second network device to notify the second network device to retransmit the second message. The method for solving the foregoing system error may be adjusted according to practical application requirements, and is not limited herein.
In step 203a, the second network device configures a first network performance detection task.
As can be seen from the foregoing, configuring a detection task between two network devices includes determining a sending end and a reflection end from the two network devices, determining information such as an IP address and a port number of the sending end, and determining information such as an IP address and a port number of the reflection end. Optionally, a detection mode may also be determined (e.g., continuous detection or on-demand detection).
Specifically, the second network device determines that the first network device is a sending end and the second network device is a reflecting end according to the information of the second network device, the information of the first network device, and a preset rule, or determines that the second network device is a sending end and the first network device is a reflecting end.
Wherein the information of the first network device comprises an IP address of the first network device and a port number of the first network device; optionally, the information of the first network device further includes an identifier of the first network device. The information of the second network device includes an IP address of the second network device and a port number of the second network device; optionally, the information of the second network device further includes an identifier of the second network device.
In addition, the preset rule refers to a rule that the network device determines whether the network device is a transmitting end or a reflecting end. The preset rule in the first network device is consistent with the preset rule in the second network device, so that the sending ends determined by the first network device and the second network device based on the preset rule are consistent, and the reflecting ends determined by the first network device and the second network device based on the preset rule are also consistent. That is to say, if the first network device determines that the first network device is the sending end and the second network device is the reflecting end, at the same time, the result determined by the second network device is also that the first network device is the sending end and the second network device is the reflecting end.
In an alternative embodiment, the preset rule is: the network device with the smaller IP address is the sending end, and the network device with the larger IP address is the reflecting end. For example, the IP address of the first network device is 1.1.1.1, the IP address of the second network device is 2.2.2.2, and if it is determined through calculation that the IP address of the first network device is smaller than the IP address of the second network device, it is determined that the first network device is a sending end and the second network device is a reflecting end.
In another optional embodiment, the preset rule is: the network device with the smaller port number is the sending end, and the network device with the larger port number is the reflecting end. For example, the port number of the first network device is 123, the port number of the second network device is 312, and if it is determined through calculation that the port number of the first network device is smaller than the port number of the second network device, it is determined that the first network device is the sending end and the second network device is the reflecting end.
In another optional implementation, the first network device initiating the negotiation configuration detection task is directly defined as a sending end, and the other network device is a reflecting end. It can also be understood that the network device that sends the first message is set as a sending end, and the network device that receives the first message is set as a reflecting end. For example, a first network device sends a first message to a second network device indicating that the first network device needs to configure a detection task and enables the configuration detection task. And the second network equipment replies a second message to the first network equipment, wherein the second message indicates that the second network equipment needs to configure the detection task and enables the configuration detection task. The two network devices respectively determine that the first network device is a sending end and the second network device is a reflecting end.
In the present application, the preset rule may be implemented by any one of the foregoing embodiments, and other preset rules may also be defined according to the actual application requirements, and the specific form of the preset rule is not specifically defined in the present application.
Step 203b, the first network device configures a first network performance detection task.
Specifically, the first network device determines that the first network device is a sending end and the second network device is a reflecting end according to the information of the second network device, the information of the first network device, and a preset rule, or determines that the second network device is a sending end and the first network device is a reflecting end. Please refer to step 203a, which is not described herein again.
For example, if the first network device determines that the first network device is a sending end and the second network device is a reflecting end, the first network device should mark the information of the first network device as the information of the sending end, and mark the information of the second network device as the information of the reflecting end.
In this embodiment, the first message sent by the first network device to the second network device may indicate to the second network device that the first network device needs to configure the detection task. That is, the first message has a function of negotiating a configuration detection task. Subsequently, the first network device will determine whether the condition for configuring the detection task is satisfied according to whether the second network device feeds back the response message or the content of the response message fed back by the second network device. And then, under the condition that the configuration detection task is determined to be satisfied, triggering the first network equipment to configure the first network performance detection task. Therefore, the first message with the function of negotiating and configuring the detection task can replace the step of configuring the detection task for each network device by operation and maintenance personnel, and the efficiency of configuring the detection task for the network device is improved.
In addition, in some optional embodiments, before performing the foregoing step 201, the foregoing first network device needs to determine whether to send the first message to the second network device. It can also be understood that, before step 201, the first network device determines whether a step of negotiating configuration detection task needs to be triggered, and if the first network device determines that the step of negotiating configuration detection task needs to be triggered, the first network device sends the first message to the second network device.
Specifically, the first network device may determine whether to send the first message to the second network device based on any one of the following embodiments:
in an alternative embodiment, the first network device also stores a decision table, and the first network device determines whether to send the first message to the second network device according to the decision table. For ease of introduction, the decision table in the first network device is referred to as a first configuration list indicating network devices that are allowed to configure detection tasks with the first network device. Optionally, the first configuration list includes information of a plurality of network devices, where the information of each network device includes an identifier of the network device, an IP address of the network device, or other symbols capable of identifying the network device. The specific implementation manner of the first configuration list may refer to the related description in step 401, and is not described herein again.
In this embodiment, the first network device queries the first configuration list, that is, queries the first configuration list to determine whether the information of the second network device exists in the first configuration list. When the information of the second network device exists in the first configuration list, the first network device will trigger a step of sending a first message to the second network device, that is, step 201; when the information of the second network device does not exist in the first configuration list, the first network device does not trigger the step of sending the first message to the second network device.
In another optional implementation, the first network device does not store the first configuration list, and the first network device determines whether to trigger the step of negotiating the configuration detection task according to the condition of its own processing resource. The processing resource refers to a resource which is required to be used by the first network device for configuring the detection task and sending the detection message. Illustratively, the processing resources include: processor resources, e.g., CPU, NPU, etc.; a storage resource, such as volatile memory or non-volatile memory.
In this embodiment, the first network device will query the processing resource in the first network device. When the utilization rate of the processing resource in the first network equipment is greater than a preset threshold, the first network equipment determines not to send the first message to second network equipment; and when the utilization rate of the processing resource in the first network equipment is smaller than a preset threshold, the first network equipment determines to send the first message to second network equipment. The processing resource utilization rate may be a utilization rate of one of the multiple processing resources listed above, or may be a value obtained by performing weighted average on the utilization rates of the multiple processing resources, which is not limited here.
The detection task configuration method provided by the present application will be further described below with reference to a specific structure of the BGP message. As shown in fig. 4, the network device 1 is a possible implementation manner of the foregoing first network device, the network device 2 is a possible implementation manner of the foregoing second network device, and both the network device 1 and the network device 2 are network devices having a TWAMP function, that is, the network device 1 and the network device 2 can perform performance detection on an IP link between the network device 1 and the network device 2 according to TWAMP under the condition that a detection task is configured. In addition, the foregoing network device 1 and network device 2 can also identify the BGP message provided by the present application. In this embodiment, the BGP message 1 is a possible implementation manner of the first message, the BGP message 2 is a possible implementation manner of the second message, the session identifier 1 is a possible implementation manner of the first session identifier information, and the session identifier 2 is a possible implementation manner of the second session identifier information. In this embodiment, the steps to be executed by the network device 1 and the network device 2 include, but are not limited to:
in step 401, the network device 1 queries the configuration list 1, and determines that the information of the network device 2 exists in the configuration list 1.
The network device 1 stores a configuration list 1, where the configuration list 1 is used to indicate that the identifier of the network device and the IP address of the network device are allowed to configure with the network device 1 to detect an instance task, and so on.
Illustratively, this configuration list 1 may be as shown in Table 1-1 below:
TABLE 1-1
Identification of network devices IP address of network device
Identification 02 IP address 02
Mark 03 IP address 03
Identification 04 IP address 04
Wherein, the identifier 02 represents an identifier of the network device 2, and the IP address 02 represents an IP address of the network device 2; the identifier 03 represents an identifier of the network device 3, and the IP address 03 represents an IP address of the network device 3; the identification 04 represents an identification of the network device 4, and the IP address 04 represents an IP address of the network device 4. Of course, in practical applications, the configuration list 2 may also store information of other network devices, and is not limited herein.
When the IP address of the network device 2 and/or the identity of the network device 2 are/is present in the configuration list 1, the network device 1 may determine that the information of the network device 2 is present in the configuration list 1, which represents that the configuration detection task is allowed. Subsequently, the network device 1 will trigger the execution of step 402.
In step 402, network device 1 sends BGP message 1 to network device 2.
The BGP message 1 and the BGP message 2 described later are both messages improved based on the conventional BGP message. The BGP message 1 and the BGP message 2 both contain detection session type information, and the detection session type information is used to indicate that the BGP message 1 and the BGP message 2 both have a function of negotiating and configuring a detection task. Specifically, please refer to the related description of step 201 for the description of detecting the session type information, which is not described herein again. Optionally, the detection session type information is TWAMP or TWAMP Light.
Further, the BGP message provided by the present application further includes a session identifier for indicating whether the configuration detection task is enabled. Hereinafter, description will be given taking an example in which the session identifier 1 indicates that the configuration detection task is enabled, and the session identifier 2 indicates that the configuration detection task is not enabled.
In a possible implementation manner, the detecting of the session type information is implemented by using a newly added extension field in a conventional BGP message. It is assumed that the field carrying the aforementioned detection session type information is extension field 1. The extension field 1 is located in an extended community attribute of the BGP message 1. That is to say, by adding the extended community attribute in the BGP message, and the added extended community attribute carries the extended field 1 containing the detection session type information, a function of negotiating and configuring a detection task to the BGP message can be given. Thus, a network device capable of using the BGP protocol (e.g., network device 1) may flood the NLRI, along with its attributes, through a neighborhood relationship (also referred to as a neighbor relationship) to a neighbor network device (e.g., network device 2).
In addition, the extended community attribute is further provided with an extended field 2 carrying a session identifier 1 (or a session identifier 2), and the extended field 2 is also located in the extended community attribute. That is, the aforementioned extended community attribute includes an extended field 1 and an extended field 2. Alternatively, two different characters or numbers may be defined to represent the aforementioned session identifier 1 and session identifier 2, respectively. Illustratively, the session identifier 1 is 1 to indicate that the configuration detection task is enabled, and the session identifier 2 is 0 to indicate that the configuration detection task is not enabled.
For example, the newly added extended community attribute carrying the detection session type information and the session identifier 1 (or the session identifier 2) in the BGP message 1 may be as shown in the following table 2-1:
TABLE 2-1
Adding extended group attributes Value taking
Extension field 1 TWAMP
Extension field
2 0/1
Reserved field -
In the foregoing example, the newly added extended community attribute includes an extension field 1 and an extension field 2. The detection session type information carried in the extension field 1 is TWAMP, which not only indicates that the BGP message 1 has the function of negotiating and configuring a detection task, but also indicates that the type of the detection task negotiating and configured is TWAMP; 0 or 1 carried by the extension field 2, wherein 0 represents a session identifier 2, that is, the configuration of the detection task is not enabled, and may also be understood as that the configuration of the detection task is not allowed; 1 denotes a session identity 1, which, even if the detection task can be configured, can also be understood as allowing the detection task to be configured. In addition, the attribute of the newly added extended community also comprises a reserved field, and the reserved field can carry information about configuration detection tasks according to actual application requirements.
In addition, the BGP message 1 also carries information of the network device 1. The information of the network device 1 includes the identification of the network device 1, the IP address of the network device 1, and the port number of the network device 1. The information of the network device 1 may be completely carried in an existing field in the BGP message 1, for example, a header of the BGP message 1 may carry the information of the network device 1. In addition, part of the information of the network device 1 may also be carried in an existing field of the BGP message 1, and the other part is carried in a newly added extension field of the BGP message 1, for example, an IP address of the network device 1 is carried in a header of the BGP message 1, and a port number of the network device 1 is carried in an attribute of a newly added extension group; for another example, the IP address of the network device 1 is carried in an original routing IP address (originating router's IP address) field existing in the NLRI, and the port number of the network device 1 is carried in the attribute of the new extended community.
For example, if the newly added extended community attribute in the BGP message 1 carries both the detected session type information, the session identifier 1 (or the session identifier 2), and information of the network device, the newly added extended community attribute may be as shown in table 2-2 below:
tables 2 to 2
Adding extended community attributes Value taking
Extension field 1 TWAMP
Extension field
2 0/1
Port number of network device 1025-65535
Detection mode On-demand/continuous detection
Reserved field -
In the foregoing example, in addition to the extension field 1 carrying the detection session type information and the extension field 2 carrying the session identification 1 (or the session identification 2) already described in table 2-1, the example also shows:
and the port number field of the network device is used for carrying the port number of the network device which sends the BGP message, and the port number of the network device is also used for receiving and sending the detection message after the detection task is established. Illustratively, the port number of the network device may be a UDP port number. And the detection mode field indicates the mode to be adopted by the network equipment to detect the IP link after the detection task is established. Generally, the detection mode includes on-demand detection and continuous detection. Illustratively, 0 may be used for on-demand detection and 1 for continuous detection. The on-demand detection mode comprises a common on-demand detection mode and a large-flow seed detection mode. That is, it is also possible to set different characters in the foregoing table 2-2 to respectively represent the continuous detection, the normal on-demand detection mode, and the large flow rate seed detection mode. In addition, the attribute of the newly added extension group also comprises a reserved field, and the reserved field can be expanded again according to the actual application requirements.
For example, the format of the extended community attribute carrying the aforementioned detection session type information, session identifier 1 (or session identifier 2), may be defined as shown in fig. 3C, where the meaning of the fields in fig. 3C is shown in tables 2-3 below.
Tables 2 to 3
Extending community attributes Value taking
type 0x11
flags
0/1
UDP port 1025-65535
test function 0/1
reserved 0
In the example illustrated in FIG. 3C and tables 2-3: a type (type) field having a length of 8 bits, indicating a TWAMP/TWAMP Light extension attribute. Exemplarily, type =0x11. A tag (flags) field, 8 bits in length, indicating whether the TWAMP function is enabled, i.e., whether the configuration detection task is enabled. Exemplarily, if flags =1, it indicates that the configuration detection task is enabled; if flags =0, it indicates that the configuration detection task is not enabled. The port field, UDP port, is 16 bits long and indicates a port number used when performing TWAMP detection. Illustratively, the UDP port has a value in the range of 1025-65535. A detect function (test function) field, also called a detection pattern, is 16 bits long and indicates a pattern of TWAMP detection. Illustratively, 0 represents continuous statistics and 1 represents periodic statistics. A reserved (reserved) field with a length of 8 bits for extending other information about the detection.
In the foregoing example, the type field is a specific implementation manner of the foregoing extension field 1, and the tag field is a specific implementation manner of the foregoing extension field 2.
In this step, the detected session type information in the extension field 1 of the BGP message 1 is TWAMP, and the extension field 2 is a session identifier 1, that is, the value of the extension field 2 is 1.
In step 403, the network device 2 queries the configuration list 2, and determines whether the information of the network device 1 exists in the configuration list 2.
After the network device 2 receives the BGP message 1 from the network device 1, the network device 2 may obtain information of the network device 1 from the BGP message 1 sent by the network device 1, and at the same time, when the network device 2 reads the extension field 1 and the extension field 2, it may be known that the network device 1 needs to configure a first network performance detection task with the network device 2.
Furthermore, the network device 2 will query the configuration list 2 in the network device 2, the configuration list 2 being used to indicate the network devices that are allowed to configure the detection task with this network device 2. The configuration list 2 stores information of a plurality of network devices, where the information of each network device includes an identifier of the network device, an IP address of the network device, and the like.
Illustratively, this configuration list 2 may be as shown in Table 3-1 below:
TABLE 3-1
Identification of network devices IP address of network device
Identification 01 IP address 01
Mark 03 IP address 03
Identification 04 IP address 04
Wherein, the identifier 01 represents the identifier of the network device 1, and the IP address 01 represents the IP address of the network device 1; the identifier 03 represents an identifier of the network device 3, and the IP address 03 represents an IP address of the network device 3; the identification 04 represents the identification of the network device 4, and the IP address 04 represents the IP address of the network device 4. Certainly, in practical applications, the configuration list 2 may also store information of other network devices, and is not limited herein.
When the IP address of the network device 1 and/or the identifier of the network device 1 exist in the configuration list 2, the network device 1 may determine that the information of the network device 1 exists in the configuration list 2, which represents that the network device 2 and the network device 1 are allowed to perform the configuration detection task, that is, the first network performance detection task before configuration is allowed. Subsequently, the network device 2 will perform step 404a and step 404b. If network device 2 determines that the information of network device 1 does not exist in configuration list 2, network device 2 performs step 404c.
In step 404a, the network device 2 determines the sending end and the reflecting end according to the information of the network device 2, the information of the network device 1, and a preset rule.
The information of the network device 1 is from a BGP message 1, where the information of the network device 1 includes an IP address of the network device 1 and a port number of the network device 1; optionally, the information of the network device 1 further includes an identifier of the network device 1. The information of the network device 2 includes the IP address of the network device 2 and the port number of the network device 2; optionally, the information of the network device 2 further includes an identifier of the network device 2.
In addition, the preset rule refers to a rule that the network device determines whether the network device is a transmitting end or a reflecting end. The preset rule in the network device 1 is consistent with the preset rule in the network device 2, so that the sending ends determined by the network device 1 and the network device 2 based on the preset rule are consistent, and the reflecting ends determined by the network device 1 and the network device 2 based on the preset rule are also consistent. That is to say, if the network device 1 determines that the network device 1 is a sending end and the network device 2 is a reflecting end, at the same time, the result determined by the network device 2 is necessarily that the network device 1 is the sending end and the network device 2 is the reflecting end. Please refer to the related description in step 203a, which is not repeated herein.
In step 404b, network device 2 sends BGP message 2 to network device 1.
Wherein, the BGP message 2 is the same type of message as the BGP message 1. The BGP message 2 is provided with an extension field 1 carrying the detection session type information to indicate that the BGP message 2 has the function of negotiating and configuring the detection task. In addition, the BGP message 2 is further provided with an extension field 2 carrying a session identifier 1 (or a session identifier 2) to indicate whether the configuration detection task is enabled. Please refer to the related description of step 402. In this step, the network device 2 allows configuring the first network performance detection task, and therefore, the extension field 2 should carry the session identifier 1. Illustratively, if the attribute of the newly added extended community in the BGP message 2 is shown in table 2-1 or table 2-2, the detection session type information carried in the extended field 1 in the BGP message 2 is TWAMP, and the value of the extended field 2 in the BGP message 2 is 1.
In addition, the BGP message 2 also carries information of the network device 2, where the information of the network device 2 includes an IP address of the network device 2 and a port number of the network device 2. Optionally, the information of the network device 2 further includes an IP address of the network device 2.
After the network device 1 receives the BGP message 2, the network device 1 knows that the BGP message 2 is used to negotiate a configuration detection task according to that the TWAMP is carried by the extension field 1 in the BGP message 2, and a value of the extension field 2 in the BGP message 2 is 1, which indicates that a negotiation result of the network device 1 and the network device 2 is a network device 2 enabled configuration detection task. Then, the network device 1 will trigger the step of configuring the first network performance detection task, i.e. the network device 1 will perform step 405.
It should be understood that steps 404a and 404b are not limited to chronological order. That is, the network device 2 may execute the step 404a first and then execute the step 404b, may execute the step 404b first and then execute the step 404a, and may execute the step 404a and the step 404b at the same time. The details are not limited herein.
In step 404c, network device 2 sends BGP message 2' to network device 1.
Wherein, the BGP message 2' is the same type of message as the BGP message 1. The BGP message 2 'is provided with an extension field 1 carrying detection session type information to indicate that the BGP message 2' has the function of negotiating and configuring detection tasks. In addition, the BGP message 2' further sets an extension field 2 carrying the session identifier 1 (or the session identifier 2) to indicate whether the configuration detection task is enabled. Please refer to the related description of step 402. In this step, the network device 2 does not allow the first network performance detection task to be configured, and therefore, the extension field 2 should carry the session identifier 2. Illustratively, if the attribute of the newly added extended community in the BGP message 2 is shown in table 2-1 or table 2-2, the detection session type information carried in the extended field 1 in the BGP message 2 is TWAMP, and the value of the extended field 2 in the BGP message 2 is 0.
After the network device 1 receives the BGP message 2', the network device 1 knows, according to the extension field 1 in the BGP message 2' being the TWAMP, that the BGP message 2 'is used to negotiate a configuration detection task, but the extension field 2 in the BGP message 2' takes a value of 0, which indicates that the negotiation result between the network device 1 and the network device 2 is that the network device 2 cannot configure the detection task. The network device 1 will then terminate the configuration of the aforementioned first network performance detection task.
Step 405, the network device 1 determines the sending end and the reflecting end according to the information of the network device 1, the information of the network device 2 and a preset rule.
The manner of determining the transmitting end and the reflecting end in step 405 is the same as that of determining the transmitting end and the reflecting end in step 404a, and is not limited herein.
In this embodiment, the network device 1 notifies the network device 2 through the BGP message 1 that the network device 1 needs to configure the detection task, and then the network device 2 indicates, to the network device 1 through the BGP message 2, whether the network device 2 needs to configure the detection task. Then, the network device 1 determines whether to configure the detection tasks of the network device 1 and the network device 2 according to the content of the BGP message 2. Because the detection session type information and the session identifier 1 (or the session identifier 2) are set for the BGP message 1 and the BGP message 2, the BGP message 1 and the BGP message 2 can indicate that the BGP message carrying the indication information has a function of negotiating and configuring a detection task, and can also indicate whether to enable configuring a currently negotiated detection task. Through the negotiation process, the network device 1 and the network device 2 can realize the negotiation configuration detection task, so that the efficiency of the configuration detection task between the network devices can be improved.
It should be understood that step 401 in this embodiment may also be replaced by the network device 1 determining whether the utilization rate of the processing resource in the network device 1 is smaller than a preset threshold, and when the utilization rate of the processing resource in the network device 1 is smaller than the preset threshold, the network device 1 sends the BGP message 1 to the network device 2.
In some optional embodiments, if the BGP message 1 includes multiple BGP extended community attributes, then the BGP message 1 will have functions corresponding to the multiple BGP extended community attributes. Illustratively, if the BGP message 1 includes a VXLAN extended community attribute and an instance detection extended attribute, where the foregoing detected session type information and the session identifier 1 (or the session identifier 2) are located in the instance detection extended attribute, the VXLAN extended community attribute is used to indicate that the BGP message 1 has a function of negotiating the establishment of a VXLAN tunnel. Then, the BGP message 1 not only has a function of negotiating to configure a detection task, but also has a function of negotiating to establish a VXLAN tunnel.
Illustratively, the BGP extended community attributes used to represent the establishment of the VXLAN tunnel may be as shown in table 4-1 below:
TABLE 4-1
Extending community attributes Value taking
type 0x03
tunnel encapsulation tunnel type:8(VXLAN)
In this example, the type (type) field takes the value of 0x03, indicating the type associated with the VXLAN tunnel; the tunnel encapsulation field takes a value of 8, indicating that the established tunnel is a VXLAN tunnel.
At this time, in the foregoing step 402, the BGP message 1 sent by the network device 1 to the network device 2 not only indicates that the network device is capable of negotiating the configuration detection task, but also indicates that the network device 1 needs to establish a VXLAN tunnel with the network device 2. After receiving the BGP message 1, the network device 2 queries a local routing table to determine whether the address of the network device 1 is reachable by a route. When the address route of network device 1 is reachable, network device 2 will reply with an indication in step 403b indicating confirmation of establishment of the VXLAN tunnel. In this embodiment, the BGP messages used to establish the VXLAN tunnel are multiplexed to perform the negotiation configuration detection task, which is beneficial to saving the number of BGP messages transmitted between network devices.
The detection task configuration method provided by the present application will be further described below with reference to another specific structure of the BGP message. As shown in fig. 5, the network device 1 is a possible implementation manner of the foregoing first network device, the network device 2 is a possible implementation manner of the foregoing second network device, and both the network device 1 and the network device 2 are network devices having a TWAMP function, that is, the network device 1 and the network device 2 can perform performance detection on an IP link between the network device 1 and the network device 2 according to TWAMP under a condition that a detection task is configured. In addition, the foregoing network device 1 and network device 2 can also identify the BGP message proposed in this application. In this embodiment, the BGP message 1 is a possible implementation manner of the first message, and the BGP message 2 is a possible implementation manner of the first response message. In this embodiment, the steps to be executed by the network device 1 and the network device 2 include, but are not limited to:
step 501, the network device 1 queries the processing resource in the network device 1, and determines that the utilization rate of the processing resource in the network device 1 is less than a preset threshold.
In this embodiment, when the utilization rate of the processing resource in the network device 1 is less than the preset threshold, it represents that the network device 1 has enough processing resource configuration detection tasks and sends a detection message after configuring the detection tasks. Subsequently, the network device 1 will trigger execution of step 502.
Step 502, the network device 1 sends a BGP message 1 to the network device 2.
The BGP message 1 and the BGP message 2 described later are both messages improved based on the conventional BGP message. The BGP message 1 and the BGP message 2 are both provided with detection session type information, and the detection session type information is used for indicating that the BGP message 1 and the BGP message 2 both have the function of negotiating and configuring detection tasks. Specifically, please refer to the related description of step 201 for the description of detecting the session type information, which is not described herein again. Optionally, the detection session type information is TWAMP or TWAMP Light.
In a possible implementation manner, the BGP message 1 includes an extension field 1 carrying the detection session type information, but does not include the extension field 2 in the foregoing embodiment corresponding to fig. 4. The extended field 1 is located in an extended community attribute of the one or more extended community attributes of the BGP message 1. That is to say, by adding the extended community attribute in the BGP message and carrying the extended field 1 containing the detection session type information in the added extended community attribute, a function of negotiating and configuring a detection task to the BGP message can be provided. For the introduction of the extension field 1, please refer to the aforementioned step 402.
For example, the attribute of the newly added extended community carrying the detection session type information in the BGP message 1 may be as shown in the following table 5-1:
TABLE 5-1
Adding extended group attributes Value taking
Extension field 1 TWAMP
Reserved field -
In the foregoing example, the newly added extended community attribute includes an extended field 1 and a reserved field. The detection session type information carried in the extension field 1 is TWAMP, which not only indicates that the BGP message 1 has the function of negotiating and configuring the detection task, but also indicates that the type of the detection task negotiated and configured is TWAMP; the reserved field may carry information about the configuration detection task according to the actual application requirements.
In addition, the BGP message 1 also carries information of the network device 1. The information of the network device 1 includes the identification of the network device 1, the IP address of the network device 1, and the port number of the network device 1. The information of the network device 1 may be carried in an existing field in the BGP message 1, for example, a header of the BGP message 1 may carry the information of the network device 1. In addition, part of the information of the network device 1 may also be carried in an existing field of the BGP message 1, and the other part is carried in a newly added extension field of the BGP message 1, for example, an IP address of the network device 1 is carried in a header of the BGP message 1, and a port number of the network device 1 is carried in an attribute of a newly added extension group; for another example, the IP address of the network device 1 is carried in an original routing IP address (originating router's IP address) field existing in the NLRI, and the port number of the network device 1 is carried in the attribute of the newly added extended community.
For example, if the newly added extended community attribute in the BGP message 1 carries both the detection session type information and the information of the network device, the newly added extended community attribute may be as shown in the following table 5-2:
TABLE 5-2
Adding extended community attributes Value taking
Extension field 1 TWAMP
Port number of network device 1025-65535
Detection mode On-demand/continuous detection
Reserved field -
In the foregoing example, the newly added extended community attribute includes an extension field 1, a port number of the network device, and a detection mode and a reserved field. Wherein, the extension field 1 is TWAMP for indicating the negotiation configuration detection task. The rest of the fields can refer to the related descriptions in table 2-2, and are not described herein again.
In this embodiment, the BGP message 1 does not include indication information for indicating whether to configure the detection task, that is, does not include the session identifier 1 and the session identifier 2 in the foregoing embodiment. Therefore, the two network devices can only transmit the BGP message to indicate that the configuration detection task is enabled, and do not transmit the BGP message to indicate that the configuration detection task is not enabled. For example, network device 1 sends BGP message 1 to network device 2 to indicate that network device 1 sending BGP message 1 enables the configuration detection task. If the network device 2 needs to configure the detection task, the network device 2 replies a BGP message 2 to the network device 1 after receiving the BGP message 1, so as to indicate that the network device 2 enables the configuration of the detection task. If the network device 2 does not allow the configuration of the detection task, the network device 2 will not reply the BGP message 2 to the network device 1 after receiving the BGP message 1.
In step 503, the network device 2 queries the processing resource in the network device 2, and determines whether the utilization rate of the processing resource in the network device 2 is less than a preset threshold.
In this embodiment, when the utilization rate of the processing resource in the network device 2 is less than the preset threshold, it represents that the network device 2 has enough processing resource configuration detection tasks and sends a detection packet after the detection tasks are configured. Subsequently, the network device 2 will trigger the execution of step 504a and step 504b; if the network device 2 determines that the utilization rate of the processing resource is greater than the preset threshold, the network device 2 will not send the BGP message 2 to the network device 1.
In step 504a, the network device 2 determines the sending end and the reflecting end according to the information of the network device 2, the information of the network device 1, and a preset rule.
In this embodiment, step 504a is similar to step 404a, and please refer to the related description of step 404 a.
In step 504b, network device 2 sends BGP message 2 to network device 1.
The BGP message 2 is the same type of message as the BGP message 1. The BGP message 2 is provided with an extension field 1 carrying the detection session type information to indicate that the BGP message 2 has the function of negotiating and configuring the detection task. For example, if the new extended community attribute in the BGP message 2 is shown in table 5-1 or table 5-2, the extended field 1 in the BGP message 2 is TWAMP.
In addition, the BGP message 2 also carries information of the network device 2, where the information of the network device 2 includes an IP address of the network device 2 and a port number of the network device 2. Optionally, the information of the network device 2 further includes an IP address of the network device 2.
After the network device 1 receives the BGP message 2, the network device 1 knows, for the TWAMP, that the BGP message 2 is used to negotiate a configuration detection task according to the extension field 1 in the BGP message 2, and the network device 2 enables the configuration detection task. The network device 1 will then trigger the step of configuring the detection task, i.e. the network device 1 will perform step 505.
It should be understood that step 504a and step 504b are not limited to chronological order. That is, the network device 2 may first execute step 504a and then execute step 504b, may first execute step 504b and then execute step 504a, and may simultaneously execute step 504a and step 504b. The details are not limited herein.
Step 505, the network device 1 determines the sending end and the reflecting end according to the information of the network device 1, the information of the network device 2 in the BGP message 2, and a preset rule.
In this embodiment, step 505 is similar to step 405 described above, and please refer to the related description of step 405.
In this embodiment, the network device 1 notifies the network device 2 through the BGP message 1, and the network device 1 needs to configure the detection task, and then the network device 2 indicates that the network device 2 allows to configure the detection task by sending the BGP message 2 to the network device 1; alternatively, the network device 2 indicates that the network device 2 does not allow the configuration detection task by not replying to the BGP message 2 to the network device 1. Then, the network device 1 determines whether to configure the detection tasks of the network device 1 and the network device 2 according to the situation of receiving the BGP message 2. Therefore, the network device 1 and the network device 2 can implement the negotiation configuration detection task through the negotiation process, and therefore, the efficiency of the configuration detection task between the network devices can be improved.
Fig. 6 illustrates a network device 60 according to the present application. The network device 60 may be a physical network entity such as a router and a switch, or may also be a virtual network device such as a virtual router and a virtual switch, which is not limited herein. The first network device, the second network device, the network device 1, the network device 2, and the like in the embodiments corresponding to fig. 2, fig. 4, and fig. 5 may all be based on the structural schematic diagram corresponding to fig. 6.
As shown in fig. 6, network device 60 may include a processor 610, a memory 620, and an interface 630. The processor 610 is coupled to the memory 620, and the processor 610 is coupled to the interface 630.
The processor 610 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of the CPU and the NP. The processor may also be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof. The processor 610 may refer to one processor or may include a plurality of processors.
In addition, the memory 620 is mainly used for storing software programs and data. For example, the first configuration list and the second configuration list mentioned in the foregoing embodiments, and the like. In addition, the memory 620 stores protocols executable by the network device, such as TWAMP protocol or TWAMP Light, BGP protocol, UDP protocol, IGP protocol, TCP protocol, and so on. The memory 620 may be separate and coupled to the processor 610. Optionally, the memory 620 may be integrated with the processor 610, such as within one or more chips. The memory 620 can store program codes for executing the technical solutions of the embodiments of the present application, and the processor 610 controls the execution of the program codes, and various executed computer program codes can also be regarded as drivers of the processor 610. Memory 620 may include volatile memory (volatile memory), such as random-access memory (RAM); the memory may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory (flash memory), hard disk (HDD) or solid-state drive (SSD); the memory 620 may also comprise a combination of the above types of memory. The memory 620 may refer to one memory or may include a plurality of memories.
In addition, the interface 630 is used to implement a logical connection or a physical connection between the network devices in the device set, so that the BGP message sent by one of the network devices can be transmitted to another network device.
In one implementation, the memory 620 has stored therein computer-readable instructions comprising a plurality of software modules, such as a sending module 621, a processing module 622, and a receiving module 623. The processor 610 may perform corresponding operations according to the instructions of the software modules after executing the software modules. In the present embodiment, the operation performed by one software module actually refers to the operation performed by the processor 610 according to the instruction of the software module.
Illustratively, when the foregoing network device 60 is the foregoing first network device, the sending module 621 is configured to send a first message to a second network device, where the first message includes information of the first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and the second network device; a receiving module 623, configured to receive a second message sent by the second network device, where the second message is a response message of the first message, and the second message includes information of the second network device; a processing module 622, configured to configure the first network performance detection task based on the information of the second network device when the second message further indicates that the first session identification information of the first network performance detection task is allowed to be configured.
For example, when the foregoing network device 60 is the foregoing first network device, the processing module 622 determines the sending end and the reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, where the information of the second network device includes the IP address of the second network device and the port number of the second network device.
Illustratively, when the network device 60 is the aforementioned second network device, the receiving module 623 is configured to receive a first message from a first network device, where the first message includes information of the first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and the second network device;
a sending module 621, configured to send, to the first network device, a second message carrying first session identification information indicating that the configuration of the first network performance detection task is allowed when the processing module 622 determines that the configuration of the first network performance detection task is allowed, and the processing module 622 configures the first network performance detection task based on the information of the first network device;
illustratively, when the aforementioned network device 60 is the aforementioned second network device, the network device 60 stores a second configuration list, where the second configuration list is used to indicate network devices that are allowed to configure detection tasks with the second network device; the processing module 622 queries the second configuration list; when the information of the first network equipment exists in the second configuration list, determining that the condition of a configuration detection task is met; and when the information of the first network equipment does not exist in the second configuration list, determining that the condition of the configuration detection task is not met.
For example, when the network device 60 is the second network device, the network device 60 does not store the second configuration list, and the processing module 622 queries the processing resource in the second network device; when the utilization rate of the processing resource in the second network equipment is greater than a preset threshold, determining that the condition for configuring the detection task is not met; and when the utilization rate of the processing resource in the second network equipment is less than a preset threshold, determining that the condition of configuring the detection task is met.
For example, when the network device 60 is the second network device, the processing module 622 determines that the first network device is a sending end and the second network device is a reflecting end according to the information of the first network device, the information of the second network device, and a preset rule, or determines that the second network device is a sending end and the first network device is a reflecting end; the information of the first network device includes an IP address of the first network device and a port number of the first network device, and the information of the second network device includes an IP address of the second network device and a port number of the second network device.
For the rest, reference may be made to the first network device, the second network device, the network device 1, and the method of the network device 2 in the embodiments corresponding to fig. 2, fig. 4, and fig. 5, which are not described herein again.
As shown in fig. 7, another network device 70 is provided herein. The network device 70 may be a processing chip in a physical network entity such as a router and a switch, or may also be a functional module of a virtual network device such as a virtual router and a virtual switch, which is not limited herein. The first network device or the network device 1 in the embodiments corresponding to fig. 2, fig. 4 and fig. 5 may be based on the structural schematic diagram corresponding to fig. 7.
The network device 70 may include a sending module 701, a receiving module 702, and a task configuration module 703. The sending module 701 is configured to send a first message to a second network device, where the first message includes information of a first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and the second network device; a receiving module 702, configured to receive a second message sent by the second network device, where the second message is a response message of the first message, and the second message includes information of the second network device; a task configuration module 703, configured to configure the first network performance testing task based on the information of the second network device when the second message further indicates that the first session identification information of the first network performance testing task is allowed to be configured. Wherein the first message includes detection session type information indicating a type of the first network performance detection session established, the type including TWAMP or TWAMP light.
In a possible implementation manner, the first message and the second message are BGP Update messages, the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message, and the first session identification information and the information of the second network device are in a BGP extended community attribute of the second message.
In a possible implementation manner, the first message and the second message are interior gateway protocol IGP messages, the detection session type information and the information of the first network device are in a type length value TLV field of the first message, and the first session identification information and the information of the second network device are in a TLV field of the second message.
In a possible implementation manner, the task configuration module 703 is further configured to terminate configuring the first network performance detection task when the second message further includes second session identification information indicating that the configuration of the first network performance detection task is not allowed.
In a possible implementation manner, the sending module 701 is further configured to send a third message to the second network device, where the third message is used to indicate that the first network device needs to configure a second network performance detection task, and the second network performance detection task is used to establish a second network performance detection session between the first network device and the second network device;
the task configuration module 703 is further configured to terminate configuring the second network performance detection task when the receiving module 702 does not receive the response message of the third message within a preset time.
In a possible implementation manner, the task configuration module 703 is specifically configured to determine the sending end and the reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, where the information of the second network device includes an IP address of the second network device and a port number of the second network device.
As shown in fig. 8, another network device 80 is provided herein. The network device 80 may be a processing chip in a physical network entity such as a router and a switch, or may also be a functional module of a virtual network device such as a virtual router and a virtual switch, which is not limited herein. The second network device or the network device 2 in the embodiments corresponding to fig. 2, fig. 4 and fig. 5 may be based on the structural schematic diagram corresponding to fig. 8.
The network device 80 may include a receiving module 801, a sending module 802, and a task configuration module 803. The receiving module 801 is configured to receive a first message from a first network device, where the first message includes information of the first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and a second network device; a sending module 802, configured to send, to the first network device, a second message carrying first session identification information indicating that the configuration of the first network performance detection task is allowed when the task configuration module 803 determines that the configuration of the first network performance detection task is allowed, and the task configuration module 803 configures the first network performance detection task based on the information of the first network device; wherein the second message is a response message of the first message, and the second message includes information of the second network device. The first message includes detection session type information indicating a type of the first network performance detection session established, the type including two-way active measurement protocol TWAMP or two-way active measurement protocol lightweight architecture TWAMP light.
In a possible implementation manner, the first message and the second message are BGP Update messages, the detection session type information and the information of the first network device are in a BGP extended community attribute of the first message, and the first session identification information and the information of the second network device are in a BGP extended community attribute of the second message.
In a possible implementation manner, the first message and the second message are interior gateway protocol IGP messages, the detection session type information and the information of the first network device are in a type length value TLV field of the first message, and the first session identification information and the information of the second network device are in a TLV field of the second message.
In a possible implementation manner, the sending module 802 is further configured to send, to the first network device, a second message carrying second session identification information indicating that the configuration of the first network performance detection task is not allowed when the task configuring module 803 determines that the configuration of the first network performance detection task is not allowed, and the task configuring module 803 does not trigger the configuration of the first network performance detection task.
In a possible implementation manner, the task configuration module 803 is specifically configured to determine a sending end and a reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device, where the information of the first network device includes an IP address of the first network device and a port number of the first network device.
In a possible implementation manner, the task configuration module 803 is specifically configured to determine a sending end and a reflecting end of the first network performance detection task according to the information of the second network device, the information of the first network device, and a preset rule, where the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
In a possible implementation, the second network device stores a configuration list, where the configuration list is used to indicate network devices that are allowed to establish network performance detection tasks with the second network device; the task configuration module 803 is specifically configured to: querying the configuration list; when the information of the first network device exists in the configuration list, determining to allow the first network performance detection task to be configured.
As shown in fig. 9, another network device 90 provided herein. The network device 90 may be a physical network entity such as a router and a switch, or may also be a virtual network device such as a virtual router and a virtual switch, which is not limited herein. The first network device, the second network device, the network device 1, the network device 2, and the like in the embodiments corresponding to fig. 2, fig. 4, and fig. 5 may all be based on the structural schematic diagram corresponding to fig. 9.
As shown in fig. 9, the network device 90 includes a main control board 910 and an interface board 930.
The main control board 910 is also called a Main Processing Unit (MPU) or a route processor card (route processor card), and the main control board 910 is configured to control and manage each component in the network device 90, including routing computation, device management, device maintenance, and protocol processing functions. The main control board 910 includes: a central processing unit 911 and a memory 912.
In addition, the interface board 930 is also referred to as a Line Processing Unit (LPU), a line card (line card), or a service board. The interface board 930 is used to provide various service interfaces and implement forwarding of data packets. The service interface includes, but is not limited to, an ethernet interface, a POS (Packet over SONET/SDH) interface, and the like. The ethernet interface may be flexible ethernet Clients (FlexE Clients). The interface board 930 includes: a central processor 931, a network processor 932, a forwarding table entry memory 934, and a Physical Interface Card (PIC) 933.
The central processor 931 on the interface board 930 is configured to control and manage the interface board 930 and communicate with the central processor 911 on the main control board 910.
The network processor 932 is configured to implement forwarding processing of a packet. The network processor 932 may take the form of a forwarding chip. The forwarding chip may be a Network Processor (NP). In some embodiments, the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a Field Programmable Gate Array (FPGA). Specifically, the network processor 932 is configured to forward the received message based on the forwarding table stored in the forwarding table entry storage 934, and if a destination address of the message is an address of the network device 90, send the message to a CPU (e.g., the central processing unit 931) for processing; if the destination address of the message is not the network device 90, the next hop and the outbound interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the outbound interface corresponding to the destination address. Wherein, the processing of the uplink message may include: processing a message input interface, and searching a forwarding table; the processing of the downlink message may include: forwarding table lookups, and the like. In some embodiments, the central processing unit may also perform the functions of a forwarding chip, such as implementing software forwarding based on a general purpose CPU, so that no forwarding chip is needed in the interface board.
In addition, the physical interface card 933 is configured to implement a physical layer interface function, from which the original traffic enters the interface board 930, and the processed packet is sent out from the physical interface card 933. The physical interface card 933, also called a daughter card, may be installed on the interface board 930 and is responsible for converting the optical-electrical signal into a message, performing validity check on the message, and forwarding the message to the network processor 932 for processing. In some embodiments, central processor 931 may also perform the functions of network processor 932, such as implementing software forwarding based on a general purpose CPU, so that network processor 932 is not required in physical interface card 933.
Optionally, the network device 90 includes a plurality of interface boards, for example, the network device 90 further includes an interface board 940, and the interface board 940 includes: central processor 941, network processor 942, forwarding entry store 944, and physical interface cards 943. The functions and implementations of the components in the interface board 940 are the same as or similar to those of the interface board 930, and are not described herein again.
Optionally, the network device 90 further comprises a switch screen 920. The switch board 920 may also be called a Switch Fabric Unit (SFU). In the case that the network management device has a plurality of interface boards, the switch board 920 is used to complete data exchange between the interface boards. For example, interface board 930 and interface board 940 may communicate via switch board 920.
In addition, the aforementioned main control board 910 is coupled to the interface board. For example. The main control board 910, the interface board 930, the interface board 940, and the switch board 920 are connected to the system backplane through the system bus to implement intercommunication. In a possible implementation manner, an inter-process communication (IPC) channel is established between the main control board 910 and the interface board 930 and the interface board 940, and the main control board 910 and the interface board 930 and the interface board 940 communicate with each other through the IPC channel.
Logically, the network device 90 includes a control plane including the main control panel 910 and the central processor 911, and a forwarding plane including various components performing forwarding, such as a forwarding table entry memory 934, a physical interface card 933, and a network processor 932. The control plane executes functions of a router, generating a forwarding table, processing signaling and protocol messages, configuring and maintaining the state of the network device, and the like, and issues the generated forwarding table to the forwarding plane, and in the forwarding plane, the network processor 932 looks up the table of the messages received by the physical interface card 933 based on the forwarding table issued by the control plane and forwards the messages. The forwarding table issued by the control plane may be stored in the forwarding table entry storage 934. In some embodiments, the control plane and the forwarding plane may be completely separate and not on the same network device.
It should be noted that there may be one or more main control boards, and when there are more main control boards, the main control boards may include a main control board and a standby main control board. The interface board may have one or more boards, and the stronger the data processing capability of the network management device, the more interface boards are provided. There may also be one or more physical interface cards on an interface board. The exchange network board may not have one or more blocks, and when there are more blocks, the load sharing redundancy backup can be realized together. Under the centralized forwarding architecture, the network management device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the network management device can have at least one switching network board, and the data exchange among a plurality of interface boards is realized through the switching network board, so that the high-capacity data exchange and processing capacity is provided. Therefore, the data access and processing capacity of the network management device with the distributed architecture is larger than that of the network management device with the centralized architecture. Optionally, the network management device may also be in a form of only one board card, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board card, at this time, the central processing unit on the interface board and the central processing unit on the main control board may be combined into one central processing unit on the one board card to perform a function after the two are superimposed, and the data switching and processing capability of the network management device in this form is low (for example, network devices such as a low-end switch or a router, etc.). Which architecture is specifically adopted depends on a specific networking deployment scenario, and is not limited herein.
Further, the present application provides a computer program product comprising one or more computer instructions. The procedures or functions described in accordance with the embodiments of the present application occur, in whole or in part, when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital Versatile Disk (DVD)), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
Furthermore, the present application also provides a computer-readable storage medium, which stores a computer program, where the computer program is executed by a processor to implement the method related to the network devices (e.g., the first network device, the second network device, the network device 1, the network device 2, etc.) in fig. 2, fig. 4, and fig. 5.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be implemented in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that the term "and/or" herein is only one kind of association relationship describing the association object, and means that there may be three kinds of relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present application.

Claims (25)

1. A detection task configuration method is characterized by comprising the following steps:
a first network device sends a first message to a second network device, wherein the first message comprises information of the first network device, the first message is used for indicating that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used for establishing a first network performance detection session between the first network device and the second network device;
the first network equipment receives a second message sent by the second network equipment, wherein the second message is a response message of the first message and comprises information of the second network equipment;
when the second message further includes first session identification information indicating that configuration of the first network performance detection task is allowed, the first network device configures the first network performance detection task based on information of the second network device.
2. The method of claim 1, wherein the first message comprises detection session type information indicating a type of the first network performance detection session established, and wherein the type comprises TWAMP or TWAMP light.
3. The method of claim 2, wherein the first message and the second message are BGP Update messages, wherein the detection session type information and the information of the first network device are in BGP extended community attributes of the first message, and wherein the first session identification information and the information of the second network device are in BGP extended community attributes of the second message.
4. The method of claim 2, wherein the first message and the second message are Interior Gateway Protocol (IGP) packets, wherein the detection session type information and the information of the first network device are in a type-length-value (TLV) field of the first message, and wherein the first session identification information and the information of the second network device are in a TLV field of the second message.
5. The method of claim 1, further comprising:
when the second message further includes second session identification information indicating that the configuration of the first network performance detection task is not allowed, the first network device terminates the configuration of the first network performance detection task.
6. The method of claim 1, further comprising:
the first network device sends a third message to the second network device, where the third message is used to indicate that the first network device needs to configure a second network performance detection task, and the second network performance detection task is used to establish a second network performance detection session between the first network device and the second network device;
and if the first network equipment does not receive the response message of the third message within the preset time, the first network equipment terminates the configuration of the second network performance detection task.
7. The method according to any of claims 1 to 4, wherein the first network device configures the first network performance detection task based on the information of the second network device, comprising:
and the first network equipment determines a sending end and a reflecting end of the first network performance detection task according to the information of the second network equipment and the information of the first network equipment, wherein the information of the second network equipment comprises an IP address of the second network equipment and a port number of the second network equipment.
8. A method for detecting task configuration is characterized by comprising the following steps:
the method comprises the steps that a second network device receives a first message from a first network device, wherein the first message comprises information of the first network device, the first message is used for indicating that the first network device needs to be configured with a first network performance detection task, and the first network performance detection task is used for establishing a first network performance detection session between the first network device and the second network device;
when the second network device determines that the configuration of the first network performance detection task is allowed, the second network device sends a second message carrying first session identification information indicating that the configuration of the first network performance detection task is allowed to the first network device, and configures the first network performance detection task based on the information of the first network device;
wherein the second message is a response message of the first message, and the second message includes information of a second network device.
9. The method of claim 8, wherein the first message comprises detection session type information indicating a type of the first network performance detection session established, and wherein the type comprises TWAMP or TWAMP light.
10. The method of claim 9, wherein the first message and the second message are BGP Update messages, wherein the detection session type information and the information of the first network device are in BGP extended community attributes of the first message, and wherein the first session identification information and the information of the second network device are in BGP extended community attributes of the second message.
11. The method of claim 9, wherein the first message and the second message are Interior Gateway Protocol (IGP) packets, wherein the detection session type information and the information of the first network device are in a type-length-value (TLV) field of the first message, and wherein the first session identification information and the information of the second network device are in a TLV field of the second message.
12. The method according to claim 8, wherein when the second network device determines that the configuration of the first network performance detection task is not allowed, the second network device sends a second message carrying second session identification information indicating that the configuration of the first network performance detection task is not allowed to the first network device, and does not trigger the configuration of the first network performance detection task.
13. The method according to any of claims 8 to 12, wherein the second network device configures the first network performance detection task based on information of the first network device, comprising:
and the second network equipment determines a sending end and a reflecting end of the first network performance detection task according to the information of the second network equipment and the information of the first network equipment, wherein the information of the first network equipment comprises the IP address of the first network equipment and the port number of the first network equipment.
14. The method of claim 13, wherein the determining, by the second network device, the sending end and the reflecting end of the first network performance detection task according to the information of the second network device and the information of the first network device comprises:
and the second network equipment determines the sending end and the reflecting end of the first network performance detection task according to the information of the second network equipment, the information of the first network equipment and a preset rule, wherein the preset rule is a rule for determining the sending end and the reflecting end of the first network performance detection task.
15. A first network device, comprising:
a sending module, configured to send a first message to a second network device, where the first message includes information of a first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and the second network device;
a receiving module, configured to receive a second message sent by the second network device, where the second message is a response message of the first message, and the second message includes information of the second network device;
a task configuration module, configured to configure the first network performance detection task based on the information of the second network device when the second message further indicates that the configuration of the first session identification information of the first network performance detection task is allowed.
16. The first network device of claim 15, wherein the first message comprises detection session type information indicating a type of the first network performance detection session established, and wherein the type comprises two-way active measurement protocol (TWAMP) or two-way active measurement protocol (TWAMP) light.
17. The first network device of claim 16, wherein the first message and the second message are BGP Update messages, wherein the detection session type information and the information of the first network device are in BGP extended community attributes of the first message, and wherein the first session identification information and the information of the second network device are in BGP extended community attributes of the second message.
18. The first network device of claim 16, wherein the first message and the second message are Interior Gateway Protocol (IGP) packets, wherein the detection session type information and the information of the first network device are in a type-length-value (TLV) field of the first message, and wherein the first session identification information and the information of the second network device are in a TLV field of the second message.
19. A second network device, comprising:
a receiving module, configured to receive a first message from a first network device, where the first message includes information of the first network device, the first message is used to indicate that the first network device needs to configure a first network performance detection task, and the first network performance detection task is used to establish a first network performance detection session between the first network device and a second network device;
a task configuration module for determining whether to allow configuration of the first network performance detection task;
a sending module, configured to send, to the first network device, a second message carrying first session identification information indicating that the configuration of the first network performance detection task is allowed when the task configuration module determines that the configuration of the first network performance detection task is allowed, and the task configuration module configures the first network performance detection task based on the information of the first network device;
wherein the second message is a response message of the first message, and the second message includes information of a second network device.
20. The second network device of claim 19, wherein the first message comprises detection session type information indicating a type of the first network performance detection session established, and wherein the type comprises two-way active measurement protocol (TWAMP) or two-way active measurement protocol (TWAMP) light.
21. The second network device of claim 20, wherein the first message and the second message are BGP Update messages, wherein the detection session type information and the information of the first network device are in BGP extended community attributes of the first message, and wherein the first session identification information and the information of the second network device are in BGP extended community attributes of the second message.
22. The second network device of claim 20, wherein the first message and the second message are Interior Gateway Protocol (IGP) packets, wherein the detection session type information and the information of the first network device are in a type-length-value (TLV) field of the first message, and wherein the first session identification information and the information of the second network device are in a TLV field of the second message.
23. A network device comprising a processor and a memory;
wherein the memory stores a computer program;
the processor calls the computer program in the memory to perform the method of any one of claims 1 to 7 or to perform the method of any one of claims 8 to 14.
24. A computer-readable storage medium, in which a computer program is stored, which computer program is executable by a processor to implement the method of any one of claims 1 to 7 or to implement the method of any one of claims 8 to 14.
25. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 7 or perform the method of any one of claims 8 to 14.
CN202110419334.2A 2021-04-19 2021-04-19 Detection task configuration method and network equipment Pending CN115225474A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110419334.2A CN115225474A (en) 2021-04-19 2021-04-19 Detection task configuration method and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110419334.2A CN115225474A (en) 2021-04-19 2021-04-19 Detection task configuration method and network equipment

Publications (1)

Publication Number Publication Date
CN115225474A true CN115225474A (en) 2022-10-21

Family

ID=83605498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110419334.2A Pending CN115225474A (en) 2021-04-19 2021-04-19 Detection task configuration method and network equipment

Country Status (1)

Country Link
CN (1) CN115225474A (en)

Similar Documents

Publication Publication Date Title
CN113411834B (en) Message processing method, device, equipment and storage medium
US8995266B2 (en) Performing path-oriented systems management
US7778204B2 (en) Automatic maintenance of a distributed source tree (DST) network
US10972381B2 (en) Network operations reactive to operations data included in seamless bidirectional forwarding detection (S-BFD) packets
US20220124023A1 (en) Path Switching Method, Device, and System
CN113746729A (en) Method and device for processing binding segment identifier
CN113839870A (en) Path creation method, device and system
JP2021534669A (en) Packet processing method and gateway device
CN108881295A (en) For detecting and solving the method and the network equipment of anomalous routes
WO2022127698A1 (en) Congestion control method and network device
WO2022194023A1 (en) Packet processing method, network device, and controller
WO2022121707A1 (en) Packet transmission method, device, and system
CN108737183A (en) A kind of monitoring method and device of forwarding-table item
CN110380966B (en) Method for discovering forwarding path and related equipment thereof
CN110881006B (en) Method for sending message, network equipment and computer storage medium
CN113765800A (en) Method, device, system, equipment and readable storage medium for transmitting message
CN115225474A (en) Detection task configuration method and network equipment
CN115208829A (en) Message processing method and network equipment
WO2023040783A1 (en) Method, apparatus and system for acquiring capability, method, apparatus and system for sending capability information, and storage medium
CN114629834B (en) Communication method and device
CN114697373B (en) Method and system for session protection
WO2022257854A1 (en) Message publishing method and apparatus, and forwarding path processing method and apparatus
CN114124753B (en) Message sending method and device
CN113691446B (en) Method and device for sending message
EP4277226A1 (en) Packet transmission method, transmission control method, apparatus, and system

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