Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 2 is a schematic structural diagram of a dual-homing protocol deployment system according to an embodiment of the present invention, which is applicable to a case where a dual-homing protocol is deployed on a site, for example, a wind power site, and as shown in fig. 2, the dual-homing protocol deployment system includes: a core switch 101 and at least one dual-homed protocol link 102; a core switch 101 connected in the distributed redundancy protocol ring network, configured as a home node, for connecting at least one dual-home protocol link 102; each dual-homed protocol link 102 includes at least one onhook switch 103, each onhook switch 103 configured as a normal node.
The home node is a node in which a dual-home protocol link is connected to a distributed redundancy protocol ring network, and is generally configured on a switch connected to the distributed redundancy protocol ring network. The port of the switch as the home node connected with the distributed redundancy protocol ring network is a home port. The normal node is a node in the dual-homing protocol link except the home node. The core switch 101 is a convergence point of the distributed redundancy protocol ring network and the dual-homed protocol link 102, and is configured as a home node.
The core switch 101 serving as the home node reports all the received distributed redundancy protocol ring network protocol packets to a Central Processing Unit (CPU) of the core switch 101, so as to prevent the distributed redundancy protocol ring network protocol packets from being forwarded to the dual-home protocol link 102 from other ports. Protocol messages on dual-homed protocol link 102 are only passed in core switch 101 and dual-homed protocol link 102. Therefore, the protocol message on the dual-homed protocol link 102 is not intercommunicated with the protocol message in the distributed redundancy protocol ring network, and does not affect the original distributed redundancy protocol ring network.
Optionally, each of the hook switches 103 has the same configuration and is disposed in the same domain. Optionally, each onhook switch 103 is disposed in DRP domain 1.
In the dual-homing protocol deployment system provided in this embodiment, a core switch at a convergence point of a distributed redundancy protocol ring network and a dual-homing protocol link is configured as a home node, and is configured to connect at least one dual-homing protocol link; every dual homing agreement link all includes at least one and articulates the switch, and every articulates the switch and all configures into normal node, can solve the home node configuration process complicacy of dual homing agreement link among the prior art, the problem of mistake appears easily, can realize when the field installation, only need with dual homing agreement link directly articulate on arbitrary two ports of core switch can, the configuration is simple, the equipment is convenient, difficult mistake.
Optionally, all ports of the core switch 101 are set as home ports; when the home port is connected to the hook switch 103, the home port is in a forwarding state; the home port is blocked when not connected to the hook switch 103. The home port of the core switch 101 is not connected to the hook switch 103, but is in a forwarding state when connected to another terminal device.
The port in the forwarding state can forward any data, and also performs address learning and receiving, processing and sending of configuration messages. The port in the blocked state cannot participate in forwarding the data packet, but can receive the configuration message and hand it to the CPU of the core switch 101 for processing, but cannot transmit the configuration message and does not perform address learning. By setting the home port to a blocked state when the port is not connected to the hook switch 103, a temporary loop problem is prevented from occurring in the change of the port role and state.
Therefore, when all ports of the core switch 101 are set as home ports to be installed on site, only the dual-home protocol link 102 needs to be directly hung on any two ports of the core switch 101, and the dual-home protocol link is simple in configuration, convenient to assemble and not prone to errors.
Alternatively, core switch 101 may be elected as the root node in dual-homed protocol link 102. The backup port of core switch 101 is set to a blocking state.
Example two
Fig. 3 is a schematic structural diagram of a dual-homing protocol deployment system according to a second embodiment of the present invention, which is embodied on the basis of various alternatives in the foregoing embodiments: the articulated switch is provided with two ring ports, and the ring ports are used for connecting the attribution ports of the core switch or the ring ports of other articulated switches.
Optionally, the at least one hitching exchanger is two hitching exchangers; the two hooked switches are connected through one of their own two ring ports, and the other ring port that is not connected is connected to the two home ports of the core switch, respectively.
As shown in fig. 3, the dual-homing protocol deployment system includes: a core switch 101 and a dual-homed protocol link 102. Dual-homed protocol link 102 includes: an onhook switch 104 and an onhook switch 105. The hook switch 104 is provided with two ring ports: a ring port 106 and a ring port 107. The hook switch 105 is provided with two ring ports: ring port 108 and ring port 109. Ring port 107 of the hook switch 104 is connected to ring port 108 of hook switch 105. Ring port 106 of hook switch 104 is connected to home port 1 of core switch 101. Ring port 109 of the hook switch 105 is connected to home port 2 of core switch 101.
The ring port is a port which is arranged on the articulated switch and is used for connecting and forming a dual-homing protocol link, and can be arranged according to the requirements of users.
In the dual-homing protocol deployment system provided by this embodiment, two ring ports are provided on an attached switch, and are used for connecting a home port of a core switch or ring ports of other attached switches; when at least one articulated switch is two articulated switches, the two articulated switches are connected through one of two ring ports of the articulated switches, and the other ring port which is not connected is respectively connected to two attribution ports of the core switch, so that a dual-attribution protocol link is formed.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a dual-homing protocol deployment system according to a third embodiment of the present invention, which is embodied on the basis of various alternatives in the foregoing embodiments. As shown in fig. 4, the dual-homing protocol deployment system includes: core switch 101, dual-homed protocol link 301, and dual-homed protocol link 302.
Where core switch 101 is configured as a home node. Port 1, port 2, port 3 and port 4 of core switch 101 are configured as home nodes. Core switch 101 connects two dual-homed protocol links: dual-homed protocol link 301 and dual-homed protocol link 302. Each dual-homing protocol link has three onhook switches. Dual-homed protocol link 301 includes: an onhook switch 11, an onhook switch 12, and an onhook switch 13. Dual-homed protocol link 302 includes: an onhook switch 21, an onhook switch 22, and an onhook switch 23. Each of the onhook switches has the same configuration and is set in the DRP domain 1.
Dual-homed protocol link 301 and dual-homed protocol link 302 are both directly connected to two home ports of core switch 101.
Ring port 14 of the hook switch 11 is connected to home port 1 of core switch 101. The ring port 15 of the hook switch 11 is connected to the ring port 16 of the hook switch 12. Ring port 17 of the hook switch 12 is connected to ring port 18 of the hook switch 13. Ring port 19 of the hook switch 13 is connected to home port 2 of core switch 101.
The ring port 24 of the hook switch 21 is connected to the home port 3 of the core switch 101. The ring port 25 of the onhook switch 21 is connected to the ring port 26 of the onhook switch 22. The ring port 27 of the onhook switch 22 is connected to the ring port 28 of the onhook switch 23. Ring port 29 of the hook switch 23 is connected to home port 4 of core switch 101.
Therefore, when the double-homing protocol link is installed on site, the double-homing protocol link is directly hung on any two homing ports of the core switch, the configuration is simple, the assembly is convenient, and the error is not easy to occur.
Example four
Fig. 5 is a flowchart of a dual-homing protocol deployment method according to a fourth embodiment of the present invention, where this embodiment is applicable to a case where a dual-homing protocol is deployed on a site, for example, a wind power site, and the method may be applied to a core switch. As shown in fig. 5, it specifically includes the following steps:
step 401, the core switch receives a protocol packet sent by the dual homing protocol link.
The protocol message on the dual-homing protocol link is only transmitted in the core switch and the dual-homing protocol link. The core switch serving as the home node reports all the received distributed redundancy protocol ring network protocol messages to a CPU of the core switch, and the distributed redundancy protocol ring network protocol messages are prevented from being forwarded to the dual-home protocol link from other ports. Therefore, the protocol message on the dual-homing protocol link is not communicated with the protocol message in the distributed redundancy protocol ring network, and the original distributed redundancy protocol ring network is not influenced.
Step 402, the core switch processes the protocol message; the core switch is connected in the distributed redundancy protocol ring network, configured as a home node and used for connecting at least one dual-home protocol link.
The protocol message may be a declaration message or a table clearing message. And after receiving the protocol message sent by the dual-homing protocol link through the home node, the core switch processes the protocol message according to the type of the protocol message.
In the dual homing protocol deployment method provided by this embodiment, a core switch receives a protocol packet sent by a dual homing protocol link, and processes the protocol packet; the core switch is connected in the distributed redundancy protocol ring network, configured as a home node and used for connecting at least one dual-home protocol link, and can uniformly process the protocol messages sent by each dual-home protocol link through the set core switch, so that the configuration is simple and errors are not easy to occur.
EXAMPLE five
Fig. 6 is a flowchart of a dual-homing protocol deployment method according to a fifth embodiment of the present invention, which is embodied on the basis of various alternatives in the foregoing embodiments: the protocol message is a statement message; the core switch processes the protocol message, including: and after receiving the statement message, the core switch returns the statement message from the attribution port receiving the statement message. As shown in fig. 6, it specifically includes the following steps:
step 501, the core switch receives a protocol packet sent by the dual-homing protocol link.
Step 502, after receiving the declaration message, the core switch returns the declaration message from the home port that received the declaration message.
Wherein, the root node in the dual-homing protocol link sends a statement message to the dual-homing protocol link periodically. The declaration message is sent to the core switch through the dual-homing protocol link. And after receiving the statement message, the core switch returns the statement message from the attribution port receiving the statement message. Therefore, the root node in the dual-homing protocol link can receive the declaration message sent by the root node from the backup port, the dual-homing protocol link is considered to be closed, and the dual-homing protocol link is in a normal working state.
If the root node does not receive the declaration message sent by the root node within a period of time, the loop of the dual-homing protocol link where the root node is located is not closed and is in a loop-open state. A switch or a line in the dual-homing protocol link may be broken, and the normal communication of the dual-homing protocol link needs to be recovered through the backup link function of the dual-homing protocol link.
In the dual-homing protocol deployment method provided in this embodiment, after receiving the declaration message, the core switch returns the declaration message from the home port that receives the declaration message, so that the root node in the dual-homing protocol link can receive the declaration message sent by the root node from the backup port, and the dual-homing protocol link is considered to be closed and is in a normal working state, and the declaration message sent by each dual-homing protocol link can be uniformly processed by the set core switch.
EXAMPLE six
Fig. 7 is a flowchart of a dual-homing protocol deployment method according to a sixth embodiment of the present invention, which is embodied on the basis of various alternatives in the foregoing embodiments: the protocol message is a table clearing message; the core switch processes the protocol message, including: after any one of the home ports of the core switch receives a table clearing message sent by a corresponding dual-home Protocol link, a Media Access Control (MAC) Address table and an Address Resolution Protocol (ARP) cache table of the home port receiving the table clearing message are cleared; the core switch forwards the table clearing message to the dual-homing protocol link corresponding to the home port except the home port which receives the table clearing message through the home port except the home port which receives the table clearing message, so that the hitching switch in all the dual-homing protocol links connected with the core switch clears the medium access control address table and the address resolution protocol cache table of the corresponding port.
As shown in fig. 6, it specifically includes the following steps:
step 601, the core switch receives a protocol message sent by the dual-homing protocol link.
Step 602, after any one of the home ports of the core switch receives the table clearing message sent by the corresponding dual-home protocol link, the mac address table and the arp cache table of the home port that receives the table clearing message are cleared.
The clear forwarding table entry message, referred to as a clear table message, is used to instruct the switch to clear the MAC address table and the ARP cache table learned by the port. The MAC address table is used for recording the corresponding relation between the MAC address and the interface. The ARP cache table is used for recording the corresponding relation between the marked IP address and the MAC address.
When the switch receives the data, the switch learns the source MAC and the corresponding port, writes the source MAC and the corresponding port into an address table, and corresponds the corresponding port to the MAC address. And finally, learning source MAC corresponding to all data to construct a complete MAC address table. After the switch receives the data, the corresponding relation between the IP address and the MAC address of the corresponding switch for sending the data is recorded in the ARP cache table of the switch. Finally, the corresponding relation between the IP address and the MAC address corresponding to all the data is learned, and a complete ARP cache table is constructed.
And 603, the core switch forwards the table clearing message to the dual-homing protocol link corresponding to the home port except the home port which receives the table clearing message through the home port except the home port which receives the table clearing message, so that the hitching switch in all the dual-homing protocol links connected with the core switch clears the medium access control address table and the address resolution protocol cache table of the corresponding port.
Optionally, the core switch forwards the table clearing message to the corresponding dual-homing protocol link through the home port except the home port receiving the table clearing message, and simultaneously clears the mac address table and the arp cache table of the home port except the home port receiving the table clearing message. The core switch forwards the table clearing message to all the dual-homing protocol links connected with the core switch except the dual-homing protocol link corresponding to the home port of the received table clearing message through the home port except the home port of the received table clearing message. After each articulated switch in the dual-homing protocol link receives the table clearing message, the medium access control address tables and the address resolution protocol cache tables of all the ports of the articulated switch are cleared. Therefore, the media access control address table and the address resolution protocol cache table corresponding to the port of each hooked switch in each dual-homing protocol link of the core switch and each connected dual-homing protocol link are all cleared.
And when the media access control address table and the address resolution protocol cache table corresponding to the port of each articulated switch in each dual-homing protocol link connected with the core switch are all cleared, the core switch replans the message forwarding path. If the medium access control address tables and the address resolution protocol cache tables corresponding to all the hooked switches hung down from the core switch are not cleared and re-planned in a unified manner, only the hooked switches in a part of the dual-homing protocol links are cleared, which may cause errors in the message forwarding path of the core switch. For example, a certain packet forwarding path is not available. In the dual-homing protocol deployment method provided by this embodiment, after receiving, through any one of the home ports of the core switch, a table clearing message sent by a corresponding dual-homing protocol link, a medium access control address table and an address resolution protocol cache table of the home port that received the table clearing message are cleared; the core switch forwards the table clearing message to the dual-homing protocol link corresponding to the home port except the home port receiving the table clearing message through the home port except the home port receiving the table clearing message, so that the hitching switches in all the dual-homing protocol links connected with the core switch clear the medium access control address table and the address resolution protocol cache table of the corresponding port, the table clearing message sent by each dual-homing protocol link can be processed uniformly through the arranged core switch, the medium access control address table and the address resolution protocol cache table corresponding to the port of each hitching switch in the core switch and each connected dual-homing protocol link are cleared, and errors of a message forwarding path of the core switch are effectively avoided.
EXAMPLE seven
Fig. 8 is a block diagram of a dual-homing protocol deployment apparatus according to a seventh embodiment of the present invention. As shown in fig. 8, the apparatus may be configured in a core switch, and includes: a protocol message receiving module 701 and a protocol message processing module 702.
The protocol message receiving module 701 is configured to receive a protocol message sent by a dual-homing protocol link; a protocol packet processing module 702, configured to process a protocol packet; the core switch is connected in the distributed redundancy protocol ring network, configured as a home node and used for connecting at least one dual-home protocol link.
The dual homing protocol deployment device provided by this embodiment receives a protocol packet sent by a dual homing protocol link through a core switch, and processes the protocol packet; the core switch is connected in the distributed redundancy protocol ring network, configured as a home node and used for connecting at least one dual-home protocol link, and can uniformly process protocol messages sent by the dual-home protocol links through the set core switch, so that the configuration is simple and errors are not easy to occur.
Optionally, on the basis of the above technical scheme, the protocol message may be a declaration message;
the protocol packet processing module 702 may include:
and the message returning unit is used for returning the statement message from the attribution port receiving the statement message after receiving the statement message.
Optionally, on the basis of the above technical scheme, the protocol message may be a table clearing message;
the protocol packet processing module 702 may include:
a port clearing unit, configured to clear the mac address table and the arp cache table of the home port that receives the table clearing message after any home port receives the table clearing message sent by the corresponding dual-home protocol link;
and the message forwarding unit is used for forwarding the table clearing message to the dual-homing protocol link corresponding to the attributive port except the attributive port which receives the table clearing message through the attributive port except the attributive port which receives the table clearing message, so that the articulated switch in all the dual-homing protocol links connected with the core switch clears the medium access control address table and the address resolution protocol cache table of the corresponding port.
The dual-homing protocol deployment device provided by the embodiment of the invention can execute the dual-homing protocol deployment method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example eight
Fig. 9 is a schematic structural diagram of a switch according to an eighth embodiment of the present invention. Fig. 9 illustrates a block diagram of an exemplary switch 812 suitable for use in implementing embodiments of the present invention. The switch 812 shown in fig. 9 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 9, the components of the switch 812 may include, but are not limited to: one or more processors or processing units 816 (fig. 9 illustrates an example of a processing unit), a memory 824, a serial port 814, a MAC (Media Access Control) chip 818, a PHY (Physical Layer) chip 820, and an external port 822.
The memory 824 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the dual-homing protocol deployment method in the embodiment of the present invention (for example, the protocol packet receiving module 701 and the protocol packet processing module 702 in the dual-homing protocol deployment apparatus). The processing unit 816 executes various functional applications of the switch and data processing by executing software programs, instructions, and modules stored in the memory 824, that is, implements the dual-homing protocol deployment method described above.
The memory 824 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Additionally, the memory 824 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 824 may further include memory located remotely from processing unit 816, which may be connected to a switch over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Serial port 814 is coupled to processing unit 816. External devices may control the processing unit 816 through the serial port 814. The switch 812 may also communicate with one or more external devices (e.g., gateway devices, switches, etc.). Such communication may be through an external port 822.
The processing unit 816 sends a packet, and the packet may be transmitted to a corresponding device through the MAC chip 818, the PHY chip 820, and the external port 822 in sequence, so as to complete packet sending. The messages sent by other devices may sequentially pass through the external port 22, the PHY chip 20, and the MAC chip 818, and are transmitted to the processing unit 816, so as to complete the message reception.
Example nine
The ninth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the dual-homing protocol deployment method provided in the embodiment of the present invention. The method specifically comprises the following steps: a core switch receives a protocol message sent by a dual-homing protocol link; the core switch processes the protocol message; the core switch is connected in the distributed redundancy protocol ring network, configured as a home node and used for connecting at least one dual-home protocol link.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, Ruby, Go, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.