CN112350948B - Distributed network tracing method of SDN-based distributed network tracing system - Google Patents

Distributed network tracing method of SDN-based distributed network tracing system Download PDF

Info

Publication number
CN112350948B
CN112350948B CN202011174875.5A CN202011174875A CN112350948B CN 112350948 B CN112350948 B CN 112350948B CN 202011174875 A CN202011174875 A CN 202011174875A CN 112350948 B CN112350948 B CN 112350948B
Authority
CN
China
Prior art keywords
switch
flow table
data packet
global controller
path
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
CN202011174875.5A
Other languages
Chinese (zh)
Other versions
CN112350948A (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.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN202011174875.5A priority Critical patent/CN112350948B/en
Publication of CN112350948A publication Critical patent/CN112350948A/en
Application granted granted Critical
Publication of CN112350948B publication Critical patent/CN112350948B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/146Tracing the source of attacks

Abstract

The invention discloses a distributed network tracing system and method based on an SDN. The invention realizes topology acquisition with low energy consumption and route forwarding based on load balancing through network design; the invention realizes label marking and path backtracking through a backtracking method, labels are added to each data packet in the label marking stage, and the forwarding path of the data packet is reconstructed through extracting the label information segment in the path backtracking stage, so that the network backtracking with fine granularity and high accuracy is directly and accurately realized. The invention reduces resource consumption, realizes load balance, improves network performance, and realizes fine-grained and high-accuracy network tracing. The network tracing is an effective means for maintaining the network security, and the design and implementation of the traceable network provide a good environment for the deployment of the subsequent network security mechanism.

Description

Distributed network tracing method of SDN-based distributed network tracing system
Technical Field
The invention relates to the technical field of computer network management, in particular to a distributed network tracing method of a distributed network tracing system based on an SDN (software defined network).
Background
With the development of information technology, the network scale in the world is larger and larger, the network traffic is more and more, and the network structure is more and more complex. The traditional network architecture has poor adaptability and low service efficiency due to dispersed network control, complex network cooperation, closed network equipment and independent network protocols. The traditional network has great difficulty in network management and difficult innovation in providing network services for users. Therefore, a new network architecture sdn (software Defined network) comes into force.
Under the network environment of the traditional network, the source tracing of the data packet is difficult. While SDN is a novel network architecture which can be flexibly programmed and deployed, the core idea of the SDN is that a control plane is separated from a forwarding plane. Centralized control and distributed forwarding principles enable SDNs to be intelligent and simplify network management in the face of drastic network protocol changes and new algorithms that are evolving endlessly. Therefore, the research on network tracing in the SDN architecture has operability and research prospect.
The network tracing refers to tracing back a flow route of a data packet in a network by various methods by using the relevant information of the captured data packet. The network tracing technology can play a role in many fields, for example, in the aspect of network security, the network tracing technology can find an attack source through tracing back a path of a data packet, and positioning of an attacker is realized, so that the network tracing technology is an effective means for maintaining network security. The network tracing technology can be used for tracing attack sources, and can also be applied to the aspect of real-time positioning of data, namely, for some data in the network, the forwarding path information of the data can be obtained in real time through the combination of the tracing technology and other technologies. Therefore, the network tracing technology has great potential application value.
SDN originated from the research topic of stanford university in 2006, and the concept of network tracing appeared early, but network tracing research under the SDN architecture started in recent years.
Since the day the SDN concept was generated, the theory and practice of the architecture has continued to develop and advance, and the controller has an overall design throughout the day that SDN has the advantages of planning network deployment and flexibly managing networks. In addition, as a technology supported by network virtualization, software-defined networking has responded better to the appeal of big data research and cloud computing development.
With the development of the internet, the problem of network security becomes more prominent, and it becomes a major task to construct a secure and reliable internet. The design and implementation of the SDN-based distributed traceable network are a solution with foresight.
Disclosure of Invention
In order to solve the technical problem, the invention provides a distributed network tracing method of a distributed network tracing system based on an SDN.
The SDN distributed network tracing system comprises: the system comprises a global controller, a traceability controller, a plurality of switches and a plurality of hosts;
the global controller is sequentially connected with the switch in a wired mode respectively; the switches and the host are connected through fat tree network topology;
defining the switch connected to the host as an edge switch;
the tracing controller is connected with each edge switch in sequence in a wired mode.
The invention discloses a distributed network tracing method of a distributed network tracing system based on an SDN. The topology acquisition with low energy consumption and the route forwarding based on load balancing are realized through network design; the label marking and the path backtracking are realized through the source tracing method.
The distributed network tracing method comprises the following steps:
step 1: and the global controller sends the flow table items to each switch and guides the switches to feed back the link information. The method comprises the steps that a global controller sends a message for link discovery to each switch, the switches analyze the link discovery message sent by the global controller, flow table item matching is carried out on an OpenFlow flow table of the switches according to the information obtained by analysis, further forwarding of feedback messages is carried out according to the content of the matched flow table items, the global controller realizes discovery of links between the switches according to the received feedback messages, and finally construction of network topology is realized, and the global controller regularly calls a topology acquisition module to update a stored topology structure in time;
step 2: after a data flow reaches a switch, the switch performs flow table item matching on an OpenFlow flow table of the switch according to data flow information, if the data flow is matched with the flow table item, data is processed according to the content of the flow table item, if the data flow is not matched with the flow table item, a global controller is informed to issue the flow table item, after a network topology is obtained by the global controller, a forwarding strategy of the data packet is designed by integrating hop count, effective bandwidth, packet loss rate and time delay, a route forwarding strategy designed by the global controller is issued to the switch in the form of the flow table item, and the switch is provided with the flow table item issued by the global controller and performs route forwarding on the data flow according to the content of the flow table item;
and step 3: the global controller formulates a strategy for adding labels to the data packets, and issues the strategy of label marking and the route forwarding strategy in the step 2 to the non-edge switch in a form of flow table items, and the global controller formulates a strategy for clearing label fields of the data packets; the global controller issues the strategy of adding labels to the data packets, the strategy of clearing label fields of the data packets and the routing forwarding strategy in the step 2 to the edge switch together in the form of flow table items; the switch is provided with a flow table item issued by the global controller and processes data according to the content of the flow table item;
and 4, step 4: the tracing controller issues a flow table item to each edge switch to guide the edge switches to send tracing information; and the switch is provided with the flow table rule issued by the tracing controller, when a data packet to be traced is received, the switch matches the flow table items issued by the tracing controller, sends a tracing message to the tracing controller according to the content of the flow table items, then matches the flow table items issued by the global controller in the step 2 and the step 3, clears the label field of the data packet, and forwards the data packet to the target host. And the tracing controller receives the tracing message, extracts the label field of the data packet, reconstructs a path for the data packet and finishes path tracing.
Preferably, in step 1, the global controller issues a flow entry to each switch, and instructs the switch to forward feedback link information as follows:
the global controller issues a flow table entry item _ topo1 to each switch, and the flow table rule is as follows: if receiving the link discovery message sent from the global controller, sending the feedback message from the sending port; the link discovery message includes: switch identification information of a source switch of a link to be discovered; the feedback message includes: switch identification information and port identification information of a source switch of a link to be discovered;
the global controller issues a flow table entry item _ topo2 to each switch, and the flow table rule is as follows: if receiving the feedback message sent from the switch, sending the received feedback message to the global controller;
each switch installs the flow table rule;
step 1, the global controller sends a message for link discovery to each switch, where the message is:
the global controller sends a link discovery message to each switch to realize link discovery, wherein the link discovery message comprises: switch identification information of a source switch of a link to be discovered;
the switch in step 1 analyzes the link discovery message sent by the global controller, performs flow entry matching on its own OpenFlow flow table according to the information obtained by the analysis, and further forwards the feedback message according to the content of the matched flow entry:
the switch receives a link discovery message from the global controller, matches the flow table rule of the flow table entry item _ topo1, and sends a feedback message from the sending port, where the feedback message includes: switch identification information and port identification information of a source switch of a link to be discovered;
the switch receives the feedback message from the switch, matches the flow table rule of the flow table item _ topo2, and sends the received feedback message to the global controller;
step 1, the global controller realizes discovery of the link between the switches according to the received feedback message, and finally realizes construction of network topology as follows:
the global controller receives feedback messages, wherein one feedback message comprises link information, and the switch identification information and the port identification information of the source switch of each link are obtained by analyzing each feedback message. And obtaining the switch identification information and the port identification information of the target switch of each link according to the source of each feedback message.
The global controller extracts link information in all feedback messages to realize the acquisition of the whole network topology;
preferably, after the data flow in step 2 reaches the switch, the switch performs flow entry matching on its own OpenFlow flow table according to the data flow information, if the flow entry is matched, the data is processed according to the content of the flow entry, and if the flow entry is not matched, the global controller is notified to issue a flow entry as follows:
each switch maintains a flow table of the switch, the global controller issues an operation scheme for the data to the switch in a flow table item mode, the switch receives the flow table item, the flow table item is installed in the flow table of the switch, and then the switch determines the operation for the data according to the flow table maintained at present. In summary, the global controller controls the operation behavior of the switch on data by controlling the flow table in the switch;
when the data flow reaches the switch, the switch checks the flow table maintained by the switch at present, and matches the flow table entry according to the identification information carried by the data flow, wherein the identification information of the data flow comprises: the start address and the destination address of the data stream. If the flow table entry is matched, forwarding the data flow according to the content of the flow table entry, and if no flow table entry is matched, notifying the global controller of the lack of the flow table entry, wherein the message comprises: identification information of the data stream;
after the global controller obtains the network topology in step 2, the forwarding strategy of the data stream is designed by integrating hop count, effective bandwidth, packet loss rate and time delay, and is as follows:
after receiving the message, the global controller makes a forwarding strategy for the data stream, wherein the forwarding strategy specifically comprises: selecting an optimal path for the data stream by integrating hop count, effective bandwidth, packet loss rate and time delay;
for the hop count, the global controller selects k paths for the data stream by using a KSP algorithm according to the initial address and the destination address of the data stream by using the full-network topology information obtained in the step 1;
the full-network topology information includes: information of the individual infrastructures and their interconnections.
The KSP algorithm is used for solving the shortest path, the secondary short path and even the kth short path and constructing a k shortest path set;
the KSP algorithm comprises the following specific steps:
step 2.1: using Dijkstra algorithm to calculate the shortest path, and marking as S1;
step 2.2: and taking S1 as an iteration path to carry out first iteration. The iteration method comprises the following steps: all nodes except the terminal point on the iterative path are used as deviation nodes, the shortest path from each deviation node to the terminal point is calculated, the obtained shortest path is spliced with the paths from the initial node to the deviation nodes to form a candidate path, a candidate path set candidates is added, finally, the shortest path is selected from the candidates, the selected shortest path is marked as S < 2 >, and the selected shortest path is moved out of the candidates;
step 2.3: and (3) taking S2 as an iteration path, performing second iteration, adding all candidate paths selected in the iteration into candidates, selecting the shortest path from the candidates, marking the selected shortest path as S3, and moving the shortest path out of the candidates.
Step 2.4: repeating the step S2.3, and selecting k paths after k-1 iterations;
for the effective bandwidth, the global controller monitors the bandwidth, and the monitoring method comprises the following steps: the global controller periodically issues a message for counting port data to obtain the statistical information of the switch port, and obtains the byte number and the statistical duration time of the switch port transceiving from the statistical information. By using two statistical messages of the switch port, the flow rate of the switch port can be obtained:
Figure GDA0003091408120000051
wherein the content of the first and second substances,
Figure GDA0003091408120000052
representing switch port at t1The number of bytes transmitted and received at the moment,
Figure GDA0003091408120000053
representing switch port at t0The number of bytes transmitted and received at the moment.
The switch port residual bandwidth is:
remain_bwport=max_bwport-flow_rateport
wherein max _ bwportFlow _ rate, representing the maximum bandwidth of a switch portportRepresenting the traffic speed of the switch port;
the switch port residual bandwidth is for one port, and for one path, the effective bandwidth is the minimum residual bandwidth of all switch ports on the path. The effective bandwidth of the path is:
Figure GDA0003091408120000054
wherein, effect _ bwpathRepresenting the effective bandwidth of the path, n representing the number of switch ports on the path,
Figure GDA0003091408120000055
representing the remaining bandwidth of the ith switch port on the path.
And for the packet loss rate, calculating the packet loss rate of the switch port according to the acquired statistical information of the switch port as follows:
Figure GDA0003091408120000056
wherein, send _ rev _ pckloss represents the total number of the switch ports for receiving and transmitting the data packets, and pck represents the total number of the switch ports for receiving and transmitting the data packets.
The packet loss rate of a switch port is for one port, and for one path, the packet loss rate can be obtained by subtracting the probability of correctly receiving and sending a data packet from the total probability, and the packet loss rate of the path is as follows:
Figure GDA0003091408120000061
wherein pckloss _ ratepathRepresenting the packet loss rate of the path, n representing the number of switch ports of the path,
Figure GDA0003091408120000062
representing the packet loss rate of the ith switch port on the path.
For the time delay, the global controller sends a time delay detection data packet for time delay detection to the switch, wherein the data packet comprises: sending a timestamp of the data packet, switch identification information and port identification information of the switch;
the global switch issues a flow table item _ time1 to the switch, and the flow table rule is as follows: if the time delay detection data packet sent from the global controller is received, the time delay detection data packet is forwarded to other switches;
the global controller issues a flow table item _ time2 to the switch, and the flow table rule is as follows: if receiving a time delay detection data packet sent from the switch, sending the time delay detection data packet to the global controller;
the switch installs the flow table rule issued by the global controller;
the switch receives the delay detection data packet from the global controller, matches the flow table rule of the flow table item _ time1, and forwards the delay detection data packet to other switches;
the switch receives a delay detection data packet from the switch, matches the flow table rule of the flow table item _ time2, and sends the received delay detection data packet to the global controller;
the global controller receives the delay detection data packets sent by the switch, and according to the flow table rule, each delay detection data packet flows in the network by a route of the global controller- > the switch- > the global controller; the global controller analyzes the time delay detection data packet to obtain switch identification information and port identification information of a first switch in the route, and obtains switch identification information and port identification information of a second switch in the route according to the source of the time delay detection data packet;
the first switch in the flow recording route is switch a, the second switch is switch B, and the time delay of the time delay detection data packet from the global controller- > switch a- > switch B- > global controller is as follows:
Tcabc=cur_timecbc-send_timecabc
wherein cur _ timecabcPresent time, send _ time, representing the current time that the controller received the delay probe packetcabcA timestamp representing a transmission data packet carried in the delay detection data packet;
similarly, the time delay of the time delay detection data packet from the global controller- > switch B- > switch a- > global controller is:
Tcbac=cur_timecbac-send_timecbacthe global controller sends an echo message to the switch, wherein the echo message comprises: sending a timestamp of the echo message, switch identification information and port identification information of the switch;
the global controller sends a flow table item to the switch, and the flow table rule is as follows: if an echo message sent from the global controller is received, the echo message is sent back to the global controller;
the switch installs the flow table rule issued by the global controller;
the switch receives echo messages from the global controller, and according to the flow table rule, each echo message flows in the network by a route of the global controller- > the switch- > the global controller; the global controller analyzes the echo message to obtain switch identification information and port identification information of the switch; for the switch a, the time delay of the echo packet from the global controller- > switch a- > global controller is:
Tcac=cur_timecac-send_timecac
wherein cur _ timecacRepresents the current time, send _ time, of the global controller receiving the ehco messagecacA timestamp representing the echo message sending carried in the echo message;
similarly, the time delay of the echo message from the global controller- > switch B- > global controller is:
Tcbc=cur_timecbc-send_tmecbc
to sum up, the round-trip delay of the link between switch a and switch B is:
Taba=Tcabc+Tcbac-Tcac-Tcbc
the delay of the link between switch a and switch B is:
Figure GDA0003091408120000071
the delay of the path is the sum of the delays of each link, and is:
Figure GDA0003091408120000072
wherein, TpathRepresenting the delay of the path, n representing the number of links of the path,
Figure GDA0003091408120000073
representing the time delay of the j link of the path;
according to k shortest paths from the initial address to the destination address of the obtained data stream, wherein the hop count of each path refers to the number of switches of each path in the k paths;
according to the effective bandwidth, the time delay and the packet loss rate of each path;
performing weighted comprehensive evaluation on four indexes of hop count, effective bandwidth, time delay and packet loss rate of k paths, wherein the evaluation method comprises the following steps:
the four indexes are normalized to eliminate the difference of the four indexes in magnitude, the normalization processing method is dispersion normalization, and for the forward index, a normalization formula of the forward index is adopted:
Figure GDA0003091408120000081
wherein, ylRepresents the first data after normalization, m represents the number of data normalized, xlRepresents the first data before normalization, min1≤l≤m(xl) Denotes the minimum value of the data before normalization, max: (1≤l≤m xl) Maximum values representing data before normalization;
for the negative indicators, a normalization formula of the negative indicators is adopted:
Figure GDA0003091408120000082
wherein, ylRepresents the first data after normalization, m represents the number of data normalized, xlRepresents the first data before normalization, min1≤l≤m(xl) Denotes the minimum value of the data before normalization, max: (1≤l≤mxl) Maximum values representing data before normalization;
in the evaluation, the effective bandwidth is a positive indicator, the hop count, the time delay and the packet loss rate are negative indicators, and each indicator is respectively standardized by using the formula.
Different weights are given to different standardized indexes, the weight is manually set, and the weight sum is 1;
selecting a path with the highest path comprehensive evaluation value;
step 2, the route forwarding strategy designed by the global controller is issued to the switch in the form of a flow entry, and the switch installs the flow entry issued by the global controller and performs route forwarding on the data flow according to the content of the flow entry is as follows:
after an optimal path is selected for the data stream, the global controller sends a flow table item to each switch on the optimal path, and each switch installs the flow table item into a flow table of the switch and forwards the data stream according to the content of the flow table item;
preferably, the strategy that the global controller makes a tag for the packet in step 3 is as follows:
the global controller makes a strategy of adding a label to the data packet, wherein the label is identification information of a link;
and calculating whether the link is a must-pass link of the data packet. The data packet flows in the whole network topology, a plurality of reachable paths exist from a starting point to an end point, all paths are calculated by using a depth-first traversal algorithm, and the overlapped parts of all paths are regarded as necessary links of the data packet; when adding a label to a data packet, firstly judging whether a link identified by the label is a necessary link of the data packet, if so, not storing identification information of the link as the label into a label field of the data packet; if not, the identification information of the link is stored as a label in the label field of the data packet. The label field is a header field of the data packet. The labels are orderly stored in a label field of the data packet in a binary form, and each label occupies a fixed bit number;
the step 3 of issuing the label marking policy and the routing forwarding policy in the step 2 to the non-edge switch together in the form of a flow table entry is that:
for the non-edge switch, the global controller issues the policy of label marking and the routing forwarding policy of step S2 to the non-edge switch together in the form of a flow entry, so that the non-edge switch performs the action of adding labels to the data packet first and then forwards the data packet to other switches;
and 3, the global controller makes a strategy for clearing the label field of the data packet as follows:
if the destination host address of the data packet is the next hop address of the data packet forwarded by the switch, the switch clears the label field of the data packet and then forwards the data packet to the destination host.
The global controller in step 3 issues the policy of adding labels to the data packets, the policy of clearing label fields of the data packets, and the routing forwarding policy in step 2 to the edge switch together in the form of a flow table entry:
for the edge switch, the global controller issues the policy of label marking, the policy of label clearing and the routing forwarding policy of step S2 to the edge switch together in the form of a flow entry, so that the edge switch performs an action of adding labels to the data packet before forwarding the data packet to other switches; and the tag field of the packet is cleared before forwarding the packet to the host.
Preferably, in step 4, the tracing controller issues a flow entry to each edge switch, and instructs the edge switch to send a tracing message that:
the tracing controller issues a flow table entry to each edge switch, and the flow table rule is as follows: when the edge switch receives a data packet to be traced, sending a tracing message to a tracing controller, wherein the data packet to be traced refers to: the destination host address of the data packet is the next hop address of the data packet forwarded by the switch, and the source tracing message includes: the identification information of the data packet is used for uniquely identifying the data packet and the label field of the data packet;
step 4, the switch installs the flow table rule issued by the tracing controller, when receiving the data packet to be traced, matches the flow table item issued by the tracing controller, and sends tracing information to the tracing controller according to the content of the flow table item:
the edge switch is provided with the flow table rule issued by the source tracing controller, and sends a source tracing message to the source tracing controller when receiving a data packet to be traced, wherein the source packet to be traced means: the destination host address of the data packet is the next hop address of the data packet forwarded by the switch, and the source tracing message includes: the identification information of the data packet is used for uniquely identifying the data packet and the label field of the data packet;
step 4, the tracing controller receives the tracing message, extracts the label field of the data packet, reconstructs a path for the data packet, and completes the path tracing as follows:
the source tracing controller receives the source tracing message and formulates a strategy of a data packet trace-back path, wherein the strategy depends on the strategy of adding labels to the data packet formulated in the step 3;
extracting data packet identification information and label fields in the tracing message, extracting stored labels from the label fields one by one, and sequentially storing the labels into a queue; in the topology information of the whole network obtained in the step 1, tree breadth-first traversal is carried out on adjacent elements in a queue, and a unique path between the two elements is found out; connecting all the found unique paths to form a complete circulation route;
the tracing controller obtains a circulation route, the circulation route is composed of identification information of the links, the identification information of the links is mapped to corresponding links, corresponding switch identification information is further obtained, and tracing information is composed. And the tracing controller submits the tracing information to the user.
The invention has the advantages that:
the invention discloses a distributed network tracing method of a distributed network tracing system based on an SDN (software defined network), which completes two modules of network design and tracing. The network design comprises an optimization method of topology acquisition and routing forwarding, wherein the topology acquisition method enables the controller to send a link discovery message to each switch only by modifying the logic of topology discovery, so that the resource consumption is reduced, and the network efficiency is improved. The route forwarding method designs a data packet forwarding strategy by integrating indexes such as hop count, effective bandwidth, packet loss rate and time delay, realizes load balance and improves network performance. The tracing implementation comprises two aspects of label marking and path tracing, a label is added to each data packet in the label marking stage, and the forwarding path of the data packet is reconstructed by extracting the label information segment in the path tracing stage.
Drawings
FIG. 1: an SDN architecture diagram.
FIG. 2: a connection graph of the global controller to all switches.
FIG. 3: and a connection diagram of the trace source controller and the edge switch.
FIG. 4: and (4) a network topology graph.
FIG. 5: and (3) a global method framework diagram for realizing network design and tracing.
FIG. 6: and a link information acquisition process diagram.
FIG. 7: and a delay detection process diagram of one link.
FIG. 8: a system framework diagram of tag tagging and emptying policies.
FIG. 9: flow chart of tag tagging and emptying strategy.
FIG. 10: a system framework diagram of a path backtracking policy.
FIG. 11: a flow diagram of a path backtracking policy.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other. For the parameters that need to be analyzed in the actual situation, we have noted the parameter setting method above and will not be described herein.
The following further describes the embodiments of the present invention with reference to the attached drawings:
a distributed network tracing method of a distributed network tracing system based on an SDN is disclosed.
The SDN distributed network tracing system comprises: the system comprises a global controller, a traceability controller, a plurality of switches and a plurality of hosts;
the global controller and the tracing controller both adopt an Ryu controller; the switches all adopt OVS (open vSwitch) switches; and the communication interfaces of the global controller, the trace source controller and the switch all adopt an OpenFlow protocol. The SDN architecture of the present invention is shown in fig. 1.
The global controller is connected with the switches in sequence in a wired mode, the number of the switches is 10, and fig. 2 is a connection diagram of the global controller and the switches;
will with the host computer is connected the switch definition is marginal switch, the quantity of marginal switch is 4, the controller of tracing to the source is connected through wired mode with every marginal switch, and figure 3 is the connection diagram of controller of tracing to the source and marginal switch.
The types of the multiple hosts are as follows: the number of the hosts is 4, and the switches and the hosts are connected through a fat tree network topology;
fig. 4 is a network topology diagram, in which S1, S2, S3, S4, S5, S6, S7, S8, S9, and S10 are switches, where S7, S8, S9, and S10 are edge switches; h1, h2, h3 and h4 are hosts.
The invention discloses a distributed network tracing method of a distributed network tracing system based on an SDN. The topology acquisition with low energy consumption and the route forwarding based on load balancing are realized through network design; the label marking and path backtracking are realized through the traceablility method, a label is added to each data packet in the label marking stage, and the forwarding path of the data packet is reconstructed through extracting the label information segment in the path backtracking stage, so that the network traceablility with fine granularity and high accuracy is directly and accurately realized. The global method framework for network design and tracing implementation is shown in fig. 5.
The distributed network tracing method comprises the following steps:
step 1: the method comprises the steps that a global controller sends a flow table item down to each switch to guide the switches to forward feedback link information, the global controller sends a message for link discovery to each switch, the switches analyze the link discovery message sent by the global controller, flow table item matching is carried out on an OpenFlow flow table of the global controller according to the information obtained by analysis, further forwarding of the feedback message is carried out according to the content of the matched flow table item, the global controller realizes discovery of links between the switches according to the received feedback message, and finally construction of network topology is realized, and the global controller regularly calls a topology acquisition module to update a stored topology structure in time;
step 1, the global controller sends a flow table item to each switch, and instructs the switches to forward feedback link information as follows:
the global controller issues a flow table entry item _ topo1 to each switch, and the flow table rule is as follows: if receiving the link discovery message sent from the global controller, sending the feedback message from the sending port; the link discovery message includes: switch identification information of a source switch of a link to be discovered; the feedback message includes: switch identification information and port identification information of a source switch of a link to be discovered;
the global controller issues a flow table entry item _ topo2 to each switch, and the flow table rule is as follows: if receiving the feedback message sent from the switch, sending the received feedback message to the global controller;
each switch installs the flow table rule;
step 1, the global controller sends a message for link discovery to each switch, where the message is:
the global controller sends a link discovery message to each switch to realize link discovery, wherein the link discovery message comprises: switch identification information of a source switch of a link to be discovered;
the switch in step 1 analyzes the link discovery message sent by the global controller, performs flow entry matching on its own OpenFlow flow table according to the information obtained by the analysis, and further forwards the feedback message according to the content of the matched flow entry:
the switch receives a link discovery message from the global controller, matches the flow table rule of the flow table entry item _ topo1, and sends a feedback message from the sending port, where the feedback message includes: switch identification information and port identification information of a source switch of a link to be discovered;
the switch receives the feedback message from the switch, matches the flow table rule of the flow table item _ topo2, and sends the received feedback message to the global controller;
step 1, the global controller realizes discovery of the link between the switches according to the received feedback message, and finally realizes construction of network topology as follows:
the global controller receives feedback messages, wherein one feedback message comprises link information, and the switch identification information and the port identification information of the source switch of each link are obtained by analyzing each feedback message. And obtaining the switch identification information and the port identification information of the target switch of each link according to the source of each feedback message. Fig. 6 is a diagram of a link information acquisition process.
The global controller extracts link information in all feedback messages to realize the acquisition of the whole network topology;
step 2: after a data flow reaches a switch, the switch performs flow table item matching on an OpenFlow flow table of the switch according to data flow information, if the data flow is matched with the flow table item, data is processed according to the content of the flow table item, if the data flow is not matched with the flow table item, a global controller is informed to issue the flow table item, after a network topology is obtained by the global controller, a forwarding strategy of the data packet is designed by integrating hop count, effective bandwidth, packet loss rate and time delay, a route forwarding strategy designed by the global controller is issued to the switch in the form of the flow table item, and the switch is provided with the flow table item issued by the global controller and performs route forwarding on the data flow according to the content of the flow table item;
after the data flow reaches the switch in step 2, the switch performs flow entry matching on its own OpenFlow flow table according to the data flow information, if the flow entry is matched, the data is processed according to the content of the flow entry, and if the flow entry is not matched, the global controller is notified to issue a flow entry as follows:
each switch maintains a flow table of the switch, the global controller issues an operation scheme for the data to the switch in a flow table item mode, the switch receives the flow table item, the flow table item is installed in the flow table of the switch, and then the switch determines the operation for the data according to the flow table maintained at present. In summary, the global controller controls the operation behavior of the switch on data by controlling the flow table in the switch;
when the data flow reaches the switch, the switch checks the flow table maintained by the switch at present, and matches the flow table entry according to the identification information carried by the data flow, wherein the identification information of the data packet comprises: the start address and the destination address of the data stream. If the flow table entry is matched, forwarding the data flow according to the content of the flow table entry, and if no flow table entry is matched, notifying the global controller of the lack of the flow table entry, wherein the message comprises: identification information of the data stream;
after the global controller obtains the network topology in step 2, the forwarding strategy of the data packet is designed by integrating hop count, effective bandwidth, packet loss rate and time delay as follows:
after receiving the message, the global controller makes a forwarding strategy for the data stream, wherein the forwarding strategy specifically comprises: selecting an optimal path for the data stream by integrating hop count, effective bandwidth, packet loss rate and time delay;
for the hop count, the global controller selects k paths for the data stream by using a KSP algorithm according to the initial address and the destination address of the data stream by using the full-network topology information obtained in the step 1;
the full-network topology information includes: information of the individual infrastructures and their interconnections.
The KSP algorithm is used for solving the shortest path, the secondary short path and even the kth short path and constructing a k shortest path set;
the KSP algorithm comprises the following specific steps:
step 2.1: using Dijkstra algorithm to calculate the shortest path, and marking as S1;
step 2.2: and taking S1 as an iteration path to carry out first iteration. The iteration method comprises the following steps: all nodes except the terminal point on the iterative path are used as deviation nodes, the shortest path from each deviation node to the terminal point is calculated, the obtained shortest path is spliced with the paths from the initial node to the deviation nodes to form a candidate path, a candidate path set candidates is added, finally, the shortest path is selected from the candidates, the selected shortest path is marked as S < 2 >, and the selected shortest path is moved out of the candidates;
step 2.3: and (3) taking S2 as an iteration path, performing second iteration, adding all candidate paths selected in the iteration into candidates, selecting the shortest path from the candidates, marking the selected shortest path as S3, and moving the shortest path out of the candidates.
Step 2.4: repeating the step S2.3, and selecting k paths after k-1 iterations;
for the effective bandwidth, the global controller monitors the bandwidth, and the monitoring method comprises the following steps: the global controller periodically issues a message for counting port data to obtain the statistical information of the switch port, and obtains the byte number and the statistical duration time of the switch port transceiving from the statistical information. By using two statistical messages of the switch port, the flow rate of the switch port can be obtained:
Figure GDA0003091408120000141
wherein the content of the first and second substances,
Figure GDA0003091408120000142
representing switch port at t1The number of bytes transmitted and received at the moment,
Figure GDA0003091408120000143
representing switch port at t0The number of bytes transmitted and received at the moment.
The switch port residual bandwidth is:
remain_bwport=max_bwport-flow_rateport
wherein max _ bwportFlow _ rate, representing the maximum bandwidth of a switch portportRepresenting the traffic speed of the switch port;
the switch port residual bandwidth is for one port, and for one path, the effective bandwidth is the minimum residual bandwidth of all switch ports on the path. The effective bandwidth of the path is:
Figure GDA0003091408120000144
wherein, effect _ bwpathRepresenting the effective bandwidth of the path, n representing the number of switch ports on the path,
Figure GDA0003091408120000145
representing the remaining bandwidth of the ith switch port on the path.
And for the packet loss rate, calculating the packet loss rate of the switch port according to the acquired statistical information of the switch port as follows:
Figure GDA0003091408120000151
wherein, send _ rev _ pckloss represents the total number of the switch ports for receiving and transmitting the data packets, and pck represents the total number of the switch ports for receiving and transmitting the data packets.
The packet loss rate of a switch port is for one port, and for one path, the packet loss rate can be obtained by subtracting the probability of correctly receiving and sending a data packet from the total probability, and the packet loss rate of the path is as follows:
Figure GDA0003091408120000152
wherein pckloss _ ratepathRepresenting the packet loss rate of the path, n representing the number of switch ports of the path,
Figure GDA0003091408120000153
representing the packet loss rate of the ith switch port on the path.
For the time delay, the global controller sends a time delay detection data packet for time delay detection to the switch, wherein the data packet comprises: sending a timestamp of the data packet, switch identification information and port identification information of the switch;
the global switch issues a flow table item _ time1 to the switch, and the flow table rule is as follows: if the time delay detection data packet sent from the global controller is received, the time delay detection data packet is forwarded to other switches;
the global controller issues a flow table item _ time2 to the switch, and the flow table rule is as follows: if receiving a time delay detection data packet sent from the switch, sending the time delay detection data packet to the global controller;
the switch installs the flow table rule issued by the global controller;
the switch receives the delay detection data packet from the global controller, matches the flow table rule of the flow table item _ time1, and forwards the delay detection data packet to other switches;
the switch receives a delay detection data packet from the switch, matches the flow table rule of the flow table item _ time2, and sends the received delay detection data packet to the global controller;
the global controller receives the delay detection data packets sent by the switch, and according to the flow table rule, each delay detection data packet flows in the network by a route of the global controller- > the switch- > the global controller; the global controller analyzes the time delay detection data packet to obtain switch identification information and port identification information of a first switch in the route, and obtains switch identification information and port identification information of a second switch in the route according to the source of the time delay detection data packet;
fig. 7 is a diagram of a delay probing process for a link.
The first switch in the flow recording route is switch a, the second switch is switch B, and the time delay of the time delay detection data packet from the global controller- > switch a- > switch B- > global controller is as follows:
Tcabc=cur_timecabc-send_timecabc
wherein cu _ timecabcPresent time, send _ time, representing the current time that the controller received the delay probe packetcabcA timestamp representing a transmission data packet carried in the delay detection data packet; t iscabcShown in fig. 7, the time required for a packet to travel along routes 1, 2, and 3 is probed for latency.
Similarly, the time delay of the time delay detection data packet from the global controller- > switch B- > switch a- > global controller is:
Tcbac=cur_timecbac-send_timecbac
the global controller sends an echo message to the switch, wherein the echo message comprises: sending a timestamp of the echo message, switch identification information and port identification information of the switch; t iscbacShown in fig. 7, the time required for the latency probe packet to travel along the routes 4, 5, 6.
The global controller sends a flow table item to the switch, and the flow table rule is as follows: if an echo message sent from the global controller is received, the echo message is sent back to the global controller;
the switch installs the flow table rule issued by the global controller;
the switch receives echo messages from the global controller, and according to the flow table rule, each echo message flows in the network by a route of the global controller- > the switch- > the global controller; the global controller analyzes the echo message to obtain switch identification information and port identification information of the switch; for the switch a, the time delay of the echo packet from the global controller- > switch a- > global controller is:
Tcac=cur_timecac-send_timecac
wherein cur _ timecacRepresents the current time, send _ time, of the global controller receiving the ehco messagecacA timestamp representing the echo message sending carried in the echo message; t iscacRepresented in fig. 7 is the time required for an echo message to travel along routes 1, 6.
Similarly, the time delay of the echo message from the global controller- > switch B- > global controller is:
Tcbc=cur_timecbc-send_timecbc
in the same way, TcbcRepresented in fig. 7 is the time required for an echo message to travel along routes 4, 3.
To sum up, the round-trip delay of the link between switch a and switch B is:
Taba=Tcabc+Tcbac-Tcac-Tcbc
Tabarepresented in fig. 7 is the time required for a packet to flow on routes 2, 5.
The delay of the link between switch a and switch B is:
Figure GDA0003091408120000161
the delay of the path is the sum of the delays of each link, and is:
Figure GDA0003091408120000171
wherein, TpathRepresenting the delay of the path, n representing the number of links of the path,
Figure GDA0003091408120000172
representing the time delay of the j link of the path;
according to k shortest paths from the initial address to the destination address of the obtained data stream, wherein the hop count of each path refers to the number of switches of each path in the k paths;
according to the effective bandwidth, the time delay and the packet loss rate of each path;
performing weighted comprehensive evaluation on four indexes of hop count, effective bandwidth, time delay and packet loss rate of k paths, wherein the evaluation method comprises the following steps:
the four indexes are normalized to eliminate the difference of the four indexes in magnitude, the normalization processing method is dispersion normalization, and for the forward index, a normalization formula of the forward index is adopted:
Figure GDA0003091408120000173
wherein, ylRepresents the first data after normalization, m represents the number of data normalized, xlRepresents the first data before normalization, min1≤l≤m(xl) Denotes the minimum value of the data before normalization, max: (1≤l≤m xl) Maximum values representing data before normalization;
for the negative indicators, a normalization formula of the negative indicators is adopted:
Figure GDA0003091408120000174
wherein, ylRepresents the first data after normalization, m represents the number of data normalized, xlRepresents the first data before normalization, min1≤l≤m(xl) Denotes the minimum value of the data before normalization, max: (1≤l≤mxl) Maximum values representing data before normalization;
in the evaluation, the effective bandwidth is a positive indicator, the hop count, the time delay and the packet loss rate are negative indicators, and each indicator is respectively standardized by using the formula.
Different weights are given to different standardized indexes, the weight is manually set, and the weight sum is 1;
selecting a path with the highest path comprehensive evaluation value;
step 2, the route forwarding strategy designed by the global controller is issued to the switch in the form of a flow entry, and the switch installs the flow entry issued by the global controller and performs route forwarding on the data flow according to the content of the flow entry is as follows:
after an optimal path is selected for the data stream, the global controller sends a flow table item to each switch on the optimal path, and each switch installs the flow table item into a flow table of the switch and forwards the data stream according to the content of the flow table item;
and step 3: the global controller formulates a strategy for adding labels to the data packets, and issues the strategy of label marking and the route forwarding strategy in the step 2 to the non-edge switch in a form of flow table items, and the global controller formulates a strategy for clearing label fields of the data packets; the global controller issues the strategy of adding labels to the data packets, the strategy of clearing label fields of the data packets and the routing forwarding strategy in the step 2 to the edge switch together in the form of flow table items; the method for issuing the flow table entry is shown in fig. 8; the switch is provided with a flow table item issued by the global controller and processes data according to the content of the flow table item;
and 3, the strategy for the global controller to make the data packet added with the label is as follows:
the global controller makes a strategy of adding a label to the data packet, wherein the label is identification information of a link;
and calculating whether the link is a must-pass link of the data packet. The data packet flows in the whole network topology, a plurality of reachable paths exist from a starting point to an end point, all paths are calculated by using a depth-first traversal algorithm, and the overlapped parts of all paths are regarded as necessary links of the data packet; when adding a label to a data packet, firstly judging whether a link identified by the label is a necessary link of the data packet, if so, not storing identification information of the link as the label into a label field of the data packet; if not, the identification information of the link is stored as a label in the label field of the data packet. The label field is a header field of the data packet. The labels are orderly stored in a label field of the data packet in a binary form, and each label occupies a fixed bit number;
the step 3 of issuing the label marking policy and the routing forwarding policy in the step 2 to the non-edge switch together in the form of a flow table entry is that:
for the non-edge switch, the global controller issues the policy of label marking and the routing forwarding policy of step S2 to the non-edge switch together in the form of a flow entry, so that the non-edge switch performs the action of adding labels to the data packet first and then forwards the data packet to other switches;
and 3, the global controller makes a strategy for clearing the label field of the data packet as follows:
if the destination host address of the data packet is the next hop address of the data packet forwarded by the switch, the switch clears the label field of the data packet and then forwards the data packet to the destination host.
The global controller in step 3 issues the policy of adding labels to the data packets, the policy of clearing label fields of the data packets, and the routing forwarding policy in step 2 to the edge switch together in the form of a flow table entry:
for the edge switch, the global controller issues the policy of label marking, the policy of label clearing and the routing forwarding policy of step S2 to the edge switch together in the form of a flow entry, so that the edge switch performs an action of adding labels to the data packet before forwarding the data packet to other switches; and the tag field of the packet is cleared before forwarding the packet to the host.
FIG. 9 is a flow chart of a tag marking and emptying strategy.
And 4, step 4: the tracing controller issues a flow table item to each edge switch to guide the edge switches to send tracing information; and the switch is provided with the flow table rule issued by the tracing controller, when a data packet to be traced is received, the switch matches the flow table items issued by the tracing controller, sends a tracing message to the tracing controller according to the content of the flow table items, then matches the flow table items issued by the global controller in the step 2 and the step 3, clears the label field of the data packet, and forwards the data packet to the target host. And the tracing controller receives the tracing message, extracts the label field of the data packet, reconstructs a path for the data packet and finishes path tracing.
FIG. 10 is a system framework diagram of a path backtracking strategy.
Step 4, the tracing controller issues a flow entry to each edge switch, and instructs the edge switches to send a tracing message as follows:
the tracing controller issues a flow table entry to each edge switch, and the flow table rule is as follows: when the edge switch receives a data packet to be traced, sending a tracing message to a tracing controller, wherein the data packet to be traced refers to: the destination host address of the data packet is the next hop address of the data packet forwarded by the switch, and the source tracing message includes: the identification information of the data packet is used for uniquely identifying the data packet and the label field of the data packet;
step 4, the switch installs the flow table rule issued by the tracing controller, when receiving the data packet to be traced, matches the flow table item issued by the tracing controller, and sends tracing information to the tracing controller according to the content of the flow table item:
the edge switch is provided with the flow table rule issued by the source tracing controller, and sends a source tracing message to the source tracing controller when receiving a data packet to be traced, wherein the source packet to be traced means: the destination host address of the data packet is the next hop address of the data packet forwarded by the switch, and the source tracing message includes: the identification information of the data packet is used for uniquely identifying the data packet and the label field of the data packet;
step 4, the tracing controller receives the tracing message, extracts the label field of the data packet, reconstructs a path for the data packet, and completes the path tracing as follows:
the source tracing controller receives the source tracing message and formulates a strategy of a data packet trace-back path, wherein the strategy depends on the strategy of adding labels to the data packet formulated in the step 3;
extracting data packet identification information and label fields in the tracing message, extracting stored labels from the label fields one by one, and sequentially storing the labels into a queue; in the topology information of the whole network obtained in the step 1, tree breadth-first traversal is carried out on adjacent elements in a queue, and a unique path between the two elements is found out; connecting all the found unique paths to form a complete circulation route;
the tracing controller obtains a circulation route, the circulation route is composed of identification information of the links, the identification information of the links is mapped to corresponding links, corresponding switch identification information is further obtained, and tracing information is composed. And the tracing controller submits the tracing information to the user.
FIG. 11 is a flow chart of a path backtracking strategy.
It should be understood that parts of the application not described in detail are prior art.
It should be understood that the above description of the preferred embodiments is given for clearness of understanding and no unnecessary limitations should be understood therefrom, and all changes and modifications may be made by those skilled in the art without departing from the scope of the invention as defined by the appended claims.

Claims (4)

1. A distributed network tracing method of a distributed network tracing system based on an SDN is characterized in that:
the SDN-based distributed network tracing system comprises:
the system comprises a global controller, a traceability controller, a plurality of switches and a plurality of hosts;
the global controller is sequentially connected with the switch in a wired mode respectively; the switches and the host are connected through fat tree network topology;
defining the switch connected to the host as an edge switch;
the tracing controller is sequentially connected with each edge switch in a wired mode;
the distributed network tracing method comprises the following steps:
step 1: the method comprises the steps that a global controller sends a flow table item down to each switch to guide the switches to feed back link information, the global controller sends a message for link discovery to each switch, the switches analyze the link discovery message sent by the global controller, flow table item matching is carried out on an OpenFlow flow table of the global controller according to the information obtained by analysis, further forwarding of the feedback message is carried out according to the content of the matched flow table item, the global controller realizes discovery of links between the switches according to the received feedback message, and finally construction of network topology is realized, and the global controller regularly calls a topology acquisition module to update a stored topology structure in time;
step 2: after a data flow reaches a switch, the switch performs flow table item matching on an OpenFlow flow table of the switch according to data flow information, if the data flow is matched with the flow table item, data is processed according to the content of the flow table item, if the data flow is not matched with the flow table item, a global controller is informed to issue the flow table item, after a network topology is obtained by the global controller, a forwarding strategy of the data packet is designed by integrating hop count, effective bandwidth, packet loss rate and time delay, a route forwarding strategy designed by the global controller is issued to the switch in the form of the flow table item, and the switch is provided with the flow table item issued by the global controller and performs route forwarding on the data flow according to the content of the flow table item;
and step 3: the global controller formulates a strategy for adding labels to the data packets, and issues the strategy of label marking and the route forwarding strategy in the step 2 to the non-edge switch in a form of flow table items, and the global controller formulates a strategy for clearing label fields of the data packets; the global controller issues the strategy of adding labels to the data packets, the strategy of clearing label fields of the data packets and the routing forwarding strategy in the step 2 to the edge switch together in the form of flow table items; the switch is provided with a flow table item issued by the global controller and processes data according to the content of the flow table item;
and 4, step 4: the tracing controller issues a flow table item to each edge switch to guide the edge switches to send tracing information; the switch is provided with the flow table rule issued by the traceability controller, when a data packet to be traced is received, the flow table items issued by the traceability controller are matched, the traceability message is sent to the traceability controller according to the content of the flow table items, then the flow table items issued by the global controller in the steps 2 and 3 are matched, the label field of the data packet is emptied, the data packet is forwarded to the target host, the traceability controller receives the traceability message, the label field of the data packet is extracted, the path is reconstructed for the data packet, and the path tracing is completed;
step 4, the tracing controller issues a flow entry to each edge switch, and instructs the edge switches to send a tracing message as follows:
the tracing controller issues a flow table entry to each edge switch, and the flow table rule is as follows: when the edge switch receives a data packet to be traced, sending a tracing message to a tracing controller, wherein the data packet to be traced refers to: the destination host address of the data packet is the next hop address of the data packet forwarded by the switch, and the source tracing message includes: the identification information of the data packet is used for uniquely identifying the data packet and the label field of the data packet;
step 4, the switch installs the flow table rule issued by the tracing controller, when receiving the data packet to be traced, matches the flow table item issued by the tracing controller, and sends tracing information to the tracing controller according to the content of the flow table item:
the edge switch is provided with the flow table rule issued by the source tracing controller, and sends a source tracing message to the source tracing controller when receiving a data packet to be traced, wherein the source packet to be traced means: the destination host address of the data packet is the next hop address of the data packet forwarded by the switch, and the source tracing message includes: the identification information of the data packet is used for uniquely identifying the data packet and the label field of the data packet;
step 4, the tracing controller receives the tracing message, extracts the label field of the data packet, reconstructs a path for the data packet, and completes the path tracing as follows:
the source tracing controller receives the source tracing message and formulates a strategy of a data packet trace-back path, wherein the strategy depends on the strategy of adding labels to the data packet formulated in the step 3;
extracting data packet identification information and label fields in the tracing message, extracting stored labels from the label fields one by one, and sequentially storing the labels into a queue; in the topology information of the whole network obtained in the step 1, tree breadth-first traversal is carried out on adjacent elements in a queue, and a unique path between the two elements is found out; connecting all the found unique paths to form a complete circulation route;
the tracing controller obtains a circulation route, the circulation route is composed of identification information of links, the identification information of the links is mapped to corresponding links, corresponding switch identification information is further obtained, and tracing information is composed; and the tracing controller submits the tracing information to the user.
2. The method of claim 1, wherein the method comprises:
step 1, the global controller sends a flow table item to each switch, and instructs the switches to forward feedback link information as follows:
the global controller issues a flow table entry item _ topo1 to each switch, and the flow table rule is as follows: if receiving the link discovery message sent from the global controller, sending the feedback message from the sending port; the link discovery message includes: switch identification information of a source switch of a link to be discovered; the feedback message includes: switch identification information and port identification information of a source switch of a link to be discovered;
the global controller issues a flow table entry item _ topo2 to each switch, and the flow table rule is as follows: if receiving the feedback message sent from the switch, sending the received feedback message to the global controller;
each switch installs the flow table rule;
step 1, the global controller sends a message for link discovery to each switch, where the message is:
the global controller sends a link discovery message to each switch to realize link discovery, wherein the link discovery message comprises: switch identification information of a source switch of a link to be discovered;
the switch in step 1 analyzes the link discovery message sent by the global controller, performs flow entry matching on its own OpenFlow flow table according to the information obtained by the analysis, and further forwards the feedback message according to the content of the matched flow entry:
the switch receives a link discovery message from the global controller, matches the flow table rule of the flow table entry item _ topo1, and sends a feedback message from the sending port, where the feedback message includes: switch identification information and port identification information of a source switch of a link to be discovered;
the switch receives the feedback message from the switch, matches the flow table rule of the flow table item _ topo2, and sends the received feedback message to the global controller;
step 1, the global controller realizes discovery of the link between the switches according to the received feedback message, and finally realizes construction of network topology as follows:
the global controller receives feedback messages, wherein one feedback message comprises link information, and the switch identification information and the port identification information of the source switch of each link are obtained by analyzing each feedback message; according to the source of each feedback message, obtaining switch identification information and port identification information of a target switch of each link;
and the global controller extracts link information in all feedback messages to realize the acquisition of the whole network topology.
3. The method of claim 1, wherein the method comprises:
after the data flow reaches the switch in step 2, the switch performs flow entry matching on its own OpenFlow flow table according to the data flow information, if the flow entry is matched, the data is processed according to the content of the flow entry, and if the flow entry is not matched, the global controller is notified to issue a flow entry as follows:
each switch maintains a flow table of the switch, the global controller issues an operation scheme for the data to the switch in a flow table item mode, the switch receives the flow table item, the flow table item is installed in the flow table of the switch, and then the switch determines the operation for the data according to the flow table maintained at present; in summary, the global controller controls the operation behavior of the switch on data by controlling the flow table in the switch;
when the data flow reaches the switch, the switch checks the flow table maintained by the switch at present, and matches the flow table entry according to the identification information carried by the data flow, wherein the identification information of the data flow comprises: a start address and a destination address of the data stream; if the flow table entry is matched, forwarding the data flow according to the content of the flow table entry, and if no flow table entry is matched, notifying the global controller of the lack of the flow table entry, wherein the message comprises: identification information of the data stream;
after the global controller obtains the network topology in step 2, the forwarding strategy of the data stream is designed by integrating hop count, effective bandwidth, packet loss rate and time delay, and is as follows:
after receiving the message, the global controller makes a forwarding strategy for the data stream, wherein the forwarding strategy specifically comprises: selecting an optimal path for the data stream by integrating hop count, effective bandwidth, packet loss rate and time delay;
for the hop count, the global controller selects k paths for the data stream by using a KSP algorithm according to the initial address and the destination address of the data stream by using the full-network topology information obtained in the step 1;
the full-network topology information includes: information of the individual infrastructures and their interconnections;
the KSP algorithm is used for solving the shortest path, the secondary short path and even the kth short path and constructing a k shortest path set;
the KSP algorithm comprises the following specific steps:
step 2.1: using Dijkstra algorithm to calculate the shortest path, and marking as S1;
step 2.2: taking S1 as iteration path to carry out first iteration; the iteration method comprises the following steps: all nodes except the terminal point on the iterative path are used as deviation nodes, the shortest path from each deviation node to the terminal point is calculated, the obtained shortest path is spliced with the paths from the initial node to the deviation nodes to form a candidate path, a candidate path set candidates is added, finally, the shortest path is selected from the candidates, the selected shortest path is marked as S < 2 >, and the selected shortest path is moved out of the candidates;
step 2.3: taking S2 as an iteration path, performing a second iteration, adding all candidate paths selected by the iteration into candidates, then selecting a shortest path from the candidates, marking the selected shortest path as S3, and moving the shortest path out of the candidates;
step 2.4: repeating the step 2.3, and selecting k paths after k-1 iterations;
for the effective bandwidth, the global controller monitors the bandwidth, and the monitoring method comprises the following steps: the global controller periodically issues a message for counting port data to obtain the statistical information of the switch port, and obtains the byte number and the statistical duration time of the switch port receiving and sending from the statistical information; by using two statistical messages of the switch port, the flow rate of the switch port can be obtained:
Figure FDA0003091408110000051
wherein the content of the first and second substances,
Figure FDA0003091408110000052
representing switch port at t1The number of bytes transmitted and received at the moment,
Figure FDA0003091408110000053
representing switch port at t0The receiving and sending byte number of the time;
the switch port residual bandwidth is:
remain_bwport=max_bwport-flow_rateport
wherein max _ bwportFlow _ rate, representing the maximum bandwidth of a switch portportRepresenting the traffic speed of the switch port;
the switch port residual bandwidth is for one port, and for one path, the effective bandwidth is the minimum residual bandwidth of all switch ports on the path; the effective bandwidth of the path is:
Figure FDA0003091408110000054
wherein, effect _ bwpathRepresenting the effective bandwidth of the path, n representing the number of switch ports on the path,
Figure FDA0003091408110000055
representing the remaining bandwidth of the ith switch port on the path;
and for the packet loss rate, calculating the packet loss rate of the switch port according to the acquired statistical information of the switch port as follows:
Figure FDA0003091408110000056
wherein, send _ rev _ pckloss represents the total number of the data packet loss of the port transceiving of the switch, and pck represents the total number of the data packet transceiving of the port of the switch;
the packet loss rate of a switch port is for one port, and for one path, the packet loss rate can be obtained by subtracting the probability of correctly receiving and sending a data packet from the total probability, and the packet loss rate of the path is as follows:
Figure FDA0003091408110000057
wherein pckloss _ ratepathRepresenting loss of a pathThe packet rate, n represents the number of switch ports of the path,
Figure FDA0003091408110000058
representing the packet loss rate of the ith switch port on the path;
for the time delay, the global controller sends a time delay detection data packet for time delay detection to the switch, wherein the data packet comprises: sending a timestamp of the data packet, switch identification information and port identification information of the switch;
the global switch issues a flow table item _ time1 to the switch, and the flow table rule is as follows: if the time delay detection data packet sent from the global controller is received, the time delay detection data packet is forwarded to other switches;
the global controller issues a flow table item _ time2 to the switch, and the flow table rule is as follows: if receiving a time delay detection data packet sent from the switch, sending the time delay detection data packet to the global controller;
the switch installs the flow table rule issued by the global controller;
the switch receives the delay detection data packet from the global controller, matches the flow table rule of the flow table item _ time1, and forwards the delay detection data packet to other switches;
the switch receives a delay detection data packet from the switch, matches the flow table rule of the flow table item _ time2, and sends the received delay detection data packet to the global controller;
the global controller receives the delay detection data packets sent by the switch, and according to the flow table rule, each delay detection data packet flows in the network by a route of the global controller- > the switch- > the global controller; the global controller analyzes the time delay detection data packet to obtain switch identification information and port identification information of a first switch in the route, and obtains switch identification information and port identification information of a second switch in the route according to the source of the time delay detection data packet;
the first switch in the flow recording route is switch a, the second switch is switch B, and the time delay of the time delay detection data packet from the global controller- > switch a- > switch B- > global controller is as follows:
Tcabc=cur_timecabc-send_timecabc
wherein cur _ timecabPresent time, send _ time, representing the current time that the controller received the delay probe packetcabcA timestamp representing a transmission data packet carried in the delay detection data packet;
similarly, the time delay of the time delay detection data packet from the global controller- > switch B- > switch a- > global controller is:
Tcbac=cur_timecbac-send_timecbac
the global controller sends an echo message to the switch, wherein the echo message comprises: sending a timestamp of the echo message, switch identification information and port identification information of the switch;
the global controller sends a flow table item to the switch, and the flow table rule is as follows: if an echo message sent from the global controller is received, the echo message is sent back to the global controller;
the switch installs the flow table rule issued by the global controller;
the switch receives echo messages from the global controller, and according to the flow table rule, each echo message flows in the network by a route of the global controller- > the switch- > the global controller; the global controller analyzes the echo message to obtain switch identification information and port identification information of the switch; for the switch a, the time delay of the echo packet from the global controller- > switch a- > global controller is:
Tcac=cur_timecac-send_timecac
wherein cur _ timecacRepresents the current time, send _ time, of the global controller receiving the ehco messagecacA timestamp representing the echo message sending carried in the echo message;
similarly, the time delay of the echo message from the global controller- > switch B- > global controller is:
Tcbc=cur_timecbc-send_timecbc
to sum up, the round-trip delay of the link between switch a and switch B is:
Taba=Tcabc+Tcbac-Tcac-Tcbc
the delay of the link between switch a and switch B is:
Figure FDA0003091408110000071
the delay of the path is the sum of the delays of each link, and is:
Figure FDA0003091408110000072
wherein, TpathRepresenting the delay of the path, n representing the number of links of the path,
Figure FDA0003091408110000073
representing the time delay of the j link of the path;
according to k shortest paths from the initial address to the destination address of the obtained data stream, wherein the hop count of each path refers to the number of switches of each path in the k paths;
according to the effective bandwidth, the time delay and the packet loss rate of each path;
performing weighted comprehensive evaluation on four indexes of hop count, effective bandwidth, time delay and packet loss rate of k paths, wherein the evaluation method comprises the following steps:
the four indexes are normalized to eliminate the difference of the four indexes in magnitude, the normalization processing method is dispersion normalization, and for the forward index, a normalization formula of the forward index is adopted:
Figure FDA0003091408110000074
wherein,ylRepresents the normalized 1 st data, m represents the normalized data quantity, xlRepresents the 1 st data before normalization, min1≤l≤m(xl) Denotes the minimum value of the data before normalization, max: (1≤l≤mxl) Maximum values representing data before normalization;
for the negative indicators, a normalization formula of the negative indicators is adopted:
Figure FDA0003091408110000081
wherein, ylRepresents the normalized 1 st data, m represents the normalized data quantity, xlRepresents the 1 st data before normalization, min1≤l≤m(xl) Denotes the minimum value of the data before normalization, max: (1≤l≤mxl) Maximum values representing data before normalization;
in the evaluation, the effective bandwidth is a positive indicator, the hop count, the time delay and the packet loss rate are negative indicators, and each indicator is respectively standardized by using the formula;
different weights are given to different standardized indexes, the weight is manually set, and the weight sum is 1;
selecting a path with the highest path comprehensive evaluation value;
step 2, the route forwarding strategy designed by the global controller is issued to the switch in the form of a flow entry, and the switch installs the flow entry issued by the global controller and performs route forwarding on the data flow according to the content of the flow entry is as follows:
after the optimal path is selected for the data flow, the global controller sends flow items to all the switches on the optimal path, and all the switches install the flow items into the flow tables of the switches and forward the data flow according to the content of the flow items.
4. The method of claim 1, wherein the method comprises:
and 3, the strategy for the global controller to make the data packet added with the label is as follows:
the global controller makes a strategy of adding a label to the data packet, wherein the label is identification information of a link;
calculating whether the link is a must-pass link of the data packet; the data packet flows in the whole network topology, a plurality of reachable paths exist from a starting point to an end point, all paths are calculated by using a depth-first traversal algorithm, and the overlapped parts of all paths are regarded as necessary links of the data packet; when adding a label to a data packet, firstly judging whether a link identified by the label is a necessary link of the data packet, if so, not storing identification information of the link as the label into a label field of the data packet; if not, the identification information of the link is stored into a label field of the data packet as a label; the label field is a header field of the data packet; the labels are orderly stored in a label field of the data packet in a binary form, and each label occupies a fixed bit number;
the step 3 of issuing the label marking policy and the routing forwarding policy in the step 2 to the non-edge switch together in the form of a flow table entry is that:
for the non-edge switch, the global controller issues the strategy of label marking and the route forwarding strategy of the step 2 to the non-edge switch in the form of a flow table entry, so that the non-edge switch firstly executes the action of adding labels to the data packet and then forwards the data packet to other switches;
and 3, the global controller makes a strategy for clearing the label field of the data packet as follows:
if the destination host address of the data packet is the next hop address of the data packet forwarded by the switch, the switch clears the label field of the data packet and then forwards the data packet to the destination host;
the global controller in step 3 issues the policy of adding labels to the data packets, the policy of clearing label fields of the data packets, and the routing forwarding policy in step 2 to the edge switch together in the form of a flow table entry:
for the edge switch, the global controller issues the strategy of label marking, the strategy of label clearing and the route forwarding strategy of the step 2 to the edge switch together in the form of flow table items, so that the edge switch performs the action of adding labels to the data packet before forwarding the data packet to other switches; and the tag field of the packet is cleared before forwarding the packet to the host.
CN202011174875.5A 2020-10-28 2020-10-28 Distributed network tracing method of SDN-based distributed network tracing system Active CN112350948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011174875.5A CN112350948B (en) 2020-10-28 2020-10-28 Distributed network tracing method of SDN-based distributed network tracing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011174875.5A CN112350948B (en) 2020-10-28 2020-10-28 Distributed network tracing method of SDN-based distributed network tracing system

Publications (2)

Publication Number Publication Date
CN112350948A CN112350948A (en) 2021-02-09
CN112350948B true CN112350948B (en) 2021-07-16

Family

ID=74355648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011174875.5A Active CN112350948B (en) 2020-10-28 2020-10-28 Distributed network tracing method of SDN-based distributed network tracing system

Country Status (1)

Country Link
CN (1) CN112350948B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595793B (en) * 2021-07-30 2023-11-07 桂林电子科技大学 FPGA-based SDN network policy consistency segmentation verification method
CN114124810B (en) * 2021-11-26 2023-11-17 江苏省未来网络创新研究院 Virtual test platform test flow monitoring method based on SDN and openfalcon architecture

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763449A (en) * 2016-03-23 2016-07-13 东北大学 Single packet source-tracing method based on storage resource adaptive adjustment
CN105791300A (en) * 2016-03-23 2016-07-20 东北大学 Single packet tracing method based on tracking trace importance evaluation
CN106027293A (en) * 2016-05-16 2016-10-12 重庆邮电大学 Method for survivability deployment of SDN (Software Defined Networking) controller based on appointed time delay
CN106341320A (en) * 2015-07-10 2017-01-18 中兴通讯股份有限公司 Business backtracking method and device
US9755969B2 (en) * 2014-03-04 2017-09-05 International Business Machines Corporation Route tracing in software defined networks
US10200279B1 (en) * 2017-10-03 2019-02-05 Amer Omar Aljaedi Tracer of traffic trajectories in data center networks
CN110572323A (en) * 2018-05-16 2019-12-13 中兴通讯股份有限公司 Route acquisition method, device and storage medium of software defined network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506274B (en) * 2016-11-08 2020-12-15 东北大学秦皇岛分校 Dynamically-expandable efficient single-packet tracing method
CN108540311B (en) * 2018-03-16 2021-03-30 哈尔滨工业大学 Fault detection deep learning network processing method and device of satellite actuating mechanism
CN109104407B (en) * 2018-06-29 2020-10-02 国网湖南省电力有限公司 Online tracking method and system for weblog based on feature retrieval

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9755969B2 (en) * 2014-03-04 2017-09-05 International Business Machines Corporation Route tracing in software defined networks
CN106341320A (en) * 2015-07-10 2017-01-18 中兴通讯股份有限公司 Business backtracking method and device
CN105763449A (en) * 2016-03-23 2016-07-13 东北大学 Single packet source-tracing method based on storage resource adaptive adjustment
CN105791300A (en) * 2016-03-23 2016-07-20 东北大学 Single packet tracing method based on tracking trace importance evaluation
CN106027293A (en) * 2016-05-16 2016-10-12 重庆邮电大学 Method for survivability deployment of SDN (Software Defined Networking) controller based on appointed time delay
US10200279B1 (en) * 2017-10-03 2019-02-05 Amer Omar Aljaedi Tracer of traffic trajectories in data center networks
CN110572323A (en) * 2018-05-16 2019-12-13 中兴通讯股份有限公司 Route acquisition method, device and storage medium of software defined network

Also Published As

Publication number Publication date
CN112350948A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
CN108521375B (en) SDN-based network multi-service flow QoS transmission and scheduling method
CN108600102B (en) Flexible data transmission system based on intelligent cooperative network
US11159432B2 (en) Data transmission method, and switch and network control system using the method
US8897141B2 (en) Network system and routing method
CN103119901B (en) Communication system, control device, packet transaction operating setting method
CN108040012B (en) Multi-target multicast routing path construction method in SDN network based on longicorn stigma search
CN112350948B (en) Distributed network tracing method of SDN-based distributed network tracing system
CN105847151A (en) Multi-constrained QoS (Quality of Service) routing strategy designing method for software defined network
CN102783098A (en) Communication system, path control apparatus, packet forwarding apparatus and path control method
WO2019026684A1 (en) Route control method and route setting device
EP1604489A1 (en) Assisted determination of data flows in communication/ data networks
CN110298381A (en) A kind of cloud security service functional tree Network Intrusion Detection System
CN114827021B (en) Multimedia service flow acceleration system based on SDN and machine learning
CN113114573A (en) Video stream classification and scheduling system in SDN network
CN106302012A (en) A kind of PTN network simulation-optimization method and system
Laassiri et al. Evaluation of the QoS parameters in different SDN architecture using Omnet 4.6++
CN114448899A (en) Method for balancing network load of data center
CN107046504A (en) Method and controller for the traffic engineering in communication network
Li et al. Data-driven routing optimization based on programmable data plane
CN113965470B (en) Aviation information network experiment simulation system
CN115225550B (en) On-demand whole network telemetry device based on clustering path planning algorithm
Li et al. A data forwarding mechanism based on deep reinforcement learning for deterministic networks
CN101958843A (en) Intelligent routing selection method based on flow analysis and node trust degree
CN115442275A (en) Hybrid telemetry method and system based on hierarchical trusted streams
Turk et al. A machine learning based management system for network services

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