CN105765903B - A kind of topology discovery method and equipment - Google Patents
A kind of topology discovery method and equipment Download PDFInfo
- Publication number
- CN105765903B CN105765903B CN201480037526.5A CN201480037526A CN105765903B CN 105765903 B CN105765903 B CN 105765903B CN 201480037526 A CN201480037526 A CN 201480037526A CN 105765903 B CN105765903 B CN 105765903B
- Authority
- CN
- China
- Prior art keywords
- domain
- switch
- port
- link
- data packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 230000005540 biological transmission Effects 0.000 claims 7
- 238000010586 diagram Methods 0.000 description 11
- 230000009471 action Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
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/40—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
一种拓扑发现方法和设备,包括:第二主控制器接收第二交换机发送的拓扑发现报文(301),所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息(302),所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;所述第二主控制器将所述上报信息发送给全局拓扑代理,以便所述全局拓扑代理根据所述上报信息发现域间拓扑链路(303),能够实现跨域全局拓扑链路的发现。
A topology discovery method and device, comprising: a second main controller receiving a topology discovery packet (301) sent by a second switch, where the topology discovery packet includes: a link discovery packet received by the second switch , the second switch ID and the second port ID; when the second main controller judges that the link discovery packet is not the link discovery packet of the local domain, it generates reporting information according to the topology discovery packet (302) , the report information includes: the first switch ID, the first port ID, the second switch ID and the second port ID; the second main controller sends the report information to the global topology agent, so that the global topology The agent discovers inter-domain topological links according to the reported information (303), which can realize the discovery of cross-domain global topological links.
Description
技术领域technical field
本发明涉及通信技术领域,特别涉及一种拓扑发现方法及设备。The present invention relates to the field of communication technologies, and in particular, to a topology discovery method and device.
背景技术Background technique
为解决网元的部署灵活性和可管理性,业界提出了软件定义网络(SDN,Software-Defined Network)的概念。SDN通过将网元的控制逻辑和转发功能解耦,并将控制逻辑进行集中部署,使得对网络的控制和维护工作能够简单地通过对控制面设备的操作实现。在实际应用中,SDN网络中一般包括作为控制面设备的控制器(Controller)和作为转发面设备的交换机(Switch),控制器通过控制交换机上的流表项实现对数据报文处理流程的控制,交换机基于流表项实现对数据报文的转发。开放流(Openflow)协议是SDN网络中最典型和应用最多的协议,Openflow协议中的网元称为开放流控制器(Openflow Controller)和开放流交换机(Openflow Switch),以下分别简称为OF控制器和OF交换机。In order to solve the deployment flexibility and manageability of network elements, the industry proposes the concept of Software-Defined Network (SDN, Software-Defined Network). SDN decouples the control logic and forwarding function of network elements, and deploys the control logic centrally, so that the control and maintenance of the network can be realized simply by operating control plane devices. In practical applications, an SDN network generally includes a controller (Controller) serving as a control plane device and a switch (Switch) serving as a forwarding plane device. The controller controls the data packet processing flow by controlling flow entries on the switch. , the switch forwards data packets based on flow entries. The Openflow protocol is the most typical and most widely used protocol in SDN networks. The network elements in the Openflow protocol are called Openflow Controller and Openflow Switch, hereinafter referred to as OF controllers respectively. and OF switches.
SDN网络在逻辑上一般由多个域(Domain)构成。如图1所示,每个域包括:控制器、交换机以及主机(Host),由域内的控制器对域内的交换机及主机进行管理。一个域内可以包含一个或多个控制器,当包含多个控制器时,多个控制器中的一个控制器为主控制器,当包含一个控制器时,可以认为该控制器为主控制器。SDN网络中还包括全球拓扑代理(Global Topology Broker),其仅与各个域的主控制器通信。各个域的控制器之间不直接通信,所有涉及域间的事件,例如跨域路由、域间拓扑链路发现等都由全球拓扑代理处理。其中,域间拓扑链路是指不同域内的网元之间的连接,而同一个域内的网元之间的连接则称为域内拓扑链路;一般的,在发现一条域间拓扑链路时,需要确定域间拓扑链路的以下信息:链路两端网元所属域ID,链路两端的网元ID以及端口ID,当这些信息被确定时,就表示一条域间拓扑链路被发现。基于图1所示的SDN网络结构,如何实现全球拓扑代理对于域间拓扑链路的发现,进而实现跨域全局拓扑发现,是一个需要解决的问题。An SDN network is generally composed of multiple domains logically. As shown in FIG. 1 , each domain includes: a controller, a switch, and a host (Host). The controller in the domain manages the switches and the host in the domain. A domain can contain one or more controllers. When multiple controllers are included, one of the multiple controllers is the master controller. When one controller is included, the controller can be considered as the master controller. The SDN network also includes a Global Topology Broker, which communicates only with the master controller of each domain. There is no direct communication between the controllers of each domain, and all inter-domain events, such as cross-domain routing, inter-domain topology link discovery, etc., are handled by the global topology agent. Among them, the inter-domain topological link refers to the connection between network elements in different domains, and the connection between the network elements in the same domain is called the intra-domain topological link; generally, when an inter-domain topological link is found , the following information of the inter-domain topology link needs to be determined: the domain IDs of the network elements at both ends of the link, the network element IDs at both ends of the link, and the port IDs. When these information are determined, it means that an inter-domain topology link has been discovered. . Based on the SDN network structure shown in Figure 1, how to realize the discovery of inter-domain topology links by the global topology agent, and then realize the cross-domain global topology discovery, is a problem that needs to be solved.
但是,目前SDN网络中使用LLDP实现域内拓扑链路的发现,还没有跨域全局拓扑发现方法公开。However, at present, LLDP is used in SDN networks to realize the discovery of intra-domain topology links, and there is no disclosure method for cross-domain global topology discovery.
发明内容SUMMARY OF THE INVENTION
本发明实施例中提供了一种拓扑发现方法及设备,能够实现跨域全局拓扑链路的发现。The embodiments of the present invention provide a topology discovery method and device, which can realize the discovery of cross-domain global topology links.
为了解决上述技术问题,本发明实施例公开了如下技术方案:In order to solve the above technical problems, the embodiments of the present invention disclose the following technical solutions:
第一方面,提供一种拓扑发现方法,包括:In a first aspect, a topology discovery method is provided, including:
第二主控制器接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述链路发现数据包包括:第一交换机ID、第一端口ID;所述第一交换机ID用于指示向所述第二交换机发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收所述链路发现数据包的所述第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;The second main controller receives the topology discovery packet sent by the second switch, where the topology discovery packet includes: the link discovery packet received by the second switch, the second switch ID, and the second port ID; the The link discovery packet includes: a first switch ID and a first port ID; the first switch ID is used to indicate the first switch that sends the link discovery packet to the second switch, and the second switch The ID is used to indicate the second switch that receives the link discovery packet, the first port ID is used to indicate the port through which the first switch sends the link discovery packet, and the second port ID a port for instructing the second switch to receive the link discovery packet;
所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;When the second main controller determines that the link discovery packet is not a link discovery packet of the local domain, it generates report information according to the topology discovery packet, and the report information includes: the first switch ID, the first Port ID, second switch ID and second port ID;
所述第二主控制器将所述上报信息发送给全局拓扑代理,以便所述全局拓扑代理根据所述上报信息发现域间拓扑链路。The second main controller sends the report information to the global topology agent, so that the global topology agent discovers the inter-domain topology link according to the report information.
结合第一方面,在第一方面第一种可能的实现方式中,所述链路发现数据包还包括:第一域ID,所述第一域ID用于指示所述第一交换机所属域;所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包,包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the link discovery data packet further includes: a first domain ID, where the first domain ID is used to indicate a domain to which the first switch belongs; The second main controller determines that the link discovery data packet is not a link discovery data packet of the local domain, including:
所述第二主控制器判断所述链路发现数据包中包括的第一域ID与所述第二主控制器所管辖域的域ID不同。The second main controller determines that the first domain ID included in the link discovery data packet is different from the domain ID of the domain under the jurisdiction of the second main controller.
结合第一方面,在第一方面第二种可能的实现方式中,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包,包括:With reference to the first aspect, in a second possible implementation manner of the first aspect, the second main controller determines that the link discovery data packet is not a link discovery data packet of the local domain, including:
所述第二主控制器判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。The second main controller determines that the first switch indicated by the first switch ID is not a switch in the area under the jurisdiction of the second main controller.
结合第一方面,和/或第一方面第一种可能的实现方式,和/或第一方面第二种可能的实现方式,在第一方面第三种可能的实现方式中,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包之后,还包括:In combination with the first aspect, and/or the first possible implementation manner of the first aspect, and/or the second possible implementation manner of the first aspect, in the third possible implementation manner of the first aspect, the second After the main controller determines that the link discovery data packet is not a link discovery data packet of the local domain, it further includes:
所述第二主控制器将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中。The second main controller adds the second switch ID and the second port ID to the border switch management information.
第二方面,提供一种拓扑发现方法,包括:In a second aspect, a topology discovery method is provided, including:
全局拓扑代理接收第二主控制器发送的上报信息,所述上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;所述第一交换机ID用于指示发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收将所述链路发现数据包的第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;The global topology agent receives the report information sent by the second master controller, and the report information includes: the first switch ID, the first port ID, the second switch ID and the second port ID; the first switch ID is used to indicate sending the first switch of the link discovery data packet, the second switch ID is used to instruct the second switch to receive the link discovery data packet, the first port ID is used to instruct the first switch to send the port of the link discovery data packet, and the second port ID is used to indicate the port at which the second switch receives the link discovery data packet;
所述全局拓扑代理根据所述上报信息发现域间拓扑链路。The global topology agent discovers the inter-domain topology link according to the reported information.
结合第二方面,在第二方面第一种可能的实现方式中,所述全局拓扑代理根据所述上报信息发现域间拓扑链路之后,还包括:With reference to the second aspect, in a first possible implementation manner of the second aspect, after the global topology agent discovers the inter-domain topology link according to the reported information, the method further includes:
所述全局拓扑代理根据所述域间拓扑链路控制所述第一交换机或所述第二交换机进行域间数据报文的转发。The global topology agent controls the first switch or the second switch to forward the inter-domain data message according to the inter-domain topology link.
结合第二方面,和/或第二方面第一种可能的实现方式,在第二方面第二种可能的实现方式中,所述全局拓扑代理根据所述上报信息发现域间拓扑链路,包括:With reference to the second aspect, and/or the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, the global topology agent discovers the inter-domain topology link according to the reported information, including :
所述全局拓扑代理根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;The global topology agent determines the domain to which the first switch belongs according to the first switch ID, and determines the domain to which the second switch belongs according to the second switch ID;
所述全局拓扑代理根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。The global topology agent determines the first end of the inter-domain topology link according to the domain to which the first switch belongs, the first switch ID and the first port ID, and determines the first end of the inter-domain topology link according to the domain to which the second switch belongs, the second switch ID and The second port ID determines the second end of the inter-domain topology link.
结合第二方面,和/或第二方面第一种可能的实现方式,在第二方面第三种可能的实现方式中,所述上报信息还包括:第一域ID、第二域ID,所述第一域ID用于指示所述第一交换机所属域,所述第二域ID用于指示所述第二交换机所属域;所述全局拓扑代理根据所述上报信息发现域间拓扑链路,包括:In combination with the second aspect, and/or the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the reported information further includes: the first domain ID, the second domain ID, the The first domain ID is used to indicate the domain to which the first switch belongs, and the second domain ID is used to indicate the domain to which the second switch belongs; the global topology agent discovers the inter-domain topology link according to the reported information, include:
所述全局拓扑代理根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。The global topology agent determines the first end of the inter-domain topology link according to the first domain ID, the first switch ID and the first port ID, and determines the first end of the inter-domain topology link according to the second domain ID, the second switch ID and the second The port ID determines the second end of the inter-domain topological link.
第三方面,提供一种主控制器,包括:In a third aspect, a main controller is provided, including:
接收单元,用于接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述链路发现数据包包括:第一交换机ID、第一端口ID;所述第一交换机ID用于指示向所述第二交换机发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收所述链路发现数据包的所述第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;a receiving unit, configured to receive a topology discovery packet sent by a second switch, where the topology discovery packet includes: a link discovery packet received by the second switch, a second switch ID, and a second port ID; the The link discovery packet includes: a first switch ID and a first port ID; the first switch ID is used to indicate the first switch that sends the link discovery packet to the second switch, and the second switch The ID is used to indicate the second switch that receives the link discovery packet, the first port ID is used to indicate the port through which the first switch sends the link discovery packet, and the second port ID a port for instructing the second switch to receive the link discovery packet;
生成单元,用于判断所述接收单元接收到的所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;A generating unit, configured to generate reporting information according to the topology discovery packet when the link discovery packet received by the receiving unit is not a link discovery packet of the local domain, where the reporting information includes: a first switch ID, first port ID, second switch ID, and second port ID;
发送单元,用于将所述生成单元生成的所述上报信息发送给全局拓扑代理,以便所述全局拓扑代理根据所述上报信息发现域间拓扑链路。A sending unit, configured to send the reporting information generated by the generating unit to a global topology agent, so that the global topology agent discovers an inter-domain topology link according to the reporting information.
结合第三方面,在第三方面第一种可能的实现方式中,所述链路发现数据包还包括:第一域ID,所述第一域ID用于指示所述第一交换机所属域;所述生成单元具体用于:With reference to the third aspect, in a first possible implementation manner of the third aspect, the link discovery data packet further includes: a first domain ID, where the first domain ID is used to indicate a domain to which the first switch belongs; The generating unit is specifically used for:
判断所述链路发现数据包中包括的第一域ID与所述第二主控制器所管辖域的域ID不同。It is judged that the first domain ID included in the link discovery data packet is different from the domain ID of the domain under the jurisdiction of the second main controller.
结合第三方面,在第三方面第二种可能的实现方式中,所述生成单元具体用于:With reference to the third aspect, in a second possible implementation manner of the third aspect, the generating unit is specifically configured to:
判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。It is judged that the first switch indicated by the first switch ID is not a switch in the area under the jurisdiction of the second master controller.
结合第三方面,和/或第三方面第一种可能的实现方式,和/或第三方面第二种可能的实现方式,在第三方面第三种可能的实现方式中,还包括:In combination with the third aspect, and/or the first possible implementation manner of the third aspect, and/or the second possible implementation manner of the third aspect, the third possible implementation manner of the third aspect further includes:
管理单元,用于所述生成单元判断所述链路发现数据包不是本域的链路发现数据包之后,将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中。A management unit, configured to add the second switch ID and the second port ID to the border switch management information after the generating unit determines that the link discovery data packet is not a link discovery data packet of the local domain.
第四方面,提供一种全局拓扑代理,包括:In a fourth aspect, a global topology agent is provided, including:
接收单元,用于接收第二主控制器发送的上报信息,所述上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;所述第一交换机ID用于指示发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收将所述链路发现数据包的第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;a receiving unit, configured to receive report information sent by the second main controller, where the report information includes: a first switch ID, a first port ID, a second switch ID and a second port ID; the first switch ID is used for Indicates the first switch that sends the link discovery packet, the second switch ID is used to indicate the second switch that receives the link discovery packet, and the first port ID is used to indicate the first switch the port through which the switch sends the link discovery packet, and the second port ID is used to indicate the port through which the second switch receives the link discovery packet;
确定单元,用于根据所述接收单元接收到的所述上报信息发现域间拓扑链路。A determining unit, configured to discover an inter-domain topology link according to the reporting information received by the receiving unit.
结合第四方面,在第四方面第一种可能的实现方式中,还包括:With reference to the fourth aspect, the first possible implementation manner of the fourth aspect further includes:
控制单元,用于根据所述确定单元发现的所述域间拓扑链路控制所述第一交换机或所述第二交换机进行域间数据报文的转发。A control unit, configured to control the first switch or the second switch to forward the inter-domain data message according to the inter-domain topology link discovered by the determining unit.
结合第四方面,和/或第四方面第一种可能的实现方式,在第四方面第二种可能的实现方式中,所述确定单元具体用于:With reference to the fourth aspect, and/or the first possible implementation manner of the fourth aspect, in the second possible implementation manner of the fourth aspect, the determining unit is specifically used for:
根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;The domain to which the first switch belongs is determined according to the first switch ID, and the domain to which the second switch belongs is determined according to the second switch ID;
根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。The first end of the inter-domain topology link is determined according to the domain to which the first switch belongs, the first switch ID and the first port ID, and the first end of the inter-domain topology link is determined according to the domain to which the second switch belongs, the second switch ID and the second port ID the second end of the inter-domain topology link.
结合第四方面,和/或第四方面第一种可能的实现方式,在第四方面第三种可能的实现方式中,所述上报信息还包括:第一域ID、第二域ID,所述第一域ID用于指示所述第一交换机所属域,所述第二域ID用于指示所述第二交换机所属域;所述确定单元具体用于:In combination with the fourth aspect, and/or the first possible implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the reported information further includes: the first domain ID, the second domain ID, and the The first domain ID is used to indicate the domain to which the first switch belongs, and the second domain ID is used to indicate the domain to which the second switch belongs; the determining unit is specifically used for:
根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。The first end of the inter-domain topology link is determined according to the first domain ID, the first switch ID and the first port ID, and the first end of the inter-domain topology link is determined according to the second domain ID, the second switch ID and the second port ID. The second end of the interdomain topological link.
本发明实施例中,第二主控制器接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述链路发现数据包包括:第一交换机ID、第一端口ID;所述第一交换机ID用于指示向所述第二交换机发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收所述链路发现数据包的所述第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;所述第二主控制器将所述上报信息发送给全局拓扑代理,以便所述全局拓扑代理根据所述上报信息发现跨域全局拓扑链路,从而第二主控制器为全局拓扑代理发现跨域全局拓扑链路提供了数据支持,使得全局拓扑代理能够发现跨域全局拓扑链路。In this embodiment of the present invention, the second main controller receives a topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery packet received by the second switch, the second switch ID, and the first Two port IDs; the link discovery packet includes: a first switch ID and a first port ID; the first switch ID is used to indicate the first switch that sends the link discovery packet to the second switch , the second switch ID is used to indicate the second switch that receives the link discovery data packet, the first port ID is used to indicate the port through which the first switch sends the link discovery data packet, The second port ID is used to indicate the port through which the second switch receives the link discovery data packet; the second main controller determines that the link discovery data packet is not a link discovery data packet of the local domain At the time, the report information is generated according to the topology discovery message, and the report information includes: the first switch ID, the first port ID, the second switch ID and the second port ID; the second main controller will report the report The information is sent to the global topology agent, so that the global topology agent discovers the cross-domain global topology link according to the reported information, so that the second master controller provides data support for the global topology agent to discover the cross-domain global topology link, so that the global topology Topology agents can discover cross-domain global topology links.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings required to be used in the description of the embodiments will be briefly introduced below. On the premise, other drawings can also be obtained according to these drawings.
图1为SDN网络结构示例图;Figure 1 is an example diagram of an SDN network structure;
图2为本发明实施例应用场景示例图;FIG. 2 is an example diagram of an application scenario of an embodiment of the present invention;
图3为本发明拓扑发现方法的一个实施例流程图;3 is a flowchart of an embodiment of the topology discovery method of the present invention;
图4为本发明拓扑发现方法的另一个实施例流程图;4 is a flowchart of another embodiment of the topology discovery method of the present invention;
图5A为本发明拓扑发现方法的应用场景实例图;5A is an example diagram of an application scenario of the topology discovery method of the present invention;
图5B为本发明拓扑发现方法的另一个实施例流程图;5B is a flowchart of another embodiment of the topology discovery method of the present invention;
图5C为本发明拓扑发现方法的另一个实施例流程图;5C is a flowchart of another embodiment of the topology discovery method of the present invention;
图6为本发明主控制器的一个实施例框图;6 is a block diagram of an embodiment of the main controller of the present invention;
图7为本发明全局拓扑代理的实施例框图;7 is a block diagram of an embodiment of a global topology agent of the present invention;
图8为本发明主控制器另一个实施例框图;8 is a block diagram of another embodiment of the main controller of the present invention;
图9为本发明全局拓扑代理的另一个实施例框图。FIG. 9 is a block diagram of another embodiment of the global topology agent of the present invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明实施例中的技术方案,并使本发明实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图对本发明实施例中技术方案作进一步详细的说明。In order for those skilled in the art to better understand the technical solutions in the embodiments of the present invention, and to make the above objects, features, and advantages of the embodiments of the present invention more clearly understood, the following describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings. for further details.
本发明实施例可以应用于包括至少两个域的SDN网络中。The embodiments of the present invention can be applied to an SDN network including at least two domains.
以下通过图2对图3~图6所示的实施例所应用场景进行举例说明。参见图2所示,包括:全局拓扑代理210、第一域220、第二域230,其中,第一域220包括:第一主控制器2201、若干个第一域的交换机2202,第二域230包括:第二主控制器2301、若干个第二域的交换机2302;第一主控制器2201和第二主控制器2301与全局拓扑代理210连接,第一域的各个交换机2202分别与第一主控制器2201连接,第二域的交换机2302分别于第二主控制器2301连接。另外,第一域的各个交换机2202之间可以相互连接,第二域的各个交换机2302之间可以相互连接,第一域的交换机2202和第二域的交换机2302之间可以连接,同一域内的交换机之间的连接称为域内拓扑链接,不同域内的交换机之间的连接称为域间拓扑链接。The application scenarios of the embodiments shown in FIG. 3 to FIG. 6 are exemplified below with reference to FIG. 2 . Referring to FIG. 2, it includes: a global topology agent 210, a first domain 220, and a second domain 230, wherein the first domain 220 includes: a first main controller 2201, several switches 2202 in the first domain, and a second domain 230 includes: a second main controller 2301 and several switches 2302 in the second domain; the first main controller 2201 and the second main controller 2301 are connected to the global topology agent 210, and each switch 2202 in the first domain is connected to the first The main controller 2201 is connected, and the switches 2302 of the second domain are connected to the second main controller 2301 respectively. In addition, the switches 2202 in the first domain can be connected to each other, the switches 2302 in the second domain can be connected to each other, the switches 2202 in the first domain and the switches 2302 in the second domain can be connected, and the switches in the same domain The connections between them are called intra-domain topological links, and the connections between switches in different domains are called inter-domain topological links.
另外,第一域220和第二域230内还可以分别包括若干个主机,由于本发明实施例中不涉及,因此,图2中并未示出和说明。In addition, the first domain 220 and the second domain 230 may further include several hosts, respectively, which are not shown and described in FIG. 2 because they are not involved in this embodiment of the present invention.
其中,第一主控制器和第二主控制器中的第一、第二仅用于区别两个域内的主控制器,并无其他实际意义。The first and second of the first main controller and the second main controller are only used to distinguish the main controllers in the two domains, and have no other practical significance.
在实际应用中,一个SDN网络可能包括两个以上的域,当本发明实施例的拓扑发现方法应用于包括两个以上的域的SDN网络结构下时,由于本发明实施例拓扑发现方法确定的是两个域之间的域间拓扑链路,在处理过程中仅涉及到多个域中的两个域,因此,其实际应用场景最终都可以归结为图2所示的场景。In practical applications, an SDN network may include more than two domains. When the topology discovery method in this embodiment of the present invention is applied to an SDN network structure including more than two domains, because the topology discovery method in this embodiment of the present invention determines the is an inter-domain topological link between two domains, and only two domains of multiple domains are involved in the processing process. Therefore, its practical application scenarios can ultimately be attributed to the scenario shown in Figure 2.
在以下实施例中,假设第一域220的第一主控制器2201针对第一域220内第一交换机的第一端口发起拓扑链路发现,第一交换机的第一端口与第二域230的第二交换机的第二端口之间存在域间拓扑链路。其中,第一交换机和第二交换机中的第一、第二仅用于区别两个交换机,并无其他实际意义,第一端口和第二端口中的第一、第二仅用于区别两个交换机的端口,无其他实际意义。第一交换机可以是第一域内任意一个与第二域内的交换机存在域间拓扑链路的交换机,第二交换机是第二域内与第一交换机存在域间拓扑链路的交换机。In the following embodiment, it is assumed that the first master controller 2201 of the first domain 220 initiates topology link discovery for the first port of the first switch in the first domain 220, and the first port of the first switch is connected to the An inter-domain topology link exists between the second ports of the second switch. Among them, the first and second of the first switch and the second switch are only used to distinguish the two switches, and have no other practical significance, and the first and second of the first port and the second port are only used to distinguish the two The port of the switch has no other practical significance. The first switch may be any switch in the first domain that has an inter-domain topology link with a switch in the second domain, and the second switch is a switch that has an inter-domain topology link with the first switch in the second domain.
以下,将在图2所示应用场景下对本发明实施例拓扑发现方法进行说明。Hereinafter, the topology discovery method according to the embodiment of the present invention will be described in the application scenario shown in FIG. 2 .
参见图3,为本发明拓扑发现方法的一个实施例流程图,该实施例从第二主控制器侧进行描述,包括:Referring to FIG. 3, it is a flowchart of an embodiment of the topology discovery method of the present invention. This embodiment is described from the side of the second main controller, including:
步骤301:第二主控制器接收第二交换机发送的拓扑发现报文,拓扑发现报文包括:第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;Step 301: the second main controller receives a topology discovery packet sent by the second switch, where the topology discovery packet includes: the link discovery packet received by the second switch, the second switch ID, and the second port ID;
其中,链路发现数据包包括:第一交换机ID、第一端口ID;Wherein, the link discovery data packet includes: the first switch ID and the first port ID;
第一交换机ID用于指示发送链路发现数据包的第一交换机;The first switch ID is used to indicate the first switch that sends the link discovery data packet;
第二交换机ID用于指示接收链路发现数据包的第二交换机;The second switch ID is used to indicate the second switch that receives the link discovery packet;
第一端口ID用于指示第一交换机发送链路发现数据包的第一端口;The first port ID is used to indicate the first port through which the first switch sends the link discovery packet;
第二端口ID用于指示第二交换机接收到链路发现数据包的第二端口。The second port ID is used to indicate the second port on which the second switch receives the link discovery packet.
步骤302:第二主控制器判断链路发现数据包不是第二主控制器所管辖域的链路发现数据包时,根据拓扑发现报文生成上报信息,上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID。Step 302: When the second main controller determines that the link discovery data packet is not a link discovery data packet of the domain under the jurisdiction of the second main controller, it generates report information according to the topology discovery message, and the report information includes: the first switch ID, the first switch ID, the A port ID, a second switch ID, and a second port ID.
在一种可能的实现方式中,所述链路发现数据包还可以包括:第一域ID,所述第一域ID用于指示所述第一交换机所属域;所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包,可以包括:In a possible implementation manner, the link discovery data packet may further include: a first domain ID, where the first domain ID is used to indicate the domain to which the first switch belongs; the second main controller determines The link discovery data packet is not a link discovery data packet of the local domain, and may include:
所述第二主控制器判断所述链路发现数据包中包括的第一域ID与所述第二主控制器所管辖域的域ID不同。The second main controller determines that the first domain ID included in the link discovery data packet is different from the domain ID of the domain under the jurisdiction of the second main controller.
在另一种可能的实现方式中,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包可以包括:In another possible implementation manner, the second main controller judging that the link discovery data packet is not a link discovery data packet of the local domain may include:
所述第二主控制器判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。The second main controller determines that the first switch indicated by the first switch ID is not a switch in the area under the jurisdiction of the second main controller.
其中,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包,表明第二交换机ID指示的第二交换机以及第二端口ID指示的端口所连接的不是本域的网元,而是其他域的网元,因此,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包之后,所述第二主控制器可以将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中,从而实现对第二主控制器所管辖域内边界交换机的管理,所述边界交换机是指与其他域的交换机之间存在域间拓扑链路的交换机。The second main controller determines that the link discovery data packet is not a link discovery data packet of the local domain, indicating that the second switch indicated by the second switch ID and the port indicated by the second port ID are not connected to the local domain Therefore, after the second main controller determines that the link discovery data packet is not a link discovery data packet of this domain, the second main controller may The second switch ID and the second port ID are added to the border switch management information, so as to realize the management of the border switches in the domain under the jurisdiction of the second master controller. Switches for topological links.
参见下表1所示,各个域的主控制器可以通过如下表所示的方式维护所管辖域内的边界交换机的信息,边界交换机的信息包括:交换机ID、交换机属性、端口ID、端口状态等。下表1中具体的交换机ID、交换机属性、端口ID、端口状态等字段中填写的字段内容均为举例,可以在实际应用中根据实际场景定义,这里不赘述,例如下表1中UP表示端口处于开启状态,lastseetime表示端口的上次发现时间,state表示端口的拥塞程度、收发数据量等其他的状态。As shown in Table 1 below, the master controller of each domain can maintain the information of border switches in the domain under its jurisdiction as shown in the following table. The information of border switches includes: switch ID, switch attribute, port ID, port status, etc. The fields filled in the specific switch ID, switch attribute, port ID, port status and other fields in Table 1 are examples and can be defined according to actual scenarios in practical applications. In the open state, lastseetime indicates the last discovery time of the port, and state indicates the congestion level of the port, the amount of data sent and received, and other states.
表1Table 1
步骤303:第二主控制器将上报信息发送给全局拓扑代理,以便全局拓扑代理根据上报信息发现域间拓扑链路。Step 303: The second master controller sends the report information to the global topology agent, so that the global topology agent discovers the inter-domain topology link according to the report information.
其中,所述域间拓扑链路可以用于进行域间数据报文的转发等。其中,可以由全局拓扑代理根据所述域间拓扑链路控制第一交换机或者第二交换机进行域间数据报文的转发,可选地,全局拓扑代理可以通过第二主控制器控制第一交换机或第二交换机进行域间数据报文的转发。Wherein, the inter-domain topology link may be used for forwarding of inter-domain data packets and the like. The global topology agent may control the first switch or the second switch to forward the inter-domain data packets according to the inter-domain topology link, optionally, the global topology agent may control the first switch through the second main controller Or the second switch forwards data packets between domains.
本实施例中,第二主控制器接收第二交换机发送的拓扑发现报文,判断拓扑发现报文中的链路发现数据包不是本域的链路发现数据包时,根据拓扑发现报文生成上报信息,将上报信息发送给全局拓扑代理,以便全局拓扑代理根据上报信息发现跨域全局拓扑链路,从而为全局拓扑代理发现跨域全局拓扑链路提供了数据支持,使得全局拓扑代理能够发现跨域全局拓扑链路。In this embodiment, the second main controller receives the topology discovery packet sent by the second switch, and determines that the link discovery packet in the topology discovery packet is not the link discovery packet of the domain, and generates a topology discovery packet according to the topology discovery packet. Report information, and send the report information to the global topology agent, so that the global topology agent can discover the cross-domain global topology link according to the reported information, thus providing data support for the global topology agent to discover the cross-domain global topology link, so that the global topology agent can discover the cross-domain global topology link. Cross-domain global topology link.
参见图4,为本发明拓扑发现方法的另一个实施例流程图,该实施例从全局拓扑代理侧进行描述,包括:Referring to FIG. 4, it is a flowchart of another embodiment of the topology discovery method of the present invention. This embodiment is described from the global topology agent side, including:
步骤401:全局拓扑代理接收第二主控制器发送的上报信息,上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;Step 401: the global topology agent receives the report information sent by the second master controller, and the report information includes: the first switch ID, the first port ID, the second switch ID and the second port ID;
其中,第一交换机ID用于指示发送链路发现数据包的第一交换机;Wherein, the first switch ID is used to indicate the first switch that sends the link discovery data packet;
第二交换机ID用于指示接收链路发现数据包的第二交换机;The second switch ID is used to indicate the second switch that receives the link discovery packet;
第一端口ID用于指示第一交换机发送链路发现数据包的第一端口;The first port ID is used to indicate the first port through which the first switch sends the link discovery packet;
第二端口ID用于指示第二交换机接收到链路发现数据包的第二端口。The second port ID is used to indicate the second port on which the second switch receives the link discovery packet.
其中,第一交换机ID可以通过第一交换机的名称、MAC地址、或IP地址等实现,这里不限定;第二交换机ID可以通过第二交换机的名称、MAC地址、或IP地址等实现。The first switch ID may be implemented by the name, MAC address, or IP address of the first switch, which is not limited here; the second switch ID may be implemented by the name, MAC address, or IP address of the second switch.
交换机的端口ID可以预先为各个端口设置,具体设置方法本发明实施例不限定。The port ID of the switch may be preset for each port, and the specific setting method is not limited in the embodiment of the present invention.
步骤402:全局拓扑代理根据上报信息发现域间拓扑链路。Step 402: The global topology agent discovers the inter-domain topology link according to the reported information.
在一种可能的实现方式中,所述全局拓扑代理根据所述上报信息发现域间拓扑链路可以包括:In a possible implementation manner, the discovery of the inter-domain topology link by the global topology agent according to the reported information may include:
所述全局拓扑代理根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;The global topology agent determines the domain to which the first switch belongs according to the first switch ID, and determines the domain to which the second switch belongs according to the second switch ID;
所述全局拓扑代理根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。The global topology agent determines the first end of the inter-domain topology link according to the domain to which the first switch belongs, the first switch ID and the first port ID, and determines the first end of the inter-domain topology link according to the domain to which the second switch belongs, the second switch ID and The second port ID determines the second end of the inter-domain topology link.
在另一种可能的实现方式中,所述上报信息还可以包括:第一域ID、第二域ID,所述第一域ID用于指示所述第一交换机所属域,所述第二域ID用于指示所述第二交换机所属域;所述全局拓扑代理根据所述上报信息发现域间拓扑链路可以包括:In another possible implementation manner, the reporting information may further include: a first domain ID and a second domain ID, where the first domain ID is used to indicate a domain to which the first switch belongs, and the second domain ID The ID is used to indicate the domain to which the second switch belongs; the global topology agent discovering the inter-domain topology link according to the reported information may include:
所述全局拓扑代理根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。The global topology agent determines the first end of the inter-domain topology link according to the first domain ID, the first switch ID and the first port ID, and determines the first end of the inter-domain topology link according to the second domain ID, the second switch ID and the second The port ID determines the second end of the inter-domain topological link.
其中,各个域的域ID可以预先为各个域设置,具体设置方法本发明实施例并不限定。The domain ID of each domain may be preset for each domain, and the specific setting method is not limited in this embodiment of the present invention.
其中,步骤402之后还可以包括:全局拓扑代理根据发现的域间拓扑链路控制所述第一交换机或所述第二交换机进行域间数据报文的转发,可选地,全局拓扑代理可以通过第二主控制器控制第一交换机或第二交换机进行域间数据报文的转发。Wherein, after step 402, it may further include: the global topology agent controls the first switch or the second switch to forward the inter-domain data packet according to the discovered inter-domain topology link, optionally, the global topology agent can pass The second main controller controls the first switch or the second switch to forward data packets between domains.
本实施例中,全局拓扑代理接收第二主控制器发送的上报信息,上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID,根据上报信息发现跨域全局拓扑链路,从而实现了跨域全局拓扑链路的发现。In this embodiment, the global topology agent receives the report information sent by the second master controller, and the report information includes: the first switch ID, the first port ID, the second switch ID, and the second port ID, and discovers the cross-domain global topology according to the report information. Topological links, thus realizing the discovery of cross-domain global topological links.
参见图5A,为本发明拓扑发现方法的一种应用场景实例,该网络包括:全球拓扑代理、域1、域2,在域1内包括:主控制器OFC_1、交换机Sw1_1、交换机Sw1_2以及交换机Sw1_3,在域2内包括:主控制器OFC_2、交换机Sw2_1以及交换机Sw2_2,域1内的交换机Sw1_1的端口1与域2内的交换机Sw2_1的端口1连接,形成了一条域间拓扑链路,其中,域1的域ID为Domain1,域2的域ID为Domain2,交换机Sw1_1的ID为Sw1_1,交换机Sw2_1的ID为Sw2_1,交换机Sw1_1和交换机Sw2_1的端口1的ID均为Port1;本发明实施例拓扑发现方法的执行目的在于全球拓扑代理能够发现这条域间拓扑链路。其中,域1和域2内还可以包括主机,由于本发明实施例并不涉及,因此未举例示出。Referring to FIG. 5A , which is an example of an application scenario of the topology discovery method of the present invention, the network includes: a global topology agent, a domain 1, and a domain 2, and the domain 1 includes: a main controller OFC_1, a switch Sw1_1, a switch Sw1_2, and a switch Sw1_3 , the domain 2 includes: the main controller OFC_2, the switch Sw2_1 and the switch Sw2_2, the port 1 of the switch Sw1_1 in the domain 1 is connected with the port 1 of the switch Sw2_1 in the domain 2, forming an inter-domain topology link, wherein, The domain ID of domain 1 is Domain1, the domain ID of domain 2 is Domain2, the ID of switch Sw1_1 is Sw1_1, the ID of switch Sw2_1 is Sw2_1, and the IDs of port 1 of switch Sw1_1 and switch Sw2_1 are both Port1; topology discovery in this embodiment of the present invention The purpose of the implementation of the method is that the global topology agent can discover this inter-domain topology link. Wherein, the domain 1 and the domain 2 may also include a host, which is not described by an example because it is not involved in the embodiment of the present invention.
参见图5B,为本发明拓扑发现方法另一个实施例流程图,该实施例中将结合图5A所示的实例进行说明。Referring to FIG. 5B , it is a flow chart of another embodiment of the topology discovery method of the present invention. This embodiment will be described with reference to the example shown in FIG. 5A .
在本实施例中,预先为各个域设置域ID,所述域ID可以由全局拓扑代理为各个域设置,或者,也可以由各个域的主控制器为主控制器自身所管辖域设置,例如,主控制器可以根据主控制器自身的IP地址或MAC地址和时间通过哈希运算得到一个值作为主控制器所管辖域的域ID,具体确定域ID的方法本发明并不限制,此处不再赘述。In this embodiment, a domain ID is set for each domain in advance, and the domain ID can be set for each domain by the global topology agent, or can also be set by the main controller of each domain for the domain under the jurisdiction of the main controller itself, for example , the main controller can obtain a value by hash operation according to the main controller's own IP address or MAC address and time as the domain ID of the domain under the jurisdiction of the main controller, the specific method for determining the domain ID is not limited in the present invention, here No longer.
步骤501:各个域的主控制器向全局拓扑代理发送注册信息,以在全局拓扑代理中注册各个域。Step 501: The master controller of each domain sends registration information to the global topology agent, so as to register each domain in the global topology agent.
其中,所述注册信息可以包括:主控制器的地址、主控制器所管辖域的域ID以及所管辖域的域信息。The registration information may include: the address of the main controller, the domain ID of the domain under the jurisdiction of the main controller, and the domain information of the domain under the jurisdiction.
其中,主控制器的地址可以为IP地址或者MAC地址等。所管辖域的域信息可以包括:域内各个网元ID、域内网元的IP地址范围等,网元ID可以为网元的名称、网元的IP地址或MAC地址等。The address of the main controller may be an IP address or a MAC address or the like. The domain information of the domain under the jurisdiction may include: each network element ID in the domain, the IP address range of the network elements in the domain, etc. The network element ID may be the name of the network element, the IP address or MAC address of the network element, and the like.
结合图5A,两个域的主控制器上报的注册信息可以如表2所示。其中,主控制器OFC_1所管辖域为域1,域ID为Domain1,主控制器OFC_1的IP地址为192.168.1.11,所管辖域的域信息为:Host1_1,IP地址范围:192.168.1.10~192.168.1.100;主控制器OFC_2所管辖域为域2,域ID为Domain2,主控制器OFC_2的IP地址为192.168.2.11,所管辖域的域信息为:Host2_1,IP地址范围:192.168.2.10~192.168.2.100。With reference to FIG. 5A , the registration information reported by the master controllers of the two domains may be as shown in Table 2. Among them, the domain under the jurisdiction of the main controller OFC_1 is Domain 1, the domain ID is Domain1, the IP address of the main controller OFC_1 is 192.168.1.11, the domain information of the domain under its jurisdiction is: Host1_1, and the IP address range: 192.168.1.10~192.168. 1.100; the domain under the jurisdiction of the main controller OFC_2 is domain 2, the domain ID is Domain2, the IP address of the main controller OFC_2 is 192.168.2.11, the domain information of the domain under its jurisdiction is: Host2_1, and the IP address range: 192.168.2.10~192.168. 2.100.
表2Table 2
其中,本步骤为可选步骤。Wherein, this step is an optional step.
步骤502:第一域的第一主控制器针对第一交换机的第一端口生成链路发现数据包,所述链路发现数据包可以包括:第一交换机ID、第一端口ID以及第一域ID。Step 502: The first master controller of the first domain generates a link discovery data packet for the first port of the first switch, where the link discovery data packet may include: the first switch ID, the first port ID, and the first domain ID.
结合图5A,假设第一域为域1,第一主控制器为主控制器OFC_1,第一交换机为交换机Sw1_1,第一端口为端口1,则,第一交换机ID为Sw1_1,第一端口ID为Port1,第一域ID为Domain1。With reference to FIG. 5A , assuming that the first domain is domain 1, the first main controller is the main controller OFC_1, the first switch is switch Sw1_1, and the first port is port 1, then the first switch ID is Sw1_1, and the first port ID is Sw1_1. It is Port1, and the first domain ID is Domain1.
除了上述三种信息,链路发现数据包中还可以包括其他信息,具体包括的信息本发明实施例并不限定。In addition to the above three kinds of information, the link discovery data packet may also include other information, which is not limited in this embodiment of the present invention.
在一种可能的实现方式中,链路发现数据包可以通过下表3所示的结构实现。In a possible implementation manner, the link discovery data packet may be implemented through the structure shown in Table 3 below.
表3table 3
其中,src_mac表示发送链路发现数据包的源网元的MAC地址,在本实施例中源网元为第一交换机;dst_mac表示接收链路发现数据包的目标网元的MAC地址,由于第一主控制器在生成链路发现数据包时并不知道链路发现数据包的目标网元,因此,该字段可以缺省,参见表2,通过FF:FF:FF:FF:FF表示;eth_type表示:以太网类型,用于表示数据包是用于链路发现的数据包;chassis ID三元组(TLV)表示:LLDP数据包中的TLV的一个字段;PortID TLV表示源网元中发送链路发现数据包的端口ID三元组,其中的Value用于记录源网元中发送链路发现数据包的端口的端口ID,例如表2中所示的Port1;TTL TLV表示:超时时间;Domain TLV表示域三元组,其中的Value用于记录主控制器所管辖域的域ID;Action表示源网元对链路发现数据包所作的动作,例如,可以设置为表2所示的out-to-port1,也即指示源网元将链路发现数据包从端口ID为port1的端口转发出去,当源网元转发该链路发现数据包时,Action这一字段将被源网元清空或设置为缺省;End of TLV表示:数据包中TLV字段的结束标志。Wherein, src_mac represents the MAC address of the source network element that sends the link discovery data packet. In this embodiment, the source network element is the first switch; dst_mac represents the MAC address of the target network element that receives the link discovery data packet. The main controller does not know the target network element of the link discovery packet when it generates the link discovery packet. Therefore, this field can be defaulted, see Table 2, and is represented by FF:FF:FF:FF:FF; eth_type indicates : Ethernet type, used to indicate that the data packet is a data packet for link discovery; chassis ID triplet (TLV) indicates: a field of TLV in the LLDP data packet; PortID TLV indicates the sending link in the source network element Port ID triplet of the discovery packet, where Value is used to record the port ID of the port in the source network element that sends the link discovery packet, such as Port1 shown in Table 2; TTL TLV means: timeout; Domain TLV Represents a domain triple, where Value is used to record the domain ID of the domain under the jurisdiction of the main controller; Action represents the action of the source network element on the link discovery packet. For example, it can be set to the out-to shown in Table 2. -port1, which instructs the source NE to forward the link discovery packet from the port whose port ID is port1. When the source NE forwards the link discovery packet, the Action field will be cleared or set by the source NE It is the default; End of TLV means: the end mark of the TLV field in the data packet.
步骤503:第一交换机接收链路发现数据包,从第一端口ID指示的第一端口转发该链路发现数据包。Step 503: The first switch receives the link discovery data packet, and forwards the link discovery data packet from the first port indicated by the first port ID.
依照上述实例,图5A中第一端口ID为Port1,所指示的第一端口为端口1,交换机Sw1_1将从自身的端口1转发该链路发现数据包。According to the above example, the first port ID in FIG. 5A is Port1, the indicated first port is Port 1, and the switch Sw1_1 will forward the link discovery data packet from its own port 1.
步骤504:第二交换机从第二端口接收到该链路发现数据包,生成拓扑发现报文发送至第二主控制器。Step 504: The second switch receives the link discovery packet from the second port, generates a topology discovery packet and sends it to the second main controller.
拓扑发现报文包括:第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID。The topology discovery message includes: a link discovery data packet received by the second switch, the ID of the second switch, and the ID of the second port.
第二交换机ID用于指示第二交换机;第二端口ID用于指示第二交换机中接收到链路发现数据包的第二端口。The second switch ID is used to indicate the second switch; the second port ID is used to indicate the second port in the second switch that receives the link discovery packet.
依照上述实例,由于图5A中交换机Sw1_1的端口1实际与交换机Sw2_1的端口1连接,因此,第二交换机为交换机Sw2_1,第二端口为端口1,相应的,According to the above example, since the port 1 of the switch Sw1_1 in FIG. 5A is actually connected to the port 1 of the switch Sw2_1, the second switch is the switch Sw2_1, and the second port is the port 1. Correspondingly,
交换机Sw2_1将从自身的端口1接收到链路发现数据包;交换机Sw2_1生成的拓扑发现报文中第二交换机ID为Sw2_1,第二端口ID为Port1;第二主控制器为第二域的主控制器OFC2_1。The switch Sw2_1 will receive the link discovery packet from its own port 1; the second switch ID in the topology discovery packet generated by the switch Sw2_1 is Sw2_1, and the second port ID is Port1; the second master controller is the master of the second domain. Controller OFC2_1.
步骤505:第二主控制器接收拓扑发现报文,判断链路发现数据包中的第一域ID与第二主控制器所管辖域的域ID不同时,根据拓扑发现报文生成上报信息,将上报信息发送给全局拓扑代理。Step 505: the second main controller receives the topology discovery message, and determines that when the first domain ID in the link discovery data packet is different from the domain ID of the domain under the jurisdiction of the second main controller, the report information is generated according to the topology discovery message, Send the report information to the global topology agent.
上报信息可以包括:第一交换机ID、第一端口ID、第一域ID、第二交换机ID、第二端口ID以及第二域ID。The reporting information may include: a first switch ID, a first port ID, a first domain ID, a second switch ID, a second port ID, and a second domain ID.
本实施例中,如果第二主控制器判断链路发现数据包中的第一域ID与第二主控制器所管辖域的域ID相同,那么第二主控制器将执行域内拓扑链路发现过程,这里不再赘述。In this embodiment, if the second main controller determines that the first domain ID in the link discovery data packet is the same as the domain ID of the domain under the jurisdiction of the second main controller, the second main controller will perform intra-domain topology link discovery The process will not be repeated here.
依照上述实例并结合图5A,第二主控制器为主控制器OFC2_1,其所管辖的域2的域ID为Domain 2,而第一域ID为Domain 1,主控制器OFC2_1判断两者不相同,将生成上报信息,上报信息中的第一交换机ID为Sw1_1、第一端口ID为Port1、第一域ID为Domain 1、第二交换机ID为Sw2_1、第二端口ID为Port1、第二域ID为Domain 2。According to the above example and in conjunction with FIG. 5A , the second main controller is the main controller OFC2_1, the domain ID of the domain 2 under its jurisdiction is Domain 2, and the first domain ID is Domain 1, and the main controller OFC2_1 judges that the two are different. , will generate report information, the first switch ID in the report information is Sw1_1, the first port ID is Port1, the first domain ID is Domain 1, the second switch ID is Sw2_1, the second port ID is Port1, the second domain ID for Domain 2.
步骤506:全局拓扑代理接收上报信息,根据上报信息发现域间拓扑链路。Step 506: The global topology agent receives the report information, and discovers the inter-domain topology link according to the report information.
其中,全局拓扑代理根据上报信息发现域间拓扑链路可以包括:Wherein, the global topology agent discovering inter-domain topology links according to the reported information may include:
全局拓扑代理根据第一域ID、第一交换机ID以及第一端口ID确定域间拓扑链路的第一端,根据第二域ID、第二交换机ID以及第二端口ID发现域间拓扑链路的第二端。The global topology agent determines the first end of the inter-domain topological link according to the first domain ID, the first switch ID and the first port ID, and discovers the inter-domain topological link according to the second domain ID, the second switch ID and the second port ID the second end.
依照上述实例并结合图5A,全局拓扑代理将确定出域间拓扑链路的第一端为:域1的交换机Sw1_1的端口1,域间拓扑链路的第二端为:域2的交换机Sw2_1的端口1。According to the above example and in conjunction with FIG. 5A, the global topology agent will determine that the first end of the inter-domain topological link is: port 1 of the switch Sw1_1 of domain 1, and the second end of the inter-domain topological link is: the switch Sw2_1 of domain 2 port 1.
本实施例中,第一主控制器在生成链路发现数据包时,在链路发现数据包中携带自身所管辖的第一域的第一域ID,从而链路发现数据包经过域间拓扑链路传输至另一个域的第二主控制器时,第二主控制器可以根据第一域ID判断该链路发现数据包不是第二主控制器所管辖域的链路发现数据包,进而上报全局拓扑代理,使得全局拓扑代理能够实现跨域全局拓扑链路的发现。In this embodiment, when generating the link discovery data packet, the first master controller carries the first domain ID of the first domain under its jurisdiction in the link discovery data packet, so that the link discovery data packet passes through the inter-domain topology When the link is transmitted to the second master controller of another domain, the second master controller can determine, according to the first domain ID, that the link discovery packet is not a link discovery packet of the domain under the jurisdiction of the second master controller, and further Report to the global topology agent, so that the global topology agent can realize the discovery of cross-domain global topology links.
参见图5C,为本发明拓扑发现方法另一个实施例流程图,该实施例中也将结合图5A所示的实例进行说明。Referring to FIG. 5C , it is a flowchart of another embodiment of the topology discovery method of the present invention, which will also be described in conjunction with the example shown in FIG. 5A .
在本实施例中,预先为各个域设置域ID,所述域ID可以由全局拓扑代理为各个域设置,或者,也可以由各个域的主控制器为主控制器自身所管辖域设置,例如,主控制器可以根据主控制器自身的IP地址或MAC地址和时间通过哈希运算得到一个值作为主控制器所管辖域的域ID。In this embodiment, a domain ID is set for each domain in advance, and the domain ID can be set for each domain by the global topology agent, or can also be set by the main controller of each domain for the domain under the jurisdiction of the main controller itself, for example , the main controller can obtain a value through hash operation according to the main controller's own IP address or MAC address and time as the domain ID of the domain under the jurisdiction of the main controller.
步骤511:各个域的主控制器向全局拓扑代理发送注册信息,以在全局拓扑代理中注册各个域。Step 511: The master controller of each domain sends registration information to the global topology agent to register each domain in the global topology agent.
本步骤的实现请参见步骤501中的相关描述,这里不赘述。For the implementation of this step, please refer to the relevant description in step 501, which is not repeated here.
步骤512:第一域的第一主控制器针对第一交换机的第一端口生成链路发现数据包,所述链路发现数据包可以包括:第一交换机ID、第一端口ID。Step 512: The first master controller of the first domain generates a link discovery data packet for the first port of the first switch, where the link discovery data packet may include: the first switch ID and the first port ID.
结合图5A,假设第一域为域1,第一主控制器为主控制器OFC_1,第一交换机为交换机Sw1_1,第一端口为端口1,则,第一交换机ID为Sw1_1,第一端口ID为port1。With reference to FIG. 5A , assuming that the first domain is domain 1, the first main controller is the main controller OFC_1, the first switch is switch Sw1_1, and the first port is port 1, then the first switch ID is Sw1_1, and the first port ID is Sw1_1. for port1.
其中,链路发现数据包的实现结构可以参见步骤502的相关描述,其中,表2中的Domain TLV字段可以省略。For the implementation structure of the link discovery data packet, reference may be made to the relevant description of step 502, wherein the Domain TLV field in Table 2 may be omitted.
步骤513:第一交换机接收链路发现数据包,从第一端口ID指示的第一端口转发该链路发现数据包。Step 513: The first switch receives the link discovery data packet, and forwards the link discovery data packet from the first port indicated by the first port ID.
依照上述实例,图5A中第一端口ID为Port1,所指示的第一端口为端口1,交换机Sw1_1将从自身的端口1转发该链路发现数据包。According to the above example, the first port ID in FIG. 5A is Port1, the indicated first port is Port 1, and the switch Sw1_1 will forward the link discovery data packet from its own port 1.
步骤514:第二交换机从第二端口接收到该链路发现数据包,生成拓扑发现报文发送至第二主控制器。Step 514: The second switch receives the link discovery packet from the second port, generates a topology discovery packet, and sends it to the second main controller.
拓扑发现报文包括:第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID。The topology discovery message includes: a link discovery data packet received by the second switch, the ID of the second switch, and the ID of the second port.
第二交换机ID用于指示第二交换机;第二端口ID用于指示第二交换机中接收到链路发现数据包的第二端口。The second switch ID is used to indicate the second switch; the second port ID is used to indicate the second port in the second switch that receives the link discovery packet.
依照上述实例,由于图5A中交换机Sw1_1的端口1实际与交换机Sw2_1的端口1连接,因此,第二交换机为交换机Sw2_1,第二端口为端口1,相应的,According to the above example, since the port 1 of the switch Sw1_1 in FIG. 5A is actually connected to the port 1 of the switch Sw2_1, the second switch is the switch Sw2_1, and the second port is the port 1. Correspondingly,
交换机Sw2_1将从自身的端口1接收到链路发现数据包;交换机Sw2_1生成的拓扑发现报文中第二交换机ID为Sw2_1,第二端口ID为Port1;第二主控制器为第二域的主控制器OFC2_1。The switch Sw2_1 will receive the link discovery packet from its own port 1; the second switch ID in the topology discovery packet generated by the switch Sw2_1 is Sw2_1, and the second port ID is Port1; the second master controller is the master of the second domain. Controller OFC2_1.
步骤515:第二主控制器接收拓扑发现报文,判断链路发现数据包中的第一交换机ID指示的第一交换机不是第二主控制器所管辖域的交换机时,根据拓扑发现报文生成上报信息,将上报信息发送给全局拓扑代理。Step 515: The second main controller receives the topology discovery message, and determines that the first switch indicated by the first switch ID in the link discovery data packet is not a switch in the area under the jurisdiction of the second main controller, and generates a topology discovery message according to the Report information, and send the report information to the global topology agent.
上报信息可以包括:第一交换机ID、第一端口ID、第二交换机ID、第二端口ID。The reporting information may include: a first switch ID, a first port ID, a second switch ID, and a second port ID.
一般的,第二主控制器中存储有所管辖域内各个网元的信息,因此,本步骤中第二主控制器可以根据预先存储的信息判断链路发现数据包中的第一交换机ID指示的第一交换机是否是第二主控制器所管辖域的交换机,具体实现这里不再赘述。Generally, the second main controller stores the information of each network element in the area under its jurisdiction. Therefore, in this step, the second main controller can determine the information indicated by the first switch ID in the link discovery data packet according to the pre-stored information. Whether the first switch is a switch in the area under the jurisdiction of the second main controller, the specific implementation will not be repeated here.
本实施例中,如果第二主控制器判断链路发现数据包中的第一交换机ID指示的第一交换机是第二主控制器所管辖域的交换机,那么第二主控制器将执行域内拓扑链路发现过程,这里不再赘述。In this embodiment, if the second main controller determines that the first switch indicated by the first switch ID in the link discovery packet is a switch in the domain under the jurisdiction of the second main controller, the second main controller will perform the intra-domain topology The link discovery process is not repeated here.
依照上述实例并结合图5A,第二主控制器为主控制器OFC2_1,第一交换机ID为Sw1_1,第二主控制器可以判断ID为Sw1_1的第一交换机不是自身所管辖的域2中的交换机。According to the above example and in conjunction with FIG. 5A , the second main controller is the main controller OFC2_1, the first switch ID is Sw1_1, and the second main controller can determine that the first switch whose ID is Sw1_1 is not the switch in the domain 2 under its own jurisdiction .
步骤516:全局拓扑代理接收上报信息,根据上报信息发现域间拓扑链路。Step 516: The global topology agent receives the report information, and discovers the inter-domain topology link according to the report information.
其中,全局拓扑代理根据上报信息发现域间拓扑链路可以包括:Wherein, the global topology agent discovering inter-domain topology links according to the reported information may include:
所述全局拓扑代理根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;The global topology agent determines the domain to which the first switch belongs according to the first switch ID, and determines the domain to which the second switch belongs according to the second switch ID;
所述全局拓扑代理根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口标识确定所述域间拓扑链路的第二端。The global topology agent determines the first end of the inter-domain topology link according to the domain to which the first switch belongs, the first switch ID and the first port ID, and determines the first end of the inter-domain topology link according to the domain to which the second switch belongs, the second switch ID and The second port identifier determines the second end of the inter-domain topology link.
其中,由于步骤511中各个域的主控制器已经向全局拓扑代理发送了各个域的注册信息,因此,本步骤中全局拓扑代理可以根据接收到的各个域的注册信息确定所述第一交换机所属域以及第二交换机所属域。Wherein, since the master controller of each domain in step 511 has sent the registration information of each domain to the global topology agent, in this step, the global topology agent can determine according to the received registration information of each domain that the first switch belongs to domain and the domain to which the second switch belongs.
依照上述实例并结合图5A,全局拓扑代理根据步骤511中各个主控制器发送的注册信息可以确定ID为Sw1_1的第一交换机属于域1,ID为Sw2_1的第二交换机属于域2;进而,将确定出域间拓扑链路的第一端为:域1的交换机Sw1_1的端口1,第二端为域2的交换机Sw2_1的端口1。According to the above example and in conjunction with Fig. 5A, the global topology agent can determine that the first switch whose ID is Sw1_1 belongs to domain 1, and the second switch whose ID is Sw2_1 belongs to domain 2 according to the registration information sent by each master controller in step 511; It is determined that the first end of the outgoing inter-domain topology link is: port 1 of switch Sw1_1 in domain 1, and the second end is port 1 of switch Sw2_1 in domain 2.
本实施例中,第一主控制器生成的链路发现数据包经过域间拓扑链路传输至另一个域的第二主控制器时,第二主控制器判断该链路发现数据包不是第二主控制器所管辖域的链路发现数据包,进而上报全局拓扑代理,使得全局拓扑代理能够实现跨域全局拓扑链路的发现。In this embodiment, when the link discovery packet generated by the first master controller is transmitted to the second master controller of another domain through the inter-domain topology link, the second master controller determines that the link discovery packet is not the first master controller. The link discovery data packet of the domain under the jurisdiction of the second master controller is then reported to the global topology agent, so that the global topology agent can realize the discovery of cross-domain global topology links.
与本发明拓扑发现方法的实施例相对应,本发明还提供了主控制器、全局拓扑代理的实施例。Corresponding to the embodiments of the topology discovery method of the present invention, the present invention also provides the embodiments of the main controller and the global topology agent.
参见图6,为本发明主控制器的一个实施例框图。主控制器600包括:接收单元610、生成单元620以及发送单元630,其中,Referring to FIG. 6, it is a block diagram of an embodiment of the main controller of the present invention. The main controller 600 includes: a receiving unit 610, a generating unit 620 and a sending unit 630, wherein,
接收单元610,用于接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述链路发现数据包包括:第一交换机ID、第一端口ID;所述第一交换机ID用于指示向所述第二交换机发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收所述链路发现数据包的所述第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;The receiving unit 610 is configured to receive a topology discovery packet sent by a second switch, where the topology discovery packet includes: a link discovery packet received by the second switch, a second switch ID, and a second port ID; The link discovery packet includes: a first switch ID and a first port ID; the first switch ID is used to indicate the first switch that sends the link discovery packet to the second switch, the second switch The switch ID is used to indicate the second switch that receives the link discovery packet, the first port ID is used to indicate the port through which the first switch sends the link discovery packet, and the second port The ID is used to indicate the port on which the second switch receives the link discovery data packet;
生成单元620,用于判断所述接收单元接收到的所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;The generating unit 620 is configured to generate report information according to the topology discovery packet when judging that the link discovery packet received by the receiving unit is not a link discovery packet of the local domain, where the report information includes: a switch ID, a first port ID, a second switch ID and a second port ID;
发送单元630,用于将所述生成单元生成的所述上报信息发送给全局拓扑代理,以便所述全局拓扑代理根据所述上报信息发现域间拓扑链路。The sending unit 630 is configured to send the reporting information generated by the generating unit to a global topology agent, so that the global topology agent discovers an inter-domain topology link according to the reporting information.
可选地,所述链路发现数据包还可以包括:第一域ID,所述第一域ID用于指示所述第一交换机所属域;所述生成单元620具体可以用于:Optionally, the link discovery data packet may further include: a first domain ID, where the first domain ID is used to indicate the domain to which the first switch belongs; the generating unit 620 may be specifically configured to:
判断所述链路发现数据包中包括的第一域ID与所述第二主控制器所管辖域的域ID不同。It is judged that the first domain ID included in the link discovery data packet is different from the domain ID of the domain under the jurisdiction of the second main controller.
可选地,所述生成单元620具体可以用于:Optionally, the generating unit 620 can be specifically used for:
判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。It is judged that the first switch indicated by the first switch ID is not a switch in the area under the jurisdiction of the second master controller.
可选地,主控制器600还可以包括:Optionally, the main controller 600 may further include:
管理单元,用于所述生成单元判断所述链路发现数据包不是本域的链路发现数据包之后,将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中。A management unit, configured to add the second switch ID and the second port ID to the border switch management information after the generating unit determines that the link discovery data packet is not a link discovery data packet of the local domain.
本实施例中,第二主控制器接收第二交换机发送的拓扑发现报文,判断拓扑发现报文中的链路发现数据包不是本域的链路发现数据包时,根据拓扑发现报文生成上报信息,将上报信息发送给全局拓扑代理,以便全局拓扑代理根据上报信息发现跨域全局拓扑链路,从而为全局拓扑代理发现跨域全局拓扑链路提供了数据支持,使得全局拓扑代理能够发现跨域全局拓扑链路。In this embodiment, the second main controller receives the topology discovery packet sent by the second switch, and determines that the link discovery packet in the topology discovery packet is not the link discovery packet of the domain, and generates a topology discovery packet according to the topology discovery packet. Report information, and send the report information to the global topology agent, so that the global topology agent can discover the cross-domain global topology link according to the reported information, thus providing data support for the global topology agent to discover the cross-domain global topology link, so that the global topology agent can discover the cross-domain global topology link. Cross-domain global topology link.
参见图7,为本发明全局拓扑代理的一个实施例框图。全局拓扑代理700包括:接收单元710以及确定单元720,其中,Referring to FIG. 7, it is a block diagram of an embodiment of the global topology agent of the present invention. The global topology agent 700 includes: a receiving unit 710 and a determining unit 720, wherein,
接收单元710,用于接收第二主控制器发送的上报信息,所述上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;所述第一交换机ID用于指示发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收将所述链路发现数据包的第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;The receiving unit 710 is configured to receive report information sent by the second main controller, where the report information includes: a first switch ID, a first port ID, a second switch ID, and a second port ID; the first switch ID uses to instruct the first switch to send the link discovery packet, the second switch ID is used to instruct the second switch to receive the link discovery packet, and the first port ID is used to indicate the first port ID A port on which a switch sends the link discovery data packet, and the second port ID is used to indicate the port on which the second switch receives the link discovery data packet;
确定单元720,用于根据所述接收单元710接收到的所述上报信息发现域间拓扑链路。The determining unit 720 is configured to discover the inter-domain topology link according to the reporting information received by the receiving unit 710 .
可选地,所述确定单元720具体可以用于:Optionally, the determining unit 720 may be specifically used for:
根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;The domain to which the first switch belongs is determined according to the first switch ID, and the domain to which the second switch belongs is determined according to the second switch ID;
根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。The first end of the inter-domain topology link is determined according to the domain to which the first switch belongs, the first switch ID and the first port ID, and the first end of the inter-domain topology link is determined according to the domain to which the second switch belongs, the second switch ID and the second port ID the second end of the inter-domain topology link.
可选地,所述上报信息还可以包括:第一域ID、第二域ID,所述第一域ID用于指示所述第一交换机所属域,所述第二域ID用于指示所述第二交换机所属域;所述确定单元720具体可以用于:Optionally, the reporting information may further include: a first domain ID and a second domain ID, where the first domain ID is used to indicate the domain to which the first switch belongs, and the second domain ID is used to indicate the The domain to which the second switch belongs; the determining unit 720 may be specifically used for:
根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。The first end of the inter-domain topology link is determined according to the first domain ID, the first switch ID and the first port ID, and the first end of the inter-domain topology link is determined according to the second domain ID, the second switch ID and the second port ID. The second end of the interdomain topological link.
本实施例中,全局拓扑代理接收第二主控制器发送的上报信息,上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID,根据上报信息发现域间拓扑链路,从而实现了跨域全局拓扑链路的发现。In this embodiment, the global topology agent receives the report information sent by the second master controller, and the report information includes: the first switch ID, the first port ID, the second switch ID and the second port ID, and discovers the inter-domain topology according to the reported information Links, thus realizing the discovery of cross-domain global topology links.
参见图8,为本发明实施例主控制器结构示意图,该主控制器800包括:处理器810、存储器820、收发器830和总线840;Referring to FIG. 8 , which is a schematic structural diagram of a main controller according to an embodiment of the present invention, the main controller 800 includes: a processor 810, a memory 820, a transceiver 830, and a bus 840;
处理器810、存储器820、收发器830通过总线840相互连接;总线840可以是ISA总线、PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The processor 810, the memory 820, and the transceiver 830 are connected to each other through a bus 840; the bus 840 may be an ISA bus, a PCI bus, an EISA bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus.
存储器820,用于存放程序。具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。存储器820可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 820 is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 820 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
收发器830用于连接其他设备,并与其他设备进行通信。收发器830用于:接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述链路发现数据包包括:第一交换机ID、第一端口ID;所述第一交换机ID用于指示向所述第二交换机发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收所述链路发现数据包的所述第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;还用于将处理器810生成的所述上报信息发送给全局拓扑代理,以便所述全局拓扑代理根据所述上报信息发现域间拓扑链路。The transceiver 830 is used to connect and communicate with other devices. The transceiver 830 is configured to: receive a topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery packet received by the second switch, the second switch ID, and the second port ID; The link discovery packet includes: a first switch ID and a first port ID; the first switch ID is used to indicate the first switch that sends the link discovery packet to the second switch, the second switch The switch ID is used to indicate the second switch that receives the link discovery packet, the first port ID is used to indicate the port through which the first switch sends the link discovery packet, and the second port The ID is used to indicate the port on which the second switch receives the link discovery packet; it is also used to send the report information generated by the processor 810 to the global topology agent, so that the global topology agent can base on the report Information discovers inter-domain topology links.
所述处理器810执行所述程序代码,用于判断所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID。The processor 810 executes the program code to generate report information according to the topology discovery packet when judging that the link discovery packet is not a link discovery packet of the local domain, where the report information includes: A switch ID, a first port ID, a second switch ID, and a second port ID.
可选地,所述链路发现数据包还可以包括:第一域ID,所述第一域ID用于指示所述第一交换机所属域;所述处理器810具体可以用于:判断所述链路发现数据包中包括的第一域ID与所述第二主控制器所管辖域的域ID不同。Optionally, the link discovery data packet may further include: a first domain ID, where the first domain ID is used to indicate the domain to which the first switch belongs; the processor 810 may be specifically configured to: determine the The first domain ID included in the link discovery data packet is different from the domain ID of the domain under the jurisdiction of the second main controller.
可选地,所述处理器810具体可以用于:判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。Optionally, the processor 810 may be specifically configured to: determine that the first switch indicated by the first switch ID is not a switch in the area under the jurisdiction of the second main controller.
可选地,所述处理器810还可以用于:判断所述链路发现数据包不是本域的链路发现数据包之后,将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中。Optionally, the processor 810 may be further configured to: after judging that the link discovery packet is not a link discovery packet of the local domain, add the second switch ID and the second port ID to the border switch management information middle.
本实施例中,第二主控制器接收第二交换机发送的拓扑发现报文,判断拓扑发现报文中的链路发现数据包不是本域的链路发现数据包时,根据拓扑发现报文生成上报信息,将上报信息发送给全局拓扑代理,以便全局拓扑代理根据上报信息发现域间拓扑链路,从而为全局拓扑代理发现跨域全局拓扑链路提供了数据支持,使得全局拓扑代理能够发现跨域全局拓扑链路。In this embodiment, the second main controller receives the topology discovery packet sent by the second switch, and determines that the link discovery packet in the topology discovery packet is not the link discovery packet of the domain, and generates a topology discovery packet according to the topology discovery packet. Report information, and send the report information to the global topology agent, so that the global topology agent can discover inter-domain topology links according to the reported information, thus providing data support for the global topology agent to discover cross-domain global topology links, so that the global topology agent can discover cross-domain global topology links. Domain global topology link.
参见图9,为本发明实施例基站结构示意图,该基站900包括:处理器910、存储器920、收发器930和总线940;Referring to FIG. 9 , which is a schematic structural diagram of a base station according to an embodiment of the present invention, the base station 900 includes: a processor 910, a memory 920, a transceiver 930, and a bus 940;
处理器910、存储器920、收发器930通过总线940相互连接;总线940可以是ISA总线、PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The processor 910, the memory 920, and the transceiver 930 are connected to each other through a bus 940; the bus 940 may be an ISA bus, a PCI bus, an EISA bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 9, but it does not mean that there is only one bus or one type of bus.
存储器920,用于存放程序。具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。存储器920可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 920 is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 920 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
收发器930用于连接其他设备,并与其他设备进行通信。收发器930用于:接收第二主控制器发送的上报信息,所述上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;所述第一交换机ID用于指示发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收将所述链路发现数据包的第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口。The transceiver 930 is used to connect and communicate with other devices. The transceiver 930 is configured to: receive report information sent by the second main controller, where the report information includes: a first switch ID, a first port ID, a second switch ID, and a second port ID; the first switch ID is used for to instruct the first switch to send the link discovery packet, the second switch ID is used to instruct the second switch to receive the link discovery packet, and the first port ID is used to indicate the first port ID The port through which a switch sends the link discovery packet, and the second port ID is used to indicate the port through which the second switch receives the link discovery packet.
所述处理器910执行所述程序代码,用于根据所述上报信息发现域间拓扑链路。The processor 910 executes the program code to discover the inter-domain topology link according to the reported information.
可选地,所述处理器910具体可以用于:Optionally, the processor 910 may be specifically used for:
根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;The domain to which the first switch belongs is determined according to the first switch ID, and the domain to which the second switch belongs is determined according to the second switch ID;
根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。The first end of the inter-domain topology link is determined according to the domain to which the first switch belongs, the first switch ID and the first port ID, and the first end of the inter-domain topology link is determined according to the domain to which the second switch belongs, the second switch ID and the second port ID the second end of the inter-domain topology link.
可选地,所述上报信息还可以包括:第一域ID、第二域ID,所述第一域ID用于指示所述第一交换机所属域,所述第二域ID用于指示所述第二交换机所属域;所述处理器910具体可以用于:根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Optionally, the reporting information may further include: a first domain ID and a second domain ID, where the first domain ID is used to indicate the domain to which the first switch belongs, and the second domain ID is used to indicate the The domain to which the second switch belongs; the processor 910 may be specifically configured to: determine the first end of the inter-domain topology link according to the first domain ID, the first switch ID and the first port ID, and according to the first The second domain ID, the second switch ID, and the second port ID determine the second end of the inter-domain topology link.
本实施例中,全局拓扑代理接收第二主控制器发送的上报信息,上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID,根据上报信息发现域间拓扑链路,从而实现了跨域全局拓扑链路的发现。In this embodiment, the global topology agent receives the report information sent by the second master controller, and the report information includes: the first switch ID, the first port ID, the second switch ID and the second port ID, and discovers the inter-domain topology according to the reported information Links, thus realizing the discovery of cross-domain global topology links.
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products may be stored in a storage medium, such as ROM/RAM , magnetic disk, optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to the partial descriptions of the method embodiments.
以上所述的本发明实施方式,并不构成对本发明保护范围的限定。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明的保护范围之内。The embodiments of the present invention described above do not limit the protection scope of the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (16)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2014/090569 WO2016070406A1 (en) | 2014-11-07 | 2014-11-07 | Topology discovery method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105765903A CN105765903A (en) | 2016-07-13 |
CN105765903B true CN105765903B (en) | 2019-07-23 |
Family
ID=55908421
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201480037526.5A Active CN105765903B (en) | 2014-11-07 | 2014-11-07 | A kind of topology discovery method and equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105765903B (en) |
WO (1) | WO2016070406A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108880899B (en) * | 2018-06-30 | 2021-10-15 | 华为技术有限公司 | Network topological graph generation method and server |
CN114938345B (en) * | 2022-06-07 | 2023-09-29 | 中国联合网络通信集团有限公司 | Link discovery method, device and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103401786A (en) * | 2013-07-12 | 2013-11-20 | 华为技术有限公司 | Method, device and system for establishing network topology, controlling path and transmitting message |
CN103825825A (en) * | 2014-01-18 | 2014-05-28 | 浙江大学 | Flexible, extensible and safe inter-domain topology discovery method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102136928B (en) * | 2010-07-02 | 2013-10-09 | 华为技术有限公司 | Topology Discovery Method and Device |
JP5903801B2 (en) * | 2011-08-23 | 2016-04-13 | 富士通株式会社 | Communication apparatus and ID setting method |
CN102387068B (en) * | 2011-09-29 | 2014-05-07 | 中国人民解放军国防科学技术大学 | Extensible routing method and router of identification network |
US9729424B2 (en) * | 2012-06-11 | 2017-08-08 | Futurewei Technologies, Inc. | Defining data flow paths in software-defined networks with application-layer traffic optimization |
-
2014
- 2014-11-07 CN CN201480037526.5A patent/CN105765903B/en active Active
- 2014-11-07 WO PCT/CN2014/090569 patent/WO2016070406A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103401786A (en) * | 2013-07-12 | 2013-11-20 | 华为技术有限公司 | Method, device and system for establishing network topology, controlling path and transmitting message |
CN103825825A (en) * | 2014-01-18 | 2014-05-28 | 浙江大学 | Flexible, extensible and safe inter-domain topology discovery method |
Also Published As
Publication number | Publication date |
---|---|
CN105765903A (en) | 2016-07-13 |
WO2016070406A1 (en) | 2016-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11444864B2 (en) | Optimized datapath troubleshooting with trace policy engine | |
US9537741B2 (en) | Data path performance measurement using test messages in a software defined network | |
EP3103230B1 (en) | Software defined networking (sdn) specific topology information discovery | |
US10791053B2 (en) | Service function chain SFC-based communication method, and apparatus | |
CN101156365B (en) | A data forwarding method and a network element for forwarding data | |
WO2016162833A1 (en) | Method and system for traffic pattern generation in a software-defined networking (sdn) system | |
CN106375231A (en) | A traffic switching method, device and system | |
CN112187649B (en) | Message forwarding method, message processing method and device | |
WO2016174597A1 (en) | Service based intelligent packet-in mechanism for openflow switches | |
US9288686B2 (en) | Topology discovery based on SCTP/X2 snooping | |
CN103688510B (en) | Outgoing telecommunication method and device | |
EP1779568B1 (en) | Graceful shutdown of ldp on specific interfaces between label switched routers | |
CN103731307A (en) | Method for standardized data surface dynamic reconstruction for multiple services | |
US9294986B2 (en) | Topology discovery based on explicit signaling | |
WO2018219300A1 (en) | Method and apparatus for packet exchange in sdn | |
US9755939B2 (en) | Network wide source group tag binding propagation | |
WO2018219103A1 (en) | Method and device for determining link state | |
CN105791113B (en) | A kind of multilink delay equalization method and system based on SDN | |
CN105765903B (en) | A kind of topology discovery method and equipment | |
CN103905338B (en) | The method and device that a kind of IP backbone merges | |
US11936559B2 (en) | Fast receive re-convergence of multi-pod multi-destination traffic in response to local disruptions | |
CN108123871A (en) | Equal cost multipath ECMP processing method and processing devices | |
WO2023134489A1 (en) | Information reporting method, information processing method, and device | |
CN104836799A (en) | LDP session establishing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |