CN112751727A - Method for detecting link and network equipment - Google Patents

Method for detecting link and network equipment Download PDF

Info

Publication number
CN112751727A
CN112751727A CN202011537432.8A CN202011537432A CN112751727A CN 112751727 A CN112751727 A CN 112751727A CN 202011537432 A CN202011537432 A CN 202011537432A CN 112751727 A CN112751727 A CN 112751727A
Authority
CN
China
Prior art keywords
attribute information
path
equal
network device
message
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
CN202011537432.8A
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.)
Hangzhou H3C Technologies Co Ltd
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN202011537432.8A priority Critical patent/CN112751727A/en
Publication of CN112751727A publication Critical patent/CN112751727A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath

Abstract

This specification provides a method and network device for detecting a link, where the method includes obtaining attribute information of a detection packet, where the attribute information includes: a dynamically changing source port number; and acquiring the hash value of the attribute information, and sending the detection message through each path in the equal-cost multipath according to the hash value so as to detect the link state of each path in the equal-cost multipath. By the method, each path in the ECMP can be subjected to link detection.

Description

Method for detecting link and network equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method for detecting a link and a network device.
Background
BFD (Bidirectional Forwarding Detection) is a general, standardized, media-independent and protocol-independent rapid fault Detection mechanism, and is used for detecting the communication status of a Forwarding path and ensuring that communication faults can be rapidly detected between devices, so that measures can be taken in time and the continuous operation of services can be ensured. BFD may quickly detect a failure of a bidirectional forwarding path between two devices for various upper layer protocols, such as routing protocols. The upper layer protocol usually adopts a Hello message mechanism to detect faults, the required time is in the order of seconds, and the BFD can provide millisecond detection.
The BFD control message is packaged in a UDP message and transmitted, the UDP destination port number is 3784 for single-hop detection, and the UDP destination port number is 4784 for multi-hop detection. The devices at both ends of the link negotiate to establish a BFD session through parameters (a session identifier, an expected minimum time interval for message receiving and sending, a local BFD session state and the like) carried in the control message.
ECMP (Equal-cost multipath), i.e. there are multiple paths of the same cost to the same destination address. When the device supports the equivalent route, the three-layer forwarding flow sent to the destination IP or the destination network segment can be shared by different paths to realize the load balance of the network, and when some paths have faults, other paths are substituted to complete the forwarding processing to realize the route redundancy backup function.
Compared with the traditional routing technology, the data packet sent to the destination address can only utilize one link, other links are in a backup state or an invalid state, and certain time is needed for mutual switching under the dynamic routing environment, while the equal-cost multi-path routing protocol can simultaneously use a plurality of links under the network environment, thereby not only increasing the transmission bandwidth, but also backing up the data transmission of the invalid link without time delay and packet loss.
Disclosure of Invention
Embodiments of the present specification provide a method and a network device for detecting a link, by which a link detection may be performed on each path in an ECMP.
The present specification provides a method for detecting a link, which is applied to a network device configured with equal-cost multi-path ECMP, and the method includes:
obtaining attribute information of a detection message, wherein the attribute information comprises: a dynamically changing source port number;
and acquiring the hash value of the attribute information, and sending the detection message through each path in the equal-cost multipath according to the hash value so as to detect the link state of each path in the equal-cost multipath.
Optionally, the attribute information further includes: and detecting the source address, the destination port and the protocol number of the message.
Optionally, the range of the dynamically changing source port number includes: 10000-10031.
Optionally, the obtaining the hash value of the attribute information and sending the detection packet through each path in the equal-cost multipath according to the hash value specifically include:
and generating different hash values according to each change of the source port number which dynamically changes in the attribute information, wherein the different hash values correspond to different paths in the equal cost multipath.
As can be seen from the above embodiments, a plurality of different hash values can be obtained by hashing attribute information including a dynamically changing source port number, and a detection packet is sent through each path of an equal-cost multi-path according to the plurality of different hash values, so as to perform link detection on each path in the equal-cost multi-path.
Embodiments of the present specification also provide a network device configured with equal-cost multi-path ECMP;
the network equipment acquires a BFD message, wherein the attribute information of the BFD message comprises: a dynamically changing source port number;
performing hash operation on the attribute information, and generating a plurality of hash values according to the source port number which dynamically changes in the attribute information;
and sending the BFD message through each path in the equal cost multipath according to the plurality of hash values.
Optionally, the range of the dynamically changing source port number includes: 10000-10031.
Optionally, the attribute information of the BFD packet further includes: and the source address, the destination port and the protocol number of the BFD message.
It can be seen from the above embodiments that the network device can perform link detection on each path in the equal-cost multipath by using the dynamically changing source port number.
Embodiments of the present specification also provide a network device configured with equal-cost multi-path ECMP, the network device including;
an obtaining module, configured to obtain attribute information of a detection packet, where the attribute information includes: a dynamically changing source port number;
the obtaining module is further configured to obtain a hash value of the attribute information;
and the sending module is used for sending the detection message through each path in the equal-cost multipath according to the hash value so as to detect the link state of each path in the equal-cost multipath.
Optionally, the attribute information further includes: and detecting the source address, the destination port and the protocol number of the message.
Optionally, the range of the dynamically changing source port number includes: 10000-10031.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a schematic diagram of a network architecture according to an embodiment of the present disclosure;
fig. 2 is a schematic architecture diagram of a method for detecting a link according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
As shown in FIG. 1, there are 4 paths from switch A (abbreviated as A) to switch B (abbreviated as B) to reach, A and B are matched with BFD, and the link state between A and B is detected. The BFD message is sent from A, because the BFD message source IP, the destination IP, the source port, the destination port and the protocol number are fixed, when the BFD message is forwarded by the switch A chip, the BFD message can only be forwarded to a fixed path by the chip hash, for example, the path1 reaches the switch B, and the BFD message can not be forwarded from other 3 paths.
If the switch a and the switch B are equipped with 50ms × 3 BFD (a message is sent each 50ms between a and B, and a message of the other party is considered to be overtime within 150 ms), taking the BFD message from a to B as an example, if the BFD message travels path1 to B, when the link between path1 fails, the ECMP protocol recalculates the path for about 1 second, therefore, during the time period of ECMP protocol convergence, the BFD message becomes unreachable due to travel path1, the switch B does not receive the BFD message sent by a for more than 150ms, the B will drop the BFD session down between a, and the protocol linked with BFD (e.g., OSPF) will also be down.
To solve the above technical problem, an embodiment of the present specification provides a method for detecting a link, which is applied to a network device configured with equal-cost multi-path ECMP, as shown in fig. 2, and includes:
s202, obtaining attribute information of the detection message, wherein the attribute information comprises: a dynamically changing source port number;
s204, the hash value of the attribute information is obtained, and the detection message is sent through each path in the equal cost multi-path according to the hash value so as to detect the link state of each path in the equal cost multi-path.
There exists an equal cost multi-path between the network device and the opposite network device, the equal cost multi-path includes two or more paths.
In step S202, the network device generates a detection packet, e.g., a BFD packet, for detecting a link, and obtains attribute information of the detection packet, where the attribute information includes attribute information for instructing to send to the detection packet, for example: source address, destination port, protocol number.
In this embodiment of this specification, the attribute information of the detection packet further includes: a dynamically changing source port number, the dynamically changing source port number ranging from: 10000-10031, wherein the source port number of the dynamic change has a change rule: each time the hash value is calculated from the attribute information, the dynamically changing source port number in the attribute information is incremented by one until 100031 is added, and then one is incremented from 10000 again.
In step S204, the attribute information is hashed according to the number of paths of equal cost multipath, and each hash is performed, the dynamically changing source port number in the attribute information is incremented by one, for example: and if 4 equal cost multi-paths exist, performing hash operation on the attribute information, and obtaining at least 4 different hash values, so that the detection message is sent through the 4 equal cost multi-paths according to the 4 different hash values, and the purpose of detecting the 4 equal cost multi-paths is achieved.
As can be seen from the above embodiments, a plurality of different hash values can be obtained by hashing using a dynamically changing source port number, and each hash value may correspond to one path, so that link detection is performed on each path in an equal cost multipath through the plurality of hash values.
The embodiment of the present specification further provides a network device, configured with equal-cost multi-path ECMP, which may be a physical switching device or a virtual switching device.
The network equipment generates a BFD message for detection, wherein the attribute information of the BFD message comprises: a dynamically changing source port number;
performing hash operation on the attribute information, and generating a plurality of hash values according to the source port number which dynamically changes in the attribute information;
and sending the BFD message through each path in the equal cost multipath according to the plurality of hash values.
Wherein, the range of variation of the dynamically varying source port number includes: 10000-10031.
Wherein, the attribute information of the BFD packet further includes: and the source address, the destination port and the protocol number of the BFD message.
In this embodiment, the network device may generate a plurality of hash values according to the dynamically changing source port number, and perform link detection on each path in the equal-cost multipath according to the plurality of hash values.
The present specification also provides a network device configured with equal-cost multi-path ECMP, where the network device includes:
an obtaining module, configured to obtain attribute information of a detection packet, where the attribute information includes: a dynamically changing source port number;
the obtaining module is further configured to obtain a hash value of the attribute information;
and the sending module is used for sending the detection message through each path in the equal-cost multipath according to the hash value so as to detect the link state of each path in the equal-cost multipath.
The attribute information further includes: and detecting the source address, the destination port and the protocol number of the message.
The range of the dynamically changing source port number includes: 10000-10031.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (10)

