WO2015096707A1 - 一种获取配置服务器信息的方法、装置及*** - Google Patents
一种获取配置服务器信息的方法、装置及*** Download PDFInfo
- Publication number
- WO2015096707A1 WO2015096707A1 PCT/CN2014/094694 CN2014094694W WO2015096707A1 WO 2015096707 A1 WO2015096707 A1 WO 2015096707A1 CN 2014094694 W CN2014094694 W CN 2014094694W WO 2015096707 A1 WO2015096707 A1 WO 2015096707A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- switch
- configuration
- configuration server
- query message
- message
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
Definitions
- the present invention relates to the field of communications, and in particular, to a method, device, and system for acquiring configuration server information.
- the OF (Open Flow) network is a network that controls and forwards data based on the Open Flow protocol, including an OF switch (Switch), an OF configuration server, and an OF controller (Controller).
- the OF switch After receiving the data packet, the OF switch first searches for the forwarding rule according to the flow table stored by the OF switch. If the forwarding rule is not found, the data packet is forwarded to the OF controller, and the OF controller performs centralized control on the OF network.
- the OF controller generates a new flow table, which carries a new forwarding rule, and the OF controller sends a new flow table to the OF switch, so that the OF switch updates the locally stored flow table.
- the OF switch needs to obtain the configuration information of the OF configuration server to establish a connection with the OF configuration server, and further obtains the relationship between the OF controller and the OF controller from the OF configuration server using the OF configuration and management protocol. Establish the parameters required for the connection to establish a connection with the OF controller.
- the OF switch must be configured with the configuration information of the OF configuration server in advance, so as to establish a connection with the OF configuration server according to the configuration information. If the OF switch does not have the configuration information of the OF configuration server in advance, the OF switch and the OF configuration server cannot be established. Connection, and when the number of OF switches is large, manually setting the configuration information of the OF configuration server is labor-intensive and not flexible enough.
- An embodiment of the present invention provides a method, an apparatus, and a system for acquiring configuration server information, which enable an OF switch to automatically obtain configuration information of an OF configuration server.
- a method for obtaining configuration server information for an open flow OF switch, including:
- the receiving the query message sent by the OF configuration server is specifically:
- Setting the first port as the configuration management port of the OF switch according to the query message includes:
- the first port is used as a configuration management port of the OF switch.
- the query message includes: a priority of the OF configuration server, then
- the method further includes:
- the query message includes: a hop limit value, where the hop limit value is used to indicate the number of times the query message is forwarded, then
- the method further includes:
- the hop limit value in the update query message is updated to the current hop limit value -1.
- the obtaining, by using the configuration management port, the configuration information of the OF configuration server, and establishing a connection with the OF configuration server include:
- a method for providing configuration server information for an OF configuration server, including:
- the query message includes: a priority of the OF configuration server, where the priority of the OF configuration server is used to: if the OF switch has a configured configuration management port, and the configured configuration management port is prioritized
- the port that receives the query message is used as a configuration management port of the OF switch, and the priority of the configuration management port is set to be the OF configuration server. priority.
- the query message includes: a hop limit value, where the hop limit value is used to indicate the number of times the query message is forwarded, so that The OF switch discards the query message when the hop limit value is equal to zero, and updates the hop limit value to the current hop limit value -1 when the hop limit value is not equal to zero.
- the method further includes:
- an open flow OF switch including:
- a first receiving unit configured to receive a query message sent by the OF configuration server, where the query message includes a parameter used to identify the OF configuration server;
- a setting unit configured to set a configuration management port of the OF switch according to the query message
- a first acquiring unit configured to acquire configuration information of the OF configuration server by using the configuration management port, and establish a connection with the OF configuration server.
- the first receiving unit is specifically configured to:
- the setting unit is specifically configured to:
- the setting unit is specifically configured to:
- the first port is used as a configuration management port of the OF switch.
- the query message includes: a priority of the OF configuration server, then
- the OF switch further includes:
- a second acquiring unit configured to acquire, in the query message, a priority of the OF configuration server as a priority of the first port.
- the query message includes: a hop limit value, where the hop limit value is used to indicate the number of times the query message is forwarded, then
- the OF switch further includes:
- a determining unit configured to determine whether a hop limit value in the query message is equal to zero
- a discarding unit configured to discard the query message if a hop limit value in the query message is equal to zero
- an updating unit configured to: if the hop limit value in the query message is not equal to zero, update the hop limit value in the query message to a current hop limit value of ⁇ 1.
- the OF switch further includes:
- a generating unit configured to generate a response message, where the response message includes an identity of the OF switch
- a sending unit configured to send, by using the configuration management port, the response message to the OF configuration server, so that the OF configuration server generates an advertisement message according to the response message, where the notification message includes the OF configuration server Configuration information;
- a second receiving unit configured to receive, by using the configuration management port, the notification message sent by the OF configuration server;
- a establishing unit configured to establish a connection with the OF configuration server according to the configuration information of the OF configuration server in the advertisement message.
- an OF configuration server including:
- a first generating unit configured to generate a query message, where the query message includes a parameter for identifying the OF configuration server;
- a first sending unit configured to send the query message to the OF switch, so that the OF switch sets a configuration management port of the OF switch according to the query message, and acquires the OF configuration server by using the configuration management port.
- Configuration information establishing a connection with the OF configuration server.
- the query message includes: a priority of the OF configuration server, where the priority of the OF configuration server is used to: if the OF switch has a configured configuration management port, and the configured configuration management port is prioritized When the level is smaller than the priority of the OF configuration server, the The port that receives the query message is used as a configuration management port of the OF switch, and the priority of the configuration management port is set to a priority of the OF configuration server.
- the query message includes: a hop limit value, where the hop limit value is used to indicate the number of times the query message is forwarded, so as to be The OF switch discards the query message when the hop limit value is equal to zero, and updates the hop limit value to the current hop limit value -1 when the hop limit value is not equal to zero.
- the OF configuration server further includes:
- a receiving unit configured to receive a response message sent by the OF switch by using the configuration management port, where the response message includes an identity identifier of the OF switch;
- a second generating unit configured to generate an advertisement message according to the response message received by the receiving unit, where the notification message includes configuration information of the OF configuration server;
- a second sending unit configured to send the advertisement message generated by the second generating unit to the OF switch, so that the OF switch is configured according to the configuration information of the OF configuration server in the advertisement message
- the OF configuration server establishes a connection.
- a communication system including:
- At least one OF configuration server and at least one OF switch are At least one OF configuration server and at least one OF switch,
- the OF configuration server is configured to generate a query message, where the query message includes a parameter for identifying the OF configuration server; and sending the query message to the OF switch;
- the OF switch is configured to receive the query message sent by the OF configuration server, set a configuration management port of the OF switch according to the query message, and obtain configuration information of the OF configuration server by using the configuration management port.
- the OF configuration server establishes a connection.
- the OF switch is specifically configured to:
- the priority of the OF configuration server is obtained as the priority of the first port in the query message, and the priority and the configuration of the configured configuration management port are compared. Determining a priority of the first port, where the first port is a port that the OF switch receives the query message;
- the first port is used as a configuration management port of the OF switch.
- the OF switch is further configured to generate a response message, where the response message includes an identity identifier of the OF switch, and send, by using the configuration management port, the response message to the OF configuration server;
- the OF configuration server is further configured to receive the response message sent by the OF switch by using the configuration management port, and generate an advertisement message according to the response message, where the advertisement message includes configuration information of the OF configuration server,
- the OF switch sends the announcement message;
- the OF switch is further configured to receive, by using the configuration management port, the advertisement message sent by the OF configuration server, and establish a connection with the OF configuration server according to the configuration information of the OF configuration server in the advertisement message.
- Embodiments of the present invention provide a method, apparatus, and system for acquiring configuration server information.
- the method for obtaining the configuration server information includes: the OF switch receives the query message sent by the OF configuration server, the query message includes a parameter for identifying the OF configuration server, and the configuration management port of the OF switch is set according to the query message, and the configuration management port is obtained through the configuration management port.
- the configuration information of the OF configuration server is established with the OF configuration server.
- the OF switch sets the configuration management port of the OF switch according to the query message sent by the received OF configuration server, establishes a connection with the OF configuration server through the configuration management port, and obtains configuration information of the OF configuration server, thereby enabling the OF switch to automatically Obtaining the configuration information of the OF configuration server avoids the problem of large manual workload and insufficient flexibility in manually setting the configuration information of the OF configuration server.
- FIG. 1 is a flowchart of a method for obtaining configuration server information according to an embodiment of the present invention
- FIG. 2 is a flowchart of a method for providing configuration server information according to an embodiment of the present invention
- FIG. 3 is a flowchart of another method for obtaining configuration server information according to an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of an OF network according to an embodiment of the present invention.
- FIG. 5 is a schematic structural diagram of an OF switch according to an embodiment of the present disclosure.
- FIG. 6 is a schematic structural diagram of another OF switch according to an embodiment of the present disclosure.
- FIG. 7 is a schematic structural diagram of an OF configuration server according to an embodiment of the present invention.
- FIG. 8 is a schematic structural diagram of another OF configuration server according to an embodiment of the present invention.
- FIG. 9 is a schematic diagram of a communication system according to an embodiment of the present invention.
- FIG. 10 is a schematic structural diagram of another OF switch according to an embodiment of the present disclosure.
- FIG. 11 is a schematic structural diagram of another OF switch according to an embodiment of the present invention.
- FIG. 12 is a schematic structural diagram of another OF configuration server according to an embodiment of the present invention.
- FIG. 13 is a schematic structural diagram of another OF configuration server according to an embodiment of the present invention.
- FIG. 14 is a schematic diagram of another communication system according to an embodiment of the present invention.
- An embodiment of the present invention provides a method for acquiring configuration server information, which is used in an OF switch, as shown in FIG. 1 , and includes:
- Step 101 Receive a query message sent by an OF configuration server, where the query message includes a parameter used to identify the OF configuration server.
- the OF switch and the OF configuration server communicate through the first network, where the first network may be an IP (Internet Protocol) network, and is used to transmit the communication between the OF switch and the OF configuration server.
- the message includes a transmission device such as a router, and the routers in the first network are connected to each other.
- the OF configuration server generates a query message, and sends the query message to the OF switch through the first network, where the query message includes a parameter for identifying the OF configuration server, and the OF switch receives the OF configuration server from the first port of the OF switch. And sending the query message, the first port is any one of the OF switches of the OF switch connected to the edge router in the first network.
- the OF switch is connected to an edge router in the first network, and the edge router is an access router, which is a router located at the edge of the first network.
- the query message includes an EUI-64 (64-bit Extended Unique Identifier), that is, a 64-bit global identifier, which is used to uniquely identify The identity of the OF configuration server; the IP address is used to identify the unique identity of the OF configuration server, so that the OF switch distinguishes different OF configuration servers; the HL (Hop Limit) value is used to indicate the forwarding of the query message. The number of times; the priority is used to identify the priority of the OF configuration server; the MAC (Media Access Control) address is used to identify the unique identity of the OF configuration server, and the MAC address can also be used to uniquely identify the OF.
- EUI-64 64-bit Extended Unique Identifier
- Step 102 Set a configuration management port of the OF switch according to the query message.
- the OF switch After the OF switch receives the query message sent by the OF configuration server by using the first port of the OF switch, the OF switch sets the configuration management port of the OF switch according to the query message. Specifically, the OF switch first queries the OF switch for the configured configuration management port. If the OF switch has the configured configuration management port, the priority of the OF configuration server is obtained as the number in the query message. a priority of a port, comparing a priority of the configured configuration management port with a priority of the first port, when a priority of the configured configuration management port is less than a priority of the first port The first port is used as a configuration management port of the OF switch.
- the OF switch needs to determine whether the hop limit value in the query message is equal to zero, if the hop limit value in the query message is equal to zero. The query message is discarded. If the hop limit value in the query message is not equal to zero, the hop limit value in the query message is updated to the current hop limit value -1.
- Step 103 Acquire configuration information of the OF configuration server by using the configuration management port, and establish a connection with the OF configuration server.
- the forwarding rule is searched according to the flow table stored in the OF switch, where the flow table includes the forwarding rule, and the forwarding rule is an OF switch and The forwarding path required for message interaction between OF controllers. If no matching flow table is found, the OF switch generates a response message, and the response message includes an identity of the OF switch. Then, the OF switch sends the response message to the OF configuration server through the configuration management port of the OF switch, so that the OF configuration server generates an advertisement message according to the response message, where the advertisement message includes configuration information of the OF configuration server. The OF switch receives the advertisement message sent by the OF configuration server through the configuration management port, and acquires the OF configuration server. The configuration information is established according to the configuration information of the OF configuration server in the notification message to establish a connection with the OF configuration server.
- the OF switch sets the configuration management port of the OF switch according to the query message sent by the received OF configuration server, establishes a connection with the OF configuration server through the configuration management port, and acquires configuration information of the OF configuration server, thereby enabling
- the OF switch automatically obtains the configuration information of the OF configuration server, which avoids the problem of large manual workload and insufficient flexibility in manually setting the configuration information of the OF configuration server.
- An embodiment of the present invention provides a method for configuring server information, which is used in an OF configuration server, as shown in FIG. 2, and includes:
- Step 201 Generate a query message, where the query message includes parameters for identifying the OF configuration server.
- the query message includes an EUI-64, that is, a 64-bit global identifier, which is used to uniquely identify the identity of the OF configuration server, and an IP address, which is used to identify the unique identity of the OF configuration server, so that the OF switch distinguishes differently.
- EUI-64 that is, a 64-bit global identifier, which is used to uniquely identify the identity of the OF configuration server, and an IP address, which is used to identify the unique identity of the OF configuration server, so that the OF switch distinguishes differently.
- the OF configuration server the HL value is used to indicate the number of times the query message is forwarded; the priority is used to identify the priority of the OF configuration server; the MAC address is used to identify the unique identity of the OF configuration server, and the MAC address It can also be used to uniquely identify the unique identity of an OF device such as an OF switch, an OF controller, or the like.
- the priority of the OF configuration server in the query message is used when the OF switch has a configured configuration management port, and the priority of the configured configuration management port is smaller than the priority of the OF configuration server, the OF switch
- the port that receives the query message is used as a configuration management port of the OF switch, and the priority of the configuration management port is set to a priority of the OF configuration server.
- the hop limit value is used to indicate the number of times the query message is forwarded, so that the OF switch discards the query message when the hop limit value is equal to zero, and updates the hop limit value when the hop limit value is not equal to zero.
- the current jump limit value is -1.
- Step 202 Send the query message to the OF switch, so that the OF switch sets the configuration management port of the OF switch according to the query message, and obtains the configuration information of the OF configuration server by using the configuration management port, and The OF configuration server establishes a connection.
- the OF configuration server communicates with the OF switch through the first network, where the first network may be an IP network, and is used to transmit a message required for communication between the OF switch and the OF configuration server, including a transmission device such as a router, the first The routers in the network are connected to each other. After the OF configuration server generates the query message, the query message is sent to the OF switch through the first network.
- the OF configuration server Before the OF configuration server generates the query message and sends the query message to the OF switch, the OF switch needs to actively join the specific multicast group after the power is turned on, so that the OF configuration server sends the query message to the OF switch, so that the OF is enabled.
- the configuration server communicates with the OF switch through the first network. First, the edge router in the first network starts the IGMP (Internet Group Management Protocol) function, and then the edge router sends an IGMP REQ (Internet Group Management Protocol Request) to the OF switch in the OF network according to a preset time.
- IGMP Internet Group Management Protocol
- IGMP REQ Internet Group Management Protocol Request
- the OF switch receives the IGMP REQ message sent by the edge router through any one of the ports of the OF switch directly connected to the edge router, and the OF switch directly passes through the edge router Any one of the ports of the connected OF switch sends an IGMP REP (Internet Group Management Protocol Respond) message to the edge router.
- IGMP REP Internet Group Management Protocol Respond
- the edge router After receiving the IGMP REP message, the edge router successfully adds the OF switch to the specific switch. Multicast group.
- the router in the first network is enabled with the PIM-SM (Propercol Independent Multicast-Sparse Mode) function, and the routers in the first network are established according to the PIM-SM protocol and the IGMP protocol.
- PIM-SM Propercol Independent Multicast-Sparse Mode
- the multicast forwarding path is such that the routers in the first network are connected to each other, so that the OF configuration server sends a message to the OF switch through the first network.
- the OF network includes a first network, at least one OF configuration server, and at least one OF switch.
- the OF switch After the OF configuration server sends the query message to the OF switch, the OF switch receives the query message sent by the OF configuration server, and the OF switch sets the configuration management port of the OF switch according to the query message, and the OF switch successfully sets the configuration management.
- the forwarding rule is searched according to the flow table stored in the OF switch, and the query message is forwarded. If no matching flow table is found, a response message is generated, and the response message is sent to the OF configuration server, and the OF configuration server receives the OF switch.
- the configuration management port sends a response message, where the response message includes an identity of the OF switch, and then generates an advertisement message according to the response message, where the notification message includes configuration information of the OF configuration server, and is sent to the OF switch. And sending the notification message, so that the OF switch establishes a connection with the OF configuration server according to the configuration information of the OF configuration server in the advertisement message.
- the OF configuration server generates a query message and then exchanges it with the OF.
- the device sends the query message, so that the OF switch sets the configuration management port of the OF switch according to the query message, and obtains configuration information of the OF configuration server through the configuration management port, and establishes a connection with the OF configuration server, thereby enabling
- the OF switch automatically obtains the configuration information of the OF configuration server, which avoids the problem of large manual workload and insufficient flexibility in manually setting the configuration information of the OF configuration server.
- the embodiment of the present invention provides a method for acquiring configuration server information, which is used for an OF switch and an OF configuration server.
- the OF configuration server and the OF switch exchange messages based on the OF network, and the OF network includes the first network, and the first network is assumed to be an IP network.
- the IP network includes transmission devices such as routers, and the routers are connected to each other. As shown in Figure 3, it includes:
- Step 301 The OF switch actively joins a specific multicast group after being powered on.
- Multicast transmission is a communication mode of point-to-multipoint transmission, that is, there is one sender and at least two receivers, the receivers are in the same multicast group, and all the receivers use the same multicast address.
- the sender sends a message to the at least two receivers. If the data content of the message is the same, the sender only needs to generate a packet of the message and send it to all the recipients joining the same multicast group.
- the data packet of the message, all the receivers joining the same multicast group can receive the data packet of the message, that is, the address or identifier of the port in the multicast group is the purpose of multicast message or data frame transmission.
- the address, the address of each receiver's port is the same, and is the receiver in the same multicast group.
- the receiver may also send a request to the router in the first network to join or quit the multicast group, and the router in the first network selectively copies and transmits the data packet of the message, that is, only the multicast group
- the data packet of the message is transmitted to the receiver of the multicast group, and the receiver not in the multicast group does not receive the data packet of the message.
- the destination IP address of the multicast packet can use a class D IP address, and the class D IP address ranges from 224.0.0.0 to 239.255.255.255, that is, the destination IP address of the packet of the message is not a receiver.
- the IP address, but the multicast IP address is an address segment.
- the class D address cannot appear in the source IP address field of the IP packet.
- a unicast transmission is a communication mode for point-to-point transmission, which is to route a data packet from a source IP address to a destination IP address, and the source IP address and the destination IP address of the unicast transmission are a specific IP address.
- the MAC address must also be a multicast MAC address.
- the multicast MAC address corresponds to the multicast IP address.
- the upper 24 bits of the multicast MAC address are 0x01005e, and the lower 23 bits of the multicast MAC address are the lower 23 bits of the multicast IP address.
- IP address 224.0.0.0 ⁇ 224.0.0.255 is the reserved multicast address, that is, the permanent group address, the IP address 224.0.0.0 is reserved for allocation, and the other address is used by the routing protocol;
- IP address is 224.0.1.0 ⁇ 224.0.1.255 is a public multicast address, which can be used for the Internet;
- IP address 224.0.2.0 ⁇ 238.255.255.255 is the multicast address available to the user, that is, the temporary group address;
- IP address 239.0.0.0 ⁇ 239.255.255.255 is the local management multicast. address.
- the embodiment of the present invention assumes that the sender may be an OF configuration server, and the receiver may be an OF switch. It is assumed that the OF configuration server and the OF switch exchange messages by means of multicast transmission through an IP network, and the IP network includes a router. A transmission device in which routers in the IP network are connected to each other. Before the OF switch and the OF configuration server exchange messages through the IP network, the OF switch needs to join the specific multicast group after power-on.
- the edge router enables the IGMP function
- the edge router is an access router, which is a router located at the edge of the IP network, and the router located at the center of the IP network is called a core router.
- the edge router and the core router are The relative concept belongs to the router, but the edge router and the core router have different sizes and capacities.
- the core router can be an edge router in a network larger than the IP network.
- IGMP is a multicast protocol in the Internet Protocol family.
- the multicast protocol includes a group membership protocol between a multicast group member and a router and a multicast routing protocol between the router and the router.
- the IGMP is a group membership.
- a protocol is used to establish a connection between members of a multicast group that is directly connected to an edge router.
- the multicast group members on different network segments can communicate with each other and maintain multicast group membership.
- the router needs to support multicast.
- the IGMP information is encapsulated in an IP packet.
- the IP protocol number of the IGMP information in the IP packet is 2, and the multicast group member can join or leave the multicast group at any position, any time, and the total number is unrestricted. .
- the edge router periodically sends an IGMP REQ message to the OF switch in the OF network according to a preset time, and the OF switch joins a specific multicast group, and the OF network is based on an OpenFlow protocol pair.
- a network for controlling and forwarding data including an OF switch, an OF configuration server, and an OF controller, and an IP network for establishing a connection and message interaction between an OF switch and an OF configuration server, where the specific multicast group is an OF switch.
- the pre-configured multicast group is a multicast address segment preset for the OF switch.
- the preset time can be 1 minute or 2 minutes.
- the OF switch After the OF switch receives the IGMP REQ message sent by the edge router through any one of the ports of the OF switch directly connected to the edge router, the OF switch further connects to the edge router directly through the edge router. Any one of the ports of the OF switch sends an IGMP REP message to the edge router, and the OF switch is successfully added to a specific multicast group.
- Step 302 The router establishes a multicast forwarding path.
- the router in the IP network starts the PIM-SM function
- the PIM-SM is a multicast protocol in the Internet protocol family, that is, a multicast routing protocol between the router and the router, in the IP network.
- the router establishes a multicast forwarding path according to the information obtained by the PIM-SM protocol and the IGMP protocol, so that the routers in the IP network are connected to each other, so that the OF configuration server sends a message to the OF switch through the IP network.
- the detailed process of the router in the IP network to establish a multicast forwarding path is a prior art, and details are not described herein again.
- the message exchange between the OF switch and the OF configuration server requires forwarding of the router in the IP network.
- Step 303 The OF configuration server generates a query message.
- the query message includes Ethernet layer information, IP layer information, and application layer information.
- the format of the query message can be as shown in Table 1.
- the application layer information of the query message includes: an EUI-64 field, that is, a 64-bit global identifier field, where the EUI-64 is used to uniquely identify the identity of the OF configuration server, because
- the router may modify the destination MAC address included in the Ethernet layer information to the MAC address of the router, and thus the EUI-64 that uniquely identifies the identity of the OF configuration server.
- the EUI-64 field may also be used to uniquely identify the OF switch, An identity of an OF device such as an OF controller; a version field (Version) field for identifying version information of a configuration and management protocol, where the configuration and management protocol is a protocol used by the OF configuration server to exchange messages with the OF switch, that is,
- the content of the query message includes a type of a message, which is used to identify a type of the message.
- Different message type values in the field indicate different message types. For example, if the message type value is 0, the message is a query message. If the message type value is 1 indicates a response message, if the message type value is 2, the message type field is 0, and the HL value field is used to identify the message type field.
- the number of times the query message is forwarded is the field that the query message must carry.
- the different value in the HL value field indicates the number of different forwarding times of the query message.
- the priority field is used to identify the priority of the OF configuration server.
- the switch list length field is used to indicate the exchange in the configuration and management protocol.
- the length of the list which can be represented by an integer greater than or equal to 1. For example, if the value in the switch list length field is 8, it means that there are 8 switch list information in the configuration and management protocol; the checksum field. Used to verify the correctness of the query message during transmission.
- Flags field used to mark whether there is a MAC address, MAC address mask, IPv4 address, IPv4 address mask, IPv6 address, IPv6 address mask, IPv6 mask, data link Data Path ID, Data Path ID Mask field, the flag field can be eight bits, usually indicated by 1 and 0, if none, in the flag field If the MAC address, IPv4 address, IPv6 address, and data link address exist, the mask value of the corresponding field is all 1.
- the Link Type field indicates the OF configuration server connection type, the link port ( The Link Port field indicates the OF configuration server connection port, and the link type field and the link port field are not used in the inquiry message in this embodiment.
- the Ethernet layer information includes: a Dst MAC (Destination Address Media Access Control) address field, and is used to identify the OF switch that is carried by the query message when the query message is sent to the OF switch.
- the MAC address (Media Access Control) address of the MAC address is used to identify the MAC address of the OF configuration server that sends the query message.
- the IP layer information includes: a Dst IP (Destination Internet Protocol) address field, which is used to identify an IP address of the OF switch carried in the query message when the query message is sent to the OF switch; An IP (Source Internet Protocol) address field is used to identify an IP address of the OF configuration server, so that the OF switch can distinguish different OF configuration servers when there are at least two OF configuration servers.
- Dst IP Denssion Internet Protocol
- An IP Source Internet Protocol address field is used to identify an IP address of the OF configuration server, so that the OF switch can distinguish different OF configuration servers when there are at least two OF configuration servers.
- Step 304 The OF configuration server sends a query message to the OF switch.
- the OF configuration server and the OF switch exchange messages through the IP network. After the OF configuration server generates the query message, the query message is sent to the OF switch through the IP network, so that the OF switch sets the configuration management port of the OF switch according to the query message and obtains the configuration through the configuration management port.
- the configuration information of the OF configuration server is established with the OF configuration server.
- Step 305 The OF switch sets a configuration management port of the OF switch according to the query message.
- the OF switch After the OF switch receives the query message sent by the OF configuration server over the IP network, the OF switch receives the query message from the first port of the OF switch, where the first port is the edge switch of the OF switch and the IP network. Any port of the OF switch that is connected, the edge router is an access router, and is a router located at the edge of the IP network.
- the OF switch determines whether the hop limit value in the query message is equal to zero, and the hop limit value is used to indicate the query message. The number of forwards. If the hop limit value in the query message is equal to zero, the query message is discarded; if the hop limit value in the query message is not equal to zero, the hop limit value in the update message is updated to the current hop limit value -1.
- the hop limit value is an integer greater than or equal to 1. For example, if the hop limit value in the query message is equal to 1, the OF switch updates the hop limit value to the current hop limit after receiving the query message sent by the OF configuration server by using the first port.
- the value of -1 is such that the updated hop limit value is 0, and the hop limit value is checked again. Because the hop limit value is 0, the query message is discarded, and the OF switch no longer forwards the query message.
- the OF switch updates the hop limit value to the current hop limit value -1 after receiving the query message sent by the OF configuration server by using the first port, Again Checking the hop limit value. If the hop limit value -1 is greater than 0, the OF switch forwards the query message, and the OF switch forwards the query message by the hop limit value minus 1 until the hop limit If the value is 0, the OF switch discards the query message and does not forward the query message.
- the embodiment of the present invention assumes that the hop limit value in the query message is 2, and the query message may be forwarded once by the OF switch in the OF network.
- the OF switch queries the OF switch for the configured configuration management port. If the OF switch has a configured configuration management port, the OF switch compares the priority of the configured configuration management port with the first The priority of the port. If there are at least two OF configuration servers in the OF network, after the OF switch receives the query message sent by the at least two OF configuration servers, compare the priority of the configured configuration management port with the priority of the first port.
- the OF switch uses the first port as a configuration management port of the OF switch, and configures the management port
- the priority is set to the priority of the OF configuration server, and when the priority of the configured configuration management port is greater than or equal to the priority of the first port, the OF switch uses the configured configuration management port as Configuration management port of the OF switch.
- the OF switch may acquire the priority of the OF configuration server as the first in the query message.
- the priority of the port, the priority of the configured configuration management port is obtained in the information saved locally by the OF switch, and the priority of the configured configuration management port is received by the configured configuration management port. Query the priority of the OF configuration server at the sending end of the message.
- the OF switch compares the priority of the configured configuration management port with the first port. Priority, because the priority of the OF configuration server included in the query message received by the OF switch from the first port of the OF switch and the query message received by the OF switch from the configured configuration management port of the OF switch.
- the OF configuration server includes the same priority, so after comparing that the priority of the configured configuration management port is equal to the priority of the first port, the OF switch configures the configured configuration.
- the port serves as the configuration management port of the OF switch.
- the OF switch uses the first port that receives the query message as the configuration management port of the OF switch.
- Step 306 The OF switch generates a response message according to the query message.
- the forwarding rule is searched according to the flow table stored in the OF switch, where the forwarding rule is when the OF switch and the OF controller perform message interaction. The required forwarding path. If a matching flow table is found, the OF switch forwards the query message according to the flow table. If no matching flow table is found, the OF switch generates a response message, the response message including the identity of the OF switch.
- the embodiment of the present invention assumes that the OF switch does not find a matching flow table, and the OF switch generates a response message.
- the response message includes Ethernet layer information, IP layer information, and application layer information.
- the format of the response message is as shown in Table 2.
- the application layer information of the response message includes: a MAC address field, which is used to indicate a MAC address of the OF switch, and is a field that the response message must carry; a flag (Flags) field. Used to mark whether there is a MAC address, MAC address mask, IPv4 address, IPv4 mask, IPv6 address, IPv6 mask, and data path ID.
- a MAC address field which is used to indicate a MAC address of the OF switch, and is a field that the response message must carry
- a flag (Flags) field Used to mark whether there is a MAC address, MAC address mask, IPv4 address, IPv4 mask, IPv6 address, IPv6 mask, and data path ID.
- Data Link ID Mask field the flag bit field can be eight bits, usually indicated by 1 and 0 with no, if the MAC address, IPv4 address, IPv6 in the flag bit If the address and data link address exist, the mask value of the corresponding field is all 1, if the MAC address, IPv4 address, IPv6 address, and data link in the flag bit If the address does not exist, the corresponding field and the mask field of the field are omitted, and the corresponding position in the Flags field is set to 0; the Link Type field indicates the OF configuration server connection type, and the link The Link Port field indicates the OF configuration server connection port, and the link type field and the link port field are not used in the response message in this embodiment.
- the data path ID is used to indicate the identity of the OF switch in the OF network, and is generated by the MAC address carried by the switch list layer.
- the Ethernet layer information includes: a Dst MAC address field, configured to identify a MAC address of the OF configuration server carried in the response message when the response message is sent to the OF configuration server, and a Src MAC address field, A MAC address for identifying the OF switch that sends the response message.
- the IP layer information includes: a Dst IP address field, configured to identify an IP address of the OF configuration server carried in the response message when the response message is sent to the OF configuration server, and an Src IP address field. And identifying an IP address of the OF switch that sends the response message.
- the application layer information further includes: a version field (Version) field for identifying version information of the configuration and management protocol, where the configuration and management protocol is a protocol used by the OF configuration server to perform message interaction with the OF switch, that is, The content of the response message; the type of the message is used to identify the type of the message.
- the different message type values in the field indicate different message types. For example, if the message type value is 0, the message is a query message. The message type value of 1 indicates a response message. If the message type value is 2, the message type field is 1; the HL value field is used to identify the response message.
- the number of forwardings indicates the number of different forwarding times of the response message;
- the priority field is used to identify the priority of the OF configuration server;
- the switch list length field is used. Indicates the length of the switch list in the configuration and management protocol, which can be represented by an integer greater than or equal to 1; checksum (Checksum) word For verifying the correctness of the response message during transmission;
- the EUI-64 field is a 64-bit global identifier, and the EUI-64 is used to uniquely identify the identity of the OF switch, and the EUI-64 can also Used to uniquely identify the identity of the OF device such as the OF configuration server, OF controller, and so on.
- Step 307 The OF switch sends a response message to the OF configuration server.
- the configuration management port of the OF switch sends the response message to the OF configuration server, so that the OF configuration server generates an advertisement message according to the response message, where the advertisement message includes configuration information of the OF configuration server, and further, the OF switch Receiving, by the configuration management port, the advertisement message sent by the OF configuration server, and establishing a connection with the OF configuration server according to the configuration information of the OF configuration server in the advertisement message.
- At least two OF switches may receive a query message generation response message, and each of the OF switches sends a response message to the OF configuration server, and therefore, there are at least two responses of different OF switch information. Message.
- Step 308 The OF configuration server generates an advertisement message according to the response message.
- the OF configuration server After receiving the response message sent by the OF switch through the configuration management port, the OF configuration server generates an advertisement message according to the response message, where the advertisement message includes configuration information of the OF configuration server.
- the advertisement message includes Ethernet layer information, IP layer information, and application layer information.
- the format of the announcement message is as shown in Table 3.
- the Ethernet layer information of the advertisement message includes: a Dst MAC address field, and is used to identify the OF carried by the advertisement message when the advertisement message is sent to the OF switch.
- the MAC address of the switch; the Src MAC address field is used to identify the MAC address of the OF configuration server that sends the advertisement message.
- the IP layer information includes: a Dst IP address field, configured to identify that the notification message is sent The IP address of the OF switch carried in the advertisement message sent to the OF switch; the Src IP address field is used to identify the IP address of the OF configuration server.
- the application layer information includes: a version field (Version) field for identifying version information of the configuration and management protocol, where the configuration and management protocol is a protocol used by the OF configuration server to perform message interaction with the OF switch, that is, the protocol The content of the advertisement message; the type of the message is used to identify the type of the message.
- Different message type values in the field indicate different message types. For example, if the message type value is 0, it indicates a query message, if the message The type value of 1 indicates a response message, and if the message type value is 2, the message type field is 2, and the HL value field is used to identify the notification message.
- the number of forwardings, the different value in the HL value field indicates a different number of forwardings of the advertisement message; a priority field for identifying the priority of the OF configuration server; and a switch list length field for Indicates the length of the switch list in the configuration and management protocol, which can be represented by an integer greater than or equal to 1; checksum field Used to verify the correctness of the advertisement message during transmission; the EUI-64 field is a 64-bit global identifier, and the EUI-64 is used to uniquely identify the identity of the OF configuration server, and the EUI-64 can also It is used to uniquely identify the identity of the OF device such as the OF switch and the OF controller.
- the application layer information includes: a flag field (Flags) field for marking a MAC address, a MAC address mask (MAC Mask), an IPv4 address, an IPv4 address mask (IPv4 Mask), an IPv6 address, and an IPv6 address mask (IPv6).
- Flags flag field
- MAC Mask MAC address mask
- IPv4 address IPv4 address mask
- IPv6 address mask IPv6 address mask
- the flag field can be eight bits, usually indicated by 1, and 0 is not, if If the MAC address, IPv4 address, IPv6 address, and data link address in the flag bit exist, the mask value of the corresponding field is all 1, if the MAC address, IPv4 address, IPv6 address, and data in the flag bit If the link address does not exist, the corresponding field and the mask field of the field are omitted, and the corresponding position in the Flags field is set to 0; the Link Type field indicates the OF configuration server connection type.
- the OF configuration server advertises the network protocol that the OF switch should use when connecting to the OF configuration server, such as TCP (Transmission Control Protocol), UDP (User Datagram Protocol), etc.
- the field that the message must carry, the Link Port field indicates the OF configuration server connection port, and the OF configuration server notifies the port number of the network protocol that the OF switch should use when connecting to the OF configuration server, such as the TCP port number and UDP port. No., etc.
- the switch list layer of the advertisement message carries information of at least one OF switch.
- IPv4 is the fourth version of IP (Internet Protocol)
- IPv6 is the sixth version of IP (Internet Protocol)
- IPv6 will be the IP address of IPv4.
- the 32-bit is added to the 128-bit, and the IPv4 address carried in the advertisement message is allocated according to the MAC address carried in the advertisement message to obtain the IPv4 address, or the IPv6 address carried in the advertisement message is carried according to the advertisement message.
- the MAC address assignment is obtained by the IPv6 address; the Data Path ID is the same as the MAC address for identifying the unique identity of the OF switch.
- the MAC address, the IPv4 address, or the IPv6 address included in the advertisement message is configuration information required to establish a connection between the OF switch and the OF configuration server.
- the configuration information is a protocol required to establish a connection between the OF switch and the OF configuration server, and a port number of the protocol, such as a TCP protocol, a UDP protocol, and the TCP protocol port number, and the UDP protocol.
- the port number is used to specify the OF switch that the OF configuration server needs to connect to;
- the advertisement message includes a plurality of the OF switch list layer information, and the OF switch that receives the advertisement message searches for the OF switch flow table.
- the information matching the configuration information that is, the contents of the OF switch list layer information beginning with the flag (Flags) and ending with the next flag (Flags) in the OF switch list layer information as an item, and the OF switch flow Comparing the information of the table, if the OF switch that receives the advertisement message finds information matching the configuration information in the OF switch flow table, the OF switch performs according to the matched information.
- the OF configuration server is connected, and the matched information includes an OF configuration server connection type and an OF configuration server connection port carried in the notification message.
- Step 309 The OF configuration server sends an announcement message to the OF switch.
- the advertisement message is sent to the OF switch through the IP network in a multicast manner, and after receiving the advertisement message, the OF switch obtains the configuration information of the OF configuration server, and then, OF The switch establishes a connection with the OF configuration server according to the configuration information.
- the advertisement message includes configuration information required for the OF switch to establish a connection with the OF configuration server.
- the embodiment of the present invention assumes that the OF network includes a first OF configuration server 401, a second OF configuration server 402, a first OF switch 403, a second OF switch 404, and a solid ellipse indicating the first network.
- the IP includes a first router 4051, a second router 4052, and a third router 4053.
- the first router 4051 is connected to the second OF switch 404
- the third router 4053 is connected to the first OF switch 403, that is, the first router 4051 and the third router 4053 are edge routers
- the second router 4052 is connected to the first OF configuration server.
- 401 and the second OF configuration server 402 and the first router 4051, the second router 4052, and the third router 4053 in the IP network are connected to each other.
- the priority of the configured configuration management port of the first OF switch 403 and the second OF switch 404 is the priority of the first OF configuration server 401. level.
- the query message may be multicast to the first OF switch 403 and the second OF switch 404 through the first router 4051, the second router 4052, and the third router 4053 in the IP network.
- the first OF switch 403 receives the inquiry message from the first port of the first OF switch 403, and the second OF switch 404 receives the inquiry message from the first port of the second OF switch 404, assuming the priority of the first OF configuration server 401 If the priority of the second OF configuration server 402 is smaller, the first port of the first OF switch 403 is used as the configuration management port, and the first port of the second OF switch 404 is used as the configuration management port, the first OF switch 403 and the second The OF switch 404 generates a response message, and the response message may be sent to the first OF configuration server 401 and the second OF configuration server 402. The first OF configuration server 401 and the second OF configuration server 402 generate an announcement message according to the response message, and send the notification message. The first OF switch 403 and the second OF switch 404 are sent.
- the OF network in the embodiment of the present invention is only a schematic description, and may be other network structures in actual applications, which is not limited thereto.
- the OF switch first joins a specific multicast group, and the OF configuration server uses the multicast mode to send an inquiry message through the IP network to query the OF switch, and only needs to join the OF switch of the specific multicast group. It is discovered by the OF configuration server. Therefore, the OF switch can set the configuration management port of the OF switch according to the received query message, and then obtain the configuration information of the OF configuration server through the configuration management port, and establish a connection with the OF configuration server.
- the OF configuration server in the same specific multicast group can receive the multicast response.
- these OF configuration servers can negotiate how to allocate the scope of the management OF switch, and the OF configuration server can specify the OF intersection managed by each OF configuration server through a pre-configured list.
- the OF switches managed by each OF configuration server can also be negotiated through the configuration and management protocol.
- routing and forwarding of the message between the OF switch and the OF configuration server according to the embodiment of the present invention through the IP network is only a schematic description. In actual applications, other networks with routing and forwarding functions may also be used for routing and forwarding of messages, and the present invention does not Make a limit.
- the method for obtaining configuration server information provided by the embodiment of the present invention firstly joins a specific multicast group after the OF switch is powered on, and the router in the IP network establishes a multicast forwarding path, and then the OF configuration server generates a query message, and the OF configuration server Sending a query message to the OF switch, after receiving the query message, the OF switch sets the configuration management port of the OF switch according to the query message, and the OF switch generates a response message according to the query message, and sends a response message to the OF configuration server.
- the OF configuration server generates an advertisement message according to the response message, and sends an advertisement message to the OF switch.
- the OF switch After receiving the advertisement message, the OF switch obtains configuration information of the OF configuration server, and finally, the OF switch performs the configuration information according to the configuration information.
- the OF configuration server establishes a connection.
- the advertisement message includes configuration information required for the OF switch to establish a connection with the OF configuration server. Therefore, the OF switch can automatically obtain the configuration information of the OF configuration server, which avoids the problem that the manual configuration of the configuration information of the OF configuration server is large and not flexible enough.
- An embodiment of the present invention provides an open flow OF switch 50, as shown in FIG. 5, including:
- the first receiving unit 501 is configured to receive a query message sent by the OF configuration server, where the query message includes a parameter used to identify the OF configuration server.
- the setting unit 502 is configured to set a configuration management port of the OF switch according to the query message.
- the first obtaining unit 503 is configured to acquire configuration information of the OF configuration server by using the configuration management port, and establish a connection with the OF configuration server.
- the OF switch sets the configuration management port of the OF switch according to the query message sent by the received OF configuration server, establishes a connection with the OF configuration server through the configuration management port, and acquires configuration information of the OF configuration server, thereby enabling
- the OF switch automatically obtains the configuration information of the OF configuration server, which avoids the problem of large manual workload and insufficient flexibility in manually setting the configuration information of the OF configuration server.
- the first receiving unit 501 is specifically configured to:
- the setting unit 502 is specifically configured to:
- the setting unit 502 is specifically configured to:
- the first port is used as a configuration management port of the OF switch.
- the query message includes: a priority of the OF configuration server, then
- the OF switch 50 further includes:
- the second obtaining unit 504 is configured to obtain, according to the query message, a priority of the OF configuration server as a priority of the first port.
- the query message includes: a hop limit value, where the hop limit value is used to indicate the number of times the query message is forwarded,
- the OF switch 50 further includes:
- the determining unit 505 is configured to determine whether a hop limit value in the query message is equal to zero.
- the discarding unit 506 is configured to discard the query message if the hop limit value in the query message is equal to zero.
- the updating unit 507 is configured to update the hop limit value in the query message to the current hop limit value -1 if the hop limit value in the query message is not equal to zero.
- the OF switch further includes:
- the generating unit 508 is configured to generate a response message, where the response message includes an identity of the OF switch.
- the sending unit 509 is configured to send, by using the configuration management port, a response message to the OF configuration server, so that the OF configuration server generates an advertisement message according to the response message, where the notification message includes the OF configuration server. Configuration information.
- the second receiving unit 5010 is configured to receive, by using the configuration management port, an advertisement message sent by the OF configuration server.
- the establishing unit 5011 is configured to establish a connection with the OF configuration server according to the configuration information of the OF configuration server in the advertisement message.
- the embodiment of the present invention provides an OF configuration server 60, as shown in FIG. 7, including:
- the first generating unit 601 is configured to generate a query message, where the query message includes a parameter for identifying the OF configuration server.
- the first sending unit 602 is configured to send the query message to the OF switch, so that the OF switch sets a configuration management port of the OF switch according to the query message, and acquires the OF configuration server by using the configuration management port. Configuration information, establishing a connection with the OF configuration server.
- the OF configuration server generates a query message, and then sends the query message to the OF switch, so that the OF switch sets the configuration management port of the OF switch according to the query message and acquires the OF through the configuration management port.
- the configuration information of the server is configured to establish a connection with the OF configuration server, so that the OF switch can automatically obtain the configuration information of the OF configuration server, thereby avoiding the problem that the workload of manually setting the configuration information of the OF configuration server is large and not flexible enough.
- the query message includes: a priority of the OF configuration server, where the priority of the OF configuration server is used to: if the OF switch has a configured configuration management port, and the configured configuration management port is prioritized
- the port that receives the query message is used as a configuration management port of the OF switch, and the priority of the configuration management port is set to be the OF configuration server. priority.
- the query message includes: a hop limit value, where the hop limit value is used to indicate the number of times the query message is forwarded, so that the OF switch discards the query message when the hop limit value is equal to zero, When the jump limit value is not equal to zero, the jump limit value is updated to the current jump limit value -1.
- the OF configuration server 60 further includes:
- the receiving unit 603 is configured to receive a response message sent by the OF switch by using the configuration management port, where the response message includes an identity identifier of the OF switch.
- the second generating unit 604 is configured to generate an advertisement message according to the response message received by the receiving unit, where the advertisement message includes configuration information of the OF configuration server.
- a second sending unit 605 configured to send the advertisement message generated by the second generating unit to the OF switch, so that the OF switch is configured according to the announcement message.
- the configuration information of the OF configuration server establishes a connection with the OF configuration server.
- the embodiment of the present invention provides a communication system 70, as shown in FIG. 9, including: at least one such as an OF configuration server 701 and at least one such as an OF switch 702.
- the OF configuration server 701 is configured to generate a query message, where the query message includes a parameter for identifying the OF configuration server, and sending the query message to the OF switch.
- the OF switch 702 is configured to receive the query message sent by the OF configuration server, set a configuration management port of the OF switch according to the query message, and obtain configuration information of the OF configuration server by using the configuration management port, and The OF configuration server establishes a connection.
- the OF switch 702 is specifically configured to:
- the priority of the OF configuration server is obtained as the priority of the first port in the query message, and the priority of the configured configuration management port is compared. a priority with the first port, where the first port is a port that the OF switch receives the query message;
- the first port is used as a configuration management port of the OF switch.
- the OF switch 702 is further configured to:
- the OF configuration server 701 is further configured to:
- An embodiment of the present invention provides an OF switch 80, as shown in FIG. 10, including:
- the receiver 801 is configured to receive a query message sent by the OF configuration server, where the query is cancelled.
- the information includes parameters for identifying the OF configuration server.
- the processor 802 is configured to set a configuration management port of the OF switch according to the query message.
- the processor 802 is further configured to acquire configuration information of the OF configuration server by using the configuration management port, and establish a connection with the OF configuration server.
- the OF switch sets the configuration management port of the OF switch according to the query message sent by the received OF configuration server, establishes a connection with the OF configuration server through the configuration management port, and acquires configuration information of the OF configuration server, thereby enabling
- the OF switch automatically obtains the configuration information of the OF configuration server, which avoids the problem of large manual workload and insufficient flexibility in manually setting the configuration information of the OF configuration server.
- the receiver 801 is specifically configured to:
- the processor 802 is specifically configured to:
- the processor 802 is specifically configured to:
- the first port is used as a configuration management port of the OF switch.
- the query message includes: a priority of the OF configuration server, then
- the processor 802 is further configured to:
- the query message includes: a hop limit value, where the hop limit value is used to indicate the number of times the query message is forwarded,
- the processor 802 is further configured to:
- the query message is discarded.
- the hop limit value in the update query message is updated to the current hop limit value -1.
- the processor 802 is further configured to:
- a response message is generated, the response message including an identity of the OF switch.
- the OF switch 80 further includes:
- the transmitter 803 is configured to send, by using the configuration management port, a response message to the OF configuration server according to the query message, so that the OF configuration server generates an advertisement message according to the response message, where the notification message includes The configuration information of the OF configuration server.
- the receiver 801 is further configured to:
- the processor 802 is further configured to:
- the embodiment of the present invention provides an OF configuration server 90, as shown in FIG. 12, including:
- the processor 901 is configured to generate a query message, where the query message includes parameters for identifying the OF configuration server.
- the transmitter 902 is configured to send the query message to the OF switch, so that the OF switch sets a configuration management port of the OF switch according to the query message, and acquires a configuration of the OF configuration server by using the configuration management port. Information, establishing a connection with the OF configuration server.
- the OF configuration server generates a query message, and then sends the query message to the OF switch, so that the OF switch sets the configuration management port of the OF switch according to the query message and acquires the OF through the configuration management port.
- the configuration information of the server is configured to establish a connection with the OF configuration server, so that the OF switch can automatically obtain the configuration information of the OF configuration server, thereby avoiding the problem that the workload of manually setting the configuration information of the OF configuration server is large and not flexible enough.
- the query message includes: a priority of the OF configuration server, where the priority of the OF configuration server is used if the OF switch has a configured configuration management port, and the When the priority of the configured configuration management port is smaller than the priority of the OF configuration server, the port that receives the query message is used as a configuration management port of the OF switch, and the configuration management port is prioritized.
- the level is set to the priority of the OF configuration server.
- the query message includes: a hop limit value, where the hop limit value is used to indicate the number of times the query message is forwarded, so that the OF switch discards the query message when the hop limit value is equal to zero, When the jump limit value is not equal to zero, the jump limit value is updated to the current jump limit value -1.
- the OF configuration server 90 further includes:
- the receiver 903 is configured to receive a response message sent by the OF switch by using the configuration management port, where the response message includes an identity of the OF switch.
- the processor 901 is further configured to:
- the transmitter 902 is also used to:
- the embodiment of the present invention provides a communication system 100, as shown in FIG. 14, comprising: at least one OF configuration server 1001 and at least one OF switch 1002,
- the OF configuration server 1001 is configured to generate a query message, where the query message includes a parameter for identifying the OF configuration server; and sending the query message to the OF switch;
- the OF switch 1002 is configured to receive the query message sent by the OF configuration server, set a configuration management port of the OF switch according to the query message, and obtain configuration information of the OF configuration server by using the configuration management port, and The OF configuration server establishes a connection.
- the OF switch 1002 is specifically configured to:
- the priority of the OF configuration server is obtained as the priority of the first port in the query message, and the priority of the configured configuration management port is compared. a priority with the first port, wherein the The first port is a port that the OF switch receives the query message;
- the first port is used as a configuration management port of the OF switch.
- the OF switch 1002 is further configured to:
- the OF configuration server 1001 is further configured to:
- Embodiments of the present invention provide a method, apparatus, and system for acquiring configuration server information.
- the OF switch actively joins a specific multicast group after the switch is powered on.
- the router in the first network establishes a multicast forwarding path.
- the OF configuration server generates a query message, and the OF configuration server sends an inquiry message to the OF switch.
- the OF switch receives the query message.
- the configuration management port of the OF switch is set according to the query message, and the OF switch generates a response message according to the query message, and sends a response message to the OF configuration server, where the OF configuration server generates an advertisement message according to the response message. And sending an advertisement message to the OF switch.
- the OF switch After receiving the notification message, the OF switch obtains the configuration information of the OF configuration server. Finally, the OF switch establishes a connection with the OF configuration server according to the configuration information.
- the advertisement message includes configuration information required for the OF switch to establish a connection with the OF configuration server. Therefore, the OF switch can automatically obtain the configuration information of the OF configuration server, which avoids the problem that the manual configuration of the configuration information of the OF configuration server is large and not flexible enough.
- the disclosed system is The method of setting can be implemented in other ways.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
- the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
- the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明的实施例提供一种获取配置服务器信息的方法、装置及***,涉及通信领域,能够使OF交换机自动获取OF配置服务器的配置信息。所述获取配置服务器信息的方法,包括:接收OF配置服务器发送的查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;根据所述查询消息设置所述OF交换机的配置管理端口;通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。本发明实施例提供的获取配置服务器信息的方法、装置及***用于获取信息。
Description
本发明涉及通信领域,尤其涉及一种获取配置服务器信息的方法、装置及***。
OF(Open Flow,开放流)网络是基于开放流(Open Flow)协议对数据进行控制与转发的一种网络,包括OF交换机(Switch)、OF配置服务器和OF控制器(Controller)。OF交换机接收到数据包后,首先根据该OF交换机存储的流表查找转发规则,若没有查找到转发规则,则将该数据包转发给OF控制器,OF控制器对OF网络进行集中控制,由OF控制器生成新的流表,该流表中携带有新的转发规则,OF控制器将新的流表下发给该OF交换机,以便该OF交换机更新本地存储的流表。但是,OF交换机与OF控制器建立连接前,OF交换机需要先获取OF配置服务器的配置信息来与OF配置服务器建立连接,并进一步使用OF配置和管理协议从OF配置服务器获取与OF控制器之间建立连接所需的参数,从而与OF控制器来建立连接。
现有技术中,OF交换机必须预先设置OF配置服务器的配置信息,从而根据配置信息与OF配置服务器建立连接,若OF交换机没有预先设置OF配置服务器的配置信息,则OF交换机与OF配置服务器无法建立连接,而当OF交换机的数量较多时,手工设置OF配置服务器的配置信息的工作量很大,而且不够灵活。
发明内容
本发明的实施例提供一种获取配置服务器信息的方法、装置及***,能够使OF交换机自动获取OF配置服务器的配置信息。
为达到上述目的,本发明的实施例采用如下技术方案:
第一方面,提供一种获取配置服务器信息的方法,用于开放流OF交换机,包括:
接收OF配置服务器发送的查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;
根据所述查询消息设置所述OF交换机的配置管理端口;
通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
结合第一方面,在第一种可实现方式中,
所述接收OF配置服务器发送的查询消息,具体为:
从所述OF交换机的第一端口接收所述OF配置服务器发送的所述查询消息;则
所述根据所述查询消息设置所述OF交换机的配置管理端口,具体为:
根据所述查询消息设置所述第一端口为所述OF交换机的配置管理端口。
结合第一种可实现方式,在第二种可实现方式中,
所述根据所述查询消息设置所述第一端口为所述OF交换机的配置管理端口包括:
查询所述OF交换机是否存在已配置的配置管理端口;
若所述OF交换机存在已配置的配置管理端口,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级;
当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
结合第二种可实现方式,在第三种可实现方式中,
所述查询消息中包括:所述OF配置服务器的优先级,则
在所述比较所述已配置的配置管理端口的优先级与所述第一端口的优先级之前,所述方法还包括:
在所述查询消息中获取所述OF配置服务器的优先级作为所述第一端口的优先级。
结合第一方面、第一至第三种可实现方式,在第四种可实现方式中,所述查询消息包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,则
在所述根据所述查询消息设置所述OF交换机的配置管理端口之前,所述方法还包括:
确定所述查询消息中的跳限制值是否等于零;
若所述查询消息中的跳限制值等于零,丢弃所述查询消息;
若所述查询消息中的跳限制值不等于零,更新所述查询消息中的跳限制值为当前跳限制值-1。
结合第一方面、第一至四种可实现方式,在第五种可实现方式中,所述通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接,包括:
生成应答消息,所述应答消息包括所述OF交换机的身份标识;
通过所述配置管理端口,向所述OF配置服务器发送所述应答消息,以便于所述OF配置服务器根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;
通过所述配置管理端口接收所述OF配置服务器发送的所述通告消息;
根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
第二方面,提供一种提供配置服务器信息的方法,用于OF配置服务器,包括:
生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;
向OF交换机发送所述查询消息,以便于所述OF交换机根据所述查询消息设置所述OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
结合第二方面,在第一种可实现方式中,
所述查询消息中包括:所述OF配置服务器的优先级,所述OF配置服务器的优先级用于若所述OF交换机存在已配置的配置管理端口,且所述已配置的配置管理端口的优先级小于所述OF配置服务器的优先级时,将所述接收所述查询消息的端口作为所述OF交换机的配置管理端口,并将所述配置管理端口的优先级设置为所述OF配置服务器的优先级。
结合第二方面或第一种可实现方式,在第二种可实现方式中,所述查询消息中包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,以便所述OF交换机在所述跳限制值等于零时,丢弃所述查询消息,在所述跳限制值不等于零时,更新所述跳限制值为当前跳限制值-1。
结合第二方面、第一至第二种可实现方式,在第三种可实现方式中,在所述向OF交换机发送所述查询消息之后,所述方法还包括:
接收所述OF交换机通过所述配置管理端口发送的应答消息,所述应答消息包括所述OF交换机的身份标识;
根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;
向所述OF交换机发送所述通告消息,以便于所述OF交换机根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
第三方面,提供一种开放流OF交换机,包括:
第一接收单元,用于接收OF配置服务器发送的查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;
设置单元,用于根据所述查询消息设置所述OF交换机的配置管理端口;
第一获取单元,用于通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
结合第三方面,在第一种可实现方式中,
所述第一接收单元具体用于:
从所述OF交换机的第一端口接收所述OF配置服务器发送的所述查询消息;则
所述设置单元具体用于:
根据所述查询消息设置所述第一端口为所述OF交换机的配置管理端口。
结合第一种可实现方式,在第二种可实现方式中,
所述设置单元具体用于:
查询所述OF交换机是否存在已配置的配置管理端口;
若所述OF交换机存在已配置的配置管理端口,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级;
当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
结合第二种可实现方式,在第三种可实现方式中,
所述查询消息中包括:所述OF配置服务器的优先级,则
所述OF交换机还包括:
第二获取单元,用于在所述查询消息中获取所述OF配置服务器的优先级作为所述第一端口的优先级。
结合第三方面、第一至第三种可实现方式,在第四种可实现方式中,所述查询消息包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,则
所述OF交换机还包括:
确定单元,用于确定所述查询消息中的跳限制值是否等于零;
丢弃单元,用于若所述查询消息中的跳限制值等于零,丢弃所述查询消息;
更新单元,用于若所述查询消息中的跳限制值不等于零,更新所述查询消息中的跳限制值为当前跳限制值-1。
结合第三方面、第一至第四种可实现方式,在第五种可实现方式中,所述OF交换机还包括:
生成单元,用于生成应答消息,所述应答消息包括所述OF交换机的身份标识;
发送单元,用于通过所述配置管理端口,向所述OF配置服务器发送所述应答消息,以便于所述OF配置服务器根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;
第二接收单元,用于通过所述配置管理端口接收所述OF配置服务器发送的所述通告消息;
建立单元,用于根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
第四方面,提供一种OF配置服务器,包括:
第一生成单元,用于生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;
第一发送单元,用于向OF交换机发送所述查询消息,以便于所述OF交换机根据所述查询消息设置所述OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
结合第四方面,在第一种可实现方式中,
所述查询消息中包括:所述OF配置服务器的优先级,所述OF配置服务器的优先级用于若所述OF交换机存在已配置的配置管理端口,且所述已配置的配置管理端口的优先级小于所述OF配置服务器的优先级时,将所述
接收所述查询消息的端口作为所述OF交换机的配置管理端口,并将所述配置管理端口的优先级设置为所述OF配置服务器的优先级。
结合第四方面或第一种可实现方式,在第二种可实现方式中,所述查询消息中包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,以便所述OF交换机在所述跳限制值等于零时,丢弃所述查询消息,在所述跳限制值不等于零时,更新所述跳限制值为当前跳限制值-1。
结合第四方面、第一至第二种可实现方式,在第三种可实现方式中,所述OF配置服务器还包括:
接收单元,用于接收所述OF交换机通过所述配置管理端口发送的应答消息,所述应答消息包括所述OF交换机的身份标识;
第二生成单元,用于根据所述接收单元接收的所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;
第二发送单元,用于向所述OF交换机发送所述第二生成单元生成的所述通告消息,以便于所述OF交换机根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
第五方面,提供一种通信***,包括:
至少一个OF配置服务器和至少一个OF交换机,
所述OF配置服务器用于生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;向所述OF交换机发送所述查询消息;
所述OF交换机用于接收OF配置服务器发送的所述查询消息;根据所述查询消息设置所述OF交换机的配置管理端口;通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
结合第五方面,在第一种可实现方式中,所述OF交换机具体用于:
查询所述OF交换机是否存在已配置的配置管理端口;
若所述OF交换机存在已配置的配置管理端口,在所述查询消息中获取所述OF配置服务器的优先级作为第一端口的优先级,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级,其中,所述第一端口为所述OF交换机接收所述查询消息的端口;
当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
结合第五方面或第五方面的第一种可实现方式,在第二种可实现方式中,
所述OF交换机还用于生成应答消息,所述应答消息包括所述OF交换机的身份标识,通过所述配置管理端口,向所述OF配置服务器发送所述应答消息;
所述OF配置服务器还用于接收所述OF交换机通过所述配置管理端口发送的所述应答消息,根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息,向所述OF交换机发送所述通告消息;
所述OF交换机还用于通过所述配置管理端口接收所述OF配置服务器发送的所述通告消息,根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
本发明的实施例提供一种获取配置服务器信息的方法、装置及***。所述获取配置服务器信息的方法,包括:OF交换机接收OF配置服务器发送的查询消息,查询消息包含用于标识OF配置服务器的参数;根据查询消息设置OF交换机的配置管理端口,通过配置管理端口获取OF配置服务器的配置信息,与所述OF配置服务器建立连接。OF交换机根据接收到的OF配置服务器发送的查询消息设置所述OF交换机的配置管理端口,通过配置管理端口与所述OF配置服务器建立连接,获取OF配置服务器的配置信息,从而能够使OF交换机自动获取OF配置服务器的配置信息,避免了手工设置OF配置服务器的配置信息的工作量大且不够灵活的问题。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供一种获取配置服务器信息的方法流程图;
图2为本发明实施例提供一种提供配置服务器信息的方法流程图;
图3为本发明实施例提供另一种获取配置服务器信息的方法流程图;
图4为本发明实施例提供一种OF网络结构示意图;
图5为本发明实施例提供一种OF交换机结构示意图;
图6为本发明实施例提供另一种OF交换机结构示意图;
图7为本发明实施例提供一种OF配置服务器结构示意图;
图8为本发明实施例提供另一种OF配置服务器结构示意图;
图9为本发明实施例提供一种通信***示意图;
图10为本发明实施例提供又一种OF交换机结构示意图;
图11为本发明实施例提供再一种OF交换机结构示意图;
图12为本发明实施例提供又一种OF配置服务器结构示意图;
图13为本发明实施例提供再一种OF配置服务器结构示意图;
图14为本发明实施例提供另一种通信***示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供一种获取配置服务器信息的方法,用于OF交换机,如图1所示,包括:
步骤101、接收OF配置服务器发送的查询消息,所述查询消息包含用于标识所述OF配置服务器的参数。
可选的,OF交换机与OF配置服务器通过第一网络进行通信,所述第一网络可以是IP(Internet Protocol,互联网协议)网络,用于传输OF交换机与OF配置服务器之间进行通信所需的消息,包括路由器等传输设备,该第一网络中的路由器相互连接。OF配置服务器生成查询消息,通过该第一网络向OF交换机发送所述查询消息,该查询消息包含用于标识所述OF配置服务器的参数,OF交换机从该OF交换机的第一端口接收OF配置服务器发送的所述查询消息,所述第一端口为OF交换机与该第一网络中的边缘路由器相连接的该OF交换机的任意一个端口。OF交换机与所述第一网络中的边缘路由器相连接,所述边缘路由器即接入路由器,是位于该第一网络边缘的路由器。
需要说明的是,所述查询消息包括EUI-64(64-bit Extended Unique Identifier,64位扩展唯一标识符),即64位全局标识符,用于唯一标识
所述OF配置服务器的身份;IP地址,用于标识OF配置服务器的唯一身份,以便于OF交换机区别不同的OF配置服务器;HL(Hop Limit,跳限制)值,用于指示该查询消息的转发次数;优先级(priority),用于标识OF配置服务器的优先级;MAC(Media Access Control,媒体接入控制)地址,用于标识OF配置服务器的唯一身份,MAC地址还可以用于唯一标识OF交换机、OF控制器等OF设备的唯一身份。
步骤102、根据所述查询消息设置所述OF交换机的配置管理端口。
在OF交换机利用该OF交换机的第一端口接收到OF配置服务器发送的所述查询消息之后,OF交换机根据所述查询消息设置该OF交换机的配置管理端口。具体的,首先,OF交换机查询该OF交换机是否存在已配置的配置管理端口,若OF交换机存在已配置的配置管理端口,在所述查询消息中获取所述OF配置服务器的优先级作为所述第一端口的优先级,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级,当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
需要说明的是,在根据所述查询消息设置所述OF交换机的配置管理端口之前,首先,OF交换机需要确定所述查询消息中的跳限制值是否等于零,若该查询消息中的跳限制值等于零,则丢弃该查询消息,若该查询消息中的跳限制值不等于零,则更新该查询消息中的跳限制值为当前跳限制值-1。
步骤103、通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
在OF交换机根据所述查询消息成功设置该OF交换机的配置管理端口之后,再按照OF交换机中存储的流表查找转发规则,所述流表包括所述转发规则,所述转发规则为OF交换机与OF控制器之间进行消息交互时所需要的转发路径。若没有查找到匹配的流表,则OF交换机生成应答消息,所述应答消息包括所述OF交换机的身份标识。然后,OF交换机通过该OF交换机的配置管理端口,向OF配置服务器发送所述应答消息,以便于OF配置服务器根据该应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息,再者,OF交换机通过所述配置管理端口接收OF配置服务器发送的所述通告消息,获取所述OF配置服务器的
配置信息,根据该通告消息中的OF配置服务器的配置信息与OF配置服务器建立连接。
这样一来,OF交换机根据接收到的OF配置服务器发送的查询消息设置所述OF交换机的配置管理端口,通过配置管理端口与所述OF配置服务器建立连接,获取OF配置服务器的配置信息,从而能够使OF交换机自动获取OF配置服务器的配置信息,避免了手工设置OF配置服务器的配置信息的工作量大且不够灵活的问题。
本发明实施例提供一种提供配置服务器信息的方法,用于OF配置服务器,如图2所示,包括:
步骤201、生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数。
需要说明的是,所述查询消息包括EUI-64,即64位全局标识符,用于唯一标识OF配置服务器的身份;IP地址,用于标识OF配置服务器的唯一身份,以便于OF交换机区别不同的OF配置服务器;HL值,用于指示所述查询消息的转发次数;优先级(priority),用于标识OF配置服务器的优先级;MAC地址,用于标识OF配置服务器的唯一身份,MAC地址还可以用于唯一标识OF交换机、OF控制器等OF设备的唯一身份。
其中,该查询消息中OF配置服务器的优先级用于若OF交换机存在已配置的配置管理端口,且所述已配置的配置管理端口的优先级小于所述OF配置服务器的优先级时,OF交换机将所述接收所述查询消息的端口作为所述OF交换机的配置管理端口,并将所述配置管理端口的优先级设置为所述OF配置服务器的优先级。所述跳限制值用于指示所述查询消息的转发次数,以便OF交换机在所述跳限制值等于零时,丢弃该查询消息,在所述跳限制值不等于零时,更新所述跳限制值为当前跳限制值-1。
步骤202、向OF交换机发送所述查询消息,以便于所述OF交换机根据所述查询消息设置所述OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
OF配置服务器与OF交换机通过第一网络进行通信,所述第一网络可以是IP网络,用于传输OF交换机与OF配置服务器之间进行通信所需的消息,包括路由器等传输设备,该第一网络中的路由器相互连接。
在OF配置服务器生成查询消息之后,通过该第一网络向OF交换机发送该查询消息。
需要说明的是,在OF配置服务器生成查询消息向OF交换机发送所述查询消息之前,OF交换机需要上电后主动加入特定的组播组,以便于OF配置服务器向OF交换机发送查询消息,使得OF配置服务器与OF交换机通过第一网络进行通信。首先,第一网络中的边缘路由器开启IGMP(Internet Group Management Protocol,互联网组管理协议)功能,然后,所述边缘路由器按照预设时间向OF网络中的OF交换机发送IGMP REQ(Internet Group Management Protocol Request,internet组管理协议请求)消息,OF交换机通过与所述边缘路由器直接连接的该OF交换机的端口中的任意一个端口接收所述边缘路由器发送的IGMP REQ消息,OF交换机通过与所述边缘路由器直接连接的该OF交换机的端口中所述任意一个端口向该边缘路由器发送IGMP REP(Internet Group Management Protocol Respond,internet组管理协议响应)消息,该边缘路由器接收IGMP REP消息后,成功将OF交换机加入特定的组播组。再将所述第一网络中的路由器开启PIM-SM(Protocol Independent Multicast-Sparse Mode,稀疏模式独立组播)功能,该第一网络中的路由器根据PIM-SM协议和IGMP协议获取到的消息建立组播转发路径,使得所述第一网络中的路由器相互连接,以便于OF配置服务器通过该第一网络向OF交换机发送消息。所述OF网络包括第一网络、至少一个OF配置服务器和至少一个OF交换机。
在OF配置服务器向OF交换机发送所述查询消息之后,OF交换机接收到OF配置服务器发送的所述查询消息,OF交换机根据该查询消息设置OF交换机的配置管理端口,OF交换机成功设置所述配置管理端口后,根据OF交换机中存储的流表查找转发规则,转发该查询消息,若没有找到匹配的流表,则生成应答消息,向OF配置服务器发送所述应答消息,OF配置服务器接收OF交换机通过所述配置管理端口发送的应答消息,所述应答消息包括所述OF交换机的身份标识,然后,根据该应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息,向OF交换机发送所述通告消息,以便于OF交换机根据该通告消息中的所述OF配置服务器的配置信息与OF配置服务器建立连接。
这样一来,首先,OF配置服务器生成查询消息,然后,向OF交换
机发送该查询消息,以便于OF交换机根据所述查询消息设置OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接,从而能够使OF交换机自动获取OF配置服务器的配置信息,避免了手工设置OF配置服务器的配置信息的工作量大且不够灵活的问题。
本发明实施例提供一种获取配置服务器信息的方法,用于OF交换机和OF配置服务器,OF配置服务器与OF交换机基于OF网络进行消息交互,OF网络包括第一网络,假设第一网络为IP网络,该IP网络包括路由器等传输设备,且路由器之间相互连接。如图3所示,包括:
步骤301、OF交换机上电后主动加入特定的组播组。
组播传输为一种点对多点传输的通讯模式,即存在一个发送者和至少两个接收者,所述接收者在同一组播组,所有所述接收者使用的组播地址相同,所述一个发送者向所述至少两个接收者发送消息,若所述消息的数据内容相同,发送者只需生成一份消息的数据包,向加入同一个组播组的所有所述接收者发送该消息的数据包,加入同一个组播组的所有所述接收者可以接收到该消息的数据包,即组播组中端口的地址或者标识符都是组播报文或者数据帧发送的目的地址,所述每个接收者的端口的地址都一样,为同一组播组里的接收者。所述接收者还可以向第一网络中的路由器发送请求,请求加入或退出所述组播组,第一网络中的路由器有选择的复制并传输消息的数据包,即只将组播组内的所述消息的数据包传输给所述组播组的接收者,不在组播组内的接收者接收不到所述消息的数据包。
需要说明的是,组播报文的目的IP地址可以使用D类IP地址,所述D类IP地址范围是从224.0.0.0到239.255.255.255,即消息的数据包的目的IP地址不是一个接收者的IP地址,而是组播IP地址,是一个地址段,该D类地址不能出现在IP报文的源IP地址字段。例如单播传输为点对点传输的通讯模式,是将一个数据包从源IP地址路由到目的IP地址,所述单播传输的源IP地址和目的IP地址为一个具体的IP地址。所有所述接收者加入同一个组播组内,携带组播组地址的消息的数据包通过第一网络传输到组播组后立即开始向所述组播组内的所有所述接收者传输,所述组播组中的所有所述接收者都能接收到所述消息的数据包。且组播组中的接收者是动态的,接收者可以在任何时刻加入或离开组播组。同
理,MAC地址也必须是组播MAC地址,组播MAC地址和组播IP地址相对应,组播MAC地址的高24bit为0x01005e,组播MAC地址的低23bit为组播IP地址的低23bit。需要说明的是,IP地址224.0.0.0~224.0.0.255为预留的组播地址,即永久组地址,IP地址224.0.0.0保留不做分配,其它地址供路由协议使用;IP地址224.0.1.0~224.0.1.255是公用组播地址,可以用于互联网;IP地址224.0.2.0~238.255.255.255为用户可用的组播地址,即临时组地址;IP地址239.0.0.0~239.255.255.255为本地管理组播地址。
本发明实施例中假设所述发送者可以是OF配置服务器,所述接收者可以是OF交换机,假设OF配置服务器与OF交换机通过IP网络利用组播传输的方式进行消息交互,IP网络包括路由器等传输设备,该IP网络中的路由器相互连接。在OF交换机与OF配置服务器通过IP网络进行消息交互之前,OF交换机需要上电后主动加入特定的组播组。
具体的,首先,边缘路由器开启IGMP功能,所述边缘路由器即接入路由器,是位于该IP网络边缘的路由器,位于该IP网络中心的路由器叫核心路由器,实际应用中,边缘路由器和核心路由器是相对概念,都属于路由器,但是边缘路由器和核心路由器有着不同的大小和容量,所述核心路由器可以是在相对IP网络更大的网络中的边缘路由器。IGMP是互联网协议家族中的一个组播协议,所述组播协议包括组播组成员与路由器之间的组成员关系协议和路由器与路由器之间的组播路由协议,所述IGMP为组成员关系协议,用于与边缘路由器直接相连的组播组成员之间建立连接,处于不同网段的组播组成员之间可以进行组播通信,维护组播组成员关系,但是路由器需要支持组播功能,IGMP信息封装在IP报文中,在IP报文中IGMP信息的IP的协议号为2,所述组播组成员可以在任意位置、任意时间、总数不受限制地加入或退出组播组。
然后,所述边缘路由器按照预设时间周期性的向OF网络中的OF交换机发送IGMP REQ消息,用于OF交换机加入特定的组播组,所述OF网络是基于开放流(Open Flow)协议对数据进行控制与转发的一种网络,包括OF交换机、OF配置服务器和OF控制器,还有用于OF交换机与OF配置服务器建立连接和消息交互的IP网络,所述特定的组播组为OF交换机预先设置的组播组,即为OF交换机预先设置了组播地址段,所述预设时间可以为1分钟或2分钟。
再在OF交换机通过与所述边缘路由器直接连接的该OF交换机的端口中的任意一个端口接收所述边缘路由器发送的IGMP REQ消息之后,该OF交换机再通过与所述边缘路由器直接连接的所述OF交换机的端口中所述任意一个端口向所述边缘路由器发送IGMP REP消息,成功将所述OF交换机加入特定的组播组。
步骤302、路由器建立组播转发路径。
本发明实施例中假设所述IP网络中的路由器开启PIM-SM功能,所述PIM-SM为因特网协议家族中的一个组播协议,即路由器与路由器之间的组播路由协议,IP网络中的路由器根据PIM-SM协议和IGMP协议获取的信息建立组播转发路径,使得IP网络中的路由器相互连接,以便于OF配置服务器通过该IP网络向OF交换机发送消息。所述IP网络中的路由器建立组播转发路径的详细过程为现有技术,本发明实施例在此不再赘述。后续步骤中,OF交换机和OF配置服务器的消息交互均需要该IP网络中路由器的转发。
步骤303、OF配置服务器生成查询消息。
查询消息包括以太网层信息,IP层信息,应用层信息。所述查询消息的格式可以如表1所示。
表1查询消息格式
具体的,如表1所示,所述查询消息的应用层信息包括:EUI-64字段,即64位全局标识符字段,该EUI-64用于唯一标识OF配置服务器的身份,因为当所述查询消息经过IP网络中的路由器转发时,所述路由器可能将所述以太网层信息中包括的目的MAC地址修改成所述路由器的MAC地址,因此唯一标识OF配置服务器的身份的该EUI-64为所述查询消息必须携带的字段,所述EUI-64字段还可以用于唯一标识OF交换机、
OF控制器等OF设备的身份;版本号(Version)字段,用于标识配置和管理协议的版本信息,所述配置和管理协议为OF配置服务器与OF交换机进行消息交互所使用的协议,即其中包括所述查询消息的内容;消息类型(Type)字段,用于标识消息的类型,该字段中不同的消息类型值指示不同的消息类型,示例的,若消息类型值为0指示为查询消息,若消息类型值为1指示为应答消息,若消息类型值为2指示为通告消息,因此,在本发明实施例中所述查询消息的消息类型字段为0;HL值字段,用于标识所述查询消息的转发次数,为该查询消息必须携带的字段,该HL值字段中的不同数值指示查询消息不同的转发次数;优先级(priority)字段,用于标识OF配置服务器的优先级,为所述查询消息必须携带的字段;交换机列表长度(Switch list length)字段,用于指示配置和管理协议中交换机列表的长度,其可以用大于或等于1的整数表示,例如,该交换机列表长度字段中数值为8,则表示配置和管理协议中存在8个交换机列表的信息;校验和(Checksum)字段,用来校验所述查询消息在传输过程中的正确性。标志位(Flags)字段,用于标志是否存在MAC地址、MAC地址掩码(MAC Mask)、IPv4地址、IPv4地址掩码(IPv4 Mask)、IPv6地址、IPv6地址掩码(IPv6 Mask)、数据链路地址(Data Path ID)、数据链路地址掩码(Data Path ID Mask)字段,该标志位字段可以为八位,通常用1表示有,用0表示无,若所述标志位字段中的MAC地址、IPv4地址、IPv6地址、数据链路地址存在,则相应字段的掩码(Mask)值全部为1,若所述标志位中的MAC地址、IPv4地址、IPv6地址、数据链路地址不存在,则省略相应所述字段和所述字段的掩码字段,并将标志位(Flags)字段中相应位置置0;链路类型(Link Type)字段指示OF配置服务器连接类型,链路端口(Link Port)字段指示OF配置服务器连接端口,在本实施例中的查询消息未使用所述链路类型字段和所述链路端口字段。
所述以太网层信息包括:Dst MAC(Destination Address Media Access Control,目的媒体接入控制)地址字段,用于标识将所述查询消息发送给OF交换机时,所述查询消息携带的所述OF交换机的MAC(Media Access Control,媒体接入控制)地址;Src MAC(Source Address Media Access Control,源媒体接入控制)地址字段,用于标识发送所述查询消息的OF配置服务器的MAC地址。
所述IP层信息包括:Dst IP(Destination Internet Protocol,目的互联网协议)地址字段,用于标识将所述查询消息发送给OF交换机时,所述查询消息携带的所述OF交换机的IP地址;Src IP(Source Internet Protocol,源互联网协议)地址字段,用于标识OF配置服务器的IP地址,以便于存在至少两个OF配置服务器时所述OF交换机能够区别不同的OF配置服务器。
步骤304、OF配置服务器向OF交换机发送查询消息。
OF配置服务器与OF交换机通过IP网络进行消息交互。在OF配置服务器生成查询消息之后,通过该IP网络向OF交换机发送所述查询消息,以便于OF交换机根据所述查询消息设置所述OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
步骤305、OF交换机根据所述查询消息设置所述OF交换机的配置管理端口。
在OF交换机接收到OF配置服务器通过IP网络发送的查询消息之后,OF交换机从该OF交换机的第一端口接收所述查询消息,所述第一端口为该OF交换机与该IP网络中的边缘路由器相连接的该OF交换机的任意一个端口,所述边缘路由器即接入路由器,是位于该IP网络边缘的路由器。
具体的,首先,在OF交换机根据所述查询消息设置所述OF交换机的配置管理端口之前,OF交换机确定该查询消息中的跳限制值是否等于零,所述跳限制值用于指示该查询消息的转发次数。若所述查询消息中的跳限制值等于零,丢弃该查询消息;若所述查询消息中的跳限制值不等于零,更新该查询消息中的跳限制值为当前跳限制值-1。所述跳限制值为大于或等于1的整数。示例的,假设当所述查询消息中的跳限制值等于1时,该OF交换机通过所述第一端口接收到OF配置服务器发送的所述查询消息后,更新所述跳限制值为当前跳限制值-1,使得更新后的所述跳限制值为0,再检查所述跳限制值,因为所述跳限制值为0,则丢弃所述查询消息,所述OF交换机不再转发该查询消息;当所述查询消息中的跳限制值大于1时,所述OF交换机通过第一端口接收到OF配置服务器发送的所述查询消息后,更新所述跳限制值为当前跳限制值-1,再
检查所述跳限制值,若所述跳限制值-1大于0,则该OF交换机转发所述查询消息,OF交换机每转发一次所述查询消息所述跳限制值减1,直到所述跳限制值为0,OF交换机丢弃所述查询消息,不再转发该查询消息。本发明实施例假设所述查询消息中的跳限制值为2,则所述查询消息可以被OF网络中的OF交换机转发一次。
然后,OF交换机查询该OF交换机是否存在已配置的配置管理端口,若所述OF交换机存在已配置的配置管理端口,该OF交换机比较所述已配置的配置管理端口的优先级与所述第一端口的优先级。若OF网络中存在至少两个OF配置服务器,在OF交换机接收到至少两个OF配置服务器发送的查询消息后,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级,当所述已配置的配置管理端口的优先级小于所述第一端口的优先级,该OF交换机将所述第一端口作为所述OF交换机的配置管理端口,并将所述配置管理端口的优先级设置为所述OF配置服务器的优先级,当所述已配置的配置管理端口的优先级大于或等于所述第一端口的优先级,该OF交换机将所述已配置的配置管理端口作为所述OF交换机的配置管理端口。
需要说明的是,在比较所述已配置的配置管理端口的优先级与所述第一端口的优先级之前,OF交换机可以在所述查询消息中获取OF配置服务器的优先级作为所述第一端口的优先级,可以在该OF交换机本地保存的信息中获取所述已配置的配置管理端口的优先级,所述已配置的配置管理端口的优先级为该已配置的配置管理端口接收到的查询消息的发送端的OF配置服务器的优先级。
特别的,若OF网络中存在一个OF配置服务器,在OF交换机接收到一个OF配置服务器发送的查询消息后,该OF交换机比较所述已配置的配置管理端口的优先级与所述第一端口的优先级,因为所述OF交换机从该OF交换机的第一端口接收到的查询消息中包括的OF配置服务器的优先级与该OF交换机从该OF交换机的已配置的配置管理端口接收到的查询消息中包括的OF配置服务器的优先级相等,所以经过比较得到所述已配置的配置管理端口的优先级与所述第一端口的优先级相等,则所述OF交换机将所述已配置的配置管理端口作为所述OF交换机的配置管理端口。
需要说明的是,无论OF网络中存在一个OF配置服务器,还是OF
网络中存在至少两个OF配置服务器,若所述OF交换机不存在已配置的配置管理端口,则该OF交换机将所述接收查询消息的第一端口作为所述OF交换机的配置管理端口。
步骤306、OF交换机根据所述查询消息生成应答消息。
在OF交换机根据所述查询消息成功设置该OF交换机的配置管理端口之后,再按照该OF交换机中存储的流表查找转发规则,所述转发规则为OF交换机与OF控制器之间进行消息交互时所需要的转发路径。若找到匹配的流表,则OF交换机按照流表转发该查询消息。若没有找到匹配的流表,则OF交换机生成应答消息,所述应答消息包括所述OF交换机的身份标识。本发明实施例假设OF交换机没有查找到匹配的流表,所述OF交换机生成应答消息。
所述应答消息包括以太网层信息,IP层信息,应用层信息。所述应答消息的格式如表2所示。
表2应答消息格式
具体的,如表2所示,所述应答消息的应用层信息包括:MAC地址字段,用于标示所述OF交换机的MAC地址,为所述应答消息必须携带的字段;标志位(Flags)字段,用于标志是否存在MAC地址、MAC地址掩码(MAC Mask)、IPv4地址、IPv4地址掩码(IPv4 Mask)、IPv6地址、IPv6地址掩码(IPv6 Mask)、数据链路地址(Data Path ID)、数据链路地址掩码(Data Path ID Mask)字段,该标志位字段可以为八位,通常用1表示有,用0表示无,若所述标志位中的MAC地址、IPv4地址、IPv6地址、数据链路地址存在,则相应字段的掩码(Mask)值全部为1,若所述标志位中的MAC地址、IPv4地址、IPv6地址、数据链路地
址不存在,则省略相应所述字段和所述字段的掩码字段,并将标志位(Flags)字段中相应位置置0;链路类型(Link Type)字段指示OF配置服务器连接类型,链路端口(Link Port)字段指示OF配置服务器连接端口,在本实施例中的应答消息未使用所述链路类型字段和所述链路端口字段。所述数据链路地址(Data Path ID)用于在OF网络中标示OF交换机的身份,由该交换机列表层携带的所述MAC地址生成。
所述以太网层信息包括:Dst MAC地址字段,用于标识将所述应答消息发送给所述OF配置服务器时,所述应答消息携带的所述OF配置服务器的MAC地址;Src MAC地址字段,用于标识发送所述应答消息的所述OF交换机的MAC地址。
所述IP层信息包括:Dst IP地址字段,用于标识将所述应答消息发送给所述OF配置服务器时,所述应答消息携带的所述OF配置服务器的IP地址;Src IP地址字段,用于标识发送所述应答消息的所述OF交换机的IP地址。
所述应用层信息还包括:版本号(Version)字段,用于标识配置和管理协议的版本信息,所述配置和管理协议为OF配置服务器与OF交换机进行消息交互所使用的协议,即其中包括所述应答消息的内容;消息类型(Type)字段,用于标识消息的类型,该字段中不同的消息类型值指示不同的消息类型,示例的,若消息类型值为0指示为查询消息,若消息类型值为1指示为应答消息,若消息类型值为2指示为通告消息,因此,在本实施例中所述应答消息的消息类型字段为1;HL值字段,用于标识所述应答消息的转发次数,该HL值字段中的不同数值指示应答消息不同的转发次数;优先级(priority)字段,用于标识所述OF配置服务器的优先级;交换机列表长度(Switch list length)字段,用于指示配置和管理协议中交换机列表的长度,其可以用大于或等于1的整数表示;校验和(Checksum)字段,用来校验所述应答消息在传输过程中的正确性;EUI-64字段即64位全局标示符,该EUI-64用于唯一标识所述OF交换机的身份,所述EUI-64还可以用于唯一标识OF配置服务器、OF控制器等OF设备的身份。
步骤307、OF交换机向OF配置服务器发送应答消息。
在OF交换机生成应答消息之后,根据接收到的所述查询消息,通
过该OF交换机的配置管理端口,向OF配置服务器发送该应答消息,以便于OF配置服务器根据该应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息,再者,OF交换机通过所述配置管理端口接收OF配置服务器发送的所述通告消息,根据该通告消息中的OF配置服务器的配置信息与OF配置服务器建立连接。
需要说明的是,实际应用中可能存在至少两个OF交换机接收到查询消息生成应答消息,则每个所述OF交换机向OF配置服务器发送应答消息,因此,存在至少两个不同OF交换机信息的应答消息。
步骤308、OF配置服务器根据所述应答消息生成通告消息。
在OF配置服务器接收到所述OF交换机通过所述配置管理端口发送的应答消息之后,根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息。
所述通告消息包括以太网层信息,IP层信息,应用层信息。所述通告消息的格式如表3所示。
表3通告消息格式
具体的,如表3所示,所述通告消息的以太网层信息包括:Dst MAC地址字段,用于标识将所述通告消息发送给所述OF交换机时,所述通告消息携带的所述OF交换机的MAC地址;Src MAC地址字段,用于标识发送所述通告消息的所述OF配置服务器的MAC地址。
所述IP层信息包括:Dst IP地址字段,用于标识将所述通告消息发
送给所述OF交换机时,所述通告消息携带的所述OF交换机的IP地址;Src IP地址字段,用于标识所述OF配置服务器的IP地址。
所述应用层信息包括:版本号(Version)字段,用于标识配置和管理协议的版本信息,所述配置和管理协议为OF配置服务器与OF交换机进行消息交互所使用的协议,即其中包括所述通告消息的内容;消息类型(Type)字段,用于标识消息的类型,该字段中不同的消息类型值指示不同的消息类型,示例的,若消息类型值为0指示为查询消息,若消息类型值为1指示为应答消息,若消息类型值为2指示为通告消息,因此,在本实施例中所述通告消息的消息类型字段为2;HL值字段,用于标识所述通告消息的转发次数,该HL值字段中的不同数值指示通告消息不同的转发次数;优先级(priority)字段,用于标识所述OF配置服务器的优先级;交换机列表长度(Switch list length)字段,用于指示配置和管理协议中交换机列表的长度,其可以用大于或等于1的整数表示;校验和(Checksum)字段,用来校验所述通告消息在传输过程中的正确性;EUI-64字段即64位全局标示符,该EUI-64用于唯一标示所述OF配置服务器的身份,所述EUI-64还可以用于唯一标示OF交换机、OF控制器等OF设备的身份。
所述应用层信息包括:标志位(Flags)字段,用于标志MAC地址、MAC地址掩码(MAC Mask)、IPv4地址、IPv4地址掩码(IPv4 Mask)、IPv6地址、IPv6地址掩码(IPv6 Mask)、数据链路地址(Data Path ID)、数据链路地址掩码(Data Path ID Mask)字段,该标志位字段可以为八位,通常用1表示有,用0表示无,若所述标志位中的MAC地址、IPv4地址、IPv6地址、数据链路地址存在,则相应字段的掩码(Mask)值全部为1,若所述标志位中的MAC地址、IPv4地址、IPv6地址、数据链路地址不存在,则省略相应所述字段和所述字段的掩码字段,并将标志位(Flags)字段中相应位置置0;链路类型(Link Type)字段指示OF配置服务器连接类型,OF配置服务器通告OF交换机连接所述OF配置服务器时应该使用的网络协议,例如TCP(Transmission Control Protocol,传输控制协议)、UDP(User Datagram Protocol,用户数据报协议)等,为所述通告消息必须携带的字段,链路端口(Link Port)字段指示OF配置服务器连接端口,OF配置服务器通告OF交换机连接该OF配置服务器时应该使用的网络协议的端口号,例如TCP端口号、UDP端口号等,
为所述通告消息必须携带的字段。特别的,所述通告消息的交换机列表层携带了至少一个OF交换机的信息。
需要说明的是,IPv4是IP(Internet Protocol,互联网协议)的第四版,IPv6是IP(Internet Protocol,互联网协议)的第六版,也是IPv4的下一代互联网协议,IPv6将IPv4的IP地址由32位增加到128位,所述通告消息中携带的IPv4地址根据所述通告消息中携带的MAC地址分配得到所述IPv4地址,或所述通告消息中携带的IPv6地址根据所述通告消息中携带的MAC地址分配得到所述IPv6地址;数据链路地址(Data Path ID)与MAC地址作用相同用于标识所述OF交换机的唯一身份。所述通告消息包括的MAC地址、IPv4地址或IPv6地址为所述OF交换机与所述OF配置服务器之间建立连接所需要的配置信息。所述配置信息为指明所述OF交换机与所述OF配置服务器之间建立连接所需要的协议和所述协议的端口号,例如TCP协议、UDP协议和所述TCP协议端口号、所述UDP协议端口号用于指定OF配置服务器所需要连接的OF交换机;所述通告消息包括多个所述OF交换机列表层信息,收到所述通告消息的所述OF交换机在该OF交换机流表里查找与所述配置信息相匹配的信息,即所述OF交换机列表层信息中以标志位(Flags)开头到下一个标志位(Flags)结尾的OF交换机列表层信息内容作为一项,与该OF交换机流表的信息比较,若收到所述通告消息的所述OF交换机在该OF交换机流表里查找到与所述配置信息相匹配的信息,则所述OF交换机根据所述相匹配的信息来与所述OF配置服务器进行连接,所述相匹配的信息包括所述通告消息中携带的OF配置服务器连接类型和OF配置服务器连接端口等。
步骤309、OF配置服务器向OF交换机发送通告消息。
在OF配置服务器生成通告消息之后,以组播的方式通过IP网络向OF交换机发送所述通告消息,OF交换机接收到所述通告消息后,获取到所述OF配置服务器的配置信息,然后,OF交换机根据所述配置信息与所述OF配置服务器建立连接。所述通告消息包括所述OF交换机与所述OF配置服务器建立连接所需要的配置信息。
示例的,如图4所示,本发明实施例假设OF网络包括第一OF配置服务器401、第二OF配置服务器402、第一OF交换机403、第二OF交换机404和实线椭圆表示第一网络405,假设第一网络为IP网络,该IP
网络包括第一路由器4051、第二路由器4052和第三路由器4053。其中,第一路由器4051与第二OF交换机404相连,第三路由器4053与第一OF交换机403相连,即第一路由器4051和第三路由器4053为边缘路由器,第二路由器4052连接第一OF配置服务器401和第二OF配置服务器402,且IP网络内的第一路由器4051、第二路由器4052和第三路由器4053之间相互连接。
假设第一OF交换机403和第二OF交换机404加入同一个组播组,且第一OF交换机403和第二OF交换机404的已配置的配置管理端口的优先级为第一OF配置服务器401的优先级。当第二OF配置服务器402生成查询消息,可以通过该IP网络中的第一路由器4051、第二路由器4052和第三路由器4053将查询消息组播给第一OF交换机403和第二OF交换机404,第一OF交换机403从该第一OF交换机403的第一端口接收查询消息,第二OF交换机404从该第二OF交换机404的第一端口接收查询消息,假设第一OF配置服务器401的优先级小于第二OF配置服务器402的优先级,则将第一OF交换机403的第一端口作为配置管理端口,将第二OF交换机404的第一端口作为配置管理端口,第一OF交换机403和第二OF交换机404生成应答消息,可以将应答消息发送给第一OF配置服务器401和第二OF配置服务器402,第一OF配置服务器401和第二OF配置服务器402根据应答消息生成通告消息,将通告消息发送给第一OF交换机403和第二OF交换机404。本发明实施例所述的OF网络只是示意性说明,实际应用中可以是其他网络结构,对此不做限定。
需要说明的是,本发明实施例所述OF交换机先加入特定的组播组,OF配置服务器采用组播方式通过IP网络发送查询消息查询OF交换机,只要加入特定的组播组的OF交换机就可以被OF配置服务器发现,因此OF交换机可以根据收到的查询消息设置OF交换机的配置管理端口,然后,通过配置管理端口获取OF配置服务器的配置信息,与所述OF配置服务器建立连接。特别的,当存在至少两个OF配置服务器时,由于OF交换机回复给OF配置服务器的应答消息也是组播消息,所以在同一特定的组播组里的OF配置服务器均可以收到该组播应答消息,因此这些OF配置服务器之间可以协商如何分配管理OF交换机的范围,所述OF配置服务器可以通过预先配置的列表来指定每个OF配置服务器管理的OF交
换机,还可以通过配置和管理协议协商每个OF配置服务器各自管理的OF交换机。
本发明实施例所述的OF交换机与OF配置服务器通过IP网络进行消息的路由转发只是示意性说明,实际应用中还可以使用其他具有路由转发功能的网络进行消息的路由转发,本发明对此不做限定。
本发明实施例提供的获取配置服务器信息的方法,首先OF交换机上电后主动加入特定的组播组,IP网络内的路由器建立组播转发路径,然后,OF配置服务器生成查询消息,OF配置服务器向OF交换机发送查询消息,OF交换机接收到查询消息后,根据所述查询消息设置所述OF交换机的配置管理端口,OF交换机再根据所述查询消息生成应答消息,向OF配置服务器发送应答消息,OF配置服务器根据所述应答消息生成通告消息,向OF交换机发送通告消息,OF交换机接收到通告消息后,获取到所述OF配置服务器的配置信息,最后,OF交换机根据所述配置信息与所述OF配置服务器建立连接。所述通告消息包括所述OF交换机与所述OF配置服务器建立连接所需要的配置信息。从而能够使OF交换机自动获取OF配置服务器的配置信息,避免了手工设置OF配置服务器的配置信息的工作量大且不够灵活的问题。
本发明实施例提供一种开放流OF交换机50,如图5所示,包括:
第一接收单元501,用于接收OF配置服务器发送的查询消息,所述查询消息包含用于标识所述OF配置服务器的参数。
设置单元502,用于根据所述查询消息设置所述OF交换机的配置管理端口。
第一获取单元503,用于通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
这样一来,OF交换机根据接收到的OF配置服务器发送的查询消息设置所述OF交换机的配置管理端口,通过配置管理端口与所述OF配置服务器建立连接,获取OF配置服务器的配置信息,从而能够使OF交换机自动获取OF配置服务器的配置信息,避免了手工设置OF配置服务器的配置信息的工作量大且不够灵活的问题。
所述第一接收单元501具体用于:
从所述OF交换机的第一端口接收所述OF配置服务器发送的所述查
询消息;则
所述设置单元502具体用于:
根据所述查询消息设置所述第一端口为所述OF交换机的配置管理端口。
所述设置单元502具体用于:
查询所述OF交换机是否存在已配置的配置管理端口。
若所述OF交换机存在已配置的配置管理端口,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级。
当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
所述查询消息中包括:所述OF配置服务器的优先级,则
如图6所示,所述OF交换机50还包括:
第二获取单元504,用于在所述查询消息中获取所述OF配置服务器的优先级作为所述第一端口的优先级。
所述查询消息包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,则
所述OF交换机50还包括:
确定单元505,用于确定所述查询消息中的跳限制值是否等于零。
丢弃单元506,用于若所述查询消息中的跳限制值等于零,丢弃所述查询消息。
更新单元507,用于若所述查询消息中的跳限制值不等于零,更新所述查询消息中的跳限制值为当前跳限制值-1。
所述OF交换机还包括:
生成单元508,用于生成应答消息,所述应答消息包括所述OF交换机的身份标识。
发送单元509,用于通过所述配置管理端口,向所述OF配置服务器发送应答消息,以便于所述OF配置服务器根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息。
第二接收单元5010,用于通过所述配置管理端口接收所述OF配置服务器发送的通告消息。
建立单元5011,用于根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
本发明实施例提供一种OF配置服务器60,如图7所示,包括:
第一生成单元601,用于生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数。
第一发送单元602,用于向OF交换机发送所述查询消息,以便于所述OF交换机根据所述查询消息设置所述OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
这样一来,首先,OF配置服务器生成查询消息,然后,向OF交换机发送该查询消息,以便于OF交换机根据所述查询消息设置OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接,从而能够使OF交换机自动获取OF配置服务器的配置信息,避免了手工设置OF配置服务器的配置信息的工作量大且不够灵活的问题。
所述查询消息中包括:所述OF配置服务器的优先级,所述OF配置服务器的优先级用于若所述OF交换机存在已配置的配置管理端口,且所述已配置的配置管理端口的优先级小于所述OF配置服务器的优先级时,将所述接收所述查询消息的端口作为所述OF交换机的配置管理端口,并将所述配置管理端口的优先级设置为所述OF配置服务器的优先级。
所述查询消息中包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,以便所述OF交换机在所述跳限制值等于零时,丢弃所述查询消息,在所述跳限制值不等于零时,更新所述跳限制值为当前跳限制值-1。
如图8所示,所述OF配置服务器60还包括:
接收单元603,用于接收所述OF交换机通过所述配置管理端口发送的应答消息,所述应答消息包括所述OF交换机的身份标识。
第二生成单元604,用于根据所述接收单元接收的所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息。
第二发送单元605,用于向所述OF交换机发送所述第二生成单元生成的所述通告消息,以便于所述OF交换机根据所述通告消息中的所述
OF配置服务器的配置信息与所述OF配置服务器建立连接。
本发明实施例提供一种通信***70,如图9所示,包括:至少一个如OF配置服务器701和至少一个如OF交换机702,
所述OF配置服务器701用于生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;向所述OF交换机发送所述查询消息;
所述OF交换机702用于接收OF配置服务器发送的所述查询消息;根据所述查询消息设置所述OF交换机的配置管理端口;通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
所述OF交换机702具体用于:
查询所述OF交换机是否存在已配置的配置管理端口;
若所述OF交换机存在已配置的配置管理端口,在所述查询消息中获取所述OF配置服务器的优先级作为所述第一端口的优先级,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级,其中,所述第一端口为所述OF交换机接收所述查询消息的端口;
当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
所述OF交换机702还用于:
生成应答消息,所述应答消息包括所述OF交换机的身份标识,通过所述配置管理端口,向所述OF配置服务器发送应答消息;
通过所述配置管理端口接收所述OF配置服务器发送的通告消息;
根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接;
所述OF配置服务器701还用于:
接收所述OF交换机通过所述配置管理端口发送的应答消息;
根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;
向所述OF交换机发送所述通告消息。
本发明实施例提供一种OF交换机80,如图10所示,包括:
接收机801,用于接收OF配置服务器发送的查询消息,所述查询消
息包含用于标识所述OF配置服务器的参数。
处理器802,用于根据所述查询消息设置所述OF交换机的配置管理端口。
所述处理器802还用于通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
这样一来,OF交换机根据接收到的OF配置服务器发送的查询消息设置所述OF交换机的配置管理端口,通过配置管理端口与所述OF配置服务器建立连接,获取OF配置服务器的配置信息,从而能够使OF交换机自动获取OF配置服务器的配置信息,避免了手工设置OF配置服务器的配置信息的工作量大且不够灵活的问题。
所述接收机801具体用于:
从所述OF交换机的第一端口接收所述OF配置服务器发送的所述查询消息;则
所述处理器802具体用于:
根据所述查询消息设置所述第一端口为所述OF交换机的配置管理端口。
所述处理器802具体用于:
查询所述OF交换机是否存在已配置的配置管理端口。
若所述OF交换机存在已配置的配置管理端口,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级。
当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
所述查询消息中包括:所述OF配置服务器的优先级,则
所述处理器802还用于:
在所述查询消息中获取所述OF配置服务器的优先级作为所述第一端口的优先级。
所述查询消息包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,则
所述处理器802还用于:
确定所述查询消息中的跳限制值是否等于零。
若所述查询消息中的跳限制值等于零,丢弃所述查询消息。
若所述查询消息中的跳限制值不等于零,更新所述查询消息中的跳限制值为当前跳限制值-1。
所述处理器802还用于:
生成应答消息,所述应答消息包括所述OF交换机的身份标识。
如图11所示,所述OF交换机80还包括;
发射机803,用于根据所述查询消息,通过所述配置管理端口,向所述OF配置服务器发送应答消息,以便于所述OF配置服务器根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息。
所述接收机801还用于:
通过所述配置管理端口接收所述OF配置服务器发送的通告消息。
所述处理器802还用于:
根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
本发明实施例提供一种OF配置服务器90,如图12所示,包括:
处理器901,用于生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数。
发射机902,用于向OF交换机发送所述查询消息,以便于所述OF交换机根据所述查询消息设置所述OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
这样一来,首先,OF配置服务器生成查询消息,然后,向OF交换机发送该查询消息,以便于OF交换机根据所述查询消息设置OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接,从而能够使OF交换机自动获取OF配置服务器的配置信息,避免了手工设置OF配置服务器的配置信息的工作量大且不够灵活的问题。
所述查询消息中包括:所述OF配置服务器的优先级,所述OF配置服务器的优先级用于若所述OF交换机存在已配置的配置管理端口,且所
述已配置的配置管理端口的优先级小于所述OF配置服务器的优先级时,将所述接收所述查询消息的端口作为所述OF交换机的配置管理端口,并将所述配置管理端口的优先级设置为所述OF配置服务器的优先级。
所述查询消息中包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,以便所述OF交换机在所述跳限制值等于零时,丢弃所述查询消息,在所述跳限制值不等于零时,更新所述跳限制值为当前跳限制值-1。
如图13所示,所述OF配置服务器90还包括:
接收机903,用于接收所述OF交换机通过所述配置管理端口发送的应答消息,所述应答消息包括所述OF交换机的身份标识。
所述处理器901还用于:
根据所述接收机接收的所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息。
所述发射机902还用于:
向所述OF交换机发送所述处理器生成的所述通告消息,以便于所述OF交换机根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
本发明实施例提供一种通信***100,如图14所示,包括:至少一个OF配置服务器1001和至少一个OF交换机1002,
所述OF配置服务器1001用于生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;向所述OF交换机发送所述查询消息;
所述OF交换机1002用于接收OF配置服务器发送的所述查询消息;根据所述查询消息设置所述OF交换机的配置管理端口;通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
所述OF交换机1002具体用于:
查询所述OF交换机是否存在已配置的配置管理端口;
若所述OF交换机存在已配置的配置管理端口,在所述查询消息中获取所述OF配置服务器的优先级作为所述第一端口的优先级,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级,其中,所述
第一端口为所述OF交换机接收所述查询消息的端口;
当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
所述OF交换机1002还用于:
生成应答消息,所述应答消息包括所述OF交换机的身份标识,通过所述配置管理端口,向所述OF配置服务器发送应答消息;
通过所述配置管理端口接收所述OF配置服务器发送的通告消息;
根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接;
所述OF配置服务器1001还用于:
接收所述OF交换机通过所述配置管理端口发送的应答消息;
根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;
向所述OF交换机发送所述通告消息。
本发明的实施例提供一种获取配置服务器信息的方法、装置及***。首先,OF交换机上电后主动加入特定的组播组,第一网络内的路由器建立组播转发路径,然后,OF配置服务器生成查询消息,OF配置服务器向OF交换机发送查询消息,OF交换机接收到查询消息后,根据所述查询消息设置所述OF交换机的配置管理端口,OF交换机再根据所述查询消息生成应答消息,向OF配置服务器发送应答消息,OF配置服务器根据所述应答消息生成通告消息,向OF交换机发送通告消息,OF交换机接收到通告消息后,获取到所述OF配置服务器的配置信息,最后,OF交换机根据所述配置信息与所述OF配置服务器建立连接。所述通告消息包括所述OF交换机与所述OF配置服务器建立连接所需要的配置信息。从而能够使OF交换机自动获取OF配置服务器的配置信息,避免了手工设置OF配置服务器的配置信息的工作量大且不够灵活的问题。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***,装
置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
Claims (23)
- 一种获取配置服务器信息的方法,用于开放流OF交换机,其特征在于,包括:接收OF配置服务器发送的查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;根据所述查询消息设置所述OF交换机的配置管理端口;通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
- 根据权利要求1所述的方法,其特征在于,所述接收OF配置服务器发送的查询消息,具体为:从所述OF交换机的第一端口接收所述OF配置服务器发送的所述查询消息;则所述根据所述查询消息设置所述OF交换机的配置管理端口,具体为:根据所述查询消息设置所述第一端口为所述OF交换机的配置管理端口。
- 根据权利要求2所述的方法,其特征在于,所述根据所述查询消息设置所述第一端口为所述OF交换机的配置管理端口包括:查询所述OF交换机是否存在已配置的配置管理端口;若所述OF交换机存在已配置的配置管理端口,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级;当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
- 根据权利要求3所述的方法,其特征在于,所述查询消息中包括:所述OF配置服务器的优先级,则在所述比较所述已配置的配置管理端口的优先级与所述第一端口的优先级之前,所述方法还包括:在所述查询消息中获取所述OF配置服务器的优先级作为所述第一端口的优先级。
- 根据权利要求1至4任意一项权利要求所述的方法,其特征在于,所述查询消息包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,则在所述根据所述查询消息设置所述OF交换机的配置管理端口之前,所述方法还包括:确定所述查询消息中的跳限制值是否等于零;若所述查询消息中的跳限制值等于零,丢弃所述查询消息;若所述查询消息中的跳限制值不等于零,更新所述查询消息中的跳限制值为当前跳限制值-1。
- 根据权利要求1至5任意一项权利要求所述的方法,其特征在于,所述通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接,包括:生成应答消息,所述应答消息包括所述OF交换机的身份标识;通过所述配置管理端口,向所述OF配置服务器发送所述应答消息,以便于所述OF配置服务器根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;通过所述配置管理端口接收所述OF配置服务器发送的所述通告消息;根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
- 一种提供配置服务器信息的方法,用于OF配置服务器,其特征在于,包括:生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;向OF交换机发送所述查询消息,以便于所述OF交换机根据所述查询消息设置所述OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
- 根据权利要求7所述的方法,其特征在于,所述查询消息中包括: 所述OF配置服务器的优先级,所述OF配置服务器的优先级用于若所述OF交换机存在已配置的配置管理端口,且所述已配置的配置管理端口的优先级小于所述OF配置服务器的优先级时,将所述接收所述查询消息的端口作为所述OF交换机的配置管理端口,并将所述配置管理端口的优先级设置为所述OF配置服务器的优先级。
- 根据权利要求7或8所述的方法,其特征在于,所述查询消息中包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,以便所述OF交换机在所述跳限制值等于零时,丢弃所述查询消息,在所述跳限制值不等于零时,更新所述跳限制值为当前跳限制值-1。
- 根据权利要求7至9任意一项权利要求所述的方法,其特征在于,在所述向OF交换机发送所述查询消息之后,所述方法还包括:接收所述OF交换机通过所述配置管理端口发送的应答消息,所述应答消息包括所述OF交换机的身份标识;根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;向所述OF交换机发送所述通告消息,以便于所述OF交换机根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
- 一种开放流OF交换机,其特征在于,包括:第一接收单元,用于接收OF配置服务器发送的查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;设置单元,用于根据所述查询消息设置所述OF交换机的配置管理端口;第一获取单元,用于通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
- 根据权利要求11所述的OF交换机,其特征在于,所述第一接收单元具体用于:从所述OF交换机的第一端口接收所述OF配置服务器发送的所述查询消息;则所述设置单元具体用于:根据所述查询消息设置所述第一端口为所述OF交换机的配置管理端口。
- 根据权利要求12所述的OF交换机,其特征在于,所述设置单元具体用于:查询所述OF交换机是否存在已配置的配置管理端口;若所述OF交换机存在已配置的配置管理端口,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级;当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
- 根据权利要求13所述的OF交换机,其特征在于,所述查询消息中包括:所述OF配置服务器的优先级,则所述OF交换机还包括:第二获取单元,用于在所述查询消息中获取所述OF配置服务器的优先级作为所述第一端口的优先级。
- 根据权利要求11至14任意一项权利要求所述的OF交换机,其特征在于,所述查询消息包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,则所述OF交换机还包括:确定单元,用于确定所述查询消息中的跳限制值是否等于零;丢弃单元,用于若所述查询消息中的跳限制值等于零,丢弃所述查询消息;更新单元,用于若所述查询消息中的跳限制值不等于零,更新所述查询消息中的跳限制值为当前跳限制值-1。
- 根据权利要求11至15任意一项权利要求所述的OF交换机,其特征在于,所述OF交换机还包括:生成单元,用于生成应答消息,所述应答消息包括所述OF交换机的身份标识;发送单元,用于通过所述配置管理端口,向所述OF配置服务器发送所述应答消息,以便于所述OF配置服务器根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;第二接收单元,用于通过所述配置管理端口接收所述OF配置服务器发送的所述通告消息;建立单元,用于根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
- 一种OF配置服务器,其特征在于,包括:第一生成单元,用于生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;第一发送单元,用于向OF交换机发送所述查询消息,以便于所述OF交换机根据所述查询消息设置所述OF交换机的配置管理端口并通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
- 根据权利要求17所述的OF配置服务器,其特征在于,所述查询消息中包括:所述OF配置服务器的优先级,所述OF配置服务器的优先级用于若所述OF交换机存在已配置的配置管理端口,且所述已配置的配置管理端口的优先级小于所述OF配置服务器的优先级时,将所述接收所述查询消息的端口作为所述OF交换机的配置管理端口,并将所述配置管理端口的优先级设置为所述OF配置服务器的优先级。
- 根据权利要求17或18所述的OF配置服务器,其特征在于,所述查询消息中包括:跳限制值,所述跳限制值用于指示所述查询消息的转发次数,以便所述OF交换机在所述跳限制值等于零时,丢弃所述查询消息,在所述跳限制值不等于零时,更新所述跳限制值为当前跳限制值-1。
- 根据权利要求17至19任意一项权利要求所述的OF配置服务器,其特征在于,所述OF配置服务器还包括:接收单元,用于接收所述OF交换机通过所述配置管理端口发送的应答消息,所述应答消息包括所述OF交换机的身份标识;第二生成单元,用于根据所述接收单元接收的所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息;第二发送单元,用于向所述OF交换机发送所述第二生成单元生成的所述通告消息,以便于所述OF交换机根据所述通告消息中的所述OF配 置服务器的配置信息与所述OF配置服务器建立连接。
- 一种通信***,其特征在于,包括:至少一个OF配置服务器和至少一个OF交换机,所述OF配置服务器用于生成查询消息,所述查询消息包含用于标识所述OF配置服务器的参数;向所述OF交换机发送所述查询消息;所述OF交换机用于接收OF配置服务器发送的所述查询消息;根据所述查询消息设置所述OF交换机的配置管理端口;通过所述配置管理端口获取所述OF配置服务器的配置信息,与所述OF配置服务器建立连接。
- 根据权利要求21所述的通信***,其特征在于,所述OF交换机具体用于:查询所述OF交换机是否存在已配置的配置管理端口;若所述OF交换机存在已配置的配置管理端口,在所述查询消息中获取所述OF配置服务器的优先级作为第一端口的优先级,比较所述已配置的配置管理端口的优先级与所述第一端口的优先级,其中,所述第一端口为所述OF交换机接收所述查询消息的端口;当所述已配置的配置管理端口的优先级小于所述第一端口的优先级时,将所述第一端口作为所述OF交换机的配置管理端口。
- 根据权利要求21或22所述的通信***,其特征在于,所述OF交换机还用于生成应答消息,所述应答消息包括所述OF交换机的身份标识,通过所述配置管理端口,向所述OF配置服务器发送所述应答消息;所述OF配置服务器还用于接收所述OF交换机通过所述配置管理端口发送的所述应答消息,根据所述应答消息生成通告消息,所述通告消息包括所述OF配置服务器的配置信息,向所述OF交换机发送所述通告消息;所述OF交换机还用于通过所述配置管理端口接收所述OF配置服务器发送的所述通告消息,根据所述通告消息中的所述OF配置服务器的配置信息与所述OF配置服务器建立连接。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310724751.3 | 2013-12-24 | ||
CN201310724751.3A CN104734877B (zh) | 2013-12-24 | 2013-12-24 | 一种获取配置服务器信息的方法、装置及*** |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015096707A1 true WO2015096707A1 (zh) | 2015-07-02 |
Family
ID=53458334
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/094694 WO2015096707A1 (zh) | 2013-12-24 | 2014-12-23 | 一种获取配置服务器信息的方法、装置及*** |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104734877B (zh) |
WO (1) | WO2015096707A1 (zh) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105357267A (zh) * | 2015-09-30 | 2016-02-24 | 浪潮集团有限公司 | 一种获取服务器信息的方法、装置及*** |
CN108683533B (zh) * | 2018-05-14 | 2021-05-04 | 平安科技(深圳)有限公司 | 配置更新方法、配置更新的响应方法及服务器、*** |
CN108809840B (zh) * | 2018-06-12 | 2021-04-13 | 天津卓越信通科技有限公司 | 一种用于控制和管理子网中组播组的方法 |
CN113364629B (zh) * | 2021-06-15 | 2023-05-23 | 中国建设银行股份有限公司 | 交换机端口的配置方法及装置、配置信息回退方法及装置 |
CN114244702B (zh) * | 2022-02-23 | 2022-05-31 | 苏州浪潮智能科技有限公司 | 交换机配置管理方法、装置、电子设备及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101980490A (zh) * | 2010-12-01 | 2011-02-23 | 杭州华三通信技术有限公司 | 虚拟交换机和物理交换机的链路建立方法及其装置 |
CN102349268A (zh) * | 2009-03-09 | 2012-02-08 | 日本电气株式会社 | OpenFlow通信***和OpenFlow通信方法 |
CN103220235A (zh) * | 2013-04-26 | 2013-07-24 | 华为技术有限公司 | 分布式虚拟交换机的管理方法和相关装置及*** |
US20130268686A1 (en) * | 2012-03-14 | 2013-10-10 | Huawei Technologies Co., Ltd. | Method, switch, server and system for sending connection establishment request |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10319323B3 (de) * | 2003-04-29 | 2004-12-16 | Siemens Ag | Verfahren zur automatischen Konfiguration einer Kommunikationseinrichtung |
JP5300076B2 (ja) * | 2009-10-07 | 2013-09-25 | 日本電気株式会社 | コンピュータシステム、及びコンピュータシステムの監視方法 |
US8964563B2 (en) * | 2011-07-08 | 2015-02-24 | Telefonaktiebolaget L M Ericsson (Publ) | Controller driven OAM for OpenFlow |
CN103414626A (zh) * | 2013-08-28 | 2013-11-27 | 盛科网络(苏州)有限公司 | 基于网络虚拟化的报文处理方法及装置 |
-
2013
- 2013-12-24 CN CN201310724751.3A patent/CN104734877B/zh not_active Expired - Fee Related
-
2014
- 2014-12-23 WO PCT/CN2014/094694 patent/WO2015096707A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102349268A (zh) * | 2009-03-09 | 2012-02-08 | 日本电气株式会社 | OpenFlow通信***和OpenFlow通信方法 |
CN101980490A (zh) * | 2010-12-01 | 2011-02-23 | 杭州华三通信技术有限公司 | 虚拟交换机和物理交换机的链路建立方法及其装置 |
US20130268686A1 (en) * | 2012-03-14 | 2013-10-10 | Huawei Technologies Co., Ltd. | Method, switch, server and system for sending connection establishment request |
CN103220235A (zh) * | 2013-04-26 | 2013-07-24 | 华为技术有限公司 | 分布式虚拟交换机的管理方法和相关装置及*** |
Also Published As
Publication number | Publication date |
---|---|
CN104734877B (zh) | 2018-12-14 |
CN104734877A (zh) | 2015-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200366512A1 (en) | Bit indexed explicit replication for layer 2 networking | |
US10050840B2 (en) | Method and system for an internet of things (IOT) device access in a software-defined networking (SDN) system | |
US9853822B2 (en) | Bit indexed explicit replication | |
US9571382B2 (en) | Method, controller, and system for processing data packet | |
US11374857B2 (en) | Network device management method and apparatus, and system for indicating a network device to perform management operation | |
US9935781B2 (en) | Managing a large network using a single point of configuration | |
CN107968750B (zh) | 报文传输方法、装置及节点 | |
WO2022062506A1 (zh) | 一种数据处理方法、装置、存储介质及电子装置 | |
EP3059901A1 (en) | Network element device configuration and management method, device and network element device | |
WO2015096707A1 (zh) | 一种获取配置服务器信息的方法、装置及*** | |
WO2018214809A1 (zh) | 消息发送方法及装置、存储介质 | |
US10021030B2 (en) | Method and system for forwarding information in distributed network | |
US20130003729A1 (en) | Clearing forwarding entries dynamically and ensuring consistency of tables across ethernet fabric switch | |
JP2011525313A (ja) | マルチキャスト・グループ管理のための方法及び装置 | |
WO2022021818A1 (zh) | 数据报文的处理方法及装置、存储介质、电子装置 | |
US8612626B2 (en) | Group member detection among nodes of a network | |
US8559431B2 (en) | Multiple label based processing of frames | |
US9755939B2 (en) | Network wide source group tag binding propagation | |
US20160218958A1 (en) | Method and system for forwarding packet in id/locator separation environment | |
US11616715B2 (en) | Stateless multicast with traffic engineering | |
WO2018177273A1 (zh) | 一种基于bier信息的处理及装置 | |
JP6206493B2 (ja) | 制御装置、通信システム、中継装置の制御方法及びプログラム | |
WO2014199924A1 (ja) | 制御装置、通信システム、中継装置の制御方法及びプログラム | |
WO2020244372A1 (zh) | 一种实现组播的方法和装置 | |
WO2015039563A1 (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: 14873552 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: 14873552 Country of ref document: EP Kind code of ref document: A1 |