WO2016070406A1 - Topology discovery method and device - Google Patents

Topology discovery method and device Download PDF

Info

Publication number
WO2016070406A1
WO2016070406A1 PCT/CN2014/090569 CN2014090569W WO2016070406A1 WO 2016070406 A1 WO2016070406 A1 WO 2016070406A1 CN 2014090569 W CN2014090569 W CN 2014090569W WO 2016070406 A1 WO2016070406 A1 WO 2016070406A1
Authority
WO
WIPO (PCT)
Prior art keywords
switch
domain
port
topology
data packet
Prior art date
Application number
PCT/CN2014/090569
Other languages
French (fr)
Chinese (zh)
Inventor
李建飞
王蛟
苏金钊
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201480037526.5A priority Critical patent/CN105765903B/en
Priority to PCT/CN2014/090569 priority patent/WO2016070406A1/en
Publication of WO2016070406A1 publication Critical patent/WO2016070406A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/40Arrangements 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

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a topology discovery method and device.
  • the industry has proposed the concept of Software-Defined Network (SDN).
  • SDN Software-Defined Network
  • the SDN decouples the control logic and the forwarding function of the network element and centrally deploys the control logic, so that the control and maintenance of the network can be realized simply by the operation of the control plane device.
  • the SDN network generally includes a controller (Controller) as a control plane device and a switch (Switch) 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 the flow entries.
  • the open flow (Openflow) protocol is the most typical and most widely used protocol in the SDN network.
  • the network elements in the Openflow protocol are called OpenFlow Controller and OpenFlow Switch. And OF switch.
  • An SDN network is logically composed of a plurality of domains. As shown in Figure 1, each domain includes: a controller, a switch, and a host. The controllers in the domain manage the switches and hosts in the domain. One domain may contain one or more controllers. When multiple controllers are included, one of the multiple controllers is the primary controller. When a controller is included, the controller may be considered as the primary controller.
  • the SDN network also includes a Global Topology Broker that communicates only with the primary controllers of the various domains. Controllers in each domain do not communicate directly, and all inter-domain events, such as cross-domain routing and inter-domain topology link discovery, are handled by global topology agents.
  • An inter-domain topology link refers to a connection between network elements in different domains, and a connection between network elements in the same domain is called an intra-domain topology link.
  • the following information about the inter-domain topology link needs to be determined: the domain ID of the network element at both ends of the link, the network element ID and the port ID of both ends of the link. When the information is determined, it indicates that an inter-domain topology link is found. . Based on the SDN network structure shown in Figure 1, how to implement global topology proxy discovery of inter-domain topology links and implement cross-domain global topology discovery is a problem that needs to be solved.
  • LLDP is used to implement the discovery of intra-domain topology links, and no cross-domain global topology discovery method is disclosed.
  • a topology discovery method and device which can implement discovery of a cross-domain global topology link.
  • a topology discovery method including:
  • the second main controller receives the topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet received by the second switch, a second switch ID, and a second port ID;
  • the link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch, and the second switch The ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port ID is a port for instructing the second switch to receive the link discovery data packet;
  • the second primary controller When the second primary controller determines that the link discovery data packet is not the link discovery data packet of the local domain, the second primary controller generates the report information according to the topology discovery packet, where the report information includes: a first switch ID, and a first a port ID, a second switch ID, and a 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.
  • 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, and includes:
  • 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 which the second primary controller is located.
  • the second main controller determines that the link discovery data packet is not a link discovery data packet of the local domain, and includes:
  • the second main controller determines that the first switch indicated by the first switch ID is not a switch of a domain under the second main controller.
  • the main controller determines that the link discovery data packet is not the link discovery data packet of the local domain, the main controller further includes:
  • the second main controller adds the second switch ID and the second port ID to the border switch management information.
  • a topology discovery method including:
  • the global topology agent receives the report information sent by the second primary 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 to indicate sending a first switch of the link discovery data packet, where the second switch ID is used to indicate that a second switch that receives the link discovery data packet is used, where the first port ID is used to indicate that the first switch sends The port of the link discovery data packet, where the second port ID is used to indicate that the second switch receives the port of the link discovery data packet;
  • the global topology agent discovers an 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 perform inter-domain data packet forwarding according to the inter-domain topology link.
  • the global topology proxy discovers an inter-domain topology link according to the reported information, including :
  • the reporting information further includes: a first domain ID, a second domain ID, 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 proxy discovers the inter-domain topology link according to the reported information.
  • a host controller including:
  • a receiving unit configured to receive a topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet, a second switch ID, and a second port ID received by the second switch;
  • the link discovery data packet includes: a first switch ID, a first port ID; and the first switch ID And a first switch indicating that the link discovery data packet is sent to the second switch, where the second switch ID is used to indicate the second switch that receives the link discovery data packet, the first port The ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port ID is used to indicate that the second switch receives the port of the link discovery data packet;
  • a generating unit configured to: when the link discovery data packet received by the receiving unit is not a link discovery data packet of the local domain, generate report information according to the topology discovery packet, where the report information includes: a switch ID, a first port ID, a second switch ID, and a second port ID;
  • a sending unit configured to send the report 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 reported information.
  • 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 configured to:
  • the generating unit is specifically configured to:
  • the method further includes:
  • a management unit configured to: after the generating unit determines that the link discovery data packet is not a link discovery data packet of the local domain, adding the second switch ID and the second port ID to the boundary switch management information.
  • a global topology proxy including:
  • 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 by And indicating a first switch that sends the link discovery data packet, where the second switch ID is used to indicate that a second switch that receives the link discovery data packet is used, where the first port ID is used to indicate the first switch The switch sends the port of the link discovery data packet, where the second port ID is used to indicate that the second switch receives the port of the link discovery data packet;
  • a determining unit configured to discover an inter-domain topology link according to the report information received by the receiving unit.
  • the method further includes:
  • control unit configured to control the first switch or the second switch to perform inter-domain data packet forwarding according to the inter-domain topology link discovered by the determining unit.
  • the determining unit is specifically configured to:
  • the reporting information further includes: a first domain ID, a second domain ID, 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 configured to:
  • the second main controller receives the topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet, a second switch ID, and a second received by the second switch. a two-port ID; the link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch The second switch ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet.
  • the second port ID is used to indicate that the second switch receives the port of 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. And generating the report information according to the topology discovery packet, where the report information includes: a first switch ID, a first port ID, a second switch ID, and a second port ID; the second host controller reports the report letter Sending 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 primary controller provides data support for the global topology agent to discover the cross-domain global topology link, so that the global topology The agent is able to discover cross-domain global topology links.
  • 1 is an exemplary diagram of an SDN network structure
  • FIG. 2 is a schematic diagram of an application scenario according to an embodiment of the present invention.
  • FIG. 3 is a flow chart of an embodiment of a topology discovery method according to the present invention.
  • FIG. 4 is a flow chart of another embodiment of a topology discovery method according to the present invention.
  • FIG. 5A is a schematic diagram of an application scenario of a topology discovery method according to the present invention.
  • 5B is a flowchart of another embodiment of a topology discovery method according to the present invention.
  • 5C is a flowchart of another embodiment of a topology discovery method according to the present invention.
  • Figure 6 is a block diagram of an embodiment of a main controller of the present invention.
  • FIG. 7 is a block diagram of an embodiment of a global topology proxy of the present invention.
  • FIG. 8 is a block diagram of another embodiment of the main controller of the present invention.
  • FIG. 9 is a block diagram of another embodiment of a global topology agent of the present invention.
  • Embodiments of the invention may be applied to an SDN network comprising at least two domains.
  • the method includes: a global topology proxy 210, a first domain 220, and a second domain 230.
  • the first domain 220 includes: a first primary controller 2201, a plurality of switches 1202 of the first domain, and a second domain.
  • 230 includes: a second main controller 2301, a plurality of switches 2302 of the second domain; the first main controller 2201 and the second main controller 2301 are connected to the global topology proxy 210, and the respective switches 2202 of the first domain are respectively associated with the first
  • the main controller 2201 is connected, and the switches 2302 of the second domain are respectively connected to the second main controller 2301.
  • each switch 2202 of the first domain may be connected to each other, and each switch 2302 of the second domain may be connected to each other, and the switch 2202 of the first domain and the switch 2302 of the second domain may be connected, and the switch in the same domain
  • the connection between the two is called the intra-domain topology link
  • the connection between the switches in different domains is called the inter-domain topology link.
  • first domain 220 and the second domain 230 may also include a plurality of hosts respectively, which are not shown in FIG. 2 because they are not involved in the 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.
  • an SDN network may include more than two domains.
  • the topology discovery method of the embodiment of the present invention is applied to an SDN network structure including two or more domains, the topology discovery method is determined according to the embodiment of the present invention. It is an inter-domain topology link between two domains. In the process, only two domains in multiple domains are involved. Therefore, the actual application scenario can be summarized as the scenario shown in Figure 2.
  • the first primary controller 2201 of the first domain 220 initiates topology link discovery for the first port of the first switch in the first domain 220, the first port of the first switch and the second domain 230
  • An inter-domain topology link exists between the second ports of the second switch.
  • 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 meaning.
  • the first and second of the first port and the second port are only used to distinguish 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 the switch in the second domain
  • the second switch is a switch in the second domain that has an inter-domain topology link with the first switch.
  • FIG. 3 is a flowchart of an embodiment of a method for discovering a topology according to the present invention. The embodiment is described from the second main controller side, and includes:
  • Step 301 The second main controller receives the topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet, a second switch ID, and a second port ID received by the second switch.
  • the link discovery data packet includes: a first switch ID and a first port ID;
  • the first switch ID is used to indicate a first switch that sends a link discovery data packet
  • the second switch ID is used to indicate a second switch that receives the link discovery data packet
  • the first port ID is used to indicate that the first switch sends the first port of the link discovery data packet
  • the second port ID is used to indicate that the second switch receives the second port of the link discovery data packet.
  • Step 302 When the second primary controller determines that the link discovery data packet is not the link discovery data packet of the domain managed by the second primary controller, the second primary controller generates the report information according to the topology discovery packet, where the report information includes: the first switch ID, the first A port ID, a second switch ID, and a second port ID.
  • the link discovery data packet may further include: a first domain ID, where the first domain ID is used to indicate a domain to which the first switch belongs; and the second primary controller determines
  • the link discovery data packet is not a link discovery data packet of the local domain, and may include:
  • 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 which the second primary controller is located.
  • the determining, by the second main controller, that the link discovery data packet is not a link discovery packet of the local domain may include:
  • the second main controller determines that the first switch indicated by the first switch ID is not a switch of a domain under the second main controller.
  • the second main controller determines that the link discovery data packet is not a link discovery data packet of the local domain, and indicates 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 port.
  • the network element of the domain but the network element of the other domain. Therefore, after the second primary controller determines that the link discovery data packet is not the link discovery data packet of the local domain, the second primary controller may The second switch ID and the second port ID are added to the border switch management information, so as to implement management of the border switch in the domain under the jurisdiction of the second host controller, where the border switch refers to inter-domain exchange with switches of other domains.
  • a switch for a topology link is not a link discovery data packet of the local domain, and indicates 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 port.
  • the network element of the domain but the network element of the other domain. Therefore, after the second primary controller determines that the link discovery data packet is not the link discovery data packet of the local
  • the primary controllers of each domain can maintain the information of the border switches in the domain under the following table.
  • the information of the border switches includes: switch ID, switch attributes, port ID, and port status.
  • the fields in the fields of the switch ID, switch attributes, port IDs, and port status are as follows. You can define them in the actual application according to the actual scenario. For details, for example, the port in the following table indicates the port. When it is on, lastseetime indicates the last discovery time of the port, and state indicates the congestion status of the port, the amount of data sent and received, and other states.
  • Step 303 The second primary controller sends the report information to the global topology proxy, so that the global topology proxy discovers the inter-domain topology link according to the reported information.
  • the inter-domain topology link can be used to forward inter-domain data packets.
  • the global topology agent may control the first switch or the second switch to perform inter-domain data packet forwarding according to the inter-domain topology link.
  • the global topology proxy may control the first exchange by using the second primary controller. The device or the second switch forwards the inter-domain data packet.
  • the second main controller receives the topology discovery packet sent by the second switch, and determines that the link discovery data packet in the topology discovery packet is not the link discovery data packet of the local domain, and generates the packet according to the topology discovery packet.
  • the report 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, thereby providing data support for the global topology agent to discover the cross-domain global topology link, so that the global topology agent can discover Cross-domain global topology link.
  • FIG. 4 is a flowchart of another embodiment of a method for discovering a topology according to the present invention. The embodiment is described from the global topology proxy side, and includes:
  • Step 401 The global topology proxy receives the report information sent by the second primary 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 to indicate a first switch that sends a link discovery data packet
  • the second switch ID is used to indicate a second switch that receives the link discovery data packet
  • the first port ID is used to indicate that the first switch sends the first port of the link discovery data packet
  • the second port ID is used to indicate that the second switch receives the second port of the link discovery data packet.
  • the first switch ID can be implemented by using the name, MAC address, or IP address of the first switch, and is not limited herein; the second switch ID can be implemented by using the name, MAC address, or IP address of the second switch.
  • the port ID of the switch may be set for each port in advance.
  • the specific setting method is not limited in the embodiment of the present invention.
  • Step 402 The global topology proxy discovers the inter-domain topology link according to the reported information.
  • the global topology proxy may discover the inter-domain topology link according to the reporting information, and the method may include:
  • the reporting information may further include: a first domain ID, 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 The ID is used to indicate the domain to which the second switch belongs; and the global topology agent discovers the inter-domain topology chain according to the reported information.
  • Roads can include:
  • the domain ID of each domain may be set in advance for each domain.
  • the specific setting method is not limited in the embodiment of the present invention.
  • the global topology agent may further control the first switch or the second switch to perform inter-domain data packet forwarding according to the discovered inter-domain topology link.
  • the global topology proxy may pass The second main controller controls the first switch or the second switch to forward the inter-domain data packet.
  • the global topology proxy receives the report information sent by the second primary controller, and the report information includes: the first switch ID, the first port ID, the second switch ID, and the second port ID, and the cross-domain global is found according to the reported information.
  • Topology links enabling the discovery of cross-domain global topology links.
  • the network includes: a global topology proxy, domain 1, and domain 2.
  • domain 1 the host controller OFC_1, the switch Sw1_1, the switch Sw1_2, and the switch Sw1_3 are included in the domain 1.
  • 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 to the port 1 of the switch Sw2_1 in the domain 2, and an inter-domain topology link is formed.
  • the domain ID of the domain 1 is Domain 1
  • the domain ID of the domain 2 is Domain 2
  • the ID of the switch Sw1_1 is Sw1_1
  • the ID of the switch Sw2_1 is Sw2_1
  • the ID of the port 1 of the switch Sw1_1 and the switch Sw2_1 are Port1.
  • the purpose of the method is to enable the global topology agent to discover this inter-domain topology link.
  • the domain 1 and the domain 2 may also include a host. Since the embodiment of the present invention is not involved, it is not illustrated.
  • FIG. 5B is a flowchart of another embodiment of a topology discovery method according to the present invention, which will be described in conjunction with the example shown in FIG. 5A.
  • a domain ID is set in advance for each domain, and the domain ID may be set by the global topology proxy for each domain, or may be set by the primary controller of each domain as the domain of the master controller itself, for example,
  • the main controller can obtain a value according to the IP address or MAC address and time of the main controller itself as a domain ID of the domain under the control of the main controller, and the method for determining the domain ID is not limited. No longer.
  • Step 501 The primary controller of each domain sends registration information to the global topology proxy to register each domain in the global topology proxy.
  • the registration information may include: an address of the primary controller, a domain ID of a domain under the jurisdiction of the primary controller, and domain information of the domain under the jurisdiction.
  • the address of the primary controller may be an IP address or a MAC address.
  • the domain information of the domain may include: the ID of each network element in the domain, and the IP address range of the network element in the domain.
  • the ID of the network element may be the name of the network element, the IP address of the network element, or the MAC address.
  • the registration information reported by the primary controllers of the two domains may be as shown in Table 2.
  • the primary controller OFC_1 is domain 1 and the domain ID is Domain1.
  • the IP address of the primary controller OFC_1 is 192.168.1.11.
  • the domain information of the domain is Host1_1 and the IP address range is 192.168.1.10 to 192.168.
  • the IP address of the primary controller OFC_2 is 192.168.2.11, and the domain information of the domain is: Host2_1, and the IP address range is 192.168.2.10 to 192.168. 2.100.
  • this step is an optional step.
  • Step 502 The first primary 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: a first switch ID, a first port ID, and a first domain. ID.
  • the first domain ID is Domain 1
  • the first primary controller is the primary controller OFC_1
  • the first switch is the switch Sw1_1
  • the first port is the port 1
  • the first switch ID is Sw1_1
  • the first port ID is For Port1
  • the first domain ID is Domain1.
  • the link discovery data packet may further include other information, and the specific information included in the embodiment of the present invention is not limited.
  • the link discovery data packet can be implemented by the structure shown in Table 3 below. Now.
  • the src_mac indicates the MAC address of the source network element that sends the link discovery data packet.
  • the source network element is the first switch;
  • dst_mac indicates the MAC address of the target network element that receives the link discovery data packet, because the first The primary controller does not know the target network element of the link discovery packet when generating the link discovery packet. Therefore, this field can be defaulted, see Table 2, 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;
  • the chassis ID triplet (TLV) indicates: a field of the TLV in the LLDP data packet; and the Port ID TLV indicates the transmission chain in the source network element.
  • the port ID triplet of the route 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 The TLV represents a domain triplet, where Value is used to record the domain ID of the domain under the jurisdiction of the primary controller; Action represents the action taken by the source network element on the link discovery packet, for example, it can be set to the out- shown in Table 2 To-port1, which indicates the source network The link forwarding packet is forwarded 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 to the default by the source NE; End of TLV indicates : The end of the TLV field in the packet.
  • 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.
  • the first port ID in FIG. 5A is Port1
  • the first port indicated is port 1
  • the switch Sw1_1 will forward the link discovery data packet from its own port 1.
  • Step 504 The second switch receives the link discovery data packet from the second port, and generates a topology discovery packet to be sent to the second primary controller.
  • the topology discovery packet includes: a link discovery data packet received by the second switch, a second switch ID, and a second port 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 data packet.
  • the switch Sw2_1 will receive the link discovery packet from its own port 1; the switch Sw2_1 is born.
  • the second switch ID in the topology discovery packet is Sw2_1, the second port ID is Port1, and the second host controller is the primary controller OFC2_1 in the second domain.
  • Step 505 The second primary controller receives the topology discovery packet, and determines that the first domain ID in the link discovery data packet is different from the domain ID of the domain in which the second primary controller is located, and generates the report information according to the topology discovery packet. The report information is sent to the global topology agent.
  • 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.
  • the second primary 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 second primary controller, the second primary controller performs intra-domain topology link discovery. The process is not repeated here.
  • the second primary controller is the primary 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 primary controller OFC2_1 determines that the two are different.
  • the report information is generated.
  • 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, and the second domain ID is For Domain 2.
  • Step 506 The global topology agent receives the report information, and discovers the inter-domain topology link according to the report information.
  • the global topology proxy may discover the inter-domain topology link according to the reported information, and may include:
  • 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 discovers the inter-domain topology link according to the second domain ID, the second switch ID, and the second port ID. The second end.
  • the global topology agent determines that the first end of the inter-domain topology link is: port 1 of the switch Sw1_1 of the domain 1, and the second end of the inter-domain topology link is: the switch Sw2_1 of the domain 2. Port 1.
  • the first primary controller when generating the link discovery data packet, the first primary 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 the inter-domain topology.
  • the second primary controller may determine, according to the first domain ID, that the link discovery data packet is not a link discovery data packet of a domain managed by the second primary controller, and further The global topology agent is reported, enabling the global topology agent to discover cross-domain global topology links.
  • 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.
  • a domain ID is set in advance for each domain, and the domain ID may be set by the global topology proxy for each domain, or may be set by the primary controller of each domain as the domain of the master controller itself, for example,
  • the main controller can obtain a value as a domain ID of the domain under the control of the host controller by hashing according to the IP address or MAC address and time of the host controller itself.
  • Step 511 The primary controller of each domain sends registration information to the global topology proxy to register each domain in the global topology proxy.
  • step 501 For the implementation of this step, refer to the related description in step 501, and details are not described herein.
  • Step 512 The first primary 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: a first switch ID and a first port ID.
  • the first domain is domain 1
  • the first primary controller is the primary controller OFC_1
  • the first switch is the switch Sw1_1
  • the first port is the port 1
  • the first switch ID is Sw1_1
  • the first port ID is For port1.
  • step 502. For the implementation structure of the link discovery data packet, refer to the related description of step 502.
  • the Domain TLV field in Table 2 may be omitted.
  • 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.
  • the first port ID in FIG. 5A is Port1
  • the first port indicated is port 1
  • the switch Sw1_1 will forward the link discovery data packet from its own port 1.
  • Step 514 The second switch receives the link discovery data packet from the second port, and generates a topology discovery packet to be sent to the second primary controller.
  • the topology discovery packet includes: a link discovery data packet received by the second switch, a second switch ID, and a second port 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 data packet.
  • the switch Sw2_1 receives the link discovery data packet from its own port 1.
  • the second switch ID of the topology discovery packet generated by the switch Sw2_1 is Sw2_1, and the second port ID is Port1.
  • the second primary controller is the master of the second domain. Controller OFC2_1.
  • Step 515 The second primary controller receives the topology discovery packet, and determines that the first switch indicated by the first switch ID in the link discovery data packet is not the switch of the domain controlled by the second primary controller, according to the topology.
  • the device generates the report information and sends the report information to the global topology agent.
  • the reporting information may include: a first switch ID, a first port ID, a second switch ID, and a second port ID.
  • the second main controller may determine, according to the pre-stored information, the first switch ID indicated in the link discovery data packet. Whether the first switch is a switch of a domain under the jurisdiction of the second primary controller, and details are not described herein again.
  • the second primary controller determines that the first switch indicated by the first switch ID in the link discovery data packet is a switch of a domain controlled by the second primary controller, the second primary controller performs an intra-domain topology.
  • the link discovery process is not described here.
  • 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 with the ID Sw1_1 is not the switch in the domain 2 under its jurisdiction. .
  • Step 516 The global topology agent receives the report information, and discovers the inter-domain topology link according to the report information.
  • the global topology proxy may discover the inter-domain topology link according to the reported information, and may include:
  • the second port identifier determines a second end of the inter-domain topology link.
  • the primary controller of each domain in the step 511 has sent the registration information of each domain to the global topology proxy. Therefore, in this step, the global topology proxy may determine, according to the received registration information of each domain, the first switch belongs to. The domain and the domain to which the second switch belongs.
  • the global topology agent may determine that the first switch with the ID Sw1_1 belongs to the domain 1 and the second switch with the ID Sw2_1 belongs to the domain 2 according to the registration information sent by each primary controller in step 511;
  • the first end of the inter-domain topology link is determined as: port 1 of the switch Sw1_1 of the domain 1, and the second end is the port 1 of the switch Sw2_1 of the domain 2.
  • the second primary controller determines that the link discovery data packet is not the first The link of the domain under the jurisdiction of the two primary controllers discovers the data packet, and then reports the global topology agent, so that the global topology agent can realize the discovery of the cross-domain global topology link.
  • the present invention also provides an embodiment of a primary controller and a global topology agent.
  • the main controller 600 includes: a receiving unit 610, a generating unit 620, and a sending unit 630, where
  • the receiving unit 610 is configured to receive a topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet, a second switch ID, and a second port ID received by the second switch;
  • the link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch, and the second The switch ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port The ID is used to indicate that the second switch receives the port of the link discovery data packet;
  • the generating unit 620 is configured to: when the link discovery data packet received by the receiving unit is not the link discovery data packet of the local domain, generate report information according to the topology discovery packet, where the report information includes: a switch ID, a first port ID, a second switch ID, and a second port ID;
  • the sending unit 630 is configured to send the report information generated by the generating unit to the global topology agent, so that the global topology agent discovers the inter-domain topology link according to the report information.
  • the link discovery data packet may further include: a first domain ID, where the first domain ID is used to indicate a domain to which the first switch belongs; and the generating unit 620 may be specifically configured to:
  • the generating unit 620 is specifically configured to:
  • the main controller 600 may further include:
  • a management unit configured to: after the generating unit determines that the link discovery data packet is not a link discovery data packet of the local domain, adding the second switch ID and the second port ID to the boundary switch management information.
  • the second main controller receives the topology discovery packet sent by the second switch, and determines that the link discovery data packet in the topology discovery packet is not the link discovery data packet of the local domain, and generates the packet according to the topology discovery packet.
  • the report 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, thereby providing the global topology agent with the number of cross-domain global topology links. Supported to enable global topology agents to discover cross-domain global topology links.
  • the global topology agent 700 includes: a receiving unit 710 and a determining unit 720, where
  • the receiving unit 710 is configured to receive the 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; And indicating to the first switch that sends the link discovery data packet, where the second switch ID is used to indicate that a second switch that receives the link discovery data packet is used, where the first port ID is used to indicate the a switch sends a port of the link discovery data packet, where the second port ID is used to indicate that the second switch receives the port of the link discovery data packet;
  • the determining unit 720 is configured to discover an inter-domain topology link according to the report information received by the receiving unit 710.
  • the determining unit 720 is specifically configured to:
  • the reporting information may further include: a first domain ID, 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 is used to indicate the The domain to which the second switch belongs; the determining unit 720 may be specifically configured to:
  • the global topology proxy receives the report information sent by the second primary controller, and the report information includes: the first switch ID, the first port ID, the second switch ID, and the second port ID, and the inter-domain topology is found according to the reported information.
  • Link which enables the discovery of cross-domain global topology links.
  • FIG. 8 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.
  • the processor 810, the memory 820, and the transceiver 830 are connected to each other through a bus 840; the bus 840 can be So ISA bus, PCI bus or EISA bus.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 8, but it does not mean that there is only one bus or one type of bus.
  • the memory 820 is configured to store a program.
  • the program can include program code, the program code including computer operating instructions.
  • the memory 820 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the transceiver 830 is used to connect other devices 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 data packet, a second switch ID, and a second port ID received by the second switch;
  • the link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch, and the second The switch ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port
  • the ID is used to indicate that the second switch receives the port of the link discovery data packet, and is further configured to send the report information generated by the processor 810 to the global topology proxy, so that the global topology proxy is configured according to the report Information discovery inter-domain topology links.
  • the processor 810 executes the program code, and is configured to: when the link discovery data packet is not a link discovery data packet of the local domain, generate report information according to the topology discovery packet, where the report information includes: A switch ID, a first port ID, a second switch ID, and a second port ID.
  • the link discovery data packet may further include: a first domain ID, where the first domain ID is used to indicate a domain to which the first switch belongs; and the processor 810 may be specifically configured to: determine the The first domain ID included in the link discovery packet is different from the domain ID of the domain under which the second primary controller is located.
  • the processor 810 is specifically configured to: determine that the first switch indicated by the first switch ID is not a switch of a domain that is controlled by the second primary controller.
  • the processor 810 is further configured to: after determining that the link discovery data packet is not a link discovery data packet of the local domain, adding the second switch ID and the second port ID to the border switch management information. in.
  • the second main controller receives the topology discovery packet sent by the second switch, and determines that the link discovery data packet in the topology discovery packet is not the link discovery data packet of the local domain, and generates the packet according to the topology discovery packet.
  • the report information is sent to the global topology agent, so that the global topology agent discovers the inter-domain topology link according to the report information, thereby providing data support for the global topology agent to discover the cross-domain global topology link. Hold, enabling the global topology agent to discover cross-domain global topology links.
  • the base station 900 includes: a processor 910, a memory 920, a transceiver 930, and a bus 940.
  • 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, or an EISA bus.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 9, but it does not mean that there is only one bus or one type of bus.
  • the memory 920 is configured to store a program.
  • the program can include program code, the program code including computer operating instructions.
  • Memory 920 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
  • the transceiver 930 is used to connect other devices and communicate with other devices.
  • the transceiver 930 is configured to: receive the 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; And indicating to the first switch that sends the link discovery data packet, where the second switch ID is used to indicate that a second switch that receives the link discovery data packet is used, where the first port ID is used to indicate the A switch sends a port of the link discovery data packet, where the second port ID is used to indicate that the second switch receives the port of the link discovery data packet.
  • the processor 910 executes the program code, and is configured to discover an inter-domain topology link according to the report information.
  • processor 910 is specifically configured to:
  • the reporting information may further include: a first domain ID, 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 is used to indicate the The second switch belongs to the domain; the processor 910 is specifically configured to: determine, according to the first domain ID, the first switch ID, and the first port ID, the first end of the inter-domain topology link, according to the first The second domain ID, the second switch ID, and the second port ID determine a second end of the inter-domain topology link.
  • the global topology proxy receives the report information sent by the second primary controller, and the report information includes: the first switch ID, the first port ID, the second switch ID, and the second port ID, and the inter-domain topology is found according to the reported information.
  • Link which enables the discovery of cross-domain global topology links.
  • the techniques 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 solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM. , a disk, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.
  • a computer device which may be a personal computer, server, or network device, etc.

Abstract

A topology discovery method and device, the method comprising: a second master controller receiving a topology discovery message sent by a second switch (301), the topology discovery message comprising: link discovery data packets received by the second switch, ID of the second switch and ID of a second port; the second master controller, when judging that the link discovery data packets are not link discovery data packets of a local domain, generating report information on the basis of the topology discovery message (302), the report information comprising: ID of a first switch, ID of a first port, ID of the second switch and ID of the second port; and the second master controller sending the report information to a global topology broker, allowing the global topology broker to discover inter-domain topology links on the basis of the report information (303), therefore, discovery of cross-domain global topology links can be realized.

Description

一种拓扑发现方法及设备Topology discovery method and device 技术领域Technical field
本发明涉及通信技术领域,特别涉及一种拓扑发现方法及设备。The present invention relates to the field of communications 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交换机。To solve the deployment flexibility and manageability of network elements, the industry has proposed the concept of Software-Defined Network (SDN). The SDN decouples the control logic and the forwarding function of the network element and centrally deploys the control logic, so that the control and maintenance of the network can be realized simply by the operation of the control plane device. In practical applications, the SDN network generally includes a controller (Controller) as a control plane device and a switch (Switch) 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 the flow entries. The open flow (Openflow) protocol is the most typical and most widely used protocol in the SDN network. The network elements in the Openflow protocol are called OpenFlow Controller and OpenFlow Switch. And OF switch.
SDN网络在逻辑上一般由多个域(Domain)构成。如图1所示,每个域包括:控制器、交换机以及主机(Host),由域内的控制器对域内的交换机及主机进行管理。一个域内可以包含一个或多个控制器,当包含多个控制器时,多个控制器中的一个控制器为主控制器,当包含一个控制器时,可以认为该控制器为主控制器。SDN网络中还包括全球拓扑代理(Global Topology Broker),其仅与各个域的主控制器通信。各个域的控制器之间不直接通信,所有涉及域间的事件,例如跨域路由、域间拓扑链路发现等都由全球拓扑代理处理。其中,域间拓扑链路是指不同域内的网元之间的连接,而同一个域内的网元之间的连接则称为域内拓扑链路;一般的,在发现一条域间拓扑链路时,需要确定域间拓扑链路的以下信息:链路两端网元所属域ID,链路两端的网元ID以及端口ID,当这些信息被确定时,就表示一条域间拓扑链路被发现。基于图1所示的SDN网络结构,如何实现全球拓扑代理对于域间拓扑链路的发现,进而实现跨域全局拓扑发现,是一个需要解决的问题。An SDN network is logically composed of a plurality of domains. As shown in Figure 1, each domain includes: a controller, a switch, and a host. The controllers in the domain manage the switches and hosts in the domain. One domain may contain one or more controllers. When multiple controllers are included, one of the multiple controllers is the primary controller. When a controller is included, the controller may be considered as the primary controller. The SDN network also includes a Global Topology Broker that communicates only with the primary controllers of the various domains. Controllers in each domain do not communicate directly, and all inter-domain events, such as cross-domain routing and inter-domain topology link discovery, are handled by global topology agents. An inter-domain topology link refers to a connection between network elements in different domains, and a connection between network elements in the same domain is called an intra-domain topology link. Generally, when an inter-domain topology link is found. The following information about the inter-domain topology link needs to be determined: the domain ID of the network element at both ends of the link, the network element ID and the port ID of both ends of the link. When the information is determined, it indicates that an inter-domain topology link is found. . Based on the SDN network structure shown in Figure 1, how to implement global topology proxy discovery of inter-domain topology links and implement cross-domain global topology discovery is a problem that needs to be solved.
但是,目前SDN网络中使用LLDP实现域内拓扑链路的发现,还没有跨域全局拓扑发现方法公开。 However, in the current SDN network, LLDP is used to implement the discovery of intra-domain topology links, and no cross-domain global topology discovery method is disclosed.
发明内容Summary of the invention
本发明实施例中提供了一种拓扑发现方法及设备,能够实现跨域全局拓扑链路的发现。In the embodiment of the present invention, a topology discovery method and device are provided, which can implement discovery of a cross-domain global topology link.
为了解决上述技术问题,本发明实施例公开了如下技术方案:In order to solve the above technical problem, the embodiment of the present invention discloses 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: a link discovery data packet received by the second switch, a second switch ID, and a second port ID; The link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch, and the second switch The ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port ID is a port for instructing the second switch to receive the link discovery data packet;
所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;When the second primary controller determines that the link discovery data packet is not the link discovery data packet of the local domain, the second primary controller generates the report information according to the topology discovery packet, where the report information includes: a first switch ID, and a first a port ID, a second switch ID, and a 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, and includes:
所述第二主控制器判断所述链路发现数据包中包括的第一域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 which the second primary controller is located.
结合第一方面,在第一方面第二种可能的实现方式中,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包,包括: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, and includes:
所述第二主控制器判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。The second main controller determines that the first switch indicated by the first switch ID is not a switch of a domain under the second main controller.
结合第一方面,和/或第一方面第一种可能的实现方式,和/或第一方面第二种可能的实现方式,在第一方面第三种可能的实现方式中,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包之后,还包括:With reference to the first aspect, and/or the first possible implementation of the first aspect, and/or the second possible implementation of the first aspect, in the third possible implementation of the first aspect, the second After the main controller determines that the link discovery data packet is not the link discovery data packet of the local domain, the main controller 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 primary 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 to indicate sending a first switch of the link discovery data packet, where the second switch ID is used to indicate that a second switch that receives the link discovery data packet is used, where the first port ID is used to indicate that the first switch sends The port of the link discovery data packet, where the second port ID is used to indicate that the second switch receives the port of the link discovery data packet;
所述全局拓扑代理根据所述上报信息发现域间拓扑链路。The global topology agent discovers an 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 proxy 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 perform inter-domain data packet forwarding 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 a second possible implementation manner of the second aspect, the global topology proxy discovers an inter-domain topology link according to the reported information, including :
所述全局拓扑代理根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;Determining, by the global topology agent, the domain to which the first switch belongs according to the first switch ID, and determining a domain to which the second switch belongs according to the second switch ID;
所述全局拓扑代理根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, by the global topology agent, 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, 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用于指示所述第二交换机所属域;所述全局拓扑代理根据所述上报信息发现域间拓扑链路,包括:With reference to the second aspect, and/or the first possible implementation manner of the second aspect, in the third possible implementation manner of the second aspect, the reporting information further includes: a first domain ID, a second domain ID, 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 proxy discovers the inter-domain topology link according to the reported information. include:
所述全局拓扑代理根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, by the global topology proxy, the first end of the inter-domain topology link according to the first domain ID, the first switch ID, and the first port ID, according to the second domain ID, the second switch ID, and the second The port ID determines the second end of the inter-domain topology link.
第三方面,提供一种主控制器,包括:In a third aspect, a host controller is provided, including:
接收单元,用于接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述链路发现数据包包括:第一交换机ID、第一端口ID;所述第一交换机ID用 于指示向所述第二交换机发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收所述链路发现数据包的所述第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;a receiving unit, configured to receive a topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet, a second switch ID, and a second port ID received by the second switch; The link discovery data packet includes: a first switch ID, a first port ID; and the first switch ID And a first switch indicating that the link discovery data packet is sent to the second switch, where the second switch ID is used to indicate the second switch that receives the link discovery data packet, the first port The ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port ID is used to indicate that the second switch receives the port of the link discovery data packet;
生成单元,用于判断所述接收单元接收到的所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;a generating unit, configured to: when the link discovery data packet received by the receiving unit is not a link discovery data packet of the local domain, generate report information according to the topology discovery packet, where the report information includes: a switch ID, a first port ID, a second switch ID, and a second port ID;
发送单元,用于将所述生成单元生成的所述上报信息发送给全局拓扑代理,以便所述全局拓扑代理根据所述上报信息发现域间拓扑链路。And a sending unit, configured to send the report 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 reported information.
结合第三方面,在第三方面第一种可能的实现方式中,所述链路发现数据包还包括:第一域ID,所述第一域ID用于指示所述第一交换机所属域;所述生成单元具体用于:With 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 configured to:
判断所述链路发现数据包中包括的第一域ID与所述第二主控制器所管辖域的域ID不同。Determining that the first domain ID included in the link discovery data packet is different from the domain ID of the domain controlled by the second primary 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指示的第一交换机不是所述第二主控制器所管辖域的交换机。Determining that the first switch indicated by the first switch ID is not a switch of a domain controlled by the second primary controller.
结合第三方面,和/或第三方面第一种可能的实现方式,和/或第三方面第二种可能的实现方式,在第三方面第三种可能的实现方式中,还包括:With reference to 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, in a third possible implementation manner of the third aspect, the method further includes:
管理单元,用于所述生成单元判断所述链路发现数据包不是本域的链路发现数据包之后,将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中。And a management unit, configured to: after the generating unit determines that the link discovery data packet is not a link discovery data packet of the local domain, adding the second switch ID and the second port ID to the boundary switch management information.
第四方面,提供一种全局拓扑代理,包括:In a fourth aspect, a global topology proxy 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 by And indicating a first switch that sends the link discovery data packet, where the second switch ID is used to indicate that a second switch that receives the link discovery data packet is used, where the first port ID is used to indicate the first switch The switch sends the port of the link discovery data packet, where the second port ID is used to indicate that the second switch receives the port of the link discovery data packet;
确定单元,用于根据所述接收单元接收到的所述上报信息发现域间拓扑链路。 And a determining unit, configured to discover an inter-domain topology link according to the report information received by the receiving unit.
结合第四方面,在第四方面第一种可能的实现方式中,还包括:With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the method further includes:
控制单元,用于根据所述确定单元发现的所述域间拓扑链路控制所述第一交换机或所述第二交换机进行域间数据报文的转发。And a control unit, configured to control the first switch or the second switch to perform inter-domain data packet forwarding 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 configured to:
根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;Determining, according to the first switch ID, a domain to which the first switch belongs, and determining, according to the second switch ID, a domain to which the second switch belongs;
根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, according to the domain to which the first switch belongs, the first switch ID, and the first port ID, 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 The second end of the inter-domain topology link.
结合第四方面,和/或第四方面第一种可能的实现方式,在第四方面第三种可能的实现方式中,所述上报信息还包括:第一域ID、第二域ID,所述第一域ID用于指示所述第一交换机所属域,所述第二域ID用于指示所述第二交换机所属域;所述确定单元具体用于:With reference to 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 reporting information further includes: a first domain ID, a second domain ID, 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 configured to:
根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, according to the first domain ID, the first switch ID, and the first port ID, a first end of the inter-domain topology link, determining, according to the second domain ID, the second switch ID, and the second port ID The second end of the inter-domain topology link.
本发明实施例中,第二主控制器接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述链路发现数据包包括:第一交换机ID、第一端口ID;所述第一交换机ID用于指示向所述第二交换机发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收所述链路发现数据包的所述第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;所述第二主控制器将所述上报信息发送给全局拓扑代理,以便所述全局拓扑代理根据所述上报信息发现跨域全局拓扑链路,从而第二主控制器为全局拓扑代理发现跨域全局拓扑链路提供了数据支持,使得全局拓扑代理能够发现跨域全局拓扑链路。 In the embodiment of the present invention, the second main controller receives the topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet, a second switch ID, and a second received by the second switch. a two-port ID; the link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch The second switch ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet. The second port ID is used to indicate that the second switch receives the port of 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. And generating the report information according to the topology discovery packet, where the report information includes: a first switch ID, a first port ID, a second switch ID, and a second port ID; the second host controller reports the report letter Sending 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 primary controller provides data support for the global topology agent to discover the cross-domain global topology link, so that the global topology The agent is able to discover cross-domain global topology links.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. Obviously, for those skilled in the art, no creative labor is required. Further drawings can also be obtained from these drawings.
图1为SDN网络结构示例图;1 is an exemplary diagram of an SDN network structure;
图2为本发明实施例应用场景示例图;2 is a schematic diagram of an application scenario according to an embodiment of the present invention;
图3为本发明拓扑发现方法的一个实施例流程图;3 is a flow chart of an embodiment of a topology discovery method according to the present invention;
图4为本发明拓扑发现方法的另一个实施例流程图;4 is a flow chart of another embodiment of a topology discovery method according to the present invention;
图5A为本发明拓扑发现方法的应用场景实例图;FIG. 5A is a schematic diagram of an application scenario of a topology discovery method according to the present invention; FIG.
图5B为本发明拓扑发现方法的另一个实施例流程图;5B is a flowchart of another embodiment of a topology discovery method according to the present invention;
图5C为本发明拓扑发现方法的另一个实施例流程图;5C is a flowchart of another embodiment of a topology discovery method according to the present invention;
图6为本发明主控制器的一个实施例框图;Figure 6 is a block diagram of an embodiment of a main controller of the present invention;
图7为本发明全局拓扑代理的实施例框图;7 is a block diagram of an embodiment of a global topology proxy of the present invention;
图8为本发明主控制器另一个实施例框图;Figure 8 is a block diagram of another embodiment of the main controller of the present invention;
图9为本发明全局拓扑代理的另一个实施例框图。9 is a block diagram of another embodiment of a global topology agent of the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明实施例中的技术方案,并使本发明实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图对本发明实施例中技术方案作进一步详细的说明。The above-mentioned objects, features, and advantages of the embodiments of the present invention will become more apparent and understood. Give further details.
本发明实施例可以应用于包括至少两个域的SDN网络中。Embodiments of the invention may be applied to an SDN network comprising 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 will be exemplified below through FIG. 2 . As shown in FIG. 2, the method includes: a global topology proxy 210, a first domain 220, and a second domain 230. The first domain 220 includes: a first primary controller 2201, a plurality of switches 1202 of the first domain, and a second domain. 230 includes: a second main controller 2301, a plurality of switches 2302 of the second domain; the first main controller 2201 and the second main controller 2301 are connected to the global topology proxy 210, and the respective switches 2202 of the first domain are respectively associated with the first The main controller 2201 is connected, and the switches 2302 of the second domain are respectively connected to the second main controller 2301. In addition, each switch 2202 of the first domain may be connected to each other, and each switch 2302 of the second domain may be connected to each other, and the switch 2202 of the first domain and the switch 2302 of the second domain may be connected, and the switch in the same domain The connection between the two is called the intra-domain topology link, and the connection between the switches in different domains is called the inter-domain topology link.
另外,第一域220和第二域230内还可以分别包括若干个主机,由于本发明实施例中不涉及,因此,图2中并未示出和说明。In addition, the first domain 220 and the second domain 230 may also include a plurality of hosts respectively, which are not shown in FIG. 2 because they are not involved in the 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 an actual application, an SDN network may include more than two domains. When the topology discovery method of the embodiment of the present invention is applied to an SDN network structure including two or more domains, the topology discovery method is determined according to the embodiment of the present invention. It is an inter-domain topology link between two domains. In the process, only two domains in multiple domains are involved. Therefore, the actual application scenario can be summarized as the scenario shown in Figure 2.
在以下实施例中,假设第一域220的第一主控制器2201针对第一域220内第一交换机的第一端口发起拓扑链路发现,第一交换机的第一端口与第二域230的第二交换机的第二端口之间存在域间拓扑链路。其中,第一交换机和第二交换机中的第一、第二仅用于区别两个交换机,并无其他实际意义,第一端口和第二端口中的第一、第二仅用于区别两个交换机的端口,无其他实际意义。第一交换机可以是第一域内任意一个与第二域内的交换机存在域间拓扑链路的交换机,第二交换机是第二域内与第一交换机存在域间拓扑链路的交换机。In the following embodiments, it is assumed that the first primary controller 2201 of the first domain 220 initiates topology link discovery for the first port of the first switch in the first domain 220, the first port of the first switch and the second domain 230 An inter-domain topology link exists between the second ports of the second switch. 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 meaning. The first and second of the first port and the second port are only used to distinguish 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 the switch in the second domain, and the second switch is a switch in the second domain that has an inter-domain topology link with the first switch.
以下,将在图2所示应用场景下对本发明实施例拓扑发现方法进行说明。The topology discovery method of the embodiment of the present invention will be described below in the application scenario shown in FIG.
参见图3,为本发明拓扑发现方法的一个实施例流程图,该实施例从第二主控制器侧进行描述,包括:FIG. 3 is a flowchart of an embodiment of a method for discovering a topology according to the present invention. The embodiment is described from the second main controller side, and includes:
步骤301:第二主控制器接收第二交换机发送的拓扑发现报文,拓扑发现报文包括:第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;Step 301: The second main controller receives the topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet, a second switch ID, and a second port ID received by the second switch.
其中,链路发现数据包包括:第一交换机ID、第一端口ID;The link discovery data packet includes: a first switch ID and a first port ID;
第一交换机ID用于指示发送链路发现数据包的第一交换机;The first switch ID is used to indicate a first switch that sends a link discovery data packet;
第二交换机ID用于指示接收链路发现数据包的第二交换机;The second switch ID is used to indicate a second switch that receives the link discovery data packet;
第一端口ID用于指示第一交换机发送链路发现数据包的第一端口;The first port ID is used to indicate that the first switch sends the first port of the link discovery data packet;
第二端口ID用于指示第二交换机接收到链路发现数据包的第二端口。The second port ID is used to indicate that the second switch receives the second port of the link discovery data packet.
步骤302:第二主控制器判断链路发现数据包不是第二主控制器所管辖域的链路发现数据包时,根据拓扑发现报文生成上报信息,上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID。Step 302: When the second primary controller determines that the link discovery data packet is not the link discovery data packet of the domain managed by the second primary controller, the second primary controller generates the report information according to the topology discovery packet, where the report information includes: the first switch ID, the first A port ID, a second switch ID, and a second port ID.
在一种可能的实现方式中,所述链路发现数据包还可以包括:第一域ID,所述第一域ID用于指示所述第一交换机所属域;所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包,可以包括: In a possible implementation, the link discovery data packet may further include: a first domain ID, where the first domain ID is used to indicate a domain to which the first switch belongs; and the second primary 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 which the second primary controller is located.
在另一种可能的实现方式中,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包可以包括:In another possible implementation manner, the determining, by the second main controller, that the link discovery data packet is not a link discovery 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 of a domain under 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, and indicates 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 port. The network element of the domain, but the network element of the other domain. Therefore, after the second primary controller determines that the link discovery data packet is not the link discovery data packet of the local domain, the second primary controller may The second switch ID and the second port ID are added to the border switch management information, so as to implement management of the border switch in the domain under the jurisdiction of the second host controller, where the border switch refers to inter-domain exchange with switches of other domains. A switch for a topology link.
参见下表1所示,各个域的主控制器可以通过如下表所示的方式维护所管辖域内的边界交换机的信息,边界交换机的信息包括:交换机ID、交换机属性、端口ID、端口状态等。下表1中具体的交换机ID、交换机属性、端口ID、端口状态等字段中填写的字段内容均为举例,可以在实际应用中根据实际场景定义,这里不赘述,例如下表1中UP表示端口处于开启状态,lastseetime表示端口的上次发现时间,state表示端口的拥塞程度、收发数据量等其他的状态。As shown in Table 1 below, the primary controllers of each domain can maintain the information of the border switches in the domain under the following table. The information of the border switches includes: switch ID, switch attributes, port ID, and port status. The fields in the fields of the switch ID, switch attributes, port IDs, and port status are as follows. You can define them in the actual application according to the actual scenario. For details, for example, the port in the following table indicates the port. When it is on, lastseetime indicates the last discovery time of the port, and state indicates the congestion status of the port, the amount of data sent and received, and other states.
表1Table 1
Figure PCTCN2014090569-appb-000001
Figure PCTCN2014090569-appb-000001
步骤303:第二主控制器将上报信息发送给全局拓扑代理,以便全局拓扑代理根据上报信息发现域间拓扑链路。Step 303: The second primary controller sends the report information to the global topology proxy, so that the global topology proxy discovers the inter-domain topology link according to the reported information.
其中,所述域间拓扑链路可以用于进行域间数据报文的转发等。其中,可以由全局拓扑代理根据所述域间拓扑链路控制第一交换机或者第二交换机进行域间数据报文的转发,可选地,全局拓扑代理可以通过第二主控制器控制第一交换 机或第二交换机进行域间数据报文的转发。The inter-domain topology link can be used to forward inter-domain data packets. The global topology agent may control the first switch or the second switch to perform inter-domain data packet forwarding according to the inter-domain topology link. Optionally, the global topology proxy may control the first exchange by using the second primary controller. The device or the second switch forwards the inter-domain data packet.
本实施例中,第二主控制器接收第二交换机发送的拓扑发现报文,判断拓扑发现报文中的链路发现数据包不是本域的链路发现数据包时,根据拓扑发现报文生成上报信息,将上报信息发送给全局拓扑代理,以便全局拓扑代理根据上报信息发现跨域全局拓扑链路,从而为全局拓扑代理发现跨域全局拓扑链路提供了数据支持,使得全局拓扑代理能够发现跨域全局拓扑链路。In this embodiment, the second main controller receives the topology discovery packet sent by the second switch, and determines that the link discovery data packet in the topology discovery packet is not the link discovery data packet of the local domain, and generates the packet according to the topology discovery packet. The report 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, thereby providing data support for the global topology agent to discover the cross-domain global topology link, so that the global topology agent can discover Cross-domain global topology link.
参见图4,为本发明拓扑发现方法的另一个实施例流程图,该实施例从全局拓扑代理侧进行描述,包括:FIG. 4 is a flowchart of another embodiment of a method for discovering a topology according to the present invention. The embodiment is described from the global topology proxy side, and includes:
步骤401:全局拓扑代理接收第二主控制器发送的上报信息,上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;Step 401: The global topology proxy receives the report information sent by the second primary controller, where the report information includes: a first switch ID, a first port ID, a second switch ID, and a second port ID;
其中,第一交换机ID用于指示发送链路发现数据包的第一交换机;The first switch ID is used to indicate a first switch that sends a link discovery data packet;
第二交换机ID用于指示接收链路发现数据包的第二交换机;The second switch ID is used to indicate a second switch that receives the link discovery data packet;
第一端口ID用于指示第一交换机发送链路发现数据包的第一端口;The first port ID is used to indicate that the first switch sends the first port of the link discovery data packet;
第二端口ID用于指示第二交换机接收到链路发现数据包的第二端口。The second port ID is used to indicate that the second switch receives the second port of the link discovery data packet.
其中,第一交换机ID可以通过第一交换机的名称、MAC地址、或IP地址等实现,这里不限定;第二交换机ID可以通过第二交换机的名称、MAC地址、或IP地址等实现。The first switch ID can be implemented by using the name, MAC address, or IP address of the first switch, and is not limited herein; the second switch ID can be implemented by using the name, MAC address, or IP address of the second switch.
交换机的端口ID可以预先为各个端口设置,具体设置方法本发明实施例不限定。The port ID of the switch may be set for each port in advance. The specific setting method is not limited in the embodiment of the present invention.
步骤402:全局拓扑代理根据上报信息发现域间拓扑链路。Step 402: The global topology proxy discovers the inter-domain topology link according to the reported information.
在一种可能的实现方式中,所述全局拓扑代理根据所述上报信息发现域间拓扑链路可以包括:In a possible implementation manner, the global topology proxy may discover the inter-domain topology link according to the reporting information, and the method may include:
所述全局拓扑代理根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;Determining, by the global topology agent, the domain to which the first switch belongs according to the first switch ID, and determining a domain to which the second switch belongs according to the second switch ID;
所述全局拓扑代理根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, by the global topology agent, 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, 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, the reporting information may further include: a first domain ID, 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 The ID is used to indicate the domain to which the second switch belongs; and the global topology agent discovers the inter-domain topology chain according to the reported information. Roads can include:
所述全局拓扑代理根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, by the global topology proxy, the first end of the inter-domain topology link according to the first domain ID, the first switch ID, and the first port ID, according to the second domain ID, the second switch ID, and the second The port ID determines the second end of the inter-domain topology link.
其中,各个域的域ID可以预先为各个域设置,具体设置方法本发明实施例并不限定。The domain ID of each domain may be set in advance for each domain. The specific setting method is not limited in the embodiment of the present invention.
其中,步骤402之后还可以包括:全局拓扑代理根据发现的域间拓扑链路控制所述第一交换机或所述第二交换机进行域间数据报文的转发,可选地,全局拓扑代理可以通过第二主控制器控制第一交换机或第二交换机进行域间数据报文的转发。After the step 402, the global topology agent may further control the first switch or the second switch to perform inter-domain data packet forwarding according to the discovered inter-domain topology link. Optionally, the global topology proxy may pass The second main controller controls the first switch or the second switch to forward the inter-domain data packet.
本实施例中,全局拓扑代理接收第二主控制器发送的上报信息,上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID,根据上报信息发现跨域全局拓扑链路,从而实现了跨域全局拓扑链路的发现。In this embodiment, the global topology proxy receives the report information sent by the second primary controller, and the report information includes: the first switch ID, the first port ID, the second switch ID, and the second port ID, and the cross-domain global is found according to the reported information. Topology links, enabling the discovery of cross-domain global topology 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内还可以包括主机,由于本发明实施例并不涉及,因此未举例示出。5A is an application scenario example of a topology discovery method according to the present invention. The network includes: a global topology proxy, domain 1, and domain 2. In domain 1, the host controller OFC_1, the switch Sw1_1, the switch Sw1_2, and the switch Sw1_3 are included in the domain 1. In the domain 2, 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 to the port 1 of the switch Sw2_1 in the domain 2, and an inter-domain topology link is formed. The domain ID of the domain 1 is Domain 1, the domain ID of the domain 2 is Domain 2, the ID of the switch Sw1_1 is Sw1_1, the ID of the switch Sw2_1 is Sw2_1, and the ID of the port 1 of the switch Sw1_1 and the switch Sw2_1 are Port1. The purpose of the method is to enable the global topology agent to discover this inter-domain topology link. The domain 1 and the domain 2 may also include a host. Since the embodiment of the present invention is not involved, it is not illustrated.
参见图5B,为本发明拓扑发现方法另一个实施例流程图,该实施例中将结合图5A所示的实例进行说明。FIG. 5B is a flowchart of another embodiment of a topology discovery method according to the present invention, which will be described in conjunction with the example shown in FIG. 5A.
在本实施例中,预先为各个域设置域ID,所述域ID可以由全局拓扑代理为各个域设置,或者,也可以由各个域的主控制器为主控制器自身所管辖域设置,例如,主控制器可以根据主控制器自身的IP地址或MAC地址和时间通过哈希运算得到一个值作为主控制器所管辖域的域ID,具体确定域ID的方法本发明并不限制,此处不再赘述。In this embodiment, a domain ID is set in advance for each domain, and the domain ID may be set by the global topology proxy for each domain, or may be set by the primary controller of each domain as the domain of the master controller itself, for example, The main controller can obtain a value according to the IP address or MAC address and time of the main controller itself as a domain ID of the domain under the control of the main controller, and the method for determining the domain ID is not limited. No longer.
步骤501:各个域的主控制器向全局拓扑代理发送注册信息,以在全局拓扑代理中注册各个域。 Step 501: The primary controller of each domain sends registration information to the global topology proxy to register each domain in the global topology proxy.
其中,所述注册信息可以包括:主控制器的地址、主控制器所管辖域的域ID以及所管辖域的域信息。The registration information may include: an address of the primary controller, a domain ID of a domain under the jurisdiction of the primary controller, and domain information of the domain under the jurisdiction.
其中,主控制器的地址可以为IP地址或者MAC地址等。所管辖域的域信息可以包括:域内各个网元ID、域内网元的IP地址范围等,网元ID可以为网元的名称、网元的IP地址或MAC地址等。The address of the primary controller may be an IP address or a MAC address. The domain information of the domain may include: the ID of each network element in the domain, and the IP address range of the network element in the domain. The ID of the network element may be the name of the network element, the IP address of the network element, or the MAC address.
结合图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。Referring to FIG. 5A, the registration information reported by the primary controllers of the two domains may be as shown in Table 2. The primary controller OFC_1 is domain 1 and the domain ID is Domain1. The IP address of the primary controller OFC_1 is 192.168.1.11. The domain information of the domain is Host1_1 and the IP address range is 192.168.1.10 to 192.168. The IP address of the primary controller OFC_2 is 192.168.2.11, and the domain information of the domain is: Host2_1, and the IP address range is 192.168.2.10 to 192.168. 2.100.
表2Table 2
Figure PCTCN2014090569-appb-000002
Figure PCTCN2014090569-appb-000002
其中,本步骤为可选步骤。Among them, this step is an optional step.
步骤502:第一域的第一主控制器针对第一交换机的第一端口生成链路发现数据包,所述链路发现数据包可以包括:第一交换机ID、第一端口ID以及第一域ID。Step 502: The first primary 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: a first switch ID, a first port ID, and a 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 primary controller is the primary controller OFC_1, the first switch is the switch Sw1_1, and the first port is the port 1, the first switch ID is Sw1_1, and the first port ID is For Port1, the first domain ID is Domain1.
除了上述三种信息,链路发现数据包中还可以包括其他信息,具体包括的信息本发明实施例并不限定。In addition to the above three types of information, the link discovery data packet may further include other information, and the specific information included in the embodiment of the present invention is not limited.
在一种可能的实现方式中,链路发现数据包可以通过下表3所示的结构实 现。In a possible implementation manner, the link discovery data packet can be implemented by the structure shown in Table 3 below. Now.
表3table 3
Figure PCTCN2014090569-appb-000003
Figure PCTCN2014090569-appb-000003
其中,src_mac表示发送链路发现数据包的源网元的MAC地址,在本实施例中源网元为第一交换机;dst_mac表示接收链路发现数据包的目标网元的MAC地址,由于第一主控制器在生成链路发现数据包时并不知道链路发现数据包的目标网元,因此,该字段可以缺省,参见表2,通过FF:FF:FF:FF:FF表示;eth_type表示:以太网类型,用于表示数据包是用于链路发现的数据包;chassis ID三元组(TLV)表示:LLDP数据包中的TLV的一个字段;Port ID TLV表示源网元中发送链路发现数据包的端口ID三元组,其中的Value用于记录源网元中发送链路发现数据包的端口的端口ID,例如表2中所示的Port1;TTL TLV表示:超时时间;Domain TLV表示域三元组,其中的Value用于记录主控制器所管辖域的域ID;Action表示源网元对链路发现数据包所作的动作,例如,可以设置为表2所示的out-to-port1,也即指示源网元将链路发现数据包从端口ID为port1的端口转发出去,当源网元转发该链路发现数据包时,Action这一字段将被源网元清空或设置为缺省;End of TLV表示:数据包中TLV字段的结束标志。The src_mac indicates 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 indicates the MAC address of the target network element that receives the link discovery data packet, because the first The primary controller does not know the target network element of the link discovery packet when generating the link discovery packet. Therefore, this field can be defaulted, see Table 2, 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; the chassis ID triplet (TLV) indicates: a field of the TLV in the LLDP data packet; and the Port ID TLV indicates the transmission chain in the source network element. The port ID triplet of the route 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 The TLV represents a domain triplet, where Value is used to record the domain ID of the domain under the jurisdiction of the primary controller; Action represents the action taken by the source network element on the link discovery packet, for example, it can be set to the out- shown in Table 2 To-port1, which indicates the source network The link forwarding packet is forwarded 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 to the default by the source NE; End of TLV indicates : The end of the TLV field in the 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 first port indicated 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 data packet from the second port, and generates a topology discovery packet to be sent to the second primary controller.
拓扑发现报文包括:第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID。The topology discovery packet includes: a link discovery data packet received by the second switch, a second switch ID, and a second port ID.
第二交换机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 data packet.
依照上述实例,由于图5A中交换机Sw1_1的端口1实际与交换机Sw2_1的端口1连接,因此,第二交换机为交换机Sw2_1,第二端口为端口1,相应的,According to the above example, since port 1 of switch Sw1_1 in FIG. 5A is actually connected to port 1 of switch Sw2_1, the second switch is switch Sw2_1 and the second port is 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 switch Sw2_1 is born. The second switch ID in the topology discovery packet is Sw2_1, the second port ID is Port1, and the second host controller is the primary controller OFC2_1 in the second domain.
步骤505:第二主控制器接收拓扑发现报文,判断链路发现数据包中的第一域ID与第二主控制器所管辖域的域ID不同时,根据拓扑发现报文生成上报信息,将上报信息发送给全局拓扑代理。Step 505: The second primary controller receives the topology discovery packet, and determines that the first domain ID in the link discovery data packet is different from the domain ID of the domain in which the second primary controller is located, and generates the report information according to the topology discovery packet. The report information is sent 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 primary 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 second primary controller, the second primary controller performs intra-domain topology link discovery. The process is not 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 primary controller is the primary 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 primary controller OFC2_1 determines that the two are different. The report information is generated. 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, and the second domain ID is 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.
其中,全局拓扑代理根据上报信息发现域间拓扑链路可以包括:The global topology proxy may discover the inter-domain topology link according to the reported information, and 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 discovers the inter-domain topology 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 determines that the first end of the inter-domain topology link is: port 1 of the switch Sw1_1 of the domain 1, and the second end of the inter-domain topology link is: the switch Sw2_1 of the domain 2. Port 1.
本实施例中,第一主控制器在生成链路发现数据包时,在链路发现数据包中携带自身所管辖的第一域的第一域ID,从而链路发现数据包经过域间拓扑链路传输至另一个域的第二主控制器时,第二主控制器可以根据第一域ID判断该链路发现数据包不是第二主控制器所管辖域的链路发现数据包,进而上报全局拓扑代理,使得全局拓扑代理能够实现跨域全局拓扑链路的发现。In this embodiment, when generating the link discovery data packet, the first primary 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 the inter-domain topology. When the link is transmitted to the second primary controller of the other domain, the second primary controller may determine, according to the first domain ID, that the link discovery data packet is not a link discovery data packet of a domain managed by the second primary controller, and further The global topology agent is reported, enabling the global topology agent to discover 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 in advance for each domain, and the domain ID may be set by the global topology proxy for each domain, or may be set by the primary controller of each domain as the domain of the master controller itself, for example, The main controller can obtain a value as a domain ID of the domain under the control of the host controller by hashing according to the IP address or MAC address and time of the host controller itself.
步骤511:各个域的主控制器向全局拓扑代理发送注册信息,以在全局拓扑代理中注册各个域。Step 511: The primary controller of each domain sends registration information to the global topology proxy to register each domain in the global topology proxy.
本步骤的实现请参见步骤501中的相关描述,这里不赘述。For the implementation of this step, refer to the related description in step 501, and details are not described herein.
步骤512:第一域的第一主控制器针对第一交换机的第一端口生成链路发现数据包,所述链路发现数据包可以包括:第一交换机ID、第一端口ID。Step 512: The first primary 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: a first switch ID and a 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 primary controller is the primary controller OFC_1, the first switch is the switch Sw1_1, and the first port is the port 1, the first switch ID is Sw1_1, and the first port ID is For port1.
其中,链路发现数据包的实现结构可以参见步骤502的相关描述,其中,表2中的Domain TLV字段可以省略。For the implementation structure of the link discovery data packet, refer to the related description of step 502. 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 first port indicated 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 data packet from the second port, and generates a topology discovery packet to be sent to the second primary controller.
拓扑发现报文包括:第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID。The topology discovery packet includes: a link discovery data packet received by the second switch, a second switch ID, and a second port ID.
第二交换机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 data packet.
依照上述实例,由于图5A中交换机Sw1_1的端口1实际与交换机Sw2_1的端口1连接,因此,第二交换机为交换机Sw2_1,第二端口为端口1,相应的,According to the above example, since port 1 of switch Sw1_1 in FIG. 5A is actually connected to port 1 of switch Sw2_1, the second switch is switch Sw2_1 and the second port is port 1, correspondingly,
交换机Sw2_1将从自身的端口1接收到链路发现数据包;交换机Sw2_1生成的拓扑发现报文中第二交换机ID为Sw2_1,第二端口ID为Port1;第二主控制器为第二域的主控制器OFC2_1。The switch Sw2_1 receives the link discovery data packet from its own port 1. The second switch ID of the topology discovery packet generated by the switch Sw2_1 is Sw2_1, and the second port ID is Port1. The second primary controller is the master of the second domain. Controller OFC2_1.
步骤515:第二主控制器接收拓扑发现报文,判断链路发现数据包中的第一交换机ID指示的第一交换机不是第二主控制器所管辖域的交换机时,根据拓扑 发现报文生成上报信息,将上报信息发送给全局拓扑代理。Step 515: The second primary controller receives the topology discovery packet, and determines that the first switch indicated by the first switch ID in the link discovery data packet is not the switch of the domain controlled by the second primary controller, according to the topology. The device generates the report information and sends 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 information of each network element in the jurisdiction domain is stored in the second main controller. Therefore, in this step, the second main controller may determine, according to the pre-stored information, the first switch ID indicated in the link discovery data packet. Whether the first switch is a switch of a domain under the jurisdiction of the second primary controller, and details are not described herein again.
本实施例中,如果第二主控制器判断链路发现数据包中的第一交换机ID指示的第一交换机是第二主控制器所管辖域的交换机,那么第二主控制器将执行域内拓扑链路发现过程,这里不再赘述。In this embodiment, if the second primary controller determines that the first switch indicated by the first switch ID in the link discovery data packet is a switch of a domain controlled by the second primary controller, the second primary controller performs an intra-domain topology. The link discovery process is not described 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 with the ID Sw1_1 is not the switch in the domain 2 under its jurisdiction. .
步骤516:全局拓扑代理接收上报信息,根据上报信息发现域间拓扑链路。Step 516: The global topology agent receives the report information, and discovers the inter-domain topology link according to the report information.
其中,全局拓扑代理根据上报信息发现域间拓扑链路可以包括:The global topology proxy may discover the inter-domain topology link according to the reported information, and may include:
所述全局拓扑代理根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;Determining, by the global topology agent, the domain to which the first switch belongs according to the first switch ID, and determining a domain to which the second switch belongs according to the second switch ID;
所述全局拓扑代理根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口标识确定所述域间拓扑链路的第二端。Determining, by the global topology agent, 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, according to the domain to which the second switch belongs, the second switch ID, and The second port identifier determines a second end of the inter-domain topology link.
其中,由于步骤511中各个域的主控制器已经向全局拓扑代理发送了各个域的注册信息,因此,本步骤中全局拓扑代理可以根据接收到的各个域的注册信息确定所述第一交换机所属域以及第二交换机所属域。In this step, the primary controller of each domain in the step 511 has sent the registration information of each domain to the global topology proxy. Therefore, in this step, the global topology proxy may determine, according to the received registration information of each domain, the first switch belongs to. The 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 may determine that the first switch with the ID Sw1_1 belongs to the domain 1 and the second switch with the ID Sw2_1 belongs to the domain 2 according to the registration information sent by each primary controller in step 511; The first end of the inter-domain topology link is determined as: port 1 of the switch Sw1_1 of the domain 1, and the second end is the port 1 of the switch Sw2_1 of the domain 2.
本实施例中,第一主控制器生成的链路发现数据包经过域间拓扑链路传输至另一个域的第二主控制器时,第二主控制器判断该链路发现数据包不是第二主控制器所管辖域的链路发现数据包,进而上报全局拓扑代理,使得全局拓扑代理能够实现跨域全局拓扑链路的发现。 In this embodiment, when the link discovery data packet generated by the first primary controller is transmitted to the second primary controller of another domain through the inter-domain topology link, the second primary controller determines that the link discovery data packet is not the first The link of the domain under the jurisdiction of the two primary controllers discovers the data packet, and then reports the global topology agent, so that the global topology agent can realize the discovery of the cross-domain global topology link.
与本发明拓扑发现方法的实施例相对应,本发明还提供了主控制器、全局拓扑代理的实施例。Corresponding to the embodiment of the topology discovery method of the present invention, the present invention also provides an embodiment of a primary controller and a global topology agent.
参见图6,为本发明主控制器的一个实施例框图。主控制器600包括:接收单元610、生成单元620以及发送单元630,其中,Referring to Figure 6, a block diagram of one embodiment of a main controller of the present invention is shown. The main controller 600 includes: a receiving unit 610, a generating unit 620, and a sending unit 630, where
接收单元610,用于接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述链路发现数据包包括:第一交换机ID、第一端口ID;所述第一交换机ID用于指示向所述第二交换机发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收所述链路发现数据包的所述第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;The receiving unit 610 is configured to receive a topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet, a second switch ID, and a second port ID received by the second switch; The link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch, and the second The switch ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port The ID is used to indicate that the second switch receives the port of the link discovery data packet;
生成单元620,用于判断所述接收单元接收到的所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;The generating unit 620 is configured to: when the link discovery data packet received by the receiving unit is not the link discovery data packet of the local domain, generate report information according to the topology discovery packet, 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 report information generated by the generating unit to the global topology agent, so that the global topology agent discovers the inter-domain topology link according to the report 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 a domain to which the first switch belongs; and the generating unit 620 may be specifically configured to:
判断所述链路发现数据包中包括的第一域ID与所述第二主控制器所管辖域的域ID不同。Determining that the first domain ID included in the link discovery data packet is different from the domain ID of the domain controlled by the second primary controller.
可选地,所述生成单元620具体可以用于:Optionally, the generating unit 620 is specifically configured to:
判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。Determining that the first switch indicated by the first switch ID is not a switch of a domain controlled by the second primary controller.
可选地,主控制器600还可以包括:Optionally, the main controller 600 may further include:
管理单元,用于所述生成单元判断所述链路发现数据包不是本域的链路发现数据包之后,将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中。And a management unit, configured to: after the generating unit determines that the link discovery data packet is not a link discovery data packet of the local domain, adding the second switch ID and the second port ID to the boundary switch management information.
本实施例中,第二主控制器接收第二交换机发送的拓扑发现报文,判断拓扑发现报文中的链路发现数据包不是本域的链路发现数据包时,根据拓扑发现报文生成上报信息,将上报信息发送给全局拓扑代理,以便全局拓扑代理根据上报信息发现跨域全局拓扑链路,从而为全局拓扑代理发现跨域全局拓扑链路提供了数 据支持,使得全局拓扑代理能够发现跨域全局拓扑链路。In this embodiment, the second main controller receives the topology discovery packet sent by the second switch, and determines that the link discovery data packet in the topology discovery packet is not the link discovery data packet of the local domain, and generates the packet according to the topology discovery packet. The report 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, thereby providing the global topology agent with the number of cross-domain global topology links. Supported to enable global topology agents to discover cross-domain global topology links.
参见图7,为本发明全局拓扑代理的一个实施例框图。全局拓扑代理700包括:接收单元710以及确定单元720,其中,Referring to FIG. 7, a block diagram of an embodiment of a global topology proxy of the present invention is shown. The global topology agent 700 includes: a receiving unit 710 and a determining unit 720, where
接收单元710,用于接收第二主控制器发送的上报信息,所述上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;所述第一交换机ID用于指示发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收将所述链路发现数据包的第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;The receiving unit 710 is configured to receive the 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; And indicating to the first switch that sends the link discovery data packet, where the second switch ID is used to indicate that a second switch that receives the link discovery data packet is used, where the first port ID is used to indicate the a switch sends a port of the link discovery data packet, where the second port ID is used to indicate that the second switch receives the port of the link discovery data packet;
确定单元720,用于根据所述接收单元710接收到的所述上报信息发现域间拓扑链路。The determining unit 720 is configured to discover an inter-domain topology link according to the report information received by the receiving unit 710.
可选地,所述确定单元720具体可以用于:Optionally, the determining unit 720 is specifically configured to:
根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;Determining, according to the first switch ID, a domain to which the first switch belongs, and determining, according to the second switch ID, a domain to which the second switch belongs;
根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, according to the domain to which the first switch belongs, the first switch ID, and the first port ID, 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 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, 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 is used to indicate the The domain to which the second switch belongs; the determining unit 720 may be specifically configured to:
根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, according to the first domain ID, the first switch ID, and the first port ID, a first end of the inter-domain topology link, determining, according to the second domain ID, the second switch ID, and the second port ID The second end of the inter-domain topology link.
本实施例中,全局拓扑代理接收第二主控制器发送的上报信息,上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID,根据上报信息发现域间拓扑链路,从而实现了跨域全局拓扑链路的发现。In this embodiment, the global topology proxy receives the report information sent by the second primary controller, and the report information includes: the first switch ID, the first port ID, the second switch ID, and the second port ID, and the inter-domain topology is found according to the reported information. Link, which enables the discovery of cross-domain global topology links.
参见图8,为本发明实施例主控制器结构示意图,该主控制器800包括:处理器810、存储器820、收发器830和总线840;FIG. 8 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 can be So ISA bus, PCI bus or EISA bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 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 configured to store a program. In particular, the program can include program code, the program code including computer operating instructions. The memory 820 may include a high speed RAM memory and may also include a 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 other devices 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 data packet, a second switch ID, and a second port ID received by the second switch; The link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch, and the second The switch ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port The ID is used to indicate that the second switch receives the port of the link discovery data packet, and is further configured to send the report information generated by the processor 810 to the global topology proxy, so that the global topology proxy is configured according to the report Information discovery inter-domain topology links.
所述处理器810执行所述程序代码,用于判断所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID。The processor 810 executes the program code, and is configured to: when the link discovery data packet is not a link discovery data packet of the local domain, generate report information according to the topology discovery packet, 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 a domain to which the first switch belongs; and the processor 810 may be specifically configured to: determine the The first domain ID included in the link discovery packet is different from the domain ID of the domain under which the second primary controller is located.
可选地,所述处理器810具体可以用于:判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。Optionally, the processor 810 is specifically configured to: determine that the first switch indicated by the first switch ID is not a switch of a domain that is controlled by the second primary controller.
可选地,所述处理器810还可以用于:判断所述链路发现数据包不是本域的链路发现数据包之后,将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中。Optionally, the processor 810 is further configured to: after determining that the link discovery data packet is not a link discovery data packet of the local domain, adding the second switch ID and the second port ID to the border switch management information. in.
本实施例中,第二主控制器接收第二交换机发送的拓扑发现报文,判断拓扑发现报文中的链路发现数据包不是本域的链路发现数据包时,根据拓扑发现报文生成上报信息,将上报信息发送给全局拓扑代理,以便全局拓扑代理根据上报信息发现域间拓扑链路,从而为全局拓扑代理发现跨域全局拓扑链路提供了数据支 持,使得全局拓扑代理能够发现跨域全局拓扑链路。In this embodiment, the second main controller receives the topology discovery packet sent by the second switch, and determines that the link discovery data packet in the topology discovery packet is not the link discovery data packet of the local domain, and generates the packet according to the topology discovery packet. The report information is sent to the global topology agent, so that the global topology agent discovers the inter-domain topology link according to the report information, thereby providing data support for the global topology agent to discover the cross-domain global topology link. Hold, enabling the global topology agent to discover cross-domain global topology links.
参见图9,为本发明实施例基站结构示意图,该基站900包括:处理器910、存储器920、收发器930和总线940;9 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, or an EISA bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 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 configured to store a program. In particular, the program can include program code, the program code including computer operating instructions. 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 other devices and communicate with other devices. The transceiver 930 is configured to: receive the 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; And indicating to the first switch that sends the link discovery data packet, where the second switch ID is used to indicate that a second switch that receives the link discovery data packet is used, where the first port ID is used to indicate the A switch sends a port of the link discovery data packet, where the second port ID is used to indicate that the second switch receives the port of the link discovery data packet.
所述处理器910执行所述程序代码,用于根据所述上报信息发现域间拓扑链路。The processor 910 executes the program code, and is configured to discover an inter-domain topology link according to the report information.
可选地,所述处理器910具体可以用于:Optionally, the processor 910 is specifically configured to:
根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;Determining, according to the first switch ID, a domain to which the first switch belongs, and determining, according to the second switch ID, a domain to which the second switch belongs;
根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, according to the domain to which the first switch belongs, the first switch ID, and the first port ID, 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 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, 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 is used to indicate the The second switch belongs to the domain; the processor 910 is specifically configured to: determine, according to the first domain ID, the first switch ID, and the first port ID, the first end of the inter-domain topology link, according to the first The second domain ID, the second switch ID, and the second port ID determine a second end of the inter-domain topology link.
本实施例中,全局拓扑代理接收第二主控制器发送的上报信息,上报信息包括;第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID,根据上报信息发现域间拓扑链路,从而实现了跨域全局拓扑链路的发现。In this embodiment, the global topology proxy receives the report information sent by the second primary controller, and the report information includes: the first switch ID, the first port ID, the second switch ID, and the second port ID, and the inter-domain topology is found according to the reported information. Link, which enables the discovery of cross-domain global topology links.
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。It will be apparent to those skilled in the art that the techniques 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 solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM. , a disk, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上所述的本发明实施方式,并不构成对本发明保护范围的限定。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明的保护范围之内。 The embodiments of the invention described above are not intended to limit the scope of the invention. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (16)

  1. 一种拓扑发现方法,其特征在于,包括:A topology discovery method, comprising:
    第二主控制器接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机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: a link discovery data packet received by the second switch, a second switch ID, and a second port ID; The link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch, and the second switch The ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port ID is a port for instructing the second switch to receive the link discovery data packet;
    所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;When the second primary controller determines that the link discovery data packet is not the link discovery data packet of the local domain, the second primary controller generates the report information according to the topology discovery packet, where the report information includes: a first switch ID, and a first a port ID, a second switch ID, and a 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.
  2. 根据权利要求1所述的方法,其特征在于,所述链路发现数据包还包括:第一域ID,所述第一域ID用于指示所述第一交换机所属域;所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包,包括:The method according to claim 1, wherein the link discovery data packet further comprises: a first domain ID, the first domain ID is used to indicate a domain to which the first switch belongs; and the second primary The controller determines that the link discovery data packet is not a link discovery data packet of the local domain, and includes:
    所述第二主控制器判断所述链路发现数据包中包括的第一域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 which the second primary controller is located.
  3. 根据权利要求1所述的方法,其特征在于,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包,包括:The method according to claim 1, wherein the second main controller determines that the link discovery data packet is not a link discovery data packet of the local domain, and includes:
    所述第二主控制器判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。The second main controller determines that the first switch indicated by the first switch ID is not a switch of a domain under the second main controller.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述第二主控制器判断所述链路发现数据包不是本域的链路发现数据包之后,还包括:The method according to any one of claims 1 to 3, wherein after the second main controller determines that the link discovery data packet is not a link discovery data packet of the local domain, the second main controller further includes:
    所述第二主控制器将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中。The second main controller adds the second switch ID and the second port ID to the border switch management information.
  5. 一种拓扑发现方法,其特征在于,包括:A topology discovery method, comprising:
    全局拓扑代理接收第二主控制器发送的上报信息,所述上报信息包括;第一 交换机ID、第一端口ID、第二交换机ID以及第二端口ID;所述第一交换机ID用于指示发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收将所述链路发现数据包的第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口ID用于指示所述第二交换机接收到所述链路发现数据包的端口;The global topology proxy receives the report information sent by the second primary controller, where the report information includes: a switch ID, a first port ID, a second switch ID, and a second port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet, and the second switch ID is used to indicate reception a second switch of the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port ID is used to indicate the Receiving, by the second switch, a port of the link discovery data packet;
    所述全局拓扑代理根据所述上报信息发现域间拓扑链路。The global topology agent discovers an inter-domain topology link according to the reported information.
  6. 根据权利要求5所述的方法,其特征在于,所述全局拓扑代理根据所述上报信息发现域间拓扑链路之后,还包括:The method according to claim 5, wherein 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 perform inter-domain data packet forwarding according to the inter-domain topology link.
  7. 根据权利要求5或6所述的方法,其特征在于,所述全局拓扑代理根据所述上报信息发现域间拓扑链路,包括:The method according to claim 5 or 6, wherein the global topology agent discovers an inter-domain topology link according to the reported information, including:
    所述全局拓扑代理根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;Determining, by the global topology agent, the domain to which the first switch belongs according to the first switch ID, and determining a domain to which the second switch belongs according to the second switch ID;
    所述全局拓扑代理根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, by the global topology agent, 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, 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.
  8. 根据权利要求5或6所述的方法,其特征在于,所述上报信息还包括:第一域ID、第二域ID,所述第一域ID用于指示所述第一交换机所属域,所述第二域ID用于指示所述第二交换机所属域;所述全局拓扑代理根据所述上报信息发现域间拓扑链路,包括:The method according to claim 5 or 6, wherein the report information further includes: 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. The second domain ID is used to indicate the domain to which the second switch belongs; the global topology proxy discovers the inter-domain topology link according to the reported information, including:
    所述全局拓扑代理根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, by the global topology proxy, the first end of the inter-domain topology link according to the first domain ID, the first switch ID, and the first port ID, according to the second domain ID, the second switch ID, and the second The port ID determines the second end of the inter-domain topology link.
  9. 一种主控制器,其特征在于,包括:A main controller, comprising:
    接收单元,用于接收第二交换机发送的拓扑发现报文,所述拓扑发现报文包括:所述第二交换机接收到的链路发现数据包、第二交换机ID以及第二端口ID;所述链路发现数据包包括:第一交换机ID、第一端口ID;所述第一交换机ID用于指示向所述第二交换机发送所述链路发现数据包的第一交换机,所述第二交换机ID用于指示接收所述链路发现数据包的所述第二交换机,所述第一端口ID用于指示所述第一交换机发送所述链路发现数据包的端口,所述第二端口 ID用于指示所述第二交换机接收到所述链路发现数据包的端口;a receiving unit, configured to receive a topology discovery packet sent by the second switch, where the topology discovery packet includes: a link discovery data packet, a second switch ID, and a second port ID received by the second switch; The link discovery data packet includes: a first switch ID, a first port ID; the first switch ID is used to indicate a first switch that sends the link discovery data packet to the second switch, and the second switch The ID is used to indicate the second switch that receives the link discovery data packet, where the first port ID is used to indicate that the first switch sends the port of the link discovery data packet, and the second port The ID is used to indicate that the second switch receives the port of the link discovery data packet;
    生成单元,用于判断所述接收单元接收到的所述链路发现数据包不是本域的链路发现数据包时,根据所述拓扑发现报文生成上报信息,所述上报信息包括:第一交换机ID、第一端口ID、第二交换机ID以及第二端口ID;a generating unit, configured to: when the link discovery data packet received by the receiving unit is not a link discovery data packet of the local domain, generate report information according to the topology discovery packet, where the report information includes: a switch ID, a first port ID, a second switch ID, and a second port ID;
    发送单元,用于将所述生成单元生成的所述上报信息发送给全局拓扑代理,以便所述全局拓扑代理根据所述上报信息发现域间拓扑链路。And a sending unit, configured to send the report 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 reported information.
  10. 根据权利要求9所述的主控制器,其特征在于,所述链路发现数据包还包括:第一域ID,所述第一域ID用于指示所述第一交换机所属域;所述生成单元具体用于:The master controller according to claim 9, wherein the link discovery data packet further comprises: a first domain ID, the first domain ID is used to indicate a domain to which the first switch belongs; The unit is specifically used to:
    判断所述链路发现数据包中包括的第一域ID与所述第二主控制器所管辖域的域ID不同。Determining that the first domain ID included in the link discovery data packet is different from the domain ID of the domain controlled by the second primary controller.
  11. 根据权利要求9所述的主控制器,其特征在于,所述生成单元具体用于:The main controller according to claim 9, wherein the generating unit is specifically configured to:
    判断所述第一交换机ID指示的第一交换机不是所述第二主控制器所管辖域的交换机。Determining that the first switch indicated by the first switch ID is not a switch of a domain controlled by the second primary controller.
  12. 根据权利要求9至11任一项所述的主控制器,其特征在于,还包括:The main controller according to any one of claims 9 to 11, further comprising:
    管理单元,用于所述生成单元判断所述链路发现数据包不是本域的链路发现数据包之后,将所述第二交换机ID以及第二端口ID加入边界交换机管理信息中。And a management unit, configured to: after the generating unit determines that the link discovery data packet is not a link discovery data packet of the local domain, adding the second switch ID and the second port ID to the boundary switch management information.
  13. 一种全局拓扑代理,其特征在于,包括:A global topology agent, comprising:
    接收单元,用于接收第二主控制器发送的上报信息,所述上报信息包括;第一交换机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 by And indicating a first switch that sends the link discovery data packet, where the second switch ID is used to indicate that a second switch that receives the link discovery data packet is used, where the first port ID is used to indicate the first switch The switch sends the port of the link discovery data packet, where the second port ID is used to indicate that the second switch receives the port of the link discovery data packet;
    确定单元,用于根据所述接收单元接收到的所述上报信息发现域间拓扑链路。And a determining unit, configured to discover an inter-domain topology link according to the report information received by the receiving unit.
  14. 根据权利要求13所述的全局拓扑代理,其特征在于,还包括:The global topology agent according to claim 13, further comprising:
    控制单元,用于根据所述确定单元发现的所述域间拓扑链路控制所述第一交换机或所述第二交换机进行域间数据报文的转发。And a control unit, configured to control the first switch or the second switch to perform inter-domain data packet forwarding according to the inter-domain topology link discovered by the determining unit.
  15. 根据权利要求13或14所述的全局拓扑代理,其特征在于,所述确定单元具体用于: The global topology agent according to claim 13 or 14, wherein the determining unit is specifically configured to:
    根据所述第一交换机ID确定所述第一交换机所属域,并且,根据所述第二交换机ID确定所述第二交换机所属域;Determining, according to the first switch ID, a domain to which the first switch belongs, and determining, according to the second switch ID, a domain to which the second switch belongs;
    根据所述第一交换机所属域、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二交换机所属域、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。Determining, according to the domain to which the first switch belongs, the first switch ID, and the first port ID, 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 The second end of the inter-domain topology link.
  16. 根据权利要求13或14所述的全局拓扑代理,其特征在于,所述上报信息还包括:第一域ID、第二域ID,所述第一域ID用于指示所述第一交换机所属域,所述第二域ID用于指示所述第二交换机所属域;所述确定单元具体用于:The global topology agent according to claim 13 or 14, wherein the report information further includes: 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. The second domain ID is used to indicate the domain to which the second switch belongs; the determining unit is specifically configured to:
    根据所述第一域ID、第一交换机ID以及第一端口ID确定所述域间拓扑链路的第一端,根据所述第二域ID、第二交换机ID以及第二端口ID确定所述域间拓扑链路的第二端。 Determining, according to the first domain ID, the first switch ID, and the first port ID, a first end of the inter-domain topology link, determining, according to the second domain ID, the second switch ID, and the second port ID The second end of the inter-domain topology link.