1. A method for detecting a link, the method being applied to a network device configured with equal-cost multi-path ECMP, the method comprising:
obtaining attribute information of a detection message, wherein the attribute information comprises: a dynamically changing source port number;
and acquiring the hash value of the attribute information, and sending the detection message through each path in the equal-cost multipath according to the hash value so as to detect the link state of each path in the equal-cost multipath.
2. The method of claim 1, wherein the attribute information further comprises:
and detecting the source address, the destination port and the protocol number of the message.
3. The method of claim 1, wherein the dynamically changing source port number ranges from: 10000-10031.
4. The method according to claim 1, wherein the obtaining the hash value of the attribute information and sending the detection packet through each path in the equal cost multipath according to the hash value specifically comprises:
and generating different hash values according to each change of the source port number which dynamically changes in the attribute information, wherein the different hash values correspond to different paths in the equal cost multipath.
5. A network device, wherein the network device is configured with equal-cost multi-path ECMP;
the network equipment acquires a BFD message, wherein the attribute information of the BFD message comprises: a dynamically changing source port number;
performing hash operation on the attribute information, and generating a plurality of hash values according to the source port number which dynamically changes in the attribute information;
and sending the BFD message through each path in the equal cost multipath according to the plurality of hash values.
6. The network device of claim 5, wherein the dynamically changing source port number ranges from: 10000-10031.
7. The network device according to claim 5, wherein the attribute information of the BFD packet further comprises: and the source address, the destination port and the protocol number of the BFD message.
8. A network device, wherein the network device is configured with equal cost multi-path ECMP, the network device comprising;
an obtaining module, configured to obtain attribute information of a detection packet, where the attribute information includes: a dynamically changing source port number;
the obtaining module is further configured to obtain a hash value of the attribute information;
and the sending module is used for sending the detection message through each path in the equal-cost multipath according to the hash value so as to detect the link state of each path in the equal-cost multipath.
9. The network device of claim 8, wherein the attribute information further comprises: and detecting the source address, the destination port and the protocol number of the message.
10. The network device of claim 8, wherein the dynamically changing source port number ranges from: 10000-10031.
CN202011537432.8A 2020-12-23 2020-12-23 Method for detecting link and network equipment Pending CN112751727A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011537432.8A CN112751727A (en) 2020-12-23 2020-12-23 Method for detecting link and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011537432.8A CN112751727A (en) 2020-12-23 2020-12-23 Method for detecting link and network equipment

