WO2021213517A1 - 配置路由域标识的方法及设备 - Google Patents

配置路由域标识的方法及设备 Download PDF

Info

Publication number
WO2021213517A1
WO2021213517A1 PCT/CN2021/089451 CN2021089451W WO2021213517A1 WO 2021213517 A1 WO2021213517 A1 WO 2021213517A1 CN 2021089451 W CN2021089451 W CN 2021089451W WO 2021213517 A1 WO2021213517 A1 WO 2021213517A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
routing domain
message
port
domain identifier
Prior art date
Application number
PCT/CN2021/089451
Other languages
English (en)
French (fr)
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 华为技术有限公司
Publication of WO2021213517A1 publication Critical patent/WO2021213517A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/248Connectivity information update
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update

Definitions

  • This application relates to the field of network technology, and in particular to a method and device for configuring a routing domain identifier.
  • network devices can automatically perform topology discovery, networking, routing calculation, and synchronization through a network routing protocol, so as to achieve the effect that nodes in the network can be connected based on Internet protocol (IP).
  • IP Internet protocol
  • a node in the network obtains the topology of the network through a certain mechanism (such as neighbor discovery and synchronization of neighbor information, etc.); then the node calculates the relevant routes to other nodes according to the topology of the network.
  • a certain mechanism such as neighbor discovery and synchronization of neighbor information, etc.
  • the failure can be synchronized to all nodes through a certain mechanism; then each node recalculates the topology according to the latest topology.
  • the above-mentioned divided areas can also be called routing domains.
  • the general method of dividing routing domains is for example, manually or outside the network management and control equipment (such as network controller, network management or server, etc.) to issue related configuration node by node.
  • the management and control device can configure the running routing protocol for each node in the network. Further, the management and control device can set the routing domain to which each node belongs for each node in the network, as shown in Figure 1.
  • Area 0 area 0
  • area 1 area 1
  • area 2 area 2
  • the present application provides a method and device for configuring a routing domain identifier, which effectively improves the efficiency of configuring the routing domain identifier and improves the efficiency of dividing the routing domain.
  • the present application provides a method for configuring a routing domain identifier, the method comprising: a first node obtains the routing domain identifier of a first port of the first node, and sends a first message to the second node through the first port ;
  • the first message carries a first routing domain identifier, the first routing domain identifier is the routing domain identifier of the first port, and the first message is used to instruct the second node to configure the routing domain identifier of the second port of the second node Is the first routing domain identifier, and the second port is the port through which the second node receives the first message.
  • the first routing domain identifier may be generated by the first node; or, it may also be obtained by the first node from other nodes.
  • the second node can learn the first routing domain identifier obtained by the first node through the exchange of messages between the first node and the second node, so as to configure the routing domain identifier of the second port as the first node.
  • a routing domain identifier Compared with the method in which each node divides the routing domain through the management and control device, and sends the routing domain identifier after dividing the routing domain to configure the routing domain identifier, the method avoids the node waiting for the manual or the management and control device to issue the routing domain identifier.
  • Nodes can learn routing domain identifiers from each other. When the nodes in the network agree upon negotiation, the purpose of automatically dividing routing domains is realized, and the efficiency of node configuration of routing domain identifiers is improved.
  • the method further includes: configuring the routing domain identifier of the first port by the first node as the first routing domain identifier.
  • the sequence in which the first node sends the first message and the routing domain identifier configuring the first port is the first routing domain identifier is not limited in the embodiment of the present application. And the order in which the first node obtains the routing domain identifier of the first port of the first node and the routing domain identifier configuring the first port as the first routing domain identifier is not limited.
  • the method further includes: the first node exchanges routing information with the second node according to the first routing domain identifier .
  • the routing domain identifier may be used to determine the routing mode; or, to determine the range of the routing domain (or the boundary of the routing domain, etc.) for nodes to exchange routing information.
  • the first routing domain identifier may be used to indicate a routing domain range in which the first node and the second node exchange routing information. The first node exchanges routing information with the second node according to the first routing domain identifier, which can also be understood as the first node to exchange routing information with the second node through the first routing domain identifier.
  • the method before the first node obtains the routing domain identifier of the first port of the first node, the method further includes: the first node determines that the role information of the first node relative to the second node is a domain Generate roles.
  • the first node may obtain the routing domain identifier of the first port according to the node type of the first node and the node type of the second node.
  • the first node may also obtain the routing domain identifier of the first port when determining that its role information relative to the second node is a domain generation role.
  • the first node may also determine that its role information relative to the second node is the domain generation role before acquiring the routing domain identifier of the first port.
  • the first node may determine that its role information relative to the second node is the domain generation role before sending the first message.
  • the first node is an edge node, and the first node configures the routing domain identifiers of all ports of the first node as the first routing domain identifiers.
  • the first node when the first node has a domain generation role relative to the second node, and the first node is an edge node, the first node may configure the routing domain identifiers of all its ports as the first routing domain identifier.
  • the first node is an edge node
  • the first routing domain identifier is different from the routing domain identifier obtained by other edge nodes in the network.
  • the network includes multiple edge nodes, and the multiple edge nodes all have a domain generating role, then the routing domain identifiers of the multiple edge nodes are different.
  • the network includes multiple (such as three or more) edge nodes, but two (or more) of the multiple edge nodes are not in the domain generation role (such as the connection between the edge node and the root node). Case), the routing domain identities of the two edge nodes may be the same, but the routing domain identities of the two edge nodes may be different from the routing domain identities of other edge nodes.
  • the first node determines that the role information of the first node relative to the second node is the domain generation role, including: the first node obtains the node type of the first node in the network, and the second node is in the The node type in the network; the first node determines that the role information of the first node relative to the second node is the domain generation role according to the node type of the first node and the node type of the second node.
  • the node type may include one or more of a root node, an edge node, a secondary external node, or a common node.
  • the root node can be a core node or a central location of the network.
  • the edge node is not on the shortest path from other nodes to the root node, and the other nodes are nodes other than the edge node and the root node in the network.
  • the secondary external node is on the shortest path from the edge node to the root node, and the secondary external node is connected to the edge node; ordinary nodes are nodes other than the root node, edge nodes, and secondary external nodes in the network.
  • node type of a node there may be one node type of a node; or, there may be more node types of a node.
  • the node type of a certain node in the network may be a secondary external node or a normal node.
  • the first node obtains the node type of the first node in the network and the node type of the second node in the network, including: the first node obtains the node type of the first node; and receiving from A second message of the second node, where the second message carries the node type of the second node.
  • the first node may obtain its node type according to the network topology.
  • the first node acquiring the node type of the first node in the network and the node type of the second node in the network includes: the first node receives the fifth message from the root node, and the first node Five messages carry the node type of the first node; and a second message received from the second node, the second message carrying the node type of the second node.
  • the node type of the first node is a root node; or, the node type of the first node is an edge node.
  • the first routing domain identifier may be generated by the first node.
  • the node type of the first node is a normal node
  • the node type of the second node is a secondary node or a normal node.
  • the first routing domain identifier may be generated by another node (such as a root node or an edge node), that is, the first routing domain identifier may be obtained by the first node from other nodes.
  • the node types include first-level nodes and second-level nodes.
  • the node type also includes a third-level node. It can be understood that the first-level node, the second-level node, and the third-level node may also include other names, etc., which are not limited in the embodiment of the present application.
  • the first node sending the first message to the second node through the first port includes: when the network topology changes, the first node sends the first message to the second node through the first port The first message; where the first node and/or the second node are nodes whose node types have changed; or, the first node and/or the second node are newly-added nodes.
  • the routing domain identifier of one or more ports of the node whose node type has changed is reconfigured.
  • the routing domain identifier of the first port and/or the second port may be reconfigured.
  • the routing domain identifier of the port where the first node communicates with the fourth node may not be reconfigured.
  • the technical solution provided in this application avoids the re-division of routing domains in the entire network, and by adjusting the routing domain identifiers of a small number of nodes, it is possible to re-deploy the routing domain of the network, improve the efficiency of redeployment, and improve the dynamic adaptability of the network .
  • the present application provides a method for configuring a routing domain identifier.
  • the method includes: a second node receives a first message from a first node through a second port, the first message carries the first routing domain identifier, and the The first message is used to instruct the second node to configure the routing domain identification of the second port of the second node as the first routing domain identification, the routing domain identification of the first port of the first node is the first routing domain identification, and the first port is The port through which the first node sends the first message; the second node configures the routing domain identifier of the second port as the first routing domain identifier.
  • the method further includes: the second node exchanges routing information with the first node according to the first routing domain identifier .
  • the method before the second node configures the routing domain identifier of the second port as the first routing domain identifier, the method further includes: the second node determines that the role information of the second node relative to the first node is Domain learning role.
  • the second node determines that the role information of the second node relative to the first node is a domain learning role, including: the second node obtains the node type of the second node in the network, and the first node is in the The node type in the network; and then the second node determines the role information of the second node relative to the first node as the domain learning role according to the node type of the second node and the node type of the first node.
  • the second node obtains the node type of the second node in the network and the node type of the first node in the network, including: the second node obtains the node type of the second node; and receiving data from The fourth message of the first node, the fourth message carries the node type of the first node.
  • the second node acquiring the node type of the second node in the network and the node type of the first node in the network includes: the second node receives the seventh message from the root node, and the seventh node The message carries the node type of the second node; and a fourth message is received from the first node, and the fourth message carries the node type of the first node.
  • the node type includes one or more of the root node, edge node, sub-external node, or ordinary node; wherein, the edge node is not on the shortest path from other nodes to the root node, and other nodes are Nodes in the network other than the edge node and the root node; the secondary external node is on the shortest path from the edge node to the root node, and the secondary external node is connected to the edge node; the ordinary node is one of the root node, edge node, and secondary external node in the network Outside the node.
  • the node types include first-level nodes and second-level nodes.
  • the node type also includes a third-level node.
  • the node type of the first node is a root node; or, the node type of the first node is an edge node; or, the node type of the first node is a normal node, and the node type of the second node is Sub-external node or ordinary node.
  • the method further includes: the second node sends an eighth message to the third node through the third port, the eighth message carries the first routing domain identifier, and the eighth message is used to indicate to the third node Configure the routing domain ID of the fourth port of the third node as the first routing domain ID, and the routing domain ID of the third port as the first routing domain ID; the second node configures the routing domain ID of the third port as the first routing domain ID .
  • the first node may include node 1 (root node), the second node may include node 3 (secondary extra/normal node) or node 4 (secondary extra/normal node), and the third node Can include node 7 (secondary extra node).
  • the first node may include node 20 (root node), the second node may include node 22 (ordinary node), and the third node may include node 24 (secondary node).
  • the second node receives the first message from the first node through the second port, including:
  • the second node receives the first message from the first node through the second port; wherein the first node and/or the second node are nodes whose node types have changed; or, the first node The first node and/or the second node are newly added nodes.
  • this application provides a network device for executing the first aspect or any possible implementation of the first aspect.
  • the network device includes a corresponding unit that executes the method in the first aspect or any possible implementation of the first aspect.
  • the network device may include a transceiver unit and a processing unit.
  • the network device may be the first node in the foregoing first aspect.
  • this application provides a network device for executing the second aspect or the method in any possible implementation manner of the second aspect.
  • the network device includes a corresponding unit that executes the second aspect or the method in any possible implementation of the second aspect.
  • the network device may include a transceiver unit and a processing unit.
  • the network device may be the second node in the above second aspect.
  • the present application provides a network device that includes a processor, configured to execute a program stored in a memory, and when the program is executed, the network device is caused to execute the above-mentioned first aspect or the first aspect. Any possible implementation of the method shown.
  • the memory is located outside the aforementioned network device.
  • the memory is located in the aforementioned network device.
  • the network device further includes a transceiver, and the transceiver is used to receive a signal or send a signal.
  • the transceiver may be used to send the first message.
  • the transceiver can also be used to receive the second message or the fifth message.
  • the network device may be the first node in the foregoing first aspect.
  • the present application provides a network device that includes a processor, configured to execute a program stored in a memory, and when the program is executed, the network device is caused to execute the second aspect or the second aspect described above. Any possible implementation of the method shown.
  • the memory is located outside the aforementioned network device.
  • the memory is located in the aforementioned network device.
  • the network device further includes a transceiver, and the transceiver is used to receive a signal or send a signal.
  • the transceiver may be used to receive the first message.
  • the transceiver can also be used to receive the fourth message or the seventh message.
  • the network device may be the second node in the second aspect described above.
  • the present application provides a network device, the network device includes a processing circuit and an interface circuit, the processing circuit is used to obtain the routing domain identifier of the first port; the interface circuit is used to output the first port through the first port A message; the processing circuit is also used to configure the routing domain identifier of the first port.
  • the processing circuit is further configured to determine that the role information of the network device relative to the second node is a domain generation role.
  • the interface circuit is also used to obtain the node type of the network device in the network and the node type of the second node in the network; and the processing circuit is also used to obtain the node type of the network device and the value of the second node.
  • the node type determines that the role information of the network device relative to the second node is the domain generation role.
  • the processing circuit is also used to obtain the node type of the network device in the network
  • the interface circuit is also used to obtain the node type of the second node in the network
  • the processing circuit is also used to obtain the node type of the network device and
  • the node type of the second node determines that the role information of the network device relative to the second node is the domain generation role.
  • the interface circuit may also be used to obtain the second message or the fifth message.
  • the network device may be the first node in the foregoing first aspect. It can be understood that, for the description of the first message, the second message, or the fifth message, reference may be made to the first aspect, which will not be described in detail here.
  • the present application provides a network device, the network device includes a processing circuit and an interface circuit, the interface circuit is used to obtain a first message; the processing circuit is used to configure the routing domain identifier of the second port.
  • the processing circuit is also used to determine that the role information of the network device relative to the first node is a domain learning role.
  • the interface circuit is also used to obtain the node type of the network device in the network and the node type of the first node in the network; the processing circuit is also used to obtain the node type of the network device and the node of the first node The type determines that the role information of the network device relative to the first node is the domain learning role.
  • the processing circuit is also used to obtain the node type of the network device in the network; the interface circuit is also used to obtain the node type of the first node in the network; the processing circuit is also used to obtain the node type and the node type of the network device The node type of the first node determines that the role information of the network device relative to the first node is a domain learning role.
  • the interface circuit may also be used to obtain the fourth message or the seventh message, etc.
  • the interface circuit may also output an eighth message and so on.
  • the network device may be the second node in the above second aspect. It can be understood that, for the description of the first message, the fourth message, the seventh message, or the eighth message, reference may be made to the second aspect, which will not be described in detail here.
  • the present application provides a role determination device, which is used to obtain the node type of the local node according to the network topology.
  • the role determination device includes a processing circuit and an interface circuit, the interface circuit can be used to obtain the network topology, and the processing circuit can be used to determine the node type of the local node according to the network topology.
  • the local node may include a first node or a second node.
  • the role determining device is used to obtain the node type of each node in the network according to the network topology.
  • the role determination device includes a processing circuit and an interface circuit, the interface circuit can be used to obtain the network topology, and the processing circuit can be used to determine the node type of each node according to the network topology.
  • this application provides a computer-readable storage medium, which is used to store a computer program. When it runs on a computer, the first aspect or any possible implementation of the first aspect The method shown is executed.
  • the present application provides a computer-readable storage medium for storing a computer program. When it runs on a computer, it enables any possible implementation of the above-mentioned second aspect or the second aspect The method shown in the method is executed.
  • this application provides a computer program product, the computer program product includes a computer program or computer code, when it runs on a computer, the first aspect or any possible implementation of the first aspect is shown in The method is executed.
  • this application provides a computer program product, which includes a computer program or computer code, which when it runs on a computer, makes the above-mentioned second aspect or any possible implementation of the second aspect as shown in The method is executed.
  • the present application provides a computer program.
  • the computer program runs on a computer, the method shown in the first aspect or any possible implementation of the first aspect is executed.
  • the present application provides a computer program.
  • the computer program runs on a computer, the method shown in the second aspect or any possible implementation of the second aspect is executed.
  • the present application provides a routing autonomous system.
  • the routing autonomous system includes a first node and a second node.
  • the first node is used to execute the foregoing first aspect or any possible implementation manner of the first aspect.
  • the second node is used to execute the method shown in the foregoing second aspect or any possible implementation manner of the second aspect.
  • the routing autonomous system further includes a third node, the third node is configured to receive the eighth message sent by the second node, and configure the routing domain identifier of the fourth port of the third node as The first routing domain identifier.
  • FIG. 1 is a schematic diagram of a scenario for dividing routing domains according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for configuring a routing domain identifier provided by an embodiment of the present application
  • Figure 3a is a schematic structural diagram of a network provided by an embodiment of the present application.
  • Figure 3b is a schematic structural diagram of a network provided by an embodiment of the present application.
  • Figure 3c is a schematic structural diagram of a network provided by an embodiment of the present application.
  • Fig. 4a is a schematic flowchart of a method for configuring a routing domain identifier provided by an embodiment of the present application
  • FIG. 4b is a schematic flowchart of a method for configuring a routing domain identifier according to an embodiment of the present application
  • FIG. 4c is a schematic flowchart of a method for configuring a routing domain identifier according to an embodiment of the present application
  • FIG. 5a is a schematic diagram of a scenario for dividing routing domains corresponding to FIG. 3a provided by an embodiment of the present application;
  • FIG. 5b is a schematic diagram of a scenario for dividing routing domains corresponding to FIG. 3b according to an embodiment of the present application
  • FIG. 5c is a schematic diagram of a scenario for dividing routing domains corresponding to FIG. 3c according to an embodiment of the present application
  • FIG. 5d is a schematic diagram of a scenario for dividing routing domains according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a method for configuring a routing domain identifier provided by an embodiment of the present application
  • Figure 7a is a schematic diagram of a scenario for dividing routing domains provided by an embodiment of the present application.
  • Figure 7b is a schematic diagram of a scenario for dividing routing domains provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • Fig. 11 is a schematic diagram of a routing autonomous system provided by an embodiment of the present application.
  • At least one (item) refers to one or more
  • “multiple” refers to two or more than two
  • “at least two (item)” refers to two or three and three
  • “and/or” is used to describe the association relationship of associated objects, which means that there can be three kinds of relationships.
  • a and/or B can mean: there is only A, only B, and both A and B. In this case, A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects before and after are in an “or” relationship.
  • "The following at least one item (a)” or similar expressions refers to any combination of these items.
  • at least one of a, b, or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c” ".
  • a routing autonomous system In the network, a routing autonomous system is a small unit that has the power to independently decide which routing protocol to use in the routing autonomous system. In other words, all routers in a routing autonomous system can run the same routing protocol, etc., and the routing protocols run by different routing autonomous systems can be the same or different.
  • a routing autonomous system includes one or more routing domains. It can be understood that the network shown in the embodiments of the present application can be understood as a routing autonomous system.
  • Routing domain identification used to identify routing domains; alternatively, different routing domains can be distinguished through the routing domain identification.
  • different nodes in a routing domain can exchange routing information according to the routing domain identifier of the routing domain.
  • routing information may be exchanged according to the boundary nodes of the two routing domains.
  • routing domain identifiers shown in this application may also be referred to as routing domain numbers, routing domain identifiers, domain numbers, or domain identifiers.
  • Routing information can be stored in routing table (routing table) or routing information base (routing information base, FIB), etc.
  • the routing information can be used to instruct the network device to perform routing query or path selection on the message.
  • the routing information can be used to indicate how to select a path from the source to the destination when the message is forwarded in the network.
  • Domain learning role used to learn the routing domain ID sent by other nodes, so as to configure the learned routing domain ID for the port (port between other nodes).
  • Domain generation role used to generate routing domain identification.
  • the domain generation role can send the generated routing domain identification to other nodes; in other implementation manners, the domain generation role can diffuse the learned routing domain identification to other nodes.
  • a certain node in the network can be a domain generation role; in other implementations, the certain node can also be a domain learning role; in still other implementations, the certain node It can also be both a domain generation role and a domain learning role.
  • the first message a node receives the first message sent by another node, then the one node can learn the routing domain identifier carried in the first message to configure the routing domain of the port (that is, the port that receives the first message)
  • the identifier is the routing domain identifier carried in the first message.
  • the function of the first message may be to instruct the node receiving the first message to learn the routing domain identifier carried in the first message.
  • nodes in the network need to configure routing domain identifiers according to the routing domain identifiers uniformly issued by the management and control device, so as to achieve the purpose of dividing routing domains. Furthermore, when the network increases to a certain size, the management and control equipment not only needs to consider the topology of each node, but also needs to consider the interface type, traffic distribution and direction, etc., resulting in low efficiency of the management and control equipment in issuing routing domain identifications. , The node configuration routing domain identification is inefficient. Especially when the topology of the network changes or the network is expanded or reduced, the management and control equipment needs to re-plan the routing domain identification.
  • the present application provides a method for configuring routing domain identification, which avoids the management and control equipment from sending routing domain identifications one by one, configuring domain attribution information, improving the communication efficiency of the control plane or the management plane, and reducing the control plane or the management plane. load. Further, the nodes in the network can learn routing domain identifiers from each other, thereby realizing the purpose of automatically dividing routing domains and improving the efficiency of node configuration of routing domain identifiers.
  • the method provided in this application can be applied to enterprise networking scenarios, and also applicable to campus networks, campus networks, data centers, and other networking scenarios.
  • the network generally exists in layers.
  • the core layer may be regarded as the uppermost node
  • the access layer may be regarded as the lowermost node
  • the lowermost node may be closer to the terminal device.
  • the closer to the level of terminal equipment the greater the number of fan-out links of the node.
  • the general direction of network expansion is to increase the convergence layer or access layer vertically to expand the scale.
  • the enterprise networking, campus network, campus network, or data center shown above can be understood as the routing autonomous system introduced above.
  • the network shown in Figure 1 can be understood as a routing autonomous system.
  • the areas 0, area1, and area2 divided in Figure 1 can be understood as three routing domains, and 0, 1, 2 can be understood as routing domain identifiers. .
  • the network needs to be divided into routing domains, so that nodes in a routing domain can exchange routing information.
  • the method provided in this application can be applied to routing protocols, which include open shortest path first (OSPF) routing protocol, intermediate system-to-intermediate system (intermediate system-to-intermediate system, IS- IS) routing protocol, interior gateway routing protocol (interior gateway routing protocol, IGRP), etc.
  • OSPF open shortest path first
  • IS- IS intermediate system-to-intermediate system
  • IGRP interior gateway routing protocol
  • the method for configuring the routing domain identifier provided in this application can be applied to the first node and the second node in the network.
  • the first node and the second node may be network equipment, and the network equipment may include a switch, a router, or a wireless access device. Point (access point, AP), etc.
  • Point access point, AP
  • the embodiment of the present application does not limit the specific types of the first node and the second node.
  • FIG. 2 is a schematic flowchart of a method for configuring a routing domain identifier according to an embodiment of the present application. As shown in Figure 2, the method includes:
  • the first node obtains the routing domain identifier of the first port of the first node.
  • the routing domain identification of the first port may be the first routing domain identification, that is, the first node may obtain the first routing domain identification.
  • the first routing domain ID is used to distinguish other routing domain IDs in the network. As long as the routing domain IDs in the network do not overlap (or are different from each other), the embodiment of the present application does not limit the generation algorithm of the first routing domain ID.
  • the first routing domain identifier may be the device number of the node, the physical address or IP address of the node, and so on.
  • the first routing domain identifier can be generated according to the provisions of the routing protocol.
  • the first routing domain identifier may be generated by the first node.
  • the first routing domain identifier may be the device number, physical address, or IP address of the first node; or, the first routing domain identifier may also be the device number, physical address of the peer node connected to the first node Or IP address, etc.
  • the first node may also determine that the role information of the first node relative to the second node is the domain generation role, thereby generating the first routing domain identifier.
  • the first node may also obtain its node type and the node type of the second node, and generate the first routing domain identifier according to the node type of the first node and the node type of the second node.
  • the first routing domain identifier may be generated by another node, and sent to the first node through the other node.
  • the other nodes are nodes other than the first node and the second node in the network.
  • the first node may also determine that the role information of the first node with respect to the second node is the domain generation role, so as to send the first message to the second node. information.
  • the first node may also obtain its node type and the node type of the second node, and send the first message to the second node according to the node type of the first node and the node type of the second node.
  • acquiring the first routing domain identifier by the first node includes: the first node generates the first routing domain identifier; or, the first node receives the first routing domain identifier sent by other nodes.
  • the method for generating the first routing domain identifier by the other node may refer to the method for generating the first routing domain identifier by the first node, which will not be described in detail here.
  • FIG. 6 For a detailed description of generating a routing domain identifier or receiving a routing domain identifier sent by other nodes, refer to FIG. 6, which will not be described in detail here.
  • the first node sends a first message to the second node through the first port, the first message carries the first routing domain identifier, and the first message is used to instruct the second node to configure the routing domain of the second port of the second node
  • the identifier is the first routing domain identifier
  • the second port is the port through which the second node receives the first message.
  • the second node receives the first message through the second port.
  • a node may include one or more ports.
  • a node may be connected to multiple nodes, and then the one node may exchange messages with the multiple nodes through multiple ports.
  • first port and second port are only a pair of ports when messages are exchanged between the illustrated nodes, and there may be other ports between the first node and other nodes, which are not limited in the embodiment of the present application.
  • the other nodes are nodes other than the first node and the second node in the network.
  • the first node and the second node are also applicable to the method provided in the embodiment of the present application.
  • the multiple ports may be understood as one logical port; or, the first node may be connected to the second node through one of the paths, etc., which is not limited in the embodiment of the present application.
  • the first message is used to instruct the second node to configure the routing domain identifier of the second port as the first routing domain identifier. That is, after the second node receives the first message, the second node can learn the routing domain identifier of the first port, so as to set the routing domain identifier of the second port as the first routing domain identifier.
  • the second node may directly learn the first routing domain identifier (as in step 204).
  • the second node may also determine whether to learn the first routing domain identifier according to some conditions.
  • the second node determines that the role information of the second node relative to the first node is a domain learning role
  • the second node learns the first routing domain identifier.
  • the second node may also determine whether to learn the first routing domain identifier according to its node type and the node type of the first node (for example, whether to configure the routing domain identifier of the second port as the first routing domain identifier).
  • the method for the second node to determine its role information and the method for the second node to obtain its node type and the node type of the first node please refer to FIG. 4a and FIG. 4c, which will not be described in detail here.
  • the first node may send the first message to the second node at a preset time interval; or, the first node may also send the first message to the second node at a preset frequency.
  • the specific value of the preset time interval or preset frequency is not limited in this embodiment of the application.
  • the preset time interval or preset frequency may be set by the first node, other nodes, or manually.
  • the other node may be a node other than the first node in the network.
  • the first node may also send the first message to the second node when the topology of the network changes.
  • the first node and/or the second node may be newly added nodes; or, the first node and/or the second node may be nodes whose topological structure has changed (such as nodes whose node types have changed, etc.), etc. .
  • the first node can send the first message to the second node through the first port.
  • the first node may also send the first message to the second node through the first port.
  • the first node configures the routing domain identifier of the first port as the first routing domain identifier.
  • step 202 does not limit the sequence of step 202 and step 203.
  • step 201 does not limit the sequence of step 201 and step 203.
  • the second node configures the routing domain identifier of the second port as the first routing domain identifier.
  • the method shown in FIG. 2 may further include:
  • the first node exchanges routing information with the second node according to the first routing domain identifier.
  • the second node exchanges routing information with the first node according to the first routing domain identifier.
  • the first node and the second node may be two adjacent nodes in the network.
  • the first node may send the first message to the adjacent node (such as the second node).
  • the first node may send the first message to a node adjacent to the uplink; or, the first node may also send the first message to a node adjacent to the uplink.
  • the first node and the second node may not be adjacent.
  • the first node may send the first message to multiple nodes, as to whether the multiple nodes learn the first route
  • the domain identifier can be determined according to the conditions shown in the embodiments of the present application.
  • the multiple nodes may determine whether to learn the first routing domain identifier according to respective node types, neighboring nodes, or node types of the first node.
  • the second node can learn the first routing domain identifier (that is, the routing domain identifier of the first port) obtained by the first node, thereby configuring The routing domain identifier of the second port is the first routing domain identifier.
  • the node waits for the manual or the management and control device to issue the routing domain identification.
  • Nodes can learn routing domain identifiers from each other. When the nodes in the network agree upon negotiation, the purpose of automatically dividing routing domains is realized, and the efficiency of node configuration of routing domain identifiers is improved.
  • the node types may include first-level nodes and second-level nodes.
  • the node type of each node in the network may be determined by the root node; or, determined by other nodes, etc., which are nodes other than the root node in the network.
  • the node type of each node in the network may also be determined by related equipment, etc. The embodiment of the present application does not limit how to determine the node type of the node.
  • the node type of the first node may be a first-level node
  • the node type of the second node may be a second-level node, so that the second node can learn the first routing domain sent by the first node through the first message ID, so that the routing domain ID of the second port is configured as the first routing domain ID.
  • the node type may also include a third-level node.
  • the first-level node After the first-level node generates the routing domain identifier, such as the second routing domain identifier, it sends a message carrying the second routing domain identifier to the third-level node. Then the routing domain identifier of the third-level node configuration port (the port that receives the second routing domain identifier) is the second routing domain identifier, and at the same time, the third-level node can also diffuse the second-level node it learns to the second-level node. Routing domain ID. After the second-level node receives the second routing domain identifier, the routing domain identifier of the configuration port (the port that receives the second routing domain identifier) is the second routing domain identifier.
  • the node After the node knows its node type and the node type of neighboring nodes, it can generate a routing domain identifier; or learn a routing domain identifier, etc.
  • first-level nodes, second-level nodes, and third-level nodes shown above are only examples, and the embodiments of the present application do not limit their names.
  • the first-level node may also be called a type A node
  • the second-level node may also be called a type B node
  • the third-level node may also be called a type C node.
  • the node types may include root nodes, edge nodes, secondary external nodes, and ordinary nodes.
  • the method provided by the present application will be illustrated by taking node types including root nodes, edge nodes, secondary external nodes, and ordinary nodes as examples.
  • the root node can be a core node in the network; or, it can be a central location in the network. For example, when most nodes in the network visit each other, the most nodes need to pass through the root node. For another example, the mean square error of the shortest path from the root node to other nodes is the smallest. In other words, the root node is the point with the smallest mean square error of the shortest path from other nodes in the network. Exemplarily, the root node may be manually configured; or, the root node may also be designated by other equipment or devices, etc.; or, the root node may also be determined through related negotiation and competition, etc. The embodiment of the present application determines the root node The method is not limited.
  • the other nodes are nodes other than the root node in the network.
  • one or more root nodes may be included in the network.
  • the network includes multiple root nodes, that is, the shortest path from other nodes in the network to the multiple root nodes has the smallest mean square error.
  • the multiple root nodes may have a short distance from each other. Therefore, in a possible implementation manner, the multiple root nodes may be a root node cluster relative to other types of nodes in the network. In other words, when other types of nodes send a message to one of the multiple root nodes, the message is sent to the root node cluster. As to whether the message is specifically sent to a certain root node, the embodiment of the present application does not limit it.
  • Edge nodes are not on the shortest path from other nodes to the root node.
  • the edge node may be connected to the terminal device; or, the edge node may be the most edge node in the network, that is, the downlink of the edge node may not be connected to other devices.
  • the downlink of the edge node may also be connected to other nodes, etc.
  • the embodiment of the present application does not limit whether the downlink of the edge node is connected to a terminal device or other nodes.
  • the method for determining an edge node may include: for node i in the network, calculating the shortest path from node i to the root node, when node i is not on the shortest path from other nodes to the root node, then node i is Edge node.
  • Other nodes are nodes in the network except node i and the root node.
  • the node i when there is one and only one node i in the network, the node i can be either a root node or an edge node.
  • the secondary external node is located on the shortest path from the root node to the edge node.
  • the secondary foreign node is usually connected to the edge node.
  • the secondary foreign node may be located on the uplink of the edge node.
  • the method for determining the secondary external node may include: for a node i in the network, when there is at least one edge node j in the network, and the node i is located on at least one shortest path from the node j to the root node, then the node i It is a secondary external node. Further, there is at least one direct link between the node i and the node j.
  • Ordinary nodes which can be nodes other than the above-mentioned root nodes, edge nodes, and secondary nodes in the network. Ordinary nodes can play the role of connecting the root node, other ordinary nodes or sub-external nodes in the network.
  • the method for determining a common node may include: for a node i in the network, when the node i is not a root node, is not an edge node, and is not a secondary external node, the node i is a common node.
  • node i is not a root node, not an edge node, and there is a node j as a secondary external node, and node i is located on the shortest path from node j to the root node, then node i is a normal node.
  • the aforementioned node i is any one of a root node, an edge node, a secondary external node, and a common node.
  • the aforementioned node i may have multiple node types.
  • the node i can be a secondary external node; relative to the secondary external node, the node i can also be a normal node.
  • FIG. 3a is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • node 8 is not on the shortest path from other nodes to the root node (ie, node 1), so this node 8 is an edge node.
  • node 2, node 5, and node 6 are all edge nodes.
  • the node 7 is located on the shortest path from the node 8 to the root node, and the node 7 is connected to the edge node (node 8), so the node 7 is a secondary external node.
  • the shortest path from node 8 to the root node can be node 8->node 7->node 4->root node; or node 8->node 7->node 3->root node.
  • node 3 is located on the shortest path from node 5 or node 6 to the root node, so node 3 is a secondary external node.
  • the node 3 is located on the shortest path from the second outer node (ie, the node 7) to the root node, and the node 3 is not the root node, so the node 3 is a normal node.
  • node 4 is a secondary external node.
  • node 4 is a normal node.
  • the uplink of node 2 (edge node) is connected to the root node, and the downlink is connected to terminal equipment.
  • the uplink of the node 8 is connected to the secondary external node, and the downlink may not be connected to the terminal device.
  • the node 8 can be called the most edge node in the network.
  • the uplink of node 5 or node 6 connects node 3 and node 4, and the downlink connects terminal equipment.
  • the uplink of node 7 connects node 3 and node 4, and the downlink connects edge node (ie, node 8).
  • the uplink or downlink shown in this application is relative to the direction of the shortest path from other nodes to the root node.
  • the node 7 is located on the shortest path from the node 8 to the root node, so the node to which the uplink connection of the node 8 is connected is the node 7.
  • the node 3 is located on the shortest path from the node 3 to the root node, so the node connected to the uplink of the node 3 is the root node; correspondingly, the node connected to the downlink of the node 3 is the node 6 or the node 5. It can be understood that the embodiment of the present application does not limit the definition of the uplink or the downlink.
  • FIG. 3b is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • the network includes a two-layer node networking.
  • the nodes in the network may include root nodes and edge nodes.
  • the root node 10 may be connected to the edge node 11, the edge node 12, the edge node 13, or the edge node 14.
  • FIG. 3c is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • the method of determining the node type includes: 1) Determining the node 20 as the root node.
  • the shortest paths from the root node to other nodes v are: node 20->node 21, node 20->node 21->node 23, node 20->node 22, node 20->node 22 ->node 24, node 20->node 22->node 24->node 25.
  • the node 21 is directly connected to the root node, and node 21 is located on the shortest path from node 23 to the root node (node 20 -> node 21 -> node 23), then the node 21 is not an edge node, it may be a normal node or a secondary external node. Because the node 21 is located on the shortest path from the node 23 to the root node, the node type of the node 21 depends on the node type of the node 23. Therefore, the node type of the node 23 can be determined first. Since the node 23 is not on the shortest path from other nodes to the root node, the node type of the node 23 is an edge node, and the node type of the node 21 can be determined as a secondary external node.
  • node 25 is not on the shortest path from other nodes to the root node, so node 25 is an edge node.
  • the node 24 is located on the shortest path from the node 25 to the root node (node 20 -> node 22 -> node 24 -> node 25), and is connected to the node 25, so the node type of the node 24 is the second outer node.
  • the node 22 is located between the secondary outer node and the root node, and the node 22 is not connected to an edge node, so the node 22 is a normal node.
  • the above method of determining the node type of a node in the network is only an example.
  • the method for determining the node type of each node in the network can be executed by the root node and/or other nodes, etc., which is not limited in the embodiment of the present application.
  • the method of determining the node type reference may be made to the methods shown in FIGS. 4a to 4c.
  • the method for determining the node type is shown above, and the method for determining the role information when different nodes are connected is described in detail below.
  • the role information of the root node is the domain generation role, and the other nodes need to learn the routing domain identifier obtained from the root node.
  • the other nodes include edge nodes, secondary external nodes, or ordinary nodes.
  • the root node may send the generated routing domain identifier to an adjacent node; or, the root node may also send the generated routing domain identifier to the last external node or common node on the downlink.
  • node 1 has a role for domain generation relative to node 2, node 3, and node 4.
  • the node 1 may send the generated routing domain identifier to the node 2, the node 3, and the node 4; or, the node 1 may also send the generated routing domain identifier to the node 7.
  • the node 7 can determine the routing domain identifier of the port connected to the node 4 according to the node type of the uplink node 4 and the node type of the downlink node 8.
  • the node 7 can also determine the routing domain identifier of the port connected to the node 3 according to the node type of the uplink node 3 and the node type of the downlink node 8.
  • the routing domain identifiers of all nodes connected to the root node may be routing domain identifiers generated by the root node.
  • the routing protocol specifies that the routing domain where the root node is located is a zero domain, then the routing domain identifier of at least one port of all nodes connected to the root node is zero.
  • the routing domain identifiers of port 4 of node 2, port 5 of node 3, port 13 and port 14 of node 4 are all 0.
  • the routing domain where the root node is located may be determined by the number of edge nodes.
  • the routing domain where the root node is located includes four. Or, when the root node is directly connected to the edge node, the routing domain of the edge node can be the same.
  • node 11, node 12, node 13, node 14 and node 10 can be in the same routing domain, such as The routing domain is identified as area0.
  • the role information of the edge node is the domain generation role, and the other nodes need to learn the routing domain identifier obtained from the edge node.
  • the other nodes include ordinary nodes or sub-external nodes.
  • the edge node may generate a routing domain identifier.
  • the routing domain identifiers of all ports of the edge node may be the routing domain identifiers generated by the edge node.
  • the routing domain identifiers of different edge nodes are not the same. As shown in Fig. 3a, node 8 has a domain generation role relative to node 7; node 5 or node 6 has a domain generation role relative to node 3 and node 4.
  • the routing domain ID generated by node 8 is ID 3 (area3)
  • the routing domain ID generated by node 5 is ID 4 (area4)
  • the routing domain ID generated by node 6 is ID 5 (area5).
  • the routing domain identifiers of all ports of the node 8 are identifier 3
  • the routing domain identifiers of all ports of node 5 are identifier 4
  • the routing domain identifiers of all ports of node 6 are identifier 5.
  • the dotted line in FIG. 3a indicates that the node 5 and the node 6 can also be connected, but in the embodiment of the present application, the node 5 and the node 6 are in different routing domains, so the node 5 and the node 6 cannot directly exchange routing information through the routing domain.
  • the dotted line between node 7 and node 6 in Figure 3a indicates that node 6 and node 7 can also be connected, but node 7 is not on the shortest path from node 6 to the root node, so node 6 and node 7 are not in the same routing domain. Exemplarily, when node 6 and node 7 exchange routing information, node 3 or node 4 can exchange routing information.
  • node 11, node 12, node 13, and node 14 belong to different routing domains. Although node 12, node 13 and node 14 can be connected, node 12, node 13 and node 14 are not connected to each other in Figure 5b.
  • the routing information can be directly exchanged through the routing domain.
  • the role information of the root node may be a domain generating role; or, the role information of the edge node may be a domain generating role.
  • the embodiment of the application does not limit the role information of a network similar to FIG. 3b.
  • the routing protocol stipulates that the routing domain must have a zero domain
  • the root node in Figure 3b can act as a domain generation role. In this case, the root node can determine different routing domain IDs, one of which can be 0. If the edge node is used as the domain generation role, since it may not be possible to determine which edge node generates the 0 domain between each other, the root node can be used as the domain generation role.
  • the multiple edge nodes can be a domain learning role.
  • the routing domain identifiers where the multiple edge nodes are located may be determined by the root node. In other words, in this case, the routing domain identifiers where the multiple edge nodes are located may be the same.
  • the edge nodes that are not connected to the root node can generate a routing domain identifier. As shown in Fig. 5d, based on the network shown in Fig.
  • a node 9 is added to the network, and the node 9 is connected to the root node.
  • the routing domain identifier where the node 9 is located is also area0. Since the node 9 and the node 2 have a domain learning role relative to the root node, the routing domain where the node 9 and the node 2 are located is identified as area0 (that is, the same). However, node 5, node 6 and node 8 are domain generation roles, so the routing domain identifiers of node 5, node 6 and node 8 are not the same.
  • the port identification of each node and the routing domain identification other than area0 are not shown in FIG. 5d, but they should not be understood as a limitation to the embodiment of the present application. It is understandable that the port identifier in the embodiment of the present application may also be referred to as a port number, a port number, etc., and the embodiment of the present application does not limit its name.
  • Ordinary nodes can learn the routing domain ID obtained from the root node, and can also send the routing domain ID learned from the root node to other adjacent non-root nodes.
  • node 4 ordinary node
  • node 7 secondary foreign node
  • the node 7 not only needs to learn the routing domain ID obtained from the node 4, but also needs to learn the routing domain ID obtained from the node 8.
  • the node 11, the node 12, the node 13, and the node 14 can respectively learn the routing domain identifier obtained from the root node.
  • the common node may also be connected to the common node.
  • the routing domain identifiers to which the two common nodes belong may be determined by the root node.
  • the common node that first learns the routing domain identifier can spread the learned routing domain identifier to another common node.
  • any one of the routing domain identifiers can be used as the routing domain identifier of the connection port between the two common nodes.
  • the routing domain identifiers of all ports of the root node may be generated by the root node. If an edge node is connected to a terminal device, the routing domain identifier of the port connected to the terminal device may be the same as the routing domain identifier of the edge node, etc., which is not limited in the embodiment of the present application.
  • the routing domain ID of the port connected to the terminal device can be the same as the routing domain ID of the edge node; or, it can be the same as the routing domain ID of the root node or ordinary node, etc., this application The embodiment does not limit this.
  • FIG. 4a is a schematic flowchart of a method for configuring a routing domain identifier according to an embodiment of the present application. This method can be applied to the first node, as shown in Figure 4a, the method includes:
  • the method shown in FIG. 4a includes step 411 and step 412.
  • the first node obtains the node type of the first node in the network and the node type of the second node in the network.
  • step 411 the three methods shown in FIG. 4b can be referred to, which are respectively shown below.
  • the first node receives a fifth message from the root node, where the fifth message carries the node type of the first node;
  • the first node receives a second message from the second node, and the second message carries the node type of the second node.
  • the node type of the first node may be an edge node
  • the node type of the second node is a secondary node or a normal node except the edge node and the root node.
  • the first routing domain identifier may be generated by the first node, so that the first node sends the first message to the second node.
  • the node type of the first node may be a normal node, and the node type of the second node is a secondary node or a normal node.
  • the first routing domain identifier may be obtained by the first node from other nodes.
  • the first routing domain identifier may be obtained by the first node from the root node; alternatively, it may be obtained from other ordinary nodes. Thereby the first node can send the first message to the second node.
  • the fifth message may also carry the port identifier of the uplink from the first node to the root node.
  • the second message may also carry the uplink port identifier, such as the second port. It can be understood that the embodiment of the present application does not limit whether the fifth message or the second message carries the port identifier.
  • the root node obtains the node type of other nodes according to the topology of the network, and sends the node type of the other node to the other node.
  • the root node determines or calculates the node type uniformly, which is simple and feasible, and improves other nodes. Get the efficiency of the node type.
  • the first node obtains the node type of the first node
  • the first node receives a second message from the second node, and the second message carries the node type of the second node.
  • the first node may obtain the node type of the first node in the network according to the network topology.
  • the first node may obtain the node type of the first node according to the methods shown in FIG. 3a to FIG. 3c.
  • the second node can also obtain the node type of the second node in the network according to the network topology, so that the second node can send a node type notification message (ie, the second message) to the first node.
  • the first node may also obtain the node type of the first node according to the connection relationship between the first node and the adjacent node
  • the second node may also obtain the node type according to the connection relationship between the second node and the adjacent node Get the node type of the second node.
  • the embodiment of the present application does not limit how the first node obtains the node type of the first node. It can be understood that the embodiment of the present application does not limit the method for how the second node learns its node type.
  • the second node can obtain the node type of the second node from the root node.
  • the node type of the first node may be a root node, and the node type of the second node is an edge node, a secondary node, or a common node other than the root node.
  • the node type of the first node is an edge node
  • the node type of the second node is a secondary node or a normal node except the edge node and the root node.
  • the first routing domain identifier may be generated by the first node, so that the first node sends the first message to the second node.
  • the node type of the first node is a normal node
  • the node type of the second node is a secondary node or a normal node.
  • the first routing domain identifier may be obtained by the first node from other nodes.
  • the first routing domain identifier may be obtained by the first node from the root node; alternatively, it may be obtained from other ordinary nodes.
  • the first node can send the first message to the second node.
  • the first node receives a third message from the root node, and the third message carries the node type of the first node and the node type of the second node.
  • the root node may deliver the third message in the form of broadcast, that is, the third message may carry the node type of each node in the network.
  • the root node can obtain the node type of each node in the network according to the network topology.
  • the root node can obtain the node type of each node according to the method shown in FIG. 3a to FIG. 3c.
  • the node type of the first node may be an edge node, and the node type of the second node is a secondary node or a normal node except the edge node and the root node.
  • the node type of the first node is a normal node, and the node type of the second node is a secondary node or a normal node.
  • Method 3 please refer to Method 1 or Method 2, which will not be detailed here.
  • the third message may carry the identification information of the first node and the node type of the first node, as well as the identification information of the second node and the node type of the second node. Therefore, after each node receives the third message, it can learn its own node type according to the identification information.
  • the third message may also carry the port identifier of the first node and the port identifier of the second node.
  • the third message may carry the node type of each node in the network and the port identifier of each node.
  • each node can learn the port identifier connected to other nodes, so that each node can configure the routing domain identifier according to the port identifier and the received routing domain identifier.
  • the first node can learn the port identification of the first port, so that the first node generates the first routing domain identification, and then the routing domain identification of the first port Configure as the first routing domain identifier.
  • the first node sends the first message to the second node, and after receiving the first message, the second node can configure the routing domain identifier of the second port as the first routing domain identifier. It can be understood that the foregoing is only an example, and the embodiment of the present application does not limit whether the third message carries the port identifier.
  • the first node determines, according to the node type of the first node and the node type of the second node, that the role information of the first node relative to the second node is a domain generation role.
  • step 411 For how the first node determines that its role information is the domain generation role, reference may be made to the specific description of step 411, which will not be described in detail here.
  • the first node may perform step 411, and then obtain the first routing domain identifier (that is, the routing domain identifier of the first port);
  • the first node may also perform step 411 and step 412, and then obtain the first routing domain identifier.
  • the first node obtains the routing domain identifier of the first port of the first node.
  • the routing domain identifier of the first port may be the first routing domain identifier.
  • the first node may generate a first routing domain identifier; or, when the first node is a normal node, the first node may receive a sixth message from the root node, the sixth message Carry the first routing domain identifier generated by the root node.
  • the first node sends a first message to the second node through the first port, where the first message carries the first routing domain identifier, and the first message is used to instruct the second node to configure the routing domain of the second port of the second node
  • the identifier is the first routing domain identifier
  • the second port is the port through which the second node receives the first message.
  • the second node receives the first message through the second port.
  • the first message may also carry the node type of the first node; or, the first message may also carry indication information, and the indication information is used to indicate that the role information of the first node relative to the second node is Domain generation role.
  • the second node may determine whether to perform step 418 according to the node type or indication information of the first node.
  • the second node may also determine whether to perform step 418 and so on according to step 416 and step 417.
  • the first node configures the routing domain identifier of the first port as the first routing domain identifier.
  • the method shown in FIG. 4a may further include step 416 and step 417.
  • the second node obtains the node type of the second node in the network and the node type of the first node in the network.
  • step 416 the three methods shown in FIG. 4c can be referred to for step 416, which are respectively shown below.
  • the second node receives a seventh message from the root node, where the seventh message carries the node type of the second node;
  • the second node receives a fourth message from the first node, where the fourth message carries the node type of the first node.
  • the description of the seventh message can refer to the introduction of the fifth message
  • the description of the fourth message can refer to the introduction of the second message, which will not be described in detail here.
  • the second node obtains the node type of the second node
  • the second node receives a fourth message from the first node, where the fourth message carries the node type of the first node.
  • the second node obtains the node type of the second node, please refer to the method for obtaining the node type of the first node, which will not be described in detail here.
  • the second node receives a third message from the root node, and the third message carries the node type of the first node and the node type of the second node.
  • step 416 reference may be made to step 411, which will not be described in detail here.
  • the second node determines, according to the node type of the second node and the node type of the first node, that the role information of the second node relative to the first node is a domain learning role.
  • the method shown in FIG. 4a may include step 411 and step 412.
  • the method shown in FIG. 4a may include step 416 and step 417.
  • the second node may perform step 416, and then configure the routing domain identifier of the second port as the first routing domain identifier.
  • the second node may also perform step 416 and step 417, and then configure the routing domain identifier of the second port as the first routing domain identifier.
  • the method shown in FIG. 4a may further include step 411, step 412, step 416, and step 417.
  • both the first node and the second node can determine the role information of the local end relative to the opposite end, double confirm the role information, and ensure the reliability of the routing domain identification configuration.
  • the second node configures the routing domain identifier of the second port as the first routing domain identifier.
  • the first node exchanges routing information with the second node according to the first routing domain identifier.
  • the second node exchanges routing information with the first node according to the first routing domain identifier.
  • FIG. 5a is a schematic diagram of a scenario for dividing routing domains corresponding to Fig. 3a provided by an embodiment of the present application.
  • node 1 is the root node.
  • node 1 can generate zero fields such as area0
  • node 1 sends a message carrying area0 to node 4 through port 3
  • node 4 receives the message carrying area0 through port 13.
  • node 1 sends a message carrying area 0 to node 2 through port 1
  • node 2 receives a message carrying area 0 through port 4.
  • Node 1 sends a message carrying area 0 to node 3 through port 2, and node 3 receives the message carrying area 0 through port 5.
  • Node 1 is configured with the routing domain identifier of port 1, port 2, and port 3 as area0.
  • Node 2 is configured with the routing domain ID of port 4 as area0
  • node 3 is configured with the routing domain ID of port 5 as area0
  • node 4 is configured with the routing domain ID of port 13 as area0.
  • Node 4 is connected to node 7 (secondary foreign node), and node 7 is a secondary foreign node. Therefore, node 4 sends a message carrying area0 to node 7 through port 14, and node 7 receives message carrying area0 sent by node 4 through port 10. .
  • Node 4 configures the routing domain identifier of port 14 as area0, and node 7 configures the routing domain identifier of port 10 as area0.
  • node 3 since node 3 is connected to node 7, refer to the introduction of node 4 and node 7, so node 3 also needs to configure the routing domain identifier of port 18 as area0, and node 7 also needs to configure the routing domain identifier of port 19 as area0.
  • node 5 and the node 6 are edge nodes, and the node 3 is connected to the node 5 and the node 6 respectively, the node 3 also needs to learn the routing domain identifiers generated by the node 5 and the node 6.
  • Node 5 generates a routing domain identifier such as area4, and sends a message carrying area4 to node 3 through port 8.
  • node 5 also needs to send a message carrying area 4 to node 4 through port 17.
  • node 4 After node 4 receives the message carrying area 4 through port 15, it configures the port The routing domain of 15 is identified as area4. Similarly, for the generation or diffusion method of the routing domain identifiers of node 6, node 3, and node 4, such as area 5, refer to the method of node 5, node 3, and node 4, which will not be described in detail here. Similarly, node 7 also needs to learn the routing domain identifier generated by node 8. For example, node 8 sends a message carrying area3 to node 7 through port 12, and node 7 receives the message carrying area3 through port 11. Node 8 configures the routing domain identifier of port 12 as area3, and node 7 configures the routing domain identifier of port 11 as area3.
  • the routing domain identification of port 8, port 6, port 17, and port 15 is area4.
  • the routing domain identification of port 9, port 7, port 20, and port 16 is area5.
  • the routing domain where port 12 and port 11 are located is identified as area3.
  • the routing domain identification of port 1, port 4, port 2, port 5, port 18, port 19, port 3, port 13, port 14, and port 10 is area0.
  • the network shown in FIG. 3b can be as shown in FIG. 5b after the routing domain identifier is configured.
  • the network shown in Figure 3c is configured with a routing domain identifier, it can be as shown in Figure 5c.
  • the node 24 is not on the shortest path from the node 23 to the root node, so the node 23 may not send the generated routing domain identifier such as area2 to the node 24.
  • the role information of the first node relative to the second node is a domain-generated role, so that the first node can report to the second node
  • the node sends the first message.
  • the role information and then configuring the routing domain identification on the one hand, the process of mutual message exchange and continuous confirmation of role information or routing domain identification is avoided, and the efficiency of mutual negotiation between nodes is improved.
  • nodes can learn routing domain identifications from each other, which realizes the purpose of automatically dividing routing domains and improves the efficiency of node configuration of routing domain identifications.
  • FIG. 6 is a schematic flowchart of a method for configuring a routing domain identifier according to an embodiment of the present application.
  • This method is shown by taking the node type of each node delivered by the root node as an example, but it should not be construed as a limitation to the embodiment of the present application.
  • Fig. 7a shows the distribution of nodes in a network, and the nodes in the network include a root node, a node S1, a node S2, a node S3, and a node S4.
  • the method shown in Figure 6 includes:
  • the root node sends a configuration message to each node.
  • the root node may send a configuration message (such as the above fifth message) to node S1, and the configuration message carries the node type of node S1.
  • the root node sends a configuration message (such as the seventh message described above) to node S2, and the configuration message carries the node type of node S2.
  • the root node sends a configuration message to node S3, and the configuration message carries the node type of node S3.
  • the root node sends a configuration message to node S4, and the configuration message carries the node type of node S4.
  • the node S1, the node S2, the node S3, and the node S4 respectively receive the configuration message.
  • the method shown in FIG. 6 may further include step 602.
  • the nodes in the network can further confirm their node types.
  • the neighboring node can also determine the role information of the local end relative to the opposite end through the role notification message.
  • the neighboring nodes send role notification messages to each other.
  • the root node may send a role notification message to node S1 through port 1, where the role notification message carries identification information of the root node and the node type of the root node.
  • the role notification message may also carry identification information of the node S1 (empty by default) and the node type of the node S1 (empty by default).
  • the node S1 receives the role notification message sent by the root node.
  • the root node does not know the node type and identification information of the node S1
  • the two pieces of information carried in the role notification message may be empty by default.
  • the identification information and node type of the node S1 carried in the role notification message.
  • the opposite end can confirm whether the network topology has changed or updated according to the role notification message. And the opposite end can further confirm whether its role information is correct according to the role notification message. It is understandable that the description of the identification information and node type of the peer carried in the role notification message is also applicable to the following.
  • the node S1 may send a role notification message to the root node through the port 2, and the role notification message carries the identification information of the node S1 and the node type (normal node) of the node S1.
  • the role notification message may also carry the identification information and node type of the root node.
  • the root node receives the role notification message sent by the node S1.
  • the node S1 may also send the role notification message to the node S2 through the port 3.
  • the role notification message may carry the identification information of the node S1, the node type of the node S1, the identification information of the node S2, and the node type of the node S2.
  • the node S2 can receive the role notification message sent by the node S1.
  • the node S2 may also send a role notification message to the node S1 through the port 4.
  • the node S2 may also send a role notification message to the node S3 through the port 5, and send a role notification message to the node S4 through the port 6.
  • node S3 may send a role notification message to node S2 through port 8
  • node S4 may send a role notification message to node S2 through port 7. It can be understood that for the specific description of the role notification message, reference may be made to the description of the root node or node S1, etc., which will not be described in detail here.
  • node S1 and node S2 use interactive role notification messages to enable node S1 to learn the node type of node S2, and node S2 to learn the node type of node S1, so that node S1 can determine the relationship between node S1 and node S2.
  • the role information and the node S2 can also determine the role information of the node S2 relative to the node S1.
  • the local node can learn its role information relative to the peer node, so that the node can independently generate routing domain identification or learn routing domain identification, thereby improving configuration routing The efficiency of domain identification.
  • the embodiment of the present application does not limit the sequence in which each node sends the role notification message.
  • the node S1 receives the configuration message sent by the root node, the node S1 can send the role notification message to the root node and send the role notification message to the node S2.
  • the node S2 also receives the configuration message sent by the root node, the node S2 can send a role notification message to the node S1 and the node S3.
  • Each node determines whether its role information is a domain learning role or a domain generation role.
  • the root node may determine that its role information is a domain generation role.
  • the node S3 can determine that its role information is a domain generation role, and the node connected through port 8 is a secondary foreign node.
  • the node S4 can determine that its role information is a domain generation role, and the node connected through port 7 is a secondary foreign node.
  • Node S1 can determine that the node connected through port 2 is the root node, and the role information is the domain learning role; and the node connected through port 3 is the secondary external node, and the role information is the domain generation role (that is, it diffuses to node S2 and learns from the root node To the routing domain identifier).
  • the node S2 can determine that its role information is a domain learning role.
  • the embodiment of the present application does not limit the order in which each node determines its role information.
  • the node S2 receives the role notification messages of the node S1 and the node S3, the node S2 can determine its role information.
  • the node S3 receives the role notification messages of the node S2 and the node S4, the node S3 can determine its role information.
  • the domain generation role generates a routing domain identification, and the domain learning role learns the routing domain identification.
  • the root node generates a routing domain identifier such as area0, and configures the routing domain identifier of port 1 as area0; and sends a first message to node S1 through port 1, and node S1 receives the first message through port 2, and configures port 2.
  • the routing domain is identified as area0.
  • the first message may carry a routing domain identifier such as area0.
  • the first message may also carry identification information of the root node, identification information of the node S1, and so on.
  • the node S1 can confirm whether the connection relationship and role information of the current neighboring nodes are correct according to the first message. If it is correct, the node S1 can learn area0; if it is not correct, the node S1 can send a role notification to the root node again Messages, etc. to confirm the role information of the root node and node S1.
  • the node S1 diffuses the learned routing domain identifier such as area0 to the node S2 through port 3, and the node S2 receives the first message through port 4, and the first message carries the routing domain identifier such as area0.
  • the first message may also carry identification information of the node S1, identification information of the node S2, and so on.
  • the node S1 is configured with the routing domain ID of port 3 as area0
  • the node S2 is configured with the routing domain ID of port 4 as area0.
  • the node S3 generates a routing domain identifier such as area3, and sends the first message to the node S2 through the port 8; the node S2 receives the first message through the port 5.
  • the first message carries a routing domain identifier such as area3.
  • the first message may also carry identification information of node S3, identification information of node S2, and so on.
  • Node S3 configures the routing domain identifier of port 8 as area3, and node S2 configures the routing domain identifier of port 5 as area3.
  • the node S4 generates a routing domain identifier such as area4, and sends the first message to the node S2 through the port 7; the node S2 receives the first message through the port 6.
  • the first message carries a routing domain identifier such as area4.
  • the first message may also carry identification information of node S4, identification information of node S2, and so on.
  • Node S4 configures the routing domain identifier of port 7 as area4, and node S2 configures the routing domain identifier of port 6 as area4.
  • the first message is shown as an example in FIG. 6, but the messages sent by different nodes may also have different message names (such as the first message or the sixth message, etc.), which is not limited in the embodiment of the present application.
  • Fig. 7a the routing domain identifiers of node S3 (edge node) and node S4 (edge node) are different. And the node S3 and the node S4 both have global domain identifiers, that is, the routing domain identifiers of all the ports of the node S3 are the same, such as area3, and the routing domain identifiers of all the ports of the node S4 are the same, such as area4.
  • the node S2 (secondary external node) can learn routing domain identification from multiple adjacent nodes, and the routing domain identification of each port is different.
  • the node S2 does not have a global domain identification. Therefore, in a specific implementation, the secondary foreign node may also configure the routing domain identifier of the port connected to the edge node as the routing domain identifier generated by the edge node. And the secondary external node can also join the routing domain where the routing domain identifier learned from the ordinary node or the root node is located.
  • the routing domain identifiers of all ports of the node S1 are the routing domain identifiers learned from the root node.
  • the node S1 has a global domain identifier.
  • the node type of the node S1 in FIG. 7a is only a normal node.
  • the node types of nodes 3 and 4 can be either secondary external nodes or ordinary nodes. In this case, there is no global domain identifier for ordinary nodes.
  • the embodiment of the present application does not limit the sequence in which the root node, the node S3, and the node S4 generate the routing domain identifier and send the first message to the opposite node.
  • step 602 may be executed at a certain time interval; or, executed at a fixed frequency, etc., which is not limited in the embodiment of the present application. It can be understood that the certain time interval may be the same as or different from the preset time interval shown in FIG. 2. And the fixed frequency can also be the same as or different from the preset frequency shown in FIG. 2.
  • step 602 when the topology of the network changes, step 602 is executed.
  • the nodes can mutually confirm whether the role information of the local end relative to the opposite end has changed. Further, it can also be determined whether the routing domain identifier where the node is located needs to be updated.
  • the network is expanded, such as a node S5 is added.
  • the node S3 can learn that its node type has changed through the role notification message of the node S5. That is, the node type of node S3 changes from an edge node to a secondary external node.
  • the node type of node S2 relative to node S3 has also changed, that is, the node type of node S2 has changed from a secondary node to a normal node.
  • the node S2, the node S3, and the node S5 may execute the methods shown in step 603 and step 604.
  • the node S2 may send the routing domain identification area0 to the node S3, and the node S3 updates the routing domain identification of the port 8 as area0.
  • Node S3 learns the routing domain identifier obtained from node S5, such as area5, and configures the routing domain identifier of port 9 as area5. Since the node types of the node S4 and the node S2 have not changed, the routing domain identifiers of the node S4 and the node S2 may not be updated.
  • the root node, node S1, and node S2 can exchange routing information with each other.
  • the node S3 and the node S2 can also exchange routing information
  • the node S4 and the node S2 can also exchange routing information (not shown in FIG. 7a).
  • routing information can be directly exchanged between nodes.
  • the node S1 needs to send routing information to the node S4.
  • the node S1 can send the routing information to the node S2, and the node S2 sends the routing information to the node S4.
  • the root node needs to send routing information to node S5, then the root node can send the routing information to node S3, and node S3 can send the routing information to node S5.
  • the routing domain identifier shown in the embodiment of the present application can be used to determine the routing mode of the node; or, it can be used to determine the routing domain range (or boundary, etc.) of the node to exchange routing information.
  • each node can construct a routing domain through a routing protocol, thereby learning or generating related routes, and completing the construction of the entire network route.
  • the role information is determined according to the node type.
  • the nodes negotiate by themselves (according to certain rules), automatically generate or learn routing identifiers, etc. according to the role information, which improves the adaptability to the networking topology.
  • the node types of the changed nodes can be adjusted, that is, the changed nodes re-negotiate and self-generate the routing domain, which avoids the risk of network disconnection caused by re-planning or even redeployment of the entire network.
  • the role determination device can be used to determine the node type according to the network topology.
  • the role determination device may include a processing circuit and an interface circuit.
  • the interface circuit can be used to obtain the topology of the network. It is understandable that the embodiment of the present application does not limit the method for obtaining the topology of the network.
  • the processing circuit may be used to determine the node type of the node according to the acquired network topology.
  • the root node may include the role determining device, so that the root node may obtain the node type of each node in the network. For example, the root node sends the node type of the first node to the first node, and sends the node type of the second node to the second node, and so on.
  • the processing circuit may be a chip, a logic circuit, an integrated circuit, or a system on chip (system on chip, SoC) chip, etc.
  • the interface circuit may be a communication interface, an input/output interface, and the like.
  • each node in the network may include the role determination device, so that each node may determine the node type of its local node.
  • the first node in the network can obtain its node type according to the network topology; the second node in the network can also obtain its node type according to the network topology.
  • the functions performed by the role determination device shown in this application can be implemented by hardware, or can be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more units or modules corresponding to the above-mentioned functions.
  • the role determination device may be a general-purpose computer or a network element device, or the role determination device may also be implemented by software.
  • FIG. 8 is a schematic structural diagram of a network device provided by an embodiment of the present application, and the network device may be used to perform operations performed by the first node in the foregoing method embodiments.
  • the network device may be a switch or router.
  • the switch may also include an access switch, an aggregation switch, or a core switch.
  • the network device may also be other devices with the same function as the switch or router.
  • the network device may also be a general-purpose computer or a network element device, etc., and the network device may be a wired device or a wireless device.
  • the network device can be used to execute the method shown in FIG. 2, FIG. 4a, FIG. 4b, or FIG. 6.
  • the network device includes a processing unit 801 and a transceiver unit 802. in,
  • the processing unit 801 is configured to obtain the routing domain identifier of the first port of the network device; the transceiver unit 802 is configured to send a first message to the second node through the first port, the first message carrying the first routing domain identifier, and the first route
  • the domain ID is the routing domain ID of the first port, the first message is used to instruct the second node to configure the routing domain ID of the second port of the second node as the first routing domain ID, and the second port is the second node receiving the first message Port.
  • the processing unit 801 may be configured to generate the first routing domain identifier; or, the processing unit 801 may also receive the first routing domain identifier sent by other nodes through the transceiver unit 802.
  • the processing unit 801 is further configured to configure the routing domain identifier of the first port as the first routing domain identifier.
  • the transceiver unit 802 is further configured to exchange routing information with the second node according to the first routing domain identifier.
  • the network device is an edge node
  • the processing unit 801 is further configured to configure the routing domain identifiers of all ports of the network device as the first routing domain identifier.
  • the network device is an edge node
  • the first routing domain identifier is different from the routing domain identifier obtained by other edge nodes in the network.
  • the processing unit 801 is further configured to determine that the role information of the network device relative to the second node is a domain generation role.
  • the processing unit 801 is also used to obtain the node type of the network device in the network and the node type of the second node in the network; and according to the node type of the network device and the node of the second node The type determines the role information of the network device relative to the second node as the domain generation role.
  • the processing unit 801 is further configured to obtain the node type of the network device; and receive a second message from the second node through the transceiver unit 802, the second message carrying the node type of the second node .
  • the processing unit 801 is configured to receive a fifth message from the root node through the transceiver unit 802, the fifth message carrying the node type of the network device; and the second message from the second node, the first The second message carries the node type of the second node.
  • the transceiver unit 802 is specifically configured to send the first message to the second node through the first port when the topology of the network changes; wherein, the network device and/or the second node It is a node whose node type has changed; or, the network device and/or the second node is a newly-added node.
  • the node type may include first-level nodes and second-level nodes; for example, the node type may include first-level nodes, second-level nodes, and third-level nodes; for example, the node type may also include root nodes, Edge nodes, secondary external nodes and ordinary nodes, etc.
  • the node type of the network device may be a first-level node or a third-level node, for example.
  • the node type of the network device may also be a root node or an edge node.
  • the node type of the network device may also be a normal node, and the node type of the second node is a secondary foreign node or a normal node.
  • the network device may be the root node in Fig. 6, and the second node is node S1.
  • the network device may also be node S1, and the second node may be node S2.
  • the network device may also be node S3 or node S4, and the second node is node S2.
  • the processing unit 801 may be one or more processors, and the transceiver unit 802 may be a transceiver or a transceiver unit.
  • the 802 may also be a sending unit and a receiving unit.
  • the sending unit may be a transmitter, and the receiving unit may be a receiver.
  • the sending unit and the receiving unit are integrated into one device, such as a transceiver.
  • the processing unit 801 may be one or more processors, and the transceiver unit 802 may be an input/output interface, also called a communication interface, or an interface circuit, or an interface.
  • the transceiver unit 802 may also be a sending unit and a receiving unit, the sending unit may be an output interface, and the receiving unit may be an input interface, and the sending unit and the receiving unit are integrated into one unit, such as an input/output interface.
  • the network device of the embodiment of the present application can perform any function performed by the first node in the above method embodiment.
  • the network device shown in FIG. 8 may be the first node in each of the foregoing method embodiments or a component that implements the foregoing functions in the first node.
  • the above-mentioned transceiving unit 802 may be realized by a transceiver
  • the above-mentioned processing unit 801 may be realized by a processor.
  • the network device 90 includes one or more processors 920 and a transceiver 910.
  • the processor and the transceiver may be used to execute the function or operation performed by the first node.
  • the processor and transceiver may also be used to perform functions or operations performed by the above-mentioned root node or edge node.
  • the processor and transceiver may also be used to perform functions or operations performed by the above-mentioned first-level nodes.
  • the processor may be used to obtain the routing domain identifier of the first port, where the routing domain identifier of the first port is the first routing domain identifier; the transceiver may be used to send the first message to the second node through the first port; processing The device can also be used to configure the routing domain identifier of the first port as the first routing domain identifier.
  • the transceiver may also be used to exchange routing information with the second node according to the first routing domain identifier.
  • the processor may also be used to determine that the role information of the network device relative to the second node is a domain generation role.
  • the processor may also be used to obtain the node type of the network device and the node type of the second node in the network; and determine that the network device is relative to the second node according to the node type of the network device and the node type of the second node
  • the role information of generates roles for the domain may also be used to obtain the node type of the network device and the node type of the second node in the network; and determine that the network device is relative to the second node according to the node type of the network device and the node type of the second node.
  • the processor may be used to obtain the node type of the network device, and receive the second message sent by the second node through the transceiver.
  • the processor may also be used to receive the fifth message from the root node and the second message from the second node through the transceiver.
  • the transceiver may also be used to send the first message to the second node through the first port when the topology of the network changes.
  • FIG. 2 For the specific implementation of the transceiver and the processor, reference may be made to the methods shown in FIG. 2, FIG. 4a, FIG. 4b or FIG. 6, which will not be described in detail here.
  • the method for determining the node type please refer to the related descriptions in Figs. 3a to 3c.
  • the method of how to learn routing domain identifiers between nodes refer to the related descriptions in Figs. 5a to 5d.
  • the transceiver may include a receiver and a transmitter.
  • the receiver is used to perform the function (or operation) of receiving, and the transmitter is used to perform the function (or operation) of transmitting. ).
  • the transceiver is used to communicate with other devices/devices through the transmission medium.
  • the processor 920 uses the transceiver 910 to send and receive data and/or signaling, and is used to implement the corresponding method described in FIG. 2, FIG. 4a, FIG. 4b, or FIG. 6 in the foregoing method embodiment.
  • the network device 90 may further include one or more memories 930 for storing program instructions and/or data.
  • the memory 930 and the processor 920 are coupled.
  • the coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, and may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
  • the processor 920 may cooperate with the memory 930 to operate.
  • the processor 920 may execute program instructions stored in the memory 930.
  • at least one of the foregoing one or more memories may be included in the processor.
  • the specific connection medium between the foregoing transceiver 910, the processor 920, and the memory 930 is not limited in the embodiment of the present application.
  • the memory 930, the processor 920, and the transceiver 910 are connected by a bus 940 in FIG. 9.
  • the bus is represented by a thick line in FIG. , Is not limited.
  • the bus can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used in FIG. 9, but it does not mean that there is only one bus or one type of bus.
  • the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc., which can be implemented Or execute the methods, steps, and logical block diagrams disclosed in the embodiments of the present application.
  • the general-purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as execution and completion by a hardware processor, or execution and completion by a combination of hardware and software modules in the processor, and so on.
  • the network device shown in FIG. 9 is a network device
  • the network device may also have more components and the like than that in FIG. 9, which is not limited in the embodiment of the present application.
  • the network device shown in FIG. 8 may be a circuit system in the first node.
  • the above-mentioned processing unit 801 may be realized by a processing circuit
  • the transceiver unit 802 may be realized by an interface circuit.
  • the network device may include a processing circuit 1001 and an interface circuit 1002.
  • the processing circuit 1001 may be a chip, a logic circuit, an integrated circuit or a system on chip (SoC) chip, etc.
  • the interface circuit 1002 may be a communication interface, an input/output interface, and the like.
  • the network device may be the circuit system of the first node in the foregoing method embodiment.
  • the network device may also be the circuit system of the root node or the circuit system of the edge node in the foregoing method embodiment.
  • the network device may also be a circuit system in the first-level node in the foregoing method embodiment.
  • the processing circuit can be used to obtain the routing domain identification of the first port, the routing domain identification of the first port is the first routing domain identification; the interface circuit can be used to output the first message; the processing circuit can also be used to configure the first port
  • the routing domain identifier is the first routing domain identifier.
  • the interface circuit may also be used to obtain the routing domain identifier of the first port.
  • the processing circuit may also be used to configure the routing domain identifiers of all ports of the network device as the first routing domain identifier.
  • the processing circuit may also be used to determine that the role information of the network device relative to the second node is the domain generation role.
  • the processing circuit may also be used to obtain the node type of the network device and the node type of the second node; and determine its role information relative to the second node according to the node type of the network device and the node type of the second node for domain generation Role.
  • the processing circuit may also be used to obtain the node type of the network device; and the interface circuit may be used to obtain the second message. In other implementation manners, the interface circuit may also be used to obtain the fifth message and the second message.
  • each message and node type may refer to the above method embodiment, which will not be described in detail here.
  • the method for determining the node type please refer to the related descriptions in Figs. 3a to 3c.
  • the method of how to learn routing domain identifiers between nodes refer to the related descriptions in Figs. 5a to 5d.
  • the processing circuit may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc., which can be implemented Or execute the methods, steps, and logical block diagrams disclosed in the embodiments of the present application.
  • Figure 8 is reused.
  • Figure 8 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • the network device can be used to perform operations performed by the second node in the foregoing method embodiments.
  • the network device may be a switch or router.
  • the network device may also be other devices with the same function as the switch or router.
  • the network device can be used to execute the method shown in FIG. 2, FIG. 4a, FIG. 4b, or FIG. 6.
  • the network device includes a processing unit 801 and a transceiver unit 802. in,
  • the transceiver unit 802 is configured to receive a first message from a first node through a second port, the first message carries a first routing domain identifier, and the first message is used to instruct the network device to configure the routing domain identifier of the second port of the network device Is the first routing domain identifier, the routing domain identifier of the first port of the first node is the first routing domain identifier, and the first port is the port through which the first node sends the first message; the processing unit 801 is configured to configure the second port The routing domain identifier is the first routing domain identifier.
  • the transceiver unit 802 is further configured to exchange routing information with the first node according to the first routing domain identifier.
  • the processing unit 801 is further configured to determine that the role information of the network device relative to the first node is a domain learning role.
  • the processing unit 801 is specifically configured to obtain the node type of the network device in the network and the node type of the first node in the network; and according to the node type of the network device and the node of the first node The type determines that the role information of the network device relative to the first node is the domain learning role.
  • the processing unit 801 is specifically configured to obtain the node type of the network device; and receive a fourth message from the first node through the transceiver unit 802, the fourth message carrying the node type of the first node.
  • the processing unit 801 may be configured to receive the seventh message from the root node through the transceiver unit 802, the seventh message carrying the node type of the network device; and the fourth message from the first node, The fourth message carries the node type of the first node.
  • the transceiver unit 802 is further configured to send an eighth message to the third node through the third port, the eighth message carries the first routing domain identifier, and the eighth message is used to instruct the third node to configure the third node.
  • the routing domain identification of the fourth port of the three nodes is the first routing domain identification
  • the routing domain identification of the third port is the first routing domain identification
  • the processing unit 801 is further configured to configure the routing domain identification of the third port as the first route Domain ID.
  • the first node may be the root node
  • the network device may be the node S1
  • the third node may be the node S2.
  • the transceiver unit 802 is specifically configured to receive the first message from the first node through the second port when the network topology changes, where the first node and/ Or the network device is a node whose node type has changed; or, the first node and/or the network device is a newly-added node.
  • the node type may include first-level nodes and second-level nodes; for example, the node type may include first-level nodes, second-level nodes, and third-level nodes; for example, the node type may also include root nodes, Edge nodes, secondary external nodes and ordinary nodes, etc.
  • the node type of the network device may be a second-level node.
  • the node type of the network device may also be a secondary node or a normal node.
  • the first node may also be the root node in FIG. 6, and the network device may be node S1.
  • the first node may also be node S1, and the network device may be node S2.
  • the first node may also be node S3 or node S4, and the network device may be node S2.
  • the network device of the embodiment of the present application can perform any function performed by the second node in the above method embodiment.
  • the foregoing network device may be a second node or a component in the second node that implements the foregoing functions.
  • the above-mentioned transceiving unit may be realized by a transceiver
  • the processing unit may be realized by a processor.
  • the processing unit and the transceiver unit please refer to the processing unit and the transceiver unit, which will not be described in detail here. It can be understood that, for the specific description of the processor and the transceiver, reference may also be made to the description of the foregoing network device as the first node, which will not be described in detail here.
  • the network device may also include a memory and the like.
  • the foregoing network device may also be a circuit system in the second node.
  • the above-mentioned transceiver unit may be realized by an interface circuit
  • the processing unit may be realized by a processing circuit.
  • the processing circuit 1001 may be a chip, a logic circuit, an integrated circuit, a processing circuit, or a system on chip (SoC) chip, etc.
  • the interface circuit 1002 may be a communication interface, an input/output interface, etc.
  • the interface circuit may be used to obtain the first message, and the processing circuit may be used to configure the routing domain identifier of the second port as the first routing domain identifier.
  • the processing circuit may also be used to determine that the role information of the network device relative to the first node is a domain learning role.
  • the processing circuit can also be used to obtain the node type of the network device in the network, and the node type of the first node in the network; and determine the network device relative to the first node according to the node type of the network device and the node type of the first node.
  • the role information of the node is the domain learning role.
  • the processing circuit may be used to obtain the node type of the network device; the interface circuit may be used to obtain the fourth message.
  • the interface circuit may be used to obtain the fourth message, the seventh message, and so on.
  • the interface circuit can also be used to output the eighth message, and the processing circuit can also be used to configure the routing domain identifier of the third port as the first routing domain identifier.
  • the introduction about the fourth message, the seventh message, or the eighth message, and the introduction about the node type or routing domain identifier, etc. can refer to the description of the method embodiment, which will not be described in detail here.
  • FIG. 11 is a schematic diagram of a routing autonomous system provided by an embodiment of the present application.
  • the routing autonomous system may include a first node and a second node.
  • the first node can be used to execute the method executed by the first node in Figure 2, Figure 4a, or Figure 4b.
  • the second node can be used to execute the method executed by the second node in Figure 2, Figure 4a, or Figure 4b. method.
  • the first node may also be used to execute the method executed by the root node in FIG. 6, and the second node may also be used to execute the method executed by the node S1 in FIG. 6.
  • the first node may also be used to execute the method executed by the node S1 in FIG.
  • the second node may also be used to execute the method executed by the node S2 in FIG. 6.
  • the first node may also be used to execute the method executed by the node S3 or the node S4 in FIG. 6, and the second node may also be used to execute the method executed by the node S2.
  • the routing autonomous system may further include a third node.
  • the first node may be used to execute the method executed by the root node in FIG. 6, the second node may be used to execute the method executed by the node S1, and the third node may be used to execute the method executed by the node S2.
  • the first node can be used to execute the method executed by the root node in Figure 7b
  • the second node can be used to execute the method executed by node S1 in Figure 7b
  • the third node can be used to execute the method executed by the node S1 in Figure 7b.
  • the first node may be used to execute the method executed by node S1 in FIG. 7b
  • the second node may be used to execute the method executed by node S2 in FIG. 7b
  • the third node may be used to execute the method executed by node S3 in FIG. 7b.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the technical effects of the solutions provided by the embodiments of the present application.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the storage medium includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned readable storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks, etc., which can store program codes. Medium.
  • the present application also provides a computer program, which is used to implement the operations and/or processing performed by the first node in the method for configuring a routing domain identifier provided by the present application.
  • the present application also provides a computer program, which is used to implement the operations and/or processing performed by the second node in the method for configuring the routing domain identifier provided in the present application.
  • This application also provides a computer-readable storage medium, which stores computer code.
  • the computer code runs on a computer, the computer executes the method for configuring routing domain identification provided by this application. Operations and/or processing performed by the node.
  • This application also provides a computer-readable storage medium that stores computer code.
  • the computer code runs on a computer, the computer executes the method for configuring routing domain identification provided by this application. Operations and/or processing performed by the node.
  • the computer program product includes computer code or computer program.
  • the computer code or computer program runs on a computer, the first node in the method for configuring routing domain identification provided by this application is The executed operation and/or processing is executed.
  • This application also provides a computer program product.
  • the computer program product includes computer code or computer program.
  • the second node in the method for configuring routing domain identification provided by this application is The executed operation and/or processing is executed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供一种配置路由域标识的方法及设备,该方法包括:第一节点获取其第一端口的路由域标识;通过该第一端口向第二节点发送携带第一路由域标识的第一消息,该第一路由域标识为第一端口的路由域标识,该第一消息用于指示第二节点配置其第二端口的路由域标识为该第一路由域标识。第二节点通过第二端口接收到上述第一消息后,配置第二端口的路由域标识为该第一路由域标识。本申请提供的技术方案,节点之间可以相互学习路由域标识,当网络中的节点协商一致,则实现自动划分路由域的目的,提高了节点配置路由域标识的效率。

Description

配置路由域标识的方法及设备
本申请要求于2020年04月24日提交中国专利局、申请号为202010335099.6、申请名称为“配置路由域标识的方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及网络技术领域,尤其涉及一种配置路由域标识的方法及设备。
背景技术
一般的,网络设备可以通过网络路由协议,自动进行拓扑发现、组网以及路由计算和同步等,以达到网络内的节点基于互联网协议(internet protocol,IP)可连通的效果。例如,网络中的节点,通过一定的机制(如邻居发现和同步邻居信息等)获取网络的拓扑;然后节点根据该网络的拓扑计算到达其他节点的相关路由。当某个或某些节点或链路发生故障时,该故障可以通过一定的机制同步到所有节点;然后每个节点再根据最新的拓扑情况,重新计算拓扑。基于上述自动路由组网,在网络(如节点数或互联链路数)增大到一定规模时,拓扑发现、路由同步的时间延迟以及交互消息的处理负载等会成为瓶颈。例如,路由器或交换机很难支撑大规模的单区域路由网络组网计算和消息同步负载等。
鉴于此,通常需要将网络划分成不同的区域,在每个区域内进行拓扑发现和同步等,划分的上述区域也可以称为路由域。一般的划分路由域的方法如通过手工或网络外的管控设备(例如网络控制器、网管或服务器等)逐节点的下发相关配置。如图1所示,管控设备可以给网络中的各个节点配置其运行的路由协议,进一步的,该管控设备可以为网络内的每个节点设置每个节点所属的路由域,如图1中的区域0(area 0)、区域1(area1)和区域2(area2)。
然而,上述手工或通过管控设备设置路由域标识的效率低下。
发明内容
本申请提供一种配置路由域标识的方法及设备,有效提高了配置路由域标识的效率,提高了划分路由域的效率。
第一方面,本申请提供一种配置路由域标识的方法,该方法包括:第一节点获取该第一节点的第一端口的路由域标识,通过该第一端口向第二节点发送第一消息;该第一消息携带第一路由域标识,该第一路由域标识为第一端口的路由域标识,且该第一消息用于指示第二节点配置第二节点的第二端口的路由域标识为第一路由域标识,第二端口为第二节点接收第一消息的端口。
本申请实施例中,第一路由域标识可以由该第一节点生成;或者,还可以由该第一节点从其他节点获取等。
本申请提供的技术方案,第一节点和第二节点之间通过交互消息,第二节点就可以学 习到第一节点获取到的第一路由域标识,从而配置第二端口的路由域标识为第一路由域标识。相对于各个节点通过管控设备划分路由域,且划分路由域之后下发路由域标识配置路由域标识的方法,避免了节点等待人工或管控设备下发路由域标识。节点之间可以相互学习路由域标识,当网络中的节点协商一致,则实现了自动划分路由域的目的,提高了节点配置路由域标识的效率。
在一种可能的实现方式中,所述方法还包括:第一节点配置第一端口的路由域标识为第一路由域标识。
本申请实施例中,对于第一节点发送第一消息以及配置第一端口的路由域标识为第一路由域标识的先后顺序,本申请实施例不作限定。以及对于第一节点获取该第一节点的第一端口的路由域标识以及配置该第一端口的路由域标识为第一路由域标识的先后顺序,不作限定。
在一种可能的实现方式中,第一节点配置第一端口的路由域标识为第一路由域标识之后,所述方法还包括:第一节点根据第一路由域标识与第二节点交互路由信息。
本申请实施例中,路由域标识可以用于确定路由方式;或者,用于确定节点交互路由信息的路由域范围(或路由域边界等)。示例性的,第一路由域标识可以用于指示第一节点和第二节点交互路由信息的路由域范围。第一节点根据第一路由域标识与第二节点交互路由信息,也可以理解为第一节点通过第一路由域标识与第二节点交互路由信息。
在一种可能的实现方式中,第一节点获取该第一节点的第一端口的路由域标识之前,所述方法还包括:第一节点确定第一节点相对于第二节点的角色信息为域生成角色。
可选的,第一节点可以在获取到其节点类型,以及第二节点的节点类型之后,根据该第一节点的节点类型和第二节点的节点类型,获取第一端口的路由域标识。可选的,该第一节点还可以在确定其相对于第二节点的角色信息为域生成角色时,获取第一端口的路由域标识。
可理解,第一路由域标识由第一节点生成时,该第一节点还可以在获取第一端口的路由域标识之前,确定其相对于第二节点的角色信息为域生成角色。而第一路由域标识由第一节点从其他节点获取时,该第一节点可以在发送第一消息之前,确定其相对于第二节点的角色信息为域生成角色。
在一种可能的实现方式中,第一节点为边缘节点,第一节点配置第一节点的所有端口的路由域标识为第一路由域标识。
本申请实施例中,当第一节点相对于第二节点为域生成角色,且第一节点为边缘节点时,第一节点就可以配置其所有端口的路由域标识为第一路由域标识。
在一种可能的实现方式中,第一节点为边缘节点,第一路由域标识和网络中其它边缘节点获取的路由域标识不相同。
本申请实施例中,网络中包括多个边缘节点,且该多个边缘节点均为域生成角色,则该多个边缘节点的路由域标识不相同。然而,网络中包括多个(如三个或三个以上)边缘节点,但是该多个边缘节点中有两个(或两个以上)边缘节点不是域生成角色(如边缘节点与根节点连接的情况),则该两个边缘节点的路由域标识可以相同,但是该两个边缘节点的路由域标识与其他边缘节点的路由域标识可以不相同。
在一种可能的实现方式中,第一节点确定第一节点相对于第二节点的角色信息为域生成角色,包括:第一节点获取第一节点在网络中的节点类型,以及第二节点在网络中的节点类型;第一节点根据第一节点的节点类型和第二节点的节点类型,确定第一节点相对于第二节点的角色信息为域生成角色。
本申请实施例中,节点类型可以包括根节点、边缘节点、次外节点或普通节点中的一种或多种。其中,根节点可以为网络的核心节点或中心位置等。边缘节点不在其他节点到根节点的最短路径上,该其他节点为网络中除该边缘节点和根节点之外的节点。次外节点在边缘节点到根节点的最短路径上,该次外节点与该边缘节点连接;普通节点为网络中除根节点、边缘节点和次外节点之外的节点。
可理解,一个节点的节点类型可以是一个;或者,一个节点的节点类型还可以是多个。示例性的,网络中的某个节点的节点类型可以为次外节点,还可以为普通节点。
在一种可能的实现方式中,第一节点获取第一节点在网络中的节点类型,以及第二节点在网络中的节点类型,包括:第一节点获取第一节点的节点类型;以及接收来自第二节点的第二消息,该第二消息中携带第二节点的节点类型。
本申请实施例中,第一节点可以根据网络的拓扑结构获取其节点类型。
在一种可能的实现方式中,第一节点获取第一节点在网络中的节点类型,以及第二节点在网络中的节点类型,包括:第一节点接收来自根节点的第五消息,该第五消息携带第一节点的节点类型;以及接收来自第二节点的第二消息,第二消息携带第二节点的节点类型。
在一种可能的实现方式中,第一节点的节点类型为根节点;或者,第一节点的节点类型为边缘节点。该情况下,第一路由域标识可以由第一节点生成。
在一种可能的实现方式中,第一节点的节点类型为普通节点,第二节点的节点类型为次外节点或普通节点。该情况下,第一路由域标识可以由其他节点(如根节点或边缘节点)生成,即该第一路由域标识可以由第一节点从其他节点获取。
在一种可能的实现方式中,节点类型包括第一级节点、第二级节点。或者,节点类型还包括第三级节点。可理解,该第一级节点、第二级节点和第三级节点还可能包括其他名称等,本申请实施例对此不作限定。
在一种可能的实现方式中,第一节点通过第一端口向第二节点发送第一消息,包括:在网络的拓扑结构发生变化的情况下,第一节点通过第一端口向第二节点发送第一消息;其中,第一节点和/或第二节点为节点类型发生变化的节点;或者,第一节点和/或第二节点为新增的节点。
本申请实施例中,在网络的拓扑结构发生变化的情况下,重新配置节点类型发生变化的节点的一个或多个端口所在的路由域标识。示例性的,第一节点相对于第二节点的节点类型发生变化,则重新配置第一端口和/或第二端口的路由域标识即可。然而,若第一节点相对于第四节点的节点类型未发生变化,则该第一节点与该第四节点通信时的端口所在的路由域标识可不重新配置。
本申请提供的技术方案,避免了全网重新划分路由域,通过调整少量节点的路由域标识,就可以实现重新对网络进行路由域部署,提高了重新部署的效率,提升了网络的动态 适应性。
第二方面,本申请提供一种配置路由域标识的方法,该方法包括:第二节点通过第二端口接收来自第一节点的第一消息,该第一消息携带第一路由域标识,且该第一消息用于指示第二节点配置第二节点的第二端口的路由域标识为第一路由域标识,第一节点的第一端口的路由域标识为第一路由域标识,第一端口为第一节点发送第一消息的端口;第二节点配置第二端口的路由域标识为第一路由域标识。
在一种可能的实现方式中,第二节点配置第二端口的路由域标识为第一路由域标识之后,所述方法还包括:第二节点根据第一路由域标识与第一节点交互路由信息。
在一种可能的实现方式中,第二节点配置第二端口的路由域标识为第一路由域标识之前,所述方法还包括:第二节点确定第二节点相对于第一节点的角色信息为域学习角色。
在一种可能的实现方式中,第二节点确定第二节点相对于第一节点的角色信息为域学习角色,包括:第二节点获取第二节点在网络中的节点类型,以及第一节点在网络中的节点类型;然后该第二节点根据第二节点的节点类型和第一节点的节点类型确定第二节点相对于第一节点的角色信息为域学习角色。
在一种可能的实现方式中,第二节点获取第二节点在网络中的节点类型,以及第一节点在网络中的节点类型,包括:第二节点获取第二节点的节点类型;以及接收来自第一节点的第四消息,第四消息携带第一节点的节点类型。
在一种可能的实现方式中,第二节点获取第二节点在网络中的节点类型,以及第一节点在网络中的节点类型,包括:第二节点接收来自根节点的第七消息,第七消息携带第二节点的节点类型;以及接收来自第一节点的第四消息,第四消息携带第一节点的节点类型。
在一种可能的实现方式中,节点类型包括根节点、边缘节点、次外节点或普通节点中的一种或多种;其中,边缘节点不在其他节点到根节点的最短路径上,其他节点为网络中除边缘节点和根节点之外的节点;次外节点在边缘节点到根节点的最短路径上,次外节点与边缘节点连接;普通节点为网络中除根节点、边缘节点和次外节点之外的节点。
在一种可能的实现方式中,节点类型包括第一级节点、第二级节点。或者,节点类型还包括第三级节点。
在一种可能的实现方式中,第一节点的节点类型为根节点;或者,第一节点的节点类型为边缘节点;或者,第一节点的节点类型为普通节点,第二节点的节点类型为次外节点或普通节点。
在一种可能的实现方式中,所述方法还包括:第二节点通过第三端口向第三节点发送第八消息,第八消息携带第一路由域标识,第八消息用于指示第三节点配置第三节点的第四端口的路由域标识为第一路由域标识,第三端口的路由域标识为第一路由域标识;第二节点配置第三端口的路由域标识为第一路由域标识。
示例性的,如图5a所示,第一节点可以包括节点1(根节点),第二节点可以包括节点3(次外/普通节点)或节点4(次外/普通节点),第三节点可以包括节点7(次外节点)。如图5c所示,第一节点可以包括节点20(根节点),第二节点可以包括节点22(普通节点),第三节点可以包括节点24(次外节点)。
在一种可能的实现方式中,第二节点通过第二端口接收来自第一节点的第一消息,包 括:
在网络的拓扑结构发生变化的情况下,第二节点通过第二端口接收来自第一节点的第一消息;其中,第一节点和/或第二节点为节点类型发生变化的节点;或者,第一节点和/或第二节点为新增的节点。
第三方面,本申请提供一种网络设备,用于执行第一方面或第一方面的任意可能的实现方式中的方法。该网络设备包括具有执行第一方面或第一方面的任意可能的实现方式中的方法的相应单元。
例如,该网络设备可以包括收发单元和处理单元。该网络设备可以为上述第一方面中的第一节点。
第四方面,本申请提供一种网络设备,用于执行第二方面或第二方面的任意可能的实现方式中的方法。该网络设备包括具有执行第二方面或第二方面的任意可能的实现方式中的方法的相应单元。
例如,该网络设备可以包括收发单元和处理单元。该网络设备可以为上述第二方面中的第二节点。
第五方面,本申请提供一种网络设备,该网络设备包括处理器,用于执行存储器中存储的程序,当该程序被执行时,使得该网络设备执行如上述第一方面或第一方面的任意可能的实现方式所示的方法。
在一种可能的实现方式中,存储器位于上述网络设备之外。
在一种可能的实现方式中,存储器位于上述网络设备之内。
在一种可能的实现方式中,网络设备还包括收发器,该收发器,用于接收信号或发送信号。示例性的,该收发器可以用于发送第一消息。又如,该收发器还可以用于接收第二消息或第五消息等。
本申请实施例中,该网络设备可以为上述第一方面中的第一节点。
第六方面,本申请提供一种网络设备,该网络设备包括处理器,用于执行存储器中存储的程序,当该程序被执行时,使得该网络设备执行如上述第二方面或第二方面的任意可能的实现方式所示的方法。
在一种可能的实现方式中,存储器位于上述网络设备之外。
在一种可能的实现方式中,存储器位于上述网络设备之内。
在一种可能的实现方式中,网络设备还包括收发器,该收发器,用于接收信号或发送信号。示例性的,该收发器可以用于接收第一消息。又如,该收发器还可以用于接收第四消息或第七消息等。
本申请实施例中,该网络设备可以为上述第二方面中的第二节点。
第七方面,本申请提供一种网络设备,该网络设备包括处理电路和接口电路,该处理电路,用于获取第一端口的路由域标识;该接口电路,用于通过该第一端口输出第一消息;该处理电路,还用于配置第一端口的路由域标识。
示例性的,处理电路,还用于确定该网络设备相对于第二节点的角色信息为域生成角色。
示例性的,接口电路,还用于获取网络设备在网络中的节点类型,以及第二节点在网 络中的节点类型;以及处理电路,还用于根据该网络设备的节点类型和第二节点的节点类型,确定该网络设备相对于第二节点的角色信息为域生成角色。或者,处理电路,还用于获取网络设备在网络中的节点类型,接口电路,还用于获取第二节点在网络中的节点类型;以及处理电路,还用于根据该网络设备的节点类型和第二节点的节点类型,确定该网络设备相对于第二节点的角色信息为域生成角色。
示例性的,该接口电路还可以用于获取第二消息或第五消息等。
该网络设备可以为上述第一方面中的第一节点。可理解,对于第一消息、第二消息或第五消息的描述可参考第一方面,这里不再详述。
第八方面,本申请提供一种网络设备,该网络设备包括处理电路和接口电路,该接口电路用于获取第一消息;处理电路,用于配置第二端口的路由域标识。
示例性的,处理电路,还用于确定网络设备相对于第一节点的角色信息为域学习角色。
示例性的,接口电路,还用于获取该网络设备在网络中的节点类型以及第一节点在网络中的节点类型;处理电路,还用于根据该网络设备的节点类型和第一节点的节点类型确定该网络设备相对于第一节点的角色信息为域学习角色。或者,处理电路,还用于获取该网络设备在网络中的节点类型;接口电路,还用于获取第一节点在网络中的节点类型;处理电路,还用于根据该网络设备的节点类型和第一节点的节点类型确定该网络设备相对于第一节点的角色信息为域学习角色。
示例性的,该接口电路还可以用于获取第四消息或第七消息等。
示例性的,该接口电路还可以输出第八消息等。
该网络设备可以为上述第二方面中的第二节点。可理解,对于第一消息、第四消息、第七消息或第八消息的描述可参考第二方面,这里不再详述。
第九方面,本申请提供一种角色确定设备,该角色确定设备用于根据网络的拓扑结构获取本端节点的节点类型。该角色确定设备包括处理电路和接口电路,该接口电路可用于获取网络的拓扑结构,该处理电路,可用于根据网络的拓扑结构确定本端节点的节点类型。
示例性的,该本端节点可以包括第一节点或第二节点等。
或者,该角色确定设备用于根据网络的拓扑结构获取网络中各个节点的节点类型。该角色确定设备包括处理电路和接口电路,该接口电路可用于获取网络的拓扑结构,该处理电路,可用于根据网络的拓扑结构确定各个节点的节点类型。
第十方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,当其在计算机上运行时,使得上述第一方面或第一方面的任意可能的实现方式所示的方法被执行。
第十一方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,当其在计算机上运行时,使得上述第二方面或第二方面的任意可能的实现方式所示的方法被执行。
第十二方面,本申请提供一种计算机程序产品,该计算机程序产品包括计算机程序或计算机代码,当其在计算机上运行时,使得上述第一方面或第一方面的任意可能的实现方式所示的方法被执行。
第十三方面,本申请提供一种计算机程序产品,该计算机程序产品包括计算机程序或 计算机代码,当其在计算机上运行时,使得上述第二方面或第二方面的任意可能的实现方式所示的方法被执行。
第十四方面,本申请提供一种计算机程序,该计算机程序在计算机上运行时,上述第一方面或第一方面的任意可能的实现方式所示的方法被执行。
第十五方面,本申请提供一种计算机程序,该计算机程序在计算机上运行时,上述第二方面或第二方面的任意可能的实现方式所示的方法被执行。
第十六方面,本申请提供一种路由自治***,该路由自治***包括第一节点和第二节点,该第一节点用于执行上述第一方面或第一方面的任意可能的实现方式所示的方法,该第二节点用于执行上述第二方面或第二方面的任意可能的实现方式所示的方法。
在一种可能的实现方式中,该路由自治***还包括第三节点,该第三节点用于接收第二节点发送的第八消息,以及配置该第三节点的第四端口的路由域标识为第一路由域标识。
附图说明
图1是本申请实施例提供的一种划分路由域的场景示意图;
图2是本申请实施例提供的一种配置路由域标识的方法流程示意图;
图3a是本申请实施例提供的一种网络的结构示意图;
图3b是本申请实施例提供的一种网络的结构示意图;
图3c是本申请实施例提供的一种网络的结构示意图;
图4a是本申请实施例提供的一种配置路由域标识的方法流程示意图;
图4b是本申请实施例提供的一种配置路由域标识的方法流程示意图;
图4c是本申请实施例提供的一种配置路由域标识的方法流程示意图;
图5a是本申请实施例提供的与图3a对应的划分路由域的场景示意图;
图5b是本申请实施例提供的与图3b对应的划分路由域的场景示意图;
图5c是本申请实施例提供的与图3c对应的划分路由域的场景示意图;
图5d是本申请实施例提供的划分路由域的场景示意图;
图6是本申请实施例提供的一种配置路由域标识的方法流程示意图;
图7a是本申请实施例提供的划分路由域的场景示意图;
图7b是本申请实施例提供的划分路由域的场景示意图;
图8是本申请实施例提供的一种网络设备的结构示意图;
图9是本申请实施例提供的一种网络设备的结构示意图;
图10是本申请实施例提供的一种网络设备的结构示意图;
图11是本申请实施例提供的一种路由自治***的示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地描述。
本申请的说明书、权利要求书及附图中的术语“第一”和“第二”等仅用于区别不同对象, 而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、***、产品或设备等,没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元等,或可选地还包括对于这些过程、方法、产品或设备等固有的其它步骤或单元。
在本文中提及的“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员可以显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上,“至少两个(项)”是指两个或三个及三个以上,“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”。
以下详细介绍本申请涉及的术语。
路由自治***(autonomous system,AS);在网络中,一个路由自治***是一个有权自主决定该路由自治***内采用何种路由协议的小型单位。换句话说,一个路由自治***内的所有路由器可以运行相同的路由协议等,不同路由自治***运行的路由协议可以相同,也可以不同。一个路由自治***包括一个或多个路由域。可理解,本申请实施例中示出的网络可理解为路由自治***。
路由域标识(area identification,area ID):用于识别路由域;或者,通过该路由域标识可以区分不同的路由域。示例性的,一个路由域内的不同节点可以根据该路由域的路由域标识来交互路由信息。示例性的,两个路由域的节点之间交互路由信息时,可以根据该两个路由域的边界节点来交互路由信息。
可理解,本申请示出的路由域标识也可以称为路由域编号、路由域标识符、域编号或域标识符等。
路由信息:可以存储于路由表(routing table)或路由择域信息库(routing information base,FIB)等中。路由信息可以用于指示网络设备对报文进行路由查询或选择路径等。如该路由信息可以用于指示报文在网络中转发时从源端到目的端如何选取路径。
域学习角色:用于学习其他节点发送的路由域标识,从而为端口(与其他节点之间的端口)配置学习到的路由域标识。
域生成角色:用于生成路由域标识。在一些实现方式中,域生成角色可以向其他节点发送生成的路由域标识;在另一些实现方式中,域生成角色可以向其他节点扩散学习到的路由域标识。
可理解,在一些实现方式中,网络中的某个节点可以是域生成角色;在另一些实现方式中,该某个节点还可以是域学习角色;在又一些实现方式中,该某个节点还可以既是域生成角色,又可以是域学习角色。
第一消息:一个节点接收到另一个节点发送到的第一消息,则该一个节点可以学习该第一消息中携带的路由域标识,从而配置端口(即接收第一消息的端口)的路由域标识为该第一消息中携带的路由域标识。换句话说,该第一消息的作用可以是指示接收该第一消息的节点学习第一消息中携带的路由域标识。
一般的,网络中的节点需要根据管控设备统一下发的路由域标识配置路由域标识,从而实现划分路由域的目的。进一步的,当网络增大到一定规模时,管控设备不仅需要考虑到每个节点的拓扑情况,而且还需要考虑接口类型、流量的分布和走向等,导致管控设备下发路由域标识的效率低下,节点配置路由域标识的效率低下。特别是当网络中的拓扑发生变化或网络出现扩容、减容的情况下,管控设备都需要重新规划路由域标识。
鉴于此,本申请提供一种配置路由域标识的方法,避免了管控设备逐一下发路由域标识,配置域归属信息,提高了控制面或管理面的通信效率,降低了控制面或管理面的负载。进一步的,网络中的节点之间可以相互学习路由域标识,从而实现自动划分路由域的目的,提高节点配置路由域标识的效率。
本申请提供的方法可以应用于企业组网场景,同时也适用于园区网、校园网、数据中心等组网场景。在上述组网场景下,网络一般是分层次存在的。示例性的,类似于图1所示的网络,如图1所示,核心层可以视为最上层节点,接入层可以视为最下层节点,最下层的节点可以更靠近终端设备。同时,为了支撑大规模终端设备接入,越接近终端设备的层次,节点的扇出链路数量越多。同时考虑网络扩展的情况,以及上述组网模式或物理部署的约束等,通常网络的扩展方向是纵向增加汇聚层或接入层等来扩展规模。
可理解,以上示出的企业组网、园区网、校园网或数据中心等,可理解为上文介绍的路由自治***。示例性的,图1示出的网络可以理解为路由自治***,图1中划分的域(area)0、area1、area2可理解为3个路由域,0、1、2可理解为路由域标识。
在上述组网场景下,需要对网络划分路由域,从而使得一个路由域内的节点可以交互路由信息。进一步的,本申请提供的方法可应用于路由协议,该路由协议包括开放式最短路径优先(open shortest path first,OSPF)路由协议、中间***到中间***(intermediate system-to-intermediate system,IS-IS)路由协议、内部网关路由协议(interior gateway routing protocol,IGRP)等。
本申请提供的配置路由域标识的方法可应用于网络中的第一节点和第二节点,该第一节点和该第二节点可以为网络设备,该网络设备可以包括交换机、路由器或无线接入点(access point,AP)等。本申请实施例对于该第一节点和第二节点的具体类型不作限定。
参见图2,图2是本申请实施例提供的一种配置路由域标识的方法流程示意图。如图2所示,该方法包括:
201、第一节点获取该第一节点的第一端口的路由域标识。
示例性的,该第一端口的路由域标识可以为第一路由域标识,即该第一节点可以获取该第一路由域标识。该第一路由域标识用于区分网络中的其他路由域标识,只要网络中的路由域标识互不重叠(或互不相同),本申请实施例对于第一路由域标识的生成算法不作限定。示例性的,如该第一路由域标识可以是节点的设备编号、节点的物理地址或IP地址等。 又如该第一路由域标识可以根据路由协议的规定生成等。
在一些实现方式中,第一路由域标识可以由第一节点生成。该第一路由域标识可以是该第一节点的设备编号、物理地址或IP地址等;或者,该第一路由域标识还可以是与该第一节点连接的对端节点的设备编号、物理地址或IP地址等。可选的,第一节点生成第一路由域标识之前,该第一节点还可以确定该第一节点相对于第二节点的角色信息为域生成角色,从而生成第一路由域标识。或者,该第一节点还可以获取其节点类型和第二节点的节点类型,根据该第一节点的节点类型和第二节点的节点类型生成第一路由域标识。
在另一些实现方式中,第一路由域标识可以由其他节点生成,且通过该其他节点发送给第一节点。该其他节点为网络中除第一节点和第二节点之外的节点。可选的,该第一节点向第二节点发送第一消息之前,该第一节点还可以确定该第一节点相对于第二节点的角色信息为域生成角色,从而向第二节点发送第一消息。或者,该第一节点还可以获取其节点类型和第二节点的节点类型,根据该第一节点的节点类型和第二节点的节点类型向第二节点发送第一消息。
换句话说,上述第一节点获取第一路由域标识包括:第一节点生成该第一路由域标识;或者,该第一节点接收其他节点发送的第一路由域标识。该其他节点生成第一路由域标识的方法,可参考第一节点生成第一路由域标识的方法,这里不再详述。对于生成路由域标识或接收其他节点发送的路由域标识的详细描述,可参考图6,这里先不详述。
对于第一节点确定该第一节点相对于第二节点的角色信息为域生成角色的方法,以及该第一节点获取其节点类型和第二节点的节点类型,可参考图4a和图4b,这里先不详述。
202、第一节点通过第一端口向第二节点发送第一消息,该第一消息携带第一路由域标识,该第一消息用于指示第二节点配置第二节点的第二端口的路由域标识为第一路由域标识,第二端口为第二节点接收第一消息的端口。相应的,第二节点通过第二端口接收该第一消息。
一般而言,一个节点可以包括一个或多个端口,示例性的,一个节点可以与多个节点连接,则该一个节点便可以通过多个端口与该多个节点交互消息。
上述第一端口和第二端口仅为示出的节点之间交互消息时的一对端口,第一节点和其他节点之间还可能有其他端口等,本申请实施例对此不作限定。该其他节点为网络中除第一节点和第二节点之外的节点。
可理解,在第一节点与第二节点之间有多个端口的情况下,该第一节点和该第二节点同样适用于本申请实施例所提供的方法。示例性的,该多个端口可以理解为一个逻辑端口;或者,第一节点可以通过其中的一条路径与第二节点连接等,本申请实施例对此不作限定。
本申请实施例中,第一消息用于指示第二节点配置第二端口的路由域标识为第一路由域标识。也就是说,第二节点接收到第一消息后,该第二节点可以学习到第一端口的路由域标识,从而设置第二端口的路由域标识为第一路由域标识。
在一些实现方式中,第二节点接收到第一消息后,可以直接学习该第一路由域标识如步骤204。
在另一些实现方式中,第二节点还可以根据一些条件来确定是否学习该第一路由域标识。示例性的,该第二节点确定第二节点相对于第一节点的角色信息为域学习角色的情况 下,该第二节点学习该第一路由域标识。示例性的,该第二节点还可以根据其节点类型和第一节点的节点类型来确定是否学习该第一路由域标识(如是否配置第二端口的路由域标识为第一路由域标识)。对于该第二节点确定其角色信息的方法,以及该第二节点获取其节点类型和第一节点的节点类型的方法,可参考图4a和图4c,这里先不详述。
在一些实现方式中,第一节点可以以预置时间间隔向第二节点发送第一消息;或者,该第一节点还可以以预置频率向第二节点发送第一消息等。对于该预置时间间隔或预置频率的具体取值本申请实施例不作限定。例如,该预置时间间隔或预置频率可以由第一节点设置或其他节点设置或人为设置等。该其他节点可以网络中除第一节点之外的节点。
在另一些实现方式中,该第一节点还可以在网络的拓扑结构发生变化的情况下,向第二节点发送第一消息。该情况下,第一节点和/或第二节点可以为新增的节点;或者,该第一节点和/或第二节点为拓扑结构发生变化的节点(如节点类型发生变化的节点等)等。换句话说,在网络出现扩容或减容的情况下,第一节点可以通过第一端口向第二节点发送第一消息。或者,在网络断电等情况下,第一节点也可以通过第一端口向第二节点发送第一消息。
可理解,本申请实施例对于第一节点何时发送第一消息不作限定。
203、第一节点配置第一端口的路由域标识为第一路由域标识。
可理解,对于步骤202和步骤203的先后顺序,本申请实施例不作限定。
可理解,对于步骤201和步骤203的先后顺序,本申请实施例也不作限定。
204、第二节点配置第二端口的路由域标识为第一路由域标识。
在一种可能的实现方式中,图2所示的方法还可以包括:
205、第一节点根据第一路由域标识与第二节点交互路由信息。相应的,第二节点根据该第一路由域标识与第一节点交互路由信息。
在一些实现方式中,第一节点和第二节点可以为网络中相邻的两个节点,该情况下,第一节点可以向相邻的节点(如第二节点)发送第一消息。可选的,第一节点可以向下行链路相邻的节点发送第一消息;或者,该第一节点还可以向上行链路相邻的节点发送该第一消息。
在另一些实现方式中,该第一节点和该第二节点还可以不相邻,该情况下,如第一节点可以向多个节点发送第一消息,至于该多个节点是否学习第一路由域标识,可以根据本申请实施例示出的条件来确定。示例性的,该多个节点可以根据各自的节点类型、相邻节点或第一节点的节点类型来确定是否学习该第一路由域标识。
本申请实施例中,第一节点和第二节点之间通过交互消息,第二节点就可以学习到第一节点获取到的第一路由域标识(即第一端口的路由域标识),从而配置第二端口的路由域标识为第一路由域标识。相对于各个节点通过管控设备下发路由域标识配置路由域标识的方法,避免了节点等待人工或管控设备下发路由域标识。节点之间可以相互学习路由域标识,当网络中的节点协商一致,则实现了自动划分路由域的目的,提高了节点配置路由域标识的效率。
以下将首先介绍本申请中涉及的节点类型,然后介绍节点确定角色信息的方法,最后 结合具体场景介绍本申请示出的配置路由域标识的方法。
在一些实现方式中,节点类型可以包括第一级节点和第二级节点。该情况下,网络中各节点的节点类型可以由根节点确定;或者,由其他节点确定等,该其他节点为网络中除根节点之外的节点。或者,网络中各节点的节点类型还可以由相关设备确定等,本申请实施例对于如何确定节点的节点类型不作限定。
示例性的,第一节点的节点类型可以为第一级节点,第二节点的节点类型可以为第二级节点,由此第二节点可以学习第一节点通过第一消息发送的第一路由域标识,从而配置第二端口的路由域标识为第一路由域标识。
可选的,节点类型还可以包括第三级节点。该情况下,第一级节点生成路由域标识如第二路由域标识之后,向第三级节点发送携带该第二路由域标识的消息。然后该第三级节点配置端口(接收第二路由域标识的端口)的路由域标识为第二路由域标识,同时,该第三级节点还可以向第二级节点扩散其学习到的第二路由域标识。第二级节点接收到该第二路由域标识后,配置端口(接收第二路由域标识的端口)的路由域标识为该第二路由域标识。
该情况下,节点获知了其节点类型以及相邻节点的节点类型后,便可以生成路由域标识;或学习路由域标识等。
可理解,以上示出的第一级节点、第二级节点和第三级节点仅为示例,本申请实施例对其名称不作限定。例如第一级节点还可以称为A类节点,第二级节点还可以称为B类节点,第三级节点还可以称为C类节点等。
在另一些实现方式中,节点类型可以包括根节点,边缘节点、次外节点和普通节点。以下将以节点类型包括根节点,边缘节点、次外节点和普通节点为例示出本申请提供的方法。
1)根(root)节点,可以为网络中的核心节点;或者,可以为网络中的中心位置。例如,网络中多数节点互相访问时,该多数节点需要经过该根节点。又例如,根节点到其他节点的最短路径均方差最小,换句话说根节点是距离网络中的其他节点的最短路径均方差最小的点。示例性的,该根节点可以人为配置;或者,该根节点还可以由其他设备或装置指定等;或者,该根节点还可以通过相关的协商竞争确定等,本申请实施例对于根节点的确定方法不作限定。该其他节点为网络中除根节点之外的节点。可选的,网络中可以包括一个或多个根节点。网络中包括多个根节点,也就是说,网络中其他节点到该多个根节点的最短路径均方差最小。该情况下,该多个根节点可能相互之间的距离较短,因此在一种可能的实现方式中,该多个根节点相对于网络中的其他类型的节点,可以是根节点集群。换句话说,其他类型的节点向该多个根节点中的一个根节点发送消息时,将该消息发送给该根节点集群。至于是否将该消息具体发送到某一个根节点,本申请实施例不作限定。
2)边缘(edge)节点,不在其他节点到根节点的最短路径上。该边缘节点可以与终端设备连接;或者,该边缘节点可以是网络中最边缘的节点,即该边缘节点的下行链路可以不与其他设备连接。可选的,边缘节点的下行链路还可以连接其他节点等,本申请实施例对于该边缘节点的下行链路是否连接终端设备或其他节点等不作限定。
示例性的,确定边缘节点的方法可以包括:如对于网络中的节点i,计算节点i到根节 点的最短路径,当节点i不在其他节点到根节点的最短路径上时,则该节点i为边缘节点。其他节点为网络中除节点i和根节点之外的节点。
可选的,当网络中有且仅有一个节点i,则该节点i既可以是根节点,又可以是边缘节点。
3)次外节点,位于根节点到边缘节点的最短路径上。该次外节点通常与边缘节点连接,如该次外节点可以位于边缘节点的上行链路上。
示例性的,确定次外节点的方法可以包括:如对于网络中的节点i,当网络中存在至少一个边缘节点j,节点i位于节点j到根节点的至少一条最短路径上,则该节点i为次外节点。进一步的,该节点i与节点j存在至少一条直连链路。
4)普通节点,可以为网络中除了上述根节点、边缘节点和次外节点之外的节点。普通节点通过可以在网络中起到连接根节点、其他普通节点或次外节点的作用。
示例性的,确定普通节点的方法可以包括:如对于网络中的节点i,当节点i不是根节点,不是边缘节点,且不是次外节点时,该节点i为普通节点。又如,节点i不是根节点,不是边缘节点,且存在节点j为次外节点,节点i位于节点j到根节点的最短路径上,则该节点i为普通节点。
可理解,在一些实现方式中,上述节点i为根节点、边缘节点、次外节点和普通节点中的任一种节点。在另一种实现方式中,上述节点i可能有多个节点类型,如相对于边缘节点,节点i可以为次外节点;相对于次外节点,节点i还可以为普通节点。
为更形象理解上述节点类型,参见图3a,图3a是本申请实施例提供的一种网络的架构示意图。
图3a中,节点8不在其他节点到根节点(即节点1)的最短路径上,因此该节点8为边缘节点。同样的,节点2、节点5和节点6均为边缘节点。
节点7位于节点8到根节点的最短路径上,该节点7与边缘节点(节点8)连接,因此该节点7为次外节点。其中,节点8到根节点的最短路径可以为节点8->节点7->节点4->根节点;或者节点8->节点7->节点3->根节点。
对于节点5或节点6来说,节点3位于节点5或节点6到根节点的最短路径上,因此该节点3为次外节点。对于节点7来说,节点3位于次外节点(即节点7)到根节点的最短路径上,且该节点3不是根节点,由此该节点3为普通节点。同样的,对于节点5或节点6来说,节点4为次外节点。对于节点7来说,节点4为普通节点。
同时,节点2(边缘节点)的上行链路连接根节点,下行链路连接终端设备。节点8的上行链路连接次外节点,下行链路可以不连接终端设备,该情况下,节点8即可以称为网络中最边缘的节点。节点5或节点6的上行链路连接节点3和节点4,下行链路连接终端设备。节点7的上行链路连接节点3和节点4,下行链路连接边缘节点(即节点8)。
可理解,本申请示出的上行链路或下行链路是相对于其他节点到根节点的最短路径所在的方向而言的。例如,节点7位于节点8到根节点的最短路径上,因此该节点8的上行链路连接的节点为节点7。又例如,节点3位于节点3到根节点的最短路径上,因此该节点3的上行链路连接的节点为根节点;对应的,节点3下行链路连接的节点为节点6或节点5。可理解,对于上行链路或下行链路的定义方式,本申请实施例不作限定。
参见图3b,图3b是本申请实施例提供的一种网络的架构示意图。图3b中,网络包括两层节点组网,该情况下,网络中的节点可以包括根节点和边缘节点。如图3b所示,根节点10可以与边缘节点11、边缘节点12、边缘节点13或边缘节点14连接。
参见图3c,图3c是本申请实施例提供的一种网络的架构示意图。确定节点类型的方法包括:1)确定节点20为根节点。
2)以根节点为基础,根节点到其他节点v的最短路径有:节点20->节点21,节点20->节点21->节点23,节点20->节点22,节点20->节点22->节点24,节点20->节点22->节点24->节点25。
3)确定网络中除根节点之外的其他节点的节点类型,当某个节点的判断条件不充分时,可以先确定其他节点的节点类型。
例如,对于节点21,根据上述最短路径可知,该节点21与根节点直连,且节点21位于节点23到根节点的最短路径上(节点20->节点21->节点23),则该节点21不是边缘节点,有可能是普通节点或次外节点。因为节点21位于节点23到根节点的最短路径上,因此节点21的节点类型依赖于节点23的节点类型。由此可先确定节点23的节点类型,由于节点23不在其他节点到根节点的最短路径上,因此该节点23的节点类型为边缘节点,同时可确定节点21的节点类型为次外节点。
同样的,节点25不在其他节点到根节点的最短路径上,因此节点25为边缘节点。节点24位于节点25到根节点的最短路径上(节点20->节点22->节点24->节点25),且与节点25连接,因此节点24的节点类型为次外节点。节点22位于次外节点与根节点之间,且该节点22未连接边缘节点,因此该节点22为普通节点。
以上确定网络中节点的节点类型的方法仅为示例。在具体实现中,如上述确定网络中各节点的节点类型的方法可以由根节点和/或其他节点执行等,本申请实施例对此不作限定。对于确定节点类型的方法可参考图4a至图4c所示的方法。
以上示出了节点类型的确定方法,以下详细介绍不同节点连接时,角色信息的确定方法。
根节点和其他节点连接时,该根节点的角色信息为域生成角色,该其他节点需要学习从根节点获取到的路由域标识。该其他节点包括边缘节点、次外节点或普通节点。可选的,根节点可以向相邻的节点发送生成的路由域标识;或者,该根节点还可以向下行链路上次外节点或普通节点发送生成的路由域标识。如图3a所示,节点1相对于节点2、节点3和节点4为域生成角色。节点1可以向节点2、节点3和节点4发送生成的路由域标识;或者,该节点1还可以向节点7发送生成的路由域标识。该情况下,节点7可以根据上行链路节点4的节点类型以及下行链路节点8的节点类型确定其与节点4连接的端口的路由域标识。同时,节点7还可以根据上行链路节点3的节点类型以及下行链路节点8的节点类型确定其与节点3连接的端口的路由域标识。
可理解,在一些实现方式中,与该根节点连接的所有节点的路由域标识可以为根节点生成的路由域标识。示例性的,若路由协议规定根节点所在的路由域为零域,则与该根节点连接的所有节点的至少一个端口的路由域标识为零。如图5a所示,节点2的端口4、节 点3的端口5、节点4的端口13和端口14所在的路由域标识均为0。在另一些实现方式中,当根节点直接与边缘节点连接时,该根节点所在的路由域可以由边缘节点的数量确定。如图5b所示,根节点所在的路由域包括4个。或者,当根节点直接与边缘节点连接时,边缘节点所在的路由域可以相同,例如,图5b中,节点11、节点12、节点13、节点14和节点10可以在同一个路由域中,如路由域标识为area0。
边缘节点和其他节点连接时,该边缘节点的角色信息为域生成角色,该其他节点需要学习从边缘节点获取到的路由域标识。该其他节点包括普通节点或次外节点。换句话说,该边缘节点可以生成路由域标识,该情况下,边缘节点的所有端口的路由域标识可以为该边缘节点生成的路由域标识。但是不同的边缘节点所在的路由域标识不相同。如图3a所示,节点8相对于节点7为域生成角色;节点5或节点6相对于节点3和节点4为域生成角色。示例性的,如图5a所示,节点8生成的路由域标识为标识3(area3),节点5生成的路由域标识为标识4(area4),节点6生成的路由域标识为标识5(area5),则该节点8所有端口的路由域标识均为标识3,节点5所有端口的路由域标识均为标识4,节点6所有端口的路由域标识均为标识5。
图3a的虚线部分表示节点5和节点6之间也可以连接,但是本申请实施例中节点5和节点6在不同的路由域,因此节点5和节点6不可以通过路由域直接交互路由信息。图3a中节点7和节点6之间的虚线部分表示该节点6和节点7也可以连接,但是节点7不在节点6到根节点的最短路径上,因此节点6和节点7不在同一个路由域。示例性的,节点6和节点7交互路由信息时,可以通过节点3或节点4来交互路由信息。
图5b中,节点11、节点12、节点13和节点14分别属于不同的路由域,尽管节点12、节点13和节点14之间可以连接,图5b中节点12、节点13和节点14之间不可以通过路由域直接交互路由信息。
然而,在边缘节点与根节点连接时,根节点的角色信息可以为域生成角色;或者,边缘节点的角色信息为域生成角色,本申请实施例对于类似图3b的网络的角色信息不作限定。可选的,若路由协议中规定路由域必须有零域,则图3b中根节点可以作为域生成角色,该情况下,根节点可以确定不同的路由域标识,其中一个路由域标识可以为0。如果边缘节点作为域生成角色,由于相互之间可能无法确定由哪个边缘节点生成0域,因此根节点可以作为域生成角色。
可理解,当网络中有多个边缘节点与根节点连接,且该根节点还连接有其他类型的节点时,该多个边缘节点可以为域学习角色。该情况下,该多个边缘节点所在的路由域标识可以由根节点确定。换句话说,该情况下,该多个边缘节点所在的路由域标识可以相同。然而,网络中还有其他不与根节点连接的边缘节点时,该不与根节点连接的边缘节点可以生成路由域标识。如图5d所示,基于图3a所示的网络,在网络中增加了节点9,且该节点9与根节点连接。该情况下,节点9所在的路由域标识也为area0。由于节点9和节点2相对于根节点为域学习角色,所以该节点9和该节点2所在的路由域标识为area0(即相同)。然而,节点5、节点6和节点8为域生成角色,因此该节点5、节点6和节点8所在的路由域标识不相同。可理解,图5d中未示出各个节点的端口标识以及除了area0之外的路由域标识,但是不应将其理解为对本申请实施例的限定。可理解,本申请实施例中的端口标识 还可以称为端口号、端口编号等,本申请实施例对其名称不作限定。
对于该说明,本申请同他实施例同样适用。为便于描述,在根节点与边缘节点连接时,以下将以根节点为域生成角色为例说明本申请提供的方法。
普通节点可以学习从根节点获取到的路由域标识,以及还可以向其他邻接的非根节点发送从根节点学习到的路由域标识。如图3a所示,节点4(普通节点)可以向节点7(次外节点)发送从根节点学习到的路由域标识。换句话说,节点7不仅需要学习从节点4获取到的路由域标识,还需要学习从节点8获取到的路由域标识。
如图3b所示,节点11、节点12、节点13和节点14可以分别学习从根节点获取到的路由域标识。
可选的,普通节点还可以与普通节点连接,该情况下,两个普通节点所属的路由域标识可以由根节点确定等。示例性的,普通节点与普通节点连接时,可以由先学习到路由域标识的普通节点向另一个普通节点扩散其学习到的路由域标识。示例性的,普通节点与普通节点连接时,当两个普通节点学习到的路由域标识不同时,可以将其中任一个路由域标识作为两个普通节点之间连接端口的路由域标识。
可理解,网络中除普通节点之外,其他节点均有可能直接连接终端设备。示例性的,如根节点连接终端设备时,该根节点的所有端口的路由域标识均可以由根节点生成。如边缘节点连接终端设备,则连接终端设备的端口所在的路由域标识可以与该边缘节点所在的路由域标识相同等,本申请实施例不作限定。如次外节点连接终端设备,则连接终端设备的端口所在的路由域标识可以与边缘节点所在的路由域标识相同;或者,也可以与根节点或普通节点所在的路由域标识相同等,本申请实施例对此不作限定。
以上示出了网络中各节点的节点类型的确定方法,以下结合节点类型说明本申请实施例提供的配置路由域标识的方法。
参见图4a,图4a是本申请实施例提供的一种配置路由域标识的方法流程示意图。该方法可以应用于第一节点,如图4a所示,该方法包括:
在一种可能的实现方式中,图4a所示的方法包括步骤411和步骤412。
411、第一节点获取该第一节点在网络中的节点类型,以及第二节点在该网络中的节点类型。
对于步骤411可以参考图4b所示的三种方法,以下分别示出。
方法一、
第一节点接收来自根节点的第五消息,该第五消息携带第一节点的节点类型;
该第一节点接收来自第二节点的第二消息,该第二消息中携带第二节点的节点类型。
示例性的,该第一节点的节点类型可以为边缘节点,第二节点的节点类型为除边缘节点和根节点之外的次外节点或普通节点。该情况下,第一路由域标识可以由第一节点生成,从而第一节点向第二节点发送第一消息。
示例性的,该第一节点的节点类型可以为普通节点,第二节点的节点类型为次外节点或者普通节点。该情况下,第一路由域标识可以由第一节点从其他节点获取。示例性的,如该第一路由域标识可以由第一节点从根节点获取;或者,从其他普通节点获取等。从而 第一节点可以向第二节点发送第一消息。
可选的,上述第五消息中还可以携带第一节点到根节点的上行链路的端口标识。第二消息中还可以携带上行链路的端口标识如第二端口。可理解,对于第五消息或第二消息中是否携带端口标识,本申请实施例不作限定。
本申请实施例中,根节点根据网络的拓扑情况获取其他节点的节点类型,以及向该其他节点发送该其他节点的节点类型,统一由根节点确定或计算节点类型,简单可行,提高了其他节点获取节点类型的效率。
方法二、
第一节点获取该第一节点的节点类型;
该第一节点接收来自第二节点的第二消息,该第二消息中携带第二节点的节点类型。
在一些实现方式中,第一节点可以根据网络的拓扑结构获取该第一节点在网络中的节点类型。第一节点可以根据图3a至图3c所示的方法获取该第一节点的节点类型。同时,第二节点也可以根据该网络的拓扑结构获取该第二节点在网络中的节点类型,从而第二节点可以向第一节点发送节点类型通知消息(即第二消息)。在另一些实现方式中,第一节点还可以根据该第一节点与相邻节点的连接关系获取该第一节点的节点类型,第二节点也可以根据该第二节点与相邻节点的连接关系获取该第二节点的节点类型。本申请实施例对于该第一节点如何获取该第一节点的节点类型不作限定。可理解,本申请实施例对于第二节点如何获知其节点类型的方法也不作限定。除了上述介绍的方法该第二节点可以从根节点获取该第二节点的节点类型。
示例性的,第一节点的节点类型可以为根节点,第二节点的节点类型为除根节点之外的边缘节点、次外节点或普通节点。或者,第一节点的节点类型为边缘节点,第二节点的节点类型为除边缘节点和根节点之外的次外节点或普通节点。该情况下,第一路由域标识可以由第一节点生成,从而第一节点向第二节点发送第一消息。
示例性的,第一节点的节点类型为普通节点,第二节点的节点类型为次外节点或者普通节点。该情况下,第一路由域标识可以由第一节点从其他节点获取。示例性的,如该第一路由域标识可以由第一节点从根节点获取;或者,从其他普通节点获取等。从而第一节点可以向第二节点发送第一消息。
方法三、
第一节点接收来自根节点的第三消息,该第三消息携带第一节点的节点类型和第二节点的节点类型。
方法三中根节点可以以广播的形式下发第三消息,即该第三消息中可以携带网络中各个节点的节点类型。该情况下,根节点可以根据网络的拓扑结构获取网络中各个节点的节点类型。根节点可以根据图3a至图3c所示的方法获取各个节点的节点类型。
示例性的,第一节点的节点类型可以为边缘节点,第二节点的节点类型为除边缘节点和根节点之外的次外节点或普通节点。或者,第一节点的节点类型普通节点,第二节点的节点类型为次外节点或普通节点。对于方法三的具体实现方式,可参考方法一或方法二,这里不再一一详述。
可选的,第三消息中可以携带第一节点的标识信息和该第一节点的节点类型,以及第 二节点的标识信息和该第二节点的节点类型。从而各个节点接收到该第三消息之后,可以根据标识信息获知属于自己的节点类型。
可选的,第三消息中还可以携带第一节点的端口标识和第二节点的端口标识。换句话说,该第三消息可以携带网络中各节点的节点类型,以及该各节点的端口标识。第三消息中通过包括各节点的端口标识,可以使得各节点获知其与其他节点连接的端口标识,从而各节点可以根据该端口标识以及接收到的路由域标识配置路由域标识。示例性的,第一节点接收到第三消息后,该第一节点可以获知第一端口的端口标识,从而该第一节点在生成第一路由域标识后,将该第一端口的路由域标识配置为第一路由域标识。同时,该第一节点向第二节点发送第一消息,第二节点接收到第一消息后,可以配置第二端口的路由域标识为该第一路由域标识。可理解,以上仅为示例,本申请实施例对于第三消息中是否携带端口标识不作限定。
412、第一节点根据第一节点的节点类型和第二节点的节点类型,确定第一节点相对于第二节点的角色信息为域生成角色。
对于第一节点如何确定其角色信息为域生成角色,可参考步骤411的具体描述,这里不再详述。
在一些实现方式中,第一节点可以执行步骤411,然后获取第一路由域标识(即第一端口的路由域标识);
在另一些实现方式中,第一节点还可以执行步骤411和步骤412,然后获取第一路由域标识。
413、第一节点获取该第一节点的第一端口的路由域标识。
示例性的,该第一端口的路由域标识可以为第一路由域标识。第一节点为根节点或边缘节点时,该第一节点可以生成第一路由域标识;或者,第一节点为普通节点时,该第一节点可以从根节点接收第六消息,该第六消息携带根节点生成的第一路由域标识。
414、第一节点通过第一端口向第二节点发送第一消息,该第一消息携带第一路由域标识,该第一消息用于指示第二节点配置第二节点的第二端口的路由域标识为第一路由域标识,第二端口为第二节点接收第一消息的端口。相应的,第二节点通过第二端口接收该第一消息。
可选的,该第一消息中还可以携带第一节点的节点类型;或者,该第一消息中还可以携带指示信息,该指示信息用于指示第一节点相对于第二节点的角色信息为域生成角色。该情况下,第二节点接收到第一消息之后,可以根据第一节点的节点类型或指示信息来确定是否执行步骤418。或者,该第二节点还可以根据步骤416和步骤417来确定是否执行步骤418等。
415、第一节点配置第一端口的路由域标识为第一路由域标识。
在一种可能的实现方式中,图4a所示的方法还可以包括步骤416和步骤417。
416、第二节点获取第二节点在网络中的节点类型,以及第一节点在网络中的节点类型。
参考上述步骤411,对于步骤416可以参考图4c所示的三种方法,以下分别示出。
方法一、
第二节点接收来自根节点的第七消息,该第七消息携带第二节点的节点类型;
该第二节点接收来自第一节点的第四消息,该第四消息携带第一节点的节点类型。
可理解,对于第七消息的描述可参考第五消息的介绍,对于第四消息的描述可参考第二消息的介绍,这里不再详述。
方法二、
第二节点获取该第二节点的节点类型;
以及该第二节点接收来自第一节点的第四消息,该第四消息携带第一节点的节点类型。
对于第二节点如何获取该第二节点的节点类型可参考第一节点获取其节点类型的方法,这里不再详述。
方法三、
第二节点接收来自根节点的第三消息,该第三消息携带第一节点的节点类型和第二节点的节点类型。
可理解,对于步骤416的具体实现可参考步骤411,这里不再详述。
417、第二节点根据第二节点的节点类型和第一节点的节点类型,确定该第二节点相对于该第一节点的角色信息为域学习角色。
在一种实现方式中,图4a所示的方法可以包括步骤411和步骤412。
在另一种实现方式中,图4a所示的方法可以包括步骤416、步骤417。该情况下,第二节点可以执行步骤416,然后配置第二端口的路由域标识为第一路由域标识。或者,第二节点还可以执行步骤416和步骤417,然后配置第二端口的路由域标识为第一路由域标识。
在又一种实现方式中,图4a所示的方法还可以包括步骤411、步骤412和步骤416、步骤417。该情况下,第一节点和第二节点均可以确定本端相对于对端的角色信息,双重确认角色信息,保证了路由域标识配置的可靠性。
418、第二节点配置第二端口的路由域标识为第一路由域标识。
419、第一节点根据第一路由域标识与第二节点交互路由信息。相应的,第二节点根据该第一路由域标识与第一节点交互路由信息。
为更形象的理解图4a至图4c所示的方法,以下将对应图3a至图3c所示的网络为其划分路由域。参见图5a,图5a是本申请实施例提供的一种与图3a对应的划分路由域的场景示意图。
如图5a所示,节点1为根节点,如节点1可以生成零域如area0,节点1通过端口3向节点4发送携带area0的消息,节点4通过端口13接收该携带area0的消息。同样的,节点1通过端口1向节点2发送携带area0的消息,节点2通过端口4接收携带area0的消息。节点1过端口2向节点3发送携带area0的消息,节点3通过端口5接收该携带area0的消息。节点1分别配置端口1、端口2和端口3的路由域标识为area0。节点2配置端口4的路由域标识为area0,节点3配置端口5的路由域标识为area0,节点4配置端口13的路由域标识为area0。
节点4连接节点7(次外节点),且节点7为次外节点,因此,该节点4通过端口14向节点7发送携带area0的消息,节点7通过端口10接收节点4发送的携带area0的消息。节点4配置端口14的路由域标识为area0,节点7配置端口10的路由域标识为area0。
可理解,由于节点3连接节点7,参考节点4和节点7的介绍,因此节点3也需要配置端口18的路由域标识为area0,以及节点7也需要配置端口19的路由域标识为area0。
由于节点5、节点6为边缘节点,节点3分别与该节点5和节点6连接,因此节点3还需要学习节点5和节点6生成的路由域标识。节点5生成路由域标识如area4,通过端口8向节点3发送携带area4的消息。节点3通过端口6接收到该携带area4的消息后,配置端口6的路由域标识为area4。同时,由于节点4也位于节点5到根节点的最短路径上,因此节点5还需要通过端口17向节点4发送携带area4的消息,节点4通过端口15接收到该携带area4的消息后,配置端口15的路由域标识为area4。同样的,对于节点6、节点3和节点4所在的路由域标识如area5的生成或扩散方法,可参考节点5、节点3和节点4的方法,这里不再详述。同样的,节点7也需要学习节点8生成的路由域标识,如节点8通过端口12向节点7发送携带area3的消息,节点7通过端口11接收该携带area3的消息。节点8配置端口12的路由域标识为area3,节点7配置端口11的路由域标识为area3。
换句话说,端口8、端口6、端口17、端口15所在的路由域标识为area4。端口9、端口7、端口20、端口16所在的路由域标识为area5。端口12和端口11所在的路由域标识为area3。端口1、端口4、端口2、端口5、端口18、端口19、端口3、端口13、端口14、端口10所在的路由域标识为area0。
根据本申请实施例提供的方法,图3b所示的网络配置路由域标识后可如图5b所示。图3c所示的网络配置路由域标识后可如图5c所示。图5c中,尽管节点23和节点24之间可以连接,但是,节点24不在节点23到根节点的最短路径上,因此节点23可以不向节点24发送其生成的路由域标识如area2。
本申请实施例中,第一节点与第二节点通过节点类型确定各自的角色信息之后,如第一节点相对于第二节点的角色信息为域生成角色,由此该第一节点可以向第二节点发送第一消息。通过确定角色信息,然后配置路由域标识,一方面,避免了相互之间互发消息,不断确认角色信息或路由域标识的过程,提高了节点之间相互协商的效率。另一方面,节点之间可以相互学习路由域标识,实现了自动划分路由域的目的,提高了节点配置路由域标识的效率。
参见图6,图6是本申请实施例提供的一种配置路由域标识的方法流程示意图。该方法是以根节点下发各个节点的节点类型为例示出的,但是不应将其理解为对本申请实施例的限定。示例性的,如图7a所示,图7a示出的是网络中的节点分布,该网络中的节点包括根节点、节点S1、节点S2、节点S3和节点S4。以图7a所示的网络为例,图6所示的方法包括:
601、根节点向各个节点发送配置消息。
例如,根节点可以向节点S1发送配置消息(如上述第五消息),该配置消息携带节点S1的节点类型。又如,根节点向节点S2发送配置消息(如上述第七消息),该配置消息携带节点S2的节点类型。又如,根节点向节点S3发送配置消息,该配置消息携带节点S3的节点类型。又如,根节点向节点S4发送配置消息,该配置消息携带节点S4的节点类型。相应的,节点S1、节点S2、节点S3和节点S4分别接收配置消息。
为避免一个或多个接收不到根节点发送的配置消息;或者,为使得各节点获知相邻节点的节点类型,因此图6所示的方法还可以包括步骤602。相邻节点之间通过发送角色通知消息,可使得网络中的节点进一步确认各自的节点类型。以及相邻节点还可以通过该角色通知消息,确定本端相对于对端的角色信息。
602、相邻节点之间相互发送角色通知消息。
例如,根节点可以通过端口1向节点S1发送角色通知消息,该角色通知消息携带根节点的标识信息、根节点的节点类型。可选的,该角色通知消息还可以携带节点S1的标识信息(默认为空)、节点S1的节点类型(默认为空)。相应的,节点S1接收根节点发送的角色通知消息。示例性的,当根节点不知道节点S1的节点类型和标识信息时,该角色通知消息中携带的该两个信息可以默认为空。而如果节点S1已经向该根节点发送了角色通知消息,即该根节点已经获知节点S1的标识信息和节点类型的情况下,该角色通知消息中携带的该节点S1的标识信息和节点类型。通过携带对端的标识信息和节点类型,可使得对端根据该角色通知消息确认网络拓扑是否发生变化或更新等。以及对端还可以根据该角色通知消息进一步确认其角色信息是否正确。可理解,对于角色通知消息中携带对端的标识信息和节点类型的说明,以下同样适用。
又例如,节点S1可以通过端口2向根节点发送角色通知消息,该角色通知消息携带节点S1的标识信息、节点S1的节点类型(普通节点)。可选的,该角色通知消息还可以携带根节点的标识信息和节点类型。相应的,根节点接收节点S1发送的角色通知消息。
又例如,节点S1还可以通过端口3向节点S2发送该角色通知消息。该角色通知消息可以携带节点S1的标识信息、节点S1的节点类型、节点S2的标识信息和节点S2的节点类型。相应的,节点S2可以接收节点S1的发送角色通知消息。
又例如,节点S2还可以通过端口4向节点S1发送角色通知消息。该节点S2还可以通过端口5向节点S3发送角色通知消息,以及通过端口6向节点S4发送角色通知消息。又例如,节点S3可以通过端口8向节点S2发送角色通知消息,节点S4可以通过端口7向节点S2发送角色通知消息。可理解,对于角色通知消息的具体说明可参考根节点或节点S1等的说明,这里不再详述。
示例性的,节点S1与节点S2通过交互角色通知消息,可使得节点S1获知节点S2的节点类型,以及节点S2获知节点S1的节点类型,从而节点S1便可确定该节点S1相对于节点S2的角色信息,以及节点S2也可以确定该节点S2相对于节点S1的角色信息。换句话说,相邻节点之间通过交互角色通知消息,可使得本端节点获知其相对于对端节点的角色信息,使得节点可以自主生成路由域标识或学习路由域标识等,从而提高配置路由域标识的效率。
可理解,本申请实施例对于各节点发送角色通知消息的先后顺序不作限定。示例性的,如节点S1接收到了根节点发送的配置消息,则该节点S1便可以向根节点发送角色通知消息,以及向节点S2发送角色通知消息。同时,若节点S2也接收到了根节点发送的配置消息,则该节点S2可以向节点S1和节点S3发送角色通知消息。
可理解,以上所示的第二消息或第四消息,可理解为步骤602中的角色通知消息。
603、各节点确定其角色信息是域学习角色还是域生成角色。
示例性的,根节点可以确定其角色信息是域生成角色。节点S3可以确定其角色信息为域生成角色,以及通过端口8连接的节点为次外节点。节点S4可以确定其角色信息是域生成角色,以及通过端口7连接的节点为次外节点。节点S1可以确定其通过端口2连接的节点为根节点,角色信息为域学习角色;以及通过端口3连接的节点为次外节点,角色信息为域生成角色(即向节点S2扩散从根节点学习到的路由域标识)。节点S2可以确定其角色信息为域学习角色,一方面学习从节点S1学习到的路由域标识,另一方面学习从节点S3和节点S4学习到的路由域标识。也就是说,该节点S2的端口4、端口5和端口6属于不同的路由域。
可理解,本申请实施例对于各节点确定其角色信息的先后顺序不作限定。示例性的,节点S2接收到节点S1和节点S3的角色通知消息,则该节点S2便可以确定其角色信息。又如节点S3接收到节点S2和节点S4的角色通知消息,则该节点S3便可以确定其角色信息。
604、域生成角色生成路由域标识,域学习角色学习路由域标识。
示例性的,根节点生成路由域标识如area0,配置端口1的路由域标识为area0;以及通过该端口1向节点S1发送第一消息,节点S1通过端口2接收该第一消息,配置端口2的路由域标识为area0。该第一消息中可以携带路由域标识如area0。可选的,该第一消息还可以携带根节点的标识信息、节点S1的标识信息等。从而可使得节点S1根据该第一消息确认当前相邻节点的连接关系和角色信息是否正确,若正确,则该节点S1可以学习area0;若不正确,则节点S1可以重新向根节点发送角色通知消息等,以确认根节点和节点S1的角色信息。
节点S1通过端口3向节点S2扩散其学习到的路由域标识如area0,节点S2通过端口4接收第一消息,该第一消息中携带路由域标识如area0。可选的,该第一消息还可以携带节点S1的标识信息、节点S2的标识信息等。节点S1配置端口3的路由域标识为area0,节点S2配置端口4的路由域标识为area0。
示例性的,节点S3生成路由域标识如area3,通过端口8向节点S2发送第一消息;节点S2通过端口5接收该第一消息。该第一消息携带路由域标识如area3。可选的,该第一消息还可以携带节点S3的标识信息、节点S2的标识信息等。节点S3配置端口8的路由域标识为area3,节点S2配置端口5的路由域标识为area3。
示例性的,节点S4生成路由域标识如area4,通过端口7向节点S2发送第一消息;节点S2通过端口6接收该第一消息。该第一消息携带路由域标识如area4。可选的,该第一消息还可以携带节点S4的标识信息、节点S2的标识信息等。节点S4配置端口7的路由域标识为area4,节点S2配置端口6的路由域标识为area4。
可理解,图6中是以第一消息为例示出的,但是不同节点发送的消息还可以为不同的消息名称(如第一消息或第六消息等),本申请实施例对此不作限定。
从图7a可以看出,节点S3(边缘节点)和节点S4(边缘节点)所在的路由域标识不相同。且该节点S3和该节点S4均存在全局域标识,即该节点S3的所有端口的路由域标识相同如为area3,节点S4的所有端口的路由域标识相同如为area4。
从图7a也可以看出,节点S2(次外节点)可以从多个相邻的节点学习路由域标识, 每个端口的路由域标识不相同,该情况下,节点S2不存在全局域标识。因此,在具体实现中,次外节点还可以将连接边缘节点的端口的路由域标识配置为该边缘节点生成的路由域标。以及该次外节点还可以加入从普通节点或根节点学习到的路由域标识所在的路由域。
从图7a也可以看出,节点S1的所有端口的路由域标识均为从根节点学习到的路由域标识,该情况下,节点S1存在全局域标识。可理解,图7a中节点S1的节点类型仅为普通节点。然而,如图5a所示,节点3和节点4的节点类型既可以为次外节点,又可以为普通节点,该情况下,普通节点就不存在全局域标识。
可理解,本申请实施例对于根节点、节点S3和节点S4生成路由域标识以及向对端节点发送第一消息的先后顺序不作限定。
在一些实现方式中,步骤602可以以一定的时间间隔执行;或者,以固定频率执行等,本申请实施例对此不作限定。可理解,该一定的时间间隔可以与图2所示的预置时间间隔相同,也可以不同。以及该固定频率也可以与图2所示的预置频率相同或不同。
在另一些实现方式中,在网络的拓扑结构发生变化的情况下,执行步骤602。该情况下,节点之间可以相互确认本端相对于对端的角色信息是否发生变化。进一步的,还可以确定节点所在的路由域标识是否需要更新。示例性的,如图7b所示,网络发生扩容,如增加了节点S5,该情况下,节点S3可以通过节点S5的角色通知消息,获知其节点类型发生了变化。即节点S3的节点类型由边缘节点变化为次外节点。同时,节点S2相对于节点S3的节点类型也发生了变化,即节点S2的节点类型由次外节点变化为普通节点。
进一步的,节点S2、节点S3和节点S5可以执行步骤603和步骤604所示的方法。示例性的,节点S2可以将路由域标识area0发送给节点S3,节点S3更新端口8的路由域标识为area0。节点S3学习从节点S5获取到的路由域标识如area5,同时配置端口9的路由域标识为area5。由于节点S4和节点S2的节点类型未发生变化,因此该节点S4和节点S2的路由域标识可以不更新。
换句话说,在网络的拓扑结构发生变化的情况下,避免了全网重新划分路由域,通过调整少量节点的路由域标识,就可以实现重新对网络进行路由域部署,提高了重新部署的效率,提升了网络的动态适应性。
605、交互路由信息。
示例性的,根节点、节点S1和节点S2之间可以相互交互路由信息。节点S3和节点S2之间也可以交互路由信息以及节点S4和节点S2之间也可以交互路由信息(图7a中未示出)。一般的,在一个路由域内,节点之间可以直接交互路由信息,在不同路由域内的节点之间交互路由信息时,需要通过路由域的边界节点。例如,图7a中,节点S1需要发送路由信息给节点S4,该情况下,该节点S1可以向节点S2发送该路由信息,该节点S2将该路由信息发送给节点S4。又例如,图7b中,根节点需要向节点S5发送路由信息,则该根节点可以将该路由信息发送给节点S3,节点S3可以将该路由信息发送给节点S5。
换句话说,本申请实施例示出的路由域标识可以用于确定节点的路由方式;或者,可以用于确定节点交互路由信息的路由域范围(或边界等)。
通过本申请实施例提供的方法,各个节点可以通过路由协议构建路由域,从而学习或生成相关路由,完成全网路由的构建。
本申请实施例中,通过引入节点类型,根据该节点类型确定角色信息。节点之间根据角色信息自行协商(按照一定规则)、自动生成或学习路由标识等,提高了对组网拓扑的适应性。进一步的,当拓扑结构变化时,可以调整变化的几个节点的节点类型,即变化的节点重新自协商自生成路由域,避免了全网的重规划、甚至重新部署导致断网的风险。
可理解,以上所示的各个实施例各有侧重,其中一个实施例中未详细描述的实现方式可参考其他实施例,这里不再一一赘述。
以下将介绍本申请实施例提供的设备。
首先,介绍本申请实施例提供的角色确定设备,该角色确定设备可以用于根据网络的拓扑结构确定节点类型。该角色确定设备可以包括处理电路和接口电路。例如,该接口电路可用于获取网络的拓扑结构,可理解,本申请实施例对于获取网络的拓扑结构的方法不作限定。又例如,处理电路可用于根据获取的网络的拓扑结构,确定节点的节点类型。
示例性的,根节点中可以包括该角色确定设备,由此,根节点可以获取网络中各个节点的节点类型。例如,根节点将第一节点的节点类型发送给该第一节点,以及将第二节点的节点类型发送给该第二节点等。
该处理电路可以为芯片、逻辑电路、集成电路或片上***(system on chip,SoC)芯片等,接口电路可以为通信接口、输入输出接口等。
示例性的,网络中的各个节点中均可以包括该角色确定设备,由此,各个节点可以确定其本端节点的节点类型。例如,网络中的第一节点可以根据网络的拓扑结构获取其节点类型;网络中的第二节点也可以根据网络的拓扑结构获取其节点类型。
本申请示出的角色确定设备所执行的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的单元或模块等。例如,该角色确定设备可以是通用计算机或网元设备等,或者,该角色确定设备还可以通过软件实现等。
其次,介绍本申请实施例提供的网络设备。
图8是本申请实施例提供的一种网络设备的结构示意图,该网络设备可用于执行上述方法实施例中由第一节点执行的操作。示例性的,该网络设备可以为交换机或路由器等。该交换机还可以包括接入交换机、汇聚交换机或核心交换机等。或者,该网络设备还可以为与交换机或路由器具有相同功能的其他设备等。或者,该网络设备还可以为通用计算机或网元设备等,该网络设备可以是有线设备,还可以是无线设备。例如,该网络设备可以用于执行图2、图4a、图4b或图6所示的方法。如图8所示,该网络设备包括处理单元801和收发单元802。其中,
处理单元801,用于获取网络设备的第一端口的路由域标识;收发单元802,用于通过第一端口向第二节点发送第一消息,第一消息携带第一路由域标识,第一路由域标识为第一端口的路由域标识,第一消息用于指示第二节点配置第二节点的第二端口的路由域标识为第一路由域标识,第二端口为第二节点接收第一消息的端口。
本申请实施例中,处理单元801,可以用于生成第一路由域标识;或者,处理单元801,还可以通过收发单元802接收其他节点发送的第一路由域标识。
在一种可能的实现方式中,处理单元801,还用于配置该第一端口的路由域标识为第一路由域标识。
本申请实施例中,关于处理单元和收发单元的具体实现方式可参考图2所示的方法,这里不再详述。
在一种可能的实现方式中,收发单元802,还用于根据第一路由域标识与第二节点交互路由信息。
在一种可能的实现方式中,网络设备为边缘节点,处理单元801,还用于配置网络设备的所有端口的路由域标识为第一路由域标识。
在一种可能的实现方式中,网络设备为边缘节点,第一路由域标识和网络中其它边缘节点获取的路由域标识不相同。
在一种可能的实现方式中,处理单元801,还用于确定网络设备相对于第二节点的角色信息为域生成角色。
在一种可能的实现方式中,处理单元801,还用于获取网络设备在网络中的节点类型,以及第二节点在网络中的节点类型;以及根据网络设备的节点类型和第二节点的节点类型,确定网络设备相对于第二节点的角色信息为域生成角色。
在一种可能的实现方式中,处理单元801,还用于获取网络设备的节点类型;以及通过收发单元802接收来自第二节点的第二消息,该第二消息中携带第二节点的节点类型。
在一种可能的实现方式中,处理单元801,用于通过收发单元802接收来自根节点的第五消息,第五消息携带网络设备的节点类型;以及接收来自第二节点的第二消息,第二消息携带第二节点的节点类型。
本申请实施例中,关于处理单元801和收发单元802的具体实现方式,可参考图4a和图4b所示的方法,这里不再详述。示例性的,关于第二消息、第五消息的具体描述,也可以参考图4a和图4b所示的方法。
在一种可能的实现方式中,收发单元802,具体用于在网络的拓扑结构发生变化的情况下,通过第一端口向第二节点发送第一消息;其中,网络设备和/或第二节点为节点类型发生变化的节点;或者,网络设备和/或第二节点为新增的节点。
可理解,本申请实施例中,关于收发单元802的具体实现方式,可参考图7b所示的相关方法,这里不再详述。
本申请实施例中,关于节点类型的描述,可参考上文方法实施例,这里不再详述。示例性的,如节点类型可以包括第一级节点、第二级节点;又如节点类型可以包括第一级节点、第二级节点和第三级节点;又如节点类型还可以包括根节点、边缘节点、次外节点和普通节点等。
示例性的,该网络设备的节点类型如可以为第一级节点或第三级节点。又如,该网络设备的节点类型还可以为根节点或边缘节点。又如,该网络设备的节点类型还可以为普通节点,第二节点的节点类型为次外节点或普通节点等。
示例性的,对于节点类型的确定方法可参考图3a至图3c的相关描述。对于节点之间是如何学习路由域标识的方法可参考图5a至图5d的相关描述。
示例性的,参考图6、图7a或图7b,该网络设备可以为图6中的根节点,第二节点为 节点S1。又如,该网络设备还可以为节点S1,第二节点为节点S2。又如,网络设备还可以为节点S3或节点S4,第二节点为节点S2。
需要理解的是,当图8所示的网络设备是网络设备或网络设备中实现上述功能的部件时,处理单元801可以是一个或多个处理器,收发单元802可以是收发器,或者收发单元802还可以是发送单元和接收单元,发送单元可以是发送器,接收单元可以是接收器,该发送单元和接收单元集成于一个器件,例如收发器。
当上述网络设备是电路***如芯片时,处理单元801可以是一个或多个处理器,收发单元802可以是输入输出接口,又或者称为通信接口,或者接口电路,或接口等等。或者收发单元802还可以是发送单元和接收单元,发送单元可以是输出接口,接收单元可以是输入接口,该发送单元和接收单元集成于一个单元,例如输入输出接口。
本申请实施例的网络设备可执行上述方法实施例中由第一节点所执行的任意功能,具体可执行的步骤和/或功能可以参考上述方法实施例中的详细描述,此处仅简要概述,不再赘述。
在一种可能的实现方式中,图8所示的网络设备可以为上述各个方法实施例中的第一节点或第一节点中实现上述功能的部件。该情况下,上述收发单元802可以用收发器实现,上述处理单元801可以用处理器实现。如图9所示,该网络设备90包括一个或多个处理器920和收发器910。该处理器和收发器可以用于执行上述第一节点所执行的功能或操作等。或者,该处理器和收发器还可用于执行上述根节点或边缘节点所执行的功能或操作等。或者,该处理器和收发器还可用于执行上述第一级节点执行的功能或操作等。
示例性的,处理器可用于获取第一端口的路由域标识,该第一端口的路由域标识为第一路由域标识;收发器可用于通过第一端口向第二节点发送第一消息;处理器还可用于配置该第一端口的路由域标识为第一路由域标识。
可理解,关于处理器和收发器的具体方法可参考图2所示的方法。
示例性的,收发器还可用于根据第一路由域标识与第二节点交互路由信息。
示例性的,处理器还可用于确定该网络设备相对于第二节点的角色信息为域生成角色。
示例性的,处理器还可用于获取网络设备的节点类型,以及第二节点在网络中的节点类型;以及根据网络设备的节点类型和第二节点的节点类型,确定网络设备相对于第二节点的角色信息为域生成角色。
示例性的,处理器可用于获取该网络设备的节点类型,以及通过收发器接收第二节点发送的第二消息。
示例性的,处理器,还可用于通过收发器接收来自根节点的第五消息以及来自第二节点的第二消息等。
示例性的,收发器还可用于在网络的拓扑结构发生变化的情况下,通过第一端口向第二节点发送第一消息。
对于收发器和处理器的具体实现方式可参考图2、图4a、图4b或图6所示的方法,这里不再一一详述。对于节点类型的确定方法可参考图3a至图3c的相关描述。对于节点之间是如何学习路由域标识的方法可参考图5a至图5d的相关描述。
在图9所示的网络设备的各个实现方式中,收发器可以包括接收机和发射机,该接收 机用于执行接收的功能(或操作),该发射机用于执行发射的功能(或操作)。以及收发器用于通过传输介质和其他设备/装置进行通信。处理器920利用收发器910收发数据和/或信令,并用于实现上述方法实施例中图2、图4a、图4b或图6所述的相应的方法。
可选的,网络设备90还可以包括一个或多个存储器930,用于存储程序指令和/或数据。存储器930和处理器920耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器920可能和存储器930协同操作。处理器920可能执行存储器930中存储的程序指令。可选的,上述一个或多个存储器中的至少一个可以包括于处理器中。
本申请实施例中不限定上述收发器910、处理器920以及存储器930之间的具体连接介质。本申请实施例在图9中以存储器930、处理器920以及收发器910之间通过总线940连接,总线在图9中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成等。
可理解,在图9所示的网络设备为网络设备时,网络设备还可以具有比图9更多的元器件等,本申请实施例对此不作限定。
可理解,以上所示的处理器和收发器所执行的方法仅为示例,对于该处理器和收发器具体所执行的步骤可参照上文介绍的方法。
在另一种可能的实现方式中,图8所示的网络设备可以为第一节点中的电路***。该情况下,上述处理单元801可以用处理电路实现,收发单元802用接口电路实现。如图10所示,网络设备可以包括处理电路1001和接口电路1002。该处理电路1001可以为芯片、逻辑电路、集成电路或片上***(system on chip,SoC)芯片等,接口电路1002可以为通信接口、输入输出接口等。示例性的,该网络设备可以为上述方法实施例中第一节点的电路***。示例性的,该网络设备还可以为上述方法实施例中根节点中的电路***或边缘节点的电路***等。示例性的,该网络设备还可以为上述方法实施例中第一级节点中的电路***等。
例如,处理电路可用于获取第一端口的路由域标识,该第一端口的路由域标识为第一路由域标识;接口电路可用于输出第一消息;该处理电路还可用于配置第一端口的路由域标识为第一路由域标识。
可理解,在另一些实现方式中,接口电路也可以用于获取第一端口的路由域标识。
又例如,当网络设备为边缘节点时,处理电路还可用于配置该网络设备的所有端口的路由域标识为第一路由域标识。
又例如,处理电路还可用于确定网络设备相对于第二节点的角色信息为域生成角色。
又例如,处理电路还可用于获取网络设备的节点类型和第二节点的节点类型;以及根 据该网络设备的节点类型和第二节点的节点类型确定其相对于第二节点的角色信息为域生成角色。
又例如,在一些实现方式中,处理电路还可用于获取网络设备的节点类型;接口电路用于获取第二消息。在另一些实现方式中,接口电路还可用于获取第五消息和第二消息。
可理解,以上关于各个消息、节点类型的详细说明,可参考上文方法实施例,这里不再详述。对于节点类型的确定方法可参考图3a至图3c的相关描述。对于节点之间是如何学习路由域标识的方法可参考图5a至图5d的相关描述。
在本申请实施例中,处理电路可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。
可理解,以上所示的接口电路和处理电路所执行的方法仅为示例,对于该接口电路和处理电路具体所执行的步骤可参照上文介绍的方法。
复用图8,图8是本申请实施例提供的一种网络设备的结构示意图。该网络设备可用于执行上述方法实施例中由第二节点执行的操作。示例性的,该网络设备可以为交换机或路由器等。或者,该网络设备还可以为与交换机或路由器具有相同功能的其他设备等。例如,该网络设备可以用于执行图2、图4a、图4b或图6所示的方法。如图8所示,该网络设备包括处理单元801和收发单元802。其中,
收发单元802,用于通过第二端口接收来自第一节点的第一消息,该第一消息携带第一路由域标识,第一消息用于指示网络设备配置网络设备的第二端口的路由域标识为第一路由域标识,第一节点的第一端口的路由域标识为第一路由域标识,第一端口为第一节点发送第一消息的端口;处理单元801,用于配置第二端口的路由域标识为第一路由域标识。
在一种可能的实现方式中,收发单元802,还用于根据第一路由域标识与第一节点交互路由信息。
在一种可能的实现方式中,处理单元801,还用于确定网络设备相对于第一节点的角色信息为域学习角色。
在一种可能的实现方式中,处理单元801,具体用于获取网络设备在网络中的节点类型,以及第一节点在网络中的节点类型;以及根据网络设备的节点类型和第一节点的节点类型确定网络设备相对于第一节点的角色信息为域学习角色。
在一种可能的实现方式中,处理单元801,具体用于获取网络设备的节点类型;以及通过收发单元802接收来自第一节点的第四消息,第四消息携带第一节点的节点类型。
在一种可能的实现方式中,处理单元801,可用于通过收发单元802接收来自根节点的第七消息,第七消息携带网络设备的节点类型;以及接收来自第一节点的第四消息,第四消息携带第一节点的节点类型。
本申请实施例中,关于处理单元801和收发单元802的具体实现方式,可参考图4a和图4c所示的方法,这里不再详述。关于第四消息和第七消息的具体描述,也可参考图4a和图4c所示的方法。
在一种可能的实现方式中,收发单元802,还用于通过第三端口向第三节点发送第八 消息,第八消息携带第一路由域标识,第八消息用于指示第三节点配置第三节点的第四端口的路由域标识为第一路由域标识,第三端口的路由域标识为第一路由域标识;处理单元801,还用于配置第三端口的路由域标识为第一路由域标识。
该实施例中,参考图6、图7a或图7b,第一节点可以为根节点,网络设备可以为节点S1,第三节点可以为节点S2。
在一种可能的实现方式中,收发单元802,具体用于在网络的拓扑结构发生变化的情况下,网络设备通过第二端口接收来自第一节点的第一消息;其中,第一节点和/或网络设备为节点类型发生变化的节点;或者,第一节点和/或网络设备为新增的节点。
本申请实施例中,关于节点类型的描述,可参考上文方法实施例,这里不再详述。示例性的,如节点类型可以包括第一级节点、第二级节点;又如节点类型可以包括第一级节点、第二级节点和第三级节点;又如节点类型还可以包括根节点、边缘节点、次外节点和普通节点等。
示例性的,该网络设备的节点类型如可以为第二级节点。又如,该网络设备的节点类型还可以为次外节点或普通节点等。
示例性的,对于节点类型的确定方法可参考图3a至图3c的相关描述。对于节点之间是如何学习路由域标识的方法可参考图5a至图5d的相关描述。
示例性的,参考图6、图7a或图7b,第一节点还可以为图6中的根节点,该网络设备可以为节点S1。又如,第一节点还可以为节点S1,网络设备为节点S2。又如第一节点还可以为节点S3或节点S4,网络设备为节点S2。
可理解,关于处理单元和收发单元的具体介绍,还可参考上文网络设备为第一节点时关于图8的描述,这里不再一一详述。
本申请实施例的网络设备可执行上述方法实施例中由第二节点所执行的任意功能,具体可执行的步骤和/或功能可以参考上述方法实施例中的详细描述,此处仅简要概述,不再赘述。
在一种可能的实现方式中,上述网络设备可以为第二节点或第二节点中实现上述功能的部件。该情况下,上述收发单元可以用收发器实现,处理单元可以用处理器实现。对于收发器和处理器的具体实现方式可参考处理单元和收发单元,这里不再一一详述。可理解,对于处理器和收发器的具体说明,还可以参考上述网络设备作为第一节点时的描述,这里不再详述。例如,网络设备作为第二节点时,该网络设备还可以包括存储器等。
在另一种可能的实现方式中,上述网络设备还可以为第二节点中的电路***。该情况下,上述收发单元可以用接口电路实现,处理单元可以用处理电路实现。复用图10,该处理电路1001可以为芯片、逻辑电路、集成电路、处理电路或片上***(system on chip,SoC)芯片等,接口电路1002可以为通信接口、输入输出接口等。
例如,接口电路可用于获取第一消息,处理电路可用于配置第二端口的路由域标识为第一路由域标识。
又例如,处理电路还可用于确定网络设备相对于第一节点的角色信息为域学习角色。
又例如,处理电路还可用于获取网络设备在网络中的节点类型,以及第一节点在网络中的节点类型;以及根据网络设备的节点类型和第一节点的节点类型确定网络设备相对于 第一节点的角色信息为域学习角色。
又例如,处理电路可以用于获取网络设备的节点类型;接口电路可用于获取第四消息。
又例如,接口电路可以用于获取第四消息和第七消息等。
又例如,接口电路还可以用于输出第八消息,处理电路还可用于配置第三端口的路由域标识为第一路由域标识。
可理解,关于第四消息、第七消息或第八消息的介绍,及关于节点类型或路由域标识等的介绍可以参考方法实施例的描述,这里不再详述。
可理解,关于接口电路和处理电路的具体介绍,可参考图10所示的网络设备为第一节点中的电路***时的相关描述,这里不再详述。
图11是本申请实施例提供的一种路由自治***的示意图,如图11所示,该路由自治***可以包括第一节点和第二节点。该第一节点可以用于执行图2、图4a或图4b中由第一节点执行的方法,相应的,第二节点可以用于执行图2、图4a或图4b中由第二节点执行的方法。或者,该第一节点还可用于执行图6中由根节点执行的方法,第二节点还可用于执行图6中由节点S1执行的方法。或者,该第一节点还可用于执行图6中由节点S1执行的方法,第二节点还可用于执行图6中由节点S2执行的方法。该第一节点还可用于执行图6中由节点S3或节点S4执行的方法,第二节点还可用于执行节点S2执行的方法。
可选的,该路由自治***还可以包括第三节点。示例性的,第一节点可以用于执行图6中由根节点执行的方法,第二节点可以用于执行节点S1执行的方法,第三节点则可以用于执行节点S2执行的方法。或者,如图7b所示,第一节点可用于执行图7b中由根节点执行的方法,第二节点可用于执行图7b中由节点S1执行的方法,第三节点可用于执行图7b中由节点S2执行的方法。或者,第一节点可用于执行图7b中由节点S1执行的方法,第二节点可用于执行图7b中由节点S2执行的方法,第三节点可用于执行图7b中由节点S3执行的方法。
在本申请所提供的几个实施例中,应该理解到,所揭露的***、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例提供的方案的技术效果。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者 说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个可读存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的可读存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
此外,本申请还提供一种计算机程序,该计算机程序用于实现本申请提供的配置路由域标识的方法中由第一节点执行的操作和/或处理。
本申请还提供一种计算机程序,该计算机程序用于实现本申请提供的配置路由域标识的方法中由第二节点执行的操作和/或处理。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机代码,当计算机代码在计算机上运行时,使得计算机执行本申请提供的配置路由域标识的方法中由第一节点执行的操作和/或处理。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机代码,当计算机代码在计算机上运行时,使得计算机执行本申请提供的配置路由域标识的方法中由第二节点执行的操作和/或处理。
本申请还提供一种计算机程序产品,该计算机程序产品包括计算机代码或计算机程序,当该计算机代码或计算机程序在计算机上运行时,使得本申请提供的配置路由域标识的方法中由第一节点执行的操作和/或处理被执行。
本申请还提供一种计算机程序产品,该计算机程序产品包括计算机代码或计算机程序,当该计算机代码或计算机程序在计算机上运行时,使得本申请提供的配置路由域标识的方法中由第二节点执行的操作和/或处理被执行。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (30)

  1. 一种配置路由域标识的方法,其特征在于,所述方法包括:
    第一节点获取所述第一节点的第一端口的路由域标识;
    所述第一节点通过所述第一端口向第二节点发送第一消息,所述第一消息携带第一路由域标识,所述第一路由域标识为所述第一端口的路由域标识,所述第一消息用于指示所述第二节点配置所述第二节点的第二端口的路由域标识为所述第一路由域标识,所述第二端口为所述第二节点接收所述第一消息的端口。
  2. 根据权利要求1所述的方法,其特征在于,所述第一节点通过所述第一端口向第二节点发送第一消息之后,所述方法还包括:
    所述第一节点根据所述第一路由域标识与所述第二节点交互路由信息。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一节点为边缘节点,所述第一节点配置所述第一节点的所有端口的路由域标识为所述第一路由域标识。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一节点为边缘节点,所述第一路由域标识和网络中其它边缘节点获取的路由域标识不相同。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一节点获取所述第一节点的第一端口的路由域标识之前,所述方法还包括:
    所述第一节点确定所述第一节点相对于所述第二节点的角色信息为域生成角色。
  6. 根据权利要求5所述的方法,其特征在于,所述第一节点确定所述第一节点相对于所述第二节点的角色信息为域生成角色,包括:
    所述第一节点获取所述第一节点在网络中的节点类型,以及所述第二节点在所述网络中的节点类型;
    所述第一节点根据所述第一节点的节点类型和所述第二节点的节点类型,确定所述第一节点相对于所述第二节点的角色信息为所述域生成角色。
  7. 根据权利要求6所述的方法,其特征在于,所述第一节点获取所述第一节点在网络中的节点类型,以及所述第二节点在所述网络中的节点类型,包括:
    所述第一节点接收来自根节点的第五消息,所述第五消息携带所述第一节点的节点类型;
    所述第一节点接收来自所述第二节点的第二消息,所述第二消息携带所述第二节点的节点类型。
  8. 一种配置路由域标识的方法,其特征在于,所述方法包括:
    第二节点通过第二端口接收来自第一节点的第一消息,所述第一消息携带第一路由域 标识,所述第一消息用于指示所述第二节点配置所述第二节点的所述第二端口的路由域标识为所述第一路由域标识,所述第一节点的第一端口的路由域标识为所述第一路由域标识,所述第一端口为所述第一节点发送所述第一消息的端口;
    所述第二节点配置所述第二端口的路由域标识为所述第一路由域标识。
  9. 根据权利要求8所述的方法,其特征在于,所述第二节点配置所述第二端口的路由域标识为所述第一路由域标识之后,所述方法还包括:
    所述第二节点根据所述第一路由域标识与所述第一节点交互路由信息。
  10. 根据权利要求8或9所述的方法,其特征在于,所述第二节点配置所述第二端口的路由域标识为所述第一路由域标识之前,所述方法还包括:
    所述第二节点确定所述第二节点相对于所述第一节点的角色信息为域学习角色。
  11. 根据权利要求10所述的方法,其特征在于,所述第二节点确定所述第二节点相对于所述第一节点的角色信息为域学习角色,包括:
    所述第二节点获取所述第二节点在网络中的节点类型,以及所述第一节点在所述网络中的节点类型;
    所述第二节点根据所述第二节点的节点类型和所述第一节点的节点类型,确定所述第二节点相对于所述第一节点的角色信息为所述域学习角色。
  12. 根据权利要求11所述的方法,其特征在于,所述第二节点获取所述第二节点在网络中的节点类型,以及所述第一节点在所述网络中的节点类型,包括:
    所述第二节点接收来自根节点的第七消息,所述第七消息携带所述第二节点的节点类型;
    所述第二节点接收来自第一节点的第四消息,所述第四消息携带所述第一节点的节点类型。
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述节点类型包括根节点、边缘节点、次外节点或普通节点中的一种或多种;其中,
    所述边缘节点不在其他节点到所述根节点的最短路径上,所述其他节点为网络中除所述边缘节点和所述根节点之外的节点;
    所述次外节点在所述边缘节点到所述根节点的最短路径上,所述次外节点与所述边缘节点连接;
    所述普通节点为所述网络中除所述根节点、所述边缘节点和所述次外节点之外的节点。
  14. 根据权利要求13所述的方法,其特征在于,
    所述第一节点的节点类型为所述根节点;或者,
    所述第一节点的节点类型为所述边缘节点;或者,
    所述第一节点的节点类型为所述普通节点,所述第二节点的节点类型为所述次外节点或所述普通节点。
  15. 一种网络设备,其特征在于,所述网络设备包括:
    处理器,用于获取所述网络设备的第一端口的路由域标识;
    收发器,用于通过所述第一端口向第二节点发送第一消息,所述第一消息携带第一路由域标识,所述第一路由域标识为所述第一端口的路由域标识,所述第一消息用于指示所述第二节点配置所述第二节点的第二端口的路由域标识为所述第一路由域标识,所述第二端口为所述第二节点接收所述第一消息的端口。
  16. 根据权利要求15所述的网络设备,其特征在于,
    所述收发器,还用于根据所述第一路由域标识与所述第二节点交互路由信息。
  17. 根据权利要求15或16所述的网络设备,其特征在于,所述网络设备为边缘节点,所述处理器,还用于配置所述网络设备的所有端口的路由域标识为所述第一路由域标识。
  18. 根据权利要求15-17任一项所述的网络设备,其特征在于,所述网络设备为边缘节点,所述第一路由域标识和网络中其它边缘节点获取的路由域标识不相同。
  19. 根据权利要求15-18任一项所述的网络设备,其特征在于,
    所述处理器,还用于确定所述网络设备相对于所述第二节点的角色信息为域生成角色。
  20. 根据权利要求19所述的网络设备,其特征在于,
    所述处理器,具体用于获取所述网络设备在网络中的节点类型,以及所述第二节点在所述网络中的节点类型;以及根据所述网络设备的节点类型和所述第二节点的节点类型,确定所述网络设备相对于所述第二节点的角色信息为所述域生成角色。
  21. 根据权利要求20所述的网络设备,其特征在于,
    所述处理器,用于通过所述收发器接收来自根节点的第五消息,所述第五消息携带所述网络设备的节点类型;以及接收来自所述第二节点的第二消息,所述第二消息携带所述第二节点的节点类型。
  22. 一种网络设备,其特征在于,所述网络设备包括:
    收发器,用于通过第二端口接收来自第一节点的第一消息,所述第一消息携带第一路由域标识,所述第一消息用于指示所述网络设备配置所述网络设备的所述第二端口的路由域标识为所述第一路由域标识,所述第一节点的第一端口的路由域标识为所述第一路由域标识,所述第一端口为所述第一节点发送所述第一消息的端口;
    处理器,用于配置所述第二端口的路由域标识为所述第一路由域标识。
  23. 根据权利要求22所述的网络设备,其特征在于,
    所述收发器,还用于根据所述第一路由域标识与所述第一节点交互路由信息。
  24. 根据权利要求22或23所述的网络设备,其特征在于,
    所述处理器,还用于确定所述网络设备相对于所述第一节点的角色信息为域学习角色。
  25. 根据权利要求24所述的网络设备,其特征在于,
    所述处理器,具体用于获取所述网络设备在网络中的节点类型,以及所述第一节点在所述网络中的节点类型;以及根据所述网络设备的节点类型和所述第一节点的节点类型确定所述网络设备相对于所述第一节点的角色信息为所述域学习角色。
  26. 根据权利要求25所述的网络设备,其特征在于,
    所述处理器,具体用于通过所述收发器接收来自根节点的第七消息,所述第七消息携带所述网络设备的节点类型;以及接收来自第一节点的第四消息,所述第四消息携带所述第一节点的节点类型。
  27. 根据权利要求15-26任一项所述的网络设备,其特征在于,所述节点类型包括根节点、边缘节点、次外节点或普通节点中的一种或多种;其中,
    所述边缘节点不在其他节点到所述根节点的最短路径上,所述其他节点为网络中除所述边缘节点和所述根节点之外的节点;
    所述次外节点在所述边缘节点到所述根节点的最短路径上,所述次外节点与所述边缘节点连接;
    所述普通节点为所述网络中除所述根节点、所述边缘节点和所述次外节点之外的节点。
  28. 根据权利要求27所述的网络设备,其特征在于,
    所述第一节点的节点类型为所述根节点;或者,
    所述第一节点的节点类型为所述边缘节点;或者,
    所述第一节点的节点类型为所述普通节点,所述网络设备的节点类型为所述次外节点或所述普通节点。
  29. 一种计算机可读存储介质,其特征在于,包括计算机程序,当所述计算机程序在计算机上运行时,如权利要求1-7任一项所述的方法被执行;或者,如权利要求8-14任一项所述的方法被执行。
  30. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得如权利要求1-7任一项所述的方法被执行;或者,使得如权利要求8-14任一项所述的方法被执行。
