CN110380973B - Software defined network topology detection method - Google Patents

Software defined network topology detection method Download PDF

Info

Publication number
CN110380973B
CN110380973B CN201910526644.7A CN201910526644A CN110380973B CN 110380973 B CN110380973 B CN 110380973B CN 201910526644 A CN201910526644 A CN 201910526644A CN 110380973 B CN110380973 B CN 110380973B
Authority
CN
China
Prior art keywords
switch
packet
port
topology
topology detection
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
CN201910526644.7A
Other languages
Chinese (zh)
Other versions
CN110380973A (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.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
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 Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN201910526644.7A priority Critical patent/CN110380973B/en
Publication of CN110380973A publication Critical patent/CN110380973A/en
Application granted granted Critical
Publication of CN110380973B publication Critical patent/CN110380973B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/252Store and forward routing

Abstract

The invention discloses a Software Defined Network (SDN) topology detection method, which comprises the following steps: the SDN controller establishes connection with the switch by utilizing an OpenFlow protocol, and acquires and stores the switch and port information thereof; the SDN controller pre-installs forwarding rules of topology detection packets for each connected switch; the SDN controller randomly selects a switch in a network as a core switch, creates a topology detection packet for the switch, and periodically sends the packet to the core switch; the switch which receives the topology detection packet forwards the topology detection packet according to a pre-installed forwarding rule and sends the packet to the SDN controller; and the SDN controller obtains topology information according to the received topology detection packets of the switches. Compared with the existing topology discovery method in the SDN, the method provided by the invention has the advantages that the topology detection packet length is shorter, the controller and the control link load are lighter, and the required topology detection time is shorter.

Description

Software defined network topology detection method
Technical Field
The invention belongs to the field of computer networks, and particularly relates to a software defined network topology detection method.
Background
With the rapid expansion of network scale and the continuous enrichment of application types, the internet is used as a vital part of social infrastructure, the structure and function are increasingly complex, and the management and control capability is increasingly weakened. The functions of routers as network core bearers, such as packet filtering, differentiated services, multicasting, quality of service (QoS), and traffic engineering, are expanding. The "dumb", simple data forwarding units originally defined by routers have become unwieldy.
Software Defined Networking (SDN) is a new network architecture that has achieved tremendous effort in recent years in the industry and academia. The idea of separation of control logic and data forwarding logic is a research basis of the SDN technology, and the decoupling of the data plane and the control plane reduces a plurality of complex functions borne by network equipment, and improves the flexibility and operability of realization and deployment of new network technologies and new protocols.
In order for an SDN controller to be able to manage a network and provide services such as routing, it needs to have up-to-date information about the network state, in particular the network topology. Therefore, a reliable and efficient topology discovery mechanism is essential for software defined networks. Most current controller platforms perform topology Discovery via OFDP (OpenFlow Discovery Protocol), which is derived from the original SDN controller NOX [ Gude N, Koponen T, Pe-ttit J, et al NOX: towardan operating system for networks [ J ]. Acm signal Communication Review,2008,38(3):105-110 ], improved from the Link Layer Discovery Protocol (LLDP) in the traditional network, perform topology Discovery via LLDP to inform neighbor nodes of its existence, and later become the standard for SDN topology Discovery.
However, the SDN topology discovery method implemented by OFDP has the following problems: in terms of security, OFDP transmits a large amount of switch information on a control link, but does not take protective measures on the information, so an attacker can often easily use the information to launch an attack; in terms of efficiency, the discovery process of OFDP takes long, the controller is heavy, and the control link overhead is large.
Thus, Pakzad F et al propose an improved method OFDPv2 to improve the efficiency of topology discovery by reducing the Pack-et-Out messages of SDN controllers [ Pakzad F, Portmann M, Tan W L, et al. Although OFDPv2 improves the efficiency of SDN topology discovery to some extent, the method has the following two problems: on one hand, from the data plane load analysis, OFDPv2 does not optimize the format of the topology detection packet, so that the load on the physical link between the switches cannot be reduced; on the other hand, from the viewpoint of topology Discovery duration and controller load, OFDPv2 has limited efficiency improvement relative to OFDP, and Da na Hasan and Mohamed Othman in research on OFDPv2 indicate that OFD Pv2 proposed by Pakzad F et al does not consider retransmission of Packet-Out messages, and thus improvement of OFDPv2 in control link overhead is reduced when retransmission of Packet-Out messages occurs [ dan ha san, Mohamed Othman, Efficient topoly Discovery in Software Defined Networks: Revisited [ J ]. Procedia Computer S-science, 2017,116,539-547 ].
Disclosure of Invention
The invention aims to provide an SDN topology detection method which can reduce control load and simplify a topology detection packet format.
The technical solution for realizing the purpose of the invention is as follows: the software defined network topology detection method comprises the following steps:
step 1, a Software Defined Network (SDN) controller establishes connection with a switch, and acquires and stores switch information and switch port information;
step 2, pre-installing a forwarding rule to each connected switch by the SDN controller, wherein the forwarding rule comprises a forwarding instruction and a speed limit instruction of a topology detection packet;
step 3, the SDN controller randomly selects a switch in the network as a core switch, constructs a topology detection Packet for the core switch, and periodically sends the topology detection Packet to the switch through a Packet-Out message so that the SDN controller can continuously update a topology view of the whole network;
step 4, the core switch forwards the topology detection Packet on the data plane according to the received Packet-Out message of the SDN controller and the forwarding instruction;
step 5, the switch receiving the topology detection Packet of the adjacent switch sends the received topology detection Packet to the SDN controller through Packet-In information, forwards the topology detection Packet on a data plane according to a pre-installed forwarding rule, and forwards the topology detection Packet to the adjacent switch;
and 6, the SDN controller obtains topology information according to the received Packet-In messages of all the switches.
Compared with the prior art, the invention has the following remarkable advantages: 1) when the topology detection packet is created, fields such as the Chassis ID, the Port ID, the TTL and the like are removed, the length of the topology detection packet is shortened, and the load on a physical link between switches is reduced; 2) the number of Packet-Out messages needing to be created by the SDN controller in the topology discovery process is reduced, and the load of the controller is reduced; 3) the number of Packet-Out messages needing to be sent on the control link is reduced, and the load on the control link is reduced; 4) the topology detection time is shortened, and the SDN controller can obtain a full-network topology view in a shorter time.
The present invention is described in further detail below with reference to the attached drawing figures.
Drawings
Fig. 1 is a flowchart of a software defined network SDN topology detection method according to the present invention.
Fig. 2 is a block diagram of a topology detection packet in the present invention.
Fig. 3 is a schematic diagram of a single-cycle topology discovery process of the present invention.
Detailed Description
With reference to fig. 1, the method for detecting a software defined network SDN topology according to the present invention includes the following steps:
step 1, a Software Defined Network (SDN) controller establishes connection with a switch, and acquires and stores switch information and switch port information;
step 2, pre-installing a forwarding rule to each connected switch by the SDN controller, wherein the forwarding rule comprises a forwarding instruction and a speed limit instruction of a topology detection packet;
step 3, the SDN controller randomly selects a switch in the network as a core switch, constructs a topology detection Packet for the core switch, and periodically sends the topology detection Packet to the switch through a Packet-Out message so that the SDN controller can continuously update a topology view of the whole network;
step 4, the core switch forwards the topology detection Packet on the data plane according to the received Packet-Out message of the SDN controller and the forwarding instruction;
step 5, the switch receiving the topology detection Packet of the adjacent switch sends the received topology detection Packet to the SDN controller through Packet-In information, forwards the topology detection Packet on a data plane according to a pre-installed forwarding rule, and forwards the topology detection Packet to the adjacent switch;
and 6, the SDN controller obtains topology information according to the received Packet-In messages of all the switches.
Further, in step 1, the software defined network SDN controller establishes a connection with the switch, and acquires and stores switch information and switch port information, specifically:
the method for establishing the connection between the SDN controller and the switch by utilizing the OpenFlow protocol specifically comprises the following steps:
step 1-1, after the switch is started, the switch is connected with a port of a controller through a TCP (transmission control protocol) request, after the controller is started, the controller confirms the TCP request of the switch, then the switch sends an OFPT _ HELLO message to request for establishing an OpenFlow connection, and after receiving the request, the controller returns an OFPT _ HELLO message to the switch to establish the connection;
step 1-2, the controller sends OFPT _ FEATURES _ REQUEST information to the switch to acquire switch information;
step 1-3, the controller sends an OFPMP _ PORT _ DESC request message to the switch to acquire switch PORT information;
step 1-4, the switch returns an OFPT _ FEATURES _ REPLY message and an OFPMP _ PORT _ DESC REPLY message to the controller, wherein the OFPT _ FEATURES _ REPLY message and the OFPMP _ PORT _ DESC REPLY message are respectively used for reporting the switch information to the controller and reporting each PORT information of the switch to the controller by the switch;
and 1-5, storing the switch information and the PORT information thereof by the SDN controller according to the OFPT _ FEATURES _ REPLY message and the OFPMP _ PORT _ DESC REPLY message returned by the switch.
Exemplary preferably, the switch information in step 1-2 includes: switch ID, buffer size, flow table number, auxiliary connection flag, statistical information support condition, restructuring IP fragment support condition and port anti-ring support condition;
the port information in step 1-3 includes: port number, MAC address, behavior flag, current state, data channel characteristics, current rate, and maximum rate.
Further, in step 2, the SDN controller pre-installs a forwarding rule to each connected switch, where the forwarding rule includes a forwarding instruction and a speed limit instruction of the topology detection packet, and the method specifically includes:
step 2-1, constructing a forwarding rule, comprising the following processes:
step 2-1-1, constructing a forwarding instruction to guide the switch to modify and forward the topology detection packet, and adding the forwarding instruction into a forwarding rule, wherein the steps comprise:
(1) the matching domain of the forwarding instruction is set for matching the topology detection packet arriving at the switch, and is set as follows: the Ethernet protocol type is a topology detection protocol number, the destination physical address Dst MAC is a nerest Bridge group address, and the receiving port number is a port number corresponding to each port of the switch;
(2) setting an action domain of a forwarding instruction to modify a packet header and forward the packet, wherein the action domain of the forwarding instruction is set as follows: firstly, directly encapsulating the Packet In a Packet-In message and sending the Packet to an SDN switch; then, adding a packet header modification action aiming at each switch port, sequentially changing a source physical address Src MAC address in the packet header of the topology detection packet into the MAC address of each port of the switch, wherein the action of sending the packet needs to be added when the address is modified each time, and the action is used for sending the topology detection packet to the corresponding port;
step 2-1-2, setting a corresponding speed limit instruction according to the current topology detection period in a self-defined manner, and adding the speed limit instruction into a forwarding rule; when a loop exists in a network, in order to solve the problem of a loop storm of a topology detection packet, an SDN controller needs to pre-install a group of speed limit rules for each switch to perform rate control;
and 2-2, issuing the constructed forwarding rule to all switches connected with the SDN controller to finish pre-installation.
Illustratively preferably, the topology probing protocol number in step 2-1-1 is 0x88 cc.
Further, in step 3, the SDN controller selects a switch in the network as a core switch, constructs a topology detection Packet for the core switch, and then periodically sends the Packet to the switch through a Packet-Out message, specifically:
according to the results of step 1 and step 2, the SDN controller initially has a full network node view, however, the available links between the switches are not visible to the SDN controller, so the SDN controller will select one controller as a core switch in a random manner.
Step 3-1, in combination with fig. 2, the step of constructing a topology detection packet for the core switch specifically includes: the topology detection packet structure comprises dstMAC, Src MAC, Ethernet protocol type and End TLV, and the configuration is as follows: configuring Dst MAC as a Nearest Bridge group address, Src MAC as '00: 00:00:00:00: 00', Ethernet protocol type as 0x88cc, and End TLV as two dummy bytes; the method is different from the structure of the LLDP grouping in the OFDP, and the fields such as the Chassis ID, the Port ID, the TTL and the like are removed from the format of the topology detection grouping, so that the length of the topology detection grouping is shortened, and the load of a physical link between switches is reduced;
step 3-2, in the OFDP implementation, the SDN controller creates a Packet-Out message containing a topology detection Packet to each physical port of each switch connected to the SDN controller in the whole network. In this mode, let the number of switches in the network be N, the number of physical links between all switches be L, and each switch have a number of ports piWherein i belongs to N, and the quantity of Packet-Out messages sent by the SDN controller is recorded as POUTThen there is
Figure BDA0002098449440000051
In order to improve efficiency, a mode of sending a Packet-Out message by the SDN controller is modified to reduce loads of the controller and a control link, and the method specifically comprises the following steps: enabling the switch to send Packet-Out messages to the data plane only once, so that the quantity P of the Packet-Out messages sent by the SDN controllerOUTIs reduced to POUT=1;
Step 3-3, acquiring a forwarding instruction corresponding to the topology detection Packet constructed in the step 3-1 according to the content in the step 2-1-1 (2), encapsulating the topology detection Packet and the forwarding instruction in a Packet-Out message in the step 3-2, and periodically sending the Packet-Out message to a core switch by an SDN controller so that the SDN controller can continuously update the topology view of the whole network.
Further, in step 4, the core switch forwards the topology detection Packet on the data plane according to the received Packet-Out message of the SDN controller and the forwarding instruction, specifically:
with reference to fig. 3, the core switch receives a Packet-Out message of the SDN controller, analyzes the Packet-Out message, extracts a topology detection Packet and a forwarding instruction thereof, changes, for each physical port, a Src MAC address in a Packet header of the topology detection Packet into a MAC address of an output port of the switch, and then sequentially sends the topology detection Packet to the corresponding physical port.
Further, the switch that receives the topology detection Packet of the adjacent switch In step 5 sends the received topology detection Packet to the SDN controller through the Packet-In message, forwards the topology detection Packet on the data plane according to the pre-installed forwarding rule, and forwards the topology detection Packet to the adjacent switch, which specifically includes:
step 5-1, with reference to fig. 3, after receiving the topology detection packet from the neighbor switch, the core switch and the non-core switch perform flow table item matching according to the content of step (1) in step 2-1-1;
step 5-2, forwarding according to the content in step 2-1-2, firstly, setting an action domain of a forwarding instruction to modify the packet header and forward the packet, wherein the action domain of the forwarding instruction is set as: adding a packet header modifying action to each physical port, changing the Src MAC address in the packet header of the topology detection packet into the MAC address of the rest ports of the switch, and then sequentially adding a packet sending action for sending the topology detection packet to the corresponding port;
and 5-3, each switch in the network receives the topology detection packet according to the content in the step 5-2, submits the topology detection packet to the SDN controller and forwards the topology detection packet to the adjacent switch.
Further, In step 6, the SDN controller obtains topology information according to the received Packet-In message of each switch, specifically:
step 6-1, with reference to fig. 3, the SDN controller parses a corresponding topology detection Packet from each received Packet-In message;
step 6-2, grouping topology detection aiming at each Packet-In message:
step 6-2-1, extracting Src MAC information In the topology detection Packet, the switch ID for sending Packet-In information and the port number for the switch to receive the topology detection Packet;
step 6-2-2, according to the switch information and the port information thereof stored In the step 1, searching for a switch ID and a corresponding port number of which the port MAC address is the same as the Src MAC In the step 6-2-1, and if matching information is found, judging that a physical link exists between the found switch port and the port of the switch which sends the Packet-In message In the step 5 and receives the topology detection Packet;
the physical links between all switches, i.e. topology information, are obtained from the network.
Examples
The software defined network topology detection method comprises the following steps:
1. the SDN controller is connected with the switch, and handshaking is carried out by using an OpenFlow protocol: with reference to fig. 3, in this example, there are 1 SDN controller, which is implemented by using an Ryu controller, there are 3 OpenFlow switches, which are implemented by using an OVS virtual switch and are respectively named as s1, s2, and s3, each switch has 2 physical ports, and a physical link exists between each switch and the other switches. The link connection mode is as follows: port 1 of s1 is connected to port 1 of s2, port 2 of s1 is connected to port 1 of s3, and port 2 of s2 is connected to port 2 of s3, namely s1-1 is connected to s2-1, s1-2 is connected to s3-1, and s2-2 is connected to s3-2, wherein each link is a bidirectional link. The TCP connection ports of the SDN controller and the 3 OpenFlow switches are: the TCP ports of the SDN controller are 6633 ports, and the TCP ports of the 3 OpenFlow switches are 41836, 41840 and 41838, respectively. And (3) completing network topology construction by adopting Mininet, and configuring the version of the OpenFlow protocol into OpenFlow 1.3. After the network topology is built, the connection between the controller and the switch is automatically completed by the Ryu controller and the OVS switch, and the specific process is as follows: the switch requests connection with a port of the controller 6633 through a TCP protocol, then the controller is started, the controller confirms the TCP request of the switch, then the switch sends an OFPT _ HELLO message to request establishment of OpenFlow connection, and the controller returns an OFPT _ HELLO message to the switch after receiving the OFPT _ HELLO message to establish connection; after the switches and the controller are connected, the controller sends an OFPT _ FEATURES _ REQUEST message to each switch to acquire switch information, wherein the switch information comprises: switch ID (datapath _ ID), buffer size (n _ buffers), number of flow tables (n _ tables), auxiliary connection flag (auxiliary _ ID), statistical information support case, reassembly IP fragment support case, port anti-ring support case (capabilities), and the like; the controller sends an OFPMP _ PORT _ DESC request message to each switch to acquire PORT information of the switch, wherein the PORT information of each PORT comprises: port number (Port _ no), Port MAC address (Hw _ addr), behavior flag (Config), Current State (State), data channel characteristics (Current, updated, Supported, and Peer), Current rate (Current _ speed), and maximum rate (Max _ speed); s1, s2 and s3 return the OFPT _ featurejreply message and the OFPMP _ PORT _ DESC REPLY message to the controller, and the controller stores the switch information and the PORT information thereof according to the OFPT _ featurejreply message and the OFPMP _ PORT _ DESC REPLY message returned by s1, s2 and s3, thereby realizing the purpose of finding the switch PORT by the PORT MAC address.
The OFPT _ FEATURES _ REPLY message is used for the switch to report the switch information to the controller, and the specific result in this embodiment is shown in table 1 below:
table 1 switch OFPT _ FEATURES _ REPLY message
Parameter(s) s1 s2 s3
datapath_id 0x0000000000000001 0x0000000000000002 0x0000000000000003
n_buffers 0 0 0
n_tables 254 254 254
auxiliary_id 0 0 0
capabilities 0x0000004f 0x0000004f 0x0000004f
The OFPMP _ PORT _ DESC reply message is used for the switch to report information of each PORT of the switch to the controller, and the specific result in this embodiment is shown in table 2 below:
table 2 switch OFPMP _ PORT _ DESC reply message
Figure BDA0002098449440000081
2. The SDN controller pre-installs forwarding rules of the topology probing packets including forwarding instructions and speed limit instructions to s1, s2, and s 3. First, a forwarding command is constructed for instructing s1, s2, and s3 to forward the topology probe packet, wherein the forwarding command includes a matching field for matching the topology probe packet arriving at the switch and an action field for modifying the packet header and forwarding the packet. s1 has 2 physical ports, so 2 forwarding instructions are configured for s1, which are set as follows:
1) in the matching domain, the Ethernet protocol type is '0 x88 cc', the Dst MAC is '01: 80: c2:00:00:0 e', the ingress port number is '1'; in the action domain, the topology probe packet is first forwarded to the controller using "OFPActionOutput", the "Src Mac" of the packet header is modified to "6 e:10:41:27:51: e 5", the topology probe packet is forwarded from port 1 using "OFPActionOutput", the "Src Mac" of the packet header is finally modified to "0 e:63:1a: d1:94: ee", and the topology probe packet is forwarded from port 2 using "OFPActionOutput".
2) In the matching domain, the Ethernet protocol type is '0 x88 cc', the Dst MAC is '01: 80: c2:00:00:0 e', and the input port number is '2'; in the action domain, the topology probe packet is first forwarded to the controller using "OFPActionOutput", the "Src Mac" of the packet header is modified to "6 e:10:41:27:51: e 5", the topology probe packet is forwarded from port 1 using "OFPActionOutput", the "Src Mac" of the packet header is finally modified to "0 e:63:1a: d1:94: ee", and the topology probe packet is forwarded from port 2 using "OFPActionOutput".
s2 has 2 physical ports, so 2 forwarding instructions are configured for s2, which are set as follows:
1) in the matching domain, the Ethernet protocol type is '0 x88 cc', the Dst MAC is '01: 80: c2:00:00:0 e', the ingress port number is '1'; in the action domain, the topology probe packet is first forwarded to the controller using "OFPActionOutput", then the "Src Mac" of the packet header is modified to "f 6:6c:50: bc:26: 42", and the topology probe packet is forwarded from Port 1 using "OFPActionOutput", and finally the "Src Mac" of the packet header is modified to "86: 4f: cb: d5:46:5 e", and the topology probe packet is forwarded from Port 2 using "OFPActionOutput".
2) In the matching domain, the Ethernet protocol type is '0 x88 cc', the Dst MAC is '01: 80: c2:00:00:0 e', and the input port number is '2'; in the action domain, the topology probe packet is first forwarded to the controller using "OFPActionOutput", then the "Src Mac" of the packet header is modified to "f 6:6c:50: bc:26: 42", and the topology probe packet is forwarded from Port 1 using "OFPActionOutput", and finally the "Src Mac" of the packet header is modified to "86: 4f: cb: d5:46:5 e", and the topology probe packet is forwarded from Port 2 using "OFPActionOutput".
s3 has 2 physical ports, so 2 forwarding instructions are configured for s3, which are set as follows:
1) in the matching domain, the Ethernet protocol type is '0 x88 cc', the Dst MAC is '01: 80: c2:00:00:0 e', the ingress port number is '1'; in the action domain, the topology detection packet is firstly forwarded to the controller by using 'OFPActionOutput', the 'Src Mac' of the packet header is modified to '06: 18:24: f0: fc:8 c', the topology detection packet is forwarded from the port 1 by using 'OFPActionOutput', the 'Src Mac' of the packet header is finally modified to '6 e: b7:08: e5:5a: d 5', and the topology detection packet is forwarded from the port 2 by using 'OFPActionOutput'.
2) In the matching domain, the Ethernet protocol type is '0 x88 cc', the Dst MAC is '01: 80: c2:00:00:0 e', and the input port number is '2'; in the action domain, the topology detection packet is firstly forwarded to the controller by using 'OFPActionOutput', the 'Src Mac' of the packet header is modified to '06: 18:24: f0: fc:8 c', the topology detection packet is forwarded from the port 1 by using 'OFPActionOutput', the 'Src Mac' of the packet header is finally modified to '6 e: b7:08: e5:5a: d 5', and the topology detection packet is forwarded from the port 2 by using 'OFPActionOutput'.
To solve the ring storm problem of the topology detection packet, the SDN controller needs to pre-install a set of speed limit commands for s1, s2 and s3 for rate control. Setting the current topology discovery period to 1s, accordingly, constructing a speed limit instruction using 'OFPInstructionMeter', and setting the rate size to 1pkt/s, requiring s1, s2, and s3 to drop topology probe packets exceeding the rate, and adding the instruction to the forwarding rules of s1, s2, and s 3.
And after the configuration of the forwarding command and the speed limit command is finished, the configured forwarding rule is issued to s1, s2 and s 3.
3. With reference to fig. 3, the SDN controller selects s1 as a core switch, creates a topology probe Packet only for s1 and sends the Packet to s1 periodically through Packet-Out messages, and the sent Packet does not include fields such as the sessions ID, Port ID, and TTL.
First, the pattern of sending Packet-Out messages by the SDN controller is modified, so that the switch sends a Packet-Out message to s1 only once, where a topology detection Packet is to be contained.
Then, a topology probe packet is constructed. Similar to the structure of LLDP packet, in conjunction with fig. 2, the structure of topology detection packet is composed of dstmac, Src MAC, ethernet protocol type and End, and these four parts are configured as follows: the Dst MAC is configured as "01: 80: c2:00:00: 00:0 e", the Src MAC is configured as "00: 00:00:00:00: 00", the Ethernet protocol type is configured as "0 x88 cc", and the End is configured as 2 dummy bytes ending with a marker packet.
Finally, with reference to fig. 3, the SDN controller sends the constructed Packet-Out message containing the topology probing Packet to the core switch s1, and requests s1 to modify Src MACs of the topology probing Packet header to "6 e:10:41:27:51: e 5" and "0 e:63:1a: d1:94: ee", and then forwards the Packet-Out message from port 1 and port 2, respectively. To implement a periodic topology discovery mechanism, the SDN controller will send constructed topology probe-containing packets to the core switch s1 at 1s cycle. If the quantity of Packet-Out messages sent by the SDN controller is recorded as POUTThen P at this timeOUT1. In the OFDP implementation, the SDN controller creates a Packet-Out message containing an LLDP Packet to each physical port of each switch connected to the SDN controller in the whole network, and with reference to fig. 3, there are 3 OpenFlow switches, and there are 3 physical links between all switches, and each switch has 2 ports, and then there is POUT=6。
4. With reference to fig. 3, the core switch s1 parses the Packet-Out message received from the SDN controller, extracts the topology detection Packet and the forwarding instruction, and forwards the topology detection Packet to s2 and s3 according to the forwarding instruction. Specifically, s1 sends the topology probing Packet to the SDN controller through a Packet-In message, and then modifies Src MAC of the topology probing Packet header to "6 e:10:41:27:51: e 5" and "0 e:63:1a: d1:94: ee", respectively, and forwards from port 1 and port 2, respectively.
5. After receiving the topology detection Packet from s1 from port 1, both s2 and s3 send the topology detection Packet to the SDN controller through a Packet-In message, and then forward the topology detection Packet on the data plane according to a pre-installed forwarding rule. Specifically, s2 receives the topology detection packet from port 1, modifies Src MAC of the packet header of the topology detection packet into 'f 6:6c:50: bc:26: 42' and '86: 4f: cb: d5:46:5 e', and forwards the packet from port 1 and port 2 respectively; s3 receives the topology probe packet from port 1, modifies Src MAC of the topology probe packet header to '06: 18:24: f0: fc:8 c' and '6 e: b7:08: e5:5a: d 5', and forwards from port 1 and port 2, respectively.
Then, s1 receives topology probing packets from s2 and s3 from port 1 and port 2, respectively, and sends the topology probing packets to the SDN controller through Packet-In messages, and when a forwarding rule tries to send the topology probing packets again, since the time length from the last sending of the topology probing packets is less than 1s, the forwarding rule is restricted by the speed limit rule, so that the topology probing packets to be sent are discarded. Likewise, after s2 receives the topology probing Packet from s3 from port 2 and s3 receives the topology probing Packet from s2 from port 2, the topology probing Packet is sent to the SDN controller only through Packet-In messages without modifying and forwarding the topology probing Packet header.
6. The SDN controller calculates topology information after receiving the topology probing packets from s1, s2, and s3, which is as follows:
after receiving the Packet-In message from s2, the SDN controller parses a topology probe Packet from s1 from the Packet-In message, parses a port of s2 receiving the Packet as 1, and then compares Src MAC In the topology probe Packet with stored switch port MAC to determine that the MAC is the same as MAC of port 1 of s1, so that it may be determined that a unidirectional link exists between s1-1 and s 2-1;
after receiving the Packet-In message from s3, the SDN controller parses a topology probe Packet from s1 from the Packet-In message, parses a port of s3 receiving the Packet as 1, and then compares Src MAC In the topology probe Packet with stored switch port MAC, which can determine that the MAC is the same as MAC of port 2 of s1, and thus can determine that a unidirectional link exists between s1-2 and s 3-1;
after receiving the Packet-In message from s1, the SDN controller parses a topology probe Packet from s2 from the Packet-In message, parses a port of s1 receiving the Packet as 1, and then compares Src MAC In the topology probe Packet with stored switch port MAC to determine that the MAC is the same as MAC of port 1 of s2, so that it may be determined that a unidirectional link exists between s2-1 and s 1-1;
after receiving the Packet-In message from s1, the SDN controller parses a topology probe Packet from s3 from the Packet-In message and parses that a port at which s1 receives the Packet is 2, and then compares Src MAC In the topology probe Packet with stored switch port MAC, which can determine that the MAC is the same as MAC of port 1 of s3, and thus can determine that a unidirectional link exists between s3-1 and s 1-2;
after receiving the Packet-In message from s2, the SDN controller parses a topology probe Packet from s3 from the Packet-In message and parses that a port at which s2 receives the Packet is 2, and then compares Src MAC In the topology probe Packet with stored switch port MAC, which can determine that the MAC is the same as MAC of port 2 of s3, and thus can determine that a unidirectional link exists between s3-2 and s 2-2;
after receiving the Packet-In message from s3, the SDN controller parses the topology probe Packet from s2 from the Packet and parses that s3 has a port receiving the Packet as 2, and then compares Src MAC In the topology probe Packet with stored switch port MAC, which may determine that the MAC is the same as MAC of port 2 of s2, and thus may determine that a unidirectional link exists between s2-2 and s 3-2.
So far, the single-cycle topology discovery process is completed, and the link connection mode obtained by the SDN controller is as follows: s1-1 connection s2-1, s1-2 connection s3-1, s2-2 connection s3-2, where each link is a bidirectional link.
In summary, compared with the current topology discovery method in the SDN, the method of the present invention has a shorter topology discovery packet length, lighter controller and control link loads, and requires less topology discovery time.

Claims (3)

1. A software defined network topology detection method is characterized by comprising the following steps:
step 1, a Software Defined Network (SDN) controller establishes connection with a switch, and acquires and stores switch information and switch port information; the method specifically comprises the following steps: the method for establishing the connection between the SDN controller and the switch by utilizing the OpenFlow protocol specifically comprises the following steps:
step 1-1, after the switch is started, the switch is connected with a port of a controller through a TCP (transmission control protocol) request, after the controller is started, the controller confirms the TCP request of the switch, then the switch sends an OFPT _ HELLO message to request for establishing an OpenFlow connection, and after receiving the request, the controller returns an OFPT _ HELLO message to the switch to establish the connection;
step 1-2, the controller sends OFPT _ FEATURES _ REQUEST information to the switch to acquire switch information;
step 1-3, the controller sends an OFPMP _ PORT _ DESC request message to the switch to acquire switch PORT information;
step 1-4, the switch returns an OFPT _ FEATURES _ REPLY message and an OFPMP _ PORT _ DESC REPLY message to the controller, wherein the OFPT _ FEATURES _ REPLY message and the OFPMP _ PORT _ DESC REPLY message are respectively used for reporting the switch information to the controller and reporting each PORT information of the switch to the controller by the switch;
step 1-5, the SDN controller stores the switch information and the PORT information thereof according to the OFPT _ FEATURES _ REPLY message and the OFPMP _ PORT _ DESC REPLY message returned by the switch;
step 2, pre-installing a forwarding rule to each connected switch by the SDN controller, wherein the forwarding rule comprises a forwarding instruction and a speed limit instruction of a topology detection packet; the method specifically comprises the following steps:
step 2-1, constructing a forwarding rule, comprising the following processes:
step 2-1-1, constructing a forwarding instruction to guide the switch to modify and forward the topology detection packet, and adding the forwarding instruction into a forwarding rule, wherein the steps comprise:
(1) the matching domain of the forwarding instruction is set for matching the topology detection packet arriving at the switch, and is set as follows: the Ethernet protocol type is a topology detection protocol number, the destination physical address Dst MAC is a nerest Bridge group address, and the receiving port number is a port number corresponding to each port of the switch;
(2) setting an action domain of a forwarding instruction to modify a packet header and forward the packet, wherein the action domain of the forwarding instruction is set as follows: firstly, directly encapsulating the Packet In a Packet-In message and sending the Packet to an SDN switch; then, adding a packet header modification action aiming at each switch port, sequentially changing a source physical address Src MAC address in the packet header of the topology detection packet into the MAC address of each port of the switch, wherein the action of sending the packet needs to be added when the address is modified each time, and the action is used for sending the topology detection packet to the corresponding port;
step 2-1-2, setting a corresponding speed limit instruction according to the current topology detection period in a self-defined manner, and adding the speed limit instruction into a forwarding rule;
step 2-2, issuing the constructed forwarding rule to all switches connected with the SDN controller to finish pre-installation;
step 3, the SDN controller randomly selects a switch in the network as a core switch, constructs a topology detection Packet for the core switch, and periodically sends the topology detection Packet to the switch through a Packet-Out message so that the SDN controller can continuously update a topology view of the whole network; the method specifically comprises the following steps:
step 3-1, constructing a topology detection group for the core switch, specifically: the topology detection packet structure comprises dstMAC, Src MAC, Ethernet protocol type and End TLV, and the configuration is as follows: configuring Dst MAC as a Nearest Bridge group address, Src MAC as '00: 00:00:00:00: 00', Ethernet protocol type as 0x88cc, and End TLV as two dummy bytes;
step 3-2, modifying a mode of sending a Packet-Out message by the SDN controller to reduce the load of the controller and a control link, specifically: enabling the switch to send Packet-Out messages to the data plane only once, so that the quantity P of the Packet-Out messages sent by the SDN controllerOUTIs reduced to POUT=1;
Step 3-3, acquiring a forwarding instruction corresponding to the topology detection Packet constructed in the step 3-1 according to the step 2 in the step 2-1-1, encapsulating the topology detection Packet and the forwarding instruction in a Packet-Out message in the step 3-2, and periodically sending the Packet-Out message to a core switch by an SDN controller so that the SDN controller can continuously update a topology view of the whole network;
step 4, the core switch forwards the topology detection Packet on the data plane according to the received Packet-Out message of the SDN controller and the forwarding instruction;
step 5, the switch receiving the topology detection Packet of the adjacent switch sends the received topology detection Packet to the SDN controller through Packet-In information, forwards the topology detection Packet on a data plane according to a pre-installed forwarding rule, and forwards the topology detection Packet to the adjacent switch;
step 6, the SDN controller obtains topology information according to the received Packet-In messages of all the switches; the method specifically comprises the following steps:
6-1, the SDN controller analyzes a corresponding topology detection Packet from each received Packet-In message;
step 6-2, grouping topology detection aiming at each Packet-In message:
step 6-2-1, extracting Src MAC information In the topology detection Packet, the switch ID for sending Packet-In information and the port number for the switch to receive the topology detection Packet;
step 6-2-2, according to the switch information and the port information thereof stored In the step 1, searching for a switch ID and a corresponding port number of which the port MAC address is the same as the Src MAC In the step 6-2-1, and if matching information is found, judging that a physical link exists between the found switch port and the port of the switch which sends the Packet-In message In the step 5 and receives the topology detection Packet;
the physical links between all switches, i.e. topology information, are obtained from the network.
2. The method according to claim 1, wherein the switch information of step 1-2 comprises: switch ID, buffer size, flow table number, auxiliary connection flag, statistical information support condition, restructuring IP fragment support condition and port anti-ring support condition;
the port information of steps 1-3 includes: port number, MAC address, behavior flag, current state, data channel characteristics, current rate, and maximum rate.
3. The method for detecting the topology of the software-defined network according to claim 1, wherein the topology detection protocol number of step 2-1-1 is 0x88 cc.
CN201910526644.7A 2019-06-18 2019-06-18 Software defined network topology detection method Active CN110380973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910526644.7A CN110380973B (en) 2019-06-18 2019-06-18 Software defined network topology detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910526644.7A CN110380973B (en) 2019-06-18 2019-06-18 Software defined network topology detection method