Publications (1)

Publication Number Publication Date
CN112751727A true CN112751727A (en) 2021-05-04

Family

ID=75646201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011537432.8A Pending CN112751727A (en) 2020-12-23 2020-12-23 Method for detecting link and network equipment

Country Status (1)

Country Link
CN (1) CN112751727A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472647A (en) * 2021-06-11 2021-10-01 新华三信息安全技术有限公司 Message forwarding method and device
WO2024001324A1 (en) * 2022-06-30 2024-01-04 中兴通讯股份有限公司 Network path detection method and system, and computer device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120287791A1 (en) * 2011-05-13 2012-11-15 Kang Xi Balancing load in a network, such as a data center network, using flow based routing
CN104753963A (en) * 2015-04-23 2015-07-01 南京大学 Method and system for accelerating short flow of data centers on basis of redundancy techniques
CN106330597A (en) * 2015-07-10 2017-01-11 杭州华三通信技术有限公司 Path reachability detection method and device between VTEPs (VXLAN Tunnel End Points) of VXLAN (Virtual Extensible Local Area Network)
CN106559324A (en) * 2015-09-24 2017-04-05 华为技术有限公司 A kind of method E-Packeted based on equal cost multipath and the network equipment
CN107171882A (en) * 2016-03-08 2017-09-15 华为技术有限公司 Detect the method, apparatus and system of equal cost multipath routing function
CN107342908A (en) * 2016-11-30 2017-11-10 新华三技术有限公司 A kind of method and apparatus for sending bidirectional forward detection report
CN110113425A (en) * 2019-05-16 2019-08-09 南京大学 A kind of SiteServer LBS and equalization methods based on the unloading of RDMA network interface card correcting and eleting codes

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120287791A1 (en) * 2011-05-13 2012-11-15 Kang Xi Balancing load in a network, such as a data center network, using flow based routing
CN104753963A (en) * 2015-04-23 2015-07-01 南京大学 Method and system for accelerating short flow of data centers on basis of redundancy techniques
CN106330597A (en) * 2015-07-10 2017-01-11 杭州华三通信技术有限公司 Path reachability detection method and device between VTEPs (VXLAN Tunnel End Points) of VXLAN (Virtual Extensible Local Area Network)
CN106559324A (en) * 2015-09-24 2017-04-05 华为技术有限公司 A kind of method E-Packeted based on equal cost multipath and the network equipment
CN107171882A (en) * 2016-03-08 2017-09-15 华为技术有限公司 Detect the method, apparatus and system of equal cost multipath routing function
CN107342908A (en) * 2016-11-30 2017-11-10 新华三技术有限公司 A kind of method and apparatus for sending bidirectional forward detection report
CN110113425A (en) * 2019-05-16 2019-08-09 南京大学 A kind of SiteServer LBS and equalization methods based on the unloading of RDMA network interface card correcting and eleting codes

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472647A (en) * 2021-06-11 2021-10-01 新华三信息安全技术有限公司 Message forwarding method and device
WO2024001324A1 (en) * 2022-06-30 2024-01-04 中兴通讯股份有限公司 Network path detection method and system, and computer device