PCT/CN2014/090569 2014-11-07 2014-11-07 Topology discovery method and device WO2016070406A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480037526.5A CN105765903B (en) 2014-11-07 2014-11-07 A kind of topology discovery method and equipment
PCT/CN2014/090569 WO2016070406A1 (en) 2014-11-07 2014-11-07 Topology discovery method and device

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 (1)

Publication Number Publication Date
WO2016070406A1 true WO2016070406A1 (en) 2016-05-12

Family

ID=55908421

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/090569 WO2016070406A1 (en) 2014-11-07 2014-11-07 Topology discovery method and device

Country Status (2)

Country Link
CN (1) CN105765903B (en)
WO (1) WO2016070406A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108880899A (en) * 2018-06-30 2018-11-23 华为技术有限公司 A kind of Generating Network Topology Map and server
CN114938345A (en) * 2022-06-07 2022-08-23 中国联合网络通信集团有限公司 Link discovery method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136928A (en) * 2010-07-02 2011-07-27 华为技术有限公司 Topology discovery method and device
CN102387068A (en) * 2011-09-29 2012-03-21 中国人民解放军国防科学技术大学 Extensible routing method and router of identification network
US20130054867A1 (en) * 2011-08-23 2013-02-28 Fujitsu Limited Communication apparatus and id setting method
CN103401786A (en) * 2013-07-12 2013-11-20 华为技术有限公司 Method, device and system for establishing network topology, controlling path and transmitting message

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9729424B2 (en) * 2012-06-11 2017-08-08 Futurewei Technologies, Inc. Defining data flow paths in software-defined networks with application-layer traffic optimization
CN103825825B (en) * 2014-01-18 2017-01-11 浙江大学 Flexible, extensible and safe inter-domain topology discovery method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136928A (en) * 2010-07-02 2011-07-27 华为技术有限公司 Topology discovery method and device
US20130054867A1 (en) * 2011-08-23 2013-02-28 Fujitsu Limited Communication apparatus and id setting method
CN102387068A (en) * 2011-09-29 2012-03-21 中国人民解放军国防科学技术大学 Extensible routing method and router of identification network
CN103401786A (en) * 2013-07-12 2013-11-20 华为技术有限公司 Method, device and system for establishing network topology, controlling path and transmitting message

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108880899A (en) * 2018-06-30 2018-11-23 华为技术有限公司 A kind of Generating Network Topology Map and server
CN108880899B (en) * 2018-06-30 2021-10-15 华为技术有限公司 Network topological graph generation method and server
CN114938345A (en) * 2022-06-07 2022-08-23 中国联合网络通信集团有限公司 Link discovery method, device and storage medium
CN114938345B (en) * 2022-06-07 2023-09-29 中国联合网络通信集团有限公司 Link discovery method, device and storage medium