Publications (2)

Publication Number Publication Date
CN110380973A CN110380973A (en) 2019-10-25
CN110380973B true CN110380973B (en) 2021-05-04

Family

ID=68249086

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910526644.7A Active CN110380973B (en) 2019-06-18 2019-06-18 Software defined network topology detection method

Country Status (1)

Country Link
CN (1) CN110380973B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112152862B (en) * 2020-10-16 2023-04-07 中国联合网络通信集团有限公司 Topology acquisition method of hybrid network, SDN controller and SDN switch
CN112910682A (en) * 2021-01-04 2021-06-04 中国联合网络通信集团有限公司 Link detection method and switch controller
CN115190088B (en) * 2022-07-13 2023-12-05 浙江农林大学暨阳学院 Switch probability forwarding method based on software defined network

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3036938A4 (en) * 2013-08-23 2017-04-12 Samsung Electronics Co., Ltd. Mobile software defined networking (mobisdn)
CN103763207B (en) * 2014-01-29 2017-03-15 杭州华三通信技术有限公司 Band control connection establishment method and apparatus in software defined network
CN104104718B (en) * 2014-07-02 2017-05-17 北京邮电大学 User autonomous routing customization system based on software-defined network
CN104243270B (en) * 2014-09-25 2017-11-24 新华三技术有限公司 A kind of method and apparatus for establishing tunnel
CN104579977A (en) * 2014-12-23 2015-04-29 广东顺德中山大学卡内基梅隆大学国际联合研究院 Bandwidth constraint multipath routing method and system for SDN controller
CN106302182B (en) * 2015-06-08 2019-06-25 上海宽带技术及应用工程研究中心 Detecting host method and system based on SDN
CN106331018B (en) * 2015-06-30 2019-04-02 上海宽带技术及应用工程研究中心 SDN network detecting host method and system based on load balancing
CN106341330A (en) * 2016-08-30 2017-01-18 广州西麦科技股份有限公司 Topology discovery method and system of SDN controller
CN109428824B (en) * 2017-08-28 2021-09-17 中国电信股份有限公司 Host topology generation method and system
CN108270615A (en) * 2017-12-25 2018-07-10 深圳市泰信通信息技术有限公司 Network equipment beginning method, apparatus and equipment based on SDN network controller