PCT/CN2021/089451 2020-04-24 2021-04-23 配置路由域标识的方法及设备 WO2021213517A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010335099.6A CN113556796A (zh) 2020-04-24 2020-04-24 配置路由域标识的方法及设备
CN202010335099.6 2020-04-24

Publications (1)

Publication Number Publication Date
WO2021213517A1 true WO2021213517A1 (zh) 2021-10-28

Family

ID=78101397

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/089451 WO2021213517A1 (zh) 2020-04-24 2021-04-23 配置路由域标识的方法及设备

Country Status (2)

Country Link
CN (1) CN113556796A (zh)
WO (1) WO2021213517A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247345A (zh) * 2008-03-24 2008-08-20 中兴通讯股份有限公司 路由域的分割和合并方法
CN103828310A (zh) * 2013-11-29 2014-05-28 华为技术有限公司 一种链路发现的方法、***及设备
CN104301219A (zh) * 2013-07-15 2015-01-21 中兴通讯股份有限公司 一种网络拓扑的方法及***
US20150381471A1 (en) * 2013-03-05 2015-12-31 Nec Corporation Path information exchange method, communication node, communication system, and communication node program
CN107852363A (zh) * 2015-06-30 2018-03-27 高通股份有限公司 对通信网络中的网络路由域的管理

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247345A (zh) * 2008-03-24 2008-08-20 中兴通讯股份有限公司 路由域的分割和合并方法
US20150381471A1 (en) * 2013-03-05 2015-12-31 Nec Corporation Path information exchange method, communication node, communication system, and communication node program
CN104301219A (zh) * 2013-07-15 2015-01-21 中兴通讯股份有限公司 一种网络拓扑的方法及***
CN103828310A (zh) * 2013-11-29 2014-05-28 华为技术有限公司 一种链路发现的方法、***及设备
CN107852363A (zh) * 2015-06-30 2018-03-27 高通股份有限公司 对通信网络中的网络路由域的管理