Also Published As

Publication number Publication date
CN105765903B (en) 2019-07-23
CN105765903A (en) 2016-07-13

Similar Documents

Publication Publication Date Title
US9537741B2 (en) Data path performance measurement using test messages in a software defined network
US20200396162A1 (en) Service function chain sfc-based communication method, and apparatus
EP1779568B1 (en) Graceful shutdown of ldp on specific interfaces between label switched routers
WO2021000848A1 (en) Packet forwarding method and packet processing method and apparatus
US9699077B2 (en) Method for determining a packet forwarding path, network device, and control device
EP3395020B1 (en) Shifting network traffic from a network device
WO2018162947A1 (en) Bit indexed explicit replication based multicast for locator identifier separation protocol
US9668160B2 (en) Topology discovery based on SCTP/X2 snooping
WO2020084335A1 (en) Using location indentifier separation protocol to implement a distributed user plane function architecture for 5g mobility
US10812373B2 (en) Data network
EP3522459B1 (en) Prioritized formation of bgp sessions
JP6752141B2 (en) Methods and forwarders for processing packets
EP3058777B1 (en) Topology discovery based on explicit signaling
WO2018219103A1 (en) Method and device for determining link state
CN109039916B (en) Message forwarding method, device and storage medium
JPWO2014069502A1 (en) COMMUNICATION SYSTEM, ROUTE INFORMATION EXCHANGE DEVICE, COMMUNICATION NODE, ROUTE INFORMATION TRANSFER METHOD, AND PROGRAM
WO2016070406A1 (en) Topology discovery method and device
WO2018036453A1 (en) Method for synchronizing topology information in sfc network and routing network element
WO2017079901A1 (en) Routing method and routing device

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: 14905558

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: 14905558

Country of ref document: EP

Kind code of ref document: A1