CN107231321B - Method, equipment and network system for detecting forwarding path - Google Patents

Method, equipment and network system for detecting forwarding path Download PDF

Info

Publication number
CN107231321B
CN107231321B CN201610176681.6A CN201610176681A CN107231321B CN 107231321 B CN107231321 B CN 107231321B CN 201610176681 A CN201610176681 A CN 201610176681A CN 107231321 B CN107231321 B CN 107231321B
Authority
CN
China
Prior art keywords
switch
detection message
intermediate switch
mark
added
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610176681.6A
Other languages
Chinese (zh)
Other versions
CN107231321A (en
Inventor
宋伟
张维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201610176681.6A priority Critical patent/CN107231321B/en
Publication of CN107231321A publication Critical patent/CN107231321A/en
Application granted granted Critical
Publication of CN107231321B publication Critical patent/CN107231321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/252Store and forward routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports

Abstract

The invention discloses a method, equipment and a network system for detecting a forwarding path, and belongs to the technical field of networks. The controller sends N detection messages to the inlet switch, each detection message carries an intermediate switch identifier, the N is equal to the number of the intermediate switches, the intermediate switch identifiers carried by different detection messages are different, and each intermediate switch identifier is used for uniquely identifying one intermediate switch; receiving at least one detection message which is sent by an exit switch and added with a first mark; and determining a forwarding path between the inlet switch and the outlet switch according to the intermediate switch identifier carried in the at least one detection message added with the first mark and a pre-stored network topology structure. The controller can determine the forwarding path between the inlet switch and the outlet switch only by receiving the detection message which is sent by the outlet switch and added with the first mark, so that the operation is simple and convenient, the pressure of the intermediate switch is reduced, and the flexibility is improved.

Description

Method, equipment and network system for detecting forwarding path
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method, a device, and a network system for detecting a forwarding path.
Background
Data center networks typically include a plurality of switches interconnected to form a plurality of paths. Some of the switches may be used as ingress switches to send messages, some as egress switches to receive messages, and some as intermediate switches only to forward received messages. For a data flow, there is only one actual forwarding path between the ingress switch and the egress switch for a specific ingress switch and egress switch, and when the ingress switch is to send a packet to the egress switch, the packet will pass through at least one intermediate switch on the forwarding path to reach the egress switch.
In the prior art, in order to facilitate management of a data center network, it is generally required to probe a forwarding path between an ingress switch and an egress switch, and the probing method may include the following steps:
1) the controller sends a detection message to the ingress switch, the detection message carrying a five-tuple comprising a source IP address, a source port, a destination IP address, a destination port and a transport layer protocol. And the controller issues an Access Control List (ACL) matching rule to all switches in the data center network, wherein the ACL matching rule comprises the quintuple, and the ACL matching rule is used for enabling each switch to send a matching success message to the controller if the quintuple carried in the received message is matched with the quintuple in the ACL matching rule.
2) After receiving the detection message, the ingress switch forwards the detection message according to the quintuple in the detection message, and the detection message reaches the egress switch through an intermediate switch on a forwarding path between the ingress switch and the egress switch. In the process, the intermediate switch on the forwarding path receives the detection message, and determines that the quintuple carried in the detection message is matched with the quintuple in the ACL matching rule according to the ACL matching rule, and at the moment, the intermediate switch on the forwarding path sends a matching success message to the controller. And the intermediate switch which is not on the forwarding path cannot receive the detection message and cannot send a matching success message to the controller.
3) The controller receives the matching success message sent by the at least one intermediate switch, namely, the intermediate switch sending the matching success message is determined to be the intermediate switch on the forwarding path, and the forwarding path between the inlet switch and the outlet switch can be determined according to the at least one intermediate switch and the network topology structure of the data center network.
However, in the above detection process, an ACL rule needs to be configured on each intermediate switch for each detected data stream, and all the intermediate switches on the forwarding path need to perform an operation of sending a matching success message to the controller, which occupies more device resources and is complex in implementation process.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method, a device, and a network system for detecting a forwarding path. The technical scheme is as follows:
in a first aspect, a method for probing a forwarding path is provided, where the method includes:
the method comprises the steps that a controller sends N detection messages to an entrance switch, each detection message carries an intermediate switch identifier, N is equal to the number of intermediate switches, the intermediate switch identifiers carried by different detection messages are different, and each intermediate switch identifier is used for uniquely identifying one intermediate switch;
the controller receives at least one detection message which is sent by an outlet switch and added with a first mark, and acquires an intermediate switch identifier carried in the at least one detection message added with the first mark;
and the controller determines a forwarding path between the inlet switch and the outlet switch according to the acquired at least one intermediate switch identifier and a pre-stored network topology structure.
With reference to the first aspect, in a first possible implementation manner of the first aspect, before the controller sends N probe packets to the ingress switch, the method further includes:
the controller issues a first matching rule to each intermediate switch, wherein the first matching rule is used for stipulating that if an intermediate switch identifier carried in a detection message received by one intermediate switch is the same as an intermediate switch identifier of the intermediate switch, the intermediate switch adds a first mark to the received detection message, and the first mark is used for indicating an outlet switch to send the detection message added with the first mark to the controller.
With reference to any one of the foregoing possible implementation manners of the first aspect, in a second possible implementation manner of the first aspect, the first matching rule is an ACL matching rule.
With reference to any one of the foregoing possible implementations of the first aspect, in a third possible implementation of the first aspect, the method further includes:
assigning different intermediate switch identifications to all intermediate switches in the network topology.
In a second aspect, a method for probing a forwarding path is provided, the method comprising:
the intermediate switch receives a detection message from the inlet switch, wherein the detection message carries an intermediate switch identifier;
the intermediate switch judges whether the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch or not;
and if the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch, the intermediate switch adds a first mark to the detection message, and forwards the detection message added with the first mark, so that the outlet switch receives the detection message added with the first mark and sends the detection message added with the first mark to the controller.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the method includes:
the intermediate switch acquires a first matching rule, wherein the first matching rule is used for stipulating that if an intermediate switch identifier carried in a detection message received by one intermediate switch is the same as an intermediate switch identifier of the intermediate switch, the intermediate switch adds a first mark to the received detection message, and the first mark is used for indicating an outlet switch to send the detection message added with the first mark to the controller.
With reference to any one of the foregoing possible implementation manners of the second aspect, in a second possible implementation manner of the second aspect, the adding a first flag to the probe packet, where the adding the first flag is a preset priority includes:
and modifying the priority carried in the detection message into the preset priority to add the first mark to the detection message.
In a third aspect, a method for probing a forwarding path is provided, where the method includes:
an exit switch receives a detection message from an entrance switch, wherein the detection message carries an intermediate switch identifier;
the exit switch judges whether the detection message is the detection message added with the first mark;
if the detection message is determined to be the detection message added with the first mark, the outlet switch sends the detection message added with the first mark to a controller, so that the controller receives at least one detection message added with the first mark sent by the outlet switch, and a forwarding path between the inlet switch and the outlet switch is determined according to an intermediate switch identifier carried in the at least one detection message added with the first mark and a pre-stored network topology structure.
With reference to the third aspect, in a first possible implementation manner of the third aspect, the method further includes:
the outlet switch acquires a second matching rule, wherein the second matching rule is used for stipulating that if the detection message received by the outlet switch is the detection message added with the first mark, the outlet switch sends the detection message added with the first mark to the controller.
With reference to the third aspect, in a second possible implementation manner of the third aspect, the determining, by the egress switch, whether the probe packet is the probe packet to which the first label is added includes:
and the exit switch judges whether the priority carried in the detection message is the preset priority or not.
In a fourth aspect, there is provided a controller comprising:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending N detection messages to an entrance switch, each detection message carries an intermediate switch identifier, N is equal to the number of intermediate switches, the intermediate switch identifiers carried by different detection messages are different, and each intermediate switch identifier is used for uniquely identifying one intermediate switch;
the receiving module is used for receiving at least one detection message which is sent by an outlet switch and added with a first mark, and acquiring an intermediate switch identifier carried in the at least one detection message which is added with the first mark;
and the determining module is used for determining a forwarding path between the inlet switch and the outlet switch according to the acquired at least one intermediate switch identifier and a pre-stored network topology structure.
The controller of the fourth aspect is configured to perform the method of the first aspect and the embodiments of the first aspect.
In a fifth aspect, there is provided an intermediate switch, comprising:
a receiving module, configured to receive a detection packet from an ingress switch, where the detection packet carries an intermediate switch identifier;
the judging module is used for judging whether the intermediate switch identifier carried in the detection message is the same as the intermediate switch identifier of the intermediate switch or not;
a first mark adding module, configured to add a first mark to the detection packet if it is determined that the intermediate switch identifier carried in the detection packet is the same as the intermediate switch identifier of the intermediate switch;
and the sending module is used for forwarding the detection message added with the first mark, so that the outlet switch receives the detection message added with the first mark and sends the detection message added with the first mark to the controller.
The intermediate switch of the fifth aspect is configured to perform the method of the second aspect and embodiments of the second aspect.
In a sixth aspect, there is provided an egress switch comprising:
a receiving module, configured to receive a detection packet from an ingress switch, where the detection packet carries an intermediate switch identifier;
the judging module is used for judging whether the detection message is the detection message added with the first mark;
and the sending module is used for sending the detection message added with the first mark to a controller if the detection message is determined to be the detection message added with the first mark, so that the controller receives at least one detection message added with the first mark sent by the outlet switch, and a forwarding path between the inlet switch and the outlet switch is determined according to an intermediate switch identifier carried in the at least one detection message added with the first mark and a pre-stored network topology structure.
The egress switch of the fourth aspect is configured to perform the methods in the embodiments of the third aspect and the third aspect.
In a seventh aspect, a network system is provided, where the network system includes: a controller, an ingress switch, an intermediate switch, and an egress switch;
the controller is used for sending N detection messages to the inlet switch, each detection message carries an intermediate switch identifier, N is equal to the number of the intermediate switches, the intermediate switch identifiers carried by different detection messages are different, and each intermediate switch identifier is used for uniquely identifying one intermediate switch;
the entrance switch is used for forwarding the detection message when receiving the detection message sent by the controller;
the intermediate switch is used for receiving the detection message from the inlet switch; judging whether the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch or not; if the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch, the intermediate switch adds a first mark to the detection message, and forwards the detection message added with the first mark;
the exit switch is used for receiving the detection message from the entrance switch; judging whether the detection message is the detection message added with the first mark; if the detection message is determined to be the detection message added with the first mark, the outlet switch sends the detection message added with the first mark to the controller;
the controller is configured to receive the detection packet sent by the egress switch and added with the first label, and acquire an intermediate switch identifier carried in the at least one detection packet added with the first label; and determining a forwarding path between the inlet switch and the outlet switch according to the acquired at least one intermediate switch identifier and a pre-stored network topology structure.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
sending N detection messages to an ingress switch through a controller, wherein each detection message carries an intermediate switch identifier, N is equal to the number of intermediate switches, and the intermediate switch identifiers carried by different detection messages are different, each intermediate switch identifier is used for uniquely identifying one intermediate switch, so that the ingress switch forwards at least one detection message, the intermediate switch on a forwarding path between the ingress switch and the egress switch adds a first mark to the received detection message and forwards the detection message when determining that the intermediate switch identifier in the received detection message is the same as the intermediate switch identifier at the local end, and only the egress switch reports the received detection message added with the first mark to the controller, and the controller can report the intermediate switch identifier carried in the at least one detection message added with the first mark and a pre-stored network topology structure according to the intermediate switch identifier carried in the detection message added with the first mark and the pre-stored network topology structure, the forwarding path between the entrance switch and the exit switch is determined, all intermediate switches on the forwarding path do not need to execute the operation of sending the matching success message to the controller, occupied equipment resources are saved, the implementation process is simplified, the pressure of the intermediate switches is reduced, and the flexibility is improved.
Furthermore, a first matching rule is issued to each intermediate switch through the controller, so that each intermediate switch can match the intermediate switch identifier carried in each received detection message with the intermediate switch identifier of the intermediate switch according to the first matching rule, the matching accuracy is improved, a first mark is added to the received detection message through the intermediate switch on the forwarding path when the matching is successful, the controller is convenient to determine the intermediate switch on the forwarding path according to the detection message to which the first mark is added, the mode of determining the intermediate switch on the forwarding path is expanded, and the flexibility is improved.
Furthermore, by acquiring the data messages with the number equal to that of the intermediate switches in the network topology structure and determining the intermediate switch identification corresponding to each data message according to the intermediate switch identification of each intermediate switch, the intermediate switch identification carried in the detection message can correspond to the intermediate switch identification of the intermediate switch one by one, so that the intermediate switches on the forwarding path can be accurately detected without omission, and the accuracy of detecting the forwarding path is improved;
furthermore, the priority carried in the detection message is modified into the preset priority to add the first mark to the detection message, so that the first mark can be carried out on the detection message without greatly modifying the detection message, the operation is simple and convenient, the marking efficiency is improved, and the flexibility is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below.
Fig. 1 is a schematic structural diagram of a network system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of another network system provided in the embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a controller according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an intermediate switch according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an egress switch according to an embodiment of the present invention;
fig. 6 is a flowchart of a method for detecting a forwarding path according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Fig. 1 is a schematic structural diagram of a network system according to an embodiment of the present invention. Referring to fig. 1, the network system 100 includes: a controller and a data center network. The data center network comprises a plurality of interconnected switches, wherein part of the switches can be used as an inlet switch to send messages, part of the switches can be used as an outlet switch to receive messages, and part of the switches can only be used as intermediate switches to forward the received messages.
Taking an ingress switch 101, at least one intermediate switch 102, and an egress switch 103 in a data center network as an example, referring to fig. 1, a plurality of intermediate switches 102 may be connected between the ingress switch 101 and the egress switch 103 to form a plurality of paths, and for a specific data flow, that is, for a certain quintuple, there is only one actual forwarding path between the ingress switch 101 and the egress switch 103, and when the ingress switch 101 is to send a message to the egress switch 103, the message may pass through the intermediate switches 102 on the forwarding path to reach the egress switch 103, and may not pass through other intermediate switches 102 in the data center network.
The controller 104 is configured to send N probe messages to the ingress switch 101, where each probe message carries an intermediate switch identifier, and N is equal to the number of intermediate switches in the data center network, and the intermediate switch identifiers carried by different probe messages are different.
The ingress switch 101 is configured to receive the N probe packets sent by the controller 104 and forward the N probe packets.
The intermediate switch 102 is configured to receive a probe packet from the ingress switch 101; judging whether the intermediate switch identifier carried in the detection message is the same as the intermediate switch identifier of the intermediate switch 102; if the intermediate switch identifier carried in the detection message is the same as the intermediate switch identifier of the intermediate switch 102, a first label is added to the detection message, and the detection message after the first label is added is forwarded.
The egress switch 103 is configured to receive the probe packet from the ingress switch 101; judging whether the detection message is the detection message added with the first mark; and if the detection message is determined to be the detection message added with the first mark, sending the detection message added with the first mark to the controller 104.
The controller 104 is further configured to receive at least one first-label-added probe packet sent by the egress switch 103, and obtain an intermediate switch identifier carried in the at least one first-label-added probe packet; and determining a forwarding path between the ingress switch 101 and the egress switch 103 according to the acquired at least one intermediate switch identifier and a pre-stored network topology.
Further, the network system may further include: underlay networks and overlay networks. The underlay network refers to a bottom-layer physical network in the data center network, and the overlay network refers to a virtual network superposed on the bottom-layer physical network in the data center network.
In practical applications, an underlay network usually consists of a series of switches that form a Fabric (physical network organization) in a spine/leaf (leaf/spine) manner.
For example, the underlay network may include at least one leaf switch, at least one spine switch, and at least one core switch. Among them, the leaf switch is usually configured at the Top of the server Rack, and is used as an access switch of the server Rack, also called Top-of-Rack (ToR) switch, that is, it can be used as an ingress switch or an egress switch; the spine switch is a switch which plays a role in aggregation (aggregation) for leaf switches, is generally deployed at an upper layer of the leaf switches, and is used for realizing a message routing or forwarding function between the leaf switches, namely serving as an intermediate switch; the core switch is a core layer switch, is a central switch of the whole network, is used for connecting and converging spine switches, and can also be used as an intermediate switch.
And the at least one leaf switch and the at least one spine switch are connected with each other, and the at least one spine switch and the at least one core switch are connected with each other, so that a plurality of paths can be formed between any two leaf switches.
For the two specific leaf switches, after the five-tuple is determined, only one actual forwarding path between the two specific leaf switches exists, and when one leaf switch in the two specific leaf switches is to send a message to the other leaf switch, the message may pass through a spine switch on the forwarding path, or a spine switch and a core switch on the forwarding path, and reach the other leaf switch.
Fig. 2 is a schematic structural diagram of another network system provided in an embodiment of the present invention, and referring to fig. 2, taking a data center network as an underlay network as an example, the network system 200 includes a controller and an underlay network, where the underlay network includes: virtual machines (VM for short) 1 and 2, leaf1 and leaf2, spine1, spine2, spine3 and spine4, core1, core2, core3 and core4, and a controller 201.
The VM1 is accessed to the leaf1, the VM2 is accessed to the leaf2, and the VM1 and the VM2 can communicate with each other through the respective accessed leaf switches. Moreover, it can be obviously known from the connection relationship of each switch shown in fig. 3 that multiple spine switches and multiple core switches between the leaf1 and the leaf2 form multiple paths, and after the five-tuple is determined, there is only one actual forwarding path between the leaf1 and the leaf2, so that when the leaf1 wants to send a packet to the leaf2 switch, the packet only passes through the spine switch located on the actual forwarding path among the spine1, spine2, spine3, and spine4, and passes through at least one spine switch and at least one core switch on the actual forwarding path, and reaches the leaf 2.
In order to probe the forwarding path between the leaf1 and the leaf2, in this embodiment of the present invention, the controller 201 may send at least one probe packet to the leaf1, and the intermediate switch on the forwarding path between the leaf1 and the leaf2 adds a first tag to the received probe packet. After receiving the probe packet added with the first label, the leaf2 may send the probe packet added with the first label to the controller 201, and the controller 201 may determine a forwarding path between the leaf1 and the leaf2 according to the intermediate switch identifier and the pre-stored network topology in the received probe packet added with the first label.
In addition, the data center Network may further include an overlay Network, which refers to a Virtual Network established on an underlay Network, and may be, for example, a Virtual extensible local Area Network (VXLAN) or the like. Thus, the data center network may preferably be a VXLAN-overlay network.
Fig. 3 is a schematic structural diagram of a controller according to an embodiment of the present invention, and referring to fig. 3, the controller includes: a receiver 301, a transmitter 302, a memory 303 and a processor 304, wherein the receiver 301, the transmitter 302 and the memory 303 are respectively connected to the processor 304, the memory 303 stores a program code, and the processor 304 is configured to call the program code to perform the following operations:
sending N detection messages to the ingress switch via the transmitter 302, each detection message carrying an intermediate switch identifier, N being equal to the number of intermediate switches and different detection messages carrying different intermediate switch identifiers, each intermediate switch identifier being used to uniquely identify an intermediate switch;
receiving, by a receiver 301, at least one detection message added with a first tag sent by an egress switch, and acquiring an intermediate switch identifier carried in the at least one detection message added with the first tag;
and determining a forwarding path between the inlet switch and the outlet switch according to the acquired at least one intermediate switch identifier and a pre-stored network topology structure.
Based on the underlay network shown in fig. 2, the controller may be the controller 201 in fig. 2, and to detect the forwarding path between the leaf1 and the leaf2, the controller 201 may send N probe messages to the leaf1, so that the ingress switch forwards the N probe messages, where each probe message carries one intermediate switch identifier (the intermediate switches include all leaf switches and core switches in fig. 2) and the intermediate switch identifiers carried by different probe messages are different, so that an intermediate switch on the forwarding path between the leaf1 and the leaf2 adds a first flag to the received probe message if it is determined that the intermediate switch identifier in the received probe message is the same as the intermediate switch identifier of the corresponding intermediate switch. Then, the controller 201 may obtain at least one intermediate switch identifier according to the probe packet reported by the leaf2 and added with the first label, and determine a forwarding path between the leaf1 and the leaf2 according to the obtained at least one intermediate switch identifier and a pre-stored network topology.
Further, the transmitter 302 may include a sending module, which may be configured to send the N probe messages to the ingress switch. The receiver 301 may include a receiving module, and the receiving module may be configured to receive at least one probe packet sent by the egress switch after adding the first label. The processor 304 may include a determining module, which may be configured to determine a forwarding path between an ingress switch and an egress switch according to the obtained at least one intermediate switch identifier and a pre-stored network topology.
Optionally, the processor 304 may further include an issuing module, configured to issue a first matching rule to each intermediate switch, where the first matching rule is used to specify that, if an intermediate switch identifier carried in a probe packet received by one intermediate switch is the same as an intermediate switch identifier of the intermediate switch, the intermediate switch adds a first flag to the received probe packet, and the first flag is used to instruct an egress switch to send the probe packet to which the first flag is added to the controller.
Fig. 4 is a schematic structural diagram of an intermediate switch provided in an embodiment of the present invention, and referring to fig. 4, the intermediate switch includes: a transceiver 401, a memory 402, and a processor 403. The transceiver 401 and the memory 402 are respectively connected to the processor 403, the memory 402 stores program codes, and the processor 403 is configured to call the program codes to perform the following operations:
receiving a detection message from an ingress switch through a transceiver 401, the detection message carrying an intermediate switch identifier;
judging whether the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch or not;
and if the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch, adding a first mark to the detection message, forwarding the detection message added with the first mark, so that the outlet switch receives the detection message added with the first mark, and sends the detection message added with the first mark to the controller.
Based on the underlay network shown in fig. 2, the intermediate switches may be spine switches and core switches in fig. 2. For example, if the intermediate switches on the forwarding path between the leaf1 and the leaf2 are spine1, core2, and spine3, after any switch among the spine1, core2, and spine3 receives the probe packet from the leaf1, it is determined whether the intermediate switch identifier carried in the probe packet is the same as the intermediate switch identifier of the local-end intermediate switch, and if so, a first flag is added to the probe packet, and the probe packet to which the first flag is added is forwarded. And the intermediate switch which is not on the forwarding path cannot receive the detection message and cannot add the first mark to the detection message.
Further, the transceiver 401 may include a receiving module, which may be configured to receive a probe packet from an ingress switch. The processor 403 may include a determining module and a first mark adding module, where the determining module is configured to determine whether the intermediate switch identifier carried in the probe packet is the same as the intermediate switch identifier of the intermediate switch. The first mark adding module is used for adding a first mark to the detection message if the intermediate switch identifier carried in the detection message is determined to be the same as the intermediate switch identifier of the intermediate switch. The transceiver 401 may include a sending module, which may be configured to forward the probe packet after adding the first label.
Optionally, the processor 403 may further include an obtaining module, where the obtaining module is configured to obtain a first matching rule, where the first matching rule is used to specify that, if an intermediate switch identifier carried in a probe packet received by an intermediate switch is the same as an intermediate switch identifier of the intermediate switch, the intermediate switch adds a first flag to the received probe packet, and the first flag is used to instruct an egress switch to send the probe packet to which the first flag is added to the controller.
Optionally, the first mark is a preset priority, and the first mark adding module is further configured to modify the priority carried in the probe packet to the preset priority, so as to add the first mark to the probe packet.
Fig. 5 is a schematic structural diagram of an egress switch provided in an embodiment of the present invention, and referring to fig. 5, the egress switch includes: a transceiver 501, a memory 502, and a processor 503. The transceiver 501 and the memory 502 are respectively connected to the processor 503, the memory 502 stores program codes, and the processor 503 is configured to call the program codes to perform the following operations:
receiving, by the transceiver 501, a probe packet from an ingress switch, where the probe packet carries an intermediate switch identifier;
judging whether the detection message is the detection message added with the first mark;
and if the detection message is determined to be the detection message added with the first mark, sending the detection message added with the first mark to the controller, so that the controller receives at least one detection message added with the first mark sent by the outlet switch, and determining a forwarding path between the inlet switch and the outlet switch according to an intermediate switch identifier carried in the at least one detection message added with the first mark and a pre-stored network topology structure.
Based on the underlay network shown in fig. 2, the egress switch may be a leaf switch in fig. 2. If the ingress switch is a leaf1, the egress switch is a leaf2, and the controller is the controller 201, the leaf2 may receive at least one probe packet from the leaf1, for each received probe packet, the leaf2 may determine whether the probe packet is a probe packet to which a first flag is added, and if it is determined that the probe packet is a probe packet to which a first flag is added, send the probe packet to which the first flag is added to the controller 201.
Further, the transceiver 501 may include a receiving module, which may be configured to receive a probe packet from an ingress switch. The processor 503 may include a determining module, configured to determine whether the probe packet is the probe packet after the first flag is added. The transceiver 501 may include a sending module, and the sending module may be configured to send the probe packet with the first label added to the controller if the probe packet is determined to be the probe packet with the first label added.
Optionally, the processor 503 may further include an obtaining module, where the obtaining module is configured to obtain a second matching rule, and the second matching rule is configured to specify that, if the probe packet received by the egress switch is the probe packet added with the first label, the egress switch sends the probe packet added with the first label to the controller.
Optionally, the first flag is a preset priority, and the determining module is further configured to determine whether the priority carried in the detection packet is the preset priority.
Fig. 6 is a flowchart of a method for detecting a forwarding path according to an embodiment of the present invention, and as shown in fig. 6, the interaction subjects of the method for detecting a forwarding path are a controller, an ingress switch, an intermediate switch, and an egress switch, and the method includes the following steps:
601. the controller sends N probe messages to the ingress switch.
In the embodiment of the present invention, a switch for forwarding a packet in a data center network is referred to as an intermediate switch, and in practical applications, for a given ingress switch and egress switch, a plurality of intermediate switches are generally configured between the ingress switch and the egress switch, and the plurality of intermediate switches are connected to each other, so that a plurality of paths are formed between the ingress switch and the egress switch. However, in practice, there is only one forwarding path for a specific five-tuple between the ingress switch and the egress switch, and in order to manage the data center network, the forwarding path between the ingress switch and the egress switch needs to be probed.
Considering that each intermediate switch in the data center network may be configured with a different intermediate switch identifier, the intermediate switch identifier may be used to determine a unique intermediate switch, and a packet sent from an ingress switch to an egress switch may only reach the egress switch through an intermediate switch on a forwarding path between the ingress switch and the egress switch, but may not pass through other intermediate switches. Therefore, in order to track the intermediate switch on the forwarding path to detect the forwarding path, the intermediate switch may forward the detection message, and make the detection message carry the intermediate switch identifier, so that the intermediate switch that receives the detection message marks the detection message when determining that the intermediate switch identifier carried in the detection message is the same as the intermediate switch identifier of the local terminal, and then the intermediate switch indicated by the intermediate switch identifier carried in the detection message after the mark is added is the intermediate switch on the forwarding path, and the intermediate switch indicated by the intermediate switch identifier carried in the detection message without the mark is the intermediate switch not on the forwarding path, and the forwarding path may be detected according to the intermediate switch on the forwarding path.
Therefore, in the embodiment of the present invention, the controller may obtain N probe packets according to the intermediate switches in the data center network and the intermediate switch identifier of each intermediate switch, and send the N probe packets to the ingress switch, so that the ingress switch sends the N probe packets to the egress switch. Then, in the process of sending the N probe packets from the ingress switch to the egress switch, the N probe packets all pass through a plurality of intermediate switches on a forwarding path between the ingress switch and the egress switch and reach the egress switch.
Each of the N detection messages carries an intermediate switch identifier, where N is equal to the number of intermediate switches and the intermediate switch identifiers carried by different detection messages are different, that is, the intermediate switch identifiers carried by the N detection messages correspond to the intermediate switch identifiers of each intermediate switch in the data center network one to one.
For example, based on fig. 2, the Underlay network includes 8 intermediate switches, and the intermediate Switch identifications Switch ids are Switch1 to Switch8, respectively. Correspondingly, the controller may send 8 probe messages to the ingress Switch, where the 8 probe messages carry Switch 1-Switch 8, respectively.
Each intermediate switch identifier is used to uniquely identify one intermediate switch, and the intermediate switch identifier may be an IP address or an equipment number of the intermediate switch.
Prior to this step 601, the controller may assign all intermediate switches in the data center network with different intermediate switch identifications in advance in order to facilitate determination of the intermediate switches on the forwarding path. For example, the controller may predetermine a range of intermediate switch identifications, select one intermediate switch identification for each intermediate switch in turn from the range according to the number of intermediate switches included in the data center network, and ensure that the intermediate switch identifications of different intermediate switches are different. After the distribution is completed, the controller may issue a corresponding intermediate switch identifier to each intermediate switch through an interface with the data center network.
The controller may respectively allocate the intermediate switch identifiers to the plurality of intermediate switches by using a preset allocation algorithm, where the preset allocation algorithm may be a Hash algorithm, a message authentication code (message authentication code) algorithm, or other algorithms, and may be selected from a range of SwitchID 1 to 65535 in the allocation process. In addition, the controller may issue a corresponding switch id to each intermediate switch through a management interface such as Netconf, and configure the corresponding switch id to each intermediate switch, which is not limited in this embodiment of the present invention.
In addition, in order to ensure that the detection message can be successfully sent from the ingress switch to the egress switch, each detection message may also carry the device information of the ingress switch and the device information of the egress switch. The device information of the ingress switch may include an IP address, a port, a Media Access Control (MAC) address, a device number, a switch identifier, and the like of the ingress switch, and may also include other device information of the ingress switch, and the device information of the egress switch may include an IP address, a port, a MAC address, a device number, a switch identifier, and the like of the egress switch, and may also include other device information of the egress switch, which are not limited in this embodiment of the present invention.
In a possible implementation manner, before sending N detection messages to the ingress switch to be detected, the controller may first obtain device information of the ingress switch to be detected and device information of the egress switch to be detected, and obtain N data messages, where the number of the N data messages is equal to the number of intermediate switches in the network topology of the data center network. Then, the controller may determine an intermediate switch identifier corresponding to each data packet according to the intermediate switch identifier of each intermediate switch, and encapsulate each data packet of the N data packets according to the intermediate switch identifier corresponding to each data packet, the device information of the ingress switch, and the device information of the egress switch, to obtain the N detection packets.
For example, the controller may acquire a five-tuple including a source IP address (IP address of the ingress switch), a source port (port of the ingress switch), a destination IP address (IP address of the egress switch), a destination port (port of the egress switch), and a transport layer protocol according to the ingress switch and the egress switch to be detected, and acquire the N datagrams. Then, the controller may encapsulate each data packet of the N data packets according to the intermediate switch identifier and the quintuple corresponding to each data packet to obtain the N detection packets, and each detection packet may carry the corresponding intermediate switch identifier and the quintuple.
Taking a VXLAN network as an example, when the VXLAN technology is used to encapsulate the N data messages, an outer header is added to each data message, so as to obtain N VXLAN detection messages. In the process of encapsulating each data packet, the controller may extend an identification field from a field reserved in the outer header, where the identification field may be used to carry the acquired identifier of the intermediate switch. For example, if the outer header encapsulated by VXLAN includes a reserved field of 24 bits, 16 bits of the reserved field can be used as an identification field to carry the intermediate switch identification. Therefore, the reserved field of the encapsulated message can be reasonably utilized, and the resource utilization rate is improved.
602. And the entrance switch receives the N detection messages sent by the controller and forwards the N detection messages.
For example, the ingress switch may obtain a five-tuple carried by each of the N probe packets, and forward the N probe packets according to the five-tuple.
It should be noted that, the embodiment of the present invention is only an example in which the ingress switch receives the probe packet sent by the controller, and in practical application, the ingress switch may further obtain the probe packet by encapsulating the data packet.
603. And any intermediate switch on the forwarding path receives the detection message from the entrance switch and judges whether the intermediate switch identifier carried in the detection message is the same as the intermediate switch identifier of the intermediate switch.
After the ingress switch forwards the at least one detection message, any intermediate switch on the forwarding path receives the at least one detection message from the ingress switch, and can also forward the at least one detection message according to the device information of the egress switch carried in the at least one detection message.
In order to facilitate the subsequent controller to determine the intermediate switch that receives the detection message, when any intermediate switch on the forwarding path receives the detection message, each received detection message is not directly forwarded, and it is determined whether the intermediate switch identifier carried in the detection message is the same as the intermediate switch identifier of any intermediate switch.
604. If the intermediate switch identifier carried in the detection packet is the same as the intermediate switch identifier of the intermediate switch, the intermediate switch adds the first label to the detection packet, forwards the detection packet with the first label added to the next intermediate switch on the forwarding path, and continues to execute the above steps 603 and 604 by the next intermediate switch until at least one detection packet is forwarded to the egress switch.
In another possible implementation manner, if the intermediate switch identifier carried in the probe packet is different from the intermediate switch identifier of the intermediate switch, the intermediate switch will not perform the operation of adding the first label to the probe packet, and only forward the probe packet to the next intermediate switch on the forwarding path, and the next intermediate switch continues to perform the above step 603 and 604 until at least one probe packet is forwarded to the egress switch.
It should be noted that, in the embodiment of the present invention, the example that the forwarding path of the ingress switch and the egress switch includes a plurality of intermediate switches is only used as an example for description, and in practical application, if the forwarding path includes only one intermediate switch, and a next switch of the intermediate switch is an egress switch, the intermediate switch adds the first flag to the probe packet, and then the probe packet to which the first flag is added may be directly forwarded to the egress switch.
In the embodiment of the present invention, before step 603-. Then, when each intermediate switch on the forwarding path receives the probe packet, step 603 and step 604 can be executed according to the first matching rule.
For example, the controller may issue an ACL matching rule to all switches in the data center network, where the ACL matching rule includes an intermediate switch identifier corresponding to an intermediate switch, and the ACL matching rule is used to specify, for each switch: and if the intermediate switch identification carried in the received detection message is matched with the intermediate switch identification in the ACL matching rule, adding a first mark to the received detection message. Each intermediate switch in the data center network may obtain the first matching rule issued by the controller, and when any one of the N detection messages from the ingress switch is received, the intermediate switches carried in the received detection message may be matched according to the obtained first matching rule.
605. And the outlet switch receives the detection message from the inlet switch, judges whether the detection message is the detection message added with the first mark, and sends the detection message added with the first mark to the controller if the detection message is determined to be the detection message added with the first mark.
Before step 605, the controller may also issue a second matching rule to the egress switch, and the egress switch may obtain the second matching rule and match the received probe packet according to the second matching rule. The second matching rule is used for stipulating that if the detection message received by the outlet switch is the detection message added with the first mark, the outlet switch sends the detection message added with the first mark to the controller.
In a possible implementation manner, the detection packet may carry a priority, and the first flag may be a preset priority, and the intermediate switch on the forwarding path determines that the intermediate switch identifier carried in the received detection packet is the same as the intermediate switch identifier of the intermediate switch, and may modify the priority carried in the received detection packet to the preset priority, so as to add the first flag to the detection packet. Correspondingly, in the process that the outlet switch receives the N detection messages from the inlet switch, for each received detection message, whether the priority carried in the detection message is the preset priority or not can be judged, and if the priority carried in the detection message is determined to be the preset priority, the received detection message can be determined to be the detection message added with the first mark.
Further, the egress switch may match the detection packet carrying the preset priority through an ACL technique, that is, the egress switch may obtain the priority carried in each received detection packet, match the obtained priority with the preset priority, and determine that the received detection packet is the detection packet to which the first flag is added if the matching is successful. The preset priority may be 5, 6, 9, and the like, which is not limited in the embodiment of the present invention. And in order to ensure the detection accuracy, the initial priority of each detection message is different from the preset priority.
For example, taking the preset priority as 6 as an example, when it is determined that the identifier of the intermediate switch in the received probe packet is the same as the identifier of the intermediate switch corresponding to the intermediate switch, any intermediate switch on the forwarding path may modify the priority carried in the probe packet to 6, and forward the probe packet. When the outlet switch receives at least one detection message from the inlet switch, for each received detection message, the detection message with the priority of 6 can be matched and carried through an ACL technology, and the detection message with the priority of 6 is reported to the controller.
606. The controller receives at least one detection message which is sent by the outlet switch and added with the first mark, and obtains an intermediate switch mark carried in the at least one detection message which is added with the first mark.
607. And the controller determines a forwarding path between the inlet switch and the outlet switch according to the acquired at least one intermediate switch identifier and a pre-stored network topology structure.
If a certain detection message is the detection message added with the first mark, it indicates that the detection message passes through the intermediate switch indicated by the carried intermediate switch identifier, that is, the intermediate switch is the intermediate switch on the forwarding path, so that the controller can obtain the intermediate switch identifier carried in the at least one detection message added with the first mark, and can determine the at least one intermediate switch located on the forwarding path according to the obtained at least one intermediate switch identifier. Then, the controller may determine the position of the at least one intermediate switch in the network topology and the connection relationship between the at least one intermediate switch and the network topology according to a pre-stored network topology, so as to determine the forwarding path between the ingress switch and the egress switch.
For example, referring to fig. 2, based on 601, for example, if the intermediate switches on the forwarding path between the leaf1 and the leaf2 are spine1, core2, and spine3, any one of the spine1, core2, and spine3 may receive 8 probe messages from the ingress switch, determine, for each received probe message, whether a switch id carried by the probe message is the same as the switch id of the intermediate switch, and if so, add a first flag to the probe message so as to identify that the intermediate switch is located on the forwarding path, and forward the probe message to which the first flag is added. Then, there are 3 probe messages with the first label added in the 8 probe messages, and the intermediate switch identifiers carried by the 3 probe messages with the first label added are the intermediate switch identifiers of spine1, core2, and spine 3. After the egress switch receives 8 detection messages, it may report 3 detection messages added with the first label to the controller. The controller may obtain the SwitchID carried in the 3 detection messages to which the first flag is added according to the 3 detection messages to which the first flag is added, and may further determine that the intermediate switch on the forwarding path includes spine1, core2, and spine3 according to the obtained SwitchID. Then, the controller may determine, according to the pre-stored network topology, that the forwarding path between the leaf1 and the leaf2 is: leaf1-spine1-core2-spine3-leaf 2.
It should be noted that, in the embodiment of the present invention, only given ingress switches and egress switches are taken as examples to describe the method for detecting forwarding paths between ingress switches and egress switches, and in practical applications, the method may be used to detect forwarding paths between any ingress switch and any egress switch, which is not described herein again.
To sum up, in the method for detecting a forwarding path provided in the embodiments of the present invention, a controller sends N detection messages to an ingress switch, where each detection message carries an intermediate switch identifier, where N is equal to the number of intermediate switches and the intermediate switch identifiers carried by different detection messages are different, and each intermediate switch identifier is used to uniquely identify one intermediate switch, so that the ingress switch forwards N detection messages, and an intermediate switch on a forwarding path between the ingress switch and the egress switch, when determining that the intermediate switch identifier in a received detection message is the same as the intermediate switch identifier at a local end, adds a first tag to the received detection message and forwards the detection message, only the egress switch needs to report the received detection message added with the first tag to the controller, and the controller can report the received detection message added with the first tag to the controller according to at least one intermediate switch identifier carried in the detection message added with the first tag and a pre-stored network topology The structure determines the forwarding path between the inlet switch and the outlet switch, and all intermediate switches on the forwarding path do not need to execute the operation of sending the matching success message to the controller, so that the occupied equipment resources are saved, the implementation process is simplified, the pressure of the intermediate switches is reduced, and the flexibility is improved. Moreover, a mechanism of adding the first mark by depending on the intermediate switches in the data plane avoids the operation of reporting the matching success message by each intermediate switch, reduces the impact on a Central Processing Unit (CPU) of the intermediate switch, and saves network resources.
In addition, according to the method provided by the embodiment of the invention, the controller can detect the forwarding paths between different inlet switches and different outlet switches only by configuring the intermediate switch identifiers for all the switches in the data center network once, and does not need to configure different five-tuple-based ACL matching rules for all the switches aiming at different inlet switches and different outlet switches, so that the operation flow of the controller is simplified, the controller resources are saved, and the detection efficiency is improved. Furthermore, each intermediate switch only needs to match the intermediate switch identifier carried in the detection message, and does not need to match the quintuple, so that the matching content is simplified, the matching efficiency is improved, and the pressure of the intermediate switches is reduced.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (17)