Also Published As

Publication number Publication date
CN113556796A (zh) 2021-10-26

Similar Documents

Publication Publication Date Title
CN109510768B (zh) 链路状态通告lsa发送方法、装置和***
EP3474502B1 (en) Reduced configuration for multi-stage network fabrics
US5881243A (en) System for maintaining multiple loop free paths between source node and destination node in computer network
US7334047B1 (en) Method and system for selective link state advertisement blocking over a data network area
US7924726B2 (en) Arrangement for preventing count-to-infinity in flooding distance vector routing protocols
KR20150056159A (ko) SDN(Software-defined networking)에서 네트워크 장애 해소를 위한 컨트롤러 및 스위치의 동작 방법과, 이를 위한 컨트롤러 및 스위치
US8891536B2 (en) Layer-3 services for united router farm
US7965642B2 (en) Computing path information to a destination node in a data communication network
CN104378297A (zh) 一种报文转发方法及设备
US11290394B2 (en) Traffic control in hybrid networks containing both software defined networking domains and non-SDN IP domains
US8667174B2 (en) Method and system for survival of data plane through a total control plane failure
US10673735B2 (en) Multiple topology-transparent zones having a common edge node
US20230010837A1 (en) Fault diagnosis method and apparatus thereof
WO2017084448A1 (zh) 一种网络***及网络运行方法
US20050254473A1 (en) Routing within a mobile communication network
US20160072695A1 (en) Method and apparatus for determining next hop and advertising routing information
CN113872868A (zh) 通知消息传输方法、装置及***、存储介质
WO2022062568A1 (zh) 一种交换机的配置方法及相关设备
CN114222209A (zh) 混合协议交换网络路由实现方法、装置及网络交换设备
EP3429139B1 (en) Ingress gateway selection for a shortest path bridging network to support inter domain multicast routing
WO2021004213A1 (zh) 融合网络的路径标签确定方法及装置、存储介质及电子装置
US11296980B2 (en) Multicast transmissions management
WO2021213517A1 (zh) 配置路由域标识的方法及设备
WO2022078052A1 (zh) 一种节点的配置方法、控制器和节点
WO2022267083A1 (zh) 确定路径的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21793555

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

Country of ref document: EP

Kind code of ref document: A1