Similar Documents

Publication Publication Date Title
EP2686988B1 (en) Method and apparatus for rapid rerouting of ldp packets
US7948985B2 (en) Methods, systems, and computer program products for source-aware IP routing at a media gateway
US7852778B1 (en) Verification of network paths using two or more connectivity protocols
EP2074752B1 (en) Resiliency schemes in connection oriented communications networks
EP2364539B1 (en) A system and method of implementing lightweight not-via ip fast reroutes in a telecommunications network
CN102480753B (en) Link state detection method and device
US8665711B2 (en) Fast restoration for provider edge node and access link failures
US10439880B2 (en) Loop-free convergence in communication networks
CN109672619A (en) A kind of method, equipment and system handling message
JP6293883B2 (en) Data transmission system providing improved resiliency
CN112104557B (en) Method and device for detecting link
CN112751727A (en) Method for detecting link and network equipment
CN108206759A (en) A kind of method to E-Packet, equipment and system
CN111447095B (en) Bidirectional forwarding detection switching method, bidirectional forwarding detection module and edge device
CN107770061B (en) Method and equipment for forwarding message
JP5618946B2 (en) Communication apparatus and communication system
CN102769552B (en) A kind of method by transmission BFD message during BFD detection LSP and equipment
CN112968839B (en) Message processing method and device
US7869351B2 (en) Communication techniques and generic layer 3 automatic switching protection
Huynh et al. RRR: Rapid ring recovery submillisecond decentralized recovery for ethernet ring
CN101335714A (en) Load sharing method and apparatus or fast rerouting method and apparatus
KR20130079596A (en) Network configuration method, ring network system, and node
CN110572317B (en) Method and system for realizing dynamic ARP hot backup in telecommunication network
Kim et al. Software-defined traffic load balancing for cost-effective data center interconnection service
Song et al. Scalable fault-tolerant network design for ethernet-based wide area process control network systems

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210504