1. A method of probing a forwarding path, the method comprising:
the method comprises the steps that a controller sends N detection messages to an entrance switch, each detection message carries an intermediate switch identifier and a priority, N is equal to the number of the intermediate switches, the intermediate switch identifiers carried by different detection messages are different, and each intermediate switch identifier is used for uniquely identifying one intermediate switch;
the controller receives at least one detection message which is sent by an outlet switch and added with a first mark, and acquires an intermediate switch identifier carried in the at least one detection message added with the first mark; the detection message added with the first mark is a detection message which carries a priority modified into a preset priority;
and the controller determines a forwarding path between the inlet switch and the outlet switch according to the acquired at least one intermediate switch identifier and a pre-stored network topology structure.
2. The method of claim 1, wherein before the controller sends the N probe messages to the ingress switch, the method further comprises:
the controller issues a first matching rule to each intermediate switch, wherein the first matching rule is used for stipulating that if an intermediate switch identifier carried in a detection message received by one intermediate switch is the same as an intermediate switch identifier of the intermediate switch, the intermediate switch adds a first mark to the received detection message, and the first mark is used for indicating an outlet switch to send the detection message added with the first mark to the controller.
3. A method of probing a forwarding path, the method comprising:
the intermediate switch receives a detection message from the inlet switch, wherein the detection message carries an intermediate switch identifier and a priority;
the intermediate switch judges whether the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch or not;
and if the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch, the intermediate switch modifies the priority carried in the detection message into a preset priority to add a first mark to the detection message, and forwards the detection message added with the first mark, so that the outlet switch receives the detection message added with the first mark and sends the detection message added with the first mark to a controller.
4. The method of claim 3, wherein the method comprises:
the intermediate switch acquires a first matching rule, wherein the first matching rule is used for stipulating that if an intermediate switch identifier carried in a detection message received by one intermediate switch is the same as an intermediate switch identifier of the intermediate switch, the intermediate switch adds a first mark to the received detection message, and the first mark is used for indicating an outlet switch to send the detection message added with the first mark to the controller.
5. The method according to claim 3 or 4, wherein the first flag is a preset priority, and the adding the first flag to the probe packet comprises:
and modifying the priority carried in the detection message into the preset priority to add the first mark to the detection message.
6. A method of probing a forwarding path, the method comprising:
an exit switch receives a detection message from an entrance switch, wherein the detection message carries an intermediate switch identifier and a priority;
the outlet switch judges whether the detection message is the detection message added with the first mark, wherein the detection message added with the first mark is the detection message with the priority modified into the preset priority;
if the detection message is determined to be the detection message added with the first mark, the outlet switch sends the detection message added with the first mark to a controller, so that the controller receives at least one detection message added with the first mark sent by the outlet switch, and a forwarding path between the inlet switch and the outlet switch is determined according to an intermediate switch identifier carried in the at least one detection message added with the first mark and a pre-stored network topology structure.
7. The method of claim 6, further comprising:
the outlet switch acquires a second matching rule, wherein the second matching rule is used for stipulating that if the detection message received by the outlet switch is the detection message added with the first mark, the outlet switch sends the detection message added with the first mark to the controller.
8. The method of claim 7, wherein the first flag is a preset priority, and the determining, by the egress switch, whether the probe packet is a probe packet with the first flag added comprises:
and the exit switch judges whether the priority carried in the detection message is the preset priority or not.
9. A controller, characterized in that the controller comprises:
the system comprises a sending module, a receiving module and a judging module, wherein the sending module is used for sending N detection messages to an entrance switch, each detection message carries an intermediate switch identifier and a priority, N is equal to the number of the intermediate switches, the intermediate switch identifiers carried by different detection messages are different, and each intermediate switch identifier is used for uniquely identifying one intermediate switch;
the receiving module is used for receiving at least one detection message which is sent by an outlet switch and added with a first mark, and acquiring an intermediate switch identifier carried in the at least one detection message which is added with the first mark; the detection message added with the first mark is a detection message which carries a priority modified into a preset priority;
and the determining module is used for determining a forwarding path between the inlet switch and the outlet switch according to the acquired at least one intermediate switch identifier and a pre-stored network topology structure.
10. The controller of claim 9, further comprising:
the system comprises an issuing module and a controller, wherein the issuing module is used for issuing a first matching rule to each intermediate switch, the first matching rule is used for stipulating that if an intermediate switch identifier carried in a detection message received by one intermediate switch is the same as the intermediate switch identifier of the intermediate switch, the intermediate switch adds a first mark to the received detection message, and the first mark is used for indicating an outlet switch to send the detection message added with the first mark to the controller.
11. An intermediate switch, characterized in that the intermediate switch comprises:
the receiving module is used for receiving a detection message from an entrance switch, wherein the detection message carries an intermediate switch identifier and a priority;
the judging module is used for judging whether the intermediate switch identifier carried in the detection message is the same as the intermediate switch identifier of the intermediate switch or not;
a first mark adding module, configured to modify a priority carried in the detection message to a preset priority if it is determined that an intermediate switch identifier carried in the detection message is the same as an intermediate switch identifier of the intermediate switch, so as to add a first mark to the detection message;
and the sending module is used for forwarding the detection message added with the first mark, so that the outlet switch receives the detection message added with the first mark and sends the detection message added with the first mark to the controller.
12. The intermediate switch of claim 11, wherein the intermediate switch comprises:
the acquisition module is used for acquiring a first matching rule, wherein the first matching rule is used for stipulating that if an intermediate switch identifier carried in a detection message received by an intermediate switch is the same as the intermediate switch identifier of the intermediate switch, the intermediate switch adds a first mark to the received detection message, and the first mark is used for indicating an outlet switch to send the detection message added with the first mark to the controller.
13. The intermediate switch according to claim 11 or 12, wherein the first flag is a preset priority, and the first flag adding module is further configured to modify the priority carried in the probe packet to the preset priority, so as to add the first flag to the probe packet.
14. An egress switch, comprising:
the receiving module is used for receiving a detection message from an entrance switch, wherein the detection message carries an intermediate switch identifier and a priority;
the judging module is used for judging whether the detection message is the detection message added with the first mark, wherein the detection message added with the first mark refers to the detection message with the priority modified into the preset priority;
and the sending module is used for sending the detection message added with the first mark to a controller if the detection message is determined to be the detection message added with the first mark, so that the controller receives at least one detection message added with the first mark sent by the outlet switch, and a forwarding path between the inlet switch and the outlet switch is determined according to an intermediate switch identifier carried in the at least one detection message added with the first mark and a pre-stored network topology structure.
15. The egress switch of claim 14, wherein the egress switch further comprises:
an obtaining module, configured to obtain a second matching rule, where the second matching rule is used to specify that, if the detection packet received by the egress switch is a detection packet added with a first tag, the egress switch sends the detection packet added with the first tag to the controller.
16. The egress switch of claim 15, wherein the first flag is a preset priority, and the determining module is further configured to determine whether the priority carried in the probe message is the preset priority.
17. A network system, characterized in that the network system comprises: a controller, an ingress switch, an intermediate switch, and an egress switch;
the controller is used for sending N detection messages to the entrance switch, each detection message carries an intermediate switch identifier and a priority, N is equal to the number of the intermediate switches, the intermediate switch identifiers carried by different detection messages are different, and each intermediate switch identifier is used for uniquely identifying one intermediate switch;
the entrance switch is used for forwarding the detection message when receiving the detection message sent by the controller;
the intermediate switch is used for receiving the detection message from the inlet switch; judging whether the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch or not; if the intermediate switch identification carried in the detection message is the same as the intermediate switch identification of the intermediate switch, the intermediate switch modifies the priority carried in the detection message into a preset priority, adds a first mark to the detection message, and forwards the detection message added with the first mark;
the exit switch is used for receiving the detection message from the entrance switch; judging whether the detection message is the detection message added with the first mark; if the detection message is determined to be the detection message added with the first mark, the outlet switch sends the detection message added with the first mark to the controller;
the controller is configured to receive the detection packet sent by the egress switch and added with the first label, and acquire an intermediate switch identifier carried in the detection packet added with the first label; and determining a forwarding path between the inlet switch and the outlet switch according to the acquired at least one intermediate switch identifier and a pre-stored network topology structure.
CN201610176681.6A 2016-03-25 2016-03-25 Method, equipment and network system for detecting forwarding path Active CN107231321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610176681.6A CN107231321B (en) 2016-03-25 2016-03-25 Method, equipment and network system for detecting forwarding path

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610176681.6A CN107231321B (en) 2016-03-25 2016-03-25 Method, equipment and network system for detecting forwarding path

