WO2016077948A1 - 交换机端口控制方法、装置及系统 - Google Patents
交换机端口控制方法、装置及系统 Download PDFInfo
- Publication number
- WO2016077948A1 WO2016077948A1 PCT/CN2014/091241 CN2014091241W WO2016077948A1 WO 2016077948 A1 WO2016077948 A1 WO 2016077948A1 CN 2014091241 W CN2014091241 W CN 2014091241W WO 2016077948 A1 WO2016077948 A1 WO 2016077948A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- port
- energy saving
- energy
- saving
- setting
- Prior art date
Links
Images
Definitions
- the present invention relates to communication technologies, and in particular, to a switch port control method, apparatus, and system suitable for use in a Software Defined Network (SDN) technology.
- SDN Software Defined Network
- SDN technology allows programming of a network that provides an abstraction layer of the physical network directly to the control elements, allowing the network to be set up and operated by software, such as OpenFlow technology.
- the core idea of SDN technology is to convert the packet forwarding process, which is completely controlled by the switch/router, into an independent process completed by the switch and the controller respectively.
- an OpenFlow Switch (OFS) and an OpenFlow Controller (OFC) are based on the OpenFlow Protocol (OFP).
- the OFC is responsible for the global management, the forwarding rules of the data packets, and the forwarding rules are sent to the OFS through the flow entries. After receiving the flow entries, the OFS searches for the corresponding flow entries for the received data packets. The forwarding rule in the flow entry forwards the data packet. If the OFS cannot find the corresponding flow entry, the OFS forwards the data packet to the OFC. The OFC determines the forwarding rule of the data packet, and determines the forwarding rule. The new flow table entry is sent to the OFS to update the flow entry in the OFS.
- the switch As the core forwarding unit of SDN, the switch has a large number and high power consumption. It has a large proportion of network energy consumption. How to reduce the energy consumption of SDN switches is an urgent demand for operators to reduce capital expenditure (Capital Expenditure, CAPEX for short).
- the embodiments of the present invention provide a method, a device, and a system for controlling a switch port, so as to overcome the problem that the SDN switch as a core forwarding unit has a large energy consumption ratio in the prior art.
- an embodiment of the present invention provides a switch port control method, including:
- the SDN switch receives the energy saving setting message sent by the SDN controller, and the energy saving setting message And including a port number and a power saving indication, where the power saving indication is used to indicate that the port corresponding to the port number is configured to save energy;
- the SDN switch performs energy saving setting on the port according to the energy saving indication, so that the port enters a power saving state.
- the energy saving setting message further includes a power saving rate, where the power saving rate is greater than or equal to zero, and the power saving rate is used to indicate that the rate of the port is adjusted.
- the power saving rate is greater than or equal to zero, and the power saving rate is used to indicate that the rate of the port is adjusted.
- the SDN switch performs energy saving setting on the port according to the energy saving indication, including:
- the SDN switch sets the rate of the port to the energy saving rate according to the energy saving indication.
- the SDN switch before the SDN switch receives the energy saving setting message sent by the SDN controller, the SDN switch further includes:
- the SDN switch sends a port status message to the SDN controller, where the port status message includes a port number corresponding to the port and a power saving status, and the power saving status is used to indicate that the port is ready to enter a power saving state.
- the port status message further includes a desired rate, where the desired rate is used to indicate the desired port Energy saving rate.
- the SDN switch is configured according to the energy saving indication After the port corresponding to the port number is used for energy saving, it also includes:
- the SDN switch sends a power saving setting response message to the SDN controller, where the power saving setting response message includes the port number and energy saving setting a state, the energy saving setting state is used to indicate that the port is in a power saving state.
- the method further includes:
- the SDN switch If the SDN switch fails to perform energy saving setting on the port according to the energy saving indication, the SDN switch sends a setting error message to the SDN controller, where the setting error message includes the port number and a power saving setting error message.
- the energy saving setting error information is used to indicate that the energy saving setting of the port corresponding to the port number fails.
- the method further includes:
- the SDN switch cancels the energy saving setting of the port according to the energy saving cancellation indication, and causes the port to exit the energy saving state.
- the SDN switch cancels the energy saving setting of the port according to the energy saving cancellation indication, including:
- the SDN switch sets the rate of the port to the maximum rate allowed by the port.
- the SDN switch If the SDN switch successfully cancels the energy saving setting of the port according to the energy saving cancellation indication, the SDN switch sends a power saving cancellation response message to the SDN controller, where the energy saving cancellation response message includes the port number and The energy-saving cancellation state is used to indicate that the port corresponding to the port number is a non-power-saving state.
- the SDN switch fails to cancel the energy saving setting of the port according to the energy saving cancellation indication, the SDN switch sends a cancel error message to the SDN controller, where the cancel error message includes the port number and energy saving cancellation Error message, the energy saving cancellation error message is used The power saving setting failed to be indicated on the port corresponding to the port number.
- an embodiment of the present invention provides a switch port control method, including:
- the SDN controller determines to perform energy saving settings on the ports of the SDN switch
- the SDN controller sends a power saving setting message to the SDN switch, where the power saving setting message includes a port number corresponding to the port and a power saving indication, where the power saving indication is used to indicate that the port is energy-saving.
- the SDN controller determines to perform energy saving setting on a port of the SDN switch, including:
- the SDN controller determines, according to its own policy, energy saving settings for the port of the SDN switch.
- the method before the determining, by the SDN controller, the energy saving setting of the port of the SDN switch, the method further includes:
- the SDN controller receives a port status message sent by the SDN switch, where the port status message includes a port number and a power saving state, where the power saving state is used to indicate that the port corresponding to the port number is ready to enter a power saving state;
- the SDN controller determines to perform energy saving settings on the port of the SDN switch, including:
- the SDN controller determines, according to the power saving state that is included in the port status message, that the port corresponding to the port number included in the port status message is energy-saving.
- the energy saving setting message further includes an energy saving rate, where The energy saving rate is greater than or equal to zero, and the energy saving rate is used to indicate that the rate of the port is adjusted to a power saving rate.
- the port status message further includes a desired rate
- the SDN controller determines, according to the expected rate, Energy saving rate.
- the SDN controller sends the SDN switch to the SDN switch After the energy saving setting message, the method further includes:
- an energy saving setting response message sent by the SDN switch where the energy saving setting response message includes a port number and a power saving setting state, where the energy saving setting state is used to refer to The port corresponding to the port number is in a power saving state.
- the SDN controller sends the SDN switch to the SDN switch After the energy saving setting message, the method further includes:
- the SDN controller receives a setting error message sent by the SDN switch, where the setting error message includes the port number and the power saving setting error information, where the power saving setting error information is used to indicate that the port corresponding to the port number is performed. Energy saving settings failed.
- the method further includes:
- the SDN controller sends an energy-saving cancellation message to the SDN switch, where the energy-saving cancellation message includes a port number corresponding to the port and an energy-saving cancellation indication, where the energy-saving cancellation indication is used to indicate that the port corresponding to the port number is cancelled. Energy saving settings.
- the method further includes:
- the SDN controller receives the energy-saving cancellation response message sent by the SDN switch, where the energy-saving cancellation response message includes the port number and a power-saving cancellation state, where the energy-saving cancellation state is used to indicate that the port corresponding to the port number is non- Energy saving status.
- the method further includes:
- an SDN switch including:
- a receiving module configured to receive a power saving setting message sent by the SDN controller, where the power saving setting message includes a port number and a power saving indication, where the power saving indication is used to indicate that the port corresponding to the port number is configured to save energy;
- An energy saving module configured to perform energy saving setting on the port according to the energy saving indication, so that the end The port enters a state of energy saving.
- the energy saving setting message further includes a power saving rate, where the power saving rate is greater than or equal to zero, and the power saving rate is used to indicate that the port number is corresponding to The rate of the port is adjusted to the energy saving rate;
- the energy saving module is configured to set a current rate of the port corresponding to the port number to the energy saving rate according to the energy saving indication.
- the method further includes:
- a determining module configured to determine, according to the port traffic and the traffic threshold of the port, whether the port meets a condition for entering a power saving state
- a sending module configured to send a port status message to the SDN controller, where the determining module determines that the port meets a condition for entering a power saving state, where the port status message includes a port number corresponding to the port and a power saving status,
- the power saving state is used to indicate that the port is ready to enter a power saving state.
- the port status message further includes a desired rate, where the desired rate is used to indicate the desired port Energy saving rate.
- the sending module After the energy saving indication is used to save energy for the port corresponding to the port number, the energy saving indication is further used to:
- the energy saving module successfully performs energy saving setting on the port according to the energy saving indication, sending an energy saving setting response message to the SDN controller, where the energy saving setting response message includes the port number and a power saving setting state,
- the energy saving setting state is used to indicate that the port corresponding to the port number is in a power saving state.
- the sending module After the energy saving indication is used to save energy for the port corresponding to the port number, the energy saving indication is further used to:
- the energy saving module fails to perform energy saving setting on the port according to the energy saving indication, sending a setting error message to the SDN controller, where the setting error message includes the port number and energy saving setting error information, where the energy saving Setting error information is used to indicate the end corresponding to the port number The port failed to save energy.
- the receiving module is further configured to:
- the receiving module is further configured to:
- an energy saving cancellation message where the energy saving cancellation message includes a port number and a power saving cancellation indication, where the energy saving cancellation indication is used to indicate that the energy saving setting of the port corresponding to the port number is canceled;
- the energy saving module is further configured to cancel the energy saving setting of the port according to the energy saving cancellation indication, and cause the port to exit the energy saving state.
- the energy saving module is specifically configured to:
- the rate of the port is set to the maximum rate allowed by the port.
- the sending module cancels, according to the energy saving cancellation instruction, the After the port's energy saving settings, it is also used to:
- the energy saving module successfully cancels the energy saving setting of the port according to the energy saving cancellation indication, sending an energy saving cancellation response message to the SDN controller, where the energy saving cancellation response message includes the port number and an energy saving cancellation state,
- the energy saving cancellation state is used to indicate that the port corresponding to the port number is in a non-power saving state.
- the sending module in the energy saving module, canceling the After the port's energy saving settings, it is also used to:
- the energy saving module cancels the energy saving setting failure of the port according to the energy saving cancellation instruction, sending a cancel error message to the SDN controller, where the cancel error message includes the port number and energy saving cancellation error information, and the energy saving The cancel error message is used to indicate that the power saving setting fails for the port corresponding to the port number.
- an SDN controller including:
- a determining module configured to determine a power saving setting of a port of the SDN switch
- a sending module configured to send a power saving setting message to the SDN switch, where the power saving setting message includes a port number corresponding to the port and a power saving indication, where the power saving indication is used to indicate the The port performs energy saving settings.
- the determining module is specifically configured to:
- the energy saving setting of the port of the SDN switch is determined according to its own policy.
- the method further includes:
- a receiving module configured to receive a port status message sent by the SDN switch, where the port status message includes a port number and a power saving state, where the power saving state is used to indicate that the port corresponding to the port number is ready to enter a power saving state;
- the determining module is configured to: perform energy saving setting on a port corresponding to the port number included in the port status message according to the energy saving state included in the port status message.
- the energy saving setting message further includes an energy saving rate, The energy saving rate is greater than or equal to zero, and the energy saving rate is used to indicate that the rate of the port is adjusted to a power saving rate.
- the port status message further includes a desired rate
- the determining module is further configured to determine, according to the expected rate The energy saving rate.
- the receiving module in the sending module After the SDN switch sends the energy saving setting message, it is further used to:
- the energy saving setting response message sent by the SDN switch, where the energy saving setting response message includes a port number and a power saving setting state, where the power saving setting state is used to indicate that the port corresponding to the port number is in a power saving state.
- the receiving module in the sending module After the SDN switch sends the energy saving setting message, it is further used to:
- the SDN switch And receiving the setting error message sent by the SDN switch, where the setting error message includes the port number and the power saving setting error information, where the power saving setting error information is used to indicate that the energy saving setting fails for the port corresponding to the port number.
- the determining module is further configured to:
- the sending module is further configured to send a power saving cancellation message to the SDN switch, where the power saving cancellation message includes a port number corresponding to the port and an energy saving cancellation indication, where the energy saving cancellation indication is used to indicate that the port number is cancelled.
- the energy saving setting of the corresponding port is further configured to send a power saving cancellation message to the SDN switch, where the power saving cancellation message includes a port number corresponding to the port and an energy saving cancellation indication, where the energy saving cancellation indication is used to indicate that the port number is cancelled.
- the receiving module after the sending module sends the energy saving cancellation message to the SDN switch, Also used for:
- the energy-saving cancellation response message sent by the SDN switch is received, where the energy-saving cancellation response message includes the port number and a power-saving cancellation state, where the energy-saving cancellation state is used to indicate that the port corresponding to the port number is a non-power-saving state.
- the receiving module after the sending module sends the energy saving cancellation message to the SDN switch, Also used for:
- the cancellation error message sent by the SDN switch, where the cancellation error message includes the port number and the energy saving cancellation error information, where the energy saving cancellation error information is used to indicate that the port corresponding to the port number fails to cancel the energy saving setting.
- an SDN switch including:
- an SDN controller including:
- a switch port control method according to any one of the ninth possible implementations.
- the seventh aspect of the present invention provides a switch port control system, including: the SDN switch according to the fifth aspect, and the SDN controller according to the sixth aspect.
- the embodiment provided by the present invention receives the energy saving setting message that is sent by the SDN controller and includes the energy saving indication by using the SDN switch, and performs the corresponding port according to the energy saving indication. Energy-saving settings to achieve flexible control of energy savings on SDN switch ports.
- Embodiment 1 is a flowchart of Embodiment 1 of a method for controlling a switch port according to the present invention
- Embodiment 2 is a flowchart of Embodiment 2 of a method for controlling a switch port according to the present invention
- FIG. 3 is a signaling interaction diagram of Embodiment 3 of a method for controlling a switch port according to the present invention
- Embodiment 4 is a signaling interaction diagram of Embodiment 4 of a switch port control method according to the present invention.
- FIG. 5 is a schematic structural diagram of Embodiment 1 of an SDN switch according to the present invention.
- FIG. 6 is a schematic structural diagram of Embodiment 1 of an SDN controller according to the present invention.
- FIG. 7 is a schematic structural diagram of Embodiment 2 of an SDN switch according to the present invention.
- FIG. 8 is a schematic structural diagram of Embodiment 2 of an SDN controller according to the present invention.
- FIG. 9 is a schematic structural diagram of an embodiment of a switch port control system provided by the present invention.
- the Openflow protocol can be used as the message interaction format between the SDN switch and the SDN controller.
- other protocols can also be used, for example, Simple Network Management Protocol (SNMP), and address separation network protocol (The Locator Identity Separation Protocol (LISP), the Extensible Messaging and Presence Protocol (XMPP), and the Path Computation Element Communication Protocol (PCEP).
- SNMP Simple Network Management Protocol
- LISP Locator Identity Separation Protocol
- XMPP Extensible Messaging and Presence Protocol
- PCEP Path Computation Element Communication Protocol
- Openflow protocol It is the mainstream southbound control mode of SDN.
- the Openflow protocol is used in the description in this example, which does not affect the protection scope of this patent.
- FIG. 1 is a flowchart of a method for controlling a switch port according to a first embodiment of the present invention.
- the implementation of the method is an SDN switch, such as an OFS in the Openflow protocol.
- the method embodiment includes the following steps:
- Step 101 The SDN switch receives the energy saving setting message sent by the SDN controller, where the energy saving setting message includes a port number and a power saving indication, where the power saving indication is used to indicate that the port corresponding to the port number is energy-saving.
- the SDN switch can be OFS
- the SDN controller can be OFC
- the OFC is taken as an example.
- the OFC can use the overall scheduling algorithm to determine whether to send the energy saving setting message to the OFS according to the global situation.
- the OFC sends an energy saving setting message including the port number and the power saving indication to the OFS.
- Step 102 The SDN switch performs energy saving setting on the port according to the energy saving indication, so that the port enters a power saving state.
- the foregoing energy saving setting message may further include an energy saving rate, where the energy saving rate is greater than or equal to zero, and the energy saving rate is used to indicate that the rate of the port is adjusted to a power saving rate;
- step 102 includes:
- the SDN switch sets the rate of the port to the energy saving rate according to the energy saving indication. Wherein, when the energy saving rate is equal to zero, the SDN switch can close the corresponding port.
- the rate of the OFS port can be the maximum rate allowed by the port in the non-power saving state.
- the maximum rate allowed by the port can be 100 megabits per second (Mbps).
- the speed of the port state indication message sent by the OFC to the OFS may be any value greater than or equal to zero and less than the maximum rate, such as
- the energy saving rate can be any value greater than or equal to 0 and less than 1 Gbps.
- the OFS speeds down the port setting, and reduces the rate of the port to an energy saving rate of 10 Mbps.
- the OFS can directly close the port.
- the method embodiment may further include:
- the SDN switch determines whether the port meets the conditions for entering the energy-saving state according to the port traffic and the traffic threshold of the port;
- the SDN switch sends a port status message to the SDN controller, where the port status message includes the port number corresponding to the port and the power-saving status, where the power-saving status is used to indicate that the port is ready to enter the power-saving state,
- the SDN controller that receives the port status message determines that the port is energy-saving according to the power-saving state.
- the SDN switch can monitor the traffic of the port and pre-configure the traffic threshold.
- the traffic threshold can be set according to the ratio of the port traffic in the specified time to the maximum traffic allowed by the port.
- the average traffic of the port can also be based on the specified time.
- the traffic threshold is set by the ratio of the rate to the maximum rate allowed by the port. It is of course possible to set the traffic threshold in other manners to determine whether the port is currently idle or not, and the condition for entering the energy-saving state is satisfied, and the present invention is not limited thereto.
- the ratio of the port traffic to the maximum traffic of the current port is 0.5%
- the traffic threshold is 2. % indicates that the current port traffic is smaller than the traffic threshold. Therefore, it can be determined that the port is currently idle and meets the conditions for entering the energy-saving state.
- the average rate of the port is 1 Mbps within 3 hours
- the maximum rate allowed by the port is 100 Mbps
- the average rate to the maximum rate is 1%
- the traffic threshold is 2%, indicating that the current port traffic is less than the traffic threshold. Therefore, it can be determined that the port is currently relatively idle, and the condition for entering the energy-saving state is satisfied.
- the SDN switch determines that the port meets the condition for entering the power saving state, the SDN switch sends a port status message including the port number and the power saving state to the SDN controller.
- the port status message preferably further includes a desired rate for indicating a power saving rate of the desired port such that the SDN controller receiving the port status message can determine the power saving rate based on the desired rate.
- the method embodiment further includes:
- the SDN switch If the SDN switch successfully performs power saving setting on the port according to the energy saving indication, the SDN switch sends a power saving setting response message to the SDN controller, where the power saving setting response message includes the port number and the power saving setting state, where the power saving setting state is used to indicate that the port is Energy saving status.
- the SDN switch sends a setting error message to the SDN controller, where the setting error message includes a port number and a power saving setting error message, where the power saving setting error information is used to indicate the pair Port corresponding to the port number The energy saving setting failed.
- method embodiment may further include:
- the SDN switch receives the energy-saving cancellation message sent by the SDN controller, and the energy-saving cancellation message includes a port number and a power-saving cancellation indication, where the energy-saving cancellation indication is used to cancel the energy-saving setting of the port corresponding to the port number;
- the SDN switch cancels the energy saving setting of the port according to the energy saving cancellation instruction, so that the port exits the energy saving state.
- the SDN switch cancels the energy saving setting of the port according to the energy saving cancellation indication, including: the SDN switch sets the rate of the port to the maximum rate allowed by the port.
- the SDN switch can also open the port before setting the rate of the port to the maximum rate allowed by the port.
- the energy-saving cancellation message received by the SDN switch may be that the SDN controller determines to cancel the energy-saving setting of the OFS port according to the global situation, so that the SDN switch degrades the port cancellation rate or opens the port. This causes the port to exit the power saving state.
- the method further includes:
- the SDN switch If the SDN switch successfully cancels the energy saving setting of the port according to the energy saving cancellation indication, the SDN switch sends a power saving cancellation response message to the SDN controller, where the energy saving cancellation response message includes a port number and a power saving cancellation state, and the energy saving cancellation state is used to indicate the port number.
- the corresponding port is not energy-saving.
- the SDN switch further includes:
- the SDN switch If the SDN switch fails to cancel the energy saving setting of the port according to the energy saving cancellation instruction, the SDN switch sends a cancel error message to the SDN controller, where the cancel error message includes a port number and a power saving cancellation error message, and the power saving cancellation error information is used to indicate the port The port corresponding to the number fails to cancel the energy saving setting.
- the SDN switch can send an energy saving setting response message including the port number and the energy saving setting state to the SDN controller; if the SDN switch successfully connects to the port Cancel the energy saving setting and make the port exit In the energy-saving state, the current state of the port is not the energy-saving state.
- the SDN switch can send an energy-saving cancellation response message including the port number and the energy-saving cancellation state to the SDN controller.
- the SDN switch may send a setting error message including the port number and the power saving setting error information to the SDN controller or include the port.
- the number and the cancellation error message of the energy-saving cancellation error message are reported to the SDN controller for failing to save the port or failing to save the port.
- the SDN switch is an OFS
- the SDN controller is an OFC.
- the OFS receives the port status indication information that is sent by the OFC, including the energy saving indication or the energy saving cancellation indication, and the port status indication information may further include an energy saving rate, if the port status The indication information includes the energy saving indication, and the OFS reduces the port rate to the energy saving rate according to the energy saving indication.
- the energy saving rate is zero, the port can be directly closed to enable the port to enter the energy saving state. If the port is successfully enabled to enter the energy saving state, the OFS can The OFC returns a port status message containing the energy saving setting status.
- the OFS may return an error message containing the power saving setting error message to the OFC; if the port status indication information includes the energy saving cancellation indication, the OFS may not care about the energy saving rate at this time, and the OFS cancels according to the energy saving. Indicates that the port rate is set to the maximum rate allowed by the port. If the port is currently off, the port is opened, and then the port rate is set to the maximum rate allowed by the port, so that the port is powered off. If the port is successfully enabled When exiting the energy saving state, the OFS can return to the OFC Port status message containing cancel saving state, or OFS may contain an error message is returned to cancel saving error information to the OFC.
- the OFS can also set a traffic threshold, and perform traffic monitoring on the port. If the OFS determines that the port meets the condition of entering the energy-saving state according to the port traffic and the traffic threshold, the port state message including the first power-saving state may be sent to the OFC, so that The OFC can determine whether to save energy on the port according to the energy-saving status in time, so that the port can enter the energy-saving state as soon as possible, thereby improving energy-saving efficiency.
- the foregoing energy saving setting message and the energy saving cancellation message may all adopt a port status indication message, and the difference is that the power saving indication is included; the port status message and the energy saving setting response are The message and the energy-saving cancellation response message may adopt a port status message in a specific implementation, and the difference is that different energy-saving states are included; the above-mentioned setting error message and cancellation error message may adopt an error message in specific implementation, and the difference is that different Energy saving error.
- the port state structure (ofp_port_status) includes a reason field and a port description (desc) field in the ofp_port_status structure, wherein the port structure (ofp_port) to which the desc field belongs includes at least a port number (port_no) field, and a port state. a (state) field, a port current rate (curr_speed) field, and a maximum port rate (max_speed) field.
- the ofp_port_status structure may be described as follows, wherein an ellipsis defined indicates that other relevant information may be included in the actual application. The ellipsis in the subsequent structure indicates the same meaning and will not be described again:
- the port status message in the method embodiment may be optimized based on the port status message ofp_port_status in the OFP, and the save_energy may be added in the reason field to indicate that the port status message is related to port energy saving.
- Port status message, and The port number corresponding to the port for saving energy can be filled in the port number field in the ofp_port structure described by desc, and an enumeration for indicating different energy saving states is added in the state field, such as the energy saving state enumeration save_mode_ready, energy saving Set the state of the save_mode_ok, and save the save state of the save_mode_cancel, for example, the OFS sends a port status message to the OFC, the OFS can send the reason field to the OFC to fill the save_energy, the port number field fills the port number, and in the state field Filling the port status message of save_mode_ready, preferably, the curr_speed field may also be filled with a desired rate.
- the OFS sends a power saving setting response message to the OFC, and the OFS may send the reason field to the OFC to fill the save_energy.
- the port number field is filled with the port number, and the port status message of save_mode_ok is filled in the state field; the OFS sends a power-saving cancellation response message to the OFC, and the OFS can send the reason field to fill the save_energy to the OFC, the port number field fills the port number, and the state field Fill save_mode_canc Port status message for el.
- the embodiment of the present invention may add a port indication structure (ofp_port_ind) and the port status included in the port status indication message.
- the indication structure (ofp_port_status_ind) includes a description (desc) field having an ofp_port_ind structure, wherein the ofp_port_ind structure includes at least a port number (port_no) field that can be used to fill the port number, and can be used to fill a power saving indication or a power saving cancellation indication command ( The command field, and the speed field that can be used to fill the energy saving rate.
- ofp_port_status_ind can be a structure as shown below:
- the OFS can be in the The port number field included in ofp_port_ind fills the port number, and is filled with "allowed” in the command field, and can fill the energy saving rate at speed; when the port status indication message to be sent is the energy saving cancel message, the OFS can The port number field included in ofp_port_ind is filled with the port number, and the command field is filled with "not allowed”. At this time, the speed field may or may not be filled, and the OFS does not care about the rate field when receiving the power-saving cancel message.
- the existing OFP-defined error message (ofp_error_msg) structure is as follows, including at least a type field, an error code field, and a data field.
- the error message structure specified in the above OFP may be adopted, and an error type enumeration for indicating energy saving failure is added on the basis of the error type, for example, the error is represented by ofp_save_energy_failed.
- the type is a power-saving error, and an enumeration is added to indicate different power-saving errors.
- an enumeration degrade_error indicating an energy-saving setting error message may be added, and an enumeration degrade_cancel_error indicating a power-saving cancellation error message may be added.
- the port number in which the data field fails to be filled in the data field may be set. If the port 0 energy saving setting fails, the data first bit (bit) is set to 1, the port 1 energy saving setting fails, the data second bit is set to 1, and so on. to realise.
- the SDN switch receives the energy saving setting message that is sent by the SDN controller, including the port number and the energy saving indication, and performs energy saving setting on the corresponding port according to the energy saving indication, so that the corresponding port enters the energy saving state, and the receiving SDN controller sends the The port number and the energy-saving cancellation message of the energy-saving cancellation instruction cancel the energy-saving setting of the corresponding port according to the energy-saving cancellation instruction, so that the port is out of the energy-saving state, so that the port of the SDN switch can enter the energy-saving state when the network is idle, and the power consumption of the SDN switch port is reduced.
- the SDN switch port is removed from the energy-saving state to ensure the normal operation of the forwarding work, and the flexible control of the energy saving of the SDN switch port is realized.
- FIG. 2 is a flowchart of a method for controlling a switch port according to a second embodiment of the present invention.
- the executor of the method is an SDN controller, for example, an OFC in the Openflow technology, corresponding to the method embodiment shown in FIG.
- the method embodiment includes the following steps:
- Step 201 The SDN controller determines to perform energy saving setting on the port of the SDN switch.
- Step 202 The SDN controller sends a power saving setting message to the SDN switch, where the energy saving setting message includes a port number corresponding to the port and a power saving indication, where the power saving indication is used to indicate that the port is energy-saving.
- step 201 includes:
- the SDN controller determines the energy saving setting of the port of the SDN switch according to its own policy. Specifically, the SDN controller may determine, according to the global situation, an overall scheduling algorithm to perform energy saving settings on the port of the OFS.
- the method embodiment may further include:
- the SDN controller receives the port status message sent by the SDN switch, where the port status message includes a port number and a power saving status, and the power saving status is used to indicate that the port corresponding to the port number is ready to enter a power saving state;
- step 201 includes:
- the SDN controller determines, according to the power saving state included in the port status message, the energy saving setting of the port corresponding to the port number included in the port status message.
- the energy saving setting message may further include an energy saving rate, the energy saving rate is greater than or equal to zero, and the energy saving rate is used to indicate that the rate of the port is adjusted to the energy saving rate.
- the foregoing port status message may further include a desired rate. Accordingly, the SDN controller may determine the energy saving rate according to the expected rate.
- the method further includes:
- the SDN controller receives the energy saving setting response message sent by the SDN switch, and the energy saving setting response message includes a port number and a power saving setting state, where the energy saving setting state is used to indicate that the port corresponding to the port number is in a power saving state.
- step 202 the method further includes:
- the SDN controller receives the setting error message sent by the SDN switch, and the setting error message includes the port number and the power saving setting error information, and the power saving setting error information is used to indicate that the energy saving setting of the port corresponding to the port number fails.
- the method embodiment further includes:
- the SDN controller determines to cancel the energy saving setting of the port of the SDN switch
- the SDN controller sends an energy-saving cancellation message to the SDN switch.
- the energy-saving cancellation message includes a port number corresponding to the port and an energy-saving cancellation indication, and the energy-saving cancellation indication is used to cancel the energy-saving setting of the port corresponding to the port number.
- the method further includes:
- the SDN controller receives the energy-saving cancellation response message sent by the SDN switch, and the energy-saving cancellation response message includes a port number and a power-saving cancellation state, where the energy-saving cancellation state is used to indicate that the port corresponding to the port number is a non-power-saving state.
- the method further includes:
- the SDN controller receives the cancellation error message sent by the SDN switch, and the cancellation error message includes a port number and a power saving cancellation error message, and the energy saving cancellation error message is used to indicate that the port corresponding to the port number fails to cancel the energy saving setting.
- the above port status message, energy saving setting message, energy saving cancellation message, energy saving For the setting response, the energy saving cancellation response message, the setting error message, and the cancellation error message refer to the relevant part in the method embodiment shown in FIG. 1 , and details are not described herein again.
- the SDN controller may not send the energy-saving setting response message or the energy-saving cancellation response message, and the corresponding SDN controller may not receive the energy-saving setting response message or The energy-saving cancel response message.
- the SDN controller can confirm that the SDN switch successfully saves the energy or cancels the energy saving according to the setting error message or canceling the error message sent by the SDN controller to the SDN controller. Settings.
- the energy-saving setting message including the port number and the energy-saving indication is sent to the SDN switch by the SDN controller, so that the SDN switch performs energy-saving setting on the corresponding port according to the energy-saving indication, so that the port enters the energy-saving state, and sends the port to the SDN switch.
- the energy-saving cancellation message of the energy-saving cancellation instruction so that the SDN controller cancels the energy-saving setting of the corresponding port according to the energy-saving cancellation instruction, so that the port exits the energy-saving state, so that the port of the SDN switch enters the energy-saving state when the network is idle, and the SDN switch port is lowered.
- the power consumption makes the SDN switch port exit the energy-saving state during the busy network to ensure the normal operation of the forwarding work, and realizes flexible control of the energy saving of the SDN switch port.
- the following describes the signaling interaction process in the switch port control method provided by the present invention by taking the OFS and the OFC in the Openflow technology as an example.
- FIG. 3 is a signaling interaction diagram of Embodiment 3 of a switch port control method according to the present invention. As shown in FIG. 3, the method embodiment includes the following steps:
- Step 301 The OFS sends a port status message to the OFC, and requests the OFC to perform energy saving setting on the port corresponding to the port number included in the port status message by using the port status message.
- Step 302 The OFC determines to perform energy saving setting on the port, and fills the port number included in the port status message into a port number field of the energy saving setting message;
- Step 303 The OFC sends an energy saving setting message to the OFS, and the energy saving indication included in the energy saving setting message indicates that the port corresponding to the port number included in the energy saving setting message is energy-savingly set;
- Step 304 The OFS performs energy saving setting on the port.
- Step 305a if the OFS power saving setting of the port is successful, the OFS sends a power saving setting response message to the OFC, otherwise step 305b is performed;
- Step 305b The OFS sends a setting error message to the OFC to fail the port energy saving setting. The error message is reported to the OFC.
- step 301 is an optional step. Accordingly, in step 302, the OFC can directly determine the energy saving setting of the port by using the overall scheduling algorithm according to the global situation, and if the OFS saves the port successfully, It is also possible not to perform step 305a.
- the energy saving setting of the OFS idle port can be implemented, so that the idle port is turned off or the rate is reduced to enter the power-saving state, thereby reducing the power consumption of the OFS port.
- Embodiment 4 is a signaling interaction diagram of Embodiment 4 of a switch port control method according to the present invention. As shown in FIG. 4, the method embodiment includes the following steps:
- Step 401 The OFC determines to cancel the energy saving setting of the port, and fills the port number corresponding to the port that is determined to cancel the energy saving setting into the port number field of the energy saving cancellation message;
- Step 402 The OFC sends an energy-saving cancellation message to the OFS, and the energy-saving cancellation message indicates that the energy-saving setting of the port corresponding to the port number included in the energy-saving cancellation message is canceled;
- Step 403 The OFS cancels the energy saving setting of the port.
- Step 404a if the OFS successfully cancels the energy saving setting of the port, the OFS sends an energy saving cancellation response message to the OFC, and reports the non-energy saving status of the port to the OFC, otherwise step 404b is performed;
- Step 404b The OFS sends a cancellation error message to the OFC to report the error information of the failure of the energy saving setting of the canceling port to the OFC.
- step 404a may not be performed.
- the signaling interaction between the OFS and the OFC can ensure that the port that enters the energy-saving state resumes the normal working state when the network is busy, so that the normal forwarding of the OFS is ensured while the port is energy-saving.
- FIG. 5 is a schematic structural diagram of Embodiment 1 of an SDN switch according to the present invention.
- the SDN switch 500 includes: a receiving module 501 and an energy saving module, 502, where
- the receiving module 501 is configured to receive a power saving setting message sent by the SDN controller, where the power saving setting message includes a port number and a power saving indication, where the power saving indication is used to indicate that the port corresponding to the port number is configured to save energy;
- the energy saving module 502 is configured to perform energy saving setting on the port according to the energy saving indication, so that the port enters a power saving state.
- the energy saving setting message further includes an energy saving rate, where the energy saving rate is greater than or equal to zero, and the energy saving rate is used to indicate that a rate of the port corresponding to the port number is adjusted to an energy saving rate;
- the energy saving module 502 is specifically configured to set a current rate of the port corresponding to the port number to the energy saving rate according to the energy saving indication.
- the SDN switch 500 further includes a determining module 503 and a sending module 504, where
- a determining module 503 configured to determine, according to the port traffic and the traffic threshold of the port, whether the port meets a condition for entering a power saving state
- the sending module 504 is configured to send a port status message to the SDN controller if the determining module 503 determines that the port meets a condition for entering a power saving state, where the port status message includes a port number corresponding to the port and saving The state, the power saving state is used to indicate that the port is ready to enter a power saving state, so that the SDN controller that receives the port state message determines whether to perform energy saving setting on the port according to the power saving state.
- the port status message further includes a desired rate
- the expected rate is used to indicate a desired energy saving rate of the port, so that an SDN controller that receives the port status message determines a power saving rate according to the expected rate.
- the sending module 504 is further configured to: after the energy saving module 502 performs energy saving setting on the port corresponding to the port number according to the energy saving indication,
- the energy saving module 502 successfully performs energy saving setting on the port according to the energy saving indication, sending an energy saving setting response message to the SDN controller, where the energy saving setting response message includes the port number and a power saving setting state, where The energy saving setting state is used to indicate that the port is in a power saving state.
- the sending module 504 is further configured to:
- the energy saving module 502 fails to perform energy saving setting on the port according to the energy saving indication, sending a setting error message to the SDN controller, where the setting error message includes the port number and power saving setting error information,
- the power saving setting error message is used to indicate that the energy saving setting of the port corresponding to the port number fails.
- the receiving module 501 is further configured to:
- an energy saving cancellation message where the energy saving cancellation message includes a port number and a power saving cancellation indication, where the energy saving cancellation indication is used to indicate that the energy saving setting of the port corresponding to the port number is canceled;
- the energy saving module 502 is further configured to cancel the energy saving setting of the port according to the energy saving cancellation indication, and cause the port to exit the energy saving state.
- the energy saving module 502 is specifically configured to:
- the rate of the port is set to the maximum rate allowed by the port.
- the sending module 504 is further configured to: after the energy saving module 502 cancels the energy saving setting of the port according to the energy saving cancellation indication:
- the energy saving module 502 successfully cancels the energy saving setting of the port according to the energy saving cancellation indication, sending an energy saving cancellation response message to the SDN controller, where the energy saving cancellation response message includes the port number and the energy saving cancellation state.
- the energy saving cancellation state is used to indicate that the port is in a non-power saving state.
- the sending module 504 is further configured to:
- the energy saving module 502 cancels the energy saving setting failure of the port according to the energy saving cancellation instruction, sending a cancellation error message to the SDN controller, where the cancellation error message includes the port number and energy saving cancellation error information,
- the energy-saving cancellation error message is used to indicate that the power-saving setting of the port corresponding to the port number fails.
- the SDN switch 500 provided in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and may perform the corresponding steps in the technical solution of the method embodiment shown in FIG. 3 or FIG. 4 , and implement the principle and The technical effects are similar and will not be described again.
- FIG. 6 is a schematic structural diagram of Embodiment 1 of an SDN controller according to the present invention.
- the SDN controller 600 includes: a determining module 601 and a sending module 602, where
- a determining module 601 configured to determine, by using a power saving setting, a port of the SDN switch
- the sending module 602 is configured to send a power saving setting message to the SDN switch, where the power saving setting message includes a port number corresponding to the port and a power saving indication, where the power saving indication is used to indicate that the port is energy-saving.
- determining module 601 is specifically configured to:
- the energy saving setting of the port of the SDN switch is determined according to its own policy.
- the SDN controller 600 may further include: a receiving module 603, where
- the receiving module 603 is configured to receive a port status message sent by the SDN switch, where the port status message includes a port number and a power saving state, where the power saving state is used to indicate that the port corresponding to the port number is ready to enter the energy saving state. status;
- the determining module 601 is specifically configured to:
- the energy saving setting message further includes an energy saving rate, the energy saving rate is greater than or equal to zero, and the energy saving rate is used to indicate that the rate of the port is adjusted to a power saving rate.
- the port status message further includes a desired rate
- the determining module 601 is further configured to determine the power saving rate according to the expected rate.
- the receiving module 603 is further configured to: after the sending module 602 sends the energy saving setting message to the SDN switch,
- the energy saving setting response message sent by the SDN switch, where the energy saving setting response message includes a port number and a power saving setting state, where the power saving setting state is used to indicate that the port corresponding to the port number is in a power saving state.
- the receiving module 603 may further be configured to: after the sending module 602 sends the energy saving setting message to the SDN switch:
- the SDN switch And receiving the setting error message sent by the SDN switch, where the setting error message includes the port number and the power saving setting error information, where the power saving setting error information is used to indicate that the energy saving setting fails for the port corresponding to the port number.
- determining module 601 is further configured to:
- the sending module 602 is further configured to send a power saving cancellation message to the SDN switch, where the power saving cancellation message includes a port number corresponding to the port and a power saving cancellation indication, where the energy saving cancellation indication is used to indicate cancellation of the port The energy saving setting of the corresponding port.
- the receiving module 603 is further configured to: after the sending module 602 sends the energy saving cancellation message to the SDN switch,
- the receiving module 603 is further configured to: after the sending module 602 sends the energy saving cancellation message to the SDN switch,
- the cancellation error message sent by the SDN switch, where the cancellation error message includes the port number and the energy saving cancellation error information, where the energy saving cancellation error information is used to indicate that the port corresponding to the port number fails to cancel the energy saving setting.
- the SDN controller 600 provided in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 2, and may perform corresponding steps in the technical solution of the method embodiment shown in FIG. 3 or FIG. The technical effects are similar, and will not be described again.
- FIG. 7 is a schematic structural diagram of Embodiment 2 of an SDN switch according to the present invention.
- the SDN switch 700 includes: a memory 701 and a processor 702 connected through a bus (shown by a thick solid line in FIG. 7).
- the memory 701 is used to store program code
- the processor 702 is used to invoke the program code, and the technical solution of the method embodiment shown in FIG. 1 and the technical solution of the method embodiment shown in FIG. 3 or FIG.
- the corresponding steps and the implementation principles and technical effects are similar, and details are not described herein.
- FIG. 8 is a schematic structural diagram of Embodiment 2 of an SDN controller according to the present invention.
- the SDN controller 800 includes: a memory 801 and a processor connected through a bus (shown by a thick solid line in FIG. 8). 802, wherein the memory 801 is used to store program code, the processor 802 is used to invoke the program code, and the technical solution for performing the method embodiment shown in FIG. 2 is performed, and the method embodiment shown in FIG. 3 or FIG.
- the corresponding steps in the technical solution, the implementation principle and the technical effect are similar, and details are not described herein.
- FIG. 9 is a schematic structural diagram of an embodiment of a switch port control system according to the present invention.
- the port control system 900 includes: an SDN switch 901 and an SDN controller 902, where the SDN switch 901 can be FIG. 5 or FIG. 7.
- the illustrated SDN switch, the SDN controller 902 can be the SDN controller shown in FIG. 6 or FIG. 8 , and can be used to implement the technical solution of the method embodiment shown in FIG. 1 to FIG. 4 , and the implementation principle and technical effect are similar. The details are not repeated here.
- the embodiment of the present invention further provides a computer program product comprising a computer readable medium, the readable medium comprising a set of program codes for performing the steps in the switch port control method shown in FIG. 1 above, and The steps in the method for controlling the switch port shown in FIG. 2 above are performed.
- Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
- a storage medium may be any available media that can be accessed by a computer.
- computer readable media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage media or other magnetic storage device, or can be used for carrying or storing in the form of an instruction or data structure.
- connection may suitably be a computer readable medium.
- the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave
- coaxial cable , fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, wireless, and microwave are included in the fixing of the associated media.
- a disk and a disc include a compact disc (CD), a laser disc, a compact disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, wherein the disc is usually magnetically copied, and the disc is The laser is used to optically replicate the data. Combinations of the above should also be included within the scope of the computer readable media.
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
一种交换机端口控制方法、装置及系统,该方法包括:SDN交换机接收软件定义网络SDN控制器发送的节能设置消息,所述节能设置消息包括端口号以及节能指示,所述节能指示用于指示对所述端口号对应的端口进行节能设置(101);所述SDN交换机根据所述节能指示对所述端口进行节能设置,使所述端口进入节能状态(102)。通过SDN交换机(901)接收SDN控制器(902)发送的包括节能指示的节能设置消息,并根据节能指示对对应的端口进行节能设置,实现了对SDN交换机(901)端口节能的灵活控制。
Description
本发明涉及通信技术,尤其涉及一种适用于软件定义网络(Software Define Network,简称SDN)技术中的交换机端口控制方法、装置及系统。
SDN技术允许对一个网络进行编程,可将物理网络的抽象层直接提供给控制元件,允许通过软件设置和操作网络,例如开放流(OpenFlow)技术。SDN技术的核心思想为,将完全由交换机/路由器控制的数据包转发过程,转化为由交换机和控制器分别完成的独立过程。
例如,在OpenFlow技术中,开放流交换机(OpenFlow Switch,简称:OFS)与开放流控制器(OpenFlow Controller,简称OFC)基于开放流协议(OpenFlow Protocol,简称OFP)进行交互。OFC负责全局管理,制定数据包的转发规则,并将制定的转发规则通过流表项发送给OFS,OFS接收到流表项后,对于接收到的数据包,查找对应的流表项,并按照流表项中的转发规则对数据包进行转发处理,若OFS找不到对应的流表项,则将该数据包转发给OFC,由OFC决定该数据包的转发规则,并将决定的转发规则作为新的流表项下发到OFS,对OFS中的流表项进行更新。
交换机作为SDN的核心转发单元,数量多,功耗大,对于目前网络能耗占比很大,如何降低SDN交换机的能耗是运营商降低资本支出(Capital Expenditure,简称CAPEX)的迫切诉求。
发明内容
有鉴于此,本发明实施例提供一种交换机端口控制方法、装置及系统,以克服解决现有技术中SDN交换机作为核心转发单元能耗占比大的问题。
第一方面,本发明实施例提供一种交换机端口控制方法,包括:
SDN交换机接收SDN控制器发送的节能设置消息,所述节能设置消息
包括端口号以及节能指示,所述节能指示用于指示对所述端口号对应的端口进行节能设置;
所述SDN交换机根据所述节能指示对所述端口进行节能设置,使所述端口进入节能状态。
结合第一方面,在第一方面的第一种可能的实现方式中,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口的速率调整到所述节能速率;
相应地,所述SDN交换机根据所述节能指示对所述端口进行节能设置,包括:
所述SDN交换机根据所述节能指示将所述端口的速率设置为所述节能速率。
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述SDN交换机接收SDN控制器发送的节能设置消息之前,还包括:
所述SDN交换机根据所述端口的端口流量与流量阈值确定所述端口满足进入节能状态的条件;
所述SDN交换机向所述SDN控制器发送端口状态消息,所述端口状态消息包括所述端口对应的端口号以及节能状态,所述节能状态用于指示所述端口准备进入节能状态。
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述端口状态消息还包括期望速率,所述期望速率用于指示期望的所述端口的节能速率。
结合第一方面和第一方面的第一到第三种可能的实现方式中的任一种,在第一方面的第四种可能的实现方式中,所述SDN交换机根据所述节能指示对所述端口号对应的端口进行节能设置之后,还包括:
若所述SDN交换机根据所述节能指示成功对所述端口进行节能设置,则所述SDN交换机向所述SDN控制器发送节能设置响应消息,所述节能设置响应消息包括所述端口号以及节能设置状态,所述节能设置状态用于指示所述端口为节能状态。
结合第一方面和第一方面的第一到第三种可能的实现方式中的任一种,
在第一方面的第五种可能的实现方式中,所述SDN交换机根据所述节能指示对所述端口号对应的端口进行节能设置之后,还包括:
若所述SDN交换机根据所述节能指示对所述端口进行节能设置失败,则所述SDN交换机向所述SDN控制器发送设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端口进行节能设置失败。
结合第一方面和第一方面的第一到第三种可能的实现方式中的任一种,在第一方面的第六种可能的实现方式中,还包括:
所述SDN交换机接收所述SDN控制器发送的节能取消消息,所述节能取消消息包括所述端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置;
所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置,使所述端口退出节能状态。
结合第一方面的第六种可能的实现方式,在第一方面的第七种可能的实现方式中,所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置,包括:
所述SDN交换机将所述端口的速率设置为所述端口允许的最大速率。
结合第一方面的第六或第七种可能的实现方式,在第一方面的第八种可能的实现方式中,所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置之后,还包括:
若所述SDN交换机根据所述节能取消指示成功取消对所述端口的节能设置,则所述SDN交换机向所述SDN控制器发送节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,该节能取消状态用于指示所述端口号对应的端口为非节能状态。
结合第一方面的第六或第七种可能的实现方式,在第一方面的第九种可能的实现方式中,所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置之后,还包括:
若所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置失败,则所述SDN交换机向所述SDN控制器发送取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用
于指示对所述端口号对应的端口取消节能设置失败。
第二方面,本发明实施例提供一种交换机端口控制方法,包括:
SDN控制器确定对SDN交换机的端口进行节能设置;
所述SDN控制器向所述SDN交换机发送节能设置消息,所述节能设置消息包括所述端口对应的端口号以及节能指示,所述节能指示用于指示对所述端口进行节能设置。
结合第二方面,在第二方面的第一种可能的实现方式中,所述SDN控制器确定对所述SDN交换机的端口进行节能设置,包括:
所述SDN控制器根据自身策略确定对所述SDN交换机的端口进行节能设置。
结合第二方面,在第二方面的第二种可能的实现方式中,所述SDN控制器确定对SDN交换机的端口进行节能设置之前,还包括:
所述SDN控制器接收所述SDN交换机发送的端口状态消息,所述端口状态消息包括端口号以及节能状态,所述节能状态用于指示所述端口号对应的端口准备进入节能状态;
所述SDN控制器确定对所述SDN交换机的端口进行节能设置,包括:
所述SDN控制器根据所述端口状态消息包括的节能状态确定对所述端口状态消息包括的端口号对应的端口进行节能设置。
结合第二方面和第二方面的第一到第二种可能的实现方式中的任一种,在第二方面的第三种可能的实现方式中,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口的速率调整到节能速率。
结合第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述端口状态消息还包括期望速率,所述SDN控制器根据所述期望速率确定所述节能速率。
结合第二方面和第二方面的第一到第四种可能的实现方式中的任一种,在第二方面的第五种可能的实现方式中,所述SDN控制器向所述SDN交换机发送所述节能设置消息之后,还包括:
所述SDN控制器接收所述SDN交换机发送的节能设置响应消息,所述节能设置响应消息包括端口号以及节能设置状态,所述节能设置状态用于指
示所述端口号对应的端口为节能状态。
结合第二方面和第二方面的第一到第四种可能的实现方式中的任一种,在第二方面的第六种可能的实现方式中,所述SDN控制器向所述SDN交换机发送所述节能设置消息之后,还包括:
所述SDN控制器接收所述SDN交换机发送的设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端口进行节能设置失败。
结合第二方面和第二方面的第一到第五种可能的实现方式中的任一种,在第二方面的第七种可能的实现方式中,还包括:
所述SDN控制器确定取消对所述SDN交换机的端口的节能设置;
所述SDN控制器向所述SDN交换机发送节能取消消息,所述节能取消消息包括所述端口对应的端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置。
结合第二方面的第七种可能的实现方式,在第二方面的第八种可能的实现方式中,所述SDN控制器向所述SDN交换机发送所述节能取消消息之后,还包括:
所述SDN控制器接收所述SDN交换机发送的节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,所述节能取消状态用于指示所述端口号对应的端口为非节能状态。
结合第二方面的第七种可能的实现方式,在第二方面的第九种可能的实现方式中,所述SDN控制器向所述SDN交换机发送所述节能取消消息之后,还包括:
所述SDN控制器接收所述SDN交换机发送的取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用于指示对所述端口号对应的端口取消节能设置失败。
第三方面,本发明实施例提供一种SDN交换机,包括:
接收模块,用于接收SDN控制器发送的节能设置消息,所述节能设置消息包括端口号以及节能指示,所述节能指示用于指示对所述端口号对应的端口进行节能设置;
节能模块,用于根据所述节能指示对所述端口进行节能设置,使所述端
口进入节能状态。
结合第三方面,在第三方面的第一种可能的实现方式中,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口号对应的端口的速率调整到节能速率;
相应地,所述节能模块,具体用于根据所述节能指示将所述端口号对应的端口的当前速率设置为所述节能速率。
结合第三方面或第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,还包括:
确定模块,用于根据所述端口的端口流量与流量阈值确定所述端口是否满足进入节能状态的条件;
发送模块,用于若所述确定模块确定所述端口满足进入节能状态的条件,则向所述SDN控制器发送端口状态消息,所述端口状态消息包括所述端口对应的端口号以及节能状态,所述节能状态用于指示所述端口准备进入节能状态。
结合第三方面的第二种可能的实现方式,在第三方面的第三种可能的实现方式中,所述端口状态消息还包括期望速率,所述期望速率用于指示期望的所述端口的节能速率。
结合第三方面和第三方面的第一到第三种可能的实现方式中的任一种,在第三方面的第四种可能的实现方式中,所述发送模块,在所述节能模块根据所述节能指示对所述端口号对应的端口进行节能设置之后,还用于:
若所述节能模块根据所述节能指示成功对所述端口进行节能设置,则向所述SDN控制器发送节能设置响应消息,所述节能设置响应消息包括所述端口号以及节能设置状态,所述节能设置状态用于指示所述端口号对应的端口为节能状态。
结合第三方面和第三方面的第一到第三种可能的实现方式中的任一种,在第三方面的第五种可能的实现方式中,所述发送模块,在所述节能模块根据所述节能指示对所述端口号对应的端口进行节能设置之后,还用于:
若所述节能模块根据所述节能指示对所述端口进行节能设置失败,则向所述SDN控制器发送设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端
口进行节能设置失败。
结合第三方面和第三方面的第一到第四种可能的实现方式中的任一种,在第三方面的第六种可能的实现方式中,所述接收模块,还用于:
所述接收模块,还用于:
接收所述SDN控制器发送的节能取消消息,所述节能取消消息包括端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置;
所述节能模块,还用于根据所述节能取消指示取消对所述端口的节能设置,使所述端口退出节能状态。
结合第三方面的第六种可能的实现方式,在第三方面的第七种可能的实现方式中,所述节能模块,具体用于:
将所述端口的速率设置为所述端口允许的最大速率。
结合第三方面的第六或第七种可能的实现方式,在第三方面的第八种可能的实现方式中,所述发送模块,在所述节能模块根据所述节能取消指示取消对所述端口的节能设置之后,还用于:
若所述节能模块根据所述节能取消指示成功取消对所述端口的节能设置,则向所述SDN控制器发送节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,该节能取消状态用于指示所述端口号对应的端口为非节能状态。
结合第三方面的第六或第七种可能的实现方式,在第三方面的第九种可能的实现方式中,所述发送模块,在所述节能模块根据所述节能取消指示取消对所述端口的节能设置之后,还用于:
若所述节能模块根据节能取消指示取消对所述端口的节能设置失败,则向所述SDN控制器发送取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用于指示对所述端口号对应的端口取消节能设置失败。
第四方面,本发明实施例提供一种SDN控制器,包括:
确定模块,用于确定对SDN交换机的端口进行节能设置;
发送模块,用于向所述SDN交换机发送节能设置消息,所述节能设置消息包括所述端口对应的端口号以及节能指示,所述节能指示用于指示对所述
端口进行节能设置。
结合第四方面,在第四方面的第一种可能的实现方式中,所述确定模块,具体用于:
根据自身策略确定对所述SDN交换机的端口进行节能设置。
结合第四方面,在第四方面的第二种可能的实现方式中,还包括:
接收模块,用于接收所述SDN交换机发送的端口状态消息,所述端口状态消息包括端口号以及节能状态,所述节能状态用于指示所述端口号对应的端口准备进入节能状态;
所述确定模块,具体用于:根据所述端口状态消息包括的节能状态确定对所述端口状态消息包括的端口号对应的端口进行节能设置。
结合第四方面和第四方面的第一到第二种可能的实现方式中的任一种,在第四方面的第三种可能的实现方式中,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口的速率调整到节能速率。
结合第四方面的第三种可能的实现方式,在第四方面的第四种可能的实现方式中,所述端口状态消息还包括期望速率,所述确定模块还用于根据所述期望速率确定所述节能速率。
结合第四方面和第四方面的第一到第四种可能的实现方式中的任一种,在第四方面的第五种可能的实现方式中,所述接收模块,在所述发送模块向所述SDN交换机发送所述节能设置消息之后,还用于:
接收所述SDN交换机发送的节能设置响应消息,所述节能设置响应消息包括端口号以及节能设置状态,所述节能设置状态用于指示所述端口号对应的端口为节能状态。
结合第四方面和第四方面的第一到第四种可能的实现方式中的任一种,在第四方面的第六种可能的实现方式中,所述接收模块,在所述发送模块向所述SDN交换机发送所述节能设置消息之后,还用于:
接收所述SDN交换机发送的设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端口进行节能设置失败。
结合第四方面和第四方面的第一到第五种可能的实现方式中的任一种,
在第四方面的第七种可能的实现方式中,所述确定模块,还用于:
确定取消对所述SDN交换机的端口的节能设置;
所述发送模块,还用于向所述SDN交换机发送节能取消消息,所述节能取消消息包括所述端口对应的端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置。
结合第四方面的第七种可能的实现方式,在第四方面的第八种可能的实现方式中,所述接收模块,在所述发送模块向所述SDN交换机发送所述节能取消消息之后,还用于:
接收所述SDN交换机发送的节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,所述节能取消状态用于指示所述端口号对应的端口为非节能状态。
结合第四方面的第七种可能的实现方式,在第四方面的第九种可能的实现方式中,所述接收模块,在所述发送模块向所述SDN交换机发送所述节能取消消息之后,还用于:
接收所述SDN交换机发送的取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用于指示对所述端口号对应的端口取消节能设置失败。
第五方面,本发明实施例提供一种SDN交换机,包括:
通过总线连接的存储器和处理器,其中所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,执行如第一方面以及第一方面的第一到第九种可能的实现方式中的任一项所述的交换机端口控制方法。
第六方面,本发明实施例提供一种SDN控制器,包括:
通过总线连接的存储器和处理器和通信接口,其中,所述存储器用于存储程序代码,所述处理器用于调用所述存储器存储的程序代码,执行如第二方面以及第二方面的第一到第九种可能的实现方式中的任一项所述的交换机端口控制方法。
第七方面,本发明实施例提供一种交换机端口控制系统,包括:如第五方面所述的SDN交换机以及如第六方面所述的SDN控制器。
通过上述方案,本发明提供的实施例,通过SDN交换机接收SDN控制器发送的包括节能指示的节能设置消息,并根据节能指示对对应的端口进行
节能设置,从而实现对SDN交换机端口节能的灵活控制。
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明提供的交换机端口控制方法实施例一的流程图;
图2为本发明提供的交换机端口控制方法实施例二的流程图;
图3为本发明提供的交换机端口控制方法实施例三的信令交互图;
图4为本发明提供的交换机端口控制方法实施例四的信令交互图;
图5为本发明提供的SDN交换机实施例一的结构示意图;
图6为本发明提供的SDN控制器实施例一的结构示意图;
图7为本发明提供的SDN交换机实施例二的结构示意图;
图8为本发明提供的SDN控制器实施例二的结构示意图;
图9为本发明提供的交换机端口控制系统实施例的结构示意图。
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部份实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
SDN中,可以采用Openflow协议作为SDN交换机与SDN控制器之间的消息交互格式,当然也可以采用其他协议,例如,简单网络管理协议(Simple Network Management Protocol,简称SNMP)、名址分离网络协议(Locator Identity Separation Protocol,简称LISP)、可扩展消息处理现场协议(Extensible Messaging and Presence Protocol,简称XMPP)、路径计算单元交互协议(Path Computation Element Communication Protocol,简称PCEP)等。Openflow协议
是SDN比较主流的南向控制方式,为方便描述及理解,本文实施例中均采用Openflow协议进行说明,并不对本专利的保护范围造成影响。
图1为本发明提供的交换机端口控制方法实施例一的流程图,该方法实施例的执行主体为SDN交换机,例如Openflow协议中的OFS,如图1所示,该方法实施例包括以下步骤:
步骤101、SDN交换机接收SDN控制器发送的节能设置消息,该节能设置消息包括端口号以及节能指示,该节能指示用于指示对该端口号对应的端口进行节能设置;
其中,SDN交换机可以为OFS,SDN控制器可以为OFC,以OFC为例,具体的,OFC可以根据全局情况采用整体调度算法确定是否向OFS发送节能设置消息,若确定对OFS的端口进行节能设置,则OFC向OFS发送包含端口号以及节能指示的节能设置消息。
步骤102、SDN交换机根据该节能指示对端口进行节能设置,使该端口进入节能状态。
进一步地,上述节能设置消息还可以包括节能速率,该节能速率大于等于零,该节能速率用于指示将端口的速率调整到节能速率;
相应地,步骤102,包括:
SDN交换机根据节能指示将端口的速率设置为节能速率。其中,在节能速率等于零时,SDN交换机可以关闭对应的端口。
以SDN交换机为OFS为例,通常地,OFS端口的速率在非节能状态下可以是端口允许的最大速率,如端口允许的最大速率可以为100兆比特每秒(Million bits per second,简称Mbps)或者1千兆比特每秒(Giga bit per second,简称Gbps)或者10Gbps,则OFC向OFS发送的端口状态指示消息中包括的节能速率(speed)可以为大于等于零且小于最大速率的任意值,如最大速率为1Gbps时,节能速率可以为大于等于0并且小于1Gbps的任意值,例如当节能速率为10Mbps时,则OFS对端口进行速率降级设置,将端口的速率降低为节能速率即10Mbps,当节能速率为0时,则OFS可以直接关闭端口。
优选地,在步骤101之前,该方法实施例,还可以包括:
SDN交换机根据端口的端口流量与流量阈值确定该端口是否满足进入节能状态的条件;
若确定该端口满足进入节能状态的条件,则SDN交换机向SDN控制器发送端口状态消息,端口状态消息包括端口对应的端口号以及节能状态,该节能状态用于指示该端口准备进入节能状态,以使接收到该端口状态消息的SDN控制器根据该节能状态确定对该端口进行节能设置。
上述SDN交换机可以对端口流量进行监测,并可预先配置流量阈值,其中可以根据指定时间内的端口流量与端口指定时间允许的最大流量的比值来设置流量阈值,也可以根据指定时间端口流量的平均速率与端口允许的最大速率的比值来设置流量阈值。当然也可以为采用其他方式来设置流量阈值来判断端口当前是否比较空闲,而满足进入节能状态的条件,对此本发明不作限定。
举例来说,若监测到当前1小时内端口的端口流量为5M,1小时内该端口允许的最大端口流量为1000M,则当前端口的端口流量与最大流量比值为0.5%,而流量阈值为2%,则表明当前端口流量小于流量阈值,由此可确定该端口当前比较空闲,满足进入节能状态的条件。
再比如说,若检测到3小时内端口的平均速率为1Mbps,端口允许的最大速率为100Mbps,平均速率与最大速率比值为1%,而流量阈值为2%,则表明当前端口流量小于流量阈值,由此可确定该端口当前比较空闲,满足进入节能状态的条件。
若SDN交换机确定端口满足进入节能状态的条件,则SDN交换机向SDN控制器发送包括端口号以及节能状态的端口状态消息。
上述端口状态消息优选地还可以包括期望速率,该期望速率用于指示期望的端口的节能速率,以使接收到端口状态消息的SDN控制器可以根据期望速率确定节能速率。
可选地,步骤102之后,该方法实施例,还包括:
若上述SDN交换机根据节能指示成功对端口进行节能设置,则SDN交换机向SDN控制器发送节能设置响应消息,该节能设置响应消息包括上述端口号以及节能设置状态,该节能设置状态用于指示端口为节能状态。
进一步地,若SDN交换机根据节能指示对端口进行节能设置失败,则SDN交换机向SDN控制器发送设置错误消息,该设置错误消息包括端口号以及节能设置错误信息,该节能设置错误信息用于指示对端口号对应的端口
进行节能设置失败。
进一步地,该方法实施例,还可以包括:
SDN交换机接收SDN控制器发送的节能取消消息,改节能取消消息包括端口号以及节能取消指示,该节能取消指示用于指示取消对端口号对应的端口的节能设置;
SDN交换机根据节能取消指示取消对端口的节能设置,使端口退出节能状态。
其中,SDN交换机根据节能取消指示取消对端口的节能设置,包括:SDN交换机将端口的速率设置为该端口允许的最大速率。
需说明的是,若该端口的速率为0,并且该端口为关闭状态,则SDN交换机还可以在将端口的速率设置为该端口允许的最大速率之前,打开该端口。
此处,SDN交换机接收到的节能取消消息,可以是SDN控制器根据全局情况采用整体调度算法判决确定取消对OFS的端口进行节能设置发出的,以使SDN交换机对端口取消速率降级或者打开端口,从而使端口退出节能状态。
可选地,上述SDN交换机根据节能取消指示取消对端口的节能设置之后,还包括:
若SDN交换机根据节能取消指示成功取消对端口的节能设置,则SDN交换机向SDN控制器发送节能取消响应消息,该节能取消响应消息包括端口号以及节能取消状态,该节能取消状态用于指示端口号对应的端口为非节能状态。
进一步地,SDN交换机根据节能取消指示取消对端口的节能设置之后,还包括:
若SDN交换机根据节能取消指示取消对端口的节能设置失败,则SDN交换机向SDN控制器发送取消错误消息,该取消错误消息包括端口号以及节能取消错误信息,该节能取消错误信息用于指示对端口号对应的端口取消节能设置失败。
具体的,若SDN交换机对端口进行节能设置成功,则端口进入节能状态,可选的,SDN交换机可以向SDN控制器发送包含端口号以及节能设置状态的节能设置响应消息;若SDN交换机成功对端口取消节能设置,使端口退出
节能状态,此时端口的当前状态为非节能状态,则可选的,SDN交换机可以向SDN控制器发送包含端口号以及节能取消状态的节能取消响应消息。若SDN交换机根据节能指示对端口进行节能设置失败或者SDN交换机根据节能取消指示对端口取消节能设置失败,则SDN交换机可以向SDN控制器发送包括端口号以及节能设置错误信息的设置错误消息或者包括端口号以及节能取消错误信息的取消错误消息,以将对端口进行节能设置失败或者对端口取消节能设置失败的原因上报给SDN控制器。
以SDN交换机为OFS,SDN控制器为OFC为例,具体来说,OFS接收OFC发送的包括节能指示或者节能取消指示的端口状态指示信息,该端口状态指示信息还可以包括节能速率,若端口状态指示信息包括节能指示,则OFS根据节能指示将端口速率降低为节能速率,当节能速率为零时则可以直接关闭端口,以使端口进入节能状态,若成功使端口进入节能状态,则OFS可以向OFC返回包含节能设置状态的端口状态消息,否则OFS可以向OFC返回包含节能设置错误信息的错误消息;若端口状态指示信息包括节能取消指示,此时,OFS可以不用关心节能速率,OFS根据节能取消指示将端口速率设置为端口所允许的最大速率,若所述端口当前为关闭状态,则打开端口,然后将端口速率设置为端口所允许的最大速率,以使端口退出节能状态,若成功使端口退出节能状态,则OFS可以向OFC返回包含节能取消状态的端口状态消息,否则OFS可以向OFC返回包含节能取消错误信息的错误消息。优选地,OFS还可以设置流量阈值,对端口进行流量监控,若OFS根据端口流量和流量阈值确定端口满足进入节能状态的条件,则可以向OFC发送包括第一节能状态的端口状态消息,以使OFC可以及时根据节能状态确定是否对端口进行节能设置,从而可以使端口尽早进入节能状态,提高节能效率。
下面以Openflow协议来说明各消息的具体实现方式:上述节能设置消息以及节能取消消息在具体实现时均可以采用端口状态指示消息,其区别在于包括不同的节能指示;上述端口状态消息、节能设置响应消息,以及节能取消响应消息在具体实现时均可以采用端口状态消息,其区别在于包括不同的节能状态;上述设置错误消息和取消错误消息在具体实现时均可以采用错误消息,其区别在于包括不同的节能错误。
现有技术中,OF协议(OF protocol,简称OFP)中的端口状态消息主要
包括端口状态结构体(ofp_port_status),在该ofp_port_status结构体中主要包括reason字段,以及端口描述(desc)字段,其中desc字段所属的端口结构体(ofp_port)至少包括端口号(port_no)字段,端口状态(state)字段,端口当前速率(curr_speed)字段,以及最大端口速率(max_speed)字段,具体的,ofp_port_status结构体可以描述如下,其中省略号(……)表示在实际应用中还可能包括其他相关信息,后续结构体中的省略号表示相同的含义,不再赘述:
具体实现时,本方法实施例中的端口状态消息可以在上述OFP中的端口状态消息ofp_port_status的基础上进行优化,可以在reason字段新增枚举save_energy,以表明该端口状态消息为与端口节能相关的端口状态消息,并
且可以在desc所述的ofp_port结构体中的端口号字段填写进行节能设置的端口对应的端口号,在state字段新增用于表示不同节能状态的枚举,如节能状态的枚举save_mode_ready,节能设置状态的枚举save_mode_ok,以及节能取消状态的枚举save_mode_cancel,举例来说,OFS向OFC发送端口状态消息,则OFS可以向OFC发送reason字段填充save_energy,端口号字段填充端口号,并且在state字段填充save_mode_ready的端口状态消息,优选地,还可以在curr_speed字段填充期望速率,如期望速率填充0,则表示期望关闭端口;OFS向OFC发送节能设置响应消息,则OFS可以向OFC发送reason字段填充save_energy,端口号字段填充端口号,并且在state字段填充save_mode_ok的端口状态消息;OFS向OFC发送节能取消响应消息,则OFS可以向OFC发送reason字段填充save_energy,端口号字段填充端口号,并且在state字段填充save_mode_cancel的端口状态消息。
现有的OFP协议中,不存在端口状态指示消息,对于OFC发送的端口状态指示消息,本发明实施例可以通过新增端口指示结构体(ofp_port_ind),并在端口状态指示消息中包括的端口状态指示结构体(ofp_port_status_ind)中包括具有ofp_port_ind结构的描述(desc)字段,其中ofp_port_ind结构体中至少包括可用于填充端口号的端口号(port_no)字段,可用于填充节能指示或节能取消指示的命令(command)字段,以及可用于填充节能速率的速率(speed)字段,具体的,ofp_port_status_ind可以为如下所示的结构体:
具体发送端口状态指示消息时,如可以用“Allowed”表示节能指示的枚举,“not allowed”表示节能取消指示的枚举,当要发送的端口状态指示消息为节能设置消息,则OFS可以在ofp_port_ind中包括的端口号字段填充端口号,并在指令(command)字段填充“allowed”,并且可以在速率(speed)填充节能速率;当要发送的端口状态指示消息为节能取消消息,则OFS可以在ofp_port_ind中包括的端口号字段填充端口号,并在指令(command)字段填充“not allowed”,此时speed字段可以填充也可以不填充,OFS在接收到节能取消消息时也不用关心速率字段。
现有的OFP规定的错误消息(ofp_error_msg)结构体如下所示,至少包括类型(type)字段,错误码(code)字段以及数据(data)字段。
本发明实施例的设置错误消息和取消错误消息,可以采用上述OFP中规定的的错误消息结构体,并在此基础上新增用于表示节能失败的错误类型枚举,如用ofp_save_energy_failed表示该错误类型为节能错误,并且新增用于表示不同节能错误的枚举,例如,可以增加表示节能设置错误信息的枚举degrade_error,表示节能取消错误信息的枚举degrade_cancel_error。具体发送设置错误消息或者取消错误消息时,可以在在设置错误消息或者取消错误消息中的type字段填充ofp_save_energy_failed,并在code字段填充相应的错误degrade_error或者degrade_cancel_error,而节能设置失败的端口号则可以填
充在data字段。
其中,上述在data字段填充节能设置失败的端口号,可以采用若端口0节能设置失败则data第1位(bit)置1,端口1节能设置失败则data第2bit置1,以此类推的方式来实现。
需说明的是,上述枚举字段仅为本发明的一些优选实施例,还可以采用其他不同于常规的特殊字段用于端口状态信息交互以对请求关闭端口或者对端口进行速率降级,以实现对端口的节能控制,对此本发明不作限制。
本实施例,通过SDN交换机接收SDN控制器发送的包括端口号以及节能指示的节能设置消息,并根据节能指示对对应的端口进行节能设置使对应端口进入节能状态,并且接收SDN控制器发送的包括端口号以及节能取消指示的节能取消消息,根据节能取消指示取消对应端口的节能设置使端口退出节能状态,从而可以在网络空闲时使SDN交换机的端口进入节能状态,降低SDN交换机端口的功耗,在网络繁忙时使SDN交换机端口退出节能状态保证转发工作的正常运行,实现了对SDN交换机端口节能的灵活控制。
图2为本发明提供的交换机端口控制方法实施例二的流程图,该方法实施例的执行主体为SDN控制器,例如Openflow技术中的OFC,与图1所示的方法实施例对应,如图2所示,该方法实施例包括以下步骤:
步骤201、SDN控制器确定对SDN交换机的端口进行节能设置;
步骤202、SDN控制器向SDN交换机发送节能设置消息,节能设置消息包括端口对应的端口号以及节能指示,节能指示用于指示对端口进行节能设置。
其中,步骤201,包括:
SDN控制器根据自身策略确定对SDN交换机的端口进行节能设置。具体的,SDN控制器可以根据全局情况采用整体调度算法确定对OFS的端口进行节能设置。
或者,在步骤201之前,本方法实施例还可以包括:
SDN控制器接收SDN交换机发送的端口状态消息,端口状态消息包括端口号以及节能状态,节能状态用于指示所述端口号对应的端口准备进入节能状态;
相应地,步骤201,包括:
SDN控制器根据端口状态消息包括的节能状态确定对端口状态消息包括的端口号对应的端口进行节能设置。
进一步地,节能设置消息还可以包括节能速率,节能速率大于等于零,节能速率用于指示将端口的速率调整到节能速率。其中,上述端口状态消息还可以包括期望速率,相应的,SDN控制器可以根据该期望速率来确定节能速率。
可选地,步骤202之后,还包括:
SDN控制器接收SDN交换机发送的节能设置响应消息,节能设置响应消息包括端口号以及节能设置状态,节能设置状态用于指示端口号对应的端口为节能状态。
进一步地,步骤202之后,还包括:
SDN控制器接收SDN交换机发送的设置错误消息,设置错误消息包括端口号以及节能设置错误信息,节能设置错误信息用于指示对端口号对应的端口进行节能设置失败。
更进一步地,该方法实施例,还包括:
SDN控制器确定取消对SDN交换机的端口的节能设置;
SDN控制器向SDN交换机发送节能取消消息,节能取消消息包括端口对应的端口号以及节能取消指示,节能取消指示用于指示取消对端口号对应的端口的节能设置。
其中,可选地,上述SDN控制器向SDN交换机发送所述节能取消消息之后,还包括:
SDN控制器接收SDN交换机发送的节能取消响应消息,节能取消响应消息包括端口号以及节能取消状态,节能取消状态用于指示端口号对应的端口为非节能状态。
进一步地,上述SDN控制器向SDN交换机发送所述节能取消消息之后,还包括:
SDN控制器接收SDN交换机发送的取消错误消息,取消错误消息包括端口号以及节能取消错误信息,节能取消错误信息用于指示对端口号对应的端口取消节能设置失败。
具体实现时,上述端口状态消息、节能设置消息,节能取消消息,节能
设置响应,节能取消响应消息,设置错误消息以及取消错误消息,可参照图1所示方法实施例中相关的部分,具体不再赘述。
需说明的是,在SDN控制器向SDN交换机发送节能取消消息之后,SDN控制器也可以不发送节能设置响应消息或者节能取消响应消息,相应的SDN控制器也会接收不到节能设置响应消息或者节能取消响应消息,此时,SDN控制器可以根据若SDN控制器也没有接收到SDN交换机向SDN控制器发送的设置错误消息或者取消错误消息来确认SDN交换机对端口成功进行了节能设置或者取消节能设置。
本方法实施例,通过SDN控制器向SDN交换机发送包括端口号以及节能指示的节能设置消息,使得SDN交换机根据节能指示对对应的端口进行节能设置使端口进入节能状态,并且向SDN交换机发送包括端口号以及节能取消指示的节能取消消息,使得SDN控制器根据节能取消指示对对应的端口取消节能设置使端口退出节能状态,从而可以在网络空闲时使SDN交换机的端口进入节能状态,降低SDN交换机端口的功耗,在网络繁忙时使SDN交换机端口退出节能状态保证转发工作的正常运行,实现了对SDN交换机端口节能的灵活控制。
下面以Openflow技术中的OFS和OFC为例,对本发明提供的交换机端口控制方法中的信令交互过程进行具体说明。
图3为本发明提供的交换机端口控制方法实施例三的信令交互图,如图3所示,该方法实施例包括以下步骤:
步骤301、OFS向OFC发送端口状态消息,通过端口状态消息向OFC请求对端口状态消息包括的端口号对应的端口进行节能设置;
步骤302、OFC确定对端口进行节能设置,并将端口状态消息包括的端口号填充到节能设置消息的端口号字段;
步骤303、OFC向OFS发送节能设置消息,通过节能设置消息包括的节能指示指示对节能设置消息包括的端口号对应的端口进行节能设置;
步骤304、OFS对端口进行节能设置;
步骤305a、若OFS对端口进行节能设置成功,则OFS向OFC发送节能设置响应消息,否则执行步骤305b;
步骤305b、OFS向OFC发送设置错误消息,以将端口节能设置失败的
错误信息上报给OFC。
需说明的是,本实施例中步骤301为可选步骤,相应地,步骤302中OFC可以直接根据全局情况采用整体调度算法确定允许对端口进行节能设置,并且若OFS对端口进行节能设置成功,也可以不执行步骤305a。
本实施例,通过OFS与OFC之间的信令交互,可以实现对OFS空闲端口进行节能设置,使得空闲端口被关闭或者降低速率进入节能状态,从而降低OFS端口的功耗。
图4为本发明提供的交换机端口控制方法实施例四的信令交互图,如图4所示,该方法实施例包括以下步骤:
步骤401、OFC确定取消对端口进行节能设置,并将确定取消节能设置的端口对应的端口号填充到节能取消消息的端口号字段;
步骤402、OFC向OFS发送节能取消消息,通过节能取消消息指示取消对节能取消消息包括的端口号对应的端口的节能设置;
步骤403、OFS取消对端口的节能设置;
步骤404a、若OFS成功取消对端口的节能设置,则OFS向OFC发送节能取消响应消息,将端口的非节能状态汇报给OFC,否则执行步骤404b;
步骤404b、OFS向OFC发送取消错误消息,以将取消端口的节能设置失败的错误信息上报给OFC。
需说明的是,本实施例中若OFS对端口进行节能设置成功,也可以不执行步骤404a。
本方法实施例,通过OFS与OFC之间的信令交互,可以使得进入节能状态的端口,在网络繁忙时,恢复正常工作状态,使得在对端口进行节能的同时,保证OFS的正常转发工作。
图5为本发明提供的SDN交换机实施例一的结构示意图,如图5所示,该SDN交换机500包括:接收模块501和节能模块,502,其中,
接收模块501,用于接收SDN控制器发送的节能设置消息,该节能设置消息包括端口号以及节能指示,节能指示用于指示对端口号对应的端口进行节能设置;
节能模块502,用于根据所述节能指示对所述端口进行节能设置,使所述端口进入节能状态。
进一步地,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口号对应的端口的速率调整到节能速率;
相应地,所述节能模块502,具体用于根据所述节能指示将所述端口号对应的端口的当前速率设置为所述节能速率。
优选地,该SDN交换机500,还可以包括确定模块503和发送模块504,其中,
确定模块503,用于根据所述端口的端口流量与流量阈值确定所述端口是否满足进入节能状态的条件;
发送模块504,用于若所述确定模块503确定所述端口满足进入节能状态的条件,则向所述SDN控制器发送端口状态消息,所述端口状态消息包括所述端口对应的端口号以及节能状态,节能状态用于指示端口准备进入节能状态,以使接收到所述端口状态消息的SDN控制器根据节能状态确定是否对端口进行节能设置。
优选地,所述端口状态消息还包括期望速率,所述期望速率用于指示期望的所述端口的节能速率,以使接收到所述端口状态消息的SDN控制器根据所述期望速率确定节能速率。
可选地,所述发送模块504,在所述节能模块502根据所述节能指示对所述端口号对应的端口进行节能设置之后,还用于:
若所述节能模块502根据所述节能指示成功对所述端口进行节能设置,则向所述SDN控制器发送节能设置响应消息,所述节能设置响应消息包括所述端口号以及节能设置状态,所述节能设置状态用于指示所述端口为节能状态。
进一步地,所述发送模块504,在所述节能模块502根据所述节能指示对所述端口号对应的端口进行节能设置之后,还用于:
若所述节能模块502根据所述节能指示对所述端口进行节能设置失败,则向所述SDN控制器发送设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端口进行节能设置失败。
进一步地,所述接收模块501,还用于:
接收所述SDN控制器发送的节能取消消息,所述节能取消消息包括端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置;
所述节能模块502,还用于根据所述节能取消指示取消对所述端口的节能设置,使所述端口退出节能状态。
进一步地,所述节能模块502,具体用于:
将所述端口的速率设置为所述端口允许的最大速率。
优选地,所述发送模块504,在节能模块502根据节能取消指示取消对所述端口的节能设置之后,还用于:
若所述节能模块502根据所述节能取消指示成功取消对所述端口的节能设置,则向所述SDN控制器发送节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,该节能取消状态用于指示所述端口为非节能状态。
进一步地,所述发送模块504,在所述节能模块502根据所述节能取消指示取消对所述端口的节能设置之后,还用于:
若所述节能模块502根据节能取消指示取消对所述端口的节能设置失败,则向所述SDN控制器发送取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用于指示对所述端口号对应的端口取消节能设置失败。
本实施例中所述提供的SDN交换机500可用于执行图1所示方法实施例的技术方案,并且可以执行图3或图4所示方法实施例的技术方案中相应的步骤,其实现原理和技术效果是类似的,具体不再赘述。
图6为本发明提供的SDN控制器实施例一的结构示意图,如图6所示,该SDN控制器600包括:确定模块601和发送模块602,其中,
确定模块601,用于确定对SDN交换机的端口进行节能设置;
发送模块602,用于向SDN交换机发送节能设置消息,所述节能设置消息包括所述端口对应的端口号以及节能指示,所述节能指示用于指示对所述端口进行节能设置。
进一步地,所述确定模块601,具体用于:
根据自身策略确定对所述SDN交换机的端口进行节能设置。
进一步地,该SDN控制器600,还可以包括:接收模块603,其中,
优选地,该接收模块603,用于接收所述SDN交换机发送的端口状态消息,所述端口状态消息包括端口号以及节能状态,所述节能状态用于指示所述端口号对应的端口准备进入节能状态;
所述确定模块601,具体用于:
根据所述端口状态消息包括的节能状态确定对所述端口状态消息包括的端口号对应的端口进行节能设置。
进一步地,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口的速率调整到节能速率。
优选地,所述端口状态消息还包括期望速率,所述确定模块601还用于根据所述期望速率确定所述节能速率。
可选地,所述接收模块603,在所述发送模块602向所述SDN交换机发送所述节能设置消息之后,还用于:
接收所述SDN交换机发送的节能设置响应消息,所述节能设置响应消息包括端口号以及节能设置状态,所述节能设置状态用于指示所述端口号对应的端口为节能状态。
或者,进一步地,所述接收模块603,在所述发送模块602向所述SDN交换机发送所述节能设置消息之后,还可以用于:
接收所述SDN交换机发送的设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端口进行节能设置失败。
进一步地,所述确定模块601,还用于:
确定取消对所述SDN交换机的端口的节能设置;
所述发送模块602,还用于向所述SDN交换机发送节能取消消息,所述节能取消消息包括所述端口对应的端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置。
可选地,所述接收模块603,在所述发送模块602向所述SDN交换机发送所述节能取消消息之后,还用于:
接收所述SDN交换机发送的节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,所述节能取消状态用于指示所述端口号
对应的端口为非节能状态。
或者,进一步地,所述接收模块603,在所述发送模块602向所述SDN交换机发送所述节能取消消息之后,还用于:
接收所述SDN交换机发送的取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用于指示对所述端口号对应的端口取消节能设置失败。
本实施例中所述提供的SDN控制器600可用于执行图2所示方法实施例的技术方案,并且可以执行图3或图4所示方法实施例的技术方案中相应的步骤,其实现原理和技术效果是类似的,具体不再赘述。
图7为本发明提供的SDN交换机实施例二的结构示意图,如图7所示,该SDN交换机700包括:通过总线(如图7中粗实线所示)连接的存储器701和处理器702,其中所述存储器701用于存储程序代码,所述处理器702用于调用所述程序代码,执行图1所示方法实施例的技术方案,和图3或图4所示方法实施例的技术方案中相应的步骤,其实现原理和技术效果是类似的,具体不再赘述。
图8为本发明提供的SDN控制器实施例二的结构示意图,如图8所示,该SDN控制器800包括:通过总线(如图8中粗实线所示)连接的存储器801和处理器802,其中所述存储器801用于存储程序代码,所述处理器802用于调用所述程序代码,执行执行图2所示方法实施例的技术方案,和图3或图4所示方法实施例的技术方案中相应的步骤,其实现原理和技术效果是类似的,具体不再赘述。
图9为本发明提供的交换机端口控制系统实施例的结构示意图,如图9所示,该端口控制系统900包括:SDN交换机901和SDN控制器902,其中SDN交换机901可以为图5或图7所示的SDN交换机,SDN控制器902可以为图6或图8所示的SDN控制器,可以用于执行图1至图4所示方法实施例的技术方案,其实现原理和技术效果是类似的,具体不再赘述。
本发明实施例还给出一种计算机程序产品,该计算机程序产品包括计算机可读介质,该可读介质包括一组程序代码,用于执行上述图1所示交换机端口控制方法中的步骤,和用于执行上述图2所示交换机端口控制方法中的步骤。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括RAM、ROM、EEPROM、CD-ROM或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本发明所使用的,盘(Disk)和碟(disc)包括压缩光碟(CD)、激光碟、光碟、数字通用光碟(DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。
Claims (43)
- 一种交换机端口控制方法,其特征在于,包括:软件定义网络SDN交换机接收软件定义网络SDN控制器发送的节能设置消息,所述节能设置消息包括端口号以及节能指示,所述节能指示用于指示对所述端口号对应的端口进行节能设置;所述SDN交换机根据所述节能指示对所述端口进行节能设置,使所述端口进入节能状态。
- 根据权利要求1所述的方法,其特征在于,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口的速率调整到所述节能速率;相应地,所述SDN交换机根据所述节能指示对所述端口进行节能设置,包括:所述SDN交换机根据所述节能指示将所述端口的速率设置为所述节能速率。
- 根据权利要求1或2所述的方法,其特征在于,所述SDN交换机接收SDN控制器发送的节能设置消息之前,还包括:所述SDN交换机根据所述端口的端口流量与流量阈值确定所述端口满足进入节能状态的条件;所述SDN交换机向所述SDN控制器发送端口状态消息,所述端口状态消息包括所述端口对应的端口号以及节能状态,所述节能状态用于指示所述端口准备进入节能状态。
- 根据权利要求3所述的方法,其特征在于,所述端口状态消息还包括期望速率,所述期望速率用于指示期望的所述端口的节能速率。
- 根据权利要求1至4任一项所述的方法,其特征在于,所述SDN交换机根据所述节能指示对所述端口号对应的端口进行节能设置之后,还包括:若所述SDN交换机根据所述节能指示成功对所述端口进行节能设置,则所述SDN交换机向所述SDN控制器发送节能设置响应消息,所述节能设置响应消息包括所述端口号以及节能设置状态,所述节能设置状态用于指示所述端口为节能状态。
- 根据权利要求1至4任一项所述的方法,其特征在于,所述SDN交 换机根据所述节能指示对所述端口号对应的端口进行节能设置之后,还包括:若所述SDN交换机根据所述节能指示对所述端口进行节能设置失败,则所述SDN交换机向所述SDN控制器发送设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端口进行节能设置失败。
- 根据权利要求1至5任一项所述的方法,其特征在于,还包括:所述SDN交换机接收所述SDN控制器发送的节能取消消息,所述节能取消消息包括所述端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置;所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置,使所述端口退出节能状态。
- 根据权利要求7所述的方法,其特征在于,所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置,包括:所述SDN交换机将所述端口的速率设置为所述端口允许的最大速率。
- 根据权利要求7或8所述的方法,其特征在于,所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置之后,还包括:若所述SDN交换机根据所述节能取消指示成功取消对所述端口的节能设置,则所述SDN交换机向所述SDN控制器发送节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,该节能取消状态用于指示所述端口号对应的端口为非节能状态。
- 根据权利要求7或8所述的方法,其特征在于,所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置之后,还包括:若所述SDN交换机根据所述节能取消指示取消对所述端口的节能设置失败,则所述SDN交换机向所述SDN控制器发送取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用于指示对所述端口号对应的端口取消节能设置失败。
- 一种交换机端口控制方法,其特征在于,包括:软件定义网络SDN控制器确定对软件定义网络SDN交换机的端口进行节能设置;所述SDN控制器向所述SDN交换机发送节能设置消息,所述节能设置 消息包括所述端口对应的端口号以及节能指示,所述节能指示用于指示对所述端口进行节能设置。
- 根据权利要求11所述的方法,其特征在于,所述SDN控制器确定对所述SDN交换机的端口进行节能设置,包括:所述SDN控制器根据自身策略确定对所述SDN交换机的端口进行节能设置。
- 根据权利要求11所述的方法,其特征在于,所述SDN控制器确定对软件定义网络SDN交换机的端口进行节能设置之前,还包括:所述SDN控制器接收所述SDN交换机发送的端口状态消息,所述端口状态消息包括端口号以及节能状态,所述节能状态用于指示所述端口号对应的端口准备进入节能状态;所述SDN控制器确定对所述SDN交换机的端口进行节能设置,包括:所述SDN控制器根据所述端口状态消息包括的节能状态确定对所述端口状态消息包括的端口号对应的端口进行节能设置。
- 根据权利要求11至13任一项所述的方法,其特征在于,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口的速率调整到节能速率。
- 根据权利要求14所述的方法,其特征在于,所述端口状态消息还包括期望速率,所述SDN控制器根据所述期望速率确定所述节能速率。
- 根据权利要求11至15任一项所述的方法,其特征在于,所述SDN控制器向所述SDN交换机发送所述节能设置消息之后,还包括:所述SDN控制器接收所述SDN交换机发送的节能设置响应消息,所述节能设置响应消息包括端口号以及节能设置状态,所述节能设置状态用于指示所述端口号对应的端口为节能状态。
- 根据权利要求11至15任一项所述的方法,其特征在于,所述SDN控制器向所述SDN交换机发送所述节能设置消息之后,还包括:所述SDN控制器接收所述SDN交换机发送的设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端口进行节能设置失败。
- 根据权利要求11至16任一项所述的方法,其特征在于,还包括:所述SDN控制器确定取消对所述SDN交换机的端口的节能设置;所述SDN控制器向所述SDN交换机发送节能取消消息,所述节能取消消息包括所述端口对应的端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置。
- 根据权利要求18所述的方法,其特征在于,所述SDN控制器向所述SDN交换机发送所述节能取消消息之后,还包括:所述SDN控制器接收所述SDN交换机发送的节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,所述节能取消状态用于指示所述端口号对应的端口为非节能状态。
- 根据权利要求18所述的方法,其特征在于,所述SDN控制器向所述SDN交换机发送所述节能取消消息之后,还包括:所述SDN控制器接收所述SDN交换机发送的取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用于指示对所述端口号对应的端口取消节能设置失败。
- 一种软件定义网络SDN交换机,其特征在于,包括:接收模块,用于接收软件定义网络SDN控制器发送的节能设置消息,所述节能设置消息包括端口号以及节能指示,所述节能指示用于指示对所述端口号对应的端口进行节能设置;节能模块,用于根据所述节能指示对所述端口进行节能设置,使所述端口进入节能状态。
- 根据权利要求21所述的SDN交换机,其特征在于,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口号对应的端口的速率调整到节能速率;相应地,所述节能模块,具体用于根据所述节能指示将所述端口号对应的端口的当前速率设置为所述节能速率。
- 根据权利要求21或22所述的SDN交换机,其特征在于,还包括:确定模块,用于根据所述端口的端口流量与流量阈值确定所述端口是否满足进入节能状态的条件;发送模块,用于若所述确定模块确定所述端口满足进入节能状态的条件,则向所述SDN控制器发送端口状态消息,所述端口状态消息包括所述端口对 应的端口号以及节能状态,所述节能状态用于指示所述端口准备进入节能状态。
- 根据权利要求23所述的SDN交换机,其特征在于,所述端口状态消息还包括期望速率,所述期望速率用于指示期望的所述端口的节能速率。
- 根据权利要求21至24任一项所述的SDN交换机,其特征在于,所述发送模块,在所述节能模块根据所述节能指示对所述端口号对应的端口进行节能设置之后,还用于:若所述节能模块根据所述节能指示成功对所述端口进行节能设置,则向所述SDN控制器发送节能设置响应消息,所述节能设置响应消息包括所述端口号以及节能设置状态,所述节能设置状态用于指示所述端口号对应的端口为节能状态。
- 根据权利要求21至24任一项所述的SDN交换机,其特征在于,所述发送模块,在所述节能模块根据所述节能指示对所述端口号对应的端口进行节能设置之后,还用于:若所述节能模块根据所述节能指示对所述端口进行节能设置失败,则向所述SDN控制器发送设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端口进行节能设置失败。
- 根据权利要求21至25任一项所述的SDN交换机,其特征在于,所述接收模块,还用于:接收所述SDN控制器发送的节能取消消息,所述节能取消消息包括端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置;所述节能模块,还用于根据所述节能取消指示取消对所述端口的节能设置,使所述端口退出节能状态。
- 根据权利要求27所述的SDN交换机,其特征在于,所述节能模块,具体用于:将所述端口的速率设置为所述端口允许的最大速率。
- 根据权利要求27或28所述的SDN交换机,其特征在于,所述发送模块,在所述节能模块根据所述节能取消指示取消对所述端口的节能设置之 后,还用于:若所述节能模块根据所述节能取消指示成功取消对所述端口的节能设置,则向所述SDN控制器发送节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,该节能取消状态用于指示所述端口号对应的端口为非节能状态。
- 根据权利要求27至29任一项所述的SDN交换机,其特征在于,所述发送模块,在所述节能模块根据所述节能取消指示取消对所述端口的节能设置之后,还用于:若所述节能模块根据节能取消指示取消对所述端口的节能设置失败,则向所述SDN控制器发送取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用于指示对所述端口号对应的端口取消节能设置失败。
- 一种软件定义网络SDN控制器,其特征在于,包括:确定模块,用于确定对软件定义网络SDN交换机的端口进行节能设置;发送模块,用于向所述SDN交换机发送节能设置消息,所述节能设置消息包括所述端口对应的端口号以及节能指示,所述节能指示用于指示对所述端口进行节能设置。
- 根据权利要求31所述的SDN控制器,其特征在于,所述确定模块,具体用于:根据自身策略确定对所述SDN交换机的端口进行节能设置。
- 根据权利要求31所述的SDN控制器,其特征在于,还包括:接收模块,用于接收所述SDN交换机发送的端口状态消息,所述端口状态消息包括端口号以及节能状态,所述节能状态用于指示所述端口号对应的端口准备进入节能状态;所述确定模块,具体用于根据所述端口状态消息包括的节能状态确定对所述端口状态消息包括的端口号对应的端口进行节能设置。
- 根据权利要求31至33任一项所述的SDN控制器,其特征在于,所述节能设置消息还包括节能速率,所述节能速率大于等于零,所述节能速率用于指示将所述端口的速率调整到节能速率。
- 根据权利要求34所述的SDN控制器,其特征在于,所述端口状态 消息还包括期望速率,所述确定模块还用于根据所述期望速率确定所述节能速率。
- 根据权利要求31至35任一项所述的SDN控制器,其特征在于,所述接收模块,在所述发送模块向所述SDN交换机发送所述节能设置消息之后,还用于:接收所述SDN交换机发送的节能设置响应消息,所述节能设置响应消息包括端口号以及节能设置状态,所述节能设置状态用于指示所述端口号对应的端口为节能状态。
- 根据权利要求31至35任一项所述的SDN控制器,其特征在于,所述接收模块,在所述发送模块向所述SDN交换机发送所述节能设置消息之后,还用于:接收所述SDN交换机发送的设置错误消息,所述设置错误消息包括所述端口号以及节能设置错误信息,所述节能设置错误信息用于指示对所述端口号对应的端口进行节能设置失败。
- 根据权利要求31至36任一项所述的SDN控制器,其特征在于,所述确定模块,还用于:确定取消对所述SDN交换机的端口的节能设置;所述发送模块,还用于向所述SDN交换机发送节能取消消息,所述节能取消消息包括所述端口对应的端口号以及节能取消指示,所述节能取消指示用于指示取消对所述端口号对应的端口的节能设置。
- 根据权利要求38所述的SDN控制器,其特征在于,所述接收模块,在所述发送模块向所述SDN交换机发送所述节能取消消息之后,还用于:接收所述SDN交换机发送的节能取消响应消息,所述节能取消响应消息包括所述端口号以及节能取消状态,所述节能取消状态用于指示所述端口号对应的端口为非节能状态。
- 根据权利要求38所述的SDN控制器,其特征在于,所述接收模块,在所述发送模块向所述SDN交换机发送所述节能取消消息之后,还用于:接收所述SDN交换机发送的取消错误消息,所述取消错误消息包括所述端口号以及节能取消错误信息,所述节能取消错误信息用于指示对所述端口号对应的端口取消节能设置失败。
- 一种软件定义网络SDN交换机,其特征在于,包括:通过总线连接的存储器和处理器,其中所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,执行如权利要求1至10任一项所述的交换机端口控制方法。
- 一种软件定义网络SDN控制器,其特征在于,包括:通过总线连接的存储器和处理器和通信接口,其中,所述存储器用于存储程序代码,所述处理器用于调用所述存储器存储的程序代码,执行如权利要求11至20任一项所述的交换机端口控制方法。
- 一种端口控制系统,其特征在于,包括:如权利要求41所述的软件定义网络SDN交换机以及如权利要求42所述的软件定义网络SDN控制器。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201480040335.4A CN105814844B (zh) | 2014-11-17 | 2014-11-17 | 交换机端口控制方法、装置及系统 |
PCT/CN2014/091241 WO2016077948A1 (zh) | 2014-11-17 | 2014-11-17 | 交换机端口控制方法、装置及系统 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2014/091241 WO2016077948A1 (zh) | 2014-11-17 | 2014-11-17 | 交换机端口控制方法、装置及系统 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016077948A1 true WO2016077948A1 (zh) | 2016-05-26 |
Family
ID=56013014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/091241 WO2016077948A1 (zh) | 2014-11-17 | 2014-11-17 | 交换机端口控制方法、装置及系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105814844B (zh) |
WO (1) | WO2016077948A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106161257A (zh) * | 2016-08-30 | 2016-11-23 | 杭州电子科技大学 | 一种面向sdn网络的基于链路利用率的自适应节能路由方法 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114205228A (zh) * | 2021-11-29 | 2022-03-18 | 通号城市轨道交通技术有限公司 | 一种网络系统、控制方法、存储介质及程序产品 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102882746A (zh) * | 2012-10-11 | 2013-01-16 | 盛科网络(苏州)有限公司 | Openflow交换机系统中流表添加速率的测试方法及系统 |
CN103036653A (zh) * | 2012-12-26 | 2013-04-10 | 华中科技大学 | 一种对OpenFlow网络进行网络编码的方法 |
CN103338163A (zh) * | 2013-07-16 | 2013-10-02 | 清华大学 | 支持动态弹性资源调度的软件定义网络控制器 |
US20130294236A1 (en) * | 2012-05-04 | 2013-11-07 | Neda Beheshti-Zavareh | Congestion control in packet data networking |
CN103905337A (zh) * | 2014-03-31 | 2014-07-02 | 华为技术有限公司 | 一种网络资源的处理装置、方法和系统 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8964563B2 (en) * | 2011-07-08 | 2015-02-24 | Telefonaktiebolaget L M Ericsson (Publ) | Controller driven OAM for OpenFlow |
EP3605969B1 (en) * | 2011-08-17 | 2021-05-26 | Nicira Inc. | Distributed logical l3 routing |
US9935901B2 (en) * | 2011-12-30 | 2018-04-03 | Dell Products, Lp | System and method of enabling a multi-chassis virtual switch for virtual server network provisioning |
CN102946365B (zh) * | 2012-11-09 | 2015-06-17 | 清华大学 | 一种基于软件定义网络的保持流表更新一致性的方法 |
CN103179046B (zh) * | 2013-04-15 | 2016-03-30 | 昆山天元昌电子有限公司 | 基于openflow的数据中心流量控制方法及系统 |
CN103618621B (zh) * | 2013-11-21 | 2017-08-11 | 华为技术有限公司 | 一种软件定义网络sdn的自动配置方法、设备及系统 |
-
2014
- 2014-11-17 WO PCT/CN2014/091241 patent/WO2016077948A1/zh active Application Filing
- 2014-11-17 CN CN201480040335.4A patent/CN105814844B/zh active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130294236A1 (en) * | 2012-05-04 | 2013-11-07 | Neda Beheshti-Zavareh | Congestion control in packet data networking |
CN102882746A (zh) * | 2012-10-11 | 2013-01-16 | 盛科网络(苏州)有限公司 | Openflow交换机系统中流表添加速率的测试方法及系统 |
CN103036653A (zh) * | 2012-12-26 | 2013-04-10 | 华中科技大学 | 一种对OpenFlow网络进行网络编码的方法 |
CN103338163A (zh) * | 2013-07-16 | 2013-10-02 | 清华大学 | 支持动态弹性资源调度的软件定义网络控制器 |
CN103905337A (zh) * | 2014-03-31 | 2014-07-02 | 华为技术有限公司 | 一种网络资源的处理装置、方法和系统 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106161257A (zh) * | 2016-08-30 | 2016-11-23 | 杭州电子科技大学 | 一种面向sdn网络的基于链路利用率的自适应节能路由方法 |
CN106161257B (zh) * | 2016-08-30 | 2019-05-03 | 杭州电子科技大学 | 一种面向sdn网络的基于链路利用率的自适应节能路由方法 |
Also Published As
Publication number | Publication date |
---|---|
CN105814844A (zh) | 2016-07-27 |
CN105814844B (zh) | 2019-08-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9853856B2 (en) | Method and device for protecting service reliability and network virtualization system | |
US8667167B2 (en) | Method and network device for controlling transmission rate of communication interface | |
KR101025529B1 (ko) | Rstp 처리 방식 | |
WO2016165463A1 (zh) | 一种基于软件定义网络的链路故障上报方法和转发设备 | |
EP2533475A1 (en) | Method and system for host route reachability in packet transport network access ring | |
EP2533474A1 (en) | Method, apparatus and system for forwarding data | |
CN101304340A (zh) | 一种资源状态监控方法及装置以及通信网络 | |
WO2019184455A1 (zh) | 信息传输方法、装置、设备及存储介质 | |
CN102088400A (zh) | 虚拟专用网络中运营商边界设备及切换方法 | |
WO2017114234A1 (zh) | 建立lsp的方法、服务器及路由器 | |
JP2012231531A (ja) | ネットワークシステム、経路制御方法、通信装置、及び、経路制御装置 | |
CN111147303B (zh) | 消息处理方法、装置、网络系统、电子设备及存储介质 | |
EP2677702A2 (en) | A method and apparatus for load balance | |
CN101340377A (zh) | 一种用于二层网络数据传输的方法、装置及其系统 | |
EP2533470A1 (en) | Method and equipment for preventing repeated refreshing of ethernet ring node address table | |
WO2016077948A1 (zh) | 交换机端口控制方法、装置及系统 | |
CN115589273A (zh) | Epa通信系统 | |
EP2378715B1 (en) | Data transfer device | |
KR101397299B1 (ko) | Hsr 프로토콜이 적용된 링 네트워크에서 프레임 송수신 제어 방법 및 장치 | |
CN109698762A (zh) | 一种调整参数的方法及参数调整装置 | |
US12034566B2 (en) | Method and system to selectively flush filtering databases in a major ring of an ethernet ring protection switching network | |
CN101635675A (zh) | 保活机制的实现方法和装置 | |
KR20130078384A (ko) | 디지털 보호 계전기의 통신을 위한 이더넷 통신 링크 방법 또는 이를 수행하는 디지털 보호 계전기 | |
CN105335217B (zh) | 一种服务器静默方法与系统 | |
CN114567536B (zh) | 异常数据处理方法、装置、电子设备和存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14906336 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14906336 Country of ref document: EP Kind code of ref document: A1 |