Also Published As

Publication number Publication date
CN110380973A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN108512760B (en) Routing method based on SDN guarantee service QoS
CN110380973B (en) Software defined network topology detection method
US9590888B2 (en) Link keepalive method, controller and switch
US10972357B2 (en) SDN network system, controller, and controlling method
EP2701342A1 (en) Method and system for implementing elastic network interface and interconnection
CN110768823A (en) Software defined network topology discovery method based on LLDP
CN103179046A (en) Data center flow control method and data center flow control system based on openflow
CN105227393B (en) A kind of bidirectional forwarding detection (BFD) method
KR20140106235A (en) Open-flow switch and packet manageing method thereof
CN107508640A (en) Dual loop redundancy self-healing fiber optic network construction method based on Fibre Channel technologies
CN105516025B (en) Path clustering and data transmission method, OpenFlow controller and interchanger end to end
CN112118181B (en) Traffic scheduling method and device
CN104618254A (en) Method and controller capable of avoiding network congestion in software defined network
WO2018219103A1 (en) Method and device for determining link state
CN104717238A (en) Ant colony algorithm-based distributed service composition method in mobile ad hoc network
CN104883304A (en) Method for routing part entangled quantum pair bridging communication network
CN102546409B (en) Method and RB (route bridge) for processing message based on TRILL (Transparent Interconnection of Lots of Links) network
US20050254473A1 (en) Routing within a mobile communication network
WO2012119372A1 (en) Message processing method, device and system
KR101456140B1 (en) Determining method for packet flow in vlan and vlan system using energy saving flow
EP3242443B1 (en) Path continuity determination in an aggregate flow environment
Wu et al. RXstp: A topology discovery mechanism based on rapid spanning tree for SDN in-band control
CN106161065B (en) Path protection switching processing method, device and system and forwarding equipment
CN109347790B (en) Security attack test system and test method for electric power MPLS VPN network
AU2021107039A4 (en) AUTONOMOUS QoS BASEDCATASTROPHIC DISASTERCOMMUNICATION SYSTEM IN MOBILE AD HOC NETWORK USING ANT COLONY OPTIMIZATION

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