Publications (2)

Publication Number Publication Date
CN107231321A CN107231321A (en) 2017-10-03
CN107231321B true CN107231321B (en) 2020-06-16

Family

ID=59932859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610176681.6A Active CN107231321B (en) 2016-03-25 2016-03-25 Method, equipment and network system for detecting forwarding path

Country Status (1)

Country Link
CN (1) CN107231321B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111835575B (en) * 2020-08-07 2021-12-17 迈普通信技术股份有限公司 Method and device for preventing equipment from being disconnected, electronic equipment and storage medium
CN111817965B (en) * 2020-09-10 2020-12-22 鹏城实验室 Message track tracking method, system and computer readable storage medium
CN112769632A (en) * 2020-11-30 2021-05-07 锐捷网络股份有限公司 Method and system for detecting network fault of data center

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4434867B2 (en) * 2004-07-15 2010-03-17 富士通株式会社 MPLS network system and node
CN102437931B (en) * 2011-12-29 2015-07-08 华为技术有限公司 Detection method and device of service path
CN102857416B (en) * 2012-09-18 2016-09-28 中兴通讯股份有限公司 A kind of realize the method for virtual network, controller and virtual network
US9300483B2 (en) * 2013-03-15 2016-03-29 International Business Machines Corporation Self-routing multicast in a software defined network fabric
CN103312547B (en) * 2013-06-18 2016-06-29 华为技术有限公司 Communication means, Apparatus and system
CN103401726B (en) * 2013-07-19 2016-12-07 华为技术有限公司 Network path detection method and device, system
CN104301912B (en) * 2014-09-28 2018-04-13 北京盈进科技有限公司 A kind of detection method and device of path break-make

Also Published As

Publication number Publication date
CN107231321A (en) 2017-10-03

Similar Documents

Publication Publication Date Title
US10452422B2 (en) Method and apparatus for deploying virtual machine instance, and device
CN106612211B (en) Path detection method, controller and network equipment in VxLAN
US9548919B2 (en) Transparent network service header path proxies
KR102569305B1 (en) Data message detection method, device and system
CN108111432B (en) Message forwarding method and device
CN105284080B (en) The virtual network management method and data center systems of data center
CN110995583B (en) Path detection method, path detection device and computer storage medium
CN108156046B (en) Distributed routing detection method and device
CN106685903B (en) SDN-based data transmission method, SDN controller and SDN system
CN105812197A (en) Bit-forwarding ingress router, bit-forwarding router and operation administration maintenance detection method
CN108965204B (en) Method and device for automatically realizing IOAM packaging
CN107231321B (en) Method, equipment and network system for detecting forwarding path
US20160315879A1 (en) Virtual node having separate control and data planes
CN109756419B (en) Routing information distribution method and device and RR
CN108039968B (en) Network optimization method, device and computer readable storage medium
CN105763463B (en) Method and device for transmitting link detection message
CN107896188B (en) Data forwarding method and device
CN113810295A (en) Path detection method, device and system
CN106878202B (en) Message processing method and device
CN107566143B (en) Longitudinal stacking discovery method and device
WO2023072158A1 (en) Identifier generation method, in-situ flow detection method and communication device
CN114205282B (en) SRv6 Policy scheduling method, system, router and controller
CN107172009B (en) Method for uploading VLAN information to application module through socket
CN106533882B (en) Message processing method and device
US11876643B2 (en) Allocation and management of tunnel endpoints in software defined networks

Legal Events

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